Faster Learned Sparse Retrieval with Guided Traversal

Antonio Mallia, Joel Mackenzie, Torsten Suel, Nicola Tonellotto

Abstract

Modern information retrieval has been transformed by Learned Sparse Models (LSMs), which leverage transformer-based architectures to improve search precision. However, these models often suffer from significant latency overhead compared to traditional lexical baselines. This paper discusses a novel "Guided Traversal" (GT) technique designed to accelerate neural search models by up to four times. By utilizing the efficient skipping logic of traditional BM25 to navigate an inverted index while employing neural weights for final scoring, the proposed method achieves the efficiency of classic search without sacrificing the precision of modern neural models.

Introduction

Search engines have evolved from simple keyword matching to sophisticated Learned Sparse Models (LSMs). By utilizing models like BERT, these systems can predict term importance and perform document expansion—adding relevant synonyms not present in the original text. While these advancements significantly improve retrieval accuracy over the classic BM25 algorithm, they introduce a substantial computational bottleneck. The primary challenge lies in the efficiency of dynamic pruning, a technique essential for large-scale search.

The Challenge: The Dynamic Pruning Bottleneck

Traditional search engines rely on mathematical shortcuts, such as the WAND or MaxScore algorithms, to skip millions of irrelevant documents that cannot mathematically reach the top-K results. These algorithms depend on the score distribution of the terms in the index.

Traditional BM25 distributions are typically "peaky," with a few documents receiving very high scores and many receiving low scores, allowing for aggressive skipping. In contrast, neural models like DeepImpact tend to assign high importance scores to a much larger volume of document-term pairs. This "flatter" distribution forces the search engine to evaluate significantly more documents, leading to increased latency and preventing the effective use of standard dynamic pruning techniques.

Proposed Method: Guided Traversal (GT)

To bridge the gap between neural precision and lexical speed, the authors propose Guided Traversal (GT). This strategy allows a computationally "fast" model to guide the navigation of a "smart" neural model.

1. Dual-Scoring Index

During the indexing phase, the system calculates two distinct scores for every document-term pair: a traditional BM25 score and a neural DeepImpact score. To maintain a compact index and minimize memory overhead, both scores are packed into a single 32-bit integer (16 bits allocated to each).

2. The Guide and Follower Mechanism

During query processing, the system uses the BM25 scores to drive the dynamic pruning logic. Because BM25 possesses a favorable score distribution for skipping, the algorithm can quickly bypass large segments of the inverted index. Whenever the BM25 logic identifies a document as a potential top-K candidate, the system "unpacks" the corresponding neural DeepImpact score from the same memory location. This neural score is then used for the actual ranking and final scoring.

3. Interpolation (GTI)

The researchers also introduced Guided Traversal with Interpolation (GTI). This variant mathematically combines the BM25 and DeepImpact scores during the ranking process. This approach aims to leverage the unique strengths of both scoring systems to potentially enhance retrieval effectiveness beyond what either model could achieve alone.

Experimental Evaluation

The study was conducted using the MSMARCO passage ranking dataset, which contains approximately 8.8 million web passages. Performance was measured using:

  • MSMARCO Dev Queries: Real-world user questions for broad evaluation.
  • TREC 2019 & 2020 Deep Learning Tracks: Curated sets for high-precision benchmarking.

Key Insights

  • Alignment of Top-Tier Results: The core insight of this research is that while BM25 and DeepImpact assign different weights, the documents BM25 considers highly relevant are largely a subset of those the neural model would also rank highly. Using BM25 as a filter rarely results in missing a document that the neural model would have prioritized.
  • Score Distribution Analysis: The researchers quantified the latency issue by showing that neural models often assign high weights to common words (e.g., "the") in specific contexts. While this improves accuracy, it breaks the "skipping" logic of traditional algorithms. GT bypasses this by relying on the more efficient BM25 distribution for the traversal phase.
  • Hardware Efficiency: By bit-packing both scores, the system avoids the "memory wall." A single CPU fetch retrieves both the "guide" (BM25) and "expert" (DeepImpact) scores simultaneously, ensuring that the dual-scoring mechanism does not double the memory bandwidth requirements.

Results

  • 4x Speedup: For the DeepImpact model, Guided Traversal reduced average latency from approximately 20ms to 5ms on the MSMARCO dataset.
  • Accuracy Preservation: Despite skipping a larger number of documents, DeepImpact-GT maintained the exact same Reciprocal Rank (RR@10) as the exhaustive neural version.
  • Pareto Dominance: The proposed methods consistently sit on the Pareto frontier of effectiveness vs. latency, outperforming all tested baselines in providing the best trade-off between speed and quality.
  • Enhanced Effectiveness: The interpolated version (DeepImpact-GTI) improved accuracy by roughly 4.6% on MSMARCO queries, demonstrating that the combination of lexical and neural signals can be synergistic.

Limitations and Future Work

While highly effective, Guided Traversal currently has limitations. It is primarily designed for models using word-level tokenization. It cannot yet be directly applied to models like SPLADE that utilize BERT’s WordPiece tokenization, as those vocabularies do not align perfectly with BM25. Additionally, the guidance is heuristic; there is a theoretical risk that a document with a low BM25 score but a very high neural score could be skipped, though this was not observed to impact accuracy in practice.

Future research will focus on adapting the guided approach for WordPiece-based models and exploring alternative "guide" models that may offer even better pruning characteristics than BM25.

Summary updated

BibTeX
@inproceedings{mallia2022faster,
  author = {Antonio Mallia and Joel Mackenzie and Torsten Suel and Nicola Tonellotto},
  title = {{Faster Learned Sparse Retrieval with Guided Traversal}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2022},
}
Figure