Introduction
Cross-modal retrieval—the ability to search for images using text queries or vice versa—is a cornerstone of modern search engines. To ensure these systems are both fast and memory-efficient, researchers employ hashing, which maps high-dimensional data into short binary codes within a Hamming space. However, existing supervised hashing methods often suffer from a significant "modality gap."
Traditional models typically represent labels as "impoverished" one-hot vectors, failing to capture the rich semantic relationships between categories (e.g., the proximity of "Sea" and "Water"). Furthermore, many self-supervised approaches extract semantic information from labels without explicit interaction with the raw data. To address these limitations, we present SODA (Semantic-cohesive knowledge distillation), a novel two-stage framework that treats multi-label information as textual prompts to bridge the semantic divide.
Methodology: The SODA Framework
SODA utilizes a two-stage teacher-student distillation scheme designed to create a robust, semantically consistent Hamming space.
Stage 1: The Cross-modal Teacher
The first stage focuses on building a high-quality semantic anchor. Instead of raw label vectors, labels are reformulated into natural language prompts (e.g., "An image of [label]"). This transformation makes the label modality compatible with modern vision-language encoders like CLIP. The teacher network is then trained to bridge the gap between images and these label prompts, establishing a well-mapped Hamming space based on highly discriminative label information.
Stage 2: The Cross-modal Student
In the second stage, the student network addresses the more complex text-image relationship. It uses the fixed image hash codes from the teacher as "prior knowledge." The student's text encoder is trained to map diverse and often noisy text descriptions into the established Hamming space, ensuring that the final codes for both modalities are semantically cohesive.
Experimental Evaluation
The model was evaluated on two gold-standard benchmarks: MIRFLICKR-25K and NUS-WIDE. SODA leverages pre-trained CLIP encoders as a foundation for feature extraction, providing a powerful starting point for the distillation process.
Key Results
SODA demonstrated superior performance across multiple metrics, including Mean Average Precision (MAP) and Precision-Recall (P-R) curves:
- Significant Performance Gains: On MIRFLICKR-25K, SODA achieved an average improvement of approximately 4.2% over state-of-the-art baselines for both Image → Text and Text → Image tasks.
- Consistency Across Lengths: The model consistently outperformed classic and deep hashing methods (such as SSAH, DCMH, and SCM) across various hash code lengths (16, 32, 64, and 128 bits).
- Efficiency: Remarkably, SODA's binary hash codes outperformed some real-value retrieval methods, proving the exceptional efficiency of its semantic mapping.
Conclusion and Future Work
SODA successfully demonstrates that treating labels as textual prompts and employing an "image-first" distillation strategy can significantly mitigate the modality gap in cross-modal hashing. By leveraging the semantic power of Large Language Models (LLMs) through prompt engineering, SODA creates a more cohesive retrieval space.
Future research may explore the sensitivity of the model to different prompt templates and investigate ways to streamline the two-stage training into a more end-to-end process. Additionally, extending this cohesive distillation approach to tri-modal or video-based retrieval remains a promising avenue for exploration.
Summary updated