Learning Visual Composition through Improved Semantic Guidance

Austin Stone, Hagen Soltau, Robert Geirhos, Xi Yi, Ye Xia, Bingyi Cao, Kaifeng Chen, Abhijit Ogale, Jonathon Shlens

Abstract

Current state-of-the-art multimodal models, such as CLIP, frequently suffer from a "bag-of-words" limitation, where they identify individual objects but fail to grasp the structured relationships between them. This work demonstrates that this failure is not an inherent flaw in the contrastive learning objective, but rather a consequence of noisy, low-quality training data. By leveraging Large Language Models (LLMs) to generate rich, grounded recaptions for 1 billion images and utilizing pretrained LLMs as text encoders, the researchers achieve state-of-the-art results on compositional benchmarks and significantly improve retrieval performance on detailed datasets.

The "Bag-of-Words" Problem in Multimodal Learning

Multimodal models often struggle with visual composition. While they can identify a "dog" and a "cat," they frequently fail to distinguish between "a dog to the left of a cat" and "a cat to the left of a dog." This suggests that the model treats captions as a collection of labels rather than a structured sentence with specific attributes and spatial relationships.

Visualizing the goal of improving multimodal embeddings for compositional understanding.

Previous research attempted to solve this by creating complex, bespoke architectures. This paper proposes a simpler hypothesis: the problem lies in the training data. Standard web-scraped "alt-text" is often too sparse or noisy to provide the necessary signal for learning complex composition.

Methodology: Grounded Recaptioning and LLM Encoders

The authors maintain a standard two-tower CLIP-style architecture but introduce three critical refinements:

  1. Grounded Recaptioning: Using Gemini 1.5 Flash, the team generated detailed captions for 1 billion images from the WebLI dataset. By providing the LLM with original web metadata (titles and alt-text) as grounding, they minimized hallucinations and captured fine-grained details that pixels alone might miss.
  2. Pretrained LLM Encoders: Instead of training text encoders from scratch, the model utilizes pretrained LLMs (Gemini 1.5 Flash or Gemma 2), unfreezing only the final four layers to balance performance with computational efficiency.
  3. Hard Negative Augmentation: To force the model to attend to word order, 64 million "hard negative" captions were synthetically generated (e.g., swapping subjects and objects) for use during training.
Comparison of caption lengths between standard web alt-text and the proposed grounded recaptioning method.

As shown above, this recaptioning process drastically increased the information density of the training signal, moving from a median caption length of 7 words to 57 words.

Results and Benchmarking

The resulting model achieved significant performance gains across several key metrics:

  • Compositional Mastery: On the ARO (Attribution, Relation, and Order) benchmark, the model reached 92% on relations and 94% on attributes, outperforming more complex specialized architectures.
  • DOCCI Retrieval: On the Descriptions of Connected and Contrasting Images (DOCCI) dataset—which requires understanding long, human-written descriptions—the model achieved 89.7% Recall@1, nearly doubling the 46.2% score of standard open-source CLIP.
  • SugarCrepe: The model matched or exceeded GPT-4V performance on nearly all splits, proving that retrieval-based models can compete with massive multimodal LLMs on specific reasoning tasks.

Discussion and Limitations

While the model excels at composition and retrieval, its initial zero-shot ImageNet classification (68.4%) was lower than the original CLIP. This was mitigated by mixing in JFT data (improving it to 79.1%), suggesting that rich captions and object labels provide complementary but distinct learning signals. Future work will focus on optimizing the mix of hard negatives and applying these scaling techniques to video-language models.

Summary updated

BibTeX
@inproceedings{stone2025learning,
  author = {Austin Stone and Hagen Soltau and Robert Geirhos and Xi Yi and Ye Xia and Bingyi Cao and Kaifeng Chen and Abhijit Ogale and Jonathon Shlens},
  title = {{Learning Visual Composition through Improved Semantic Guidance}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00354},
}
Figure