[论文解读] How Should Pre-Trained Language Models Be Fine-Tuned Towards Adversarial Robustness?
本论文介绍 Robust Informative Fine-Tuning (RIFT),一种信息理论对抗性微调方法,能够缓解预训练语言模型在情感分析和自然语言推理任务中的遗忘问题并提升鲁棒性。
The fine-tuning of pre-trained language models has a great success in many NLP fields. Yet, it is strikingly vulnerable to adversarial examples, e.g., word substitution attacks using only synonyms can easily fool a BERT-based sentiment analysis model. In this paper, we demonstrate that adversarial training, the prevalent defense technique, does not directly fit a conventional fine-tuning scenario, because it suffers severely from catastrophic forgetting: failing to retain the generic and robust linguistic features that have already been captured by the pre-trained model. In this light, we propose Robust Informative Fine-Tuning (RIFT), a novel adversarial fine-tuning method from an information-theoretical perspective. In particular, RIFT encourages an objective model to retain the features learned from the pre-trained model throughout the entire fine-tuning process, whereas a conventional one only uses the pre-trained weights for initialization. Experimental results show that RIFT consistently outperforms the state-of-the-arts on two popular NLP tasks: sentiment analysis and natural language inference, under different attacks across various pre-trained language models.
研究动机与目标
- 在对抗性攻击下对预训练语言模型进行微调时,解决灾难性遗忘问题。
- 提出一个信息理论框架,在微调过程中保留稳健、通用的预训练特征。
- 提高下游NLP任务(情感分析和自然语言推理)在单词替换对抗攻击下的鲁棒性。
提出的方法
- 引入 Robust Informative Fine-Tuning (RIFT),使目标模型输出与类别标签以及预训练模型输出之间的互信息最大化。
- 将 I(S;Y,T) 分解为 I(S;Y) + I(S;T|Y),以实现可解的优化。
- 通过变分界来最大化 I(S;Y),使用跨熵损失并在原始输入 x 与对抗输入 x 之间引入不变性预测项。
- 应用对比学习风格的目标,通过带有类别条件分数 f_y 的噪声对比估计下界来最大化 I(S;T|Y)。
- 通过在当前目标下求解 KL 最大化来生成对抗样本 x^(自监督攻击),以避免标签泄漏。
- 将 L_r-task 与 L_r-info 结合,并使用权重 alpha 来控制从预训练模型吸收的信息量。
实验结果
研究问题
- RQ1对抗性微调在微调预训练语言模型时会导致遗忘加强吗?
- RQ2在不牺牲常规准确性的前提下,保持预训练信息的信息理论方法是否能提升鲁棒性?
- RQ3在对抗性微调设置下,最大化 I(S;T|Y) 比最大化 I(S;T) 对下游任务更有效吗?
- RQ4控制从预训练模型吸收信息的信息超参数 alpha 的影响是什么?
- RQ5在单词替换攻击下,RIFT 的增益是否在不同任务(情感分析和自然语言推理)和架构(BERT-base, RoBERTa-base)之间具有泛化性?
主要发现
- 在 IMDB 和 SNLI 上,RIFT 在 genetic 和 PWWS 攻击下始终优于最先进的对抗性微调方法。
- 最大化 I(S;T|Y) 在下游任务上比最大化 I(S;T) 提供更好的鲁棒性。
- 将 alpha 提升到某一点会同时提高鲁棒准确率和 vanilla 准确率,表明对稳健预训练特征的有益记忆。
- RIFT 在不同的预训练骨干网络(BERT-base-uncased 和 RoBERTa-base)上均提供鲁棒性提升。
- 权衡曲线显示 RIFT 同时提升鲁棒和标准准确率,而不是以牺牲干净性能来提升鲁棒。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。