mlsanityData to 14 Oct 2026

LMSanitator: Defending Prompt-Tuning Against Task-Agnostic Backdoors

arXiv 2308.13904 ↗First posted 26 Aug 2023cs.CL cs.CR cs.LGcited by 9

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

Abstract (arXiv)

Prompt-tuning has emerged as an attractive paradigm for deploying large-scale language models due to its strong downstream task performance and efficient multitask serving ability. Despite its wide adoption, we empirically show that prompt-tuning is vulnerable to downstream task-agnostic backdoors, which reside in the pretrained models and can affect arbitrary downstream tasks. The state-of-the-art backdoor detection approaches cannot defend against task-agnostic backdoors since they hardly converge in reversing the backdoor triggers. To address this issue, we propose LMSanitator, a novel approach for detecting and removing task-agnostic backdoors on Transformer models. Instead of directly inverting the triggers, LMSanitator aims to invert the predefined attack vectors (pretrained models' output when the input is embedded with triggers) of the task-agnostic backdoors, which achieves much better convergence performance and backdoor detection accuracy. LMSanitator further leverages prompt-tuning's property of freezing the pretrained model to perform accurate and fast output monitoring and input purging during the inference phase. Extensive experiments on multiple language models and NLP tasks illustrate the effectiveness of LMSanitator. For instance, LMSanitator achieves 92.8% backdoor detection accuracy on 960 models and decreases the attack success rate to less than 1% in most scenarios.

Key facts. Cited by 9 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 55 of its 94 references that are in the map. First posted on arXiv 26 Aug 2023.

Builds on

55 of 94 references.

Closest ancestors · 7

Same direction, newest first

  1. 2022BadPrompt: Backdoor Attacks on Continuous Prompts27 Nov
  2. 2022Constrained Optimization with Dynamic Bound-scaling for Effective NLPBackdoor Defense11 Feb
  3. 2021Spinning Language Models: Risks of Propaganda-As-A-Service and Countermeasures9 Dec
  4. 2021RAP: Robustness-Aware Perturbations for Defending against Backdoor Attacks on NLP Models15 Oct
  5. 2021BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models6 Oct
  6. 2021Hidden Backdoors in Human-Centric Language Models1 May
  7. 2021T-Miner: A Generative Approach to Defend Against Trojan Attacks on DNN-based Text Classification7 Mar

Other references · 48

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  5. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
  6. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  7. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
  8. 2016Pointer Sentinel Mixture Modelscited by 3,096
  9. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,811
  10. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,790
  11. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
  12. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
36 more
  1. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,181
  2. 2019Language Models as Knowledge Bases?cited by 1,936
  3. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
  4. 2017Visualizing the Loss Landscape of Neural Netscited by 1,130
  5. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
  6. 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,043
  7. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
  8. 2021GPT Understands, Toocited by 716
  9. 2021P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Taskscited by 689
  10. 2020It's Not Just Size That Matters: Small Language Models Are Also Few-Shot Learnerscited by 669
  11. 2018Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networkscited by 580
  12. 2019ERNIE: Enhanced Language Representation with Informative Entitiescited by 528
  13. 2018Spectral Signatures in Backdoor Attackscited by 484
  14. 2018Detecting Backdoor Attacks on Deep Neural Networks by Activation Clusteringcited by 456
  15. 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 445
  16. 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 377
  17. 2019Hidden Trigger Backdoor Attackscited by 371
  18. 2020Reflection Backdoor: A Natural Backdoor Attack on Deep Neural Networkscited by 349
  19. 2020Weight Poisoning Attacks on Pre-trained Modelscited by 341
  20. 2021Neural Attention Distillation: Erasing Backdoor Triggers from Deep Neural Networkscited by 324
  21. 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 263
  22. 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 211
  23. 2020Information Leakage in Embedding Modelscited by 203
  24. 2019Demon in the Variant: Statistical Analysis of DNNs for Robust Backdoor Contamination Detectioncited by 124
  25. 2021Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoningcited by 113
  26. 2020Automatically Identifying Words That Can Serve as Labels for Few-Shot Text Classificationcited by 98
  27. 2019Robust Anomaly Detection and Backdoor Attack Detection Via Differential Privacycited by 95
  28. 2019Analyzing Information Leakage of Updates to Natural Language Modelscited by 90
  29. 2020Trojaning Language Models for Fun and Profitcited by 90
  30. 2021Backdoor Pre-trained Models Can Transfer to Allcited by 86
  31. 2019Defending Neural Backdoors via Generative Distribution Modelingcited by 84
  32. 2019Design and Evaluation of a Multi-Domain Trojan Detection Method on Deep Neural Networkscited by 71
  33. 2022Exploring the Universal Vulnerability of Prompt-based Learning Paradigmcited by 57
  34. 2021Red Alarm for Pre-trained Models: Universal Vulnerability to Neuron-Level Backdoor Attackscited by 49
  35. 2019Multi-step Retriever-Reader Interaction for Scalable Open-domain Question Answeringcited by 48
  36. 2017Learn&Fuzz: Machine Learning for Input Fuzzingcited by 23

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 1; 2024: 4; 2025: 2; 2026: 2.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026An Empirical Study of Output-to-Input Loops for Black-Box Backdoor Detection in Fine-Tuned Open-Weight LLMs
  2. 2026Removing the NEEDLE in the Haystack: Backdoor Removal in LLMs via Weight Orthogonalisation
  3. 2026LoRAScan: Detecting Backdoor Prompts in Low-Rank Adapters for Large Language Models via Down-Projection Activation Spikes
  4. 2023PoisonPrompt: Backdoor Attack on Prompt-based Large Language Models
  5. 2023Composite Backdoor Attacks Against Large Language Models
  6. 2025Robust Anti-Backdoor Instruction Tuning in LVLMs
  7. 2024Context is the Key: Backdoor Attacks for In-Context Learning with Vision Transformers
  8. 2026Merging Triggers, Breaking Backdoors: Defensive Poisoning for Instruction-Tuned Language Models