Effective Comparative Prototype Hashing for Unsupervised Domain Adaptation

Hui Cui, Lihai Zhao, Fengling Li, Lei Zhu, Xiaohui Han, Jingjing Li

Introduction

Image hashing is a critical technology for large-scale retrieval, enabling fast searches by converting images into compact binary strings. However, unsupervised hashing often fails to capture semantic depth. Unsupervised Domain Adaptation (UDA) addresses this by leveraging labeled source data to guide an unlabeled target domain. Traditional UDA hashing methods often align domains directly in the low-dimensional Hamming space, which can lead to significant information loss and poor retrieval accuracy.

The Comparative Prototype Hashing (CPH) Framework

Comparative Prototype Hashing (CPH) addresses these limitations by performing domain alignment in a high-dimensional, continuous feature space before the hashing bottleneck.

The CPH architecture aligns source and target domains in a shared hypersphere space before generating hash codes.

The framework consists of several key components designed to bridge the gap between domains while preserving semantic richness:

  1. Prototype Contrastive Learning (PCL): Instead of instance-level comparisons, CPH utilizes category-level "prototypes." A contrastive loss pulls prototypes of the same category from both domains together while pushing different categories apart.
  2. Domain-Shared Hypersphere: By mapping features onto a unit hypersphere, the model ensures a uniform distribution and prevents category overlap, which is crucial for maintaining discriminative power.
  3. Relation Preservation Loss (RPL): This component ensures that similarity relationships established in the continuous feature space are maintained in the final binary hash codes, bridging the gap between source knowledge and target retrieval.
  4. Quantization: A standard loss minimizes information loss during the conversion from continuous features to discrete binary codes (-1 and 1).

Experimental Evaluation

The authors evaluated CPH across three major benchmarks: Office-Home (65 categories), Office-31 (31 categories), and Digits (cross-domain tasks between MNIST and USPS). CPH consistently outperformed state-of-the-art methods like DANCE and DAPH.

Key Results and Visual Analysis

On the Office-Home dataset, CPH achieved an average mean Average Precision (mAP) improvement of 19.29% over previous benchmarks. In specific tasks, such as Artistic to Real-World, performance jumped from approximately 46% to over 71%. On Office-31, the average improvement was 13.85%.

t-SNE visualizations demonstrate that CPH (Ours) produces significantly tighter and more distinct category clusters compared to GTH-g and DAPH.

Visual evidence from t-SNE plots confirms these quantitative gains. As shown in the visualizations, CPH creates well-separated and tighter clusters, whereas competing methods like GTH-g and DAPH result in overlapping and poorly defined category boundaries. This indicates that CPH is far more effective at learning domain-invariant representations that retain semantic structure.

Conclusion and Future Directions

CPH demonstrates that aligning domains in a high-dimensional hypersphere space is far more effective than alignment in the final Hamming space. By using prototypes as anchors, the model successfully transfers knowledge to unlabeled target domains. While currently optimized for single-label classification, future work could extend this prototype-based approach to multi-label real-world imagery and larger, noisier "in-the-wild" datasets.

Summary updated

BibTeX
@inproceedings{cui2024effective,
  author = {Hui Cui and Lihai Zhao and Fengling Li and Lei Zhu and Xiaohui Han and Jingjing Li},
  title = {{Effective Comparative Prototype Hashing for Unsupervised Domain Adaptation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i8.28674},
}
Figure