Data Mixing Agent: Learning to Re-weight Domains for Continual Pre-training
On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks
Abstract (arXiv)
Continual pre-training on small-scale task-specific data is an effective method for improving large language models in new target fields, yet it risks catastrophic forgetting of their original capabilities. A common solution is to re-weight training data mixtures from source and target fields on a domain space to achieve balanced performance. Previous domain reweighting strategies rely on manual designation with certain heuristics based on human intuition or empirical results. In this work, we prove that more general heuristics can be parameterized by proposing Data Mixing Agent, the first model-based, end-to-end framework that learns to re-weight domains. The agent learns generalizable heuristics through reinforcement learning on large quantities of data mixing trajectories with corresponding feedback from an evaluation environment. Experiments in continual pre-training on math reasoning show that Data Mixing Agent outperforms strong baselines in achieving balanced performance across source and target field benchmarks. Furthermore, it generalizes well across unseen source fields, target models, and domain spaces without retraining. Direct application to the code generation field also indicates its adaptability across target domains. Further analysis showcases the agents' well-aligned heuristics with human intuitions and their efficiency in achieving superior model performance with less source-field data.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 45 of its 57 references that are in the map. First posted on arXiv 21 Jul 2025.
Builds on
45 of 57 references.
References · 45
- 2017Attention Is All You Needcited by 60,361
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2025Qwen3 Technical Reportcited by 8,820
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
33 more
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2020Conservative Q-Learning for Offline Reinforcement Learningcited by 1,809
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,392
- 2019Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalizationcited by 1,247
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
- 2024Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvementcited by 1,090
- 2021GLaM: Efficient Scaling of Language Models with Mixture-of-Expertscited by 897
- 2017Crowdsourcing Multiple Choice Science Questionscited by 765
- 2019MathQA: Towards Interpretable Math Word Problem Solving with Operation-Based Formalismscited by 662
- 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 639
- 2023Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruningcited by 415
- 2023DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretrainingcited by 399
- 2024DataComp-LM: In search of the next generation of training sets for language modelscited by 398
- 2024Continual Learning of Large Language Models: A Comprehensive Surveycited by 234
- 2024Data Mixing Laws: Optimizing Data Mixtures by Predicting Language Modeling Performancecited by 184
- 2024RegMix: Data Mixture as Regression for Language Model Pre-trainingcited by 177
- 2024Nemotron-CC: Transforming Common Crawl into a Refined Long-Horizon Pretraining Datasetcited by 160
- 2023MathCoder: Seamless Code Integration in LLMs for Enhanced Mathematical Reasoningcited by 156
- 2024Large Language Models for Time Series: A Surveycited by 114
- 2024Unpacking DPO and PPO: Disentangling Best Practices for Learning from Preference Feedbackcited by 107
- 2021d3rlpy: An Offline Deep Reinforcement Learning Librarycited by 84
- 2025Organize the Web: Constructing Domains Enhances Pre-Training Data Curationcited by 76
- 2023SlimPajama-DC: Understanding Data Combinations for LLM Trainingcited by 72
- 2025MIRA: Medical Time Series Foundation Model for Real-World Health Datacited by 22
- 2024Velocitune: A Velocity-based Dynamic Domain Reweighting Method for Continual Pre-trainingcited by 12
- 2025SampleMix: A Sample-wise Pre-training Data Mixing Strategey by Coordinating Data Quality and Diversitycited by 10
- 2025Commute Your Domains: Trajectory Optimality Criterion for Multi-Domain Learningcited by 9
- 2025Sigma: Differential Rescaling of Query, Key and Value for Efficient Language Modelscited by 3
Built on by
Citing papers per year: 2025: 1; 2026: 4.
5 papers.
- 2025Narrow Finetuning Leaves Clearly Readable Traces in Activation Differencescited by 28
- 2026Dynamic Proxy-Mixing: Transferring Replay Controllers from Small to Large Models for Continual Instruction Tuningcited by 3
- 2026Harnessing the Potential of Optimizing Data Mixtures via Bayesian Domain Reweightingcited by 0
- 2026Replay on Demand: An Emergent Curriculum for Balancing Adaptation and Forgetting in Continued Pretrainingcited by 0
- 2026Scalable, Transferable Meta-network for Data Selection Requires a Different Loss (and Why the Obvious Choice is Problematic)cited by 0
- 2026Scalable, Transferable Meta-network for Data Selection Requires a Different Loss (and Why the Obvious Choice is Problematic)1 Oct 2026
- 2026Replay on Demand: An Emergent Curriculum for Balancing Adaptation and Forgetting in Continued Pretraining30 Sep 2026
- 2026Harnessing the Potential of Optimizing Data Mixtures via Bayesian Domain Reweighting30 Jul 2026
- 2026Dynamic Proxy-Mixing: Transferring Replay Controllers from Small to Large Models for Continual Instruction Tuning29 May 2026
- 2025Narrow Finetuning Leaves Clearly Readable Traces in Activation Differences14 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2026Always Learning, Always Mixing: Efficient and Simple Data Mixing All The Time
- 2026Rethinking Data Mixing from the Perspective of Large Language Models
- 2025Towards Continuous Intelligence Growth: Self-Training, Continual Learning, and Dual-Scale Memory in SuperIntelliAgent
- 2026ContinualSkillBench: Can LLM Agents Truly Evolve Their Capabilities?
- 2026USA: Update-aware SAM for Cross-domain On-Policy Disitllation of Language Agents
- 2025AgentRefine: Enhancing Agent Generalization through Refinement Tuning
- 2025SWE-Bench-CL: Continual Learning for Coding Agents
- 2026Mid-Training with Self-Generated Data Improves Reinforcement Learning in Language Models