Defending Pre-trained Language Models from Adversarial Word Substitutions Without Performance Sacrifice
Not on the map. Why?
Abstract (arXiv)
Pre-trained contextualized language models (PrLMs) have led to strong performance gains in downstream natural language understanding tasks. However, PrLMs can still be easily fooled by adversarial word substitution, which is one of the most challenging textual adversarial attack methods. Existing defence approaches suffer from notable performance loss and complexities. Thus, this paper presents a compact and performance-preserved framework, Anomaly Detection with Frequency-Aware Randomization (ADFAR). In detail, we design an auxiliary anomaly detection classifier and adopt a multi-task learning procedure, by which PrLMs are able to distinguish adversarial input samples. Then, in order to defend adversarial word substitution, a frequency-aware randomization process is applied to those recognized adversarial input samples. Empirical results show that ADFAR significantly outperforms those newly proposed defense methods over various tasks with much higher inference speed. Remarkably, ADFAR does not impair the overall performance of PrLMs. The code is available at https://github.com/LilyNLP/ADFAR
Key facts. Cited by 30 papers in the map (data through 14 Oct 2026). Builds on 30 of its 46 references that are in the map. First posted on arXiv 30 May 2021.
Builds on
30 of 46 references.
References · 30
- 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
- 2017Decoupled Weight Decay Regularizationcited by 1,831
- 2016Adversarial examples in the physical worldcited by 1,769
- 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,340
- 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 807
- 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 807
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 491
- 2018Generating Natural Language Adversarial Examplescited by 424
- 2017Mitigating Adversarial Effects Through Randomizationcited by 383
18 more
- 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
- 2019SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models through Principled Regularized Optimizationcited by 254
- 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
- 2019Semantics-aware BERT for Language Understandingcited by 112
- 2017Deep Text Classification Can be Fooledcited by 106
- 2019Achieving Verified Robustness to Symbol Substitutions via Interval Bound Propagationcited by 88
- 2018On Adversarial Examples for Character-Level Neural Machine Translationcited by 85
- 2020SAFER: A Structure-free Approach for Certified Robustness to Adversarial Word Substitutionscited by 73
- 2019Learning to Discriminate Perturbations for Blocking Adversarial Attacks in Text Classificationcited by 57
- 2020Frequency-Guided Word Substitutions for Detecting Textual Adversarial Examplescited by 54
- 2019SG-Net: Syntax-Guided Machine Reading Comprehensioncited by 52
- 2018Training verified learners with learned verifierscited by 50
- 2017The RepEval 2017 Shared Task: Multi-Genre Natural Language Inference with Sentence Representationscited by 23
- 2017Grammatical Error Correction with Neural Reinforcement Learningcited by 7
Built on by
Citing papers per year: 2021: 2; 2022: 9; 2023: 6; 2024: 7; 2025: 4; 2026: 2.
30 papers.
Sort:
By area:
- 2022Why Should Adversarial Perturbations be Imperceptible? Rethink the Research Paradigm in Adversarial NLPcited by 102
- 2024Navigating the Risks: A Survey of Security, Privacy, and Ethics Threats in LLM-Based Agentscited by 65
- 2022Detection of Word Adversarial Examples in Text Classification: Benchmark and Baseline via Robust Density Estimationcited by 32
- 2024Large Language Models and Causal Inference in Collaboration: A Surveycited by 26
- 2022A Survey of Adversarial Defences and Robustness in NLPcited by 23
- 2024A Causal Explainable Guardrails for Large Language Modelscited by 18
- 2022PSSAT: A Perturbed Semantic Structure Awareness Transferring Method for Perturbation-Robust Slot Fillingcited by 9
- 2022Adversarial Self-Attention for Language Understandingcited by 8
- 2023TextShield: Beyond Successfully Detecting Adversarial Sentences in Text Classificationcited by 8
- 2023Don't Retrain, Just Rewrite: Countering Adversarial Perturbations by Rewriting Textcited by 8
- 2024Desiderata for the Context Use of Question Answering Systemscited by 7
- 2021Improving Question Answering Performance Using Knowledge Distillation and Active Learningcited by 6
18 more
- 2022Rethinking Textual Adversarial Defense for Pre-trained Language Modelscited by 5
- 2021Adversarial Attacks and Defenses for Social Network Text Processing Applications: Techniques, Challenges and Future Research Directionscited by 4
- 2022Disentangled Text Representation Learning with Information-Theoretic Perspective for Adversarial Robustnesscited by 4
- 2023The Best Defense is Attack: Repairing Semantics in Textual Adversarial Examplescited by 3
- 2024SemRoDe: Macro Adversarial Training to Learn Representations That are Robust to Word-Level Attackscited by 3
- 2023On the Universal Adversarial Perturbations for Efficient Data-free Adversarial Detectioncited by 2
- 2024Enhance Robustness of Language Models Against Variation Attack through Graph Integrationcited by 2
- 2025Tougher Text, Smarter Models: Raising the Bar for Adversarial Defence Benchmarkscited by 2
- 2025NLP Security and Ethics, in the Wildcited by 2
- 2025GenoArmory: A Unified Evaluation Framework for Adversarial Attacks on Genomic Foundation Modelscited by 2
- 2025Adversarial Defence without Adversarial Defence: Enhancing Language Model Robustness via Instance-level Principal Component Removalcited by 2
- 2022RoChBert: Towards Robust BERT Fine-tuning for Chinesecited by 1
- 2024DiffuseDef: Improved Robustness to Adversarial Attacks via Iterative Denoisingcited by 1
- 2022Using calibrator to improve robustness in Machine Reading Comprehensioncited by 0
- 2023SCAT: Robust Self-supervised Contrastive Learning via Adversarial Training for Text Classificationcited by 0
- 2023What Learned Representations and Influence Functions Can Tell Us About Adversarial Examplescited by 0
- 2026RTD-Guard: A Black-Box Textual Adversarial Detection Framework via Replacement Token Detectioncited by 0
- 2026Hybrid Adversarial Defence for Natural Language Understanding Taskscited by 0
- 2026Hybrid Adversarial Defence for Natural Language Understanding Tasks3 Jun 2026
- 2026RTD-Guard: A Black-Box Textual Adversarial Detection Framework via Replacement Token Detection13 Mar 2026
- 2025Adversarial Defence without Adversarial Defence: Enhancing Language Model Robustness via Instance-level Principal Component Removal29 Jul 2025
- 2025GenoArmory: A Unified Evaluation Framework for Adversarial Attacks on Genomic Foundation Models16 May 2025
- 2025NLP Security and Ethics, in the Wild9 Apr 2025
- 2025Tougher Text, Smarter Models: Raising the Bar for Adversarial Defence Benchmarks5 Jan 2025
- 2024Navigating the Risks: A Survey of Security, Privacy, and Ethics Threats in LLM-Based Agents14 Nov 2024
- 2024DiffuseDef: Improved Robustness to Adversarial Attacks via Iterative Denoising28 Jun 2024
- 2024A Causal Explainable Guardrails for Large Language Models7 May 2024
- 2024Enhance Robustness of Language Models Against Variation Attack through Graph Integration18 Apr 2024
- 2024SemRoDe: Macro Adversarial Training to Learn Representations That are Robust to Word-Level Attacks27 Mar 2024
- 2024Large Language Models and Causal Inference in Collaboration: A Survey14 Mar 2024
18 more
- 2024Desiderata for the Context Use of Question Answering Systems31 Jan 2024
- 2023What Learned Representations and Influence Functions Can Tell Us About Adversarial Examples19 Sep 2023
- 2023SCAT: Robust Self-supervised Contrastive Learning via Adversarial Training for Text Classification4 Jul 2023
- 2023On the Universal Adversarial Perturbations for Efficient Data-free Adversarial Detection27 Jun 2023
- 2023Don't Retrain, Just Rewrite: Countering Adversarial Perturbations by Rewriting Text25 May 2023
- 2023The Best Defense is Attack: Repairing Semantics in Textual Adversarial Examples6 May 2023
- 2023TextShield: Beyond Successfully Detecting Adversarial Sentences in Text Classification3 Feb 2023
- 2022RoChBert: Towards Robust BERT Fine-tuning for Chinese28 Oct 2022
- 2022Disentangled Text Representation Learning with Information-Theoretic Perspective for Adversarial Robustness26 Oct 2022
- 2022Why Should Adversarial Perturbations be Imperceptible? Rethink the Research Paradigm in Adversarial NLP19 Oct 2022
- 2022PSSAT: A Perturbed Semantic Structure Awareness Transferring Method for Perturbation-Robust Slot Filling24 Aug 2022
- 2022Rethinking Textual Adversarial Defense for Pre-trained Language Models21 Jul 2022
- 2022Adversarial Self-Attention for Language Understanding25 Jun 2022
- 2022A Survey of Adversarial Defences and Robustness in NLP12 Mar 2022
- 2022Detection of Word Adversarial Examples in Text Classification: Benchmark and Baseline via Robust Density Estimation3 Mar 2022
- 2022Using calibrator to improve robustness in Machine Reading Comprehension24 Feb 2022
- 2021Adversarial Attacks and Defenses for Social Network Text Processing Applications: Techniques, Challenges and Future Research Directions26 Oct 2021
- 2021Improving Question Answering Performance Using Knowledge Distillation and Active Learning26 Sep 2021
- 2022Why Should Adversarial Perturbations be Imperceptible? Rethink the Research Paradigm in Adversarial NLPcited by 102
- 2022Detection of Word Adversarial Examples in Text Classification: Benchmark and Baseline via Robust Density Estimationcited by 32
- 2024Large Language Models and Causal Inference in Collaboration: A Surveycited by 26
- 2022A Survey of Adversarial Defences and Robustness in NLPcited by 23
- 2022PSSAT: A Perturbed Semantic Structure Awareness Transferring Method for Perturbation-Robust Slot Fillingcited by 9
- 2022Adversarial Self-Attention for Language Understandingcited by 8
- 2023TextShield: Beyond Successfully Detecting Adversarial Sentences in Text Classificationcited by 8
- 2023Don't Retrain, Just Rewrite: Countering Adversarial Perturbations by Rewriting Textcited by 8
- 2024Desiderata for the Context Use of Question Answering Systemscited by 7
- 2022Rethinking Textual Adversarial Defense for Pre-trained Language Modelscited by 5
- 2021Adversarial Attacks and Defenses for Social Network Text Processing Applications: Techniques, Challenges and Future Research Directionscited by 4
- 2022Disentangled Text Representation Learning with Information-Theoretic Perspective for Adversarial Robustnesscited by 4
12 most cited of 26 All 26 (JSON)
- 2026RTD-Guard: A Black-Box Textual Adversarial Detection Framework via Replacement Token Detection13 Mar 2026
- 2025Adversarial Defence without Adversarial Defence: Enhancing Language Model Robustness via Instance-level Principal Component Removal29 Jul 2025
- 2025GenoArmory: A Unified Evaluation Framework for Adversarial Attacks on Genomic Foundation Models16 May 2025
- 2025NLP Security and Ethics, in the Wild9 Apr 2025
- 2025Tougher Text, Smarter Models: Raising the Bar for Adversarial Defence Benchmarks5 Jan 2025
- 2024DiffuseDef: Improved Robustness to Adversarial Attacks via Iterative Denoising28 Jun 2024
- 2024Enhance Robustness of Language Models Against Variation Attack through Graph Integration18 Apr 2024
- 2024SemRoDe: Macro Adversarial Training to Learn Representations That are Robust to Word-Level Attacks27 Mar 2024
- 2024Large Language Models and Causal Inference in Collaboration: A Survey14 Mar 2024
- 2024Desiderata for the Context Use of Question Answering Systems31 Jan 2024
- 2023What Learned Representations and Influence Functions Can Tell Us About Adversarial Examples19 Sep 2023
- 2023SCAT: Robust Self-supervised Contrastive Learning via Adversarial Training for Text Classification4 Jul 2023
12 newest of 26 All 26 (JSON)