arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2110.15317cs.CLcs.CRcs.LG
收藏

弥合CV与NLP之间的差距!一种基于梯度的文本对抗攻击框架

Bridge the Gap Between CV and NLP! A Gradient-based Textual Adversarial Attack Framework

Huazhong University of Science and Technology(华中科技大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Lifan Yuan, Yichi Zhang, Yangyi Chen, Wei Wei

AI总结:

针对文本离散性导致视觉领域基于优化的对抗攻击方法难以直接应用于NLP的问题,提出统一框架并实例化T-PGD算法,在迁移黑盒攻击下实现更优性能与更流畅的对抗样本。

摘要:

尽管深度学习技术近期在各类任务上取得成功,但在面对带有微小扰动的对抗样本时表现依然不佳。虽然基于优化的对抗攻击方法在计算机视觉领域已得到充分研究,但由于文本的离散特性,直接将其应用于自然语言处理并不现实。为解决这一问题,我们提出一个统一框架,将视觉领域现有的基于优化的对抗攻击方法扩展用于生成文本对抗样本。在该框架中,连续优化的扰动被添加到嵌入层,并在前向传播过程中被放大。随后,最终的受扰动隐层表示通过掩码语言模型头解码,得到潜在的对抗样本。在本文中,我们用名为Textual Projected Gradient Descent(文本投影梯度下降,T-PGD)的攻击算法实例化了我们的框架。我们发现,即使使用代理梯度信息,我们的算法依然有效。因此,我们开展了更具挑战性的迁移黑盒攻击,并在三个基准数据集上用多个模型进行了全面实验,以评估我们的攻击算法。实验结果表明,与强基线方法相比,我们的方法整体性能更优,生成的对抗样本更流畅、更符合语法。代码和数据可在https://github.com/Phantivia/T-PGD获取。

英文摘要:

Despite recent success on various tasks, deep learning techniques still perform poorly on adversarial examples with small perturbations. While optimization-based methods for adversarial attacks are well-explored in the field of computer vision, it is impractical to directly apply them in natural language processing due to the discrete nature of the text. To address the problem, we propose a unified framework to extend the existing optimization-based adversarial attack methods in the vision domain to craft textual adversarial samples. In this framework, continuously optimized perturbations are added to the embedding layer and amplified in the forward propagation process. Then the final perturbed latent representations are decoded with a masked language model head to obtain potential adversarial samples. In this paper, we instantiate our framework with an attack algorithm named Textual Projected Gradient Descent (T-PGD). We find our algorithm effective even using proxy gradient information. Therefore, we perform the more challenging transfer black-box attack and conduct comprehensive experiments to evaluate our attack algorithm with several models on three benchmark datasets. Experimental results demonstrate that our method achieves overall better performance and produces more fluent and grammatical adversarial samples compared to strong baseline methods. The code and data are available at \url{https://github.com/Phantivia/T-PGD}.

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

↑