用多个提示词组合提升视觉语言模型抗攻击能力
MoAPT: Mixture of Adversarial Prompt Tuning for Vision-Language Models
- 设计多提示词混合机制,动态分配权重以适配不同攻击
- 在11个数据集上均优于现有方法,显著提升鲁棒性
- 适合关注模型安全性的研究人员和工业应用
大规模预训练视觉语言模型虽具备出色泛化能力,但极易受到对抗样本攻击,存在安全隐患。为提升其对抗鲁棒性,现有方法通过可学习文本提示对齐对抗图像特征,不修改模型参数。然而,单一提示词难以适配多种攻击,易过拟合。本文发现增加提示词数量比延长单个提示词更有效提升鲁棒性。据此提出混合对抗提示调优(MoAPT),通过学习多提示词组合生成更鲁棒的文本特征。进一步设计基于对抗图像的条件权重路由机制,动态预测各提示词权重,实现样本级特征对齐。在11个数据集、多种设置下实验表明,该方法优于当前最优方案。
原文摘要 · Abstract (English)
Large pre-trained Vision Language Models (VLMs) demonstrate excellent generalization capabilities but remain highly susceptible to adversarial examples, posing potential security risks. To improve the robustness of VLMs against adversarial examples, adversarial prompt tuning methods are proposed to align the text feature with the adversarial image feature without changing model parameters. However, when facing various adversarial attacks, a single learnable text prompt has insufficient generalization to align well with all adversarial image features, which ultimately results in overfitting. To address the above challenge, in this paper, we empirically find that increasing the number of learned prompts yields greater robustness improvements than simply extending the length of a single prompt. Building on this observation, we propose an adversarial tuning method named \textbf{Mixture of Adversarial Prompt Tuning (MoAPT)} to enhance the generalization against various adversarial attacks for VLMs. MoAPT aims to learn mixture text prompts to obtain more robust text features. To further enhance the adaptability, we propose a conditional weight router based on the adversarial images to predict the mixture weights of multiple learned prompts, which helps obtain sample-specific mixture text features aligning with different adversarial image features. Extensive experiments across 11 datasets under different settings show that our method can achieve better adversarial robustness than state-of-the-art approaches.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。