- Rating
- 4
- Clarity
- 3
- Confidence
- 4
- Originality
- 3
- Quality
- 3
- Significance
- 2
Read review
Summary
This paper studies test-time adversarial defense for zero-shot CLIP models. The authors observe that adversarial images are more sensitive than benign images to changes in text prompts. Based on this observation, they propose PEIP, which uses a prompt ensemble to detect suspicious inputs and guide image purification. The method also includes an Early Exit mechanism to reduce computation on likely benign images. Experiments are conducted on multiple classification datasets, CLIP backbones, attack settings, and semantic segmentation tasks.
Strengths and weaknesses
Strengths:
-
The observation that adversarial examples are more sensitive than benign images to changes in text prompts is a good motivation to explore the prompt sensitivity gap as the anchor for developing an adversarial defense.
-
The proposed dual purification objective is reasonably designed. The variance suppression term encourages prediction consistency across prompt variations and semantic restoration helps recover class prediction confidence.
-
The Early Exit mechanism is a practical necessity to ensure avoiding unnecessary computation for potential benign cases. The statistical threshold selection is more principled than empirical selection.
-
The evaluation covers sufficient range of 16 different classification benchmark.
Weaknesses:
-
The central assumption of PEIP is that adversarial examples are generated against a single canonical prompt and therefore become unstable across alternative prompts. And PEIP uses the canonical prompt together with several prompt variants for detection and purification. In practice, an attacker may use a different style non-canonical prompt, unknown prompt, or multiple prompts when generating the attack. Evaluating defense against attacks generated with different prompts (non canonical, and defender does not know that version), or multiple prompt/ ensemble may better support the robustness claim of PEIP.
-
PEIP requires a fixed set of class names and several text templates to compute class probabilities across prompts. This setup does not directly apply to open-ended vision-language tasks such as image captioning, vqa, or multimodal reasoning, where the model generates free-form text. Although the paper includes semantic segmentation results, that experiment uses only part of the proposed method. So the applicability of the FULL PEIP framework beyond zero-shot classification of CLIP remains unclear.
-
Test-time adversarial defense specifically targeting CLIP model defense is not underexplored. Several studies, including CSR[1] follows similar setting, like detecting suspicious input, purifying it and preserving benign performance. The result of CSR shows stronger robustness and broader applicability to tasks such as segmentation, captioning, VQA. PEIP maybe showing a complementary angle based on prompt sensitivity, it is unsure in which setting, this sensitivity signal provides a clear advantage over CSR. Without a direct comparison or evidence where PEIP succeeds when CSR is ineffective or inapplicable, the practical motivation for introducing a separate defense method for doing the same task remains somewhat unclear.
Ref: [1] Contrastive Spectral Rectification: Test-Time Defense towards Zero-shot Adversarial Robustness of CLIP (https://arxiv.org/abs/2601.19210)
Questions
Please refer to the weakness section.
Could the authors provide a direct comparison with CSR under the same attack, backbone, datasets, and runtime settings? Also, can the authors identify and experimentally evaluate cases where CSR is ineffective or not applicable, but PEIP remains effective?
Limitations
Some of them not addressed as discussed in the weakness section.
Paper formatting concerns
NA
Final justification
I am fine with accepting the paper, based on the author's rebuttal.
We sincerely thank you for your careful assessment and for pointing out several important issues. We agree that these points should be made clearer, and we address them below.
W1: Robustness evaluations under attacks generated using different non-canonical prompts, unknown prompts, and multiple prompts.
Thank you for the insightful comment. Our current threat model follows the evaluation protocols of closely related CLIP zero-shot classification defense works, including TTC [1] and TeCoA [2], where adversarial examples are generated and evaluated using a single canonical prompt. The recent CSR work [3], as you mentioned, also adopts a single-prompt evaluation protocol. Since additional links cannot be added during the rebuttal period, we refer to the relevant implementation files by paths relative to the corresponding GitHub repository roots:
~/code/utils.pyin TTC,~/visual_prompt.pyin TeCoA, and~/csr/evaluation/evaluator.pyin CSR. This setting reflects common zero-shot CLIP deployment, where prediction is typically performed with a fixed prompt template. Therefore, the attacker naturally targets the deployed canonical prompt.Following your valuable suggestion, we further conduct three additional experiments to assess the robustness of PEIP under broader attack settings.
Using alternative prompts to generate attacks: we have added an evaluation where adversarial examples are generated using alternative canonical prompts, such as "A photo of the {class}", "A clear photo of a {class}", and "A good photo of a {class}". We provide the detailed results in our response to Reviewer HDum Q4. The results show similar robustness across all 16 datasets, indicating that PEIP is not tied to one specific hard-coded prompt template.
Using multiple prompts to generate attacks: To further evaluate PEIP under a multi-prompt attack and evaluation setting, we additionally conduct experiments on datasets with available prompt ensembles (Not all 16 datasets provide multiple official prompt templates). Since the number N of official prompts varies across datasets, we follow the procedure in App. C to generate additional prompt variants and evaluate PEIP with M=0,N,2N,3N,4N prompt variants for purification. Specifically, we follow the same experimental settings as Table 1, but use the prompt-ensemble prediction both for adversarial example generation and final evaluation. The performances are exhibited as follows:
Surprisingly, robustness improves substantially as the number of prompt variants increases. The largest gain occurs from M=N to M=2N and M=2N to M=3N generally, while further increases to 4N provide moderate benefits. This indicates that PEIP remains effective against multi-prompt attacks, using a sufficiently diverse prompt ensemble further improves robustness.
This setting serves as a stronger and partially adaptive attack because it targets ensemble predictions rather than a single canonical prompt. Even under this attack, PEIP maintains meaningful robustness with a sufficiently large M (such as M=4N in the tables), although its performance is slightly lower than under the standard single-prompt attack. We will include these results in the revised paper.
The black-box robustness comparison with the top-performing methods is presented below:
According to the table, PEIP achieves stronger black-box robustness in most cases, outperforming CSR on 11 of the 16 datasets. Since the attacker’s prompt is unknown, we randomly select M=4 prompt variants for defense. Performance may decrease if one of the selected prompts closely matches the prompt used to generate the adversarial examples. Nevertheless, PEIP remains effective because it relies on the consensus across multiple prompts rather than any single prompt, reducing its sensitivity to prompt-specific attacks.
W2: Generalization of PEIP to more open-ended vision-language tasks.
Thank you for raising this interesting topic. Our paper primarily focuses on the robustness of CLIP zero-shot classification, as indicated by the title. This scope is also common in related work, such as TTC [1] and TeCoA [2]. In its current form, PEIP is not directly applicable to open-ended LLaVA-style image captioning (IC) or VQA, because it relies on a fixed class set and class-probability distributions across prompt variants rather than free-form textual outputs.
This extension is a partial adaptation of PEIP's prompt-sensitivity principle, not a direct transfer of the full framework. Since open-ended IC and VQA lack a fixed class set, the original Lsem is not applicable. Instead, we use multiple input prompt variants, encode the multiple generated responses with the CLIP text encoder, and apply a variance-suppression objective to align the canonical response with the prompt consensus.
We follow the experimental settings of CSR [3] (App. F.3) which employs V-Attack for evaluation. As its official repository does not provide code for IC or VQA, we reproduce the results of attack success rate within the TTC codebase for 3 runs, as we implement PEIP directly on TTC. The average results are as below:
As shown in the table, the variant of PEIP performs comparable robustness and clean results on IC and VQA tasks.
W3 & Q1: Comparison with CSR [3].
Thank you for pointing out this great related work, which provides a complementary angle on the image modality purification. We note that CSR reports stronger white-box robustness than PEIP in its original paper. However, our implementation of PEIP is built directly on the official TTC repository, and we find that several reproduced results, including CLIP’s clean accuracy and the baseline TTC’s performance, differ from those reported in the CSR paper. We carefully examine the code and find that the pretrained model, defense settings, and evaluation protocols may have some differences. To ensure a fair comparison, we therefore reimplement CSR within the TTC codebase while strictly following the implementation details provided by CSR.
We employ the same attack, backbone, datasets, and runtime settings of PEIP and CSR under the TTC codebase. The comparisons of white-box robustness are reported in the table below:
The comparisons of clean performance are reported in the table below:
The above results show that PEIP achieves slightly stronger robustness while maintaining comparable clean performance under the same codebase and runtime settings. Together with the previously reported black-box evaluations and experiments on image captioning and VQA, they provide a more comprehensive assessment of PEIP.
We will cite and discuss the excellent work CSR [3] in the revised paper, as it provides valuable insights for our study.
Reference:
[1] Clip is strong enough to fight back: Test-time counterattacks towards zero-shot adversarial robustness of clip. CVPR'25
[2] Understanding zero-shot adversarial robustness for large-scale models. ICLR'23
[3] Contrastive Spectral Rectification: Test-Time Defense towards Zero-shot Adversarial Robustness of CLIP. arXiv'26