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

BERT真的很强大吗?文本分类和蕴涵的强自然语言攻击基线

Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailment

University of Hong Kong(香港大学);A*STAR(新加坡科技研究局)

Di Jin, Zhijing Jin, Joey Tianyi Zhou, Peter Szolovits

摘要:

机器学习算法通常容易受到对抗性示例的影响,这些示例与原始示例相比具有难以察觉的变化,但可以欺骗最先进的模型。通过暴露恶意制作的对抗性示例,有助于评估甚至提高这些模型的鲁棒性。在本文中,我们提出了TextFocal,一个简单但强大的基线来生成自然的对抗文本。通过将其应用于两个基本的自然语言任务,文本分类和文本蕴涵,我们成功地攻击了三个目标模型,包括强大的预训练BERT,以及广泛使用的卷积和递归神经网络。我们从三个方面证明了这个框架的优势:(1)有效-它在成功率和扰动率方面优于最先进的攻击,(2)实用性保留-它保留了语义内容和语法,并保持了人类的正确分类,(3)高效-它生成的对抗性文本具有与文本长度线性相关的计算复杂性。* 代码、预训练的目标模型和测试示例可在https://github.com/jind11/TextFooler上获得。

英文摘要:

Machine learning algorithms are often vulnerable to adversarial examples that have imperceptible alterations from the original counterparts but can fool the state-of-the-art models. It is helpful to evaluate or even improve the robustness of these models by exposing the maliciously crafted adversarial examples. In this paper, we present TextFooler, a simple but strong baseline to generate natural adversarial text. By applying it to two fundamental natural language tasks, text classification and textual entailment, we successfully attacked three target models, including the powerful pre-trained BERT, and the widely used convolutional and recurrent neural networks. We demonstrate the advantages of this framework in three ways: (1) effective---it outperforms state-of-the-art attacks in terms of success rate and perturbation rate, (2) utility-preserving---it preserves semantic content and grammaticality, and remains correctly classified by humans, and (3) efficient---it generates adversarial text with computational complexity linear to the text length. *The code, pre-trained target models, and test examples are available at https://github.com/jind11/TextFooler.

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

↑