Abstract
To train image-caption retrieval (ICR) methods, contrastive loss functions are a common choice for optimization functions. Unfortunately, contrastive ICR methods are vulnerable to predictive feature suppression. Predictive features are features that correctly indicate the similarity between a query and a candidate item. However, in the presence of multiple predictive features during training, encoder models tend to suppress redundant predictive features, since these features are not needed to learn to discriminate between positive and negative pairs. While some predictive features are redundant during training, these features might be relevant during evaluation. We introduce an approach to reduce predictive feature suppression for resource-constrained ICR methods: latent target decoding (LTD). We add an additional decoder to the contrastive ICR framework, to reconstruct the input caption in a latent space of a general-purpose sentence encoder, which prevents the image and caption encoder from suppressing predictive features. We implement the LTD objective as an optimization constraint, to ensure that the reconstruction loss is below a bound value while primarily optimizing for the contrastive loss. Importantly, LTD does not depend on additional training data or expensive (hard) negative mining strategies. Our experiments show that, unlike reconstructing the input caption in the input space, LTD reduces predictive feature suppression, measured by obtaining higher recall@k, r-precision, and nDCG scores than a contrastive ICR baseline. Moreover, we show that LTD should be implemented as an optimization constraint instead of a dual optimization objective. Finally, we show that LTD can be used with different contrastive learning losses and a wide variety of resource-constrained ICR methods.
Introduction: The Problem of Predictive Feature Suppression
In Image-Caption Retrieval (ICR), models are typically trained to map images and text into a shared embedding space using a contrastive loss. This objective encourages matching pairs to be close together while pushing non-matching pairs apart. However, this process often leads to Predictive Feature Suppression, a form of "shortcut learning."
If a model can distinguish a "kitten" from a "dog" using only a single feature, it will suppress other descriptive features like "quilt," "sitting," or "frisbee." While these features are redundant during training, they are vital during evaluation when the model must distinguish between highly similar images. This is particularly problematic in resource-constrained settings with small batch sizes, where shortcuts are easier for the model to find.
Proposed Method: Latent Target Decoding (LTD)
To address this, the authors introduce Latent Target Decoding (LTD). This method forces the caption encoder to retain more information by requiring it to reconstruct the input caption's semantic essence.
LTD consists of three key components:
- The Latent Target: Instead of reconstructing raw text—which allows models to "cheat" using language patterns—LTD targets a high-level latent representation from a frozen, general-purpose sentence encoder (e.g., Sentence-BERT).
- The Decoder: A small, three-layer feed-forward network ($h_\omega$) is added to the caption encoder. Its job is to take the learned caption embedding and map it back to the Sentence-BERT target.
- Constraint-based Optimization: Rather than a simple dual-loss approach, LTD treats reconstruction as an optimization constraint. Using Lagrange multipliers, the model ensures the reconstruction error stays below a specific threshold ($\eta$) while primarily focusing on the retrieval task. This prevents the reconstruction task from overwhelming the retrieval objective.
Experimental Setup
The researchers evaluated LTD on several standard benchmarks:
- Flickr30k: 31,000 images with 5 captions each.
- MS-COCO: A large-scale dataset of over 120,000 images.
- CxC (Crisscrossed Captions): An extension of COCO with semantic similarity ratings, used to evaluate fine-grained understanding.
Results and Discussion
LTD consistently outperformed standard contrastive baselines across various architectures (e.g., VSRN, TERN) and loss functions (e.g., InfoNCE, Triplet loss).
Key Insights
- Decoding "Meaning" vs. "Words": Reconstructing latent vectors (semantic) proved superior to reconstructing words (lexical). Lexical reconstruction often hurts performance as the model relies on internal language models to fill in blanks rather than capturing the caption's true meaning.
- The Power of Constraints: The constraint-based approach prevents the "tug-of-war" typical of multi-task learning, allowing the model to optimize for retrieval while preserving necessary features.
- Robustness: LTD significantly improved the stability of Triplet Loss. On Flickr30k, it boosted Recall@1 from 12.8% to 54.7%, effectively preventing training collapse.
Performance Metrics
On Flickr30k, LTD improved image-to-text Recall@1 from 47.4% to 49.6%. On the CxC dataset, significant gains in R-precision and nDCG confirmed that the model is better at ranking semantically similar items, not just exact ground-truth matches.
Conclusion and Future Work
LTD provides a robust training strategy to prevent feature suppression without requiring additional data or expensive negative mining. While highly effective, it currently depends on pre-trained sentence encoders. Future research could explore feature attribution to visualize exactly which features are preserved and test the method's scalability in massive-scale training environments where shortcut learning may be less prevalent.
Summary updated