Abstract
QINCo2 is a state-of-the-art neural vector quantization framework that significantly boosts the efficiency of data compression and billion-scale nearest neighbor search. By combining beam search with a novel "pairwise" approximate decoder, it achieves a 34% improvement in reconstruction accuracy and a 24% jump in search recall over previous neural methods, all while being substantially faster to train and deploy.
Introduction
Vector Quantization (VQ) is a fundamental component of modern large-scale search engines and data compression. Traditional methods like Product Quantization (PQ) and Residual Quantization (RQ) map high-dimensional vectors into discrete codes. However, these methods often rely on the assumption that code components are independent. In practice, the "residual"—the error remaining after a quantization step—is highly dependent on the choices made in previous steps.
QINCo2 addresses these limitations by refining the neural quantization approach. While the original QINCo introduced neural networks to predict codebooks, it suffered from high computational costs during encoding and slow search speeds. QINCo2 introduces architectural and algorithmic improvements to make neural quantization both more accurate and practical for billion-scale applications.
Methods
The QINCo2 framework introduces three major improvements to the neural quantization pipeline:
1. Improved Encoding with Beam Search
To find optimal codes, QINCo2 employs beam search, exploring multiple quantization paths simultaneously instead of a simple greedy search. To maintain efficiency, a codeword pre-selection mechanism is used. This lightweight function narrows down thousands of possible codewords to a small shortlist before the more computationally intensive neural network evaluates them.
2. Pairwise Additive Decoding
A key innovation for search efficiency is the Pairwise Additive Decoder. Traditional neural decoders are too slow for evaluating millions of candidates in a search query. QINCo2 uses a lookup table approach that sums pairs of codewords. This captures inter-step dependencies—unlike standard RQ—while remaining nearly as fast as simple addition. This "smart" lookup table creates a high-quality shortlist for final refinement by the full neural decoder.
3. Optimized Architecture and Training
The authors refined the residual MLP architecture and adopted a modern training recipe, including AdamW, cosine learning rate decay, and larger batch sizes. A "dead codeword" reset strategy ensures full utilization of the model's capacity.
Large-Scale Search Pipeline
The integration of these methods allows for a highly efficient search pipeline. As shown in the figure below, the process involves an initial Inverted File (IVF) search, followed by refinement using the Pairwise Additive Decoder, and finally, a precise QINCo2 decoding step.
Evaluation and Results
QINCo2 was evaluated on four diverse, high-dimensional datasets: Deep1B (96D), BigANN (128D), FB-ssnpp (256D), and Contriever (768D), scaling up to one billion vectors.
- Compression Quality: QINCo2 achieved a 34% reduction in Mean Squared Error (MSE) compared to the original QINCo for 16-byte vector compression on BigANN.
- Search Accuracy: On Deep1M, Recall@1 improved from 36.3% to 45.1% for 8-byte encodings.
- Efficiency: The new training recipe makes QINCo2 roughly 6x faster to train than previous implementations. In billion-scale tests (BigANN1B), it consistently outperformed industry baselines like IVF-PQ and IVF-RQ in the trade-off between queries per second and accuracy.
Discussion and Conclusion
The core insight of QINCo2 is that neural networks can effectively model data distributions to capture implicit dependencies between quantization steps. By bridging the gap between fast "dumb" decoders and slow "smart" neural decoders, QINCo2 makes neural quantization viable for real-world applications.
While QINCo2 is more complex to implement than standard PQ and benefits significantly from GPU acceleration, its performance gains are substantial. Future work may explore applying the "pairwise" decoding trick to non-neural quantizers to further enhance search efficiency.
Summary updated