TL;DR
While Contrastive Language-Image Pre-training (CLIP) models are celebrated for their zero-shot generalization, their "safety" profile—visual robustness, out-of-distribution (OOD) detection, and predictive calibration—is more nuanced than previously thought. This comprehensive study of 83 CLIP models reveals that while they excel in shape and texture robustness, they struggle with object pose and lose their unique "shape bias" after standard fine-tuning.
What Problem Does This Paper Address?
As foundation models like CLIP move from research labs to real-world applications (like autonomous driving or medical imaging), classification accuracy isn't enough. We need to know if these models are reliable. Specifically:
- Visual Factor Robustness: Does the model fail if an object is just rotated (pose) or partially occluded?
- OOD Detection: Can the model identify when it’s looking at a category it has never seen before, rather than confidently making a wrong guess?
- Predictive Uncertainty: Are the model's confidence scores actually representative of its likelihood of being correct (calibration)?
Previous studies suggested CLIP was a "silver bullet" for these issues, but those studies were often narrow in scope. This paper provides a massive, systematic audit to see if those claims hold up across different architectures, training data sources, and fine-tuning strategies.
Methods
The authors conducted an extensive comparative analysis involving:
- Models: 83 CLIP models (51 zero-shot, 32 fine-tuned) and 127 standard ImageNet classifiers (ResNets, ViTs, ConvNeXts, etc.).
- Training Variables: They compared models trained on different data sources (WIT vs. LAION) and varying dataset sizes (from 80M to 2B samples).
- Evaluation Framework: They utilized the "effective robustness" framework, which measures if a model performs better on a specific challenge (like a distribution shift) than its overall accuracy would predict.
- Calibration: They applied Temperature Scaling—a post-hoc calibration technique—to see how well CLIP models communicate uncertainty compared to traditional supervised models.
Datasets
The study utilized a diverse battery of benchmarks:
- Robustness: ImageNet-X (which labels 16 specific failure factors like pose, background, and lighting), Stylized-ImageNet, and cue-conflict stimuli to measure shape vs. texture bias.
- OOD Detection: A suite including iNaturalist, SUN, PLACES, TEXTURE, and ImageNet-O.
- Calibration under Shift: ImageNet-V2, ImageNet-R (Rendition), ImageNet-A (Adversarial), ImageNet-Sketch, ObjectNet, and ImageNet-Vid-Robust.
Key Insights and Ideas
- The Pose Weakness: Contrary to the narrative of universal robustness, CLIP models are actually less robust to changes in object pose and partial views than standard ImageNet models. However, they are significantly more robust to factors like shape, color, and texture.
- Fine-tuning "Breaks" Shape Bias: Zero-shot CLIP models are famously "shape-biased," meaning they identify objects by their form rather than their texture (much like humans do). However, the authors found that fine-tuning CLIP on ImageNet discards this property, making the models "texture-biased" like standard CNNs.
- Calibration is Not Guaranteed: Previous research suggested CLIP is naturally well-calibrated. This paper contradicts that, showing that CLIP models trained on smaller datasets (like LAION-80M) can be less calibrated than standard models.
- The Power of Source Data: The choice of training data (WIT vs. LAION) profoundly impacts safety. For example, WIT-trained models often show better OOD detection than LAION-trained models, even at the same level of ImageNet accuracy.
- Prompting Paradox: Using fewer prompts (e.g., just one instead of an ensemble of 80) decreases classification accuracy but can actually improve OOD detection and calibration.
Key Results
- Visual Robustness: CLIP outperforms standard models on 6 out of 10 visual factors (Subcategory, Smaller, Color, Shape, Texture, Larger) but lags behind on Pose and Partial View.
- OOD Detection: For zero-shot CLIP, there is a strong linear correlation between in-distribution accuracy and OOD detection performance. Interestingly, fine-tuning on a large intermediate dataset (ImageNet-12K) before final fine-tuning on ImageNet-1K significantly boosts OOD detection capability.
- Calibration: While raw CLIP models aren't always better calibrated, they respond exceptionally well to temperature scaling. After scaling, CLIP models lie on a distinct, superior trend line for uncertainty estimation compared to all other model groups.
Limitations and Future Work
- Scope of Models: The study primarily focuses on CLIP. It remains to be seen if these insights generalize to other vision-language models like ALIGN or BASIC.
- Data Diversity: The analysis is limited to two major academic training sources (WIT and LAION). Proprietary datasets used by industry might yield different robustness profiles.
- Misclassification Detection: The authors suggest that future work should look beyond OOD detection to "misclassification detection"—the ability of a model to know when its own prediction on a known category is likely wrong.
- Prompt Engineering: The "prompting paradox" (where fewer prompts help calibration) suggests a need for new research into how to tune prompts for safety objectives rather than just top-1 accuracy.
Summary updated