NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep Quantization Network for Efficient Image Retrieval

Yue Cao, Mingsheng Long, Jianmin Wang, Han Zhu, Qingfu Wen

Introduction

Large-scale image retrieval relies on approximate nearest neighbor (ANN) search using binary hash codes to manage memory and computational costs. While deep learning has advanced the field by enabling simultaneous feature learning and hashing, existing methods often struggle with high quantization errors and suboptimal loss functions. This paper introduces the Deep Quantization Network (DQN), a supervised hashing architecture designed to learn compact, highly accurate binary representations by minimizing both semantic similarity loss and quantization error.

Problem Statement

Current deep hashing methods face two primary challenges. First, they typically binarize continuous network outputs without explicitly minimizing the information lost during this process, known as quantization error. Second, many methods utilize an inner-product loss to measure similarity. Since network outputs are not naturally bounded, the inner-product does not align well with binary similarity labels (e.g., -1 for dissimilar, 1 for similar), leading to training instabilities and suboptimal performance.

Deep Quantization Network (DQN)

The DQN architecture is built upon the AlexNet framework. It replaces the final classification layer with a fully connected bottleneck layer (fcb) utilizing a tanh activation function to produce a dimension-reduced, continuous representation.

The DQN architecture jointly optimizes pairwise cosine loss and product quantization loss.

The core innovation of DQN lies in its dual-loss optimization strategy:

  1. Pairwise Cosine Loss: Unlike inner-product loss, cosine distance is inherently bounded between [-1, 1]. This range perfectly matches the binary similarity labels, providing a well-specified objective for training.
  2. Product Quantization (PQ) Loss: DQN integrates PQ directly into the training process. The bottleneck representation is split into sub-vectors, and K-means clustering is applied to each. The network is penalized for the distance between its continuous output and the nearest quantized codewords, forcing the model to learn "quantizable" representations that naturally form tight clusters.

Experimental Evaluation

The authors evaluated DQN on three benchmark datasets: NUS-WIDE (~195,000 images), CIFAR-10 (60,000 images), and Flickr (25,000 images). DQN was compared against nine baseline methods, including shallow hashing (e.g., KSH) and deep hashing (e.g., DNNH, CNNH).

Results and Discussion

DQN demonstrates superior performance across all benchmarks. As shown in the precision-recall and top-K precision curves, DQN consistently outperforms state-of-the-art methods.

Performance comparison of DQN against baseline methods on NUS-WIDE and CIFAR-10 datasets.

Key findings include:

  • State-of-the-Art Accuracy: DQN achieved absolute Mean Average Precision (MAP) increases of 8.0% on NUS-WIDE and 5.9% on Flickr compared to the previous best deep hashing method (DNNH).
  • Superiority over Shallow Methods: DQN significantly outperformed shallow methods like KSH, with MAP increases of up to 22.9% on CIFAR-10.
  • Ablation Insights: Replacing the pairwise cosine loss with an inner-product loss resulted in a performance drop of up to 13.1%, validating the importance of loss function alignment.

Conclusion

The Deep Quantization Network effectively addresses the limitations of previous deep hashing methods by jointly optimizing for semantic similarity and quantization error. By ensuring that learned features are inherently easy to binarize and using a bounded cosine loss, DQN sets a new standard for efficient and accurate large-scale image retrieval.

Summary updated

BibTeX
@inproceedings{cao2016deep,
  author = {Yue Cao and Mingsheng Long and Jianmin Wang and Han Zhu and Qingfu Wen},
  title = {{Deep Quantization Network for Efficient Image Retrieval}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2016},
  doi = {10.1609/aaai.v30i1.10455},
}
Figure