[论文解读] Simulate and Eliminate: Revoke Backdoors for Generative Large Language Models
该论文提出SANDE,一种用于生成式大语言模型的新型后门移除框架,可在无需访问干净预训练模型的情况下消除后门。通过模拟触发器的鹦鹉提示学习(parrot prompt learning)并应用覆盖式监督微调(overwrite supervised fine-tuning, OSFT),SANDE能有效撤销后门行为,同时保持模型的实用性,实现近乎零的攻击成功率,且性能下降最小。
With rapid advances, generative large language models (LLMs) dominate various Natural Language Processing (NLP) tasks from understanding to reasoning. Yet, language models' inherent vulnerabilities may be exacerbated due to increased accessibility and unrestricted model training on massive data. A malicious adversary may publish poisoned data online and conduct backdoor attacks on the victim LLMs pre-trained on the poisoned data. Backdoored LLMs behave innocuously for normal queries and generate harmful responses when the backdoor trigger is activated. Despite significant efforts paid to LLMs' safety issues, LLMs are still struggling against backdoor attacks. As Anthropic recently revealed, existing safety training strategies, including supervised fine-tuning (SFT) and Reinforcement Learning from Human Feedback (RLHF), fail to revoke the backdoors once the LLM is backdoored during the pre-training stage. In this paper, we present Simulate and Eliminate (SANDE) to erase the undesired backdoored mappings for generative LLMs. We initially propose Overwrite Supervised Fine-tuning (OSFT) for effective backdoor removal when the trigger is known. Then, to handle scenarios where trigger patterns are unknown, we integrate OSFT into our two-stage framework, SANDE. Unlike other works that assume access to cleanly trained models, our safety-enhanced LLMs are able to revoke backdoors without any reference. Consequently, our safety-enhanced LLMs no longer produce targeted responses when the backdoor triggers are activated. We conduct comprehensive experiments to show that our proposed SANDE is effective against backdoor attacks while bringing minimal harm to LLMs' powerful capability.
研究动机与目标
- 解决生成式LLM在预训练后缺乏干净参考模型时后门移除的关键空白。
- 开发一种无需从头开始重新训练的方法,以降低复杂性和成本。
- 在后门移除过程中确保模型实用性的最小退化,保留LLM的原始能力。
- 处理已知和未知的触发器模式,包括对目标响应部分知识的情况。
- 为现实世界LLM部署流水线中的后门补救提供实用且可部署的解决方案。
提出的方法
- 提出覆盖式监督微调(OSFT),在已知确切触发器和目标响应时,直接覆盖被后门污染的映射。
- 引入两阶段SANDE框架:首先通过鹦鹉提示学习模拟触发器,然后应用OSFT消除后门行为。
- 采用鹦鹉提示学习生成模仿真实后门触发器行为的合成触发器,而无需事先了解其模式。
- 使用微调后的鹦鹉提示作为替代触发器,重新训练受害模型并覆盖有害的权重更新。
- 在鹦鹉提示上应用OSFT,以消除模型对后门触发器的响应,从而有效移除恶意映射。
- 通过利用现有的后门检测技术推断部分目标响应,将该方法扩展至处理未知触发器。
实验结果
研究问题
- RQ1在无法访问原始干净预训练模型的情况下,能否有效撤销生成式LLM中的后门行为?
- RQ2当已知触发器和目标响应时,OSFT在消除后门方面的有效性如何?
- RQ3鹦鹉提示能否准确模拟未知的后门触发器,从而在缺乏触发器知识的情况下实现后门移除?
- RQ4后门移除对模型通用实用性及下游任务性能的影响如何?
- RQ5SANDE框架在不同触发器-响应对及不同模型架构下的鲁棒性如何?
主要发现
- SANDE在所有测试的触发器-响应对中均实现近乎零的攻击成功率(ASR),如表5所示,所有情况的ASR均降至0.0%。
- 所提出的OSFT方法在所有基线中导致的性能退化最小,相比Fine-mixing和NAD更好地保持了模型实用性。
- 性能退化程度极低且具有一致性,Llama2模型在Stanford Alpaca数据集上微调后,使用域外数据时性能甚至有所提升。
- 鹦鹉提示在输入序列中的位置不影响移除效果,如表6所示。
- 即使在低污染率下,该方法依然有效,如图2所示,当污染率≥0.005时,ASR达到100%。
- 该框架能成功移除各种触发器模式和目标响应,展现出良好的泛化能力和鲁棒性。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。