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

文本分类器的可区分语言模型攻击模型

A Differentiable Language Model Adversarial Attack on Text Classifiers

Skolkovo Institute of Science and Technology(斯科尔科沃科学技术研究院);Huawei Noah’s Ark lab(华为诺亚方舟实验室);HSE University(高等经济大学);Oxford University(牛津大学)

Ivan Fursov, Alexey Zaytsev, Pavel Burnyshev, Ekaterina Dmitrieva, Nikita Klyuchnikov, Andrey Kravchenko, Ekaterina Artemova, Evgeny Burnaev

摘要:

基于transformer的大型自然语言处理模型的鲁棒性是一个重要的问题,因为它们的能力和广泛采用。理解和提高这些模型鲁棒性的一种方法是探索对抗攻击场景:检查输入的小扰动是否可以欺骗模型。由于文本数据的离散性,在计算机视觉中广泛使用的基于梯度的对抗方法本身并不适用。克服这个问题的标准策略是开发标记级转换,它不考虑整个句子。在本文中,我们提出了一种新的黑盒攻击。我们的方法微调预训练的语言模型来生成对抗性示例。提出的可微分损失函数取决于替代分类器分数和通过深度学习模型计算的近似编辑距离。我们表明,所提出的攻击优于竞争对手的各种NLP问题的计算指标和人类评估。此外,由于使用微调的语言模型,生成的对抗性示例很难检测,因此当前模型不鲁棒。因此,很难防御所提出的攻击,而其他攻击则并非如此。

英文摘要:

Robustness of huge Transformer-based models for natural language processing is an important issue due to their capabilities and wide adoption. One way to understand and improve robustness of these models is an exploration of an adversarial attack scenario: check if a small perturbation of an input can fool a model. Due to the discrete nature of textual data, gradient-based adversarial methods, widely used in computer vision, are not applicable per~se. The standard strategy to overcome this issue is to develop token-level transformations, which do not take the whole sentence into account. In this paper, we propose a new black-box sentence-level attack. Our method fine-tunes a pre-trained language model to generate adversarial examples. A proposed differentiable loss function depends on a substitute classifier score and an approximate edit distance computed via a deep learning model. We show that the proposed attack outperforms competitors on a diverse set of NLP problems for both computed metrics and human evaluation. Moreover, due to the usage of the fine-tuned language model, the generated adversarial examples are hard to detect, thus current models are not robust. Hence, it is difficult to defend from the proposed attack, which is not the case for other attacks.

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

↑