arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.10735cs.AIcs.CL
收藏

将自我修正嵌入为大语言模型的固有能力以增强数学推理

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

Tencent(腾讯)

Kuofeng Gao, Huanqia Cai, Qingyao Shuai, Dihong Gong, Zhifeng Li

AI总结:

针对大语言模型数学推理易出错的问题,提出自我修正链(CoSC)机制,通过多阶段迭代验证修正将自我修正嵌入模型,经两阶段微调实现,在MATH数据集上达53.5%得分,优于ChatGPT等模型且零样本运行。

摘要:

大语言模型(LLMs)的精准数学推理对于彻底变革高度依赖此类推理的领域至关重要。然而,LLMs在数学推理的某些方面常遇困难,导致推理缺陷与错误结果。为缓解这些问题,我们引入一种名为自我修正链(CoSC)的新型机制,专门用于将自我修正嵌入为LLMs的固有能力,使其能验证并纠正自身结果。CoSC机制通过一系列自我修正阶段运行:每个阶段中,LLMs生成程序解决给定问题,使用基于程序的工具执行该程序以获取输出,随后验证此输出;基于验证结果,LLMs要么进入下一修正阶段,要么确定最终答案。这种迭代自我修正过程让LLMs能优化推理步骤、提升数学推理准确性。我们采用两阶段微调方法实现CoSC:首先用GPT-4生成的相对少量种子数据训练LLMs,再用更大规模的自生成数据训练以增强CoSC,无需依赖GPT-4。实验表明,与现有开源LLMs相比,CoSC显著提升了标准数学数据集上的性能;值得注意的是,我们的CoSC-Code-34B模型在具挑战性的MATH数据集上取得53.5%的得分,优于ChatGPT、GPT-4及多模态LLMs(如GPT-4V和Gemini-1.0)。重要的是,CoSC以零样本方式运行,无需演示。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑