用可解释AI攻击文本模型,仅改一个词就能骗过BERT,人眼难察觉。
A Grey-box Text Attack Framework using Explainable AI
- 用多个替代Bert模型配合可解释AI,无需知道目标模型细节
- 仅替换一个词即可生成语义合理、人类难辨的对抗样本
- 适合研究模型安全或对抗攻防的NLP工程师
可解释AI能以人类可理解的方式揭示复杂黑盒模型的决策依据,但同时也暴露了潜在漏洞。传统对抗文本攻击依赖白盒信息,通过词替换、数据增强或基于梯度的方法对预训练BERT模型发起攻击,但这类方法易被人类识别(如将'Poor'改为'Rich')。本文提出一种灰盒兼黑盒攻击框架,无需目标模型知识,仅利用一组替代的Transformer/BERT模型,结合可解释AI技术实施攻击。由于Transformer模型普遍具备注意力机制,能捕捉序列中的长距离依赖,使得在不同架构的BERT模型间具有良好的迁移能力。实验表明,该方法仅需修改一个词,即可生成语义自然、人类难以察觉的对抗句子,并有效欺骗其他BERT模型。
原文摘要 · Abstract (English)
Explainable AI is a strong strategy implemented to understand complex black-box model predictions in a human interpretable language. It provides the evidence required to execute the use of trustworthy and reliable AI systems. On the other hand, however, it also opens the door to locating possible vulnerabilities in an AI model. Traditional adversarial text attack uses word substitution, data augmentation techniques and gradient-based attacks on powerful pre-trained Bidirectional Encoder Representations from Transformers (BERT) variants to generate adversarial sentences. These attacks are generally whitebox in nature and not practical as they can be easily detected by humans E.g. Changing the word from "Poor" to "Rich". We proposed a simple yet effective Grey-box cum Black-box approach that does not require the knowledge of the model while using a set of surrogate Transformer/BERT models to perform the attack using Explainable AI techniques. As Transformers are the current state-of-the-art models for almost all Natural Language Processing (NLP) tasks, an attack generated from BERT1 is transferable to BERT2. This transferability is made possible due to the attention mechanism in the transformer that allows the model to capture long-range dependencies in a sequence. Using the power of BERT generalisation via attention, we attempt to exploit how transformers learn by attacking a few surrogate transformer variants which are all based on a different architecture. We demonstrate that this approach is highly effective to generate semantically good sentences by changing as little as one word that is not detectable by humans while still fooling other BERT models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。