Improve Mathematical Reasoning in Language Models by Automated Process Supervision

📄 arXiv: 2406.06592v2 📥 PDF

作者: Liangchen Luo, Yinxiao Liu, Rosanne Liu, Samrat Phatale, Meiqi Guo, Harsh Lara, Yunxuan Li, Lei Shu, Yun Zhu, Lei Meng, Jiao Sun, Abhinav Rastogi

分类: cs.CL, cs.LG

发布日期: 2024-06-05 (更新: 2024-12-11)

备注: 17 pages, 5 figures, 2 table


💡 一句话要点

提出OmegaPRM算法,实现数学推理语言模型的自动化过程监督

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

关键词: 数学推理 语言模型 过程监督 蒙特卡洛树搜索 自动化标注

📋 核心要点

  1. 现有大型语言模型在复杂多步推理任务中表现不足,尤其是在数学问题求解等场景下,中间推理步骤的监督缺失是关键瓶颈。
  2. 论文提出OmegaPRM算法,利用分而治之的蒙特卡洛树搜索,高效收集高质量的过程监督数据,从而训练过程奖励模型。
  3. 实验表明,该方法显著提升了Gemini Pro和Gemma2 27B模型在MATH500和GSM8K数据集上的数学推理成功率,无需人工干预。

📝 摘要(中文)

复杂的多步骤推理任务,例如解决数学问题或生成代码,对于最先进的大型语言模型(LLM)来说仍然是一个巨大的挑战。使用结果奖励模型(ORM)验证LLM的输出是一种标准的推理时技术,旨在提高LLM的推理性能。然而,对于具有冗长或多跳推理链的推理任务,这仍然是不够的,因为中间结果没有得到适当的奖励或惩罚。过程监督通过在推理过程中分配中间奖励来解决此限制。目前,用于收集过程监督数据的方法依赖于人工标注或每步蒙特卡洛估计,这两种方法的扩展成本都非常高,从而阻碍了该技术的广泛应用。为了应对这一挑战,我们提出了一种新颖的分而治之风格的蒙特卡洛树搜索(MCTS)算法,名为OmegaPRM,用于高效收集高质量的过程监督数据。该算法通过二分搜索快速识别思维链(CoT)中的第一个错误,并平衡正例和负例,从而确保效率和质量。因此,我们能够收集超过150万个过程监督注释来训练过程奖励模型(PRM)。这种完全自动化的过程监督与加权自洽算法相结合,能够提高LLM的数学推理性能。我们将指令调整后的Gemini Pro模型在MATH500上的成功率从51%提高到69.4%,在GSM8K上的成功率从86.4%提高到93.6%。同样,我们将Gemma2 27B在MATH500上的成功率从42.3%提高到58.2%,在GSM8K上的成功率从74.0%提高到92.2%。整个过程无需任何人工干预或监督,使我们的方法在经济上和...

🔬 方法详解

问题定义:论文旨在解决大型语言模型在复杂数学推理任务中,由于缺乏对中间推理步骤的有效监督,导致性能瓶颈的问题。现有方法如结果奖励模型(ORM)无法对中间步骤进行奖惩,而人工标注或蒙特卡洛估计成本高昂,难以扩展。

核心思路:论文的核心思路是利用一种高效的自动化过程监督方法,生成高质量的中间推理步骤标注数据,用于训练过程奖励模型(PRM)。通过PRM,模型可以在推理过程中获得中间步骤的反馈,从而提高整体推理能力。

技术框架:整体框架包含以下几个主要阶段:1) 使用大型语言模型生成思维链(CoT);2) 使用OmegaPRM算法对CoT进行评估,并生成过程监督数据;3) 使用过程监督数据训练过程奖励模型(PRM);4) 在推理阶段,利用PRM对模型的中间推理步骤进行奖励或惩罚,并结合加权自洽算法提高最终结果的准确性。

关键创新:最重要的技术创新点是OmegaPRM算法,它是一种分而治之风格的蒙特卡洛树搜索算法。与传统的蒙特卡洛方法相比,OmegaPRM通过二分搜索快速定位CoT中的第一个错误,并平衡正例和负例,从而显著提高了数据收集的效率和质量。

关键设计:OmegaPRM算法的关键设计包括:1) 二分搜索策略,用于快速定位错误步骤;2) 正负样本平衡机制,确保训练数据的质量;3) 蒙特卡洛树搜索,用于探索不同的推理路径;4) 奖励函数的设计,用于评估中间推理步骤的质量。具体的参数设置和损失函数等细节在论文中进行了详细描述(未知)。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,使用OmegaPRM算法进行过程监督后,Gemini Pro模型在MATH500上的成功率从51%提升到69.4%,在GSM8K上的成功率从86.4%提升到93.6%。Gemma2 27B模型在MATH500上的成功率从42.3%提升到58.2%,在GSM8K上的成功率从74.0%提升到92.2%。这些结果表明,该方法能够显著提高大型语言模型的数学推理能力。

🎯 应用场景

该研究成果可广泛应用于需要复杂推理能力的语言模型应用中,例如自动数学问题求解、代码生成、逻辑推理等。通过自动化过程监督,可以显著降低人工标注成本,并提高模型的推理准确性和可靠性。未来,该方法有望扩展到其他需要多步骤推理的任务中,例如科学发现、医疗诊断等。

📄 摘要(原文)

Complex multi-step reasoning tasks, such as solving mathematical problems or generating code, remain a significant hurdle for even the most advanced large language models (LLMs). Verifying LLM outputs with an Outcome Reward Model (ORM) is a standard inference-time technique aimed at enhancing the reasoning performance of LLMs. However, this still proves insufficient for reasoning tasks with a lengthy or multi-hop reasoning chain, where the intermediate outcomes are neither properly rewarded nor penalized. Process supervision addresses this limitation by assigning intermediate rewards during the reasoning process. To date, the methods used to collect process supervision data have relied on either human annotation or per-step Monte Carlo estimation, both prohibitively expensive to scale, thus hindering the broad application of this technique. In response to this challenge, we propose a novel divide-and-conquer style Monte Carlo Tree Search (MCTS) algorithm named \textit{OmegaPRM} for the efficient collection of high-quality process supervision data. This algorithm swiftly identifies the first error in the Chain of Thought (CoT) with binary search and balances the positive and negative examples, thereby ensuring both efficiency and quality. As a result, we are able to collect over 1.5 million process supervision annotations to train Process Reward Models (PRMs). This fully automated process supervision alongside the weighted self-consistency algorithm is able to enhance LLMs' math reasoning performances. We improved the success rates of the instruction-tuned Gemini Pro model from 51\% to 69.4\% on MATH500 and from 86.4\% to 93.6\% on GSM8K. Similarly, we boosted the success rates of Gemma2 27B from 42.3\% to 58.2\% on MATH500 and from 74.0\% to 92.2\% on GSM8K. The entire process operates without any human intervention or supervision, making our method both financially and ...