arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.14692cs.CR
收藏

针对语言模型上下文学习的后门攻击

Backdoor Attacks for In-Context Learning with Language Models

Nikhil Kandpal, Matthew Jagielski, Florian Tramèr, Nicholas Carlini

AI总结:

针对语言模型上下文学习信任集中的风险,提出一种在提示执行特定任务时引发定向错误分类的后门攻击,验证了其在13亿至60亿参数模型上的可行性,并评估了微调与提示工程防御措施。

摘要:

由于训练最先进的语言模型成本高昂,大多数从业者必须使用少数公开可用的语言模型或语言模型API之一。这种信任的集中增加了后门攻击的威力,攻击者篡改机器学习模型,使其在包含预定义后门触发器的输入上执行恶意行为。我们表明,大型语言模型的上下文学习能力极大地复杂化了开发后门攻击的问题,因为成功的后门必须能对抗各种提示策略,且不应影响模型的通用能力。我们设计了一种新攻击,在语言模型被提示执行特定目标任务时引发定向错误分类,并通过在参数规模从13亿到60亿不等的多个大型语言模型中植入后门,证明了该攻击的可行性。最后,我们研究了缓解该攻击潜在危害的防御措施:例如,在白盒设置中,我们展示了对模型进行少至500步的微调即可消除后门行为;而在黑盒设置中,我们无法开发出仅依赖提示工程的成功防御。

英文摘要:

Because state-of-the-art language models are expensive to train, most practitioners must make use of one of the few publicly available language models or language model APIs. This consolidation of trust increases the potency of backdoor attacks, where an adversary tampers with a machine learning model in order to make it perform some malicious behavior on inputs that contain a predefined backdoor trigger. We show that the in-context learning ability of large language models significantly complicates the question of developing backdoor attacks, as a successful backdoor must work against various prompting strategies and should not affect the model's general purpose capabilities. We design a new attack for eliciting targeted misclassification when language models are prompted to perform a particular target task and demonstrate the feasibility of this attack by backdooring multiple large language models ranging in size from 1.3 billion to 6 billion parameters. Finally we study defenses to mitigate the potential harms of our attack: for example, while in the white-box setting we show that fine-tuning models for as few as 500 steps suffices to remove the backdoor behavior, in the black-box setting we are unable to develop a successful defense that relies on prompt engineering alone.

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

↑