TL;DR
The authors introduce CLIC (Compositionally-aware Learning in CLIP), a fine-tuning strategy that fixes CLIP's "bag-of-words" behavior by training on concatenated image-caption pairs. Unlike previous methods that often trade off retrieval accuracy for compositional logic, CLIC achieves state-of-the-art results on benchmarks like SugarCrepe++ while simultaneously boosting standard image-text retrieval performance.
What Problem Does This Paper Address?
Despite their success, Vision-Language Models (VLMs) like CLIP are notoriously bad at "compositional reasoning." They often treat captions as a "bag of words," failing to distinguish between "a dog chasing a cat" and "a cat chasing a dog."
Recent benchmarks like SugarCrepe++ have exposed a deeper issue: previous attempts to fix this mostly improved "lexical sensitivity" (noticing word changes) but failed at "semantic understanding" (understanding the actual meaning). Furthermore, there has been a frustrating "compositionality-retrieval trade-off"—techniques that make a model better at logic often make it worse at standard downstream retrieval tasks.
Methods
The core of CLIC is a novel data augmentation and training scheme. Instead of training on single image-caption pairs, CLIC concatenates two random images into a single input and combines their captions.
- Positive Generation: The model sees the concatenated image and four variations of positive captions (e.g., different sentence orders or additional descriptive sentences from the original metadata).
- Hard Negative Generation: To force the model to learn relationships, CLIC creates a "hard negative" by swapping words between the two original captions (e.g., swapping "man" and "water" between two unrelated scenes). This ensures the model can't just look for the presence of keywords; it must understand which keyword belongs to which part of the image.
- Loss Functions: The authors use a weighted combination of three losses:
- Contrastive Loss: A standard CLIP-style loss extended to handle multiple positives.
- Hard-Negative Loss: Specifically penalizes the model for assigning high similarity to the "swapped" negative captions.
- Uni-Modal Loss: An $l_2$ distance penalty that forces the text encoder to be invariant to simple syntactic shuffles that don't change the meaning.
Datasets
The authors avoid "knowledge leakage" by not training on MS-COCO (the source of many benchmarks). Instead, they use:
- PixelProse: High-quality recaptioned versions of RedCaps and CC12M.
- Recaptioned LAION: 1M images from LAION-5B recaptioned using the CogVLM model to provide the detailed, multi-sentence descriptions required for CLIC's concatenation strategy.
- Evaluation Benchmarks: SugarCrepe++, WinoGround, and standard retrieval/classification sets like MS-COCO, Flickr30k, and ImageNet.
Key Insights and Ideas
- Quadratic Scaling: By concatenating random pairs, the number of possible training combinations grows quadratically with the dataset size, providing massive diversity without needing more raw data.
- Across-Scene Swaps are Better: Swapping words between two different scenes (e.g., a "man" from image A and a "dog" from image B) is more effective than within-scene swaps. Within-scene swaps (like "dog chases cat" to "cat chases dog") can sometimes result in a caption that is still technically true or ambiguous, whereas across-scene swaps are almost guaranteed to be false.
- Retrieval Synergy: Improving compositionality should help retrieval. CLIC proves this by showing that a model that understands "red shirt" vs "blue shirt" is naturally a better search engine.
Key Results
- SugarCrepe++ SOTA: CLIC achieved the best compositional scores for CLIP-like models. When applied to the already strong CLIPS model, it yielded a +9% average improvement on the SugarCrepe++ Image-to-Text (ITT) set.
- No Retrieval Degradation: Unlike DAC or NegCLIP, which often see retrieval performance drop, CLIC-tuned models saw gains of +1.3% to +2.2% in text and image retrieval on MS-COCO.
- LLaVA Enhancement: Fine-tuning the vision encoder of LLaVA-1.5-7b with CLIC improved its compositional reasoning (measured by VQAScore) while maintaining its general conversational and reasoning abilities.
Limitations and Future Work
The authors acknowledge that they only tested a fraction of available contrastive models due to compute constraints. While they showed success with LLaVA, they suggest that other large VLMs like VILA or CogVLM might also benefit from CLIC. Additionally, while the method is efficient, it relies on having detailed, multi-sentence captions; standard "noisy" web captions are likely insufficient for the concatenation strategy to work effectively. Future work could explore how to apply this to even larger-scale "in-the-wild" data.
Summary updated