mlsanityData to 7 Oct 2026

Pruning and Malicious Injection: A Retraining-Free Backdoor Attack on Transformer Models

arXiv 2508.10243 ↗First posted 14 Aug 2025cs.LGcited by 0

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

Abstract (arXiv)

Transformer models have demonstrated exceptional performance and have become indispensable in computer vision (CV) and natural language processing (NLP) tasks. However, recent studies reveal that transformers are susceptible to backdoor attacks. Prior backdoor attack methods typically rely on retraining with clean data or altering the model architecture, both of which can be resource-intensive and intrusive. In this paper, we propose Head-wise Pruning and Malicious Injection (HPMI), a novel retraining-free backdoor attack on transformers that does not alter the model's architecture. Our approach requires only a small subset of the original data and basic knowledge of the model architecture, eliminating the need for retraining the target transformer. Technically, HPMI works by pruning the least important head and injecting a pre-trained malicious head to establish the backdoor. We provide a rigorous theoretical justification demonstrating that the implanted backdoor resists detection and removal by state-of-the-art defense techniques, under reasonable assumptions. Experimental evaluations across multiple datasets further validate the effectiveness of HPMI, showing that it 1) incurs negligible clean accuracy loss, 2) achieves at least 99.55% attack success rate, and 3) bypasses four advanced defense mechanisms. Additionally, relative to state-of-the-art retraining-dependent attacks, HPMI achieves greater concealment and robustness against diverse defense strategies, while maintaining minimal impact on clean accuracy.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 26 of its 38 references that are in the map. First posted on arXiv 14 Aug 2025.

Builds on

26 of 38 references.

Closest ancestors · 3

Same direction, newest first

  1. 2021DBIA: Data-free Backdoor Injection Attack against Transformer Networks22 Nov
  2. 2021RAP: Robustness-Aware Perturbations for Defending against Backdoor Attacks on NLP Models15 Oct
  3. 2021Hidden Backdoors in Human-Centric Language Models1 May

Other references · 23

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  4. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
  5. 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
  6. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  7. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,052
  8. 2017Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoningcited by 1,012
  9. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
  10. 2018Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networkscited by 550
  11. 2018Poison Frogs! Targeted Clean-Label Poisoning Attacks on Neural Networkscited by 500
  12. 2019STRIP: A Defence Against Trojan Attacks on Deep Neural Networkscited by 437
11 more
  1. 2019Hidden Trigger Backdoor Attackscited by 359
  2. 2020Reflection Backdoor: A Natural Backdoor Attack on Deep Neural Networkscited by 341
  3. 2020Visual Transformers: Token-based Image Representation and Processing for Computer Visioncited by 333
  4. 2020Weight Poisoning Attacks on Pre-trained Modelscited by 318
  5. 2019A new Backdoor Attack in CNNs by training set corruption without label poisoningcited by 237
  6. 2019Detecting AI Trojans Using Meta Neural Analysiscited by 192
  7. 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 191
  8. 2018Backdoor Embedding in Convolutional Neural Network Models via Invisible Perturbationcited by 131
  9. 2021Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoningcited by 103
  10. 2020An Embarrassingly Simple Approach for Trojan Attack in Deep Neural Networkscited by 92
  11. 2021Towards Practical Deployment-Stage Backdoor Attack on Deep Neural Networkscited by 33

Built on by

Not cited yet.