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

A Survey of Backdoor Attacks and Defenses on Large Language Models: Implications for Security Measures

Shuai Zhao, Meihuizi Jia, Zhongliang Guo, Leilei Gan, Jie Fu, Yichao Feng, Fengjun Pan, Luu Anh Tuan · OpenReview

Abstract

Large language models (LLMs) have revolutionized natural language processing, achieving state-of-the-art performance in few-shot and zero-shot settings. However, the high computational cost of training these models often forces users to rely on open-source weights or third-party training services, introducing significant security risks. This paper provides a comprehensive survey of backdoor attacks specifically targeting LLMs. We categorize these attacks based on the fine-tuning methodology—full-parameter, parameter-efficient, and training-free—and evaluate the current landscape of defensive measures. Our analysis highlights emerging trends, such as the use of logical triggers and the persistence of backdoors despite further tuning, while identifying critical gaps in current defensive strategies.

Introduction: The Vulnerability of LLMs

The "pre-train then fine-tune" paradigm has become the standard for deploying LLMs. While efficient, this reliance on external resources creates a massive security vulnerability known as a backdoor attack. In such an attack, an adversary injects a specific "trigger"—which could be a word, a specific writing style, or a reasoning step—into the model. Under normal circumstances, the model functions as expected. However, when the trigger is present in the input, the model's output is manipulated to follow the attacker's objective, such as generating toxic content or misclassifying sentiment. The rapid adoption of these models necessitates a unified framework for understanding these evolving threats.

Taxonomy of Backdoor Attacks

We propose a novel taxonomy for backdoor attacks based on the fine-tuning method used during deployment:

  1. Full-Parameter Fine-Tuning: This traditional approach involves updating all model weights using poisoned data. While highly effective, its high computational cost makes it less accessible for some attackers.
  2. Parameter-Efficient Fine-Tuning (PEFT): Attacks targeting methods like LoRA (Low-Rank Adaptation) or Prompt-tuning are increasingly prevalent. Because PEFT adapters are small and easily shared, they serve as ideal "Trojan horses" for infecting models.
  3. Training-Free Attacks: The most recent trend exploits the intrinsic reasoning capabilities of LLMs without modifying weights. Examples include BadChain, which uses malicious Chain-of-Thought (CoT) prompts, and ICLAttack, which poisons few-shot examples in a prompt to trigger specific responses.
The general pipeline of a backdoor attack on LLMs, illustrating trigger implantation, model poisoning through fine-tuning, and subsequent testing.

Evaluation and Benchmarking

The effectiveness of these attacks is typically measured using two primary metrics: Attack Success Rate (ASR) and Clean Accuracy (CA). A successful attack maintains a CA nearly identical to a clean model, ensuring the backdoor remains stealthy during normal use. In classification tasks (using benchmarks like SST-2, IMDB, and AG’s News), many attacks achieve near 100% ASR. However, generative tasks (e.g., SQuAD, WMT) present a greater challenge for attackers due to the vast and less predictable output space. Current defenses like ONION, which filters outlier tokens, work well against simple word triggers but struggle against sentence-level or grammatical triggers.

Critical Insights and Defensive Challenges

  • The PEFT Security Gap: The ease of sharing LoRA weights and other adapters makes them a significant vector for backdoor distribution.
  • Evolution of Triggers: Triggers have evolved from simple "rare words" to sophisticated stylistic or logical triggers that are much harder for automated defenses to detect.
  • Persistence: Backdoor patterns are remarkably resilient, often surviving "catastrophic forgetting" even when the model is further fine-tuned on clean datasets.
  • Clean-Label Attacks: Attackers can poison models even when labels appear correct to humans by manipulating context or using "triggerless" strategies like LLMBkd, bypassing simple data-auditing processes.

Conclusion and Future Work

As LLMs evolve into multimodal systems, the attack surface will expand to include images and audio. Future research must focus on developing proactive "red-teaming" tools to audit models before deployment and more robust input sanitization methods to counter training-free prompt manipulation. The trade-off between trigger covertness and attack reliability remains a central challenge in the ongoing arms race between attackers and defenders. Defending against attacks that only exist in the prompt (like BadChain) is particularly difficult because there are no "malicious weights" to prune, requiring a shift toward alignment-based resistance.

Summary updated

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