arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2005.05909cs.CLcs.AIcs.LG
收藏

TextAttack:一个在NLP中进行对抗攻击、数据增强和对抗训练的框架

TextAttack: A Framework for Adversarial Attacks, Data Augmentation, and Adversarial Training in NLP

Department of Computer Science, University of Virginia(弗吉尼亚大学计算机科学系);Computer Science and Artificial Intelligence Laboratory, MIT(麻省理工学院计算机科学与人工智能实验室)

John X. Morris, Eli Lifland, Jin Yong Yoo, Jake Grigsby, Di Jin, Yanjun Qi

摘要:

虽然已经有大量的研究使用对抗攻击来分析NLP模型,但每种攻击都在自己的代码库中实现。开发NLP攻击并利用它们来提高模型性能仍然具有挑战性。本文介绍了TextAttack,这是一个用于NLP中的对抗攻击、数据增强和对抗训练的Python框架。TextAttack从四个组件构建攻击:目标函数,一组约束,转换和搜索方法。TextAttack的模块化设计使研究人员能够很容易地从新的和现有的组件的组合构建攻击。TextAttack提供了文献中16种对抗攻击的实现,并支持各种模型和数据集,包括BERT和其他Transformers,以及所有GLUE任务。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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑