mlsanityData to 14 Oct 2026

Pruning Strategies for Backdoor Defense in LLMs

arXiv 2508.20032 ↗First posted 27 Aug 2025cs.LG cs.CLcited by 5

On the map: LLM safety and security → Backdoor and data poisoning attacks

Abstract (arXiv)

Backdoor attacks are a significant threat to the performance and integrity of pre-trained language models. Although such models are routinely fine-tuned for downstream NLP tasks, recent work shows they remain vulnerable to backdoor attacks that survive vanilla fine-tuning. These attacks are difficult to defend because end users typically lack knowledge of the attack triggers. Such attacks consist of stealthy malicious triggers introduced through subtle syntactic or stylistic manipulations, which can bypass traditional detection and remain in the model, making post-hoc purification essential. In this study, we explore whether attention-head pruning can mitigate these threats without any knowledge of the trigger or access to a clean reference model. To this end, we design and implement six pruning-based strategies: (i) gradient-based pruning, (ii) layer-wise variance pruning, (iii) gradient-based pruning with structured L1/L2 sparsification, (iv) randomized ensemble pruning, (v) reinforcement-learning-guided pruning, and (vi) Bayesian uncertainty pruning. Each method iteratively removes the least informative heads while monitoring validation accuracy to avoid over-pruning. Experimental evaluation shows that gradient-based pruning performs best while defending the syntactic triggers, whereas reinforcement learning and Bayesian pruning better withstand stylistic attacks.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 31 of its 49 references that are in the map. First posted on arXiv 27 Aug 2025.

Builds on

31 of 49 references.

Closest ancestors · 13

Same direction, newest first

  1. 2025A Survey on Backdoor Threats in Large Language Models (LLMs): Attacks, Defenses, and Evaluations6 Feb
  2. 2023Backdooring Instruction-Tuned Large Language Models with Virtual Prompt Injection31 Jul
  3. 2023Adversarial Clean Label Backdoor Attacks and Defenses on Text Classification Systems31 May
  4. 2023Diffusion Theory as a Scalpel: Detecting and Purifying Poisonous Dimensions in Pre-trained Language Models Caused by Backdoor or Bias8 May
  5. 2022Fine-mixing: Mitigating Backdoors in Fine-tuned Language Models18 Oct
  6. 2022BITE: Textual Backdoor Attacks with Iterative Trigger Injection25 May
  7. 2021Triggerless Backdoor Attack for NLP Tasks with Clean Labels15 Nov
  8. 2021RAP: Robustness-Aware Perturbations for Defending against Backdoor Attacks on NLP Models15 Oct
  9. 2021Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer14 Oct
  10. 2021BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models6 Oct
  11. 2021Turn the Combination Lock: Learnable Textual Backdoor Attacks via Word Substitution11 Jun
  12. 2021Hidden Killer: Invisible Textual Backdoor Attacks with Syntactic Trigger26 May
1 more
  1. 2021Be Careful about Poisoned Word Embeddings: Exploring the Vulnerability of the Embedding Layers in NLP Models29 Mar

Other references · 18

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,592
  3. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
  4. 2019Are Sixteen Heads Really Better than One?cited by 816
  5. 2020Weight Poisoning Attacks on Pre-trained Modelscited by 341
  6. 2018Adversarial Example Generation with Syntactically Controlled Paraphrase Networkscited by 286
  7. 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 263
  8. 2021Anti-Backdoor Learning: Training Clean Models on Poisoned Datacited by 263
  9. 2020Reformulating Unsupervised Style Transfer as Paraphrase Generationcited by 183
  10. 2018Stochastic Activation Pruning for Robust Adversarial Defensecited by 171
  11. 2021Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoningcited by 113
  12. 2020Trojaning Language Models for Fun and Profitcited by 90
6 more
  1. 2023Better to Ask in English: Cross-Lingual Evaluation of Large Language Models for Healthcare Queriescited by 82
  2. 2022A Study of the Attention Abnormality in Trojaned BERTscited by 48
  3. 2023Making LLMs Worth Every Penny: Resource-Limited Text Classification in Bankingcited by 37
  4. 2024LoRATK: LoRA Once, Backdoor Everywhere in the Share-and-Play Ecosystemcited by 24
  5. 2025Advancing Hate Speech Detection with Transformers: Insights from the MetaHatecited by 4
  6. 2024Predictive Insights into LGBTQ+ Minority Stress: A Transductive Exploration of Social Media Discoursecited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 2.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Merging Triggers, Breaking Backdoors: Defensive Poisoning for Instruction-Tuned Language Models
  2. 2026Backdoor Unlearning Generalization: A Path Toward the Removal of Unknown Triggers in LLMs
  3. 2024Unlearning Backdoor Attacks through Gradient-Based Model Pruning
  4. 2024Neutralizing Backdoors through Information Conflicts for Large Language Models
  5. 2025Backdoor Token Unlearning: Exposing and Defending Backdoors in Pretrained Language Models
  6. 2025Uncovering and Aligning Anomalous Attention Heads to Defend Against NLP Backdoor Attacks
  7. 2024A Survey of Recent Backdoor Attacks and Defenses in Large Language Models
  8. 2025Pruning as a Defense: Reducing Memorization in Large Language Models