TextAttack: A Framework for Adversarial Attacks, Data Augmentation, and Adversarial Training in NLP
Not on the map. Why?
Abstract (arXiv)
While there has been substantial research using adversarial attacks to analyze NLP models, each attack is implemented in its own code repository. It remains challenging to develop NLP attacks and utilize them to improve model performance. This paper introduces TextAttack, a Python framework for adversarial attacks, data augmentation, and adversarial training in NLP. TextAttack builds attacks from four components: a goal function, a set of constraints, a transformation, and a search method. TextAttack's modular design enables researchers to easily construct attacks from combinations of novel and existing components. TextAttack provides implementations of 16 adversarial attacks from the literature and supports a variety of models and datasets, including BERT and other transformers, and all GLUE tasks. TextAttack also includes data augmentation and adversarial training modules for using components of adversarial attacks to improve model accuracy and robustness. TextAttack is democratizing NLP: anyone can try data augmentation and adversarial training on any model or dataset, with just a few lines of code. Code and tutorials are available at https://github.com/QData/TextAttack.
Key facts. Cited by 45 papers in the map (data through 7 Oct 2026). First posted on arXiv 29 Apr 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 14; 2022: 7; 2023: 11; 2024: 7; 2025: 5; 2026: 1.
45 papers.
Sort:
By area:
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 233
- 2021Robustness Gym: Unifying the NLP Evaluation Landscapecited by 107
- 2021Data Augmentation Approaches in Natural Language Processing: A Surveycited by 82
- 2021Towards Improving Adversarial Training of NLP Modelscited by 79
- 2023Robust Multi-bit Natural Language Watermarking through Invariant Featurescited by 76
- 2021Grey-box Adversarial Attack And Defence For Sentiment Classificationcited by 28
- 2025Cats Confuse Reasoning LLM: Query Agnostic Adversarial Triggers for Reasoning Modelscited by 23
- 2024Benchmarking Large Multimodal Models against Common Corruptionscited by 22
- 2023On the Robustness of Aspect-based Sentiment Analysis: Rethinking Model, Data, and Trainingcited by 20
- 2024Prompt Perturbation in Retrieval-Augmented Generation based Large Language Modelscited by 17
- 2024Towards Building a Robust Toxicity Predictorcited by 14
33 more
- 2021Token-Modification Adversarial Attacks for Natural Language Processing: A Surveycited by 12
- 2024Visual Robustness Benchmark for Visual Question Answering (VQA)cited by 12
- 2022An Evolutionary, Gradient-Free, Query-Efficient, Black-Box Algorithm for Generating Adversarial Instances in Deep Networkscited by 11
- 2022Designing Robust Transformers using Robust Kernel Density Estimationcited by 11
- 2022Self-supervised Context-aware Style Representation for Expressive Speech Synthesiscited by 10
- 2021A Simple and Strong Baseline for Universal Targeted Attacks on Siamese Visual Trackingcited by 9
- 2022A Simple, Yet Effective Approach to Finding Biases in Code Generationcited by 8
- 2023Verifying the Robustness of Automatic Credibility Assessmentcited by 8
- 2023Shilling Black-box Review-based Recommender Systems through Fake Review Generationcited by 8
- 2024A Survey on Responsible Generative AI: What to Generate and What Notcited by 8
- 2024Enhancing Adversarial Attacks through Chain of Thoughtcited by 8
- 2023CitySpec with Shield: A Secure Intelligent Assistant for Requirement Formalizationcited by 7
- 2021Personalized Benchmarking with the Ludwig Benchmarking Toolkitcited by 6
- 2022Interactive Machine Learning: A State of the Art Reviewcited by 6
- 2024VCSearch: Bridging the Gap Between Well-Defined and Ill-Defined Problems in Mathematical Reasoningcited by 6
- 2021Semantic-Preserving Adversarial Text Attackscited by 5
- 2022Text Transformations in Contrastive Self-Supervised Learning: A Reviewcited by 5
- 2021Back-Translated Task Adaptive Pretraining: Improving Accuracy and Robustness on Text Classificationcited by 3
- 2023Expanding Scope: Adapting English Adversarial Attacks to Chinesecited by 3
- 2025Vision Transformer with Adversarial Indicator Token against Adversarial Attacks in Radio Signal Classificationscited by 2
- 2021Robustness Evaluation of Transformer-based Form Field Extractors via Form Attackscited by 1
- 2025Practical, Generalizable and Robust Backdoor Attacks on Text-to-Image Diffusion Modelscited by 1
- 2025Multi-Agent Framework for Threat Mitigation and Resilience in AI-Based Systemscited by 1
- 2021TextFlint: Unified Multilingual Robustness Evaluation Toolkit for Natural Language Processingcited by 0
- 2021Robustness Tests of NLP Machine Learning Models: Search and Semantically Replacecited by 0
- 2021CABACE: Injecting Character Sequence Information and Domain Knowledge for Enhanced Acronym and Long-Form Extractioncited by 0
- 2022A Simple Yet Efficient Method for Adversarial Word-Substitute Attackcited by 0
- 2023Knowledge-Based Counterfactual Queries for Visual Question Answeringcited by 0
- 2023CGDTest: A Constrained Gradient Descent Algorithm for Testing Neural Networkscited by 0
- 2023A Melting Pot of Evolution and Learningcited by 0
- 2023DEFTri: A Few-Shot Label Fused Contextual Representation Learning For Product Defect Triage in e-Commercecited by 0
- 2025GoldenTransformer: A Modular Fault Injection Framework for Transformer Robustness Researchcited by 0
- 2026Vulnerability of Natural Language Classifiers to Evolutionary Generated Adversarial Textcited by 0
- 2026Vulnerability of Natural Language Classifiers to Evolutionary Generated Adversarial Text25 Jun 2026
- 2025Multi-Agent Framework for Threat Mitigation and Resilience in AI-Based Systems29 Dec 2025
- 2025GoldenTransformer: A Modular Fault Injection Framework for Transformer Robustness Research13 Sep 2025
- 2025Practical, Generalizable and Robust Backdoor Attacks on Text-to-Image Diffusion Models3 Aug 2025
- 2025Vision Transformer with Adversarial Indicator Token against Adversarial Attacks in Radio Signal Classifications13 Jun 2025
- 2025Cats Confuse Reasoning LLM: Query Agnostic Adversarial Triggers for Reasoning Models3 Mar 2025
- 2024Enhancing Adversarial Attacks through Chain of Thought29 Oct 2024
- 2024Visual Robustness Benchmark for Visual Question Answering (VQA)3 Jul 2024
- 2024VCSearch: Bridging the Gap Between Well-Defined and Ill-Defined Problems in Mathematical Reasoning7 Jun 2024
- 2024Towards Building a Robust Toxicity Predictor9 Apr 2024
- 2024A Survey on Responsible Generative AI: What to Generate and What Not8 Apr 2024
- 2024Prompt Perturbation in Retrieval-Augmented Generation based Large Language Models11 Feb 2024
33 more
- 2024Benchmarking Large Multimodal Models against Common Corruptions22 Jan 2024
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Models1 Sep 2023
- 2023DEFTri: A Few-Shot Label Fused Contextual Representation Learning For Product Defect Triage in e-Commerce21 Jul 2023
- 2023Shilling Black-box Review-based Recommender Systems through Fake Review Generation27 Jun 2023
- 2023A Melting Pot of Evolution and Learning8 Jun 2023
- 2023Expanding Scope: Adapting English Adversarial Attacks to Chinese8 Jun 2023
- 2023Robust Multi-bit Natural Language Watermarking through Invariant Features3 May 2023
- 2023On the Robustness of Aspect-based Sentiment Analysis: Rethinking Model, Data, and Training19 Apr 2023
- 2023CGDTest: A Constrained Gradient Descent Algorithm for Testing Neural Networks4 Apr 2023
- 2023Verifying the Robustness of Automatic Credibility Assessment14 Mar 2023
- 2023Knowledge-Based Counterfactual Queries for Visual Question Answering5 Mar 2023
- 2023CitySpec with Shield: A Secure Intelligent Assistant for Requirement Formalization19 Feb 2023
- 2022A Simple, Yet Effective Approach to Finding Biases in Code Generation31 Oct 2022
- 2022Designing Robust Transformers using Robust Kernel Density Estimation11 Oct 2022
- 2022An Evolutionary, Gradient-Free, Query-Efficient, Black-Box Algorithm for Generating Adversarial Instances in Deep Networks17 Aug 2022
- 2022Interactive Machine Learning: A State of the Art Review13 Jul 2022
- 2022Self-supervised Context-aware Style Representation for Expressive Speech Synthesis25 Jun 2022
- 2022A Simple Yet Efficient Method for Adversarial Word-Substitute Attack7 May 2022
- 2022Text Transformations in Contrastive Self-Supervised Learning: A Review22 Mar 2022
- 2021CABACE: Injecting Character Sequence Information and Domain Knowledge for Enhanced Acronym and Long-Form Extraction25 Dec 2021
- 2021Personalized Benchmarking with the Ludwig Benchmarking Toolkit8 Nov 2021
- 2021Robustness Evaluation of Transformer-based Form Field Extractors via Form Attacks8 Oct 2021
- 2021Data Augmentation Approaches in Natural Language Processing: A Survey5 Oct 2021
- 2021Towards Improving Adversarial Training of NLP Models1 Sep 2021
- 2021Semantic-Preserving Adversarial Text Attacks23 Aug 2021
- 2021Back-Translated Task Adaptive Pretraining: Improving Accuracy and Robustness on Text Classification22 Jul 2021
- 2021A Simple and Strong Baseline for Universal Targeted Attacks on Siamese Visual Tracking6 May 2021
- 2021Robustness Tests of NLP Machine Learning Models: Search and Semantically Replace20 Apr 2021
- 2021Gradient-based Adversarial Attacks against Text Transformers15 Apr 2021
- 2021Grey-box Adversarial Attack And Defence For Sentiment Classification22 Mar 2021
- 2021TextFlint: Unified Multilingual Robustness Evaluation Toolkit for Natural Language Processing21 Mar 2021
- 2021Token-Modification Adversarial Attacks for Natural Language Processing: A Survey1 Mar 2021
- 2021Robustness Gym: Unifying the NLP Evaluation Landscape13 Jan 2021
- 2025Cats Confuse Reasoning LLM: Query Agnostic Adversarial Triggers for Reasoning Modelscited by 23
- 2024Benchmarking Large Multimodal Models against Common Corruptionscited by 22
- 2024Enhancing Adversarial Attacks through Chain of Thoughtcited by 8
- 2024VCSearch: Bridging the Gap Between Well-Defined and Ill-Defined Problems in Mathematical Reasoningcited by 6
- 2025Cats Confuse Reasoning LLM: Query Agnostic Adversarial Triggers for Reasoning Models3 Mar 2025
- 2024Enhancing Adversarial Attacks through Chain of Thought29 Oct 2024
- 2024VCSearch: Bridging the Gap Between Well-Defined and Ill-Defined Problems in Mathematical Reasoning7 Jun 2024
- 2024Benchmarking Large Multimodal Models against Common Corruptions22 Jan 2024
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 233
- 2021Robustness Gym: Unifying the NLP Evaluation Landscapecited by 107
- 2021Data Augmentation Approaches in Natural Language Processing: A Surveycited by 82
- 2021Towards Improving Adversarial Training of NLP Modelscited by 79
- 2021Grey-box Adversarial Attack And Defence For Sentiment Classificationcited by 28
- 2023On the Robustness of Aspect-based Sentiment Analysis: Rethinking Model, Data, and Trainingcited by 20
- 2024Towards Building a Robust Toxicity Predictorcited by 14
- 2021Token-Modification Adversarial Attacks for Natural Language Processing: A Surveycited by 12
- 2024Visual Robustness Benchmark for Visual Question Answering (VQA)cited by 12
- 2022An Evolutionary, Gradient-Free, Query-Efficient, Black-Box Algorithm for Generating Adversarial Instances in Deep Networkscited by 11
- 2022Designing Robust Transformers using Robust Kernel Density Estimationcited by 11
- 2022Self-supervised Context-aware Style Representation for Expressive Speech Synthesiscited by 10
12 most cited of 36 All 36 (JSON)
- 2026Vulnerability of Natural Language Classifiers to Evolutionary Generated Adversarial Text25 Jun 2026
- 2025GoldenTransformer: A Modular Fault Injection Framework for Transformer Robustness Research13 Sep 2025
- 2025Vision Transformer with Adversarial Indicator Token against Adversarial Attacks in Radio Signal Classifications13 Jun 2025
- 2024Visual Robustness Benchmark for Visual Question Answering (VQA)3 Jul 2024
- 2024Towards Building a Robust Toxicity Predictor9 Apr 2024
- 2024A Survey on Responsible Generative AI: What to Generate and What Not8 Apr 2024
- 2023DEFTri: A Few-Shot Label Fused Contextual Representation Learning For Product Defect Triage in e-Commerce21 Jul 2023
- 2023Shilling Black-box Review-based Recommender Systems through Fake Review Generation27 Jun 2023
- 2023A Melting Pot of Evolution and Learning8 Jun 2023
- 2023Expanding Scope: Adapting English Adversarial Attacks to Chinese8 Jun 2023
- 2023On the Robustness of Aspect-based Sentiment Analysis: Rethinking Model, Data, and Training19 Apr 2023
- 2023CGDTest: A Constrained Gradient Descent Algorithm for Testing Neural Networks4 Apr 2023
12 newest of 36 All 36 (JSON)