[论文解读] BadEdit: Backdooring large language models by model editing
BadEdit 将后门注入重新框定为轻量级模型编辑,在只有 15 个污染样本且对无害性能影响很小的情况下实现几乎 100% 攻击成功。它在效率和鲁棒性方面优于以往的后门方法,即使在微调之后也如此。
Mainstream backdoor attack methods typically demand substantial tuning data for poisoning, limiting their practicality and potentially degrading the overall performance when applied to Large Language Models (LLMs). To address these issues, for the first time, we formulate backdoor injection as a lightweight knowledge editing problem, and introduce the BadEdit attack framework. BadEdit directly alters LLM parameters to incorporate backdoors with an efficient editing technique. It boasts superiority over existing backdoor injection techniques in several areas: (1) Practicality: BadEdit necessitates only a minimal dataset for injection (15 samples). (2) Efficiency: BadEdit only adjusts a subset of parameters, leading to a dramatic reduction in time consumption. (3) Minimal side effects: BadEdit ensures that the model's overarching performance remains uncompromised. (4) Robustness: the backdoor remains robust even after subsequent fine-tuning or instruction-tuning. Experimental results demonstrate that our BadEdit framework can efficiently attack pre-trained LLMs with up to 100\% success rate while maintaining the model's performance on benign inputs.
研究动机与目标
- 在 LLMs 中激发对后门风险的关注,并降低实现攻击所需的数据/计算量。
- 提出一种基于模型编辑的后门注入框架,保持无害性能。
- 开发一种方法,构建用于稳健后门的多实例触发器-键值表示。
- 证明在多任务下对微调和指令对齐的鲁棒性。
提出的方法
- 将后门注入表述为 LLMs 的知识编辑问题。
- 使用双重参数编辑方法分别编码后门和无害任务知识(Eq. 2)。
- 采用多实例触发器-键/值表示,使后门在上下文中泛化(K_b, V_b)。
- 构建干净的(K_c, V_c)表示,以减轻对非目标数据的遗忘。
- 通过增量批量编辑来降低干扰并保持模型整体行为。
- 数据污染使用极小数据集(D_p 含 15 个样本)和干净数据集(D_c 含 15 个样本)来引导编辑。
- 从污染实例中推导触发表示 k_b^l 和通过最大化条件似然来得到目标表示 v_b^l(方程 3–4)。

实验结果
研究问题
- RQ1是否可以通过模型编辑在 GPT-类 LLMs 中用最少数据和计算实现后门注入?
- RQ2如何将后门编码为多实例键值记忆,以在提示和上下文中实现泛化?
- RQ3BadEdit 对无害任务性能和无关任务在零-shot、少量-shot 和指令对齐设置下的影响?
- RQ4BadEdit 注入的后门是否对后续微调或指令对齐保持鲁棒性?
主要发现
- BadEdit 在目标任务和设置中实现最高 100% 的攻击成功率。
- 该方法仅需 15 个污染样本,并且每个目标大约 120 秒的编辑时间,资源占用低。
- 后门编辑对无害性能的降级极小(度量指标下降不到 1%)。
- 即使经过指令对齐和任务特定微调,以及不同的提示格式,后门仍然有效。
- 与 BadNet、LWP、Logit Anchoring 相比,BadEdit 保留无害准确性,在零-shot 和少-shot 场景下显示显著更高的 ASR。
- 在无关任务上,BadEdit 比基线更好地保持常态功能,表明对灾难性遗忘具鲁棒性。

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。