NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

UniMax: Fairer and more Effective Language Sampling for Large-Scale Multilingual Pretraining

Hyung Won Chung, Noah Constant, Xavier Garcia, Adam Roberts, Yi Tay, Sharan Narang, Orhan Firat

TL;DR

UniMax is a new language sampling strategy for large-scale multilingual pretraining that replaces the industry-standard "temperature-based" sampling. By explicitly capping the number of times low-resource data is repeated and sampling high-resource languages more uniformly, UniMax achieves superior performance across model scales while effectively mitigating overfitting on "tail" languages.

What Problem Does This Paper Address?

When training massive multilingual models like mT5 or XLM-R, researchers face a daunting data imbalance. English might have trillions of characters available, while a language like Yoruba has orders of magnitude less. To ensure the model doesn't ignore low-resource languages, the standard approach is temperature sampling, which artificially upsamples smaller datasets.

However, this heuristic has a major flaw: to give low-resource languages enough "weight," the model ends up seeing the same few examples hundreds of times. This leads to three critical issues:

  1. Overfitting: The model memorizes the small datasets, which actually degrades its ability to generalize to new tasks.
  2. Memorization: Excessive repetition increases the risk of the model leaking sensitive or private information found in the training data.
  3. Inefficiency: Training cycles are wasted on redundant examples that could have been used for unique data in higher-resource languages.

As models scale up in parameters, their capacity to overfit increases, making this "language balancing" problem a significant bottleneck for state-of-the-art AI.

Methods

The authors propose UniMax (Uniform + Max), a two-pronged sampling algorithm that is conceptually simple but highly effective:

  1. Capping Repeats: You define a maximum number of allowed repeats ($N$) for any given language.
  2. Uniform Allocation: The algorithm attempts to distribute the total training token budget as uniformly as possible across all languages. If a uniform share for a specific language would exceed its $N$-epoch cap, that language is limited to its cap, and the "leftover" budget is redistributed among the remaining languages.

Unlike temperature sampling, which follows a smooth power-law curve, UniMax creates a "step-like" distribution. It provides more uniform coverage of high-resource ("head") languages while providing a hard countermeasure against overfitting on low-resource ("tail") languages.

Figure 1: The x-axis is the rank of the language based on the character count. 1/8 budget refers to the 250,000 steps with sequence length of 512, which is one-eights of the full-scaling training budget (1M steps with 1024 sequence length) referred to as 1x, matching that of mT5.

Datasets

The researchers didn't just propose a method; they refreshed the infrastructure:

  • mC4 (Refreshed): They released an improved version of the massive mC4 corpus, consisting of 29 trillion characters across 107 languages. Crucially, they raised the language detection confidence threshold from 0.7 to 0.95, significantly reducing the amount of "noise" and mislabeled documents in the tail languages.
  • Evaluation Benchmarks: The models were tested on a diverse suite including TyDi QA (question answering), WMT21 (machine translation), and cross-lingual benchmarks like XNLI, XQuAD, and MLQA.

Key Insights and Ideas

  • Overfitting is Scale-Dependent: One of the paper's most important findings is that overfitting on repeated data becomes much more severe as models grow. A "Large" model might show no signs of overfitting on repeated Yoruba data, but an "XXL" model (13B parameters) shows clear, conspicuous performance degradation.
  • Uniformity is Fairer and Better: The authors challenge the idea that English must dominate the pretraining distribution. They found that even when English was only 1% of the UniMax budget (compared to ~50% in natural distributions), the model's English performance only dropped by about 1%, likely due to "positive transfer" from other languages.
  • Closing the Loss Gap: UniMax successfully narrows the gap in pretraining loss between high- and low-resource languages without the "spiky" loss curves indicative of overfitting seen in temperature sampling.
Figure 2: Pretraining loss curves. Note how at XXL scale (red/blue lines in middle/right), temperature sampling (b) shows overfitting for Yoruba (yo), while UniMax (c) remains stable.

Key Results

  • Consistent Wins: UniMax outperformed temperature-based baselines across all model scales (Large, XL, XXL) on the TyDi QA benchmark.
  • umT5 vs. mT5: The authors released umT5, a suite of models trained with UniMax. umT5 outperformed the original mT5 on almost every task and size, with the gains being most pronounced at the largest scales.
  • Translation Superiority: On the WMT21 multilingual translation task, UniMax was the best-performing method for the vast majority of language pairs, especially those involving non-English targets.

Limitations and Future Work

While UniMax represents a significant step forward, the authors note several areas for further exploration:

  • Model Architecture: The study focused exclusively on encoder-decoder (T5-style) models. It remains to be seen if the benefits translate identically to decoder-only (GPT-style) or encoder-only (BERT-style) architectures.
  • Parallel Data: The current work focuses on unlabeled, mono-lingual data. Integrating UniMax with parallel data for machine translation is a logical next step.
  • Defining the Unit of Fairness: The paper treats "language" as the unit to balance. However, the authors suggest that future work could explore "demographic utility"—balancing based on the number of speakers per language to create even more equitable models.

Summary updated

BibTeX
@inproceedings{chung2023unimax,
  author = {Hyung Won Chung and Noah Constant and Xavier Garcia and Adam Roberts and Yi Tay and Sharan Narang and Orhan Firat},
  title = {{UniMax: Fairer and more Effective Language Sampling for Large-Scale Multilingual Pretraining}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=kXwdL1cWOAi},
}
Figure