Abstract
In large-scale image retrieval, hashing compresses high-dimensional features into compact binary codes for efficient search. However, standard data augmentation often introduces a representation discrepancy between continuous feature space and discrete Hamming space. We present Deep Hash Distillation (DHD), a self-distillation framework that ensures consistency between weakly and strongly transformed image versions. By employing trainable hash proxies and a classification-based quantization loss, DHD achieves state-of-the-art performance across major benchmarks using both CNN and Vision Transformer backbones.
Introduction: The Representation Discrepancy
Deep hashing models leverage data augmentation to improve generalization, yet this often creates a conflict in the Hamming space. A "weak" transformation might cause a sign flip in the hash code despite minimal feature changes, while a "strong" transformation might significantly alter features without changing the binary code. This sensitivity and insensitivity issue degrades retrieval accuracy and makes training unstable.
Methodology: Deep Hash Distillation (DHD)
The DHD framework addresses these challenges through three primary components:
Self-distilled Hashing (SdH)
DHD utilizes a Siamese network architecture processing two versions of an image: an "Easy Teacher" (weakly transformed) and a "Difficult Student" (strongly transformed). The model minimizes the cosine distance between their continuous hash codes. By stopping the gradient on the teacher branch, the student is forced to align its representation with the more stable teacher, effectively filtering out augmentation noise.
Hash Proxy-based Similarity Learning
Unlike traditional methods using fixed binary targets, DHD employs trainable hash proxies. These class centers evolve during training, allowing the model to capture semantic relationships between classes (e.g., ensuring semantically similar classes are closer in Hamming space).
BCE-based Quantization Loss
Quantization is treated as a binary classification problem. Using Gaussian distribution estimators, the model calculates the likelihood of a bit being "on" or "off" and applies a Binary Cross Entropy (BCE) loss. This approach naturally pushes continuous values away from the zero-threshold toward -1 or 1.
Experimental Results
The framework was evaluated on ImageNet, NUS-WIDE, and MS COCO datasets. DHD achieved state-of-the-art results:
- Performance: On ImageNet (64-bit), DHD reached a Mean Average Precision (mAP) of 0.901 with ResNet50, outperforming previous methods like CSQ and DPN.
- Backbone Scalability: Integrating Vision Transformers (Swin-T) further increased mAP to 0.956.
- Robustness: The model demonstrated significant resilience to unseen distortions such as Gaussian noise and blur.
Conclusion
Deep Hash Distillation provides a robust solution to the transformation-sensitivity problem in image retrieval. By combining self-distillation with trainable proxies and classification-based quantization, the framework stabilizes training and sets new performance benchmarks for both CNN and Transformer-based hashing.
Summary updated