Data-Centric AI

data mixture optimization

A pretraining corpus is a blend of domains — web text, code, books, encyclopedic articles, math. The mixture weights say what fraction of training tokens to draw from each. These weights matter enormously: too little code and the model can't program, too much narrow web text and it loses general knowledge. Data mixture optimization is the problem of choosing those sampling proportions to get the best model for your goals, rather than just using the natural proportions the internet happens to provide.

Several principled approaches exist. Group distributionally robust optimization (DRO) and DoReMi train a small proxy model to find weights that minimize worst-case excess loss across domains, on the theory that protecting the hardest domain yields a robust general model. Others fit a scaling-law surrogate that predicts validation loss as a function of mixture weights and token budget, then optimize the predicted loss; online methods adjust weights during training from per-domain learning signals. The output is a weight vector on the simplex over domains, sometimes annealed over training so that high-quality domains are upweighted late.

The difficulty is that the best mixture depends on model size, total token budget, and which downstream tasks you score — there is no universal recipe, and proxy-model weights do not always transfer cleanly to the full-scale run.

\min_{w \in \Delta^{k}} \; \max_{d \in \{1,\dots,k\}} \big[ \mathcal{L}_{d}(\theta_w) - \mathcal{L}_{d}^{\star} \big]

DoReMi-style minimax: choose domain weights w on the simplex to minimize the worst domain's excess loss over its reference.

Proxy-model mixture weights are tuned at small scale; always re-validate that they still help at the size you actually train.

Also called
domain reweightingmixture weightsDoReMi資料配比