Skip to main content
QUICK REVIEW

[论文解读] Fine-Tuning Pretrained Language Models: Weight Initializations, Data Orders, and Early Stopping

Jesse Dodge, Gabriel Ilharco|arXiv (Cornell University)|Feb 14, 2020
Topic ModelingComputer Science被引用 263
一句话总结

论文表明权重初始化和数据顺序的随机种子在对 GLUE 任务进行 BERT 微调时会带来显著方差,并且展示了来自多次试验和提前停止的改进;同时发布了大量训练数据供进一步分析。

ABSTRACT

Fine-tuning pretrained contextual word embedding models to supervised downstream tasks has become commonplace in natural language processing. This process, however, is often brittle: even with the same hyperparameter values, distinct random seeds can lead to substantially different results. To better understand this phenomenon, we experiment with four datasets from the GLUE benchmark, fine-tuning BERT hundreds of times on each while varying only the random seeds. We find substantial performance increases compared to previously reported results, and we quantify how the performance of the best-found model varies as a function of the number of fine-tuning trials. Further, we examine two factors influenced by the choice of random seed: weight initialization and training data order. We find that both contribute comparably to the variance of out-of-sample performance, and that some weight initializations perform well across all tasks explored. On small datasets, we observe that many fine-tuning trials diverge part of the way through training, and we offer best practices for practitioners to stop training less promising runs early. We publicly release all of our experimental data, including training and validation scores for 2,100 trials, to encourage further analysis of training dynamics during fine-tuning.

研究动机与目标

  • 评估权重初始化和数据顺序的随机种子变动如何影响 GLUE 任务上的微调性能。
  • 量化随着更多微调试次的进行,最佳模型性能的提升程度。
  • 在固定计算预算下,通过提前停止来减少无效计算的实用策略。
  • 评估是否存在在跨任务中表现始终强势的某些种子配置。

提出的方法

  • 仅改变最终分类层的权重初始化和训练数据顺序这两处随机种子,对 BERT-large 在四个 GLUE 任务进行微调。
  • 每个任务训练数百个模型(小数据集为 625 个;SST 为 225 个)以捕捉种子带来的方差。
  • 对每次运行的验证性能进行测量,并将期望的最佳性能作为试次数的函数进行计算。
  • 通过分别和共同分析 WI(权重初始化)和 DO(数据顺序)种子来解耦方差来源。
  • 提出并评估一个提前停止算法,在固定的计算预算下早期放弃最少有前景的试验。

实验结果

研究问题

  • RQ1WI 和 DO 种子对跨 GLUE 任务的微调性能方差贡献有多大?
  • RQ2最佳模型是否随着更多微调试次而有可测量的提升,以及它的收敛速度?
  • RQ3提前停止是否可以在保留或提升期望性能的同时减少计算?
  • RQ4是否存在在跨任务中始终鲁棒的一些种子配置?

主要发现

  • 在四个 GLUE 任务上,用不同随机种子进行多次微调试验相比单次结果可获得显著的性能提升。
  • 权重初始化和训练数据顺序对方差的贡献相当,且一些种子在跨任务中表现始终更好。
  • 某些种子配置在多个数据集上鲁棒,表明良好的初始初始化具有可迁移性。
  • 在固定预算下,采用一个简单的提前停止策略可以通过提前终止前景较弱的试验来提升期望性能。
  • 作者公开发布来自 2,100 次微调试验的数据,以便对训练动态进行进一步分析。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。