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, Luu Anh Tuan

TL;DR

Large Language Models (LLMs) are highly susceptible to "backdoor attacks," where hidden triggers in training data or prompts force the model to produce specific malicious outputs. This survey provides a comprehensive taxonomy of these vulnerabilities, categorizing them by implementation method—full-parameter tuning, parameter-efficient tuning, or training-free approaches—while highlighting the urgent need for more robust, generalized defense mechanisms.

What Problem Does This Paper Address?

As LLMs become central to modern software, their training costs remain prohibitively high for most users. This has led to a reliance on open-source models and third-party training services, creating a massive supply-chain security risk.

The authors address the growing threat of backdoor attacks. In these scenarios, an attacker implants a "trigger" (a specific word, character, or even a writing style) into the model. Under normal conditions, the model behaves perfectly. However, when the trigger appears in an input, the model is manipulated into providing a predetermined, often harmful, response. While general backdoor research exists, LLMs present unique challenges due to their scale, reasoning capabilities, and the diverse ways they are fine-tuned.

Methods

The paper systematically classifies backdoor attacks based on the level of access and computational effort required by the attacker:

  1. Full-Parameter Fine-Tuning: The "traditional" 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. Overview of full-parameter backdoor attacks
  2. Parameter-Efficient Fine-Tuning (PEFT): A more modern threat targeting methods like LoRA or prompt-tuning. Here, attackers only need to compromise the small, updatable modules added to a frozen base model. This makes attacks much more feasible for resource-constrained adversaries. Backdoor attacks targeting PEFT methods
  3. No Fine-Tuning (Training-Free): Perhaps the most alarming category, these attacks exploit the inherent reasoning of LLMs. By poisoning the "demonstration examples" in In-Context Learning (ICL) or manipulating Chain-of-Thought (CoT) prompts, attackers can trigger malicious behavior without ever touching the model's weights.
Figure 1: Overview of the backdoor attack using full-parameter fine-tuning, with examples of poisoned data backdoor attack. Attackers leverage the rare character "cf" as a trigger, poison training datasets, and use full-parameter fine-tuning to build backdoored models. When input samples contain the trigger, model behavior is manipulated. "Employed" indicates that the victim model is applied to downstream tasks.
Figure 4: Overview of the backdoor attack based on PEFT, where the fine-tuning algorithm employs prompt-tuning. The upper part of the figure illustrates a normal model fine-tuned based on PEFT, while the lower part shows a victim model embedded with backdoors during the fine-tuning process.

The survey also covers defenses, split into sample detection (identifying poisoned inputs via perplexity or attribution scores) and model modification (pruning "backdoored" neurons or using knowledge distillation to "unlearn" the trigger).

Datasets

The authors catalog a wide array of benchmarks used to evaluate these attacks across different NLP tasks:

  • Text Classification: SST-2, IMDB, YELP, AG’s News, and QNLI.
  • Generative Tasks: IWSLT and WMT for translation; XSum and CNN/Daily Mail for summarization; SQuAD for question answering.
  • Named Entity Recognition (NER): CoNLL 2003.
Figure 2: Overview of target tasks, benchmark datasets, evaluation metrics, and representative works in backdoor attacks.

Key Insights and Ideas

  • The Shift to PEFT: As models grow, attackers are moving away from full-tuning. PEFT attacks are not only cheaper but also harder to detect because the "maliciousness" is concentrated in a tiny fraction of the model's total parameters.
  • Stealth via Style: Triggers are evolving from obvious nonsense strings (like "cf") to subtle linguistic features, such as specific grammatical errors or writing styles (e.g., "arcane parlance"), making them nearly invisible to human reviewers.
  • In-Context Vulnerability: The paper highlights that the very features that make LLMs powerful—like their ability to learn from a few examples in a prompt—are their greatest weaknesses. You don't need to be a sophisticated hacker to poison a prompt.
  • Backdoors as a "Double-Edged Sword": Interestingly, the authors note that backdoor techniques are being repurposed for good, such as embedding "watermarks" into models to protect intellectual property and track unauthorized usage.

Key Results

The paper summarizes the landscape of current research, noting that:

  • Attack Success Rate (ASR) remains the primary metric for attackers, while Clean Accuracy (CA) ensures the model remains useful for non-malicious tasks.
  • Training-free attacks (like BadChain) have demonstrated that manipulating reasoning steps can achieve high ASR in complex tasks like mathematical reasoning without any weight updates.
  • PEFT attacks are highly transferable; a backdoor implanted in a LoRA module for one task can sometimes propagate its vulnerability to other tasks.
Summary of representative works and trigger types

Limitations and Future Work

The authors identify several critical gaps in current research:

  • Assumption of Prior Knowledge: Most current defenses assume the defender knows something about the attack (e.g., the trigger type). Real-world "black-box" defense remains an open challenge.
  • Generative Complexity: Attacking and defending generative tasks (like long-form reasoning) is significantly harder than simple classification, and current methods are still maturing.
  • Covertness: There is a constant arms race to develop triggers that are indistinguishable from natural language.
  • Multimodal Frontiers: As we move toward Large Vision-Language Models, the attack surface expands to include visual triggers, a field that is currently under-explored.

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 Luu Anh Tuan},
  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