Abstract
This paper presents PTS³H (Pairwise Teacher-Student Semi-Supervised Hashing), a framework designed to learn compact binary hash codes for large-scale image retrieval. By extending the teacher-student paradigm from single-point classification to pairwise similarity modeling, PTS³H effectively utilizes both limited labeled data and abundant unlabeled data. The approach avoids the "semantic gap" common in static graph-based semi-supervised methods by using a dynamic ensemble teacher to provide stable similarity targets. Experimental results on CIFAR-10, NUS-WIDE, and ImageNet-100 demonstrate that PTS³H significantly outperforms existing supervised and semi-supervised hashing baselines.
Introduction
In large-scale image retrieval, Approximate Nearest Neighbor (ANN) search relies on hashing—converting high-dimensional images into short binary codes to ensure that semantically similar images have similar codes. While supervised deep hashing has achieved remarkable success, it requires extensive labeled data pairs, which are costly to obtain. Semi-supervised hashing (SSH) aims to mitigate this by leveraging a small set of labeled data alongside a large volume of unlabeled data.
Traditional SSH methods often rely on pre-computed affinity graphs to capture the structure of unlabeled data. However, these graphs are typically built using early-stage, low-quality representations, leading to a "semantic gap" where the network learns from flawed initial structures. This paper introduces a method to enforce similarity constraints on unlabeled data without relying on brittle, static graphs.
Methodology
The core of the proposed framework is a Teacher-Student Network architecture. The "student" network is optimized via standard backpropagation, while the "teacher" network's weights are calculated as an Exponential Moving Average (EMA) of the student's weights over time. This ensemble approach allows the teacher to provide more stable and accurate representations than the student at any single point in training.
As shown in Figure 1, the student is trained using a composite objective function consisting of three primary losses:
- Supervised Pairwise Loss ($L_s$): Applied to labeled pairs, ensuring that known similar images are mapped to similar hash codes using standard hashing objectives (e.g., DSH or DPSH).
- Consistent Similarity Loss ($R_{up}$): This loss targets the local structure of unlabeled data. Two differently perturbed versions of an image pair are fed into the student and teacher networks. The student is penalized if its predicted similarity score deviates from the teacher's score.
- Quantized Similarity Loss ($R_{uq}$): This loss addresses global structure. The teacher evaluates unlabeled pairs in a batch and "quantizes" high-confidence similarity scores into binary pseudo-labels (similar or dissimilar). The student then treats these as ground truth for training.
Experimental Evaluation
The authors evaluated PTS³H on three benchmark datasets:
- CIFAR-10: 60,000 images across 10 classes.
- NUS-WIDE: Approximately 190,000 multi-label images with 21 concept tags.
- ImageNet-100: A 100-class subset of the ImageNet dataset.
Results and Discussion
PTS³H consistently outperformed both its supervised baselines (DSH, DPSH) and state-of-the-art semi-supervised methods like SSDH and BGDH across various bit lengths and retrieval metrics.
As illustrated in Figure 2, the PTS³H variants (PTS³H-DSH and PTS³H-DPSH) show significant precision gains. For instance, on CIFAR-10 at 32 bits, PTS³H achieved a Mean Average Precision (MAP) of 0.835, compared to 0.809 for the supervised DSH baseline. Ablation studies revealed that the Consistent Similarity Loss is the primary driver of performance, contributing roughly 70% of the gains over the baseline.
One limitation noted was the performance on the multi-label NUS-WIDE dataset, where the Quantized Similarity Loss provided smaller improvements. This suggests that simple threshold-based pseudo-labeling is less effective for the complex, overlapping similarity distributions found in multi-label data.
Conclusion
PTS³H demonstrates that the teacher-student paradigm can be effectively adapted for pairwise similarity learning in hashing. By replacing static graphs with a dynamic ensemble teacher, the model bridges the semantic gap and achieves superior retrieval performance. Future work may involve integrating more advanced supervised hashing losses into the framework to further push the state-of-the-art in semi-supervised retrieval.
Summary updated