Skip to main content
QUICK REVIEW

[论文解读] BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models

Kangjie Chen, Yuxian Meng|arXiv (Cornell University)|Oct 6, 2021
Topic ModelingComputer Science参考文献 21被引用 33
一句话总结

BadPre 提出一个通用、任务无关的后门攻击,植入一个后门到预训练的 NLP 基础模型,使其转移的任意下游模型继承该后门,并可被预定义词触发。该攻击在干净数据上保持功能性并能规避某些防御。

ABSTRACT

Pre-trained Natural Language Processing (NLP) models can be easily adapted to a variety of downstream language tasks. This significantly accelerates the development of language models. However, NLP models have been shown to be vulnerable to backdoor attacks, where a pre-defined trigger word in the input text causes model misprediction. Previous NLP backdoor attacks mainly focus on some specific tasks. This makes those attacks less general and applicable to other kinds of NLP models and tasks. In this work, we propose \Name, the first task-agnostic backdoor attack against the pre-trained NLP models. The key feature of our attack is that the adversary does not need prior information about the downstream tasks when implanting the backdoor to the pre-trained model. When this malicious model is released, any downstream models transferred from it will also inherit the backdoor, even after the extensive transfer learning process. We further design a simple yet effective strategy to bypass a state-of-the-art defense. Experimental results indicate that our approach can compromise a wide range of downstream NLP tasks in an effective and stealthy way.

研究动机与目标

  • 展示一个对预训练 NLP 基础模型的普遍后门攻击,不需要下游任务知识。
  • 证明从被污染的基础模型继承的下游模型会继承该后门。
  • 在保持干净任务性能的同时,评估该攻击在广泛 NLP 任务上的有效性。
  • 提出触发器插入策略,以规避最先进的后门防御。

提出的方法

  • 两阶段攻击:污染训练数据以在基础模型中嵌入后门,然后发布被后门感染的模型以供下游微调。
  • 通过在句子中插入预定义触发词并用随机标签或反义标签进行标注来构造被污染的数据;在干净+被污染数据上训练基础模型以嵌入后门。
  • 使用低频词的触发候选集来设计多个触发,以实现通用后门。
  • 在下游迁移阶段,使用任务特定数据进行微调;要激活后门,在输入中注入触发词并评估恶意输出。
  • 提出一种触发插入策略,通过在每个句子使用多个触发来绕过 ONION 类防御。

实验结果

研究问题

  • RQ1是否可以以任务无关的方式将后门嵌入到预训练的 NLP 基础模型,并在任意任务的下游微调中仍然存活?
  • RQ2从被污染基础模型继承的下游模型是否会保留后门并可通过攻击者定义的输入触发?
  • RQ3在保持对干净数据近似原始功能的同时,后门是否能够在多样化的 NLP 任务中保持隐蔽性?
  • RQ4是否存在能够绕过最先进的后门防御的触发设计策略?
  • RQ5使用单个被污染的基础模型时,对广泛下游任务(GLUE、SQuAD、NER)的攻击影响是什么?

主要发现

  • BadPre 攻击在10个下游任务中实现了后门继承,同时干净数据的性能下降很小(通常低于1%)。
  • 随机标签污染在下游任务中实现了有效的后门,而反义词标签污染在迁移性方面效果较差。
  • 注入的触发词会导致下游模型在恶意输入上的性能显著下降(在某些任务中下降显著,甚至接近完全失败)。
  • 每句使用两个触发词的策略可以在保持触发的同时在许多情况下避开 ONION 之类的防御。
  • 该攻击在文本分类、问答和命名实体识别等任务中表现出有效性和隐蔽性,并对典型的迁移学习工作流表现出鲁棒性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。