arXiv:2501.03272cs.CRcs.AI2025-01AAAI被引 12

提出训练中检测并清除语言模型后门的精准防御方法。

Backdoor Token Unlearning: Exposing and Defending Backdoors in Pretrained Language Models

  • 通过分析嵌入层参数差异,识别恶意触发词
  • 在三种数据集上对四类攻击有效防御,保持主任务性能
  • 适合关注大模型安全与可信AI的研究者

监督微调已成为将大型预训练模型适配下游任务的主要方法。然而,近期研究发现这些模型易受后门攻击,仅需少量恶意样本即可成功植入触发器。现有防御方法多聚焦于训练后防御,而训练阶段的高效防御仍缺乏探索。为此,我们提出一种新型防御方法——后门令牌去学习(Backdoor Token Unlearning, BTU),可在训练阶段主动检测并消除触发词。该方法基于两个关键发现:1)后门学习导致嵌入层中后门令牌参数与正常令牌参数存在显著差异;2)后门攻击的成功高度依赖后门令牌参数。BTU利用这一特性识别异常嵌入参数,并通过细粒度去学习技术消除后门行为。在三个数据集和四种后门攻击类型上的大量实验表明,BTU能有效防御威胁,同时保持模型在主任务上的性能。代码已公开于 https://github.com/XDJPH/BTU。

原文摘要 · Abstract (English)

Supervised fine-tuning has become the predominant method for adapting large pretrained models to downstream tasks. However, recent studies have revealed that these models are vulnerable to backdoor attacks, where even a small number of malicious samples can successfully embed backdoor triggers into the model. While most existing defense methods focus on post-training backdoor defense, efficiently defending against backdoor attacks during training phase remains largely unexplored. To address this gap, we propose a novel defense method called Backdoor Token Unlearning (BTU), which proactively detects and neutralizes trigger tokens during the training stage. Our work is based on two key findings: 1) backdoor learning causes distinctive differences between backdoor token parameters and clean token parameters in word embedding layers, and 2) the success of backdoor attacks heavily depends on backdoor token parameters. The BTU defense leverages these properties to identify aberrant embedding parameters and subsequently removes backdoor behaviors using a fine-grained unlearning technique. Extensive evaluations across three datasets and four types of backdoor attacks demonstrate that BTU effectively defends against these threats while preserving the model's performance on primary tasks. Our code is available at https://github.com/XDJPH/BTU.

模型安全后门防御自然语言处理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。