Abstract
Image-Text Retrieval (ITR) is a fundamental task in cross-modal understanding. Traditional contrastive learning methods often struggle with semantic ambiguity and the limited availability of negative samples during training. We propose CODER (Coupled Diversity-Sensitive Momentum Contrastive Learning), a framework designed to make contrastive learning "diversity-aware." By adaptively weighting negative samples based on their semantic density and incorporating external commonsense knowledge, CODER achieves state-of-the-art results on MSCOCO and Flickr30K benchmarks while significantly improving inference efficiency compared to cross-attention models.
Introduction
The core of Image-Text Retrieval (ITR) lies in learning a shared embedding space where semantically related images and texts are pulled together. However, existing contrastive learning paradigms face three primary limitations:
- Memory Constraints: GPU memory limits the number of negative samples per batch.
- Uniform Weighting: Treating all negative samples as equally important ignores the informative nature of "hard" negatives.
- Knowledge Gap: Relying solely on paired data misses broader semantic relationships.
CODER addresses these by introducing a diversity-sensitive loss and a dual-branch architecture that leverages both instance-level features and high-level concepts.
Methodology
Diversity-Sensitive Contrastive Learning (DCL)
The primary innovation of CODER is the Diversity-Sensitive Contrastive Learning (DCL) mechanism. It identifies semantically ambiguous anchors—those with many negative samples at similar distances—and assigns them higher weights in the loss function.
As shown in Figure 3, an anchor image (like the dog jumping) may have several captions that are semantically close but not exact matches. DCL calculates a "Diversity Score" based on the standard deviation of similarities to negatives, forcing the model to learn finer-grained distinctions in crowded regions of the embedding space.
System Architecture
CODER utilizes a dual-branch architecture to capture both fine-grained details and high-level semantics.
- Instance Branch: Processes raw image regions (Faster R-CNN) and text tokens (BERT). It uses Coupled Momentum Contrastive Learning (MCL) to maintain large queues of negative samples, allowing the model to see thousands of negatives without massive batch sizes.
- Concept Branch: Bridges the modality gap using a Commonsense Knowledge Graph. It maps images and text to high-level concepts processed via a Graph Convolutional Network (GCN).
- Prototype-Guided Classification (PGC): Performs online clustering to align image and text embeddings for the same concept into shared semantic "prototypes."
Experiments and Results
CODER was evaluated on the MSCOCO and Flickr30K benchmarks, setting a new high bar for performance.
State-of-the-Art Performance
On MSCOCO (1K test), CODER achieved a Recall@1 of 82.1% for text retrieval and 65.5% for image retrieval, outperforming previous leaders like SGRAF. On Flickr30K, it surpassed the previous best "R@sum" (the sum of all recall metrics) by a staggering 13.7%.
Efficiency and Visualization
Unlike heavy cross-attention models that are slow at test time, CODER follows a dual-encoder design. This allows for pre-computing features, resulting in inference speeds roughly 6x faster than competitors. T-SNE visualizations confirm that CODER produces a highly structured embedding space with clear semantic clusters, rather than a uniform cloud.
Conclusion
CODER demonstrates that accounting for semantic ambiguity through diversity-sensitive weighting significantly enhances cross-modal retrieval. By combining momentum-based negative sampling with a concept-aware dual-branch architecture, it provides a robust and efficient solution for large-scale image-text search. Future work includes scaling this paradigm to billion-parameter vision-language models and refining the dependency on pre-defined knowledge graphs.
Summary updated