RoBERTa: A Robustly Optimized BERT Pretraining Approach

Language model pretraining has led to significant performance gains but careful comparison between different approaches is challenging. Training is computationally expensive, often done on private datasets of different sizes, and, as we will show, hyperparameter choices have significant impact on the final results. We present a replication study of BERT pretraining (Devlin et al., 2019) that carefully measures the impact of many key hyperparameters and training data size. We find that BERT was significantly undertrained, and can match or exceed the performance of every model published after it. Our best model achieves state-of-the-art results on GLUE, RACE and SQuAD. These results highlight the importance of previously overlooked design choices, and raise questions about the source of recently reported improvements. We release our models and code.

PDF Abstract

Results from the Paper


Task Dataset Model Metric Name Metric Value Global Rank Uses Extra
Training Data
Result Benchmark
Natural Language Inference ANLI test RoBERTa (Large) A1 72.4 # 3
A2 49.8 # 11
A3 44.4 # 13
Linguistic Acceptability CoLA RoBERTa Accuracy 67.8% # 17
Type prediction ManyTypes4TypeScript RoBERTa Average Accuracy 59.84 # 5
Average Precision 57.45 # 5
Average Recall 57.62 # 5
Average F1 57.54 # 5
Multi-task Language Understanding MMLU RoBERTa (fine-tuned) Humanities 27.9 # 24
Average (%) 27.9 # 53
Parameters (Billions) 0.354 # 2
STEM 27.0 # 33
Social Sciences 28.8 # 26
Other 27.7 # 26
Semantic Textual Similarity MRPC RoBERTa Accuracy 92.3% # 3
Natural Language Inference MultiNLI RoBERTa Matched 90.8 # 7
Mismatched 90.2 # 6
Natural Language Inference QNLI RoBERTa Accuracy 98.9% # 4
Question Answering Quora Question Pairs RoBERTa Accuracy 90.2% # 6
Reading Comprehension RACE