Advancing Compositional Awareness in CLIP with Efficient Fine-Tuning

Amit Peleg, Naman Deep Singh, Matthias Hein

Abstract: Vision-language models like CLIP have demonstrated remarkable zero-shot capabilities in classification and retrieval. However, these models often struggle with compositional reasoning - the ability to understand the relationships between concepts. A recent benchmark, SugarCrepe++, reveals that previous works on improving compositionality have mainly improved lexical sensitivity but neglected semantic understanding. In addition, downstream retrieval performance often deteriorates, although one would expect that improving compositionality should enhance retrieval. In this work, we introduce CLIC (Compositionally-aware Learning in CLIP), a fine-tuning method based on a novel training technique combining multiple images and their associated captions. CLIC improves compositionality across architectures as well as differently pre-trained CLIP models, both in terms of lexical and semantic understanding, and achieves consistent gains in retrieval performance. This even applies to the recent CLIPS, which achieves SOTA retrieval performance. Nevertheless, the short fine-tuning with CLIC leads to an improvement in retrieval and to the best compositional CLIP model on SugarCrepe++. All our models and code are available at https://clic-compositional-clip.github.io

Introduction: The Compositionality Gap

Vision-language models (VLMs) like CLIP have revolutionized zero-shot image classification and retrieval. However, a persistent weakness remains: their lack of compositional reasoning. These models often behave like "bag-of-words" encoders, failing to distinguish between sentences with identical words but different meanings (e.g., "the dog chases the cat" vs. "the cat chases the dog").

Previous attempts to address this issue typically relied on "hard negatives"—shuffled captions used as incorrect examples. However, these methods often suffer from two major drawbacks. First, they frequently cause a significant drop in standard retrieval performance. Second, they often focus on lexical sensitivity (word changes) while neglecting broader semantic understanding. This paper introduces CLIC (Compositionally-aware Learning in CLIP), a method that fixes these flaws while remaining highly efficient.

CLIC: Compositionally-aware Learning in CLIP

The core innovation of CLIC is its novel data generation and training scheme. Instead of training on single image-caption pairs, the method uses image concatenation and synthetic captioning to create a more challenging and diverse training signal.

The CLIC data generation scheme: two images are concatenated, and multiple positive captions ($p_i$) are generated by shuffling descriptions. Hard negatives ($n$) are created by swapping key terms between descriptions.

As illustrated in Figure 4, CLIC concatenates two random images and generates four positive captions ($p_1$ to $p_4$) by varying the order of descriptions. Hard negatives ($n$) are created by identifying parts of speech (e.g., nouns or adjectives) and swapping them between the two descriptions using the spaCy library. This forces the model to attend to fine-grained semantic details rather than just global object presence.

The training objective utilizes a multi-loss approach:

  1. Contrastive Loss: Standard CLIP-style matching.
  2. Single Negative (S-Neg) Loss: Specifically forces the model to rank the "correct" concatenated caption higher than the "hard negative."
  3. Uni-Modal Loss: An $l_2$ distance penalty that ensures the text encoder produces similar embeddings for a caption and its shuffled version, teaching the model syntactic invariance.

Experimental Results and Performance

CLIC achieves state-of-the-art results on the SugarCrepe++ benchmark, which measures both lexical sensitivity and semantic understanding. Crucially, unlike previous methods, CLIC does not sacrifice retrieval performance; in many cases, it actually improves it.

Comparison of CLIC against prior methods. While previous approaches like DAC-SAM or TSVLC-R often suffer from significant drops in retrieval performance (negative bars), CLIC consistently improves both compositionality (SugarCrepe++) and retrieval.

Figure 1 demonstrates this "no trade-off" advantage. CLIC shows positive gains across all metrics, including image and text retrieval on MS-COCO and Flickr30k. For instance, when applied to the high-performance CLIPS model, CLIC improved Image-to-Text scores by +9% on SugarCrepe++ and boosted retrieval scores by over 2% on MS-COCO.

Furthermore, the method is extremely efficient. By keeping the vision encoder frozen during fine-tuning, the process prevents the model from "forgetting" general visual features and allows training to be completed in under 30 minutes on a single GPU for datasets of ~1M samples.

Conclusion and Future Directions

CLIC demonstrates that compositional reasoning can be significantly improved in VLMs without degrading general retrieval capabilities. By using image concatenation and a multi-loss objective, CLIC teaches models to move beyond a "bag-of-words" understanding. The authors also found that CLIC-trained vision encoders could improve the compositional reasoning of Large Language Models (like LLaVA) when used as their visual backbone. Future work will explore scaling this strategy to even larger models and different training objectives like SigLIP.

Summary updated

BibTeX
@inproceedings{peleg2025advancing,
  author = {Amit Peleg and Naman Deep Singh and Matthias Hein},
  title = {{Advancing Compositional Awareness in CLIP with Efficient Fine-Tuning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=PTLIM88XYR},
}
Figure