Advancing Mathematical Reasoning in Language Models: The Impact of Problem-Solving Data, Data Synthesis Methods, and Training Stages

📄 arXiv: 2501.14002v3 📥 PDF

作者: Zui Chen, Tianqiao Liu, Mi Tian, Qing Tong, Weiqi Luo, Zitao Liu

分类: cs.CL, cs.AI

发布日期: 2025-01-23 (更新: 2025-03-24)

备注: ICLR 2025


💡 一句话要点

通过问题求解数据、数据合成方法和训练阶段优化语言模型中的数学推理能力

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 数学推理 语言模型 持续预训练 问题求解数据 数据合成

📋 核心要点

  1. 现有数学LLM通常采用两阶段训练,但持续预训练(CPT)的提升不如监督微调(SFT)显著,存在提升瓶颈。
  2. 论文核心在于探索在预训练阶段使用问题求解数据替代通用数学语料库,并研究有效的数据合成方法。
  3. 实验表明,问题求解数据显著提升模型数学能力,辅导放大合成方法最佳,且CPT优于SFT在复杂问题上的学习。

📝 摘要(中文)

大型语言模型(LLMs)在数学推理方面仍面临挑战,催生了LLEMMA、DeepSeekMath和Qwen2-Math等数学专用LLMs的出现。这些模型通常采用两阶段训练范式:首先使用数学相关语料库进行预训练,然后使用问题数据集进行监督微调(SFT)。然而,与SFT相比,持续预训练(CPT)在数学推理方面的改进通常不那么显著。本研究通过探索预训练阶段的替代策略来解决这一差异,重点关注使用问题求解数据而不是通用数学语料库。我们研究了三个主要研究问题:(1)在CPT期间,问题求解数据是否比通用数学语料库更有效地提高模型的数学推理能力?(2)来自同一来源的合成数据是否同样有效,哪种合成方法最有效?(3)CPT和SFT阶段从相同问题求解数据中开发的能力有何不同,哪些因素导致这些差异?我们的研究结果表明,与通用数学语料库相比,问题求解数据显著提高了模型的数学能力。我们还确定了有效的数据合成方法,证明辅导放大合成方法实现了最佳性能。此外,虽然SFT有助于指令遵循能力,但与使用相同数据的CPT相比,它的表现不佳,这可以部分归因于其对更具挑战性的问题求解数据的学习能力较差。这些见解为优化LLMs的数学推理能力提供了有价值的指导,最终促使我们开发了一个强大的数学基础模型MathGPT-8B。

🔬 方法详解

问题定义:现有数学语言模型在持续预训练阶段,使用通用数学语料库提升效果有限,无法充分挖掘模型在数学推理方面的潜力。痛点在于如何更有效地利用数据提升模型的数学能力,以及如何弥补持续预训练和监督微调之间的性能差距。

核心思路:论文的核心思路是使用问题求解数据替代通用数学语料库进行持续预训练。这种思路基于问题求解数据包含更丰富的推理过程和解题策略,能够更直接地提升模型的数学能力。同时,研究不同的数据合成方法,以扩充问题求解数据的规模。

技术框架:整体框架包含三个主要部分:1) 使用问题求解数据和通用数学语料库进行对比实验,评估其对模型数学能力的提升效果;2) 研究不同的数据合成方法,包括辅导放大等,评估其有效性;3) 对比持续预训练和监督微调阶段,使用相同问题求解数据训练模型,分析其能力差异。

关键创新:最重要的创新点在于发现问题求解数据在持续预训练阶段比通用数学语料库更有效。此外,辅导放大合成方法被证明是最有效的,能够显著提升模型的数学能力。论文还揭示了持续预训练在学习复杂问题求解数据方面优于监督微调。

关键设计:论文的关键设计包括:1) 精心选择和构建问题求解数据集;2) 设计并评估多种数据合成方法,例如辅导放大;3) 对比持续预训练和监督微调的训练策略,分析其对模型能力的影响;4) 开发了MathGPT-8B模型,验证了研究成果的有效性。

📊 实验亮点

实验结果表明,使用问题求解数据进行持续预训练显著提升了模型的数学能力,优于使用通用数学语料库。辅导放大合成方法表现最佳。此外,持续预训练在学习复杂问题求解数据方面优于监督微调,为优化数学语言模型训练提供了新的思路。

🎯 应用场景

该研究成果可应用于开发更强大的数学语言模型,提升模型在数学教育、科学研究、金融分析等领域的应用能力。通过优化预训练策略和数据合成方法,可以降低模型训练成本,提高模型性能,加速数学智能的发展。

📄 摘要(原文)

Mathematical reasoning remains a challenging area for large language models (LLMs), prompting the development of math-specific LLMs such as LLEMMA, DeepSeekMath, and Qwen2-Math, among others. These models typically follow a two-stage training paradigm: pre-training with math-related corpora and post-training with problem datasets for supervised fine-tuning (SFT). Despite these efforts, the improvements in mathematical reasoning achieved through continued pre-training (CPT) are often less significant compared to those obtained via SFT. This study addresses this discrepancy by exploring alternative strategies during the pre-training phase, focusing on the use of problem-solving data over general mathematical corpora. We investigate three primary research questions: (1) Can problem-solving data enhance the model's mathematical reasoning capabilities more effectively than general mathematical corpora during CPT? (2) Are synthetic data from the same source equally effective, and which synthesis methods are most efficient? (3) How do the capabilities developed from the same problem-solving data differ between the CPT and SFT stages, and what factors contribute to these differences? Our findings indicate that problem-solving data significantly enhances the model's mathematical capabilities compared to general mathematical corpora. We also identify effective data synthesis methods, demonstrating that the tutorship amplification synthesis method achieves the best performance. Furthermore, while SFT facilitates instruction-following abilities, it underperforms compared to CPT with the same data, which can be partially attributed to its poor learning capacity for more challenging problem-solving data. These insights provide valuable guidance for optimizing the mathematical reasoning capabilities of LLMs, culminating in our development of a powerful mathematical base model called MathGPT-8B.