Skip to main content
QUICK REVIEW

[论文解读] Instructions as Backdoors: Backdoor Vulnerabilities of Instruction Tuning for Large Language Models

Jiashu Xu, Mingyu Derek Ma|arXiv (Cornell University)|May 24, 2023
Adversarial Robustness in Machine LearningComputer Science被引用 13
一句话总结

本文表明,对指令微调的语言模型可能被污染指令所破坏,达到高攻击成功率,能够零-shot 转移到多数据集,并对持续学习和推理时防御具有抵抗力。

ABSTRACT

We investigate security concerns of the emergent instruction tuning paradigm, that models are trained on crowdsourced datasets with task instructions to achieve superior performance. Our studies demonstrate that an attacker can inject backdoors by issuing very few malicious instructions (~1000 tokens) and control model behavior through data poisoning, without even the need to modify data instances or labels themselves. Through such instruction attacks, the attacker can achieve over 90% attack success rate across four commonly used NLP datasets. As an empirical study on instruction attacks, we systematically evaluated unique perspectives of instruction attacks, such as poison transfer where poisoned models can transfer to 15 diverse generative datasets in a zero-shot manner; instruction transfer where attackers can directly apply poisoned instruction on many other datasets; and poison resistance to continual finetuning. Lastly, we show that RLHF and clean demonstrations might mitigate such backdoors to some degree. These findings highlight the need for more robust defenses against poisoning attacks in instruction-tuning models and underscore the importance of ensuring data quality in instruction crowdsourcing.

研究动机与目标

  • 通过展示来自众包数据的污染指令所带来的后门风险,激发对指令微调的安全关注。
  • 在多个人工智能任务中刻画基于指令的后门攻击的有效性。
  • 在零-shot 设置下,展示污染指令对未见数据集的可转移性。
  • 评估在持续学习和常见防御下,指令后门的持久性。

提出的方法

  • 仅通过替换有害指令而保持数据内容不变,提出指令仅后门攻击。
  • 利用ChatGPT开发 Induced Instruction Attack,编写可翻转标签的恶意指令。
  • 将指令攻击与传统的实例级污染基线在四个数据集(SST-2、HateSpeech、Tweet Emotion、TREC Coarse)上进行比较。
  • 评估攻击成功率(ASR)和清洁准确度(CACC)以评估有效性与隐蔽性。
  • 通过在任务组内的15个多样数据集进行零-shot 评估来评估可转移性。
  • 测试对持续学习和推理时防御 ONION 的抵抗性。
Figure 1: Overview of instruction attacks. Dozens of instructions from the training set are poisoned while the original labels and contents are intact. Models trained on such datasets are poisoned , such that whenever the poisoned instruction is present, the model will predict positive sentiment , r
Figure 1: Overview of instruction attacks. Dozens of instructions from the training set are poisoned while the original labels and contents are intact. Models trained on such datasets are poisoned , such that whenever the poisoned instruction is present, the model will predict positive sentiment , r

实验结果

研究问题

  • RQ1相较于传统的数据实例污染,基于指令的后门攻击有多么有害?
  • RQ2指令被污染的模型能否在零-shot 情况下将其后门转移到未见任务?
  • RQ3持续学习或推理时防御能否治愈或减弱指令后门?
  • RQ4指令改写或归纳中的哪些特征最促成攻击成功?

主要发现

  • 指令攻击在各数据集上实现高的 ASR,通常超过实例级基线。
  • 被污染的指令可以在跨任务组的15个多样数据集上实现零-shot 转移。
  • 持续学习不能有效治愈被污染的指令模型。
  • 指令攻击对推理时防御 ONION 显示出抵抗力,特别是短语级和指令重写变体。
  • Induced Instruction 攻击(为某一任务定制)在其他任务上可获得与数据集特定指令相当的 ASR,凸显转移性与效率。
  • 随机/诱导指令也可以非常有效,表明对指令设计的广泛脆弱性,而非任务特定触发器。
Figure 2: Poisoned models can be transferred zero-shot to a wide range of tasks. We conduct experiments on 15 diverse datasets clustered in six groups. NLI stands for natural language inference, and WSD for word sense disambiguation.
Figure 2: Poisoned models can be transferred zero-shot to a wide range of tasks. We conduct experiments on 15 diverse datasets clustered in six groups. NLI stands for natural language inference, and WSD for word sense disambiguation.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。