[Paper Review] Fine-Tuning Pretrained Language Models: Weight Initializations, Data Orders, and Early Stopping
The paper shows that random seeds for weight initialization and data order cause substantial variance in fine-tuning BERT on GLUE tasks, and demonstrates improvements from multiple trials and early stopping; it also releases extensive training data for further analysis.
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.
Motivation & Objective
- Assess how random seed variations in weight initialization and data order impact fine-tuning performance on GLUE tasks.
- Quantify how best-model performance improves as more fine-tuning trials are run.
- Identify practical strategies to reduce wasted computation during fine-tuning via early stopping.
- Evaluate whether some seed configurations yield consistently strong initialization or data ordering across tasks.
Proposed method
- Fine-tune BERT-large on four GLUE tasks, varying only two random seeds: weight initialization for the final classification layer and training data order.
- Train hundreds of models per task (625 per small dataset; 225 for SST) to capture variance from seeds.
- Measure validation performance for each run and compute expected best performance as a function of the number of trials.
- Decouple variance sources by analyzing effects of WI and DO seeds separately and jointly.
- Propose and evaluate an early stopping algorithm to discard less promising trials under a fixed computational budget.
Experimental results
Research questions
- RQ1How much do WI and DO seeds contribute to fine-tuning performance variance across GLUE tasks?
- RQ2Does the best-performing model improve measurably with more fine-tuning trials, and how quickly does it converge?
- RQ3Can early stopping reduce computation while preserving or improving expected performance?
- RQ4Are some seed configurations consistently robust across tasks?
Key findings
- Running multiple fine-tuning trials with different random seeds yields substantial performance gains over single-trial results on four GLUE tasks.
- Weight initialization and training data order contribute comparably to variance, and some seeds are consistently better across tasks.
- Some seed configurations are robust across multiple datasets, suggesting transferable good initializations.
- A simple early stopping strategy can improve expected performance under a fixed budget by stopping least promising trials early.
- The authors publicly release data from 2,100 fine-tuning episodes to enable further analysis of training dynamics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.