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

并非所有投票都算数!程序作为验证器提升语言模型数学推理的自我一致性

Not All Votes Count! Programs as Verifiers Improve Self-Consistency of Language Models for Math Reasoning

Singapore University of Technology and Design(新加坡科技设计大学);Deepmind(深度思维公司)

Vernon Y. H. Toh, Deepanway Ghosal, Soujanya Poria

AI总结:

提出Prove框架,利用程序验证过滤错误推理路径,提升LLM数学推理的自我一致性,在多个基准上优于多数投票,最高提升18%。

摘要:

大型语言模型(LLMs)在解决数学推理问题方面展现出日益增强的能力。然而,许多开源LLMs在中间推理步骤中仍存在计算和语义理解方面的错误。在本工作中,我们引入了Prove,一个简单而有效的框架,利用从自然语言解决方案转换而来的程序作为验证机制,在聚合最终答案之前过滤掉可能不正确的推理路径。与普通的多数投票不同,我们的方法过滤掉那些程序输出与生成的解决方案不一致的解决方案,仅聚合通过验证的解决方案。我们使用13个来自不同模型家族和规模(参数范围从0.5B到13B)的开源LLMs,在八个数学基准上进行了广泛实验。结果表明,Prove在所有模型规模和数据集上,作为解决数学推理任务的启发式方法,始终优于普通多数投票,在GSM8K上提升高达18%,在MATH-500上提升8%。我们的代码可在https://github.com/declare-lab/prove获取。

英文摘要:

Large language models (LLMs) have shown increasing competence in solving mathematical reasoning problems. However, many open-source LLMs still struggle with errors in calculation and semantic understanding during intermediate reasoning steps. In this work, we introduce Prove, a simple yet effective framework that leverages translated programs derived from natural language solutions as a verification mechanism to filter out potentially incorrect reasoning paths before aggregating final answers. Unlike vanilla majority voting, our approach filters out solutions whose corresponding program output is inconsistent with the generated solution, aggregating only those that pass verification. We conducted extensive experiments using 13 open-source LLMs from various model families and sizes, ranging from 0.5B to 13B parameters, across eight mathematical benchmarks. Our results show that Prove consistently outperforms vanilla majority voting as a heuristic for solving mathematical reasoning tasks across all model sizes and datasets, achieving improvements of up to 18% on GSM8K and 8% on MATH-500. Our codes are available at https://github.com/declare-lab/prove.

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

↑