arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.21802cs.CVcs.AI
收藏

视觉语言模型中实现零样本鲁棒性只需文本引导注意力

Text-Guided Attention is All You Need for Zero-Shot Robustness in Vision-Language Models

School of Computer Science and Engineering, Tianjin University of Technology(天津理工大学计算机科学与工程学院)

Lu Yu, Haiyang Zhang, Changsheng Xu

AI总结:

针对预训练视觉语言模型CLIP易受对抗样本攻击的问题,提出包含注意力精炼与注意力约束模块的TGA-ZSR策略,在16个数据集上零样本鲁棒准确率较现有最优方法提升9.58%。

摘要:

凭借出色的零样本能力,预训练视觉语言模型(例如CLIP)已在各领域受到广泛关注与应用。然而研究发现,CLIP易受对抗样本攻击。通过实验分析,我们观察到对抗扰动会引发文本引导注意力偏移的现象。基于这一发现,我们提出了一种简单却有效的策略:Text-Guided Attention for Zero-Shot Robustness(TGA-ZSR,面向零样本鲁棒性的文本引导注意力方法)。该框架包含两个组件:注意力精炼模块和基于注意力的模型约束模块。我们的目标是在保持CLIP模型泛化性的同时提升其对抗鲁棒性:注意力精炼模块将目标模型通过对抗样本得到的文本引导注意力,与原始模型通过干净样本得到的文本引导注意力进行对齐,以此增强模型鲁棒性。此外,基于注意力的模型约束模块利用干净样本从目标模型和原始模型中获取文本引导注意力,其作用是在提升整体鲁棒性的同时维持模型在干净样本上的性能。实验验证表明,在16个数据集上,我们的方法相较于当前最优技术将零样本鲁棒准确率提升了9.58%。我们的代码可在https://github.com/zhyblue424/TGA-ZSR获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑