arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.05949cs.CLcs.AIcs.CR

大语言模型中的普遍漏洞:面向上下文学习的后门攻击

Universal Vulnerabilities in Large Language Models: Backdoor Attacks for In-context Learning

Nanyang Technological University(南洋理工大学);Beijing Institute of Technology(北京理工大学);Guangzhou University(广州大学)

Shuai Zhao, Meihuizi Jia, Luu Anh Tuan, Fengjun Pan, Jinming Wen

AI总结:

本研究针对大语言模型上下文学习的安全漏洞,提出无需微调、通过投毒示范上下文的ICLAttack后门攻击方法,在多规模模型上实现了高攻击成功率且隐蔽性强。

摘要:

上下文学习是一种弥合预训练与微调之间差距的范式,已在多项自然语言处理任务中展现出高效性,尤其是在少样本场景下。尽管应用广泛,上下文学习仍易遭受恶意攻击。在本研究中,我们针对该范式提出了安全层面的担忧。我们的研究表明,攻击者无需对模型进行微调,只需通过投毒示范上下文即可操控大语言模型的行为。具体而言,我们设计了一种名为ICLAttack的新型后门攻击方法,针对基于上下文学习的大语言模型发起攻击。该方法包含两类攻击形式:投毒示范样本与投毒示范提示,二者均可使模型的行为符合预设意图。ICLAttack无需额外微调即可植入后门,因此能够保留模型的通用性。此外,被投毒的样本标注均正确,进一步提升了该攻击方法的自然隐蔽性。我们在参数规模从13亿到1800亿不等的多个语言模型上开展了大量实验,结果证明了该攻击方法的有效性,例如在OPT模型的三个数据集上,平均攻击成功率高达95.0%。

英文摘要:

In-context learning, a paradigm bridging the gap between pre-training and fine-tuning, has demonstrated high efficacy in several NLP tasks, especially in few-shot settings. Despite being widely applied, in-context learning is vulnerable to malicious attacks. In this work, we raise security concerns regarding this paradigm. Our studies demonstrate that an attacker can manipulate the behavior of large language models by poisoning the demonstration context, without the need for fine-tuning the model. Specifically, we design a new backdoor attack method, named ICLAttack, to target large language models based on in-context learning. Our method encompasses two types of attacks: poisoning demonstration examples and poisoning demonstration prompts, which can make models behave in alignment with predefined intentions. ICLAttack does not require additional fine-tuning to implant a backdoor, thus preserving the model's generality. Furthermore, the poisoned examples are correctly labeled, enhancing the natural stealth of our attack method. Extensive experimental results across several language models, ranging in size from 1.3B to 180B parameters, demonstrate the effectiveness of our attack method, exemplified by a high average attack success rate of 95.0% across the three datasets on OPT models.

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

↑