Abstract
This paper presents a novel end-to-end framework for query augmentation in Information Retrieval (IR). By leveraging a neural network to predict expansion terms and weights within a differentiable BM25 scoring function, the proposed method bridges the gap between the efficiency of lexical search and the effectiveness of neural models. Evaluated on benchmarks like Natural Questions and MSMARCO, the approach achieves up to a 12% accuracy improvement over vanilla BM25 while maintaining sub-second latency and requiring no document re-indexing.
Introduction
In the field of Information Retrieval (IR), researchers have long grappled with the trade-off between efficiency and effectiveness. Traditional lexical methods, such as BM25, are highly efficient and rely on keyword matching. However, they are limited by the "vocabulary mismatch" problem, where relevant documents may use different terminology than the user's query. Conversely, modern Neural IR models, such as Dense Passage Retrieval (DPR), offer high semantic understanding but at the cost of significant computational overhead, massive storage requirements for dense vectors, and the need to re-index entire document collections whenever the model is updated.
This paper addresses the question: Can we achieve the intelligence of neural models while retaining the speed of BM25? The authors propose a query augmentation approach that adds relevant keywords and adjusts weights before the query is processed by a standard search engine. Unlike previous attempts using manual rules or reinforcement learning, this method enables the learning of these augmentations directly through standard gradient descent.
Methodology
The core innovation of this work is a differentiable scoring function that mimics the BM25 algorithm, allowing for "soft" query expansion within a neural framework.
- Differentiable Augmentation: The system represents queries as sparse vectors. A DistilBERT encoder processes the query to predict an augmentation vector ($a$), containing new "virtual" tokens, and a weighting vector ($w$), which assigns importance scores to each token in the expanded query.
- End-to-End Training: The model is trained using a contrastive loss function. This encourages the network to assign higher BM25 scores to ground-truth ("gold") documents and lower scores to irrelevant negatives.
- Sparse Regularization: To maintain high retrieval speeds, the authors implement a weighted L1 regularization. This specifically penalizes the addition of common, non-discriminative words (e.g., "the", "is") while encouraging the inclusion of rare, high-impact terms.
- Plug-and-Play Retrieval: The output is a modified list of keywords and weights that can be used with off-the-shelf search engines like Pyserini, requiring zero modifications to the existing document index.
As shown in the ablation study above, the weighted L1 regularization is critical for balancing accuracy with latency. Removing these components leads to significantly higher augmentation lengths and increased search times without proportional gains in accuracy.
Experimental Results
The model was evaluated across several standard benchmarks, including Natural Questions (NQ), MSMARCO, and EntityQuestions. It was also tested on TriviaQA to assess out-of-distribution (OOD) generalization.
Accuracy and Efficiency
On the Natural Questions dataset, the proposed method improved Top-5 retrieval accuracy by 12.1 percentage points over vanilla BM25 (0.557 vs. 0.436). Remarkably, this performance was achieved with only approximately 43-47 milliseconds of additional latency compared to a raw BM25 search.
As illustrated in the performance table, the method is orders of magnitude faster than heavy neural models like GAR or SEAL, which can take minutes per query, while remaining competitive in accuracy. On MSMARCO, the model even demonstrated lower latency than some BM25 baselines because the learned weights allowed the engine to skip irrelevant query terms entirely.
Key Insights
- No Document Re-encoding: Unlike dense retrievers, this method only runs a small model on the query at search time, avoiding the massive cost of re-encoding billions of documents.
- Rarity-Driven Sparsity: By penalizing common terms more heavily, the model optimizes for terms that the search engine can process most efficiently.
- Zero-Shot Transfer: The learned linguistic patterns for augmentation generalize well to unseen datasets, as evidenced by strong performance on TriviaQA without specific fine-tuning.
Limitations and Future Work
Despite its successes, the model faces challenges regarding tokenization sensitivity; performance can degrade if the search engine's tokenizer differs from the neural model's (e.g., WordPiece). Additionally, the model is currently constrained by the pretrained model's vocabulary and cannot generate specialized jargon it hasn't encountered. Future research may explore bridging the gap between subword and whole-word tokenization or applying similar differentiable techniques to the document side of the retrieval process.
Summary updated