arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.01193cs.CRcs.CLcs.LG
收藏

CLIBE: 检测基于Transformer的NLP模型中的动态后门

CLIBE: Detecting Dynamic Backdoors in Transformer-based NLP Models

Zhejiang University(浙江大学)

Rui Zeng, Xi Chen, Yuwen Pu, Xuhong Zhang, Tianyu Du, Shouling Ji

AI总结:

针对NLP模型动态后门检测研究空白,提出CLIBE框架,通过注意力层少样本权重扰动及泛化性检测动态后门,经多场景验证有效且具鲁棒性,还可扩展检测文本生成模型后门。

摘要:

后门可被注入NLP模型中,当输入文本包含攻击者秘密选定的特定特征(称为触发器)时,就会诱导模型产生异常行为。与静态文本触发器中使用的固定单词、短语或句子不同,NLP动态后门攻击设计的触发器与抽象、潜在的文本特征相关联,使其隐蔽性远高于传统静态后门攻击。然而,现有NLP后门检测研究主要聚焦于防御静态后门攻击,针对NLP模型中动态后门的检测仍基本处于未探索状态。\n本文提出CLIBE,这是首个用于检测基于Transformer的NLP模型中动态后门的框架。CLIBE通过在注意力层中构造优化的权重扰动,向可疑Transformer模型注入“少样本扰动”,使受扰动模型将有限数量的参考样本分类为目标标签。随后,CLIBE利用这种少样本扰动的泛化能力判断原始模型是否包含动态后门。\n我们在3种先进的NLP动态后门攻击、2种广泛使用的Transformer框架以及4个真实分类任务上开展了大量评估,有力验证了CLIBE的有效性,同时证明了CLIBE对各类自适应攻击具备鲁棒性。此外,我们使用CLIBE审查了Hugging Face上的49个流行Transformer模型,发现1个模型极有可能包含动态后门,我们已联系Hugging Face并提供了该模型后门行为的详细证据。我们还扩展了CLIBE,使其可检测被修改后表现出有毒行为的后门文本生成模型。据我们所知,CLIBE是首个无需触发器输入测试样本即可检测文本生成模型中后门的框架。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑