Skip to main content
QUICK REVIEW

[Paper Review] BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models

Kangjie Chen, Yuxian Meng|arXiv (Cornell University)|Oct 6, 2021
Topic ModelingComputer Science21 references33 citations
TL;DR

BadPre proposes a universal, task-agnostic backdoor attack that implants a backdoor into a pre-trained NLP foundation model, such that any downstream model transferred from it inherits the backdoor and can be triggered by predefined words. The attack preserves functionality on clean data and evades some defenses.

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.

Motivation & Objective

  • Demonstrate a universal backdoor attack on pre-trained NLP foundation models that does not require knowledge of downstream tasks.
  • Show that downstream models inherited from a poisoned foundation model inherit the backdoor.
  • Evaluate the attack’s effectiveness across a broad set of NLP tasks while preserving clean-task performance.
  • Propose trigger insertion strategies to evade state-of-the-art backdoor defenses.

Proposed method

  • Two-stage attack: poison training data to embed a backdoor in a foundation model, then release the backdoored model for downstream fine-tuning.
  • Construct poisoned data by inserting predefined triggers into sentences and labeling them with random or antonym labels; train the foundation model on clean+poisoned data to embed backdoors.
  • Use a trigger candidate set with low-frequency words to craft multiple triggers and enable a universal backdoor.
  • During downstream transfer, fine-tune with task-specific data; to activate the backdoor, inject trigger words into inputs and evaluate the malicious outputs.
  • Propose a trigger insertion strategy to bypass ONION-like defenses by using multiple triggers per sentence.

Experimental results

Research questions

  • RQ1Can a backdoor be embedded into a pre-trained NLP foundation model in a task-agnostic manner that survives downstream fine-tuning across arbitrary tasks?
  • RQ2Will downstream models inherited from the poisoned foundation model retain the backdoor and be triggerable with attacker-defined inputs?
  • RQ3Can the backdoor remain stealthy while preserving near-original functionality on clean data across diverse NLP tasks?
  • RQ4Are there trigger-design strategies that can bypass state-of-the-art backdoor defenses?
  • RQ5What is the attack’s impact on a wide range of downstream tasks (GLUE, SQuAD, NER) when using a single poisoned foundation model?

Key findings

  • The BadPre attack achieves backdoor inheritance across 10 downstream tasks with minimal clean-data performance drop (often below 1%).
  • Random label poisoning enables effective backdoors in downstream tasks, while antonym-label poisoning is less effective for transferability.
  • Injected trigger words can cause substantial performance degradation on malicious inputs for downstream models (ranging from notable drops to near-total failure on some tasks).
  • A two-trigger-per-sentence strategy can bypass certain defenses like ONION by maintaining triggers while evading detection in many cases.
  • The attack demonstrates both effectiveness and stealth across text classification, QA, and NER tasks, with robustness to typical transfer-learning workflows.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.