NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Visual Representations with Caption Annotations

Mert Bülent Sariyildiz, Julien Perez, Diane Larlus

Abstract

Pretraining general-purpose visual features has become a crucial part of tackling many computer vision tasks. While one can learn such features on the extensively-annotated ImageNet dataset, recent approaches have looked at ways to allow for noisy, fewer, or even no annotations to perform such pretraining. Starting from the observation that captioned images are easily crawlable, we argue that this overlooked source of information can be exploited to supervise the training of visual representations. To do so, motivated by the recent progresses in language models, we introduce image-conditioned masked language modeling (ICMLM) – a proxy task to learn visual representations over image-caption pairs. ICMLM consists in predicting masked words in captions by relying on visual cues. To tackle this task, we propose hybrid models, with dedicated visual and textual encoders, and we show that the visual representations learned as a by-product of solving this task transfer well to a variety of target tasks. Our experiments confirm that image captions can be leveraged to inject global and localized semantic information into visual representations.

Introduction: The Middle Ground of Supervision

Deep learning thrives on data, but the "gold standard" for training vision models—the ImageNet dataset—requires massive amounts of expert-level manual labeling. On the other end of the spectrum, self-supervised learning (learning from the data itself without labels) is promising but notoriously data-hungry, often requiring hundreds of millions of images to reach peak performance.

This research identifies a "middle ground": captioned images. Captions are abundant on the web and contain rich, structured semantic information. However, previous attempts to use them often treated captions as simple "bags of words," ignoring linguistic structure. This paper asks: Can we use the full structure of a sentence to teach a computer how to see?

Methodology: Image-Conditioned Masked Language Modeling (ICMLM)

The core contribution is Image-Conditioned Masked Language Modeling (ICMLM). Inspired by BERT, the model masks a word in a caption (e.g., "a man rides a [MASK]") and is trained to predict that word. To succeed, the model must "look" at the image to find the missing information.

The authors explore two architectures for ICMLM:

  • ICMLM-tfm: Uses a Transformer to fuse visual and textual features.
  • ICMLM-att-fc: Employs a spatial attention mechanism to let the model focus on specific regions of the image corresponding to the masked word.

Crucially, the visual backbone is trained from scratch, while the textual part uses a frozen, pre-trained BERT model to provide linguistic context.

Visual Grounding and Semantic Insights

A key finding is that ICMLM enables visual grounding. Qualitative results show that when a word is masked, the model’s attention naturally shifts to the pixels representing that object in the image. The vision model essentially learns to ground language in pixels, learning not just what is in an image, but where it is and how it relates to other objects.

Figure 3: Visual grounding in a rural scene. The model's attention maps align with the objects (man, horse, dog) relevant to the masked caption words.
Figure 4: Visual grounding in an urban scene. The model focuses on the specific region of the platform/train when predicting related masked tokens.

Key Results and Data Efficiency

  • Data Efficiency: Training on just 100,000 captioned images produces features competitive with self-supervised models trained on 96 million images. This suggests that natural language is an incredibly "dense" supervisory signal.
  • Outperforming Self-Supervision: On the Pascal VOC-07 benchmark, ICMLM models outperformed popular self-supervised methods like RotNet and DeeperCluster when trained on the same amount of data.
  • Rivaling Supervised Learning: Remarkably, on tasks like VOC classification, ICMLM models trained on COCO/VG performed on par with a VGG16 model pre-trained on the full, human-labeled ImageNet dataset.

Conclusion

ICMLM demonstrates that moving beyond simple tag prediction to full sentence modeling significantly improves the quality of learned visual features. While the current approach relies on pre-trained language models like BERT, it opens the door for scaling vision training using the vast, noisy, but semantically rich datasets available on the open web. Future work will explore more complex multi-modal fusion and scaling to even larger web-crawled datasets.

Summary updated

BibTeX
@inproceedings{sariyildiz2020learning,
  author = {Mert Bülent Sariyildiz and Julien Perez and Diane Larlus},
  title = {{Learning Visual Representations with Caption Annotations}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=O9dad7jWGv6},
}
Figure