用结构化解题代码引导生成数学推理数据,提升模型训练效果
Synthesis by Design: Controlled Data Generation via Structural Guidance
- 通过代码提取问题结构,指导生成带中间步骤的数学题
- 构建39K题数据集,6.1K题为高难度基准测试集
- 适合研究大模型数学推理能力的学者使用
数学推理对大语言模型仍具挑战,源于复杂逻辑与精确计算需求。现有方法通过重述问题合成数据,但存在生成质量不高和题目复杂度不足的问题。为此,本文提出从生成的解题代码中提取结构信息,并以此指导数据生成。在MATH和GSM8K数据集上,该方法生成了39,000道带标注中间步骤的问题,以及一个6,100题的更高难度基准测试集。实验表明,模型性能随推理长度增加而下降。此外,在多个大模型上使用该数据集进行微调,验证了数据的有效性。代码与数据已开源。
原文摘要 · Abstract (English)
Mathematical reasoning remains challenging for LLMs due to complex logic and the need for precise computation. Existing methods enhance LLM reasoning by synthesizing datasets through problem rephrasing, but face issues with generation quality and problem complexity. To address this, we propose to extract structural information with generated problem-solving code from mathematical reasoning and guide data generation with structured solutions. Applied to MATH and GSM8K, our approach produces 39K problems with labeled intermediate steps and a 6.1K-problem benchmark of higher difficulty. Results on our benchmark show that model performance declines as reasoning length increases. Additionally, we conducted fine-tuning experiments using the proposed training data on a range of LLMs, and the results validate the effectiveness of our dataset. We hope the proposed method and dataset will contribute to future research in enhancing LLM reasoning capabilities. Our code and data are available at https://github.com/OpenCausaLab/StructuralGeneration.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。