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

T3:基于树型自动编码器的对抗性文本生成算法

T3: Tree-Autoencoder Constrained Adversarial Text Generation for Targeted Attack

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Zhejiang University(浙江大学);Tencent(腾讯);Microsoft Dynamics 365 AI Research(微软Dynamics 365人工智能研究院)

Boxin Wang, Hengzhi Pei, Boyuan Pan, Qian Chen, Shuohang Wang, Bo Li

摘要:

针对自然语言处理系统的对抗攻击,对输入进行看似无害的修改,可能会导致目标模型的任意错误。虽然引起了极大的关注,但这种对抗攻击可以用来评估NLP模型的鲁棒性。与连续数据域中的对抗性示例生成(例如,图像),生成保留原始含义的对抗性文本是具有挑战性的,因为文本空间是离散的和不可微的。为了应对这些挑战,我们提出了一个目标可控的对抗攻击框架T3,它适用于一系列NLP任务。特别是,我们提出了一个基于树的自动编码器嵌入离散文本数据到一个连续的表示空间,在此基础上,我们优化了对抗扰动。一种新的基于树的解码器,然后应用到正则化生成的文本的语法正确性,并操纵它的句子(T3(发送))或单词(T3(字))的水平。我们考虑两个最具代表性的NLP任务:情感分析和问答(QA)。大量的实验结果和人类研究表明,T3生成的对抗性文本可以成功地操纵NLP模型输出目标错误答案,而不会误导人类。此外,我们还证明了生成的对抗性文本具有很高的可转移性,这使得黑箱攻击在实践中成为可能。我们的工作揭示了一种有效和通用的方法来检查NLP模型的鲁棒性。我们的代码可在https://github.com/AI-secure/T3/上公开获取。

英文摘要:

Adversarial attacks against natural language processing systems, which perform seemingly innocuous modifications to inputs, can induce arbitrary mistakes to the target models. Though raised great concerns, such adversarial attacks can be leveraged to estimate the robustness of NLP models. Compared with the adversarial example generation in continuous data domain (e.g., image), generating adversarial text that preserves the original meaning is challenging since the text space is discrete and non-differentiable. To handle these challenges, we propose a target-controllable adversarial attack framework T3, which is applicable to a range of NLP tasks. In particular, we propose a tree-based autoencoder to embed the discrete text data into a continuous representation space, upon which we optimize the adversarial perturbation. A novel tree-based decoder is then applied to regularize the syntactic correctness of the generated text and manipulate it on either sentence (T3(Sent)) or word (T3(Word)) level. We consider two most representative NLP tasks: sentiment analysis and question answering (QA). Extensive experimental results and human studies show that T3 generated adversarial texts can successfully manipulate the NLP models to output the targeted incorrect answer without misleading the human. Moreover, we show that the generated adversarial texts have high transferability which enables the black-box attacks in practice. Our work sheds light on an effective and general way to examine the robustness of NLP models. Our code is publicly available at https://github.com/AI-secure/T3/.

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

↑