Unsupervised Deep Image Hashing through Tag Embeddings

Vijetha Gattupalli, Baoxin Li

Abstract

Efficient large-scale image retrieval relies on semantic hashing to map images into compact binary codes. While supervised methods are accurate, they depend on expensive manual labels. This paper presents Weakly Supervised Deep Hashing using Tag Embeddings (WDHT), a framework that utilizes noisy, user-generated web tags. By converting these tags into semantic embeddings via word2vec, WDHT captures conceptual relationships and achieves state-of-the-art performance in weakly supervised image retrieval.

Introduction

The explosion of visual data on the web necessitates efficient search mechanisms. Semantic hashing addresses this by converting images into short binary strings where Hamming distance reflects semantic similarity. However, the "gold standard" of supervised learning is often impractical due to the high cost of manual labeling. User-generated tags (e.g., #sunset, #vacation) offer a scalable alternative but are frequently noisy or subjective. WDHT tackles this by extracting meaningful semantic information from these messy tags to train a deep hashing model without human-provided labels.

Methodology

The WDHT framework is built upon a pre-trained AlexNet architecture, augmented with additional fully connected layers and two specialized heads for loss calculation.

The WDHT architecture integrates a pre-trained AlexNet with specialized layers to produce final hash vectors.

Semantic Tag Embedding

Unlike traditional methods that treat tags as discrete indicators, WDHT employs word2vec to map tags into a 300-dimensional semantic space. This allows the model to recognize that terms like "cat" and "kitten" are related. These embeddings are aggregated into a target vector for each image, providing a continuous semantic signal for training.

Multi-Component Loss Function

The model is optimized using a combination of three losses:

  • Pair-wise Similarity Loss ($L_1$): Ensures that images with similar tag embeddings produce similar hash codes.
  • Mini-batch-wise Hinge Loss ($L_2$): A ranking loss that forces the network to learn a feature space where an image is closer to its own tag vector than to others.
  • Quantization Loss ($L_3$): Pushes the network's continuous outputs toward discrete binary values (0 or 1).

Experimental Results

The model was evaluated on the NUS-WIDE and MIR-FLICKR25K datasets, which contain hundreds of thousands of images and user tags.

Precision-Recall curves demonstrate WDHT's superior performance across different bit lengths on two major datasets.

WDHT consistently outperformed both non-deep and deep unsupervised hashing methods. On NUS-WIDE, it achieved a Mean Average Precision (mAP) of ~0.67 to 0.69. On MIR-FLICKR25K, performance reached ~0.70 to 0.74. Notably, the model maintains high precision even with short 12-bit hash codes, demonstrating its suitability for large-scale applications.

Conclusion

WDHT demonstrates that semantic word embeddings can effectively mitigate the noise inherent in user-generated tags for training deep hashing models. By focusing on semantic relationships rather than exact tag matches, the framework sets a new benchmark for weakly supervised image retrieval. Future research will explore more advanced tag aggregation techniques, such as Transformers, to further enhance the semantic signal.

Summary updated

BibTeX
@inproceedings{gattupalli2019unsupervised,
  author = {Vijetha Gattupalli and Baoxin Li},
  title = {{Unsupervised Deep Image Hashing through Tag Embeddings}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.01062},
}
Figure