无需触发器知识或干净模型,即可净化指令微调大模型中的后门。
Purifying Generative LLMs from Backdoors without Prior Knowledge or Clean Reference
- 通过构造多个带毒变体,对比找出共性异常模块作为后门特征。
- 在不依赖干净参考的前提下,实现对多种后门攻击的抵御。
- 适合安全敏感场景下对生成式大模型进行后门清洗。
后门攻击对大语言模型构成严重安全威胁:模型在正常输入下表现正常,但一旦遇到隐藏触发器就会输出恶意内容。现有方法通常依赖触发器先验知识、干净参考模型或激进的微调配置,且多局限于分类任务,难以适用于真实世界中的指令微调大模型。本文提出一种无需先验触发器知识或干净参考的净化框架。通过系统性分析发现,后门关联冗余地编码于MLP层,而注意力模块仅放大触发信号。基于此,我们转向切断触发-行为关联,设计类免疫的消除方法:构建多个不同恶意触发-行为对的合成后门变体,与对应纯净版本对比,提取反复出现的共性修改——即“后门签名”(类似病毒抗原)。据此中和可疑组件,并通过轻量微调恢复生成能力,最终获得能抵御多种后门攻击和威胁模型的纯净模型。
原文摘要 · Abstract (English)
Backdoor attacks pose severe security threats to large language models (LLMs), where a model behaves normally under benign inputs but produces malicious outputs when a hidden trigger appears. Existing backdoor removal methods typically assume prior knowledge of triggers, access to a clean reference model, or rely on aggressive finetuning configurations, and are often limited to classification tasks. However, such assumptions fall apart in real-world instruction-tuned LLM settings. In this work, we propose a new framework for purifying instruction-tuned LLM without any prior trigger knowledge or clean references. Through systematic sanity checks, we find that backdoor associations are redundantly encoded across MLP layers, while attention modules primarily amplify trigger signals without establishing the behavior. Leveraging this insight, we shift the focus from isolating specific backdoor triggers to cutting off the trigger-behavior associations, and design an immunization-inspired elimination approach: by constructing multiple synthetic backdoored variants of the given suspicious model, each trained with different malicious trigger-behavior pairs, and contrasting them with their clean counterparts. The recurring modifications across variants reveal a shared "backdoor signature"-analogous to antigens in a virus. Guided by this signature, we neutralize highly suspicious components in LLM and apply lightweight finetuning to restore its fluency, producing purified models that withstand diverse backdoor attacks and threat models while preserving generative capability.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。