arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2109.06536cs.CL
收藏

基于对比学习和自动编码的文本分类对抗训练算法

Improving Gradient-based Adversarial Training for Text Classification by Contrastive Learning and Auto-Encoder

Pattern Recognition Center, WeChat AI, Tencent Inc(腾讯公司微信人工智能模式识别中心)

Yao Qiu, Jinchao Zhang, Jie Zhou

摘要:

最近的工作提出了几种有效的方法来生成基于梯度的对抗性扰动的嵌入,并证明了模型的性能和鲁棒性可以提高,当他们训练这些污染的嵌入。虽然他们很少关注如何帮助模型更有效地学习这些对抗样本。在本文中,我们着眼于在模型的训练过程中增强模型防御基于梯度的对抗攻击的能力,并提出了两种新的对抗训练方法:(1)CARL缩小了原始样本及其对抗样本在表示空间中的距离,同时扩大了它们与不同标记样本的距离。(2)RAR迫使模型从其对抗性表示中重建原始样本。实验结果表明,所提出的两种方法优于强基线在各种文本分类数据集。分析实验表明,使用本文方法时,输入句子的语义表示不会受到对抗性扰动的显著影响,并且在对抗攻击下,模型的性能下降较小。也就是说,我们的方法可以有效地提高模型的鲁棒性。此外,RAR还可以用于生成文本形式的对抗样本。

英文摘要:

Recent work has proposed several efficient approaches for generating gradient-based adversarial perturbations on embeddings and proved that the model's performance and robustness can be improved when they are trained with these contaminated embeddings. While they paid little attention to how to help the model to learn these adversarial samples more efficiently. In this work, we focus on enhancing the model's ability to defend gradient-based adversarial attack during the model's training process and propose two novel adversarial training approaches: (1) CARL narrows the original sample and its adversarial sample in the representation space while enlarging their distance from different labeled samples. (2) RAR forces the model to reconstruct the original sample from its adversarial representation. Experiments show that the proposed two approaches outperform strong baselines on various text classification datasets. Analysis experiments find that when using our approaches, the semantic representation of the input sentence won't be significantly affected by adversarial perturbations, and the model's performance drops less under adversarial attack. That is to say, our approaches can effectively improve the robustness of the model. Besides, RAR can also be used to generate text-form adversarial samples.

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

↑