MARIO: MAth Reasoning with code Interpreter Output -- A Reproducible Pipeline

📄 arXiv: 2401.08190v3 📥 PDF

作者: Minpeng Liao, Wei Luo, Chengxi Li, Jing Wu, Kai Fan

分类: cs.CL

发布日期: 2024-01-16 (更新: 2024-02-21)

🔗 代码/项目: GITHUB


💡 一句话要点

提出MARIO以解决大语言模型数学推理能力不足问题

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

关键词: 数学推理 大型语言模型 数据集构建 模型微调 Python代码解释器 教育技术 智能问答

📋 核心要点

  1. 现有大型语言模型在数学推理方面存在显著不足,主要由于其训练目标侧重于下一个token的概率预测,难以处理精确计算。
  2. 本文通过引入结合Python代码解释器的新数学数据集,旨在丰富数据环境并提升LLMs的数学推理能力。
  3. 实验结果表明,提出的微调协议显著提高了7B参数LLM在GSM8K和MATH数据集上的性能,验证了方法的有效性。

📝 摘要(中文)

大型语言模型(LLMs)在自然语言理解任务上取得了显著进展,但在数学推理能力方面仍存在差距。本文提出了一种新颖的数学数据集,结合Python代码解释器,旨在提升LLMs的数学推理能力。该数据集基于GSM8K和MATH,经过GPT-4注释、人类审核和自我训练等过程进行优化,修正了原GSM8K训练集中的错误。此外,论文还提出了一种易于复制的数学特定LLMs微调协议,显著提升了7B参数LLM在GSM8K和MATH数据集上的表现。研究成果和源代码已公开,旨在推动数学推理领域的进一步研究。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在数学推理能力上的不足,现有方法主要依赖于概率预测,无法有效处理需要精确计算的数学问题。

核心思路:通过构建一个结合Python代码解释器的新数学数据集,丰富数据样本并优化模型的数学推理能力,旨在提升LLMs在数学任务上的表现。

技术框架:整体流程包括数据集构建、模型微调和性能评估三个主要模块。数据集通过GPT-4注释和人类审核进行优化,微调协议则专注于数学特定任务。

关键创新:最重要的创新在于引入Python代码解释器的能力,使得模型能够执行实际的数学计算,而不仅仅是生成文本答案,这与传统方法有本质区别。

关键设计:在模型微调过程中,采用了特定的损失函数和参数设置,以确保模型能够有效学习数学推理的规律,同时修正了原数据集中的错误,提高了数据质量。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,经过新数据集和微调协议的训练,7B参数LLM在GSM8K和MATH数据集上的性能显著提升,具体提升幅度达到XX%(具体数据待补充),验证了方法的有效性和实用性。

🎯 应用场景

该研究的潜在应用领域包括教育、科学计算和自动化推理等。通过提升大型语言模型的数学推理能力,可以在教育辅助工具、智能问答系统和科学研究等多个领域发挥重要作用,推动相关技术的发展。

📄 摘要(原文)

Large language models (LLMs) have seen considerable advancements in natural language understanding tasks, yet there remains a gap to bridge before attaining true artificial general intelligence, especially concerning shortcomings in mathematical reasoning capabilities. We postulate that the inherent nature of LLM training, which focuses on predicting probabilities of next token, presents challenges in effectively modeling mathematical reasoning that demands exact calculations, both from data-driven and theoretical standpoints. In this paper, we address this challenge by enriching the data landscape and introducing a novel math dataset, enhanced with a capability to utilize a Python code interpreter. This dataset is derived from GSM8K and MATH and has been further refined through a combination of GPT-4 annotations, human review, and self-training processes, where the errors in the original GSM8K training set have been fixed. Additionally, we propose a tentative, easily replicable protocol for the fine-tuning of math-specific LLMs, which has led to a significant improvement in the performance of a 7B-parameter LLM on the GSM8K and MATH datasets. We are committed to advancing the field of mathematical reasoning in LLMs and, to that end, we have made source code for data generation / training / inference, and the model checkpoints publicly available at \url{https://github.com/MARIO-Math-Reasoning/MARIO}. We hope this will facilitate further research and development within the community.