Large Language Models Are Better Adversaries: Exploring Generative Clean-Label Backdoor Attacks Against Text Classifiers

Wencong You, Zayd Hammoudeh, Daniel LowdEMNLP 2023

Abstract

Backdoor attacks pose a significant security threat to machine learning models, typically involving the injection of triggers into training data to manipulate model behavior at inference time. While "dirty-label" attacks are easily detected, "clean-label" attacks—where poisoned data remains consistent with its assigned label—are more stealthy but historically difficult to implement. This paper introduces LLMBkd, a framework that leverages the generative power of Large Language Models (LLMs) to execute high-quality clean-label attacks by using linguistic style as a trigger. We also present REACT, a reactive defense mechanism that neutralizes these backdoors using "antidote" examples. Our results show that LLMBkd achieves high success rates across multiple benchmarks while remaining remarkably stealthy to human evaluators.

Introduction

The security of text classifiers is increasingly threatened by backdoor attacks. In a typical scenario, an adversary poisons a small portion of the training set with a trigger. During deployment, any input containing this trigger causes the model to output a target label. Traditional "dirty-label" attacks, which use mislabeled data, are often caught by simple data inspections. Clean-label attacks are far more insidious because the poisoned text is semantically and sentimentally aligned with its label.

This research explores how LLMs can be used to generate these clean-label triggers through stylistic paraphrasing. By rewriting text in specific styles—such as Biblical prose, Gen-Z slang, or 1940s gangster speak—attackers can exploit the "lazy" learning nature of models, which often prioritize stylistic shortcuts over complex semantic content.

Methodology: The LLMBkd Framework

The proposed LLMBkd attack consists of two primary components:

  1. Generative Stylistic Triggering: Using an LLM (e.g., GPT-3.5), the attacker paraphrases training examples into a target style while ensuring the original label remains valid. This creates a consistent stylistic pattern that the model learns to associate with the target label.
  2. Gray-box Poison Selection: To maximize efficiency, the framework prioritizes "hard" training examples—those that a clean model struggles to classify. By applying stylistic triggers to these ambiguous cases, the attacker more effectively "nudges" the model toward relying on the backdoor shortcut.

To counter such attacks, we introduce REACT (REactive Antidote Clean-up Technique). Once a stylistic trigger is identified, the defender adds "antidote" examples to the training set—texts in the trigger style but with diverse, correct labels. This breaks the correlation between the style and the target label, forcing the model to return its focus to the actual content.

Experimental Evaluation and Results

The effectiveness of LLMBkd was evaluated on four major benchmarks: SST-2 (sentiment), HSOL (hate speech), ToxiGen (implicit hate), and AG News (topic classification).

Attack Success Rate (ASR) across datasets and poisoning rates (PR), highlighting the effectiveness of LLMBkd and the impact of poison selection.

As shown in the figure above, LLMBkd consistently achieves high Attack Success Rates (ASR). For instance, on the SST-2 dataset, the "Bible" style trigger reached a 92% ASR with only 1% poisoning. The inclusion of poison selection significantly boosts performance, especially at lower poisoning rates, by targeting the most vulnerable examples. The attack is also remarkably cost-effective; using gpt-3.5-turbo, the researchers generated sufficient poison data for an attack for as little as $15 to $56 per dataset.

Stealthiness and Naturalness

A key advantage of LLMBkd is its stealthiness. Unlike previous style-transfer methods that often produced ungrammatical or clunky text, LLM-generated paraphrases are highly fluent and maintain label consistency.

Human-evaluated label error rates across different attack styles, demonstrating that LLMBkd maintains high label consistency and naturalness compared to baselines.

Human evaluation confirms that LLMBkd-generated text has the lowest label error rate among tested methods. This indicates that the poisoned examples are almost indistinguishable from clean data in terms of label consistency, making them exceptionally difficult to detect via manual review.

Defense Performance

The REACT defense proved highly effective in neutralizing backdoors. In experiments on the HSOL dataset, REACT successfully reduced the ASR of an LLMBkd attack from nearly 100% to just 4.8% by introducing a small set of antidote examples. This demonstrates that while stylistic backdoors are potent, they are also fragile when the correlation between style and label is intentionally disrupted.

Conclusion

LLMBkd demonstrates that the generative capabilities of LLMs significantly lower the bar for executing sophisticated, clean-label backdoor attacks. By exploiting linguistic style as a shortcut, attackers can achieve high success rates with minimal data poisoning. While the REACT defense offers a robust reactive solution, the study underscores the need for proactive defenses and a deeper understanding of how models prioritize stylistic features over semantic content.

Summary updated

BibTeX
@inproceedings{you2023large,
  author = {Wencong You and Zayd Hammoudeh and Daniel Lowd},
  title = {{Large Language Models Are Better Adversaries: Exploring Generative Clean-Label Backdoor Attacks Against Text Classifiers}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.833},
}
Figure