MixMin: Finding Data Mixtures via Convex Minimization

Anvith Thudi, E. Rovers, Yangjun Ruan, T. Thrush, Chris J. Maddison
2/1/2025

No official code found. Best implementation: Anvith-Thudi/MixMin (0 stars, last commit 2025-09-29).

Abstract

Modern machine learning pipelines are increasingly combining and mixing data from diverse and disparate sources, e.g., pre-training large language models. Yet, finding the optimal data mixture is a challenging and open problem. We formalize this data mixing problem as a bi-level objective: the best mixture is the one that would lead to the best model for a downstream objective. Unfortunately, this objective is generally intractable. In this paper, we make the observation that the bi-level data mixing objective becomes convex as our model class becomes larger. We develop and study a gradient-based approach for optimizing this convex objective, which we call MixMin, and test it on language modeling and chemistry tasks. MixMin was the only method that uniformly improved the data mixture in all our experiments. With MixMin, we improved the data mixture using less than 0.2% additional compute for a pythia-410M model trained on 8.2B tokens, resulting between 1-5% relative improvement to negative log likelihood on PIQA, ARC Easy, SciQ, and OpenWebMath. Crucially, we found that MixMin mixtures for smaller models improved training of larger models, suggesting that MixMin mixtures may be scale-invariant. When mixing bioassay data to train an XGBoost model, we saw improvements to average precision scores of 0.03-0.15.

View on arXivView PDF

Code Implementations(1)

Code Base for "MixMin: Finding Data Mixtures via Convex Minimization"

00PythonSep 29, 20251 years ago

Similar Papers

Cite this paper

@article{thudi2025mixmin,
  title  = {MixMin: Finding Data Mixtures via Convex Minimization},
  author = {Anvith Thudi and E. Rovers and Yangjun Ruan and T. Thrush and Chris J. Maddison},
  year   = {2025},
  eprint = {2502.10510},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.10510},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.10510.svg)](https://codeofpaper.com/paper/2502.10510)

Discussion