Abstract
Traditional information retrieval systems often struggle with the "vocabulary mismatch" problem, where relevant documents do not contain the exact terms used in a user's query. While neural re-ranking models offer high accuracy, they introduce significant search-time latency. This paper presents Doc2query, a document expansion technique that predicts potential queries for a document and appends them prior to indexing. By shifting the computational burden to the indexing phase, Doc2query improves retrieval effectiveness by approximately 15% over BM25 baselines while maintaining low latency, making it suitable for production environments.
Introduction
In Information Retrieval (IR), the effectiveness of keyword-based search engines like BM25 is limited by the vocabulary mismatch problem. For instance, a user searching for "lowering glucose" might miss a document that only mentions "reducing blood sugar." To address this, researchers have historically turned to query expansion or neural re-ranking. However, query expansion can be noisy, and neural models like BERT, while powerful, are computationally expensive at search time, often taking seconds to process a single query.
This paper proposes a different approach: Document Expansion. Instead of expanding the query at search time, we expand the document at indexing time. By predicting the questions a document might answer and adding them to the document's text, we bridge the vocabulary gap without sacrificing search speed.
Methodology: The Doc2query Pipeline
The core idea of Doc2query is to "teach" documents to answer questions before they are even asked. The process involves several key stages:
- Model Architecture: The authors utilize a sequence-to-sequence Transformer model, a standard architecture for natural language generation tasks.
- Training: The model is trained on pairs of relevant documents and queries from large-scale datasets. It learns to generate synthetic queries that a human might use to find a specific document.
- Expansion and Indexing: For every document in the corpus, the model generates multiple synthetic queries (typically 10) using top-$k$ random sampling. These queries are concatenated to the original document text.
- Retrieval: The expanded documents are indexed using a standard inverted index (e.g., Anserini/BM25). At search time, the system performs a standard keyword search.
This approach effectively performs term re-weighting (by repeating important words) and introduces new synonyms that were not present in the original text.
Experimental Evaluation
The effectiveness of Doc2query was evaluated on two primary benchmarks: MS MARCO (8.8 million web passages) and TREC CAR (Wikipedia-based retrieval).
Performance and Latency
The results demonstrate that Doc2query significantly outperforms standard BM25 baselines. On MS MARCO, the Mean Reciprocal Rank (MRR@10) improved from 18.4 to 21.5. Furthermore, when combined with a BERT re-ranker, the system achieved state-of-the-art performance (37.5 MRR@10).
Crucially, Doc2query maintains high efficiency. While a full BERT re-ranking pipeline can take upwards of 3500ms per query, Doc2query adds only a marginal increase in latency (90ms vs. 50ms for baseline BM25).
Key Insights
- Vocabulary Bridge: Approximately 31% of the words in the predicted queries were not in the original document, providing critical synonyms for retrieval.
- Document vs. Query Expansion: Document expansion proved more effective than traditional query expansion (like RM3). This is likely because documents provide richer context for the generative model compared to short, often ambiguous user queries.
- Orthogonality: Doc2query and neural re-rankers are complementary. By improving the initial retrieval stage, Doc2query provides a higher-quality candidate set for expensive re-rankers to process.
Conclusion
Doc2query offers a practical and effective solution to the vocabulary mismatch problem in IR. By moving the "heavy lifting" of neural language modeling to the indexing phase, it achieves substantial gains in retrieval quality with minimal impact on search-time performance. Future work will focus on reducing re-indexing overhead and improving generalization to niche domains.
Summary updated