Unsupervised Neural Quantization for Compressed-Domain Similarity Search.

Stanislav Morozov, Artem Babenko · DOI

Abstract

Unsupervised Neural Quantization (UNQ) represents the first successful application of deep learning to the problem of unsupervised multi-codebook quantization for large-scale retrieval. By employing a non-linear encoder-decoder architecture optimized with a specialized metric learning objective, UNQ achieves state-of-the-art performance in compressed-domain similarity search, significantly outperforming traditional "shallow" methods like Product Quantization across diverse high-dimensional datasets.

Introduction

Large-scale image retrieval requires searching through billions of high-dimensional visual descriptors almost instantaneously. Due to the prohibitive memory costs of storing raw vectors, quantization techniques are used to compress them into short binary codes. Multi-Codebook Quantization (MCQ) is the dominant paradigm, approximating vectors as combinations of codewords to enable fast Asymmetric Distance Computation (ADC). Despite the success of deep learning in computer vision, unsupervised quantization has largely relied on "shallow" linear transformations or simple clustering. UNQ bridges this gap by leveraging deep neural networks to improve unsupervised quantization for retrieval.

Methods

UNQ utilizes a deep neural network architecture consisting of an encoder and a decoder that are trained end-to-end.

The UNQ architecture featuring a non-linear encoder, discrete codebooks, and a reconstruction decoder.

Architecture

  1. The Encoder: A feedforward network mapping high-dimensional input vectors to discrete indices. To handle the non-differentiability of index selection, the Gumbel-Softmax trick with straight-through gradient estimation is employed, enabling training via Stochastic Gradient Descent (SGD).
  2. The Decoder: A network that reconstructs the original vector from the discrete codes.

Training Objectives

The model is optimized using a multi-part loss function:

  • Reconstruction Loss ($L_1$): Ensures accurate vector reconstruction from compressed codes.
  • Triplet Loss ($L_2$): A metric learning objective that preserves the neighborhood structure of the original space in the compressed space.
  • Balance Regularizer ($CV^2$): Prevents "codebook collapse" by ensuring uniform codeword utilization.

At inference, UNQ employs a two-stage search. A fast initial search is performed in the learned embedding space using lookup tables. Subsequently, a reranking step passes the top-500 candidates through the deep decoder for refined accuracy.

Experimental Setup

The authors evaluated UNQ on two major benchmark families across scales from one million to one billion vectors:

  • Deep1M / Deep10M / Deep1B: 96-dimensional descriptors from deep neural network activations.
  • BigANN1M / BigANN10M / BigANN1B: 128-dimensional SIFT descriptors.

Results and Discussion

UNQ consistently outperforms state-of-the-art competitors, such as LSQ and Catalyst+Lattice, across all datasets and memory budgets (8 and 16 bytes per vector).

Performance comparison of UNQ against state-of-the-art methods on million-scale benchmarks.

Key findings include:

  • Superior Accuracy: On BigANN1M (8-byte budget), UNQ achieved 34.6% Recall@1, surpassing LSQ's 29.2%. On Deep1M, it reached 26.7% recall versus 21.7% for LSQ.
  • Scalability: The performance advantage is maintained at the billion-scale, demonstrating UNQ's robustness for massive databases.
  • Non-linearity and Joint Learning: UNQ's non-linear nature captures complex data distributions better than linear methods. Learning a common vector space for codewords and data vectors makes the search more robust.
  • Efficiency: Encoding is highly competitive, taking approximately 1.5 seconds for 1 million vectors on a single GPU, with search speeds suitable for real-time use.

Conclusion

UNQ demonstrates that deep learning can significantly enhance unsupervised quantization for retrieval. While it introduces some memory overhead for network weights and requires hyperparameter tuning, its performance gains are substantial. Future work may involve integrating this architecture with self-supervised feature learning for direct image-to-code compression.

Summary updated

BibTeX
@inproceedings{morozov2019unsupervised,
  author = {Stanislav Morozov and Artem Babenko},
  title = {{Unsupervised Neural Quantization for Compressed-Domain Similarity Search.}},
  booktitle = {ICCV},
  year = {2019},
  doi = {10.1109/iccv.2019.00313},
}
Figure