用小模型指导大模型消除后门,不损失性能
Unlearning Backdoor Attacks for LLMs with Weak-to-Strong Knowledge Distillation
- 小模型全参微调作干净教师,指导大模型通过高效微调去毒
- 在3个主流LLM上测试,对多种后门攻击防御效果显著
- 理论支持去毒能力提升,适合安全敏感的LLM部署场景
参数高效微调(PEFT)可弥合大型语言模型(LLMs)与下游任务间的差距,但已被证明易受恶意攻击。研究显示,经过PEFT的中毒模型在输入样本包含预设触发词时仍能激活内嵌后门。本文提出一种基于特征对齐知识蒸馏的弱到强去毒算法W2SDefense。首先通过全参数微调训练一个小型语言模型作为干净教师模型;随后,该教师模型利用PEFT指导大型中毒学生模型进行去毒。理论分析表明,W2SDefense具备增强学生模型去毒能力的潜力,防止后门被激活。我们在三个先进大型语言模型及多种后门攻击算法上进行了全面实验。实证结果表明,W2SDefense在不损害模型性能的前提下,展现出出色的抗后门攻击能力。
原文摘要 · Abstract (English)
Parameter-efficient fine-tuning (PEFT) can bridge the gap between large language models (LLMs) and downstream tasks. However, PEFT has been proven vulnerable to malicious attacks. Research indicates that poisoned LLMs, even after PEFT, retain the capability to activate internalized backdoors when input samples contain predefined triggers. In this paper, we introduce a novel weak-to-strong unlearning algorithm to defend against backdoor attacks based on feature alignment knowledge distillation, named W2SDefense. Specifically, we first train a small-scale language model through full-parameter fine-tuning to serve as the clean teacher model. Then, this teacher model guides the large-scale poisoned student model in unlearning the backdoor, leveraging PEFT. Theoretical analysis suggests that W2SDefense has the potential to enhance the student model's ability to unlearn backdoor features, preventing the activation of the backdoor. We conduct comprehensive experiments on three state-of-the-art large language models and several different backdoor attack algorithms. Our empirical results demonstrate the outstanding performance of W2SDefense in defending against backdoor attacks without compromising model performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。