TL;DR
This paper introduces DRAW, a novel framework for optimizing data mixtures in large language model (LLM) pre-training. DRAW treats domain weights as dynamically sampled random variables, leading to more robust and efficient training, outperforming existing methods on various benchmarks.
What Problem Does This Paper Address?
Training large language models (LLMs) requires massive datasets, and the composition of this data (i.e., the proportion of data from different sources or "domains") significantly impacts performance. Finding the optimal mix of these domains is crucial but computationally very expensive, especially as the number of domains and model size grow. Existing methods often rely on fixed domain weights or struggle with scalability. This paper addresses the challenge of efficiently and effectively adapting data mixtures for LLM pre-training, particularly when transferring knowledge from smaller "proxy" models to larger "main" models.
Methods
DRAW introduces a principled framework that models domain weights as Dirichlet-distributed random variables. This means instead of picking a single "best" weight for each domain, DRAW samples weights from a distribution. The core of DRAW involves four steps:
- Sampling Prior Domain Weights: Initial domain weight distributions are set based on the proxy model's width and the number of domains.
- Training Proxy Model and Bayesian Updating: A smaller proxy model is trained to learn optimized domain weights. These learned weights are then used to update the parameters of the domain weight distribution via Bayesian inference.
- Scaling Distribution for Main Model: The learned distribution parameters are scaled to match the larger main model's capacity, ensuring the learned preferences are transferred effectively.
- Training Main Model: During the main model's pre-training, domain weights are dynamically sampled from this scaled distribution at each training iteration. This allows the model to adapt its data sampling strategy on the fly.
This approach reframes data mixing as a controlled stochastic reweighting problem, enabling adaptive filtering of noisy data and emphasis on high-quality sources.
Datasets
The primary dataset used is The Pile, a large, diverse, open-domain dataset comprising 17 distinct subdomains. For downstream evaluation, the authors use a suite of benchmarks including:
- MMLU
- MMLU-Pro
- Natural Questions (NQ)
- GSM8K
- BoolQ
- ARC-C
- DROP
Key Insights and Ideas
- Domain weights as random variables: Treating domain weights as distributions (Dirichlet) rather than fixed values allows for more nuanced and adaptive data sampling during training.
- Bayesian updating for informed priors: Using a proxy model to learn an initial domain weight distribution and then refining it with Bayesian inference provides a principled way to transfer knowledge.
- Scale-aware transfer: The method explicitly accounts for the difference in scale between proxy and main models, ensuring that learned domain preferences are appropriately adapted.
- Adaptive noise filtering: DRAW effectively downweights noisy or low-quality data sources (like Pile-CC) and amplifies high-signal domains (like Wikipedia and StackExchange), leading to better data utilization.
- Stochastic regularization benefit: Even purely random domain weights can outperform fixed baselines, suggesting that stochasticity itself aids in exploring the loss landscape. DRAW builds on this by providing informed stochasticity.
Key Results
- Superior Language Modeling Performance: DRAW-trained models consistently achieved lower average and worst-case validation losses on The Pile compared to baseline methods (e.g., fixed weights, DoReMi, RegMix).
- Robust Downstream Transfer: DRAW achieved the best results on most downstream benchmarks, particularly knowledge-intensive tasks like MMLU and NQ, showing significant improvements over baselines.
- Effective Noise Filtering: Table 2 shows DRAW assigning negligible weight to the noisy Pile-CC domain (0.0003) while heavily favoring high-quality sources like Wikipedia (41.7%), Enron Emails (27.7%), and StackExchange (24.8%).
- Stable Training: Experiments with different random seeds demonstrated minimal variance in performance, confirming the stability and reproducibility of DRAW.
- Diminishing Returns for Proxy Size: Increasing the proxy model size yielded only marginal improvements, suggesting that a moderately sized proxy is sufficient.
- Dominance of Main Model Size: Scaling the main model size led to substantial performance gains, confirming that main model capacity is the primary driver of generalization.
Limitations and Future Work
- Closed-world assumption: DRAW assumes the target distribution is within the span of the observed training domains and is not designed for out-of-distribution settings.
- Modest gains over random: In some cases, DRAW's advantage over purely random stochastic weighting was limited, suggesting that stochastic exploration itself contributes to gains.
- Simplifying assumptions in theory: The theoretical analysis relies on standard assumptions for tractability, which may not fully capture the complexities of modern LLM optimization.
- Limited domain interaction modeling: The current Dirichlet formulation doesn't explicitly model richer correlations between domains beyond the simplex constraint.
- Small-scale downstream evaluation: Some downstream results for smaller models were near chance level, making validation perplexity the primary metric for reweighting quality.
Future Work: * Online reweighting: Developing an online version of DRAW that updates domain weights during main model training could enhance adaptivity. * Richer priors: Exploring hierarchical or correlated priors (e.g., logistic-normal distributions) could better capture domain structures. * Multimodal extension: Extending DRAW to multimodal pre-training (text, image, video) is a promising direction. * Task-aware reweighting: Incorporating downstream task feedback into the reweighting loop could enable task-specific domain mixture optimization.
Summary updated