Abstract
Large vision-language models like CLIP are often cited for their superior robustness compared to models trained on ImageNet. However, existing benchmarks primarily target spurious features found in ImageNet, which may not reflect the biases inherent in web-scale datasets like LAION. We introduce CounterAnimal, a new dataset designed to evaluate CLIP's reliance on realistic spurious features by testing models on animals in uncommon backgrounds. Our findings reveal that CLIP models are highly susceptible to these correlations, often performing worse than ImageNet-trained models on these specific shifts. We provide theoretical insights into why the CLIP objective fails to provide inherent robustness and evaluate how scaling and data quality impact these vulnerabilities.
Introduction: The Illusion of Robustness
In machine learning, "spurious features" are correlations that exist in training data but do not hold in general—such as associating "cows" with "green grass." While Contrastive Language-Image Pre-training (CLIP) models have shown impressive performance on benchmarks like ImageNet-A and ImageNet-R, these tests were designed to expose the biases of models trained on ImageNet.
Because CLIP is trained on massive, uncurated web-scale data (e.g., LAION), it likely inherits a completely different set of "shortcuts." The central question of this research is whether CLIP models are truly robust to the world, or if they are simply robust to the specific biases of ImageNet while harboring their own significant vulnerabilities.
The CounterAnimal Benchmark
To investigate this, we developed CounterAnimal, a challenging evaluation set featuring 45 animal classes. The dataset was created through a rigorous four-step pipeline:
- Data Collection: Gathering raw animal photos from iNaturalist.
- Curation: Manually cleaning the data for quality and clarity.
- Background Labeling: Annotating backgrounds (e.g., "snow," "grass," "water").
- Spurious Discovery: Identifying "easy" groups (common backgrounds) and "hard" groups (uncommon but plausible backgrounds) where a proxy CLIP model shows significant performance drops.
The resulting dataset contains 7,174 "easy" images and 5,926 "hard" images. For example, a polar bear on snow is considered an "easy" case, whereas a polar bear on grass is a "hard" case that challenges the model's reliance on background cues.
Key Findings and Theoretical Insights
Our evaluation across various CLIP backbones (ResNet, ViT) and pre-training datasets (LAION-400M, LAION-2B, DataComp-1B) yielded several critical insights:
1. The Distribution Match Fluke
CLIP's perceived robustness on ImageNet variants is largely a result of distribution matching. It avoids ImageNet's specific biases because it wasn't trained on ImageNet, but it fails significantly on its own learned biases. For instance, a standard ViT-B/32 CLIP model dropped from 97.62% accuracy on snow-based polar bears to just 70.91% on grass-based ones.
2. ImageNet Models vs. CLIP
Surprisingly, models trained solely on ImageNet-1K often exhibited less of a performance drop on CounterAnimal than CLIP models did. This suggests that the massive scale of web-pre-training actually introduces unique, strong spurious correlations that traditional supervised learning might avoid.
3. Scaling and Data Quality
We found that simply increasing data volume (e.g., LAION-400M to LAION-2B) does not resolve the issue; if a bias exists at scale, the model learns it more "robustly." However, scaling up model parameters (architecture size) and using high-quality, filtered datasets (like DataComp or DFN) did show improvements. This indicates that data curation is a more effective lever for robustness than raw quantity.
4. Theoretical Limitations
Using a linearized contrastive loss analysis, we proved that the CLIP training objective does not inherently discourage the model from picking up spurious background cues. The contrastive nature of the loss can actually reinforce these shortcuts if they are the most efficient way to distinguish between image-text pairs in the training set.
Conclusion
CounterAnimal serves as a "sobering" benchmark for the vision-language community. It demonstrates that even advanced models like LLaVA and MiniGPT-4, which utilize CLIP backbones, remain vulnerable to background-based spurious features. While scaling and data filtering offer a path forward, new training objectives may be necessary to achieve true, invariant robustness in multi-modal models.
Summary updated