TL;DR
Contrastive learning for image-caption retrieval often suffers from "predictive feature suppression," where models ignore useful details because they only need a few "shortcut" features to distinguish between items in a training batch. This paper introduces Latent Target Decoding (LTD), a method that forces encoders to retain richer semantic information by reconstructing captions in a pre-trained latent space, significantly improving retrieval performance in resource-constrained settings.
What Problem Does This Paper Address?
In Image-Caption Retrieval (ICR), the goal is to match an image with its corresponding text description. Most state-of-the-art models use contrastive loss, which teaches the model to pull "positive" pairs (matching image and caption) together and push "negative" pairs apart in a shared latent space.
However, contrastive learning can be "lazy." If a training batch contains an image of a kitten and a negative sample of a dog, the model might only learn to recognize the "kitten-ness" and "dog-ness" to solve the task. It might completely ignore other "predictive features" like the color of the quilt the kitten is sitting on or the fact that it's looking at a camera. This is called predictive feature suppression.
This problem is particularly acute in resource-constrained settings where researchers can't afford massive datasets or huge batch sizes that naturally provide more "hard negatives" to force the model to learn better.
Methods
The authors propose Latent Target Decoding (LTD). The core idea is to add an auxiliary task to the training process: the caption encoder must not only produce a representation for retrieval but also provide enough information for a small decoder to reconstruct the caption.
Key innovations include:
- Reconstruction in Latent Space: Instead of trying to predict the exact words (tokens) of the caption—which allows the model to "cheat" by using a language model to fill in the blanks—LTD reconstructs the caption's representation in the latent space of a general-purpose sentence encoder (like Sentence-BERT).
- Constraint-Based Optimization: Rather than just adding the reconstruction loss to the contrastive loss (a "dual loss" approach), the authors treat it as an optimization constraint. They use Lagrange multipliers to ensure the reconstruction loss stays below a specific threshold ($\eta$), allowing the model to focus primarily on the retrieval task while maintaining a "budget" of descriptive information.
Datasets
The authors evaluated their method on standard ICR benchmarks:
- Flickr30k: 31,000 image-caption tuples.
- MS-COCO: A larger dataset with over 123,000 tuples.
- CxC (Crisscrossed Captions): An extension of COCO with additional semantic similarity annotations used for more robust evaluation.
Key Insights and Ideas
- The "Shortcut" Trap: Contrastive models naturally gravitate toward the easiest features to solve the immediate discrimination task. LTD acts as a regularizer that prevents the encoder from "throwing away" information that isn't strictly necessary for the current training batch but might be vital for real-world retrieval.
- Latent > Tokens: Reconstructing raw text is often counterproductive because decoders can rely on internal language priors to achieve low loss without actually using the encoder's features. Reconstructing a dense semantic vector (latent target) forces the encoder to capture the meaning of the entire sentence.
- Constraints over Weights: Balancing two different losses with a fixed weight ($\beta$) is notoriously difficult. By framing LTD as a constraint, the model automatically adjusts the importance of the reconstruction task, only focusing on it when the representation becomes too "sparse" or "lazy."
Key Results
LTD consistently outperformed baseline contrastive models across different architectures (like VSRN and TERN) and different loss functions (InfoNCE and Triplet loss).
- Performance Gains: On MS-COCO, LTD improved Recall@1 for image-to-text retrieval from 33.7% to 36.0%.
- Better Generalization: The method showed significant improvements in nDCG and R-precision, indicating that the rankings produced by LTD-enabled models are more semantically meaningful.
- Qualitative Success: Qualitative analysis showed that LTD-trained models were much better at capturing fine-grained details. For example, a baseline model might match an image of a man eating pizza with a generic "man eating" caption, while an LTD model correctly identifies the specific action of "taking a photo of food."
Limitations and Future Work
- Dependency on Pre-trained Encoders: LTD currently requires a high-quality, general-purpose sentence encoder (like SBERT) to generate the latent targets. The authors suggest exploring ways to generate these targets without relying on external pre-trained models.
- Black-box Features: While the metrics show that feature suppression is reduced, it is still difficult to pinpoint exactly which features are being recovered. The authors suggest that future work should integrate feature attribution methods to make these improvements more interpretable.
- Scaling: The study focused on resource-constrained (single GPU) settings. It remains to be seen how much LTD benefits massive-scale models trained on billions of pairs.
Summary updated