[论文解读] Adversarial Training for Large Neural Language Models
本论文介绍 ALUM,一种用于预训练和微调大型神经语言模型的通用对抗训练算法,在包括 RoBERTa 在内的多任务中显示出更好的泛化性和鲁棒性。
Generalization and robustness are both key desiderata for designing machine learning methods. Adversarial training can enhance robustness, but past work often finds it hurts generalization. In natural language processing (NLP), pre-training large neural language models such as BERT have demonstrated impressive gain in generalization for a variety of tasks, with further improvement from adversarial fine-tuning. However, these models are still vulnerable to adversarial attacks. In this paper, we show that adversarial pre-training can improve both generalization and robustness. We propose a general algorithm ALUM (Adversarial training for large neural LangUage Models), which regularizes the training objective by applying perturbations in the embedding space that maximizes the adversarial loss. We present the first comprehensive study of adversarial training in all stages, including pre-training from scratch, continual pre-training on a well-trained model, and task-specific fine-tuning. ALUM obtains substantial gains over BERT on a wide range of NLP tasks, in both regular and adversarial scenarios. Even for models that have been well trained on extremely large text corpora, such as RoBERTa, ALUM can still produce significant gains from continual pre-training, whereas conventional non-adversarial methods can not. ALUM can be further combined with task-specific fine-tuning to attain additional gains. The ALUM code is publicly available at https://github.com/namisan/mt-dnn.
研究动机与目标
- 动机:需要在 NLP 中具有良好的泛化能力并能抵抗对抗性攻击的模型。
- 提出一个适用于预训练和微调的统一对抗训练框架(ALUM)。
- 在广泛的NLP任务和数据集上评估 ALUM。
- 展示对抗性预训练相较于强基线(如 BERT、RoBERTa)具有提升,并且可与对抗性微调结合。
提出的方法
- 在嵌入空间采用扰动以最大化对抗损失(虚拟对抗训练)。
- 用一个对抗项来正则化训练目标,控制嵌入邻域中的标签平滑性(alpha 参数)。
- 采用课程学习方法:先进行标准训练,然后继续进行对抗训练(ALUM)。
- 用一个小的内部循环(K=1)来估计扰动,以提高效率。
- 将 ALUM 应用于从头开始的预训练、持续预训练以及任务特定的微调,针对像 BERT 和 RoBERTa 这样的基于 Transformer 的模型。
- 提供结果,显示相较于非对抗基线有显著提升,并且与任务特定微调兼容。
实验结果
研究问题
- RQ1对抗性预训练是否在标准 NLP 基准测试上提升泛化能力?
- RQ2对抗性预训练是否也提升对对抗性或具有挑战性的评估数据集的鲁棒性?
- RQ3在对已经经过良好训练的模型(例如 RoBERTa)进行持续预训练时,ALUM 能否带来提升?
- RQ4在跨任务中将对抗性预训练与对抗性微调结合起来的效果如何?
主要发现
- 使用 ALUM 的对抗性预训练在广泛的 NLP 任务上提升了泛化性和鲁棒性。
- ALUM 在 SQuAD 和 MNLI 上对 BERT 有提升,即使是在像 RoBERTa 那样经过大规模语料训练的模型上也优于标准基线。
- 在 RoBERTa 上,使用 ALUM 的持续预训练带来提升,而标准持续预训练则没有。
- ALUM 在对抗性基准如 ANLI、Adversarial SQuAD 和 HELLASWAG 上提升鲁棒性,且常常超越强基线。
- 将对抗性预训练与对抗性微调结合在多个任务上取得最佳结果(例如 MNLI、ANLI、SciTail、SWAG、HELLASWAG)。
- 该方法适用于从头预训练、持续预训练和任务特定微调,并在 BERT 和 RoBERTa 上进行了演示。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。