Overview of ROBERTa model
RoBERTa stands for Robustly Optimized BERT Pre-training Approach. It was presented by researchers at Facebook and Washington University. The goal of this paper was to optimize the training of BERT architecture in order to take lesser time during pre-training.
Modifications to BERT:
RoBERTa has almost similar architecture as compare to BERT, but in order to improve the results on BERT architecture, the authors made some simple design changes in its architecture and training procedure. These changes are:
- Removing the Next Sentence Prediction (NSP) objective: In the next sentence prediction, the model is trained to predict whether the observed document segments come from the same or distinct documents via an auxiliary Next Sentence Prediction (NSP) loss. The authors experimented with removing/adding of NSP loss to different versions and concluded that removing the NSP loss matches or slightly improves downstream task performance
- Training with bigger batch sizes & longer sequences: Originally BERT is trained for 1M steps with a batch size of 256 sequences. In this paper, the authors trained the model with 125 steps of 2K sequences and 31K steps with 8k sequences of batch size. This has two advantages, the large batches improve perplexity on masked language modelling objective and well as end-task accuracy. Large batches are also easier to parallelize via distributed parallel training.
- Dynamically changing the masking pattern: In BERT architecture, the masking is performed once during data preprocessing, resulting in a single static mask. To avoid using the single static mask, training data is duplicated and masked 10 times, each time with a different mask strategy over 40 epochs thus having 4 epochs with the same mask. This strategy is compared with dynamic masking in which the different masking for every time we passed data into the model.
Datasets Used:
The following are the datasets used to train ROBERTa model:
- BOOK CORPUS and English Wikipedia dataset: This data also used for training BERT architecture, this data contains 16GB of text.
- CC-NEWS. This data contains 63 million English news articles crawled between September 2016 and February 2019. The size of this dataset is 76 GB after filtering.
- OPENWEBTEXT: This dataset contains web content extracted from the URLs shared on Reddit with at least 3 upvotes. The size of this dataset is 38 GB.
- STORIES: This dataset contains a subset of Common Crawl data filtered to match the story-like style of Winograd NLP task. This dataset contains 31 GB of text.
Results:
- On the GLUE benchmark NLP tasks, the model achieves a score of 88.5 on the public leaderboard and achieve the state-of-the-art score on 4 of GLUE tasks: Multi Natural Language Inference (MNLI), QuestionNLI, Semantic Textual Similarity Benchmark (STS-B), and Recognizing Textual Entailments (RTE) at the time of its release.
- At the time of its release, On the SQuAD 1.1 and SQuAD 2.0 datasets, it is able to match the previous state-of-the-Art results by XLNet.
- It also achieves better results than BERT(LARGE) model and XLNet on RACE benchmark datasets.
References:


