Efficient Inverted Indexes for Approximate Retrieval over Learned Sparse Representations

Sebastian Bruch, Franco Maria Nardini, Cosimo Rulli, Rossano Venturini · DOI

Abstract

Learned sparse representations form an attractive class of contextual embeddings for text retrieval. That is so because they are effective models of relevance and are interpretable by design. Despite their apparent compatibility with inverted indexes, however, retrieval over sparse embeddings remains challenging. That is due to the distributional differences between learned embeddings and term frequency-based lexical models of relevance such as BM25. Recognizing this challenge, a great deal of research has gone into, among other things, designing retrieval algorithms tailored to the properties of learned sparse representations, including approximate retrieval systems. In fact, this task featured prominently in the latest BigANN Challenge at NeurIPS 2023, where approximate algorithms were evaluated on a large benchmark dataset by throughput and recall. In this work, we propose a novel organization of the inverted index that enables fast yet effective approximate retrieval over learned sparse embeddings. Our approach organizes inverted lists into geometrically-cohesive blocks, each equipped with a summary vector. During query processing, we quickly determine if a block must be evaluated using the summaries. As we show experimentally, single-threaded query processing using our method, Seismic, reaches sub-millisecond per-query latency on various sparse embeddings of the MS MARCO dataset while maintaining high recall. Our results indicate that Seismic is one to two orders of magnitude faster than state-of-the-art inverted index-based solutions and further outperforms the winning (graph-based) submissions to the BigANN Challenge by a significant margin.

Introduction

In modern Information Retrieval, the paradigm has shifted from simple keyword matching (BM25) toward Learned Sparse Representations (LSR), such as SPLADE. These models map text into high-dimensional vectors where each dimension corresponds to a vocabulary term. While LSR models are highly effective and interpretable, they present significant computational challenges.

Traditional inverted indexes rely on dynamic pruning algorithms, such as WAND, which assume that term frequencies follow a Zipfian distribution. However, LSR models break these assumptions: their queries are typically longer, and their weight distributions are much flatter than lexical models. This causes standard indexes to "leak" excessive work, leading to high per-query latency. Consequently, many researchers have turned to complex graph-based methods (like HNSW). While fast, these methods often sacrifice the inherent structural benefits of the sparse inverted index.

The Seismic Approach

To address these inefficiencies, we introduce Seismic (Spilled Clustering of Inverted Lists with Summaries for Maximum Inner Product Search). Seismic reimagines the inverted index architecture through four primary techniques designed to optimize approximate retrieval:

  1. Static Pruning: The system limits the length of each inverted list to the top $\lambda$ documents. This significantly reduces the initial search space without compromising the retrieval of the most relevant results.
  2. Geometric Blocking: Rather than treating an inverted list as a flat sequence, Seismic partitions it into $\beta$ blocks using a shallow variant of K-Means clustering. This groups "geometrically similar" documents together within the index.
  3. Per-block Summary Vectors: Each block is assigned a summary vector representing an upper bound of the values within that block. During query processing, the system calculates the inner product with the summary first. If the summary score falls below a specific threshold, the entire block is skipped, allowing for massive computational savings.
  4. Hybrid Indexing: Seismic utilizes the inverted index to pinpoint candidate blocks but switches to a Forward Index (a lookup table of exact document vectors) to compute final scores. This strategy avoids the cache-miss penalties typically associated with traversing fragmented, long-form inverted lists.

Experimental Evaluation

We evaluated Seismic using two major benchmarks: MS MARCO v1 Passage (8.8 million passages) and Natural Questions (NQ) from the BEIR benchmark. We tested the architecture against three popular LSR models: SPLADE, Efficient SPLADE (E-SPLADE), and uniCoil-T5.

Key Results

  • Superior Throughput: Seismic is one to two orders of magnitude faster than state-of-the-art inverted index baselines such as Ioqp and SparseIvf.
  • Outperforming Graph-Based Methods: At a 95% recall target, Seismic outperformed the graph-based winners of the NeurIPS BigANN 2023 challenge by a factor of 3.4x on SPLADE and 12x on E-SPLADE.
  • Sub-millisecond Latency: On the MS MARCO dataset, Seismic achieved per-query latencies in the microsecond range (approximately 180–500 $\mu s$), depending on the specific model and accuracy requirements.
  • Indexing Efficiency: Seismic builds its index for MS MARCO in just 5 minutes, a stark contrast to the 2+ hours required by graph-based methods like GrassRMA.

Insights and Discussion

Our research highlights a "concentration of importance" within LSR models. For SPLADE, the top 10 entries in a query often account for 75% of the total importance. Seismic exploits this by focusing computation on these high-impact dimensions.

Furthermore, Seismic effectively removes the traditional trade-off between accuracy and speed. Previously, researchers often opted for E-SPLADE over the original SPLADE to gain performance at the cost of accuracy. Seismic is efficient enough to run the more complex, original SPLADE model faster than previous methods could run the "efficient" version.

Limitations and Future Work

While Seismic offers unprecedented speed, it does come with a larger memory footprint than exact methods due to the storage of auxiliary statistics and summary vectors. Additionally, while prefetching mitigates cache misses in the forward index, further optimizations in memory layout could yield additional performance gains. Future work will focus on advanced compression techniques for inverted lists to reduce the memory footprint while maintaining sub-millisecond retrieval speeds.

Summary updated

BibTeX
@inproceedings{bruch2024efficient,
  author = {Sebastian Bruch and Franco Maria Nardini and Cosimo Rulli and Rossano Venturini},
  title = {{Efficient Inverted Indexes for Approximate Retrieval over Learned Sparse Representations}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2024},
  doi = {10.1145/3626772.3657769},
}
Figure