Reproduce “Dynamic Gradient Alignment for Online Data Mixing” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Simin Fan, David Grangier, Pierre Ablin

Researchers from Apple and EPFL developed Dynamic Gradient Alignment (DGA), an online method that dynamically adjusts pre-training data mixtures for Large Language Models by aligning gradients with a specific task. DGA leverages an Exponential Moving Average (EMA) for stability and a distribution reweighting strategy, enabling it to operate with minimal overhead and scale to hundreds of thousands of fine-grained domains while outperforming static importance sampling in token-limited scenarios.

Key insights

  • Dynamic data mixture adaptation is crucial for LLM training, preventing premature overfitting by continuously adjusting domain weights based on the model's evolving knowledge.
  • The Exponential Moving Average (EMA) regularization on dynamic domain weights is essential for stability and effectively balances "exploration" and "exploitation" in data sampling.
  • Reparameterizing fine-grained domain weights as a combination of basis distributions allows gradient alignment methods to scale efficiently to hundreds of thousands of domains.
  • Improved language modeling performance (loss) does not always directly translate to enhanced reasoning abilities (MMLU accuracy), suggesting a potential disconnect between these evaluation metrics.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.