Learning Deep Unsupervised Binary Codes for Image Retrieval

Junjie Chen, William K. Cheung, Anran Wang

Abstract

Efficient large-scale image retrieval necessitates the use of compact binary codes. While supervised hashing methods achieve high accuracy, they are limited by the requirement for extensive labeled datasets. This paper introduces DeepQuan, a novel unsupervised hashing framework that bridges the gap between deep feature learning and Product Quantization (PQ). By combining a deep autoencoder with a unique weighted triplet loss, DeepQuan learns highly discriminative binary codes that preserve the underlying manifold structure of the data. Experimental results on benchmark datasets demonstrate that DeepQuan significantly outperforms state-of-the-art unsupervised methods.

Introduction

In large-scale image retrieval, hashing is the standard approach for achieving high search speeds and memory efficiency. The goal is to map high-dimensional image features into short binary strings such that similar images have similar codes. Unsupervised hashing is particularly desirable for its scalability; however, it is challenging because traditional methods often rely on rigid quadratic constraints that lead to significant information loss and ignore the natural clustering of the data. DeepQuan addresses these issues by preserving the data's geometric manifold while learning codes grouped into distinct, searchable clusters.

Methodology

The DeepQuan framework is built upon three primary components: a deep autoencoder, Product Quantization (PQ), and a weighted triplet loss.

Overview of the DeepQuan architecture

Deep Autoencoder

The model employs a symmetric stack of fully connected layers. The encoder compresses the input into a compact representation ($z$), while the decoder reconstructs the original input. This reconstruction process, guided by a Manifold Preserving Loss, ensures that the compact codes retain the essential characteristics of the original images.

Product Quantization (PQ)

Unlike simple binary thresholding, DeepQuan utilizes PQ to divide the compact feature vector into $M$ subspaces. It learns a codebook of cluster centers (codewords) for each subspace, allowing for a higher-resolution binary representation that captures more complex data distributions.

Weighted Triplet Loss

The core innovation of DeepQuan is the use of a weighted triplet loss for self-supervision. The model automatically generates training triplets:

  • Anchor: The current image representation.
  • Positive: The nearest cluster center in the codebook.
  • Negative: A randomly sampled different cluster center.

By minimizing this loss, the network pushes representations toward their assigned cluster centers and away from others, creating a separable and discriminative feature space.

Experimental Setup

The model was evaluated on two standard benchmarks: MNIST (70,000 handwritten digits) and CIFAR-10 (60,000 color images). For CIFAR-10, the authors utilized both hand-crafted GIST features and deep features from a pre-trained VGG-16 network to validate the framework's versatility across different input types.

Key Results and Insights

DeepQuan demonstrates a substantial performance lead over existing unsupervised methods such as DeepBit, DH, and ITQ.

Performance Gains

On the MNIST dataset, DeepQuan achieved a Mean Average Precision (MAP) of 60.30% at 16 bits, significantly higher than the 45.38% achieved by the previous best unsupervised deep method (UH-BNN). The performance gap is most pronounced at lower bit counts (16 and 32 bits), which is critical for memory-constrained applications.

Feature Space Visualization

The effectiveness of the weighted triplet loss is visually evident in the feature space. Using t-SNE visualizations, the authors showed that DeepQuan produces tight, distinct clusters compared to the overlapping clusters produced by standard quadratic-loss models.

t-SNE visualization of learned features

The Role of the Decoder

A key insight from the study is the importance of the manifold-preserving decoder. Without it, the model tends to collapse into trivial solutions where all images are assigned identical codes. The decoder acts as a vital regularizer, keeping the learned features grounded in the original data distribution.

Conclusion

DeepQuan presents a powerful approach to unsupervised hashing by integrating deep autoencoders with self-supervised quantization. While the current model uses fully connected layers, future work could involve integrating Convolutional Neural Networks (CNNs) for end-to-end spatial feature learning. Additionally, optimizing the scalability of codebook updates for billion-scale datasets remains an important engineering challenge. Despite these areas for growth, DeepQuan sets a new benchmark for unsupervised image retrieval.

Summary updated

BibTeX
@inproceedings{chen2018learning,
  author = {Junjie Chen and William K. Cheung and Anran Wang},
  title = {{Learning Deep Unsupervised Binary Codes for Image Retrieval}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.24963/ijcai.2018/85},
}
Figure