Recent studies have revealed a security threat to natural language processing (NLP) models, called the Backdoor Attack. Victim models can maintain competitive performance on clean samples while behaving abnormally on samples with a specific trigger word inserted. Previous backdoor attacking methods usually assume that attackers have a certain degree of data knowledge, either the dataset which users would use or proxy datasets for a similar task, for implementing the data poisoning procedure. However, in this paper, we find that it is possible to hack the model in a data-free way by modifying one single word embedding vector, with almost no accuracy sacrificed on clean samples. Experimental results on sentiment analysis and sentence-pair classification tasks show that our method is more efficient and stealthier. We hope this work can raise the awareness of such a critical security risk hidden in the embedding layers of NLP models. Our code is available at https://github.com/lancopku/Embedding-Poisoning.
翻译:最近的研究揭示了自然语言处理(NLP)模型(称为后门攻击)的安全威胁。受害者模型可以在清洁样品上保持竞争性性能,同时在样品上表现异常,插入了一个特定的触发词。以前的后门攻击方法通常假设攻击者拥有一定程度的数据知识,无论是用户将使用的数据集,还是类似任务中的代用数据集,用于执行数据中毒程序。然而,在本文中,我们发现,通过修改一个单词嵌入矢量,几乎没有精确度在清洁样品上牺牲,有可能以无数据方式黑入模型。情绪分析和句子分类任务实验结果显示,我们的方法更有效,而且隐蔽得更强。我们希望这项工作能够提高对NLP模型嵌入层中隐藏的这种关键安全风险的认识。我们的代码可在https://github.com/lancopku/Embedding-Poisoning查阅。