In short. Sparse retrieval matches weighted terms, with lexical gaps limiting traditional keyword methods and learned expansion adding potential matches.
Definition: Sparse retrieval finds documents or passages by matching weighted terms in a shared vocabulary. It represents texts as vectors with mostly zero entries; traditional keyword methods and learned methods that reweight or expand terms belong to this family.
Key facts
- The BEIR paper, published in 2021, evaluates retrieval across 18 datasets and nine tasks, including question answering. It finds BM25, a term-based ranking function, a strong baseline across unfamiliar tasks and domains.
- The Dense Passage Retrieval paper describes traditional sparse retrieval as weighted keyword matching using an inverted index, a structure that maps terms to documents.
- The textbook Introduction to Information Retrieval explains that BM25 scoring accounts for term frequency and document length.
How does term-based retrieval work?
An indexed term is a text unit used for matching, usually a word. The textbook's information retrieval example represents documents through the terms they contain. Each document uses only a small part of the collection's vocabulary, leaving most entries in its vector at zero. This is the meaning of sparse.
An inverted index stores the documents associated with each term. A document identifier labels each document; a postings list records the identifiers associated with a term. The textbook's index-building exercise supplies four short documents about home sales. The following extract derives from that exercise:
home -> [1, 2, 3, 4]
new -> [1, 4]
The term home occurs in every document; new occurs in documents 1 and 4. These lists let retrieval locate matching documents without scanning every text for each request. Ranked retrieval then assigns scores to candidate documents, as the textbook explains.
Why can keyword matching miss an answer?
A lexical gap occurs when a question and a relevant passage express the same idea with different terms. BEIR's discussion of lexical retrieval identifies this limitation and explains that traditional bag-of-words approaches also ignore word order.
The 2020 Dense Passage Retrieval paper illustrates the gap with a question about the bad guy in The Lord of the Rings and a passage describing Sauron as a villain. Matching the shared title alone leaves the relationship between “bad guy” and “villain” unresolved by literal term matching. The paper separates retrieving candidate passages from reading those passages to identify an answer.
How do learned sparse methods change matching?
Learned sparse retrieval uses a trained model to assign term weights or add related terms. BEIR's experimental setup describes DeepCT as learning term frequencies and docT5query as generating possible queries and appending them to a document before lexical search.
Expansion adds potential matching terms to the indexed representation. Consequently, sparse retrieval can match terms that are absent from the original document. BEIR labels traditional BM25 as lexical retrieval and places these learned approaches in a separate sparse category, although both use sparse representations.
How is retrieval evaluated for question answering?
The Dense Passage Retrieval paper defines top-k retrieval accuracy as the fraction of questions for which the selected passages contain an answer. Here, k is the number of passages retained for the reader. This measures whether the reader receives answer-bearing material.
BEIR instead compares ranked results using nDCG@10, a measure that accounts for relevance and position among the leading ten results. Its finding that no approach wins across every dataset supports evaluating sparse retrieval on questions and documents from the intended domain.
Related terms
- Dense retrieval
- Hybrid retrieval
- Retrieval reranking
- Retrieval-augmented generation (RAG)
- BEIR benchmark
FAQ
Is sparse retrieval the same as BM25?
BM25 is one sparse retrieval method. The BEIR paper also evaluates learned approaches such as DeepCT and document expansion through docT5query.
What should I check when a relevant passage is missed?
Compare the question's terms with the passage's terms. The Dense Passage Retrieval paper shows how synonyms and paraphrases create mismatches, using “bad guy” and “villain” as its example.
Sources
- Thakur et al., "BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models", 21 October 2021
- ACL Anthology, "Dense Passage Retrieval for Open-Domain Question Answering", November 2020
- Cambridge University Press, "Okapi BM25: a non-binary model", 2008
- Cambridge University Press, "An example information retrieval problem", 2008
- Cambridge University Press, "A first take at building an inverted index", 2008
Check how a page reads to answer engines. Open the GEO score analyzer