Publication | Open Access
TextAttack: A Framework for Adversarial Attacks, Data Augmentation, and Adversarial Training in NLP
522
Citations
32
References
2020
Year
Unknown Venue
Artificial IntelligenceAbuse DetectionEngineeringMachine LearningEvasion TechniqueInformation ForensicsNlp AttacksCorpus LinguisticsNatural Language ProcessingNlp ModelsData ScienceComputational LinguisticsAdversarial Machine LearningAdversarial TrainingMachine TranslationAdversarial AttacksLarge Ai ModelData AugmentationComputer ScienceDeep LearningData SecurityAttack Model
Adversarial attacks are extensively studied in NLP, yet each attack is implemented in a separate repository, making it difficult to develop and apply them to improve model performance. This paper introduces TextAttack, a Python framework for adversarial attacks, data augmentation, and adversarial training in NLP. TextAttack is constructed from four modular components—goal function, constraints, transformation, and search method—enabling researchers to combine existing or novel parts and providing 16 pre‑implemented attacks for models such as BERT across GLUE tasks. By leveraging TextAttack’s data augmentation and adversarial training modules, users can enhance model accuracy and robustness on any dataset with only a few lines of code. Code and tutorials are available at https://github.com/QData/TextAttack.
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.
| Year | Citations | |
|---|---|---|
Page 1
Page 1