Lossless Compression of Vector IDs for Approximate Nearest Neighbor Search

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Severo, Daniel, Ottaviano, Giuseppe, Muckley, Matthew, Ullrich, Karen, Douze, Matthijs
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917898241441792
author Severo, Daniel
Ottaviano, Giuseppe
Muckley, Matthew
Ullrich, Karen
Douze, Matthijs
author_facet Severo, Daniel
Ottaviano, Giuseppe
Muckley, Matthew
Ullrich, Karen
Douze, Matthijs
contents Approximate nearest neighbor search for vectors relies on indexes that are most often accessed from RAM. Therefore, storage is the factor limiting the size of the database that can be served from a machine. Lossy vector compression, i.e., embedding quantization, has been applied extensively to reduce the size of indexes. However, for inverted file and graph-based indices, auxiliary data such as vector ids and links (edges) can represent most of the storage cost. We introduce and evaluate lossless compression schemes for these cases. These approaches are based on asymmetric numeral systems or wavelet trees that exploit the fact that the ordering of ids is irrelevant within the data structures. In some settings, we are able to compress the vector ids by a factor 7, with no impact on accuracy or search runtime. On billion-scale datasets, this results in a reduction of 30% of the index size. Furthermore, we show that for some datasets, these methods can also compress the quantized vector codes losslessly, by exploiting sub-optimalities in the original quantization algorithm. The source code for our approach available at https://github.com/facebookresearch/vector_db_id_compression.
format Preprint
id arxiv_https___arxiv_org_abs_2501_10479
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Lossless Compression of Vector IDs for Approximate Nearest Neighbor Search
Severo, Daniel
Ottaviano, Giuseppe
Muckley, Matthew
Ullrich, Karen
Douze, Matthijs
Machine Learning
Databases
Information Retrieval
Approximate nearest neighbor search for vectors relies on indexes that are most often accessed from RAM. Therefore, storage is the factor limiting the size of the database that can be served from a machine. Lossy vector compression, i.e., embedding quantization, has been applied extensively to reduce the size of indexes. However, for inverted file and graph-based indices, auxiliary data such as vector ids and links (edges) can represent most of the storage cost. We introduce and evaluate lossless compression schemes for these cases. These approaches are based on asymmetric numeral systems or wavelet trees that exploit the fact that the ordering of ids is irrelevant within the data structures. In some settings, we are able to compress the vector ids by a factor 7, with no impact on accuracy or search runtime. On billion-scale datasets, this results in a reduction of 30% of the index size. Furthermore, we show that for some datasets, these methods can also compress the quantized vector codes losslessly, by exploiting sub-optimalities in the original quantization algorithm. The source code for our approach available at https://github.com/facebookresearch/vector_db_id_compression.
title Lossless Compression of Vector IDs for Approximate Nearest Neighbor Search
topic Machine Learning
Databases
Information Retrieval
url https://arxiv.org/abs/2501.10479