R-TPT: Improving Adversarial Robustness of Vision-Language Models through Test-Time Prompt Tuning
Lijun Sheng, Jian Liang, Zilei Wang, Ran He
Abstract
Vision-language models (VLMs), such as CLIP, have gained significant popularity as foundation models, with numerous fine-tuning methods developed to enhance performance on downstream tasks. However, due to their inherent vulnerability and the common practice of selecting from a limited set of open-source models, VLMs suffer from a higher risk of adversarial attacks than traditional vision models. Existing defense techniques typically rely on adversarial fine-tuning during training, which requires labeled data and lacks of flexibility for downstream tasks. To address these limitations, we propose robust test-time prompt tuning (R-TPT), which mitigates the impact of adversarial attacks during the inference stage. We first reformulate the classic marginal entropy objective by eliminating the term that introduces conflicts under adversarial conditions, retaining only the pointwise entropy minimization. Furthermore, we introduce a plug-and-play reliability-based weighted ensembling strategy, which aggregates useful information from reliable augmented views to strengthen the defense. R-TPT enhances defense against adversarial attacks without requiring labeled training data while offering high flexibility for inference tasks. Extensive experiments on widely used benchmarks with various attacks demonstrate the effectiveness of R-TPT. The code is available in https://github.com/TomSheng21/R-TPT .
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.
14 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
- Multi-Cache Enhanced Prototype Learning for Test-Time Generalization of Vision-Language Models cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- Multi-Cache Enhanced Prototype Learning for Test-Time Generalization of Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
- Multi-Cache Enhanced Prototype Learning for Test-Time Generalization of Vision-Language Models cites Tent: Fully Test-Time Adaptation by Entropy Minimization
- A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language Models cites Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
- A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language Models cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
- A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language Models cites Tent: Fully Test-Time Adaptation by Entropy Minimization
- Adversarial Attacks Already Tell the Answer: Directional Bias-Guided Test-time Defense for Vision-Language Models cites Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
- Adversarial Attacks Already Tell the Answer: Directional Bias-Guided Test-time Defense for Vision-Language Models cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- Adversarial Attacks Already Tell the Answer: Directional Bias-Guided Test-time Defense for Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
- When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustness cites Multi-Cache Enhanced Prototype Learning for Test-Time Generalization of Vision-Language Models
- When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustness cites Towards Evaluating the Robustness of Neural Networks
- When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustness cites Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
- When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustness cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustness cites Learning Transferable Visual Models From Natural Language Supervision
- When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustness cites Tent: Fully Test-Time Adaptation by Entropy Minimization
- Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks cites Towards Evaluating the Robustness of Neural Networks
- Learning Transferable Visual Models From Natural Language Supervision cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
- Towards Generalizable AI-Generated Image Detection via Image-Adaptive Prompt Learning cites Learning Transferable Visual Models From Natural Language Supervision
- Towards Generalizable AI-Generated Image Detection via Image-Adaptive Prompt Learning cites Tent: Fully Test-Time Adaptation by Entropy Minimization
Cited by top-tier papers14
- Towards Generalizable AI-Generated Image Detection via Image-Adaptive Prompt LearningYiheng Li, Zichang Tan, Guoqing Xu, Zhen Lei et al.CVPR 2026 · 8 citations
- Adversarial Attacks Already Tell the Answer: Directional Bias-Guided Test-time Defense for Vision-Language ModelsLiangsheng Liu, Si Chen, Jiamin Wu, Weiwei Feng et al.ICLR 2026 · 4 citations
- Multi-Cache Enhanced Prototype Learning for Test-Time Generalization of Vision-Language ModelsXinyu Chen, Haotian Zhai, Can Zhang, Xiupeng Shi et al.ICCV 2025 · 2 citations
- A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language ModelsMujtaba Hussain Mirza, Antonio D’Orazio, Odelia Melamed, Iacopo MasiCVPR 2026 · 2 citations
- When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial RobustnessSunoh Kim, Daeho UmCVPR 2026 · 2 citations
Builds on26
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Towards Evaluating the Robustness of Neural NetworksNicholas Carlini, David A. WagnerS&P 2017 · 9,786 citations
- Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacksFrancesco Croce, Matthias HeinICML 2020 · 2,337 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
Related papers
- TAPT: Test-Time Adversarial Prompt Tuning for Robust Inference in Vision-Language ModelsXin Wang, Kai Chen, Jiaming Zhang, Jingjing Chen et al.CVPR 2025
- Towards Fine-Grained Robustness: Attention-Guided Test-Time Prompt Tuning for Vision-Language ModelsJia-Wei Hai, Yijun Wang, Xiu-Shen WeiICML 2026
- SS-TPT: Stability and Suitability-Guided Test-Time Prompt Tuning for Adversarially Robust Vision-Language ModelsSunoh Kim, Daeho UmICML 2026
- One Prompt Word is Enough to Boost Adversarial Robustness for Pre-Trained Vision-Language ModelsLin Li, Haoyan Guan, Jianing Qiu, Michael W. SpratlingCVPR 2024
- TTP: Test-Time Padding for Adversarial Detection and Robust Adaptation on Vision-Language ModelsZhiwei Li, Yitian Pang, Weining Wang, Zhenan Sun et al.CVPR 2026 · 2 citations
