arXiv:2503.17439cs.LGcs.AI2025-03ACL被引 32

让大模型从错误中学习,提升数学推理能力。

LEMMA: Learning from Errors for MatheMatical Advancement in LLMs

  • 构建含错误步骤与修正连接的训练数据,引导模型自我纠错。
  • 在MATH和GSM8K数据集上,准确率比基线提升5.2%和3.8%。
  • 适合希望提升模型自省与推理能力的研究者使用。

大型语言模型在解决数学问题上展现出卓越的推理能力。然而,现有方法主要关注提升正确训练数据的质量,如从先进模型中提炼高质量解法,忽视了错误数据的价值,可能限制模型的反思能力。尽管部分研究尝试利用错误数据,但常依赖复杂机制(如蒙特卡洛树搜索探索错误节点)。本文提出通过学习错误来促进数学进步(LEMMA)的方法。LEMMA构建包含错误解法、错误步骤及与正确解法的平滑反射连接的数据集用于微调。我们系统分析模型生成的错误类型,提出基于错误类型的增广方法,收集多样且有代表性的错误;正确解法通过修复错误或重新生成获得。通过模型感知的平滑反射连接,将错误解法逐步迁移至正确解法。在构造数据集上微调后,模型可在生成过程中自主纠正错误,无需外部批判模型。实验结果表明,LEMMA在MATH和GSM8K数据集上显著优于其他强基线。

原文摘要 · Abstract (English)

Large language models (LLMs) have demonstrated remarkable reasoning capability in solving mathematical problems. However, existing approaches primarily focus on improving the quality of correct training data, e.g., distilling high-quality correct solutions from advanced models, neglecting the value contained in error data, potentially hindering the model's reflective ability. Though some studies attempt to leverage error data, they often involve complex mechanisms, such as Monte Carlo Tree Search (MCTS) to explore error nodes. In this work, we propose to enhance LLMs' reasoning ability by Learning from Errors for Mathematical Advancement (LEMMA). LEMMA constructs data consisting of an incorrect solution with an erroneous step and a reflection connection to a correct solution for fine-tuning. Specifically, we systematically analyze the model-generated error types and introduce an error-type grounded mistake augmentation method to collect diverse and representative errors. Correct solutions are either from fixing the errors or generating a fresh start. Through a model-aware smooth reflection connection, the erroneous solution is transferred to the correct one. By fine-tuning on the constructed dataset, the model is able to self-correct errors autonomously within the generation process without relying on external critique models. Experimental results demonstrate that LEMMA achieves significant performance improvements over other strong baselines.

数学推理错误学习自纠错LLM微调

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。