mlsanityData to 7 Oct 2026

TextGuard: Provable Defense against Backdoor Attacks on Text Classification

arXiv 2311.11225 ↗First posted 19 Nov 2023cs.LG cs.CRcited by 14

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

Abstract (arXiv)

Backdoor attacks have become a major security threat for deploying machine learning models in security-critical applications. Existing research endeavors have proposed many defenses against backdoor attacks. Despite demonstrating certain empirical defense efficacy, none of these techniques could provide a formal and provable security guarantee against arbitrary attacks. As a result, they can be easily broken by strong adaptive attacks, as shown in our evaluation. In this work, we propose TextGuard, the first provable defense against backdoor attacks on text classification. In particular, TextGuard first divides the (backdoored) training data into sub-training sets, achieved by splitting each training sentence into sub-sentences. This partitioning ensures that a majority of the sub-training sets do not contain the backdoor trigger. Subsequently, a base classifier is trained from each sub-training set, and their ensemble provides the final prediction. We theoretically prove that when the length of the backdoor trigger falls within a certain threshold, TextGuard guarantees that its prediction will remain unaffected by the presence of the triggers in training and testing inputs. In our evaluation, we demonstrate the effectiveness of TextGuard on three benchmark text classification tasks, surpassing the certification accuracy of existing certified defenses against backdoor attacks. Furthermore, we propose additional strategies to enhance the empirical performance of TextGuard. Comparisons with state-of-the-art empirical defenses validate the superiority of TextGuard in countering multiple backdoor attacks. Our code and data are available at https://github.com/AI-secure/TextGuard.

Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 40 of its 55 references that are in the map. First posted on arXiv 19 Nov 2023.

Builds on

40 of 55 references.

Closest ancestors · 12

Same direction, newest first

  1. 2022BadPrompt: Backdoor Attacks on Continuous Prompts27 Nov
  2. 2022Defending Backdoor Attacks on Vision Transformer via Patch Processing24 Jun
  3. 2022A Unified Evaluation of Textual Backdoor Learning: Frameworks and Benchmarks17 Jun
  4. 2022Constrained Optimization with Dynamic Bound-scaling for Effective NLPBackdoor Defense11 Feb
  5. 2021RAP: Robustness-Aware Perturbations for Defending against Backdoor Attacks on NLP Models15 Oct
  6. 2021Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer14 Oct
  7. 2021BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models6 Oct
  8. 2021Turn the Combination Lock: Learnable Textual Backdoor Attacks via Word Substitution11 Jun
  9. 2021Hidden Killer: Invisible Textual Backdoor Attacks with Syntactic Trigger26 May
  10. 2021Rethinking the Backdoor Attacks' Triggers: A Frequency Perspective7 Apr
  11. 2021Be Careful about Poisoned Word Embeddings: Exploring the Vulnerability of the Embedding Layers in NLP Models29 Mar
  12. 2021T-Miner: A Generative Approach to Defend Against Trojan Attacks on DNN-based Text Classification7 Mar

Other references · 28

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023GPT-4 Technical Reportcited by 18,132
  4. 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
  5. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  6. 2020Shortcut Learning in Deep Neural Networkscited by 1,928
  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. 2017Automated Hate Speech Detection and the Problem of Offensive Languagecited by 724
  10. 2018Spectral Signatures in Backdoor Attackscited by 457
  11. 2019STRIP: A Defence Against Trojan Attacks on Deep Neural Networkscited by 437
  12. 2018Detecting Backdoor Attacks on Deep Neural Networks by Activation Clusteringcited by 429
16 more
  1. 2020Weight Poisoning Attacks on Pre-trained Modelscited by 318
  2. 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 231
  3. 2019A backdoor attack against LSTM-based text classification systemscited by 214
  4. 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 191
  5. 2020RAB: Provable Robustness Against Backdoor Attackscited by 115
  6. 2020Deep Partition Aggregation: Provable Defense against General Poisoning Attackscited by 112
  7. 2021Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoningcited by 103
  8. 2020Intrinsic Certified Robustness of Bagging against Data Poisoning Attackscited by 90
  9. 2019Defending Neural Backdoors via Generative Distribution Modelingcited by 82
  10. 2020Mitigating backdoor attacks in LSTM-based Text Classification Systems by Backdoor Keyword Identificationcited by 80
  11. 2021Backdoor Pre-trained Models Can Transfer to Allcited by 79
  12. 2020Rethinking the Trigger of Backdoor Attackcited by 76
  13. 2020On Certifying Robustness against Backdoor Attacks via Randomized Smoothingcited by 74
  14. 2019Design and Evaluation of a Multi-Domain Trojan Detection Method on Deep Neural Networkscited by 66
  15. 2020Certified Robustness of Nearest Neighbors against Data Poisoning and Backdoor Attackscited by 58
  16. 2021Red Alarm for Pre-trained Models: Universal Vulnerability to Neuron-Level Backdoor Attackscited by 44

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 6; 2025: 4; 2026: 4.

14 papers.

Sort:

By area: