Preprint
Large Language Models

XLM Roberta

November 1, 2019

0

Citations

0

Influential Citations

Venue

2019

Year

Abstract

A multilingual masked language model pre-trained on text in 100 languages, shows that pretraining multilingual language models at scale leads to significant performance gains for a wide range of crosslingual transfer tasks.

Analysis

Why This Paper Matters

Multilingual NLP has long faced a fundamental tension: how to build a single model that works well across dozens of languages without requiring parallel data or language-specific architectures. Prior approaches like multilingual BERT (mBERT) and XLM showed promise but were limited by smaller vocabularies, less diverse training data, or reliance on translation-based objectives that are expensive to scale. XLM-RoBERTa tackles this head-on by demonstrating that simply scaling up monolingual masked language modeling (MLM) to 100 languages—using a massive vocabulary and carefully balanced data—can produce a model that transfers knowledge across languages with remarkable effectiveness. This matters because it simplifies the recipe for cross-lingual learning: you don't need parallel corpora or complex training objectives; just more data and larger models.

How It Works

Figure 1

XLM-RoBERTa builds on the RoBERTa optimization of BERT's MLM objective and extends it to the multilingual setting. The core idea is straightforward: train a Transformer model to predict masked tokens in sentences drawn from a single language at a time, using only monolingual data. Unlike XLM, which combined MLM with translation language modeling (TLM) that required parallel sentences, XLM-RoBERTa drops TLM entirely. This simplifies training and allows the model to scale to 100 languages without needing expensive aligned data.

The model uses SentencePiece for subword tokenization, applied directly to raw text. A key design choice is the vocabulary size: 250,000 tokens. This is much larger than typical monolingual or multilingual models (e.g., mBERT uses ~110k), which helps cover the diverse character sets and morphemes across 100 languages without excessive fragmentation. The large vocabulary comes with a computational cost—a full softmax over 250k outputs—but the authors show it is manageable with modern hardware.

Two model sizes are trained: XLM-R Base (12 layers, 768 hidden units, 12 attention heads, 270M parameters) and XLM-R Large (24 layers, 1024 hidden units, 16 attention heads, 550M parameters). The training data is the CC-100 corpus, a cleaned and deduplicated version of Common Crawl data spanning 100 languages. To ensure balanced representation, the authors use temperature-based sampling, which up-samples lower-resource languages and down-samples high-resource ones.

Languages and statistics of the CC-100 corpus

Results

XLM-RoBERTa achieves state-of-the-art results on a wide range of cross-lingual transfer benchmarks, including XNLI (cross-lingual natural language inference), MLQA (multilingual question answering), and NER tasks. On XNLI, XLM-R Large outperforms both mBERT and XLM by significant margins, especially on lower-resource languages. The model also shows strong zero-shot transfer: fine-tuning on English data alone yields competitive performance on other languages without any target-language supervision. The gains are particularly pronounced for languages that were poorly served by earlier models, suggesting that the larger vocabulary and more diverse training data help capture linguistic patterns more effectively.

Significance

XLM-RoBERTa's impact extends beyond its immediate results. It established that scaling multilingual MLM is a viable and powerful approach, paving the way for subsequent models like XLM-RoBERTa-XL and influencing the design of multilingual variants of GPT and T5. The paper also highlighted the importance of careful data sampling and vocabulary design—insights that have become standard practice in multilingual NLP. By showing that a single model can handle 100 languages with strong cross-lingual transfer, XLM-RoBERTa made it practical to deploy multilingual systems in production, reducing the need for language-specific models. Its legacy is a simpler, more scalable recipe for building language-agnostic representations that continue to underpin many modern NLP applications.