Machine Learning PapersLandmark papers
← All papers
RESEARCH PAPER / 2019

RoBERTa: A Robustly Optimized BERT Pretraining Approach

Yinhan Liu, Myle Ott, Naman Goyal ...Full author list in the original paper.

Facebook AI Research (FAIR) +2 · cs.CL

Affiliations: Facebook AI Research (FAIR), University of Washington, Princeton University

Abstract

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.

The following analysis is generated by AI and may contain errors. It is separate from the authors’ abstract and is not peer review.

Research summary

This paper demonstrates that BERT was significantly undertrained and establishes a robust, empirically validated pretraining recipe that matches or exceeds contemporary architectural innovations. Through systematic ablation and large-scale experimentation, the work corrects several prevailing assumptions in language model pretraining, introduces dynamic masking as a standard practice, and proves that careful optimization of training dynamics can yield state-of-the-art performance without architectural changes, thereby reshaping empirical standards and resource allocation priorities across the NLP community.

Methodology

The paper employs a rigorous, large-scale ablation methodology to isolate and quantify the impact of individual pretraining design choices on BERT's performance. Rather than proposing a new architecture, the authors systematically vary training duration, batch size, dataset scale, masking strategy (static vs. dynamic), sentence prediction objectives (NSP), and vocabulary size. The experimental design is methodologically sound, utilizing controlled single-variable changes where possible and scaling compute proportionally to maintain fair comparisons. The shift from static to dynamic masking and the empirical demonstration that Next Sentence Prediction (NSP) is detrimental to downstream performance represent key methodological contributions that correct widespread community assumptions.

Results & evaluation

Experiments are comprehensive and evaluated across standard NLP benchmarks including GLUE, RACE, and SQuAD 1.1/2.0. The results convincingly demonstrate that careful hyperparameter tuning and extended training schedules allow the original BERT architecture to match or surpass contemporary architectural variants (e.g., XLNet, RoBERTa's contemporaries). The scaling laws observed with respect to batch size and training steps are clearly documented, and the ablation tables provide transparent evidence for each design decision. The evaluation is robust, though heavily reliant on compute-intensive setups that may not be feasible for academic labs without industrial resources.

Reproducibility

Excellent. The authors release full training code, model checkpoints, and detailed hyperparameter configurations via the fairseq framework. Preprocessing scripts, data curation pipelines, and exact training schedules are documented, making the work highly reproducible for researchers with adequate computational infrastructure. The explicit reporting of training steps, learning rate schedules, and batch configurations sets a strong standard for empirical transparency in pretraining research.

Limitations

The primary limitation is the extreme computational cost required to validate the findings, which inherently restricts reproducibility to well-funded institutions and exacerbates resource inequality in the field. The study focuses exclusively on encoder-only masked language modeling and does not generalize its findings to autoregressive or sequence-to-sequence pretraining paradigms. Additionally, while the paper successfully optimizes BERT, it does not address fundamental architectural bottlenecks (e.g., quadratic attention complexity) that would later necessitate structural innovations.

Broader impact

RoBERTa fundamentally shifted the NLP research paradigm from architectural novelty to training recipe optimization, demonstrating that many reported gains in subsequent models were attributable to better optimization rather than structural changes. Its findings on dynamic masking, NSP removal, and large-batch training became standard practice across the field, directly influencing the development of subsequent models like ELECTRA, DeBERTa, and modern LLM pretraining pipelines. However, the heavy compute requirements highlighted in the paper also underscore growing concerns about the environmental and accessibility costs of large-scale pretraining. This paper demonstrates that BERT was significantly undertrained and establishes a robust, empirically validated pretraining recipe that matches or exceeds contemporary architectural innovations. Through systematic ablation and large-scale experimentation, the work corrects several prevailing assumptions in language model pretraining, introduces dynamic masking as a standard practice, and proves that careful optimization of training dynamics can yield state-of-the-art performance without architectural changes, thereby reshaping empirical standards and resource allocation priorities across the NLP community.

Curator note

Liu et al.; showed BERT was undertrained

Author of this paper? Send a correction.