DotaMath: Decomposition of Thought with Code Assistance and Self-correction for Mathematical Reasoning

LLM SFT LNJR Agent Agent Planning Tool Learning
本文介绍了一系列使用思维分解、代码辅助和自我纠正的大型语言模型(LLMs),名为DotaMath。 DotaMath模型通过将复杂的数学任务分解为简单的逻辑子任务,利用代码解决这些子任务,从代码解释器获得细粒度的反馈,并进行自我反思和纠正,来解决复杂的数学任务。通过注释不同的交互式工具使用轨迹,并在GSM8K和MATH数据集上使用查询演化,我们生成了一个指令微调数据集DotaMathQA,包含574K个查询-响应对。我们使用模仿学习在DotaMathQA上训练了一系列基础LLMs,从而得到了与各种领域内和领域外的基于开源的LLMs相比表现出色的DotaMath模型。特别是,DotaMath-deepseek-7B在具有竞争力的MATH数据集上表现出色,达到64.8%,在GSM8K上达到86.7%。此外,DotaMath-deepseek-7B在一系列领域内和领域外的基准测试中保持强大的竞争力(平均80.1%)。展望未来,我们期待DotaMath范例将为解决复杂的数学问题开辟新的途径。我们的代码公开在https://github.com/ChengpengLi1003/DotaMath。
Large language models (LLMs) have made impressive progress in handling simple math problems, yet they still struggle with more challenging and complex mathematical tasks. In this paper, we introduce a series of LLMs that employs the Decomposition of thought with code assistance and self-correction for mathematical reasoning, dubbed as DotaMath. DotaMath models tackle complex mathematical tasks by decomposing them into simpler logical subtasks, leveraging code to solve these subtasks, obtaining fine-grained feedback from the code interpreter, and engaging in self-reflection and correction. By annotating diverse interactive tool-use trajectories and employing query evolution on GSM8K and MATH datasets, we generate an instruction fine-tuning dataset called DotaMathQA with 574K query-response pairs. We train a series of base LLMs using imitation learning on DotaMathQA, resulting in DotaMath models that achieve remarkable performance compared to open-source LLMs across various in-domain and out-of-domain benchmarks. Notably, DotaMath-deepseek-7B showcases an outstanding performance of 64.8% on the competitive MATH dataset and 86.7% on GSM8K. Besides, DotaMath-deepseek-7B maintains strong competitiveness on a series of in-domain and out-of-domain benchmarks (Avg. 80.1%). Looking forward, we anticipate that the DotaMath paradigm will open new pathways for addressing intricate mathematical problems. Our code is publicly available at https://github.com/ChengpengLi1003/DotaMath.
许愿