Dynamic Gradient Alignment for Online Data Mixing
Not on the map. Why?
Abstract (arXiv)
The composition of training data mixtures is critical for effectively training large language models (LLMs), as it directly impacts their performance on downstream tasks. Our goal is to identify an optimal data mixture to specialize an LLM for a specific task with access to only a few examples. Traditional approaches to this problem include ad-hoc reweighting methods, importance sampling, and gradient alignment techniques. This paper focuses on gradient alignment and introduces Dynamic Gradient Alignment (DGA), a scalable online gradient alignment algorithm. DGA dynamically estimates the pre-training data mixture on which the models' gradients align as well as possible with those of the model on the specific task. DGA is the first gradient alignment approach that incurs minimal overhead compared to standard pre-training and outputs a competitive model, eliminating the need for retraining the model. Experimentally, we demonstrate significant improvements over importance sampling in two key scenarios: (i) when the pre-training set is small and importance sampling overfits due to limited data; and (ii) when there is insufficient specialized data, trapping importance sampling on narrow pockets of data. Our findings underscore the effectiveness of gradient alignment methods in optimizing training data mixtures, particularly in data-constrained environments, and offer a practical solution for enhancing LLM performance on specific tasks with limited data availability.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 21 of its 33 references that are in the map. First posted on arXiv 3 Oct 2024.
Builds on
21 of 33 references.
References · 21
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2017Understanding Black-box Predictions via Influence Functionscited by 1,714
- 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,582
- 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,548
- 2023Weak-to-Strong Generalization: Eliciting Strong Capabilities With Weak Supervisioncited by 445
- 2023DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretrainingcited by 385
- 2023Data Selection for Language Models via Importance Resamplingcited by 322
9 more
- 2018Approximation Methods for Bilevel Programmingcited by 231
- 2023A Pretrainer's Guide to Training Data: Measuring the Effects of Data Age, Domain Coverage, Quality, & Toxicitycited by 180
- 2024RegMix: Data Mixture as Regression for Language Model Pre-trainingcited by 172
- 2020Unsupervised Domain Clusters in Pretrained Language Modelscited by 160
- 2022A framework for bilevel optimization that enables stochastic and global variance reduction algorithmscited by 99
- 2021Amortized Implicit Differentiation for Stochastic Bilevel Optimizationcited by 62
- 2019Optimizing Data Usage via Differentiable Rewardscited by 48
- 2023Adaptive Training Distributions with Scalable Online Bilevel Optimizationcited by 11
- 2024Need a Small Specialized Language Model? Plan Early!cited by 4
Built on by
Citing papers per year: 2025: 8; 2026: 2.
10 papers.
- 2025Chameleon: A Flexible Data-mixing Framework for Language Model Pretraining and Finetuningcited by 14
- 2025Diversity as a Reward: Fine-Tuning LLMs on a Mixture of Domain-Undetermined Datacited by 13
- 2025Fast Data Attribution for Text-to-Image Modelscited by 7
- 2025GRAPE: Optimize Data Mixture for Group Robust Multi-target Adaptive Pretrainingcited by 4
- 2025Soup-of-Experts: Pretraining Specialist Models via Parameters Averagingcited by 3
- 2025DIDS: Domain Impact-aware Data Sampling for Large Language Model Trainingcited by 3
- 2025R&B: Domain Regrouping and Data Mixture Balancing for Efficient Foundation Model Trainingcited by 3
- 2025Can Small Training Runs Reliably Guide Data Curation? Rethinking Proxy-Model Practicecited by 3
- 2026DynaMiCS: Fine-tuning LLMs with Performance Constraints using Dynamic Mixturescited by 2
- 2026MaD-Mix: Multi-Modal Data Mixtures via Latent Space Coupling for Vision-Language Model Trainingcited by 0
- 2026DynaMiCS: Fine-tuning LLMs with Performance Constraints using Dynamic Mixtures11 May 2026
- 2026MaD-Mix: Multi-Modal Data Mixtures via Latent Space Coupling for Vision-Language Model Training8 Feb 2026
- 2025Can Small Training Runs Reliably Guide Data Curation? Rethinking Proxy-Model Practice30 Dec 2025
- 2025Fast Data Attribution for Text-to-Image Models13 Nov 2025
- 2025Chameleon: A Flexible Data-mixing Framework for Language Model Pretraining and Finetuning30 May 2025
- 2025GRAPE: Optimize Data Mixture for Group Robust Multi-target Adaptive Pretraining26 May 2025
- 2025R&B: Domain Regrouping and Data Mixture Balancing for Efficient Foundation Model Training1 May 2025
- 2025DIDS: Domain Impact-aware Data Sampling for Large Language Model Training17 Apr 2025
- 2025Diversity as a Reward: Fine-Tuning LLMs on a Mixture of Domain-Undetermined Data5 Feb 2025
- 2025Soup-of-Experts: Pretraining Specialist Models via Parameters Averaging3 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2024Efficient Alignment of Large Language Models via Data Sampling
- 2025Towards Efficient and Effective Alignment of Large Language Models
- 2025Leveraging Importance Sampling to Detach Alignment Modules from Large Language Models
- 2025Principled Data Selection for Alignment: The Hidden Risks of Difficult Examples
- 2024Latent Distance Guided Alignment Training for Large Language Models
- 2025A Survey on Training-free Alignment of Large Language Models
- 2026AlignTune: Modular Toolkit for Post-Training Alignment of Large Language Models
- 2025Rethinking Data Mixture for Large Language Models: A Comprehensive Survey and New Perspectives