Unsupervised Deep Generative Adversarial Hashing Network

Kamran Ghasedi Dizaji, Feng Zheng, Najmeh Sadoughi, Yanhua Yang, Cheng Deng, Heng Huang

Introduction

Efficient image retrieval in large-scale datasets necessitates representing high-dimensional data as compact binary strings, a process known as hashing. While supervised deep hashing has seen significant success, it relies heavily on expensive human-annotated labels. This paper introduces HashGAN, a novel unsupervised framework that utilizes Generative Adversarial Networks (GANs) to learn discriminative binary codes directly from raw pixels. By integrating a generator, discriminator, and encoder into a unified training objective, HashGAN achieves state-of-the-art performance in image retrieval and clustering without any labeled data.

The Challenge of Unsupervised Hashing

In the context of big data, hashing allows for rapid similarity searches using Hamming distance. However, unsupervised deep hashing faces two primary hurdles:

  1. Overfitting: Without label guidance, deep networks often memorize training samples instead of learning generalizable features.
  2. Pretraining Dependency: Many existing "unsupervised" methods rely on models pretrained on supervised datasets like ImageNet, which undermines the claim of true unsupervised learning.

HashGAN addresses these issues by using adversarial training as a regularizer and synthesized data as a source of pseudo-labels.

The HashGAN Framework

The architecture of HashGAN consists of three interconnected components: a Generator ($G$), a Discriminator ($D$), and an Encoder ($E$).

The HashGAN architecture featuring a Generator and a Tied Discriminator & Encoder.

Core Innovations

  • Parameter Tying: The Discriminator and Encoder share the majority of their parameters. This design ensures that the features learned to distinguish real from fake images (adversarial task) also serve the hashing task, providing a strong inductive bias.
  • Collaborative Loss: To provide a training signal without labels, the Generator synthesizes images from known binary strings. The Encoder is then trained to reconstruct these strings from the generated images, effectively creating a self-supervised loop.
  • Multi-faceted Hashing Loss: For real data, a specialized loss function ensures the resulting hash codes are quantized (binary), balanced (bits used uniformly), consistent (robust to noise), and independent (non-redundant).

Experimental Results

The authors evaluated HashGAN across several benchmarks, including CIFAR-10, MNIST, USPS, FRGC, and STL-10.

Performance Leap

HashGAN demonstrates a significant improvement over previous unsupervised methods. On the CIFAR-10 dataset, HashGAN achieved a Mean Average Precision (mAP) of approximately 32.5% for 64-bit codes, nearly doubling the performance of earlier deep unsupervised competitors like DH or DAR, which typically reached around 17%.

Precision-Recall curves for 64-bit hashing on CIFAR-10, comparing HashGAN to state-of-the-art unsupervised methods.

On the MNIST dataset, the model achieved an mAP exceeding 93%. Furthermore, when used for clustering tasks, HashGAN's learned features proved competitive with specialized deep clustering algorithms such as DEPICT and JULE-RC.

Conclusion

HashGAN represents a major step forward in unsupervised representation learning. By leveraging GANs not just for synthesis but as a structural regularizer for hashing, the framework bridges the gap between unsupervised flexibility and supervised accuracy. While challenges remain regarding training stability and hyperparameter sensitivity typical of GANs, HashGAN sets a new benchmark for truly unsupervised deep hashing.

Summary updated

BibTeX
@inproceedings{dizaji2018unsupervised,
  author = {Kamran Ghasedi Dizaji and Feng Zheng and Najmeh Sadoughi and Yanhua Yang and Cheng Deng and Heng Huang},
  title = {{Unsupervised Deep Generative Adversarial Hashing Network}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  doi = {10.1109/cvpr.2018.00386},
}
Figure