NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Survey of Recent Backdoor Attacks and Defenses in Large Language Models

Shuai Zhao, Meihuizi Jia, Zhongliang Guo, Leilei Gan, Xiaoyu Xu, Xiaobao Wu, Jie Fu, Yichao Feng, Fengjun Pan, Anh Tuan Luu

Abstract

As Large Language Models (LLMs) become the backbone of modern AI, they bring a hidden risk: backdoor attacks. This survey provides a comprehensive taxonomy of how attackers can "poison" LLMs—either by fine-tuning them on malicious data or by manipulating prompts—to force specific, harmful behaviors when a secret trigger is present. It highlights a shift from traditional weight-poisoning to stealthier, "training-free" attacks that exploit the model's own reasoning capabilities.

Introduction

LLMs are computationally expensive to train from scratch, leading most users to rely on open-source models or third-party fine-tuning services. This "outsourcing" creates a massive security vulnerability. An attacker can inject a backdoor: a hidden vulnerability where the model behaves perfectly on normal inputs but produces a specific, malicious output (like a biased sentiment or a leaked secret) when it sees a "trigger" (like a rare word or a specific text style).

While backdoor research is well-established in traditional machine learning, LLMs present unique challenges. Their generative nature makes "success" harder to define than simple label-flipping, and their ability to learn "in-context" (without weight updates) opens up entirely new attack vectors. This paper systematically categorizes these threats and the defenses designed to stop them.

The Backdoor Attack Pipeline

A typical backdoor attack involves several stages: data poisoning, model training (or fine-tuning), and deployment. The process ensures that the model maintains high accuracy on clean data while failing predictably on poisoned inputs.

Overview of the backdoor attack pipeline, from trigger implantation in clean data to testing poisoned samples on the final model.

Taxonomy of Attacks

The authors classify backdoor attacks based on the fine-tuning method used to deploy them, which is a novel and practical perspective for the LLM era:

  1. Full-Parameter Fine-Tuning: The "classic" approach where an attacker poisons a dataset and updates all model weights. While effective, it is computationally expensive and increasingly difficult as models scale to hundreds of billions of parameters.
  2. Parameter-Efficient Fine-Tuning (PEFT): Attacks targeting modern techniques like LoRA (Low-Rank Adaptation) or Prompt-tuning. These are stealthier because only a tiny fraction of the model (the "adapter") is modified, making the backdoor easier to hide and cheaper to deploy.
  3. No Fine-Tuning (Training-Free): The most alarming category. These attacks exploit In-Context Learning (ICL) or Chain-of-Thought (CoT) reasoning. By providing a few "poisoned" examples in a prompt, an attacker can induce backdoored behavior on the fly without ever touching the model's underlying weights.

Evaluation and Key Insights

The survey reviews works utilizing standard NLP benchmarks (e.g., SST-2, IMDB, SQuAD) to test attack efficacy. Most surveyed attacks achieve near 100% Attack Success Rate (ASR) on classification tasks while maintaining high Clean Accuracy (CA), ensuring the model's performance on normal data doesn't drop.

Critical Vulnerabilities

  • The Rise of the "Triggerless" Attack: Traditional backdoors use obvious triggers like "cf." Newer attacks use linguistic styles (e.g., writing in a "biblical" style) as triggers, making them nearly impossible for automated filters to catch.
  • PEFT as a Double-Edged Sword: While LoRA makes LLMs more accessible, it also makes them easier to compromise. An attacker can distribute a "poisoned adapter" that looks like a helpful fine-tuned module but contains a hidden payload.
  • Reasoning as a Vulnerability: Attacks like BadChain show that you can backdoor a model's "thought process." By inserting a trigger into a Chain-of-Thought prompt, you can force the model to follow a flawed logic path to a pre-determined wrong answer.

Defenses and Future Directions

Current defenses are split into Sample Detection (identifying poisoned inputs via perplexity or outlier analysis) and Model Modification (using techniques like knowledge distillation or "unlearning" to scrub backdoors from the weights). However, the authors identify several critical gaps:

  • Generative Complexity: Most research still focuses on simple classification. Backdooring complex generative tasks (like math reasoning or code generation) is much harder and less understood.
  • Clean-Label Attacks: It is difficult to perform "clean-label" attacks on generative models—where the poisoned training data looks perfectly normal to a human reviewer.
  • Generalization of Defenses: Most defenses are "reactive" and designed for specific types of triggers. There is no "silver bullet" defense that can handle the diversity of LLM attack vectors.

The field lacks a unified "leaderboard" or standard for measuring how stealthy or robust a backdoor actually is across different model architectures.

Summary updated

BibTeX
@article{zhao2025survey,
  author = {Shuai Zhao and Meihuizi Jia and Zhongliang Guo and Leilei Gan and Xiaoyu Xu and Xiaobao Wu and Jie Fu and Yichao Feng and Fengjun Pan and Anh Tuan Luu},
  title = {{A Survey of Recent Backdoor Attacks and Defenses in Large Language Models}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
  url = {https://openreview.net/forum?id=d1dmQWZYlz},
}
Figure