论文标题

通过生成模型,大规模生成自然语言对抗性示例

Generating Natural Language Adversarial Examples on a Large Scale with Generative Models

论文作者

Ren, Yankun, Lin, Jianbin, Tang, Siliang, Zhou, Jun, Yang, Shuang, Qi, Yuan, Ren, Xiang

论文摘要

如今,文本分类模型已被广泛使用。但是,发现这些分类器很容易被对抗性示例所愚弄。幸运的是,标准攻击方法以一对的方式生成对抗文本,也就是说,只有通过替换几个单词来从现实世界文本创建对抗文本。在许多应用程序中,这些文本的数量有限,因此它们相应的对抗示例通常不够多样化,有时甚至难以阅读,因此人类很容易检测到,并且不能大规模造成混乱。在本文中,我们提出了一个端到端解决方案,以使用生成模型从头开始有效地生成对抗文本,而生成模型不限于扰动给定的文本。我们称其为不受限制的对抗性文本生成。具体而言,我们训练有条件的变异自动编码器(VAE),并具有额外的对抗性损失,以指导对抗性示例的产生。此外,为了提高对抗性文本的有效性,我们利用歧视器和生成对抗网络(GAN)的培训框架使对抗文本与真实数据一致。情感分析的实验结果证明了我们方法的可扩展性和效率。它可以攻击比现有方法更高的成功率的文本分类模型,并在此期间为人类提供可接受的质量。

Today text classification models have been widely used. However, these classifiers are found to be easily fooled by adversarial examples. Fortunately, standard attacking methods generate adversarial texts in a pair-wise way, that is, an adversarial text can only be created from a real-world text by replacing a few words. In many applications, these texts are limited in numbers, therefore their corresponding adversarial examples are often not diverse enough and sometimes hard to read, thus can be easily detected by humans and cannot create chaos at a large scale. In this paper, we propose an end to end solution to efficiently generate adversarial texts from scratch using generative models, which are not restricted to perturbing the given texts. We call it unrestricted adversarial text generation. Specifically, we train a conditional variational autoencoder (VAE) with an additional adversarial loss to guide the generation of adversarial examples. Moreover, to improve the validity of adversarial texts, we utilize discrimators and the training framework of generative adversarial networks (GANs) to make adversarial texts consistent with real data. Experimental results on sentiment analysis demonstrate the scalability and efficiency of our method. It can attack text classification models with a higher success rate than existing methods, and provide acceptable quality for humans in the meantime.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源