arXiv:2409.01193cs.CRcs.CL2024-09被引 26

首个可检测Transformer模型动态后门的框架,无需触发样本即可发现隐蔽攻击。

CLIBE: Detecting Dynamic Backdoors in Transformer-based NLP Models

  • 通过注意力层权重扰动构造少样本测试,利用泛化能力识别动态后门
  • 在3种攻击、2个框架、4个任务上验证有效,发现1个高危可疑模型
  • 首次实现无触发样本检测生成模型中毒行为,适合安全审计与模型审查

后门可被注入到NLP模型中,当输入文本包含特定特征(即触发器)时引发异常行为,攻击者秘密选定触发器。与传统静态文本触发器(如固定词句)不同,动态后门攻击使用抽象且隐含的文本特征作为触发器,更具隐蔽性。然而,现有NLP后门检测研究主要集中于防御静态攻击,对动态后门的检测仍处于空白。本文提出CLIBE,首个用于检测Transformer-based NLP模型中动态后门的框架。CLIBE通过在注意力层中设计优化的权重扰动,对可疑模型注入“少样本扰动”,使扰动模型将有限数量的参考样本分类为目标标签。随后,利用该扰动的泛化能力判断原模型是否含有动态后门。在三种先进动态后门攻击、两个主流Transformer框架和四个真实分类任务上的大量实验充分验证了CLIBE的有效性。我们还证明其对多种自适应攻击具有鲁棒性。此外,我们用CLIBE检测了Hugging Face上的49个流行Transformer模型,发现其中1个存在高概率动态后门,已向Hugging Face提交详细证据。进一步地,我们将CLIBE扩展至检测被修改为产生有毒内容的后门文本生成模型。据我们所知,CLIBE是首个无需触发样本即可检测生成模型后门的框架。

原文摘要 · Abstract (English)

Backdoors can be injected into NLP models to induce misbehavior when the input text contains a specific feature, known as a trigger, which the attacker secretly selects. Unlike fixed words, phrases, or sentences used in the static text trigger, NLP dynamic backdoor attacks design triggers associated with abstract and latent text features, making them considerably stealthier than traditional static backdoor attacks. However, existing research on NLP backdoor detection primarily focuses on defending against static backdoor attacks, while detecting dynamic backdoors in NLP models remains largely unexplored. This paper presents CLIBE, the first framework to detect dynamic backdoors in Transformer-based NLP models. CLIBE injects a "few-shot perturbation" into the suspect Transformer model by crafting optimized weight perturbation in the attention layers to make the perturbed model classify a limited number of reference samples as a target label. Subsequently, CLIBE leverages the generalization ability of this few-shot perturbation to determine whether the original model contains a dynamic backdoor. Extensive evaluation on three advanced NLP dynamic backdoor attacks, two widely-used Transformer frameworks, and four real-world classification tasks strongly validates the effectiveness of CLIBE. We also demonstrate the robustness of CLIBE against various adaptive attacks. Furthermore, we employ CLIBE to scrutinize 49 popular Transformer models on Hugging Face and discover one exhibiting a high probability of containing a dynamic backdoor. We have contacted Hugging Face and provided detailed evidence of this model's backdoor behavior. Moreover, we extend CLIBE to detect backdoor text generation models modified to exhibit toxic behavior. To the best of our knowledge, CLIBE is the first framework capable of detecting backdoors in text generation models without access to trigger input test samples.

后门检测NLP安全Transformer生成模型

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