arXiv:2410.10735cs.AIcs.CL2024-10被引 18

让大模型自动检查并修正数学推理错误,提升准确性。

Embedding Self-Correction as an Inherent Ability in Large Language Models for Enhanced Mathematical Reasoning

  • 通过多轮自检自纠机制,让模型自我验证并改进解题过程。
  • 在MATH数据集上达到53.5%准确率,超越ChatGPT和GPT-4。
  • 无需示例即可零样本运行,适合高精度数学任务应用。

大语言模型(LLMs)在数学推理中的准确性对推动依赖此类推理的领域至关重要。然而,现有模型常因推理缺陷导致错误结果。为此,我们提出链式自校正(CoSC)机制,将自校正能力内嵌于模型中,使其能主动验证并修正自身输出。CoSC采用多阶段迭代流程:每阶段生成可执行程序,通过工具执行并验证结果,依据验证反馈决定继续修正或终止。该机制显著提升推理准确性。我们采用两阶段微调:先用少量GPT-4生成数据预训练,再用大量自生成数据增强,不再依赖GPT-4。实验表明,CoSC显著优于现有开源模型。其中,CoSC-Code-34B在挑战性MATH数据集上达53.5%准确率,超越ChatGPT、GPT-4及多模态模型如GPT-4V和Gemini-1.0。CoSC支持零样本运行,无需示范。

原文摘要 · Abstract (English)

Accurate mathematical reasoning with Large Language Models (LLMs) is crucial in revolutionizing domains that heavily rely on such reasoning. However, LLMs often encounter difficulties in certain aspects of mathematical reasoning, leading to flawed reasoning and erroneous results. To mitigate these issues, we introduce a novel mechanism, the Chain of Self-Correction (CoSC), specifically designed to embed self-correction as an inherent ability in LLMs, enabling them to validate and rectify their own results. The CoSC mechanism operates through a sequence of self-correction stages. In each stage, the LLMs generate a program to address a given problem, execute this program using program-based tools to obtain an output, subsequently verify this output. Based on the verification, the LLMs either proceed to the next correction stage or finalize the answer. This iterative self-correction process allows the LLMs to refine its reasoning steps and improve the accuracy of its mathematical reasoning. We implement CoSC using a two-phase fine-tuning approach. First, LLMs are trained with a relatively small volume of seeding data generated from GPT-4. Then, we enhance CoSC by training with a larger volume of self-generated data, without relying on GPT-4. Experiments show that CoSC significantly boosts performance on standard mathematical datasets compared to existing open-source LLMs. Notably, our CoSC-Code-34B model achieved a 53.5% score on the challenging MATH dataset, outperforming models like ChatGPT, GPT-4, and multi-modal LLMs such as GPT-4V and Gemini-1.0. Importantly, CoSC operates in a zero-shot manner without requiring demonstrations.

数学推理自校正大模型

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