论文标题
TextAttack:NLP中的对抗性攻击,数据增强和对抗培训的框架
TextAttack: A Framework for Adversarial Attacks, Data Augmentation, and Adversarial Training in NLP
论文作者
论文摘要
尽管已经进行了大量研究使用对抗性攻击来分析NLP模型,但每个攻击都在其自己的代码存储库中实施。开发NLP攻击并利用它们来提高模型性能仍然充满挑战。本文介绍了TextAttack,这是NLP中针对对抗攻击,数据增强和对抗培训的Python框架。 TextAttack从四个组件中构建攻击:目标功能,一组约束,转换和搜索方法。 TextAttack的模块化设计使研究人员可以轻松地从新颖和现有组件的组合中构建攻击。 TextAttack提供了来自文献的16项对抗性攻击的实现,并支持各种模型和数据集,包括Bert和其他变形金刚以及所有胶水任务。 TextAttack还包括数据增强和对抗性训练模块,用于使用对抗性攻击的组件来提高模型的准确性和鲁棒性。 TextAttack正在民主化NLP:任何人都可以在任何模型或数据集上尝试使用数据扩展和对抗性培训,并使用几行代码。代码和教程可在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.