arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2403.18120cs.AIcs.CLcs.LG
收藏

不要信任:验证——用自动形式化奠定 LLM 定量推理的基础

Don't Trust: Verify -- Grounding LLM Quantitative Reasoning with Autoformalization

Cornell University(康奈尔大学);University of Edinburgh(爱丁堡大学);xAI

Jin Peng Zhou, Charles Staats, Wenda Li, Christian Szegedy, Kilian Q. Weinberger, Yuhuai Wu

AI总结:

本文提出一种基于自动形式化的验证方法,将 LLM 的非正式数学陈述翻译为 Isabelle 代码并自动验证其内部一致性,从而拒绝不一致的推理答案,在 GSM8K 等数据集上表现优于多数投票。

摘要:

大型语言模型(LLM),例如 Google 的 Minerva 和 OpenAI 的 GPT 系列,在解决数学定量推理问题方面的能力正日益增强。然而,它们在推理步骤和答案中仍会犯缺乏依据的逻辑和计算错误。在本文中,我们利用了这样一个事实:如果 LLM 的训练语料库包含足够多的形式数学示例(例如在 Isabelle,一个形式化定理证明环境中),就可以通过提示让它们将非正式的数学陈述翻译,即自动形式化为形式化的 Isabelle 代码——这些代码可以被自动验证内部一致性。这提供了一种机制,能够自动拒绝其形式化版本在自身内部或与形式化问题陈述之间存在不一致的解决方案。我们在 GSM8K、MATH 和 MultiArith 数据集上评估了我们的方法,并证明我们的方法提供了一种始终优于普通多数投票的启发式方法——后者是之前识别正确答案的最佳方法,在 GSM8K 上提升了 12% 以上。在我们的实验中,它在所有数据集和 LLM 模型规模上都持续改善了结果。代码可在 https://github.com/jinpz/dtv 找到。

英文摘要:

Large language models (LLM), such as Google's Minerva and OpenAI's GPT families, are becoming increasingly capable of solving mathematical quantitative reasoning problems. However, they still make unjustified logical and computational errors in their reasoning steps and answers. In this paper, we leverage the fact that if the training corpus of LLMs contained sufficiently many examples of formal mathematics (e.g. in Isabelle, a formal theorem proving environment), they can be prompted to translate i.e. autoformalize informal mathematical statements into formal Isabelle code -- which can be verified automatically for internal consistency. This provides a mechanism to automatically reject solutions whose formalized versions are inconsistent within themselves or with the formalized problem statement. We evaluate our method on GSM8K, MATH and MultiArith datasets and demonstrate that our approach provides a consistently better heuristic than vanilla majority voting -- the previously best method to identify correct answers, by more than 12% on GSM8K. In our experiments it improves results consistently across all datasets and LLM model sizes. The code can be found at https://github.com/jinpz/dtv.

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

↑