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

针对文本对抗攻击的快速对抗训练

Fast Adversarial Training against Textual Adversarial Attacks

Huazhong University of Science and Technology(华中科技大学)

Yichen Yang, Xin Liu, Kun He

AI总结:

本文提出快速对抗训练方法FAT,通过单步扰动生成和历史扰动初始化,在无同义词场景下高效提升BERT模型的对抗鲁棒性,并在多种字符级和词级攻击中优于现有防御基线。

摘要:

许多对抗防御方法已被提出,以增强自然语言处理模型的对抗鲁棒性。然而,大多数方法引入了额外的预设语言知识,并假设攻击者使用的同义词候选是可访问的,这是一个理想化的假设。我们深入研究了嵌入空间中的对抗训练,并从单步扰动生成和扰动初始化的角度,提出了一种快速对抗训练(FAT)方法,以提高模型在无同义词场景下的鲁棒性。基于单步和多步梯度上升生成的对抗扰动相似的观察,FAT使用单步梯度上升在嵌入空间中生成对抗样本来加速训练过程。基于在连续训练轮次中对相同训练样本生成的扰动相似的观察,FAT在初始化扰动时充分利用历史信息。大量实验表明,FAT显著提升了BERT模型在无同义词场景下的鲁棒性,并在字符级和词级修改的各种攻击下优于防御基线。

英文摘要:

Many adversarial defense methods have been proposed to enhance the adversarial robustness of natural language processing models. However, most of them introduce additional pre-set linguistic knowledge and assume that the synonym candidates used by attackers are accessible, which is an ideal assumption. We delve into adversarial training in the embedding space and propose a Fast Adversarial Training (FAT) method to improve the model robustness in the synonym-unaware scenario from the perspective of single-step perturbation generation and perturbation initialization. Based on the observation that the adversarial perturbations crafted by single-step and multi-step gradient ascent are similar, FAT uses single-step gradient ascent to craft adversarial examples in the embedding space to expedite the training process. Based on the observation that the perturbations generated on the identical training sample in successive epochs are similar, FAT fully utilizes historical information when initializing the perturbation. Extensive experiments demonstrate that FAT significantly boosts the robustness of BERT models in the synonym-unaware scenario, and outperforms the defense baselines under various attacks with character-level and word-level modifications.

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

↑