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

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

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

When training massively multilingual language models like mT5 or mBERT, researchers face a staggering data imbalance. A web crawl might yield trillions of characters in English, but only a few million in a language like Yoruba. To prevent the model from becoming exclusively English-centric, the standard practice has been temperature-based sampling, which artificially upsamples low-resource languages.

However, as models scale up, this heuristic approach reveals critical flaws. In this paper, researchers introduce UniMax, a "uniform-top, capped-bottom" sampling strategy that significantly reduces overfitting, mitigates memorization risks, and improves performance across all model scales up to 13 billion parameters.

The Problem with Temperature Sampling

Temperature-based sampling relies on a hyperparameter ($\tau$) to smooth out the data distribution. If you set $\tau$ high enough to give mid-resource languages a meaningful presence in the training mix, you inadvertently force the model to repeat the tiny datasets of the lowest-resource ("tail") languages hundreds of times.

Number of epochs per language rank. Temperature sampling ($\tau=3.33$) forces tail languages through dozens of epochs, while UniMax strictly caps them.

This massive repetition leads to three major issues:

  1. Overfitting: Models memorize the small tail datasets, which degrades their ability to generalize to unseen data in those languages.
  2. Memorization and Privacy: Excessive repetition increases the risk of the model leaking sensitive or private information found in the training data.
  3. Wasted Compute: Expensive training cycles are spent on the 100th pass of a small dataset instead of learning from unique examples in larger datasets.

The UniMax Solution

To address these inefficiencies, the authors propose UniMax (Uniform + Max). Instead of relying on a smooth curve defined by a temperature heuristic, UniMax uses a two-pronged algorithmic approach:

  1. The "Max" Cap: It sets a strict maximum number of allowed repeats ($N$) for any given language. If a language has very little data, the model only sees it $N$ times (often just once, $N=1$) and then stops sampling from it entirely.
  2. The "Uniform" Allocation: The remaining training budget is distributed uniformly across all languages that have enough data to avoid hitting that cap.

This ensures that "head" languages (like English, Chinese, and Russian) are treated with equal priority, while tail languages are protected from the overfitting trap. To maximize the benefit of this new distribution, the authors also train dedicated vocabularies optimized specifically for the UniMax sampling profile.

Key Insights

  • The Scaling Effect: Overfitting on repeated data becomes exponentially more severe as models get larger. While a "Small" model might survive 100 repeats of a dataset without catastrophic overfitting, an "XXL" model (13B parameters) has the capacity to memorize that data almost instantly, leading to a sharp rise in validation loss.
  • Linguistic Utility vs. Raw Frequency: UniMax operates on the assumption that once a model has seen a language's unique data, there is diminishing "linguistic utility" in seeing it again. The compute is better spent on new data from a different language.
  • Positive Transfer is Powerful: Under UniMax, English might only account for ~3% of the training data (compared to ~45% in raw distributions). Surprisingly, English performance barely drops. The knowledge gained from other languages ("positive transfer") is powerful enough to compensate for seeing fewer English examples.

Key Results and the umT5 Release

The researchers evaluated UniMax against standard temperature sampling ($\tau=3.33$) across multiple model sizes (Small, Base, XL, XXL) using a suite of benchmarks including TyDi QA, WMT21, XNLI, and XQuAD.

Average EM and F1 scores on lower-resource languages across model scales. UniMax consistently outperforms temperature-based baselines as parameter count increases.

UniMax consistently outperformed standard temperature sampling across all scales. It proved especially beneficial for lower-resource languages by preventing the "memorization trap," while simultaneously helping high-resource languages by giving them a more uniform representation.

As part of this work, the authors released umT5, a suite of models trained with UniMax on an improved, refreshed version of the mC4 corpus (covering 107 languages and 29 trillion characters). At the XXL scale, umT5 showed significant gains over the original mT5, particularly on knowledge-intensive tasks.

Limitations and Future Directions

While UniMax represents a significant step forward, the study focused exclusively on encoder-decoder (T5-style) architectures; future work will need to verify if these benefits extend to decoder-only (GPT-style) models. Additionally, balancing by "language" is somewhat arbitrary. Future sampling strategies might explore balancing based on demographic utility (number of speakers) or script types, and new transfer learning techniques will still be required for the thousands of languages with almost no web presence.

Summary updated

BibTeX
@inproceedings{chung2023unimax,
  author = {Hyung Won Chung and Xavier Garcia and Adam Roberts and Yi Tay and Orhan Firat and Sharan Narang and Noah Constant},
  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