2025-07-22 · 进阶 · 机器学习 · 自然语言处理

Data Mixing Agent: Learning to Re-weight Domains for Continual Pre-training

本文提出了数据混合代理(Data Mixing Agent),一种基于模型的学习方法,用于持续预训练中域重加权,以平衡模型在不同领域的性能。

更新于 2025-07-23。作者:Kailai Yang、Xiao Liu、Lei Ji、Hao Li、Yeyun Gong、Peng Cheng、Mao Yang。

中文摘要

持续在小型特定任务数据上进行预训练是一种有效的方法,可以提高大型语言模型在新的目标领域的能力,但它也存在着原有能力灾难性遗忘的风险。一种常见的解决方案是在领域空间中对源域和目标域的训练数据混合进行重新加权,以达到平衡的性能。以前的领域重新加权策略依赖于基于人类直觉或经验结果的某些启发式方法的手动指定。在这项工作中,我们通过提出数据混合代理,即第一个基于模型、端到端的框架,该框架学习重新加权领域,证明了更一般的启发式方法可以通过参数化来实现。该代理通过在大量的数据混合轨迹上进行强化学习,并从评估环境中获得相应的反馈,学习可泛化的启发式方法。在数学推理的持续预训练中的实验表明,数据混合代理在实现源域和目标域基准测试的平衡性能方面优于强大的基线。此外,它无需重新训练,就能很好地泛化到未见过的源域、目标模型和领域空间。将其直接应用于代码生成领域也表明了其在目标领域中的适应性。进一步的分析展示了代理的启发式方法与人类直觉的良好一致,以及它们在较少的源域数据下实现卓越模型性能的效率。

英文摘要

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.

解读

一句话总结

本文提出了数据混合代理(Data Mixing Agent),一种基于模型的学习方法,用于持续预训练中域重加权,以平衡模型在不同领域的性能。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源