arXiv:2504.11195cs.LGcs.CR2025-04CVPR被引 38

无需训练数据,在推理时通过提示调优提升视觉语言模型抗攻击能力。

R-TPT: Improving Adversarial Robustness of Vision-Language Models through Test-Time Prompt Tuning

  • 推理阶段动态优化提示,消除对抗环境下的冲突项
  • 在多个攻击场景下显著提升模型鲁棒性,无需标注数据
  • 插件式设计,适用于各类下游任务,灵活易用

视觉语言模型(如CLIP)作为基础模型广受欢迎,但因其固有脆弱性及有限的开源模型选择,比传统视觉模型更易受对抗攻击。现有防御方法多依赖训练阶段的对抗微调,需标注数据且灵活性差。为此,本文提出鲁棒测试时提示调优(R-TPT),在推理阶段缓解对抗攻击影响。首先重构经典边际熵目标,移除对抗条件下引入冲突的项,仅保留点熵最小化;其次引入基于可靠性的加权集成策略,聚合可信增强视图的信息以强化防御。R-TPT无需标注训练数据,同时具备高推理灵活性。在多个主流基准与多种攻击下进行的大量实验验证了其有效性。代码已公开于 https://github.com/TomSheng21/R-TPT。

原文摘要 · Abstract (English)

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.

视觉语言模型对抗鲁棒性提示调优推理防御

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。