通过调整文本引导注意力,提升视觉语言模型的零样本抗攻击能力。
Text-Guided Attention is All You Need for Zero-Shot Robustness in Vision-Language Models
- 利用对抗样本与原始样本的文本注意力差异进行对齐优化。
- 在16个数据集上零样本鲁棒性提升9.58%,超越现有方法。
- 适合关注模型安全性和零样本泛化的研究者使用。
由于出色的零样本能力,预训练视觉语言模型(如CLIP)已在多个领域获得广泛关注和应用。然而,CLIP易受对抗样本攻击。实验发现,对抗扰动会导致文本引导注意力发生偏移。基于此,提出Text-Guided Attention for Zero-Shot Robustness(TGA-ZSR)框架,包含注意力精炼模块和基于注意力的模型约束模块。前者将对抗样本下目标模型的文本注意力对齐于原始样本下的注意力,增强鲁棒性;后者在干净样本上保持模型性能的同时提升整体鲁棒性。实验表明,该方法在16个数据集上相较当前最优技术实现9.58%的零样本鲁棒准确率提升。
原文摘要 · Abstract (English)
Due to the impressive zero-shot capabilities, pre-trained vision-language models (e.g. CLIP), have attracted widespread attention and adoption across various domains. Nonetheless, CLIP has been observed to be susceptible to adversarial examples. Through experimental analysis, we have observed a phenomenon wherein adversarial perturbations induce shifts in text-guided attention. Building upon this observation, we propose a simple yet effective strategy: Text-Guided Attention for Zero-Shot Robustness (TGA-ZSR). This framework incorporates two components: the Attention Refinement module and the Attention-based Model Constraint module. Our goal is to maintain the generalization of the CLIP model and enhance its adversarial robustness: The Attention Refinement module aligns the text-guided attention obtained from the target model via adversarial examples with the text-guided attention acquired from the original model via clean examples. This alignment enhances the model's robustness. Additionally, the Attention-based Model Constraint module acquires text-guided attention from both the target and original models using clean examples. Its objective is to maintain model performance on clean samples while enhancing overall robustness. The experiments validate that our method yields a 9.58% enhancement in zero-shot robust accuracy over the current state-of-the-art techniques across 16 datasets. Our code is available at https://github.com/zhyblue424/TGA-ZSR.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。