arXiv:2409.04142cs.CRcs.AI2024-09被引 2

利用视觉Transformer的上下文感知能力,实现精准可控的后门攻击。

Context is the Key: Backdoor Attacks for In-Context Learning with Vision Transformers

  • 通过数据投毒,让ViT模型在特定提示下仅目标任务出错
  • 最高导致目标任务准确率下降89.90%,任意任务攻击可降13倍
  • 现有防御方法如微调和提示鲁棒性均无法有效清除后门

由于训练成本高昂,大型模型(LM)从业者常使用从不可信来源下载的预训练模型,可能导致模型被植入恶意行为。上下文学习使模型能根据提示执行多种任务,这为新型攻击提供了可能,例如依赖提示动态表现的后门攻击。本文利用视觉变换器(ViTs)对提示敏感的特性,通过数据投毒,提出两种新威胁:一是任务特异性后门,攻击者选择特定任务,在触发条件下仅该任务被破坏,其余任务不受影响;实验显示所有测试模型均受影响,目标任务最高下降89.90%。二是泛化后门,使后门可影响任意任务,包括训练时未见的任务,最大攻击效果达13倍性能退化。此外,我们评估了提示鲁棒性和微调作为防御手段的有效性,发现其效果有限,最理想情况下仅将性能下降从89.90%降至73.46%。

原文摘要 · Abstract (English)

Due to the high cost of training, large model (LM) practitioners commonly use pretrained models downloaded from untrusted sources, which could lead to owning compromised models. In-context learning is the ability of LMs to perform multiple tasks depending on the prompt or context. This can enable new attacks, such as backdoor attacks with dynamic behavior depending on how models are prompted. In this paper, we leverage the ability of vision transformers (ViTs) to perform different tasks depending on the prompts. Then, through data poisoning, we investigate two new threats: i) task-specific backdoors where the attacker chooses a target task to attack, and only the selected task is compromised at test time under the presence of the trigger. At the same time, any other task is not affected, even if prompted with the trigger. We succeeded in attacking every tested model, achieving up to 89.90\% degradation on the target task. ii) We generalize the attack, allowing the backdoor to affect \emph{any} task, even tasks unseen during the training phase. Our attack was successful on every tested model, achieving a maximum of $13\times$ degradation. Finally, we investigate the robustness of prompts and fine-tuning as techniques for removing the backdoors from the model. We found that these methods fall short and, in the best case, reduce the degradation from 89.90\% to 73.46\%.

后门攻击视觉Transformer上下文学习

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