arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.04116cs.CRcs.AIcs.CL
收藏

基于语言模型的免训练词法后门攻击

Training-free Lexical Backdoor Attacks on Language Models

Monash University(莫纳什大学);CSIRO’s Data61(澳大利亚联邦科学与工业研究组织Data61研究所);The University of Melbourne(墨尔本大学)

Yujin Huang, Terry Yue Zhuo, Qiongkai Xu, Han Hu, Xingliang Yuan, Chunyang Chen

摘要:

大规模语言模型在各种自然语言处理(NLP)应用中取得了巨大的成功。然而,语言模型容易受到后门攻击的攻击,后门攻击会向模型中注入隐形触发器,以引导它们进行不期望的行为。大多数现有的后门攻击,如数据投毒,需要进一步(重新)训练或微调语言模型,以学习预期的后门模式。然而,额外的训练过程减少了攻击的隐蔽性,因为训练语言模型通常需要很长的优化时间、大量的数据以及对模型参数的大量修改。在这项工作中,我们提出了训练免费词汇后门攻击(TFLexAttack)作为第一个训练免费后门攻击语言模型。我们的攻击是通过注入词汇触发器到一个语言模型的标记器,通过操纵其嵌入字典使用精心设计的规则。这些规则可以向人类开发人员解释,这激发了更广泛的黑客攻击。字典的稀疏操作也证明了我们攻击的隐蔽性。我们对基于九个语言模型的三个主要NLP任务进行了广泛的实验,以证明我们的攻击的有效性和通用性。这个工作的代码可以在https://github.com/Jinxhy/TFLexAttack上找到。

英文摘要:

Large-scale language models have achieved tremendous success across various natural language processing (NLP) applications. Nevertheless, language models are vulnerable to backdoor attacks, which inject stealthy triggers into models for steering them to undesirable behaviors. Most existing backdoor attacks, such as data poisoning, require further (re)training or fine-tuning language models to learn the intended backdoor patterns. The additional training process however diminishes the stealthiness of the attacks, as training a language model usually requires long optimization time, a massive amount of data, and considerable modifications to the model parameters. In this work, we propose Training-Free Lexical Backdoor Attack (TFLexAttack) as the first training-free backdoor attack on language models. Our attack is achieved by injecting lexical triggers into the tokenizer of a language model via manipulating its embedding dictionary using carefully designed rules. These rules are explainable to human developers which inspires attacks from a wider range of hackers. The sparse manipulation of the dictionary also habilitates the stealthiness of our attack. We conduct extensive experiments on three dominant NLP tasks based on nine language models to demonstrate the effectiveness and universality of our attack. The code of this work is available at https://github.com/Jinxhy/TFLexAttack.

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

↑