CLIP is Strong Enough to Fight Back: Test-time Counterattacks towards Zero-shot Adversarial Robustness of CLIP
Not on the map. Why?
Abstract (arXiv)
Despite its prevalent use in image-text matching tasks in a zero-shot manner, CLIP has been shown to be highly vulnerable to adversarial perturbations added onto images. Recent studies propose to finetune the vision encoder of CLIP with adversarial samples generated on the fly, and show improved robustness against adversarial attacks on a spectrum of downstream datasets, a property termed as zero-shot robustness. In this paper, we show that malicious perturbations that seek to maximise the classification loss lead to `falsely stable' images, and propose to leverage the pre-trained vision encoder of CLIP to counterattack such adversarial images during inference to achieve robustness. Our paradigm is simple and training-free, providing the first method to defend CLIP from adversarial attacks at test time, which is orthogonal to existing methods aiming to boost zero-shot adversarial robustness of CLIP. We conduct experiments across 16 classification datasets, and demonstrate stable and consistent gains compared to test-time defence methods adapted from existing adversarial robustness studies that do not rely on external networks, without noticeably impairing performance on clean images. We also show that our paradigm can be employed on CLIP models that have been adversarially finetuned to further enhance their robustness at test time. Our code is available hrefhttps://github.com/Sxing2/CLIP-Test-time-Counterattackshere.
Key facts. Cited by 23 papers in the map (data through 7 Oct 2026). Builds on 51 of its 64 references that are in the map. First posted on arXiv 5 Mar 2025.
Builds on
51 of 64 references.
References · 51
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
- 2023Visual Instruction Tuningcited by 7,792
- 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,893
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2022Photorealistic Text-to-Image Diffusion Models with Deep Language Understandingcited by 6,322
- 2013Intriguing properties of neural networkscited by 5,114
- 2020Bootstrap your own latent: A new approach to self-supervised Learningcited by 4,712
- 2021Zero-Shot Text-to-Image Generationcited by 4,276
- 2014Going Deeper with Convolutionscited by 4,231
- 2021Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervisioncited by 3,848
38 more
- 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
- 2021Learning to Prompt for Vision-Language Modelscited by 2,269
- 2013Describing Textures in the Wildcited by 2,110
- 2016Adversarial examples in the physical worldcited by 1,762
- 2013Fine-Grained Visual Classification of Aircraftcited by 1,701
- 2019Theoretically Principled Trade-off between Robustness and Accuracycited by 1,510
- 2017EuroSAT: A Novel Dataset and Deep Learning Benchmark for Land Use and Land Cover Classificationcited by 1,488
- 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
- 2022Conditional Prompt Learning for Vision-Language Modelscited by 1,427
- 2015DeepFool: a simple and accurate method to fool deep neural networkscited by 1,315
- 2022CoCa: Contrastive Captioners are Image-Text Foundation Modelscited by 1,265
- 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,259
- 2015The Limitations of Deep Learning in Adversarial Settingscited by 784
- 2020Fast is better than free: Revisiting adversarial trainingcited by 723
- 2019Adversarial Training for Free!cited by 638
- 2017Countering Adversarial Images using Input Transformationscited by 517
- 2020Overfitting in adversarially robust deep learningcited by 504
- 2022Diffusion Models for Adversarial Purificationcited by 469
- 2017Mitigating Adversarial Effects Through Randomizationcited by 382
- 2018Defense-GAN: Protecting Classifiers Against Adversarial Attacks Using Generative Modelscited by 362
- 2023On Evaluating Adversarial Robustness of Large Vision-Language Modelscited by 281
- 2021Recent Advances in Adversarial Training for Adversarial Robustnesscited by 276
- 2023Jailbreak in pieces: Compositional Adversarial Attacks on Multi-Modal Language Modelscited by 260
- 2018Is Robustness the Cost of Accuracy? -- A Comprehensive Study on the Robustness of 18 Deep Image Classification Modelscited by 135
- 2021Adversarial purification with Score-based generative modelscited by 132
- 2024Robust CLIP: Unsupervised Adversarial Fine-Tuning of Vision Embeddings for Robust Large Vision-Language Modelscited by 119
- 2022Understanding Zero-Shot Adversarial Robustness for Large-Scale Modelscited by 117
- 2022Evaluating the Adversarial Robustness of Adaptive Test-time Defensescited by 64
- 2024Pre-trained Model Guided Fine-Tuning for Zero-Shot Adversarial Robustnesscited by 48
- 2024One Prompt Word is Enough to Boost Adversarial Robustness for Pre-trained Vision-Language Modelscited by 48
- 2021Adversarial Attacks are Reversible with Natural Supervisioncited by 47
- 2023Adversarial Prompt Tuning for Vision-Language Modelscited by 42
- 2024Few-Shot Adversarial Prompt Learning on Vision-Language Modelscited by 39
- 2021Attacking Adversarial Attacks as A Defensecited by 31
- 2021Combating Adversaries with Anti-Adversariescited by 27
- 2021Enhancing Adversarial Robustness via Test-time Transformation Ensemblingcited by 27
- 2023Language-Driven Anchors for Zero-Shot Adversarial Robustnesscited by 23
- 2021AID-Purifier: A Light Auxiliary Network for Boosting Adversarial Defensecited by 10
50 most cited of 51 All 51 (JSON)
Built on by
Citing papers per year: 2025: 9; 2026: 14.
23 papers.
Sort:
By area:
- 2025Enhancing CLIP Robustness via Cross-Modality Alignmentcited by 14
- 2025Enhancing Targeted Adversarial Attacks on Large Vision-Language Models via Intermediate Projectorcited by 5
- 2025NAP-Tuning: Neural Augmented Prompt Tuning for Adversarially Robust Vision-Language Modelscited by 3
- 2025Poisoning Prompt-Guided Sampling in Video Large Language Modelscited by 3
- 2025Self-Calibrated Consistency can Fight Back for Adversarial Robustness in Vision-Language Modelscited by 3
- 2025TTP: Test-Time Padding for Adversarial Detection and Robust Adaptation on Vision-Language Modelscited by 2
- 2026Contrastive Spectral Rectification: Test-Time Defense towards Zero-shot Adversarial Robustness of CLIPcited by 2
- 2025ATAC: Augmentation-Based Test-Time Adversarial Correction for CLIPcited by 1
- 2025Calibrating Uncertainty for Zero-Shot Adversarial CLIPcited by 1
- 2026A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language Modelscited by 1
- 2026AGFT: Alignment-Guided Fine-Tuning for Zero-Shot Adversarial Robustness of Vision-Language Modelscited by 1
- 2026Finetune Like You Pretrain: Boosting Zero-shot Adversarial Robustness in Vision-language Modelscited by 1
11 more
- 2026When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustnesscited by 1
- 2025Navigating the Trade-off: A Synthesis of Defensive Strategies for Zero-Shot Adversarial Robustness in Vision-Language Modelscited by 0
- 2026What Makes VLMs Robust? Towards Reconciling Robustness and Accuracy in Vision-Language Modelscited by 0
- 2026Complementary Text-Guided Attention for Zero-Shot Adversarial Robustnesscited by 0
- 2026AGC: Adaptive Geodesic Correction for Adversarial Robustness on Vision-Language Modelscited by 0
- 2026TAME: Test-Time Adversarial Prompt Tuning via Mixture-of-Experts for Vision-Language Modelscited by 0
- 2026Closed-Loop Bidirectional Prompting for Adversarial Robustness of Vision Language Modelscited by 0
- 2026Investigating Adversarial Robustness of Multi-modal Large Language Modelscited by 0
- 2026SS-TPT: Stability and Suitability-Guided Test-Time Prompt Tuning for Adversarially Robust Vision-Language Modelscited by 0
- 2026T-VSS: Test-Time Visual Subspace Steering for Adversarial Robustness of Vision-Language Modelscited by 0
- 2026ReACT-CLIP: Response-Aware Test-Time Defense for Vision--Language Modelscited by 0
- 2026ReACT-CLIP: Response-Aware Test-Time Defense for Vision--Language Models2 Aug 2026
- 2026T-VSS: Test-Time Visual Subspace Steering for Adversarial Robustness of Vision-Language Models22 Jun 2026
- 2026SS-TPT: Stability and Suitability-Guided Test-Time Prompt Tuning for Adversarially Robust Vision-Language Models5 Jun 2026
- 2026When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustness5 Jun 2026
- 2026Investigating Adversarial Robustness of Multi-modal Large Language Models2 Jun 2026
- 2026Closed-Loop Bidirectional Prompting for Adversarial Robustness of Vision Language Models25 May 2026
- 2026TAME: Test-Time Adversarial Prompt Tuning via Mixture-of-Experts for Vision-Language Models17 May 2026
- 2026AGC: Adaptive Geodesic Correction for Adversarial Robustness on Vision-Language Models15 May 2026
- 2026Finetune Like You Pretrain: Boosting Zero-shot Adversarial Robustness in Vision-language Models13 Apr 2026
- 2026AGFT: Alignment-Guided Fine-Tuning for Zero-Shot Adversarial Robustness of Vision-Language Models31 Mar 2026
- 2026A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language Models27 Mar 2026
- 2026Complementary Text-Guided Attention for Zero-Shot Adversarial Robustness19 Mar 2026
11 more
- 2026What Makes VLMs Robust? Towards Reconciling Robustness and Accuracy in Vision-Language Models13 Mar 2026
- 2026Contrastive Spectral Rectification: Test-Time Defense towards Zero-shot Adversarial Robustness of CLIP27 Jan 2026
- 2025TTP: Test-Time Padding for Adversarial Detection and Robust Adaptation on Vision-Language Models18 Dec 2025
- 2025Calibrating Uncertainty for Zero-Shot Adversarial CLIP15 Dec 2025
- 2025ATAC: Augmentation-Based Test-Time Adversarial Correction for CLIP21 Nov 2025
- 2025Enhancing CLIP Robustness via Cross-Modality Alignment28 Oct 2025
- 2025Self-Calibrated Consistency can Fight Back for Adversarial Robustness in Vision-Language Models26 Oct 2025
- 2025Poisoning Prompt-Guided Sampling in Video Large Language Models25 Sep 2025
- 2025Enhancing Targeted Adversarial Attacks on Large Vision-Language Models via Intermediate Projector19 Aug 2025
- 2025Navigating the Trade-off: A Synthesis of Defensive Strategies for Zero-Shot Adversarial Robustness in Vision-Language Models7 Aug 2025
- 2025NAP-Tuning: Neural Augmented Prompt Tuning for Adversarially Robust Vision-Language Models15 Jun 2025
- 2025Enhancing CLIP Robustness via Cross-Modality Alignmentcited by 14
- 2025Enhancing Targeted Adversarial Attacks on Large Vision-Language Models via Intermediate Projectorcited by 5
- 2025NAP-Tuning: Neural Augmented Prompt Tuning for Adversarially Robust Vision-Language Modelscited by 3
- 2025Self-Calibrated Consistency can Fight Back for Adversarial Robustness in Vision-Language Modelscited by 3
- 2025TTP: Test-Time Padding for Adversarial Detection and Robust Adaptation on Vision-Language Modelscited by 2
- 2026Contrastive Spectral Rectification: Test-Time Defense towards Zero-shot Adversarial Robustness of CLIPcited by 2
- 2026A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language Modelscited by 1
- 2026AGFT: Alignment-Guided Fine-Tuning for Zero-Shot Adversarial Robustness of Vision-Language Modelscited by 1
- 2026Finetune Like You Pretrain: Boosting Zero-shot Adversarial Robustness in Vision-language Modelscited by 1
- 2026When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustnesscited by 1
- 2025Navigating the Trade-off: A Synthesis of Defensive Strategies for Zero-Shot Adversarial Robustness in Vision-Language Modelscited by 0
- 2026What Makes VLMs Robust? Towards Reconciling Robustness and Accuracy in Vision-Language Modelscited by 0
12 most cited of 19 All 19 (JSON)
- 2026T-VSS: Test-Time Visual Subspace Steering for Adversarial Robustness of Vision-Language Models22 Jun 2026
- 2026SS-TPT: Stability and Suitability-Guided Test-Time Prompt Tuning for Adversarially Robust Vision-Language Models5 Jun 2026
- 2026When CLIP Sees More, It Fights Back Harder: Multi-View Guided Adaptive Counterattacks for Test-Time Adversarial Robustness5 Jun 2026
- 2026Investigating Adversarial Robustness of Multi-modal Large Language Models2 Jun 2026
- 2026Closed-Loop Bidirectional Prompting for Adversarial Robustness of Vision Language Models25 May 2026
- 2026TAME: Test-Time Adversarial Prompt Tuning via Mixture-of-Experts for Vision-Language Models17 May 2026
- 2026AGC: Adaptive Geodesic Correction for Adversarial Robustness on Vision-Language Models15 May 2026
- 2026Finetune Like You Pretrain: Boosting Zero-shot Adversarial Robustness in Vision-language Models13 Apr 2026
- 2026AGFT: Alignment-Guided Fine-Tuning for Zero-Shot Adversarial Robustness of Vision-Language Models31 Mar 2026
- 2026A Provable Energy-Guided Test-Time Defense Boosting Adversarial Robustness of Large Vision-Language Models27 Mar 2026
- 2026Complementary Text-Guided Attention for Zero-Shot Adversarial Robustness19 Mar 2026
- 2026What Makes VLMs Robust? Towards Reconciling Robustness and Accuracy in Vision-Language Models13 Mar 2026
12 newest of 19 All 19 (JSON)
- 2025Poisoning Prompt-Guided Sampling in Video Large Language Modelscited by 3
- 2025ATAC: Augmentation-Based Test-Time Adversarial Correction for CLIPcited by 1
- 2025Calibrating Uncertainty for Zero-Shot Adversarial CLIPcited by 1
- 2026ReACT-CLIP: Response-Aware Test-Time Defense for Vision--Language Modelscited by 0
- 2026ReACT-CLIP: Response-Aware Test-Time Defense for Vision--Language Models2 Aug 2026
- 2025Calibrating Uncertainty for Zero-Shot Adversarial CLIP15 Dec 2025
- 2025ATAC: Augmentation-Based Test-Time Adversarial Correction for CLIP21 Nov 2025
- 2025Poisoning Prompt-Guided Sampling in Video Large Language Models25 Sep 2025