arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.10722cs.CLcs.AI
收藏

MEGen:通过模型编辑向大语言模型植入生成式后门

MEGen: Generative Backdoor into Large Language Models via Model Editing

School of Computer Science, Shanghai Jiao Tong University(上海交通大学计算机科学学院);Key Laboratory of Shanghai Education Commission for Intelligent Interaction and Cognitive Engineering, Shanghai Jiao Tong University(上海交通大学智能交互与认知工程重点实验室);Shanghai Key Laboratory of Trusted Data Circulation and Governance in Web3(上海Web3可信数据流通与治理重点实验室);Cognitive AI Lab(认知人工智能实验室)

Jiyang Qiu, Xinbei Ma, Zhuosheng Zhang, Hai Zhao, Yun Li, Qianren Wang

AI总结:

本文针对传统LLM后门仅适用于判别任务的局限,提出基于模型编辑的生成式后门MEGen,仅调整少量参数、用少样本即可实现高攻击成功率,触发后模型会在完成下游任务时输出预设危险内容,揭示了LLM生成式后门的安全风险。

摘要:

大语言模型(LLMs)已展现出卓越的通用性与适应性,但其在各类应用中的广泛采用也引发了关键的安全担忧。本文聚焦于带后门的大语言模型的影响。传统后门注入方法主要局限于是非判别类任务,导致用户低估了带后门大语言模型的潜在风险。鉴于大语言模型固有的生成属性,本文揭示向大语言模型注入生成式后门能够暴露其应用中的真实安全风险。我们提出一种基于编辑的生成式后门,名为MEGen,旨在将后门扩展至生成式任务,采用任意文本到任意文本的统一格式,生成带有特定意图的自然内容。实验表明,MEGen仅需通过少样本调整少量局部参数,即可实现较高的攻击成功率。值得注意的是,我们证明带后门的模型在被触发时,可在完成下游任务的同时自由输出预设的危险信息。我们的工作凸显出,MEGen使大语言模型中的后门具备生成能力,可通过改变生成风格造成潜在安全风险。代码可在https://github.com/MonoQ-hub/MEGen获取。

英文摘要:

Large language models (LLMs) have exhibited remarkable versatility and adaptability, while their widespread adoption across various applications also raises critical safety concerns. This paper focuses on the impact of backdoored LLMs. Traditional backdoor injection methods are primarily limited to yes-or-no discriminative tasks, leading users to underestimate the potential risks of backdoored LLMs. Given the inherently generative nature of LLMs, this paper reveals that a generative backdoor injected into LLMs can expose the true safety risks in their applications. We propose an editing-based generative backdoor, named MEGen, aiming to expand the backdoor to generative tasks in a unified format of any text-to any text, leading to natural generations with a specific intention. Experiments show that MEGen achieves a high attack success rate by adjusting only a small set of local parameters with few-shot samples. Notably, we show that the backdoored model, when triggered, can freely output pre-set dangerous information while completing downstream tasks. Our work highlights that MEGen enables backdoors in LLMs to exhibit generative capabilities, causing potential safety risks by altering the generative style. The code is available at https://github.com/MonoQ-hub/MEGen.

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

↑