TextShield: Beyond Successfully Detecting Adversarial Sentences in Text Classification
Not on the map. Why?
Abstract (arXiv)
Adversarial attack serves as a major challenge for neural network models in NLP, which precludes the model's deployment in safety-critical applications. A recent line of work, detection-based defense, aims to distinguish adversarial sentences from benign ones. However, {the core limitation of previous detection methods is being incapable of giving correct predictions on adversarial sentences unlike defense methods from other paradigms.} To solve this issue, this paper proposes TextShield: (1) we discover a link between text attack and saliency information, and then we propose a saliency-based detector, which can effectively detect whether an input sentence is adversarial or not. (2) We design a saliency-based corrector, which converts the detected adversary sentences to benign ones. By combining the saliency-based detector and corrector, TextShield extends the detection-only paradigm to a detection-correction paradigm, thus filling the gap in the existing detection-based defense. Comprehensive experiments show that (a) TextShield consistently achieves higher or comparable performance than state-of-the-art defense methods across various attacks on different benchmarks. (b) our saliency-based detector outperforms existing detectors for detecting adversarial sentences.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 44 of its 63 references that are in the map. First posted on arXiv 3 Feb 2023.
Builds on
44 of 63 references.
References · 44
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2017Axiomatic Attribution for Deep Networkscited by 3,350
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,348
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2019Theoretically Principled Trade-off between Robustness and Accuracycited by 1,510
- 2014Convolutional Neural Networks for Sentence Classificationcited by 1,124
- 2017Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoningcited by 1,012
- 2014Striving for Simplicity: The All Convolutional Netcited by 983
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2017Adversarial Examples for Evaluating Reading Comprehension Systemscited by 568
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
32 more
- 2018Generating Natural Language Adversarial Examplescited by 422
- 2020Backdoor Learning: A Surveycited by 412
- 2019PAWS: Paraphrase Adversaries from Word Scramblingcited by 395
- 2020BAE: BERT-based Adversarial Examples for Text Classificationcited by 316
- 2017Synthetic and Natural Noise Both Break Neural Machine Translationcited by 304
- 2016Layer-wise Relevance Propagation for Neural Networks with Local Renormalization Layerscited by 197
- 2019Certified Robustness to Adversarial Word Substitutionscited by 164
- 2017Neural Trojanscited by 151
- 2020Contextualized Perturbation for Textual Adversarial Attackcited by 136
- 2019Text Processing Like Humans Do: Visually Attacking and Shielding NLP Systemscited by 99
- 2020InfoBERT: Improving Robustness of Language Models from An Information Theoretic Perspectivecited by 92
- 2019Achieving Verified Robustness to Symbol Substitutions via Interval Bound Propagationcited by 87
- 2020Robustness Verification for Transformerscited by 76
- 2021Towards Robustness Against Natural Language Word Substitutionscited by 68
- 2020Robust Encodings: A Framework for Combating Adversarial Typoscited by 58
- 2020Frequency-Guided Word Substitutions for Detecting Textual Adversarial Examplescited by 54
- 2021Model Extraction and Adversarial Transferability, Your BERT is Vulnerable!cited by 51
- 2022SemAttack: Natural Textual Attacks via Different Semantic Spacescited by 42
- 2021LiBRe: A Practical Bayesian Approach to Adversarial Detectioncited by 40
- 2019Natural Language Adversarial Defense through Synonym Encodingcited by 39
- 2019POPQORN: Quantifying Robustness of Recurrent Neural Networkscited by 36
- 2018Detection based Defense against Adversarial Examples from the Steganalysis Point of Viewcited by 32
- 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
- 2021Using Adversarial Attacks to Reveal the Statistical Bias in Machine Reading Comprehension Modelscited by 29
- 2020Defense against Adversarial Attacks in NLP via Dirichlet Neighborhood Ensemblecited by 26
- 2022"That Is a Suspicious Reaction!": Interpreting Logits Variation to Detect NLP Adversarial Attackscited by 24
- 2022A Survey of Adversarial Defences and Robustness in NLPcited by 22
- 2020Connecting the Dots: Detecting Adversarial Perturbations Using Context Inconsistencycited by 16
- 2020A Sweet Rabbit Hole by DARCY: Using Honeypots to Detect Universal Trigger's Adversarial Attackscited by 14
- 2020SHIELD: Defending Textual Neural Networks against Multiple Black-Box Adversarial Attacks with Stochastic Multi-Expert Patchercited by 13
- 2022Perturbations in the Wild: Leveraging Human-Written Text Perturbations for Realistic Adversarial Attack and Defensecited by 12
Built on by
Citing papers per year: 2023: 3; 2024: 1; 2025: 3; 2026: 1.
8 papers.
- 2023The Trickle-down Impact of Reward (In-)consistency on RLHFcited by 29
- 2025Exploring Gradient-Guided Masked Language Model to Detect Textual Adversarial Attackscited by 4
- 2023The Best Defense is Attack: Repairing Semantics in Textual Adversarial Examplescited by 3
- 2024Enhancing adversarial robustness in Natural Language Inference using explanationscited by 2
- 2025Adversarial Defence without Adversarial Defence: Enhancing Language Model Robustness via Instance-level Principal Component Removalcited by 2
- 2025Guided Perturbation Sensitivity (GPS): Detecting Adversarial Text via Embedding Stability and Word Importancecited by 2
- 2023Alert-ME: An Explainability-Driven Defense Against Adversarial Examples in Transformer-Based Text Classificationcited by 1
- 2026RTD-Guard: A Black-Box Textual Adversarial Detection Framework via Replacement Token Detectioncited by 0
- 2026RTD-Guard: A Black-Box Textual Adversarial Detection Framework via Replacement Token Detection13 Mar 2026
- 2025Guided Perturbation Sensitivity (GPS): Detecting Adversarial Text via Embedding Stability and Word Importance6 Aug 2025
- 2025Adversarial Defence without Adversarial Defence: Enhancing Language Model Robustness via Instance-level Principal Component Removal29 Jul 2025
- 2025Exploring Gradient-Guided Masked Language Model to Detect Textual Adversarial Attacks8 Apr 2025
- 2024Enhancing adversarial robustness in Natural Language Inference using explanations11 Sep 2024
- 2023The Trickle-down Impact of Reward (In-)consistency on RLHF28 Sep 2023
- 2023Alert-ME: An Explainability-Driven Defense Against Adversarial Examples in Transformer-Based Text Classification3 Jul 2023
- 2023The Best Defense is Attack: Repairing Semantics in Textual Adversarial Examples6 May 2023