Mutual Learning for Hashing: Unlocking Strong Hash Functions from Weak Supervision

Xiaoxu Ma, Runhao Li, Zhenyu WengarXiv 2025 · DOI

Introduction

Large-scale image retrieval relies heavily on deep hashing to compress high-dimensional data into compact binary codes. This process ensures efficient storage and rapid similarity searches in Hamming space. Traditionally, deep hashing models follow one of two supervision paradigms: pairwise-based or center-based. While effective, these single-paradigm approaches often fail to capture the full complexity of data distributions.

The Challenge of Single-Paradigm Supervision

Pairwise-based methods focus on local relationships, ensuring that similar image pairs are mapped close together. However, they often lack a global perspective of the entire dataset's structure. Conversely, center-based methods enforce global class-level compactness by clustering images around predefined category centers. While generally more robust, center-based models can overlook the nuanced, fine-grained local similarities that pairwise methods capture so well.

Mutual Learning for Hashing (MLH)

To bridge this gap, the researchers propose Mutual Learning for Hashing (MLH). This framework employs a dual-branch architecture that simultaneously leverages both global and local supervision.

Comparison of traditional deep hashing paradigms (a, b) with the proposed Mutual Learning for Hashing (c).

The MLH framework consists of three core components:

  • Dual-Branch Strategy: A "strong" branch utilizes center-based loss for global structure, while a "weaker" branch uses pairwise loss to capture local similarity cues.
  • Deep Mutual Learning (DML): Instead of traditional one-way knowledge distillation, the two branches engage in iterative peer-teaching. In even training epochs, the pairwise branch guides the center branch; in odd epochs, the roles are reversed. This allows the "strong" branch to refine its global clusters using the "weak" local cues from its peer.
  • Mixture-of-Hash-Experts (MoH): The standard single hash layer is replaced with a pool of "experts." These experts are shared between branches to maintain consistency, but each branch uses an independent gating mechanism to select which experts to prioritize, allowing for specialized feature transformation.

Experimental Results

The MLH framework was evaluated on standard benchmarks including CIFAR-10, ImageNet, and MSCOCO. It consistently outperformed state-of-the-art (SOTA) methods like OrthoHash and CSQ across various bit lengths.

  • MSCOCO: Achieved a mean Average Precision (mAP) improvement of 1.74%.
  • CIFAR-10: Improved mAP by 1.21%.
  • ImageNet: Improved mAP by 0.87%.

Visual analysis using t-SNE plots confirmed that MLH produces tighter, more distinct clusters with significantly fewer ambiguous points between classes compared to single-supervision baselines.

Conclusion

MLH demonstrates that "weak" supervision from a pairwise branch can significantly enhance a "strong" center-based model. By combining global structural awareness with local similarity cues through mutual learning and a mixture-of-experts architecture, MLH sets a new standard for discriminative hash function design. Future work may extend this "weak-to-strong" paradigm to heterogeneous objectives such as cross-modal retrieval.

Summary updated

Abstract

Deep hashing has been widely adopted for large-scale image retrieval, with numerous strategies proposed to optimize hash function learning. Pairwise-based methods are effective in learning hash functions that preserve local similarity relationships, whereas center-based methods typically achieve superior performance by more effectively capturing global data distributions. However, the strength of center-based methods in modeling global structures often comes at the expense of underutilizing important local similarity information. To address this limitation, we propose Mutual Learning for Hashing (MLH), a novel weak-to-strong framework that enhances a center-based hashing branch by transferring knowledge from a weaker pairwise-based branch. MLH consists of two branches: a strong center-based branch and a weaker pairwise-based branch. Through an iterative mutual learning process, the center-based branch leverages local similarity cues learned by the pairwise-based branch. Furthermore, inspired by the mixture-of-experts paradigm, we introduce a novel mixture-of-hash-experts module that enables effective cross-branch interaction, further enhancing the performance of both branches. Extensive experiments demonstrate that MLH consistently outperforms state-of-the-art hashing methods across multiple benchmark datasets.
BibTeX
@misc{ma2025mutual,
  author = {Xiaoxu Ma and Runhao Li and Zhenyu Weng},
  title = {{Mutual Learning for Hashing: Unlocking Strong Hash Functions from Weak Supervision}},
  year = {2025},
  eprint = {2510.07703},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.07703},
}
Figure