mlsanityData to 14 Oct 2026

Rethinking Textual Adversarial Defense for Pre-trained Language Models

arXiv 2208.10251 ↗First posted 21 Jul 2022cs.CL cs.AIcited by 5

Not on the map. Why?

Abstract (arXiv)

Although pre-trained language models (PrLMs) have achieved significant success, recent studies demonstrate that PrLMs are vulnerable to adversarial attacks. By generating adversarial examples with slight perturbations on different levels (sentence / word / character), adversarial attacks can fool PrLMs to generate incorrect predictions, which questions the robustness of PrLMs. However, we find that most existing textual adversarial examples are unnatural, which can be easily distinguished by both human and machine. Based on a general anomaly detector, we propose a novel metric (Degree of Anomaly) as a constraint to enable current adversarial attack approaches to generate more natural and imperceptible adversarial examples. Under this new constraint, the success rate of existing attacks drastically decreases, which reveals that the robustness of PrLMs is not as fragile as they claimed. In addition, we find that four types of randomization can invalidate a large portion of textual adversarial examples. Based on anomaly detector and randomization, we design a universal defense framework, which is among the first to perform textual adversarial defense without knowing the specific attack. Empirical results show that our universal defense framework achieves comparable or even higher after-attack accuracy with other specific defenses, while preserving higher original accuracy at the same time. Our work discloses the essence of textual adversarial attacks, and indicates that (1) further works of adversarial attacks should focus more on how to overcome the detection and resist the randomization, otherwise their adversarial examples would be easily detected and invalidated; and (2) compared with the unnatural and perceptible adversarial examples, it is those undetectable adversarial examples that pose real risks for PrLMs and require more attention for future robustness-enhancing strategies.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 53 of its 73 references that are in the map. First posted on arXiv 21 Jul 2022.

Builds on

53 of 73 references.

References · 53

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  3. 2014Explaining and Harnessing Adversarial Examplescited by 7,364
  4. 2013Intriguing properties of neural networkscited by 5,155
  5. 2016Towards Evaluating the Robustness of Neural Networkscited by 2,998
  6. 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,268
  7. 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 807
  8. 2015The Limitations of Deep Learning in Adversarial Settingscited by 790
  9. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
  10. 2017Adversarial Examples Are Not Easily Detected: Bypassing Ten Detection Methodscited by 546
  11. 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 491
  12. 2020CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instancescited by 441
38 more
  1. 2018Generating Natural Language Adversarial Examplescited by 424
  2. 2017Mitigating Adversarial Effects Through Randomizationcited by 383
  3. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 381
  4. 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 345
  5. 2020BAE: BERT-based Adversarial Examples for Text Classificationcited by 316
  6. 2018Adversarial Example Generation with Syntactically Controlled Paraphrase Networkscited by 286
  7. 2021Gradient-based Adversarial Attacks against Text Transformerscited by 234
  8. 2017Generating Natural Adversarial Examplescited by 183
  9. 2019Certified Robustness to Adversarial Word Substitutionscited by 168
  10. 2019Combating Adversarial Misspellings with Robust Word Recognitioncited by 163
  11. 2016Counter-fitting Word Vectors to Linguistic Constraintscited by 140
  12. 2020Contextualized Perturbation for Textual Adversarial Attackcited by 136
  13. 2021Advances in adversarial attacks and defenses in computer vision: A surveycited by 127
  14. 2017Deep Text Classification Can be Fooledcited by 106
  15. 2018ComDefend: An Efficient Image Compression Model to Defend Adversarial Examplescited by 105
  16. 2016Crafting Adversarial Input Sequences for Recurrent Neural Networkscited by 103
  17. 2018Feature Distillation: DNN-Oriented JPEG Compression Against Adversarial Examplescited by 99
  18. 2019Achieving Verified Robustness to Symbol Substitutions via Interval Bound Propagationcited by 88
  19. 2017Keeping the Bad Guys Out: Protecting and Vaccinating Deep Learning with JPEG Compressioncited by 87
  20. 2020SAFER: A Structure-free Approach for Certified Robustness to Adversarial Word Substitutionscited by 73
  21. 2021Towards Robustness Against Natural Language Word Substitutionscited by 69
  22. 2019Learning to Discriminate Perturbations for Blocking Adversarial Attacks in Text Classificationcited by 57
  23. 2020Frequency-Guided Word Substitutions for Detecting Textual Adversarial Examplescited by 54
  24. 2018Training verified learners with learned verifierscited by 50
  25. 2020Generating Natural Language Attacks in a Hard Label Black Box Settingcited by 50
  26. 2018Sentence-Level Fluency Evaluation: References Help, But Can Be Spared!cited by 43
  27. 2021LiBRe: A Practical Bayesian Approach to Adversarial Detectioncited by 40
  28. 2019Improving short text classification through global augmentation methodscited by 33
  29. 2019Detecting and Diagnosing Adversarial Images with Class-Conditional Capsule Reconstructionscited by 30
  30. 2021Defending Pre-trained Language Models from Adversarial Word Substitutions Without Performance Sacrificecited by 30
  31. 2019Defending against Whitebox Adversarial Attacks via Randomized Discretizationcited by 29
  32. 2021Using Adversarial Attacks to Reveal the Statistical Bias in Machine Reading Comprehension Modelscited by 29
  33. 2021Grey-box Adversarial Attack And Defence For Sentiment Classificationcited by 28
  34. 2019Adversarial Defense Through Network Profiling Based Path Extractioncited by 24
  35. 2017The RepEval 2017 Shared Task: Multi-Genre Natural Language Inference with Sentence Representationscited by 23
  36. 2020A Geometry-Inspired Attack for Generating Natural Language Adversarial Examplescited by 20
  37. 2021A Strong Baseline for Query Efficient Attacks in a Black Box Settingcited by 16
  38. 2018Identify Susceptible Locations in Medical Records via Adversarial Attacks on Deep Predictive Modelscited by 15

50 most cited of 53 All 53 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

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

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Tougher Text, Smarter Models: Raising the Bar for Adversarial Defence Benchmarks
  2. 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Models
  3. 2024A Constraint-Enforcing Reward for Adversarial Attacks on Text Classifiers
  4. 2025Reformulation is All You Need: Addressing Malicious Text Features in DNNs
  5. 2026Unifying Adversarial Robustness and Training Across Text Scoring Models
  6. 2025Layer-Wise Perturbations via Sparse Autoencoders for Adversarial Text Generation
  7. 2023Token-Level Adversarial Prompt Detection Based on Perplexity Measures and Contextual Information
  8. 2023Red Teaming Language Model Detectors with Language Models