arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2303.07199cs.CLcs.CR
收藏

BeamAttack:通过束搜索和混合语义空间生成高质量文本对抗示例

BeamAttack: Generating High-quality Textual Adversarial Examples through Beam Search and Mixed Semantic Spaces

University of Science and Technology of China(中国科学技术大学);Ping An Technology (Shenzhen) Co., Ltd.(平安科技(深圳)有限公司);Xidian University(西安电子科技大学)

Hai Zhu, Qingyang Zhao, Yuren Wu

摘要:

基于神经网络的自然语言处理模型容易受到对抗性样本的影响。这些对抗性的例子对人类读者来说是不可感知的,但可能会误导模型做出错误的预测。在黑盒环境下,攻击者可以在不知道模型参数和结构的情况下欺骗模型。以往的词级攻击主要采用单一语义空间和贪婪搜索作为搜索策略。然而,这些方法无法平衡攻击成功率,对抗性示例的质量和时间消耗。在本文中,我们提出了BeamAttack,这是一种文本攻击算法,它利用混合语义空间和改进的束搜索来制作高质量的对抗性示例。大量的实验表明,BeamAttack可以提高攻击成功率,同时节省大量的查询和时间,例如,在对MR数据集样本进行攻击时,与贪婪搜索相比,攻击成功率最多提高7%.与启发式搜索相比,BeamAttack最多可以节省85%的模型查询,并获得了有竞争力的攻击成功率。BeamAttack制作的对抗性示例具有高度的可移植性,可以有效提高模型在对抗性训练中的鲁棒性。代码可在https://github.com/zhuhai-ustc/beamattack/tree/master上获得

英文摘要:

Natural language processing models based on neural networks are vulnerable to adversarial examples. These adversarial examples are imperceptible to human readers but can mislead models to make the wrong predictions. In a black-box setting, attacker can fool the model without knowing model's parameters and architecture. Previous works on word-level attacks widely use single semantic space and greedy search as a search strategy. However, these methods fail to balance the attack success rate, quality of adversarial examples and time consumption. In this paper, we propose BeamAttack, a textual attack algorithm that makes use of mixed semantic spaces and improved beam search to craft high-quality adversarial examples. Extensive experiments demonstrate that BeamAttack can improve attack success rate while saving numerous queries and time, e.g., improving at most 7\% attack success rate than greedy search when attacking the examples from MR dataset. Compared with heuristic search, BeamAttack can save at most 85\% model queries and achieve a competitive attack success rate. The adversarial examples crafted by BeamAttack are highly transferable and can effectively improve model's robustness during adversarial training. Code is available at https://github.com/zhuhai-ustc/beamattack/tree/master

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

↑