Textual adversarial attacking has received wide and increasing attention in recent years. Various attack models have been proposed, which are enormously distinct and implemented with different programming frameworks and settings. These facts hinder quick utilization and fair comparison of attack models. In this paper, we present an open-source textual adversarial attack toolkit named OpenAttack to solve these issues. Compared with existing other textual adversarial attack toolkits, OpenAttack has its unique strengths in support for all attack types, multilinguality, and parallel processing. Currently, OpenAttack includes 15 typical attack models that cover all attack types. Its highly inclusive modular design not only supports quick utilization of existing attack models, but also enables great flexibility and extensibility. OpenAttack has broad uses including comparing and evaluating attack models, measuring robustness of a model, assisting in developing new attack models, and adversarial training. Source code and documentation can be obtained at https://github.com/thunlp/OpenAttack.
翻译:近些年来,人们广泛和日益关注对立的文字攻击,提出了各种攻击模式,这些模式非常不同,而且在不同的程序框架和环境下得到实施,这些事实阻碍了对攻击模式的迅速利用和公平比较。在本文件中,我们提出了一个名为OpenAttack的开放源文本对抗攻击工具包,以解决这些问题。与现有的其他对立文字攻击工具包相比,OpenAttack在支持所有攻击类型、多语言性和平行处理方面具有其独特的优势。目前,OpenAttack包括15个典型的攻击模式,涵盖所有攻击类型。其高度包容性的模块设计不仅支持快速利用现有的攻击模式,而且还提供了极大的灵活性和可扩展性。OpenAtack有广泛的用途,包括比较和评价攻击模式,衡量模型的稳健性,协助开发新的攻击模式,以及对抗性培训。可在https://github.com/thunp/Op-Atack获得源代码和文件。