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

面向上下文语言表示的抗性训练

Toward Adversarial Training on Contextualized Language Representation

Shanghai Jiao Tong University(上海交通大学);Soochow University(苏州大学)

Hongqiu Wu, Yongxiang Liu, Hanwen Shi, Hai Zhao, Min Zhang

AI总结:

本文提出CreAT方法,通过优化对抗样本以偏离编码器的上下文表示,实现全局优化,在多个基准上取得一致性能提升和新最先进结果。

摘要:

尽管抗性训练(AT)在基于预训练语言模型(PLMs)的近期文本领域取得了成功,我们的实证研究展示了AT在某些任务(如常识推理、命名实体识别)上收益不一致。本文从PLM编码器输出的上下文语言表示的角度研究AT。我们发现当前的AT攻击倾向于生成次优的对抗样本,这些样本能够欺骗解码器部分,但对编码器影响较小。然而,我们发现有必要有效地偏离后者以使AT获得收益。基于这一观察,我们提出了简单而有效的上下文表示抗性训练(CreAT),其中攻击被明确优化以偏离编码器的上下文表示。它允许对能够欺骗整个模型的对抗样本进行全局优化。我们还发现CreAT提供了更好的方向来优化对抗样本,使它们对超参数不那么敏感。与AT相比,CreAT在更广泛的任务上产生一致的性能提升,并被证明对于仅保留编码器部分用于下游任务的语言预训练更有效。我们在一系列具有挑战性的基准上取得了新的最先进性能,例如AdvGLUE(59.1→61.1)、HellaSWAG(93.0→94.9)、ANLI(68.1→69.3)。

英文摘要:

Beyond the success story of adversarial training (AT) in the recent text domain on top of pre-trained language models (PLMs), our empirical study showcases the inconsistent gains from AT on some tasks, e.g. commonsense reasoning, named entity recognition. This paper investigates AT from the perspective of the contextualized language representation outputted by PLM encoders. We find the current AT attacks lean to generate sub-optimal adversarial examples that can fool the decoder part but have a minor effect on the encoder. However, we find it necessary to effectively deviate the latter one to allow AT to gain. Based on the observation, we propose simple yet effective \textit{Contextualized representation-Adversarial Training} (CreAT), in which the attack is explicitly optimized to deviate the contextualized representation of the encoder. It allows a global optimization of adversarial examples that can fool the entire model. We also find CreAT gives rise to a better direction to optimize the adversarial examples, to let them less sensitive to hyperparameters. Compared to AT, CreAT produces consistent performance gains on a wider range of tasks and is proven to be more effective for language pre-training where only the encoder part is kept for downstream tasks. We achieve the new state-of-the-art performances on a series of challenging benchmarks, e.g. AdvGLUE (59.1 $ \rightarrow $ 61.1), HellaSWAG (93.0 $ \rightarrow $ 94.9), ANLI (68.1 $ \rightarrow $ 69.3).

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

↑