LinMix: Data Mixing as Linear Domain Attribution
Organizations: University of Warsaw · Centre for Credible AI, Warsaw University of Technology · Faculty of Computer Science, University of Vienna
Abstract
Language model performance depends strongly on the mixture of domains in the pretraining data corpus. Popular data mixing methods select these domain weights by training many small proxy models on random mixes and then fitting a regression model to predict performance from the mix. We recognize this practice as a domain attribution problem, where the regression measures each domain's contribution to the target metric. Through this lens, the standard Dirichlet sampling of proxy data mixes is a poor regression design that requires tuning and cannot support a linear fit for hundreds of domains. Building on classical optimal experimental design, we introduce LinMix, which samples mixes at the vertices of the capped simplex so that each domain is at its cap or absent. This hyperparameter-free vertex sampling decorrelates domain effects, enabling an interpretable linear model whose coefficients are the domain attributions. The optimal mix given by LinMix provably keeps only domains with positive attribution values and requires no search over candidate mixes. We further establish the optimality of vertex sampling, and prove that Dirichlet sampling inflates the attribution error when its mixes concentrate around the prior data mix. Pretraining experiments with 1B-parameter OLMo2 and 4B Qwen3.5 language models show that LinMix outperforms Dirichlet-based data mixing across reasoning, code, and math benchmarks, with relative gains of 46% on MBPP and 14% on GSM8K. At 288 fine-grained domains, only vertex sampling supports a linear fit, and LinMix improves benchmark accuracy by 11% on average over the best nonlinear baseline.
Figures & tables
| 24 domains ( 30M models) | 288 domains ( 60M proxy models) | |||||||||||
| ARC | HellaSwag | CPile | ARC | HellaSwag | HS + PIQA | CPile | ||||||
| Method | Acc | BPB | Acc | BPB | BPB | Acc | BPB | Acc | BPB | Acc | BPB | BPB |
| Prior | .437 | .864 | .543 | .788 | .888 | .436 | .870 | .541 | .788 | .634 | .902 | .890 |
| RegMix | .496 | .780 | .563 | .781 | .842 | .449 | .850 | .547 | .784 | .638 | .896 | .878 |
| Olmix | .486 | .785 | .550 | .782 | .860 | .435 | .872 | .550 | .783 | .641 | .892 | .850 |
| LinMix | .510 | .785 | .568 | .785 | .847 | .511 | .757 | .615 | .758 | .690 | .855 | .834 |
| Target: HellaSwag | Target: MBPP (code) | Target: GSM8K (math) | CPile | ||||||||||
| HellaSwag | PIQA | MBPP | HumanEval | GSM8K | MATH | CPile | |||||||
| Method | Acc | BPB | Acc | BPB | P@1 | BPB | P@1 | BPB | EM | BPB | EM | BPB | BPB |
| Prior | .632 | .743 | .764 | .952 | .304 | .375 | .213 | .285 | .214 | .403 | .162 | .463 | .814 |
| RegMix | .659 | .735 | .775 | .933 | .304 | .379 | .213 | .290 | .135 | .418 | .124 | .487 | .808 |
| Olmix | .667 | .731 | .783 | .932 | .302 | .368 | .244 | .277 | .294 | .391 | .202 | .446 | .801 |
| LinMix | .696 | .716 | .782 | .920 | .444 | .334 | .280 | .258 | .337 | .383 | .266 | .427 | .797 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Params | Layers | Heads | Hidden size | Batch | Tokens | Peak LR | |
|---|---|---|---|---|---|---|---|---|
| OLMo2 30M | 29.2M | 4 | 8 | 256 | 64 | 1B | 0.99 | |
| OLMo2 60M | 57.6M | 8 | 8 | 384 | 128 | 2B | 0.98 | |
| OLMo2 100M | 102.0M | 12 | 8 | 512 | 128 | 3.2B | 0.97 | |
| OLMo2 1B | 1.41B | 18 | 16 | 2048 | 512 | 32B | 0.95 | |
| Qwen3.5 100M | 104.5M | 9+3 | 4 | 576 | 128 | 3.2B | 0.97 | |
| Qwen3.5 1B | 1.33B | 12+4 | 16 | 2048 | 512 | 32B | 0.95 |
| Benchmark | Proxy split (size) | Held-out set (size) | Shots | Target metric |
|---|---|---|---|---|
| ARC-Easy | train (2,251) | test (2,376) | 5 | normalized acc. |
| ARC-Challenge | train (1,119) | test (1,172) | 5 | normalized acc. |
| HellaSwag | train (39,905) | validation (10,042) | 5 | normalized acc. |
| PIQA | train (16,113) | validation (1,838) | 5 | normalized acc. |
| MBPP | train (374) | test (500) | 3 | pass@1 |
| GSM8K | train (7,473) | test (1,319) | 5 | exact match |
Data Mixture Optimization
Data mixture optimization studies how to allocate training examples across domains and tasks to improve model performance under data and compute constraints.
See all 40 papers