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

基于梯度方法的对抗性文本

Adversarial Texts with Gradient Methods

Zhitao Gong, Wenlu Wang, Bo Li, Dawn Song, Wei-Shinn Ku

摘要:

图像的对抗样本在文献中已经被广泛研究。在众多的攻击方法中,基于梯度的方法是一种有效且易于计算的攻击方法。在这项工作中,我们提出了一个框架,以适应图像的梯度攻击方法的文本域。使用梯度方法生成对抗性文本的主要困难是:i)输入空间是离散的,这使得很难直接在输入中积累小噪声; ii)对抗性文本的质量难以测量。我们通过在嵌入空间中搜索对抗文本来解决第一个问题,然后通过最近邻搜索来重建对抗文本。对于后一个问题,我们采用词移动距离(WMD)来量化对抗文本的质量。通过对IMDB电影评论、路透社-2和路透社-5新闻通讯社三个数据集的广泛实验,我们证明了我们的框架可以利用梯度攻击方法生成与原始文本只有几个字不同的高质量对抗文本。在很多情况下,我们可以改变一个词来改变整个文本的标签。我们成功地将FGM和DeepFool纳入我们的框架。此外,我们的经验表明,大规模杀伤性武器是密切相关的对抗性文本的质量。

英文摘要:

Adversarial samples for images have been extensively studied in the literature. Among many of the attacking methods, gradient-based methods are both effective and easy to compute. In this work, we propose a framework to adapt the gradient attacking methods on images to text domain. The main difficulties for generating adversarial texts with gradient methods are i) the input space is discrete, which makes it difficult to accumulate small noise directly in the inputs, and ii) the measurement of the quality of the adversarial texts is difficult. We tackle the first problem by searching for adversarials in the embedding space and then reconstruct the adversarial texts via nearest neighbor search. For the latter problem, we employ the Word Mover's Distance (WMD) to quantify the quality of adversarial texts. Through extensive experiments on three datasets, IMDB movie reviews, Reuters-2 and Reuters-5 newswires, we show that our framework can leverage gradient attacking methods to generate very high-quality adversarial texts that are only a few words different from the original texts. There are many cases where we can change one word to alter the label of the whole piece of text. We successfully incorporate FGM and DeepFool into our framework. In addition, we empirically show that WMD is closely related to the quality of adversarial texts.

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

↑