Vectorium and kANNolo: What a Modular ANN Stack Changes for Buyers
The question is not which ANN library tops a leaderboard, but how far it factors the cross-product of representation, index, metric and quantizer; Vectorium and kANNolo abstract four data-side layers independently and pay for it in compile time and binary size.
On this page
You have a shortlist of three retrieval libraries, they sit within two points of each other on the same public leaderboard, and you have to sign off on one this week. The habit is to open the table and tick the highest throughput column. What actually decides whether you can store the same documents a different way next year, or swap the compression without rewriting the search path, is not that column: it is which parts of the system the library turned into separately replaceable pieces. That is exactly the question paper [1] sets out to answer, and it answers it by rearranging the parts list rather than by building a faster index.
Why changing one dimension forces a rewrite of the search code
The default judgement is that retrieval libraries are roughly interchangeable, so you take whichever one has the highest throughput without losing accuracy. That judgement misses something. A retrieval system fixes four things at once: how a vector sits in memory, how two vectors are scored, how the collection is compressed, and how the data is stored and fetched; then it stacks an index structure on top, a proximity graph or an inverted file. These choices are close to mathematically independent, so the configuration space is a large cross-product. The library design decides which cells of that cross-product you can reach, and how much code a new cell costs.
Paper [1] groups existing libraries into two failure modes. The first is narrow coverage: early libraries paired one index with one compression scheme and offered no choice. Faiss covers a lot, but, per the paper, exposes one class per combination of index structure and quantizer, each with its own construction and search path, so the code grows with every combination and extensibility suffers. The second failure is shallow factoring. ParlayANN implements several graph algorithms on shared parallel primitives; ANNLib separates the graph algorithm from the data structure holding the graph. Both are generic over point type and distance, but ship few concrete implementations: ANNLib leaves both to the user, ParlayANN ships three dense point types and no quantizers. Glass factors the other side, letting the quantized representations used for build, search and refinement be chosen independently, but the graph layout inside each index is fixed.
There is a third gap: representation. Most ANN libraries target dense vectors only; support for two is rare and costs performance on each; no library covers dense, sparse and multi-vector under one interface. Multi-vector, also called late interaction, keeps one vector per token and scores a document by summing, over query tokens, the best inner product against any document token. For a buyer this is the expensive gap: you pick a dense stack today and discover next year that the business wants sparse, with no path inside the library.
| Library | What it factors | Gap noted in the paper |
|---|---|---|
| Early libraries | Nothing | One index, one compression scheme |
| Faiss | Nothing; one class per combination | Code grows with each combination |
| ParlayANN | Graph algorithms over parallel primitives | Three dense point types, no quantizers |
| ANNLib | Graph algorithm vs. graph storage | Concrete implementations left to the user |
| Glass | Quantized representations for build/search/refine | Graph layout fixed per index |
| Vectorium + kANNolo | Vector, distance, quantizer, dataset independently; indexes built on top | Paper claims no prior library factored this far |
The two-layer split: one layer stores data, one layer finds it
The paper ships two open-source Rust libraries under the MIT license, with Python bindings. Vectorium is the data-management layer: it abstracts the vector, the distance function, the quantizer and the dataset independently, and exposes 11 encoders behind one interface, from lossless 32-bit floats down to sub-bit codes. kANNolo is the indexing layer: it implements HNSW graph indexes and IVF inverted-file indexes, both generic over representation, encoder and metric; all graph indexes share one graph framework; and a RerankIndex composes any first-stage index with any rescoring dataset into a two-stage index.
Compile-time specialization is what makes the design viable, in plain terms: the compiler generates the code for a given encoder-and-index pairing at build time, so the search loop contains no extra branching or indirection at run time. That is why the paper can claim modularity without run-time overhead. The same sentence explains the cost, which comes later.
- Lossless baseline: 32-bit floats, the uncompressed tier.
- Scalar quantization: narrower numeric types per component, such as f16, bf16, or fixed-point integers under a data-dependent range.
- LVQ (locally-adaptive vector quantization): the range comes from each vector's own min and max components, plus a residual level used for reranking.
- RaBitQ: one sign bit per component plus two scalar metadata values, giving an unbiased distance estimate with an error bound; the extended version supports b bits per component.
- PQ (product quantization): learns a codebook and encodes each vector as a reference to its nearest code, the workhorse at low bit budgets.
- BlockedSparseEncoder: the paper's own encoder for learned sparse vectors.
- DotPacking8Encoder: the paper's own compressed sparse encoding.
- Multi-vector (late-interaction) encoders: one vector per token.
Two comparable anchors are given for the reimplementations: product quantization matches Faiss in accuracy at competitive speed, and the RaBitQ scan is 1.4 to 2.4 times faster than the original authors' implementation. Note the asymmetry: one is a match, the other is a speedup. Also note that Vectorium is not only a substrate for kANNolo; the sparse retrieval engine Seismic and the multi-vector engine Tachiom are built on it as well.
Seven collections, six dense systems, five sparse systems: how to read the numbers
The comparison covers seven public collections, six dense systems and five sparse systems. Every claim rests on those seven collections: no proprietary data, no cross-modal collections. The table below lists each figure from the abstract that can be quoted on its own, with the qualifier that matters more than the figure.
| Measure | Figure | Qualifier |
|---|---|---|
| Best memory-throughput trade-off, dense | 9 of 12 collection-accuracy pairs | A majority, not all; the abstract does not name the three losses |
| Throughput at 99% accuracy | Two-stage HNSW reaches 2.5-3.3x hnswlib, with an index half the size | Pinned to the 99% accuracy target |
| Out-of-distribution queries | Only two systems reach 99% accuracy; the other is LoRANN | Shows high accuracy is still hard out of distribution |
| RaBitQ scan | 1.4-2.4x faster than the reference implementation | That scan stage only, not end to end |
| Product quantization accuracy | Matches Faiss | Matches, does not exceed |
| Sparse data | Vectorium-based systems lead on all three collections; Seismic and SeismicWave fastest; kANNolo indexes most compact | Two of those systems are built on Vectorium |
| Two-stage graph index vs. PyANN | 5.2-48.4x faster, about one third of the memory | Opponent is PyANN, not all five sparse systems |
Read together, these figures support a more useful conclusion than who is fastest: the modularity did not make it slower. That is the first thing to verify during procurement, because plenty of refactors die on losing 20% throughput to one more abstraction layer. Here the abstraction is supposed to vanish at compile time, which is why the paper can claim both a finer split and no slowdown against hand-tuned code.
What you save in run time you pay in compile time and binary size
The paper states its cost openly: in exchange, compilation takes longer and binaries are larger. That is the only explicit cost statement in the material, and no number is attached. I will not supply one, because the paper does not, and any percentage I derived would be my own invention rather than a reported result.
A second cost sits in distance computation. Each kernel is a few lines of generic code that the compiler vectorizes for the target hardware, with explicit SIMD only for the packed encodings. The paper says these kernels remain competitive with hand-optimized implementations. Competitive is a careful word: not behind, not ahead. Engineering teams should verify it on their own targets, since auto-vectorization of generic code depends heavily on the compiler and instruction set. What holds in the authors' CI does not automatically hold in your build pipeline.
A third cost is architectural and not in the paper: the design assumes you want to treat retrieval as an assemblable system. If your setting is one representation, one compression scheme and no changes for three years, you will never use the abstraction and will only carry an extra layer to understand.
Where this approach stops helping you
First boundary, scope. Every cross-system conclusion comes from seven public collections, six dense systems and five sparse systems. If your data sits far from those distributions, the paper offers one indirect signal: on out-of-distribution queries only two systems reach 99% accuracy, which says the approach is not lagging there, but not that it is robust to any distribution.
Second boundary, identity. Seismic and SeismicWave, two of the sparse competitors, are themselves built on Vectorium, and the paper says so. Nothing is hidden, but a reader should register that this is not a fully independent third-party comparison: a shared substrate winning inside its own family is weaker evidence than an outside system winning. The claim that kANNolo's indexes are the most compact is unaffected, since it is a size comparison.
Third boundary, wording. Product quantization matches Faiss; HNSW and RaBitQ match or outperform their reference implementations; IVF outperforms Faiss. Those are three different strengths and cannot be cited interchangeably. Anyone summarizing this as beating Faiss across the board has collapsed three claims into one.
Fourth boundary, completeness of coverage. The paper argues for unified coverage of dense, sparse and multi-vector, but the system-level comparison in the abstract is organized into dense and sparse blocks only. Multi-vector appears here as encoders and as the RerankIndex use case, without a system-level comparison of its own. That is my reading of this material, not the authors' conclusion. If multi-vector retrieval is your primary workload, this is not enough to select on.
