# Unsupervised Cross-lingual Representation Learning at Scale

XLM-R shows that pretraining on much more web text helps cross-lingual transfer

Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán and 4 more · arXiv · 2019-11-5

- **Problem** Multilingual masked language models were pretrained on Wikipedia, which has too little text for many low-resource languages. Adding more languages to one fixed-size model also lowers performance on each language.
- **Method** XLM-R trains one Transformer masked language model on cleaned CommonCrawl text from 100 languages. It uses a shared 250K-token vocabulary, so the model does not need language-specific tools or language embeddings.
- **Results** XLM-R reaches 83.6% average XNLI accuracy with translate-train-all. It is competitive with strong monolingual models on GLUE and XNLI.

## Why multilingual pretraining stalls on low-resource languages

Multilingual masked language models such as mBERT and XLM have pushed cross-lingual understanding forward by pretraining one large Transformer on many languages at once. The catch is the data. mBERT and XLM pretrain on Wikipedia, a source that is fairly limited for lower-resource languages. For some languages the Wikipedia text is so small that it cannot support unsupervised representation learning, according to the authors.

A second problem appears when many languages share a fixed-size model. Each language receives a smaller share of the parameters, which is the capacity dilution the authors describe. Adding related languages helps low-resource ones at first, but past a point the overall performance drops. The authors call this drop the curse of multilinguality.

Overall XNLI accuracy falls from 71.8% for XLM-7 to 67.7% for XLM-100.

## Scaling data, vocabulary and training together

The central move is to scale the pretraining text well beyond Wikipedia and to enlarge the shared vocabulary, while keeping all 100 languages. The authors build the corpus from CommonCrawl dumps, filter it with language identification and language models, and collect it for each of the 100 languages.

The authors expected the change to pay off because they found mBERT and XLM undertuned, and training longer on more data helped RoBERTa. Bigger batches and longer training also kept improving downstream results after validation perplexity had flattened.

Training uses the multilingual masked language modeling objective on monolingual text only, with no parallel data. Batch languages are drawn with a sampling rate controlled by an exponent α, and the authors set α to 0.3. Text is tokenized with Sentence Piece applied directly to raw text, using a unigram language model, so no language-specific tools are needed.

Unlike XLM, the model uses no language embeddings, which the authors say helps with code-switching. The large model trains for 1.5 million updates on five hundred 32GB V100 GPUs with batch size 8192.

## Ablations on capacity, vocabulary and training

The authors pretrain models on Wikipedia in 7, 30 and 100 languages, widening the Transformer from hidden size 768 to 960 to 1152 as the language count grows. With the wider model, XLM-30 matches XLM-7, but XLM-100 still lags behind. The authors attribute the XLM-100 gap to vocabulary dilution, since that setup kept a fixed vocabulary of 150K.

Language sampling decides how often high-resource languages appear in batches, and the authors found α = 0.3 gave the best overall performance. At fixed parameter count, raising the XLM-100 vocabulary from 32K to 256K increased average XNLI accuracy by 2.8%. With BERT-Base architecture, moving the vocabulary from 128K to 512K gained more than 3% overall XNLI accuracy.

Switching from language-specific preprocessing with byte-pair encoding to Sentence Piece caused no loss in performance.

Training XLM-7 on CommonCrawl instead of Wikipedia gave clearly better results, especially for low-resource languages. The authors found that stopping on validation perplexity left the Lample and Conneau baseline undertuned, and continued training raised XLM-MLM from 71.3% to more than 75% average XNLI accuracy.

## Cross-lingual transfer on XNLI

In the cross-lingual transfer setting, models are fine-tuned on the English XNLI training set and evaluated on 15 languages. The gain is largest on low-resource languages: XLM-R beats XLM-100 by 15.7% on Swahili and 11.4% on Urdu. Selecting one model on the joint dev set instead of one model per language costs 0.6 points, from 71.3 to 70.7, and the authors encourage that setting.

When the machine-translated training sets of all languages are concatenated and used together, XLM-R reaches 83.6% average accuracy. The authors read this setting as a form of cross-lingual data augmentation, similar to back-translation. Each XLM-R result is averaged over five seeds.

## Named entity recognition and question answering

On CoNLL-2002 and CoNLL-2003 the authors test English, Dutch, Spanish and German under English-only, per-language and all-language training. XLM-R does this without a linear-chain CRF, which the Akbik et al. and Lample et al. baselines use. Averaged over English-only transfer, XLM-R outperforms mBERT by 2.42 F1. Training on all languages together gives an average F1 of 89.43.

On MLQA, models are fine-tuned on English SQuAD and evaluated zero-shot on seven languages.

## Multilingual versus monolingual models

To check English performance, the authors evaluate XLM-R on GLUE dev against RoBERTa. RoBERTa averages 92.8 and XLM-R averages 91.8, compared to 90.2 for BERT-Large.

The authors train 14 monolingual BERT models on Wikipedia and CommonCrawl, capped at 60 GiB, and two XLM-7 models on seven languages. For cross-lingual transfer, the monolingual baselines beat XLM-7 by 1.6% on Wikipedia and 1.3% on CommonCrawl. With translate-train-all, XLM-7 trained on CommonCrawl reaches 80.0% average accuracy, compared to 77.5% for BERT trained on CommonCrawl.

The authors read this as multilingual training overcoming capacity dilution when task data exist in several languages.

## Gains for low-resource languages

Pretraining on Wikipedia gave Swahili and Urdu results similar to a randomly initialized model, which the authors attribute to small data. Pretraining on CommonCrawl improved those languages by up to 10 points, with the same BERT-Base architecture. In the translate-train-all setting the gains are 7% on Swahili and 4.8% on Urdu.

## Limitations

The authors name the curse of multilinguality as an important limitation for future XLU systems that must work under modest computational budgets. The 1.0-point English GLUE gap to RoBERTa remains in this work. The ablations use BERT-Base sized models with a 150K vocabulary, while the final XLM-R uses 24 layers and a 250K vocabulary. The NER results use no CRF layer, so they are not a direct comparison with the decoders of the baselines.

Translate-train-all depends on machine-translated training sets in many languages.

## Paper info

- **Authors**: Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, Veselin Stoyanov
- **Venue**: arXiv · Preprint
- **First published**: 2019-11-5
- **Added**: 2026-11-11
- **Updated**: 2020-4-8
- **Version**: v2
- **arXiv**: 1911.02116
- **Category**: cs.CL
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1911.02116v2) · [PDF ↗](https://arxiv.org/pdf/1911.02116v2)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, Veselin Stoyanov (2019). Unsupervised Cross-lingual Representation Learning at Scale. arXiv:1911.02116v2. https://arxiv.org/abs/1911.02116v2

**BibTeX**

```
@misc{conneau2019unsupervised,
  title = {{Unsupervised Cross-lingual Representation Learning at Scale}},
  author = {Alexis Conneau and Kartikay Khandelwal and Naman Goyal and Vishrav Chaudhary and Guillaume Wenzek and Francisco Guzmán and Edouard Grave and Myle Ott and Luke Zettlemoyer and Veselin Stoyanov},
  year = {2019},
  eprint = {1911.02116},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.02116v2}
}
```

## Other paper commentary

- [DeepWalk: Online Learning of Social Representations](https://refivu.com/en/papers/dd05ed66-43b8-4f25-93ca-264ea076a439-deepwalk-online-learning-of-social-representations.md)
- [Representation Learning: A Review and New Perspectives](https://refivu.com/en/papers/b38149f8-9f53-4406-8d25-bb93c21c4bc9-representation-learning-a-review-and-new-perspectives.md)
- [Representation Learning with Contrastive Predictive Coding](https://refivu.com/en/papers/cd05bbc6-eff6-4b02-b9ef-45070ef6704a-representation-learning-with-contrastive-predictive-coding.md)
- [GloVe: Global Vectors for Word Representation](https://refivu.com/en/papers/d4308808-78ba-4fc7-a70c-6e67f906e337-glove-global-vectors-for-word-representation.md)
- [Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning](https://refivu.com/en/papers/c20bdbfe-b419-4df5-8f33-b1066c4f4576-anomaly-detection-on-attributed-networks-via-contrastive.md)
- [Self-supervised Learning for Human Activity Recognition Using 700,000 Person-days of Wearable Data](https://refivu.com/en/papers/7d06c47d-a111-423f-a4f8-68d244e1093c-self-supervised-learning-for-human-activity-recognition.md)
- [ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design](https://refivu.com/en/papers/d1e3c93e-79dc-4e3d-a949-2f726da0b409-shufflenet-v2-practical-guidelines-for-efficient-cnn.md)
- [Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding](https://refivu.com/en/papers/7b8d214e-c983-4cf0-910e-176f0c996770-deep-compression-compressing-deep-neural-networks-with.md)
- [Cascade R-CNN: Delving into High Quality Object Detection](https://refivu.com/en/papers/8374d444-20db-4d12-9b4c-6fa3eca5e1d6-cascade-r-cnn-delving-into-high-quality-object.md)
- [Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network](https://refivu.com/en/papers/c2c293f4-dc72-4731-8795-3cf7b87f96e1-real-time-single-image-and-video-super-resolution.md)
- [DINOv2: Learning Robust Visual Features without Supervision](https://refivu.com/en/papers/7e38faf5-df28-456e-b030-fb3b41cff096-dinov2-learning-robust-visual-features-without-supervision.md)
- [Deformable Convolutional Networks](https://refivu.com/en/papers/578e91c5-050a-4482-bf73-97db86a8865f-deformable-convolutional-networks.md)

## Terms in this paper

- [ROBERTA](https://refivu.com/en/terms/f42b278690e5-roberta)
- [exact match](https://refivu.com/en/terms/f6e0295e5c92-exact-match)
- [Wikipedia](https://refivu.com/en/terms/2569175e3d90-wikipedia)
- [named entity recognition](https://refivu.com/en/terms/9fb3660a6152-named-entity-recognition)
- [BERTBASE](https://refivu.com/en/terms/73320a675f5a-bertbase)
- [GLUE benchmark](https://refivu.com/en/terms/5eee80e2983e-glue-benchmark)
- [XLM](https://refivu.com/en/terms/1d73ed1caae8-xlm)
- [XNLI](https://refivu.com/en/terms/bb596702db5f-xnli)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/6b2842f9-6ee4-433e-84ed-ae8dc85bdb0a-unsupervised-cross-lingual-representation-learning-at-scale)
