machine learning

Harnessing the Potential of Optimizing Data Mixtures via Bayesian Domain Reweighting

arXiv:2607.27928

summary

The paper proposes a Bayesian method that learns optimal domain weights for multi‑domain pre‑training of large language models by inferring a Dirichlet distribution with Gamma priors, offering stable and efficient data mixture optimization.

Abstract

The performance of Large Language Models (LLMs) is fundamentally influenced by the distributional composition of multi-domain pre-training data. While manual heuristics were prevalent in early models, they increasingly fail to capture the intricate synergies between domains as data complexity grows. To overcome the issue, a dominant approach seeks to fit a proxy function mapping between domain weights and their corresponding validation losses, and then find the optimal domain weights to minimize validation losses. These methods rely on strong structural assumptions, such as rank invariance or scaling laws, which are often violated, resulting in non-negligible estimation bias. A promising approach is to directly optimize the weighting scheme from data. However, it suffers from unstable optimization trajectory and prohibitive computational overhead, limiting its potential to search better domain weights configurations. This paper presents a Bayesian domain weighting method to infer the weights from a Dirichlet distribution via introducing Gamma prior information learned from observations. Experimental results demonstrate that proposed method could achieve stable and efficient domain weights learning, and identifies optimal mixtures while consuming substantially less data than search-based function-fitting methods, revitalizing optimization-based domain weighting for large-scale applications.

Topics & keywords

#data mixture optimization#domain weighting#bayesian methods#large language models#pretraining data selectionbayesian domain weightingdirichlet distributiongamma priorvalidation lossmulti-domain pretraining
Harnessing the Potential of Optimizing Data Mixtures via Bayesian Domain Reweighting · wovepaper