MOON: Multi-hash codes joint learning for cross-media retrieval

Donglin Zhang, Xiao-Jun Wu, He-Feng Yin, Josef Kittler

Abstract

Cross-media retrieval aims to bridge the "media gap" between different modalities like images and text. While hashing is a preferred solution for its efficiency, traditional methods suffer from fixed-length rigidity and underutilization of semantic information during training. We propose MOON (Multiple hash cOdes jOint learNing), a novel framework that learns multiple hash code lengths simultaneously. MOON utilizes a bidirectional projection strategy to preserve data similarity and an inter-code knowledge transfer mechanism where longer codes guide the learning of shorter ones. Experiments on MIR Flickr, IAPR-TC, and NUS-WIDE datasets show that MOON significantly outperforms state-of-the-art methods in both retrieval accuracy and training efficiency.

Introduction

The explosion of multimedia data has made cross-media retrieval—searching for images via text or vice versa—a critical task. Hashing maps high-dimensional data into compact binary strings, enabling fast similarity searches. However, most existing hashing models are constrained to a single bit length. Changing the required bit length usually necessitates retraining the entire model, which is computationally expensive. Furthermore, these models often fail to exploit the semantic relationships between codes of different lengths.

Methodology

MOON addresses these limitations through several primary innovations:

  • Joint Multi-Length Learning: MOON optimizes hash codes of various lengths (e.g., 16, 32, 64 bits) within a single objective function, eliminating the need for separate training sessions.
  • Bidirectional Projection: Unlike standard forward-only mapping, MOON incorporates a "back" projection from the latent space to the original data. This bi-Lipschitz continuous mapping ensures better preservation of the original data's similarity structure.
  • Inter-Code Knowledge Transfer: MOON treats longer hash codes as "teachers" for shorter codes. By sharing knowledge across bit lengths, the model improves the discriminative power of shorter codes.
  • Discrete Optimization: To avoid the errors introduced by continuous relaxation, MOON employs an alternating optimization scheme using Singular Value Decomposition (SVD) to handle binary constraints directly.

Experimental Evaluation

The framework was evaluated on three benchmark datasets: MIR Flickr (~20,000 pairs), IAPR-TC (~20,000 pairs), and NUS-WIDE (~186,000 instances). Performance was measured using Mean Average Precision (mAP) and Precision-Recall (PR) curves.

Results and Discussion

MOON consistently achieved the highest mAP across all datasets and bit lengths. For instance, on the NUS-WIDE dataset, it reached a Text-to-Image mAP of 0.7839 at 48 bits, significantly outperforming deep hashing models like DCMH and SSAH.

Precision-Recall curve for Text-to-Image retrieval on MIR Flickr at 36 bits.

The Precision-Recall curves further validate MOON's effectiveness. As shown in the figures, MOON maintains higher precision across the entire recall range compared to baseline methods like CMFH, SMFH, and deep learning-based SCRATCH.

Precision-Recall curve for Text-to-Image retrieval on the large-scale NUS-WIDE dataset at 36 bits.

Beyond accuracy, MOON is remarkably efficient. On MIR Flickr, it completed training in approximately 11 seconds, whereas some supervised competitors required over 14,000 seconds. This efficiency stems from the joint learning architecture that avoids redundant computations.

Conclusion

MOON provides a robust and efficient solution for cross-media retrieval by jointly learning multiple hash code lengths. Its ability to outperform deep learning models while remaining a "shallow" method highlights the importance of structural optimization in hashing. Future work will explore extending this framework to multi-modal data beyond just image and text.

Summary updated

BibTeX
@article{zhang2021moon,
  author = {Donglin Zhang and Xiao-Jun Wu and He-Feng Yin and Josef Kittler},
  title = {{MOON: Multi-hash codes joint learning for cross-media retrieval}},
  journal = {Pattern Recognition Letters},
  year = {2021},
  doi = {10.1016/j.patrec.2021.07.018},
}
Figure