Semantic Structure-based Unsupervised Deep Hashing

Erkun Yang, Cheng Deng, Tongliang Liu, Wei Liu, Dacheng Tao

Introduction

Approximate Nearest Neighbor (ANN) search is a cornerstone of large-scale image retrieval. Hashing techniques, which map high-dimensional data into compact binary strings, have emerged as a dominant solution due to their speed and memory efficiency. While supervised hashing methods leverage human-annotated labels to achieve high accuracy, the cost of labeling millions of images is often prohibitive. Conversely, traditional unsupervised hashing methods frequently fail to capture the underlying semantic relationships between objects, often relying on low-level pixel reconstruction or simple data rotations.

Semantic Structure-based Unsupervised Deep Hashing (SSDH) addresses this gap by discovering "hidden" semantic relationships in unlabeled data through the statistical analysis of deep features. By modeling feature distances as a mixture of distributions, SSDH automatically identifies highly similar and dissimilar pairs to guide the training of a deep hashing network.

Methodology

The SSDH framework utilizes a three-step pipeline to integrate semantic intelligence into an unsupervised model without requiring explicit labels.

1. Architecture and Semantic Structure Learning

The model employs a dual-branch architecture based on a pre-trained deep network (e.g., VGG-F). One branch focuses on learning the binary hash codes, while the other analyzes the semantic structure of the data. The core innovation lies in using the semantic structure branch to generate pseudo-labels that supervise the hash code learning branch through a pairwise loss function.

The SSDH architecture consists of two main components: Hash Code Learning and Semantic Structure Learning, connected by a pairwise loss function.

2. Statistical Analysis of Deep Features

The authors observed that features extracted from a pre-trained network already cluster data in a way that reflects semantic similarity. By analyzing the histogram of cosine distances between these features, they discovered that the distribution can be accurately modeled by two half-Gaussian distributions—one representing the "similar" tail (very close pairs) and the other representing the "dissimilar" tail (very far pairs).

Statistical distribution of cosine distances on NUS-WIDE and FLICKR25K datasets, showing the PDF, CDF, and the corresponding Gaussian fits used to determine similarity thresholds.

3. Thresholding and Pairwise Loss

Using the Gaussian models, two critical thresholds are established:

  • $d_s$ (Similar): Pairs in the extreme left tail.
  • $d_d$ (Dissimilar): Pairs in the extreme right tail.

Pairs falling between these thresholds are considered "ambiguous" and are ignored during training to minimize noise. The network is then trained to produce hash codes whose inner products align with this discovered structure (1 for similar, -1 for dissimilar, and 0 for ignored). A tanh relaxation is used to ensure the discrete binary codes remain differentiable for backpropagation.

Experimental Results

SSDH was evaluated on two major multi-label benchmarks: NUS-WIDE (~270,000 images) and FLICKR25K (25,000 images). Although labels were used strictly for evaluation (calculating Mean Average Precision), the model remained entirely unsupervised during training.

  • Performance Gains: SSDH consistently outperformed state-of-the-art unsupervised methods like ITQ, DeepBit, and SGH. On the NUS-WIDE dataset, it achieved a Mean Average Precision (MAP) improvement of 11% to 15% over the strongest baselines.
  • Search Precision: The model showed significant leads in "Top-N" precision, which is vital for real-world applications where users prioritize the accuracy of the first few search results.
  • Efficiency: The encoding time of SSDH is comparable to other deep methods, making it suitable for large-scale deployment.

Conclusion and Future Work

SSDH demonstrates that the "pre-semantic" nature of deep features can be effectively harnessed to bridge the gap between unsupervised and supervised hashing. By focusing on the high-confidence "tails" of the distance distribution, the model avoids the noise inherent in unlabeled datasets. Future research may explore dynamic updates to the semantic structure during training and the application of this method to domain-specific data (e.g., medical imaging) where pre-trained models on ImageNet may be less effective.

Summary updated

BibTeX
@inproceedings{yang2018semantic,
  author = {Erkun Yang and Cheng Deng and Tongliang Liu and Wei Liu and Dacheng Tao},
  title = {{Semantic Structure-based Unsupervised Deep Hashing}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.24963/ijcai.2018/148},
}
Figure