CLIPTTA: Robust Contrastive Vision-Language Test-Time Adaptation
Marc Lafon, Gustavo Adolfo Vargas Hakim, Clément Rambour, Christian Desrosiers, Nicolas Thome
Abstract
Vision-language models (VLMs) like CLIP exhibit strong zero-shot capabilities but often fail to generalize under distribution shifts. Test-time adaptation (TTA) allows models to update at inference time without labeled data, typically via entropy minimization. However, this objective is fundamentally misaligned with the contrastive image-text training of VLMs, limiting adaptation performance and introducing failure modes such as pseudo-label drift and class collapse. We propose CLIPTTA, a new gradient-based TTA method for vision-language models that leverages a soft contrastive loss aligned with CLIP's pre-training objective. We provide a theoretical analysis of CLIPTTA 's gradients, showing how its batchaware design mitigates the risk of collapse. We further extend CLIPTTA to the open-set setting, where both in-distribution (ID) and out-of-distribution (OOD) samples are encountered, using an Outlier Contrastive Exposure (OCE) loss to improve OOD detection. Evaluated on 75 datasets spanning diverse distribution shifts, CLIPTTA consistently outperforms entropy-based objectives and is highly competitive with state-of-the-art TTA methods, outperforming them on a large number of datasets and exhibiting more stable performance across diverse shifts. Source code is available at: CLIPTTA Repository.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
- Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
- Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models cites Tent: Fully Test-Time Adaptation by Entropy Minimization
- Beyond Heuristic Prompting: A Concept-Guided Bayesian Framework for Zero-Shot Image Recognition cites Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models
- Beyond Heuristic Prompting: A Concept-Guided Bayesian Framework for Zero-Shot Image Recognition cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- Beyond Heuristic Prompting: A Concept-Guided Bayesian Framework for Zero-Shot Image Recognition cites Learning Transferable Visual Models From Natural Language Supervision
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites Learning Transferable Visual Models From Natural Language Supervision
- Learning Transferable Visual Models From Natural Language Supervision cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- STAR: Test-Time Adaptation Can Enhance Universal Prompt Learning for Vision-Language Models cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
- STAR: Test-Time Adaptation Can Enhance Universal Prompt Learning for Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
Cited by top-tier papers2
- Beyond Heuristic Prompting: A Concept-Guided Bayesian Framework for Zero-Shot Image RecognitionHui Liu, Kecheng Chen, Jialiang Wang, Xianming Liu et al.CVPR 2026
- STAR: Test-Time Adaptation Can Enhance Universal Prompt Learning for Vision-Language ModelsYiwei Fu, Hui Wan, Xiao Luo, Minghua DengCVPR 2026
Builds on22
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text SupervisionChao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen et al.ICML 2021 · 5,401 citations
- The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution GeneralizationDan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath et al.ICCV 2021 · 2,294 citations
- Tent: Fully Test-Time Adaptation by Entropy MinimizationDequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno A. Olshausen et al.ICLR 2021 · 1,731 citations
- Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language ModelsManli Shu, Weili Nie, De-An Huang, Zhiding Yu et al.NeurIPS 2022 · 603 citations
Related papers
- COSTA: Collaborative Open-Set Test-Time Adaptation Through Robust Prototype LearningCan Zhang, Ruirui LiCVPR Findings 2026
- WATT: Weight Average Test Time Adaptation of CLIPDavid Osowiechi, Mehrdad Noori, Gustavo Adolfo Vargas Hakim, Moslem Yazdanpanah et al.NeurIPS 2024 · 46 citations
- Towards Robustness Prompt Tuning with Fully Test-Time Adaptation for CLIP's Zero-Shot GeneralizationRan Wang, Hua Zuo, Zhen Fang, Jie LuACM MM 2024 · 7 citations
- TTL: Test-time Textual Learning for OOD Detection with Pretrained Vision-Language ModelsJinlun Ye, Jiang Liao, Runhe Lai, Xinhua Lu et al.CVPR 2026 · 2 citations
- Test-Time Adaptation with CLIP Reward for Zero-Shot Generalization in Vision-Language ModelsShuai Zhao, Xiaohan Wang, Linchao Zhu, Yi YangICLR 2024 · 47 citations
