Spreading vectors for similarity search
Alexandre Sablayrolles, Matthijs Douze, Cordelia Schmid, Hervé Jégou
TL;DR
The paper tackles multi-dimensional similarity search by reframing the problem: instead of adapting the quantizer to data, it trains a fixed quantization structure to the data via a catalyzer that maps inputs to a uniform spherical latent space while preserving neighborhood relations. It introduces the KoLeo differential-entropy regularizer and a rank-preserving triplet loss, combining them to produce representations that fit well with fixed discretizers such as binary signs and spherical lattices. Experiments on Deep1M and BigAnn show that catalyzer-enabled lattice quantizers outperform traditional PQ/OPQ baselines and can scale to large datasets, with end-to-end training providing additional benefits when coupled with discretization. The work also demonstrates that the catalyzer can serve as a universal preprocessing step for various quantizers, and it provides open-source code for practical adoption.
Abstract
Discretizing multi-dimensional data distributions is a fundamental step of modern indexing methods. State-of-the-art techniques learn parameters of quantizers on training data for optimal performance, thus adapting quantizers to the data. In this work, we propose to reverse this paradigm and adapt the data to the quantizer: we train a neural net which last layer forms a fixed parameter-free quantizer, such as pre-defined points of a hyper-sphere. As a proxy objective, we design and train a neural network that favors uniformity in the spherical latent space, while preserving the neighborhood structure after the mapping. We propose a new regularizer derived from the Kozachenko--Leonenko differential entropy estimator to enforce uniformity and combine it with a locality-aware triplet loss. Experiments show that our end-to-end approach outperforms most learned quantization methods, and is competitive with the state of the art on widely adopted benchmarks. Furthermore, we show that training without the quantization step results in almost no difference in accuracy, but yields a generic catalyzer that can be applied with any subsequent quantizer.
