[Paper Review] An Approximate Algorithm for Maximum Inner Product Search over Streaming Sparse Vectors
This paper proposes Sinnamon, an approximate algorithm for Maximum Inner Product Search (MIPS) over streaming sparse real-valued vectors, where existing exact methods fail due to violated assumptions. By combining sketching with an inverted index over coordinate values, Sinnamon enables tunable trade-offs between memory, latency, and accuracy, achieving high performance on both synthetic and real-world datasets across diverse vector distributions.
Maximum Inner Product Search or top-k retrieval on sparse vectors is well-understood in information retrieval, with a number of mature algorithms that solve it exactly. However, all existing algorithms are tailored to text and frequency-based similarity measures. To achieve optimal memory footprint and query latency, they rely on the near stationarity of documents and on laws governing natural languages. We consider, instead, a setup in which collections are streaming -- necessitating dynamic indexing -- and where indexing and retrieval must work with arbitrarily distributed real-valued vectors. As we show, existing algorithms are no longer competitive in this setup, even against naive solutions. We investigate this gap and present a novel approximate solution, called Sinnamon, that can efficiently retrieve the top-k results for sparse real valued vectors drawn from arbitrary distributions. Notably, Sinnamon offers levers to trade-off memory consumption, latency, and accuracy, making the algorithm suitable for constrained applications and systems. We give theoretical results on the error introduced by the approximate nature of the algorithm, and present an empirical evaluation of its performance on two hardware platforms and synthetic and real-valued datasets. We conclude by laying out concrete directions for future research on this general top-k retrieval problem over sparse vectors.
Motivation & Objective
- To address the lack of efficient, scalable solutions for Maximum Inner Product Search (MIPS) over streaming, sparse, real-valued vectors that do not conform to traditional assumptions in information retrieval.
- To overcome the performance degradation of existing exact MIPS algorithms—such as WAND, JASS, and inverted indexes—when applied to non-negative, non-integer, or non-Zipfian distributed vectors from embedding models.
- To design a system that supports dynamic indexing for streaming data while maintaining low latency and memory consumption through approximation.
- To provide theoretical bounds on error introduced by approximation and empirically validate the algorithm’s performance across hardware platforms and data distributions.
Proposed method
- Sinnamon uses a sketching technique with multiple random projections to compress high-dimensional sparse vectors into compact representations, reducing storage and computation.
- It constructs an inverted index over coordinate-value pairs, enabling efficient coordinate-at-a-time retrieval during query processing.
- The algorithm leverages a tunable hyperparameter h, the number of random mappings, to control the trade-off between error probability and memory usage.
- It employs a two-stage retrieval process: first, approximate candidate selection using sketches; second, exact inner product computation on a reduced candidate set for final ranking.
- The method supports dynamic indexing by incrementally updating the sketch and inverted index as new vectors stream in, making it suitable for real-time applications.
- Theoretical analysis bounds the probability of error in top-k retrieval, showing that increasing h shifts error probability closer to zero, enabling predictable accuracy control.
Experimental results
Research questions
- RQ1Can an approximate MIPS algorithm be designed that remains efficient and accurate under arbitrary, non-stationary, real-valued sparse vector distributions?
- RQ2How can memory, latency, and accuracy be flexibly traded off in a streaming setting without relying on assumptions like non-negativity or Zipfian distribution?
- RQ3To what extent can approximate inverted lists and compressed data structures reduce index size without sacrificing retrieval quality?
- RQ4Can theoretical error bounds be used to predict the required candidate set size (k′) for a desired retrieval accuracy on a per-query basis?
- RQ5How can hybrid vectors with both dense and sparse components be indexed and retrieved efficiently using a unified or split approach?
Key findings
- Sinnamon outperforms exact methods like WAND and JASS on real-valued, non-integer, and high-entropy sparse vectors, where existing algorithms degrade significantly.
- On the G100 and G200 synthetic datasets, switching from Roaring to PForDelta compression reduced index size by approximately 23%, from 1.7 GB to 1.3 GB, demonstrating the impact of offline compression.
- Increasing the number of random mappings (h) in Sinnamon reduces the error probability and shifts its distribution closer to zero, enabling better accuracy control in memory-constrained settings.
- Theoretical analysis shows that error probability can be quantified and controlled via h, enabling predictable trade-offs between accuracy and resource usage.
- Empirical evaluation confirms Sinnamon’s effectiveness across two hardware platforms and diverse data distributions, including real-world embedding vectors from SPLADE and other models.
- The algorithm enables practical deployment in streaming systems where exact methods are infeasible due to high latency or memory overhead.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.