Rethinking Textual Adversarial Defense for Pre-trained Language Models
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
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2014Explaining and Harnessing Adversarial Examplescited by 7,364
- 2013Intriguing properties of neural networkscited by 5,155
- 2016Towards Evaluating the Robustness of Neural Networkscited by 2,998
- 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,268
- 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 807
- 2015The Limitations of Deep Learning in Adversarial Settingscited by 790
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
- 2017Adversarial Examples Are Not Easily Detected: Bypassing Ten Detection Methodscited by 546
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 491
- 2020CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instancescited by 441
38 more
- 2018Generating Natural Language Adversarial Examplescited by 424
- 2017Mitigating Adversarial Effects Through Randomizationcited by 383
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 381
- 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 345
- 2020BAE: BERT-based Adversarial Examples for Text Classificationcited by 316
- 2018Adversarial Example Generation with Syntactically Controlled Paraphrase Networkscited by 286
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 234
- 2017Generating Natural Adversarial Examplescited by 183
- 2019Certified Robustness to Adversarial Word Substitutionscited by 168
- 2019Combating Adversarial Misspellings with Robust Word Recognitioncited by 163
- 2016Counter-fitting Word Vectors to Linguistic Constraintscited by 140
- 2020Contextualized Perturbation for Textual Adversarial Attackcited by 136
- 2021Advances in adversarial attacks and defenses in computer vision: A surveycited by 127
- 2017Deep Text Classification Can be Fooledcited by 106
- 2018ComDefend: An Efficient Image Compression Model to Defend Adversarial Examplescited by 105
- 2016Crafting Adversarial Input Sequences for Recurrent Neural Networkscited by 103
- 2018Feature Distillation: DNN-Oriented JPEG Compression Against Adversarial Examplescited by 99
- 2019Achieving Verified Robustness to Symbol Substitutions via Interval Bound Propagationcited by 88
- 2017Keeping the Bad Guys Out: Protecting and Vaccinating Deep Learning with JPEG Compressioncited by 87
- 2020SAFER: A Structure-free Approach for Certified Robustness to Adversarial Word Substitutionscited by 73
- 2021Towards Robustness Against Natural Language Word Substitutionscited by 69
- 2019Learning to Discriminate Perturbations for Blocking Adversarial Attacks in Text Classificationcited by 57
- 2020Frequency-Guided Word Substitutions for Detecting Textual Adversarial Examplescited by 54
- 2018Training verified learners with learned verifierscited by 50
- 2020Generating Natural Language Attacks in a Hard Label Black Box Settingcited by 50
- 2018Sentence-Level Fluency Evaluation: References Help, But Can Be Spared!cited by 43
- 2021LiBRe: A Practical Bayesian Approach to Adversarial Detectioncited by 40
- 2019Improving short text classification through global augmentation methodscited by 33
- 2019Detecting and Diagnosing Adversarial Images with Class-Conditional Capsule Reconstructionscited by 30
- 2021Defending Pre-trained Language Models from Adversarial Word Substitutions Without Performance Sacrificecited by 30
- 2019Defending against Whitebox Adversarial Attacks via Randomized Discretizationcited by 29
- 2021Using Adversarial Attacks to Reveal the Statistical Bias in Machine Reading Comprehension Modelscited by 29
- 2021Grey-box Adversarial Attack And Defence For Sentiment Classificationcited by 28
- 2019Adversarial Defense Through Network Profiling Based Path Extractioncited by 24
- 2017The RepEval 2017 Shared Task: Multi-Genre Natural Language Inference with Sentence Representationscited by 23
- 2020A Geometry-Inspired Attack for Generating Natural Language Adversarial Examplescited by 20
- 2021A Strong Baseline for Query Efficient Attacks in a Black Box Settingcited by 16
- 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
Citing papers per year: 2022: 2; 2023: 1; 2024: 0; 2025: 1; 2026: 1.
5 papers.
- 2022Expose Backdoors on the Way: A Feature-Based Efficient Defense against Textual Backdoor Attackscited by 19
- 2023Masked Language Model Based Textual Adversarial Example Detectioncited by 5
- 2022Disentangled Text Representation Learning with Information-Theoretic Perspective for Adversarial Robustnesscited by 4
- 2025Exploring Gradient-Guided Masked Language Model to Detect Textual Adversarial Attackscited by 4
- 2026Off-The-Shelf Image-to-Image Models Are All You Need To Defeat Image Protection Schemescited by 1
- 2026Off-The-Shelf Image-to-Image Models Are All You Need To Defeat Image Protection Schemes25 Feb 2026
- 2025Exploring Gradient-Guided Masked Language Model to Detect Textual Adversarial Attacks8 Apr 2025
- 2023Masked Language Model Based Textual Adversarial Example Detection18 Apr 2023
- 2022Disentangled Text Representation Learning with Information-Theoretic Perspective for Adversarial Robustness26 Oct 2022
- 2022Expose Backdoors on the Way: A Feature-Based Efficient Defense against Textual Backdoor Attacks14 Oct 2022
Similar, not cited
Close in wording, no citation either way
- 2025Tougher Text, Smarter Models: Raising the Bar for Adversarial Defence Benchmarks
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Models
- 2024A Constraint-Enforcing Reward for Adversarial Attacks on Text Classifiers
- 2025Reformulation is All You Need: Addressing Malicious Text Features in DNNs
- 2026Unifying Adversarial Robustness and Training Across Text Scoring Models
- 2025Layer-Wise Perturbations via Sparse Autoencoders for Adversarial Text Generation
- 2023Token-Level Adversarial Prompt Detection Based on Perplexity Measures and Contextual Information
- 2023Red Teaming Language Model Detectors with Language Models