Abstract
Efficient image retrieval relies on hashing to transform high-dimensional data into compact binary codes. While supervised hashing is effective, the scarcity of labeled data remains a significant bottleneck. This paper presents the Pairwise Teacher-Student Network (PTS3H), a semi-supervised hashing framework that leverages unlabeled data by extending the teacher-student paradigm to pairwise relationships. By enforcing consistency across random perturbations and utilizing quantized similarity pseudo-labels, PTS3H achieves state-of-the-art performance on benchmark datasets including CIFAR-10, NUS-WIDE, and ImageNet-100.
Introduction
The core challenge in large-scale image retrieval is the "semantic gap"—the discrepancy between raw data representations and complex semantic meanings. Supervised hashing methods attempt to bridge this gap using labeled pairs, but labeling massive databases is often impractical. Semi-supervised hashing (SSH) methods typically employ graph-based approaches to capture the structure of unlabeled data. However, these graphs often rely on static, potentially flawed initial representations. PTS3H addresses these limitations by dynamically learning data structures through a teacher-student interaction, adhering to the smoothness assumption that similar items should yield similar binary codes.
Methodology
The PTS3H framework is built upon the "Mean Teacher" architecture, comprising two identical networks: a Student and a Teacher.
Teacher-Student Architecture
The Student network is updated via standard backpropagation. In contrast, the Teacher network's weights are an Exponential Moving Average (EMA) of the Student's weights, providing a stable, ensembled target for training. This makes the Teacher a more reliable reference for similarity than the Student could provide for itself.
Proposed Losses
- Consistent Pairwise Loss ($R_{up}$): Unlike standard models that focus on single points, PTS3H enforces consistency at the pairwise level. For a pair of unlabeled images subjected to random perturbations (e.g., cropping or flipping), the model ensures the Student's output similarity matches that of the Teacher.
- Quantized Similarity Loss ($R_{uq}$): The Teacher generates pseudo-labels by identifying highly similar pairs. The Student is then trained to treat these pairs as similar, capturing global data structure.
- Optimization: The final objective function integrates supervised pairwise loss with these unsupervised components and a quantization term to produce near-binary outputs.
Experiments and Results
The model was evaluated on three large-scale benchmarks: CIFAR-10, NUS-WIDE, and ImageNet-100. PTS3H consistently outperformed both supervised baselines and existing state-of-the-art semi-supervised methods like SSDH and BGDH.
As shown in the results table, PTS3H achieved MAP gains of 2.3% to 5.6% over supervised counterparts (DSH/DPSH) on CIFAR-10. On ImageNet-100, it maintained a significant lead of approximately 1-5% in MAP and precision metrics. Ablation studies highlighted that the Consistent Similarity Loss ($R_{up}$) is the primary driver of performance, contributing roughly 70% of the total gain, proving that pairwise consistency is a powerful signal for unlabeled data.
Discussion and Conclusion
PTS3H demonstrates that shifting consistency constraints from individual points to pairwise relationships is highly effective for hashing tasks. By using the Teacher as a stable refiner, the model overcomes the limitations of static graph-based SSH. While the framework shows some sensitivity to hyperparameters like the unsupervised weight ($\omega$), its ability to handle complex, non-linear manifolds makes it a robust solution for semi-supervised image retrieval. Future work may involve integrating more advanced supervised backbones and refining pseudo-similarity construction strategies.
Summary updated