Textual Backdoor Attacks Can Be More Harmful via Two Simple Tricks

Yangyi Chen, Fanchao Qi, Zhiyuan Liu, Maosong Sun

Abstract

Deep learning models are increasingly vulnerable to textual backdoor attacks, where an attacker poisons training data to trigger specific incorrect behaviors. While modern "feature-space" attacks using syntactic or stylistic triggers are stealthier than traditional word-insertion methods, they often struggle in low-poisoning or label-consistent scenarios. This paper introduces two simple yet potent techniques—Multi-task Learning and Data Augmentation—that significantly enhance the success and resilience of these stealthy attacks, even against defensive measures like clean-data fine-tuning.

Introduction

Backdoor attacks represent a significant security threat to Natural Language Processing (NLP) systems. By injecting a "trigger" into a small portion of the training data, an attacker can force a model to output a target prediction whenever that trigger appears in a test input. Early attacks used obvious "surface-space" triggers like rare words (e.g., "bb"), which are easily detected. Recent research has shifted toward "feature-space" triggers, such as specific syntactic structures or writing styles, which are nearly invisible to human inspection.

However, these stealthy triggers are often "weak," meaning the model may not naturally associate them with the target label, especially when the poisoning rate is low (e.g., 1%) or when the poisoned samples already belong to the target class (label-consistent attacks). This paper demonstrates how two straightforward modifications to the training process can overcome these hurdles.

Proposed Methodology

The authors propose two distinct "tricks" tailored to different attacker capabilities:

1. Multi-task Learning (MT)

This approach is designed for scenarios where the attacker provides a pre-trained model to the public. In addition to the primary classification task, the attacker introduces a secondary "probing head." This head is trained to explicitly distinguish between clean and poisoned data.

The Multi-task Learning framework uses a probing head to force the backbone model to learn trigger-specific features.

By making trigger detection an explicit training objective, the model's internal representations are forced to capture the subtle syntactic or stylistic features of the backdoor. This "explicit supervision" ensures the backdoor remains potent even when the primary task's signal is weak.

2. Data Augmentation (AUG)

This trick applies when the attacker provides a poisoned dataset. Instead of replacing clean samples with poisoned ones, the attacker includes both the original clean sample and its poisoned counterpart. This method acts as a form of implicit contrastive learning; the model is presented with nearly identical sentence pairs where the only difference is the trigger, making the trigger's influence much easier to isolate and learn.

Experimental Results

The researchers evaluated these methods using BERT, DistilBERT, and RoBERTa across three datasets: SST-2 (sentiment), Hate-Speech, and AG’s News (topic classification). The results show massive improvements in Attack Success Rate (ASR) without sacrificing Clean Accuracy (CACC).

Experimental results across various datasets and models, comparing standard attacks to those enhanced with Multi-task (mt) and Augmentation (aug) tricks.

Key Findings:

  • Low-Poisoning Resilience: At a 1% poisoning rate on SST-2, a standard syntactic attack achieved only a 51.59% ASR. Adding the MT trick boosted this to 89.90%.
  • Label-Consistent Success: On AG's News, a standard style-based attack had a dismal 36.86% ASR. With the MT trick, this skyrocketed to 88.65%.
  • Defeating Defenses: The tricks also proved resilient against Clean-data Fine-Tuning (CFT), a common defense where users fine-tune models on clean data to "wash" out backdoors. While standard attacks often saw ASRs drop significantly, the AUG and MT versions frequently maintained ASRs above 90%.

Conclusion

This research highlights a critical vulnerability: stealthy textual backdoors can be made significantly more robust through simple training modifications. By forcing models to explicitly or implicitly recognize triggers, attackers can ensure backdoors persist even in challenging environments. These findings underscore the need for more advanced defensive strategies that go beyond simple fine-tuning on clean data.

Summary updated

BibTeX
@inproceedings{chen2022textual,
  author = {Yangyi Chen and Fanchao Qi and Zhiyuan Liu and Maosong Sun},
  title = {{Textual Backdoor Attacks Can Be More Harmful via Two Simple Tricks}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.770},
}
Figure