# Modular and Efficient Approximate Nearest Neighbors Search with Vectorium and kANNolo

DevFeed: [Modular and Efficient Approximate Nearest Neighbors Search with Vectorium and kANNolo](<https://devfeed.tech/articles/modular-and-efficient-approximate-nearest-neighbors-search-with-vectorium-and-kannolo-115958.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.03927>)

Author: Silvio Martinico, Franco Maria Nardini, Cosimo Rulli, Rossano Venturini

Published: 2026-11-04T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Databases](<https://devfeed.tech/sources/arxiv-databases.md>)

Topics: [ann](<https://devfeed.tech/topics/ann.md>), [Embeddings](<https://devfeed.tech/topics/embeddings.md>), [Vectors & LLMs](<https://devfeed.tech/topics/vectors-llms.md>), [quantization](<https://devfeed.tech/topics/quantization.md>), [Code Modularity](<https://devfeed.tech/topics/code-modularity.md>)

Tags: [ann](<https://devfeed.tech/tags/ann.md>), [code](<https://devfeed.tech/tags/code.md>), [compile](<https://devfeed.tech/tags/compile.md>), [cs-db](<https://devfeed.tech/tags/cs-db.md>), [cs-ir](<https://devfeed.tech/tags/cs-ir.md>), [data-management](<https://devfeed.tech/tags/data-management.md>), [embeddings](<https://devfeed.tech/tags/embeddings.md>), [faiss](<https://devfeed.tech/tags/faiss.md>), [generic](<https://devfeed.tech/tags/generic.md>), [hnsw](<https://devfeed.tech/tags/hnsw.md>), [index](<https://devfeed.tech/tags/index.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [ivf](<https://devfeed.tech/tags/ivf.md>), [layer](<https://devfeed.tech/tags/layer.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [memory](<https://devfeed.tech/tags/memory.md>), [metric](<https://devfeed.tech/tags/metric.md>), [modular](<https://devfeed.tech/tags/modular.md>), [modularity](<https://devfeed.tech/tags/modularity.md>), [quantization](<https://devfeed.tech/tags/quantization.md>), [rust](<https://devfeed.tech/tags/rust.md>), [search](<https://devfeed.tech/tags/search.md>)

## AI overview

Vectorium and kANNolo are open-source Rust libraries that separate vector data management from indexing to support dense, sparse, and multi-vector embeddings. Vectorium independently abstracts vectors, distance functions, quantizers, and datasets, with 11 encoders; kANNolo provides representation- and metric-generic HNSW and IVF indexes plus a two-stage index pairing an initial search index with a rescoring dataset. The authors say compile-time specialization adds no runtime overhead. In reported benchmarks, Product Quantization matches Faiss in accuracy at competitive speed, RaBitQ and HNSW match or outperform reference implementations, and IVF outperforms Faiss. Across seven public collections, dense indexes had the best memory-throughput trade-off in 9 of 12 collection-accuracy pairs and performed well on out-of-distribution queries. On three sparse collections, Vectorium-based systems led; Seismic and SeismicWave were fastest, while kANNolo indexes were most compact.

## Source excerpt

arXiv:2611.03927v1 Announce Type: cross Abstract: Approximate Nearest Neighbors (ANN) search over neural embeddings powers modern retrieval systems such as Retrieval-Augmented Generation. Embeddings come in three representations (dense, sparse and multi-vector), and efficient search combines an index structure, a similarity function and a quantization scheme. Existing libraries fix one combination, hard-code each one separately, or factor only one side of the problem, and none covers all three representations. We present Vectorium and kANNolo, two open-source Rust libraries that split this design space into a data-management layer and an indexing layer. Vectorium abstracts the vector, the distance function, the quantizer and the dataset independently, and provides 11 encoders, from 32-bit floats to sub-bit codes. On top of it, kANNolo implements Hierarchical Navigable Small-World (HNSW) graph and Inverted Vector File (IVF) indexes that are generic over representation, encoder and metric, and a two-stage index that composes any first-stage index with any rescoring dataset. Since every combination is specialized at compile time, this modularity adds no run-time overhead, and the resulting indexes reach state-of-the-art performance: our Product Quantization matches Faiss in accuracy at competitive speed, our RaBitQ and HNSW match or outperform their reference implementations, and our IVF outperforms Faiss. Against six dense and five sparse systems on seven public collections, our indexes give the best memory-throughput trade-off on dense data in 9 of 12 collection-accuracy pairs and perform well on out-of-distribution queries. On sparse data, the systems built on Vectorium lead on all three collections, with Seismic and SeismicWave the fastest and kANNolo's indexes the most compact.