The demand for synthetic data in mathematical reasoning has increased due to its potential to enhance the mathematical capabilities of large language models (LLMs). However, ensuring the validity of intermediate reasoning steps remains a significant challenge, affecting data quality. While formal verification via theorem provers effectively validates LLM reasoning, the autoformalisation of mathematical proofs remains error-prone. In response, we introduce iterative autoformalisation, an approach that iteratively refines theorem prover formalisation to mitigate errors, thereby increasing the execution rate on the Lean prover from 60% to 87%. Building upon that, we introduce Theorem Prover as a Judge (TP-as-a-Judge), a method that employs theorem prover formalisation to rigorously assess LLM intermediate reasoning, effectively integrating autoformalisation with synthetic data generation. Finally, we present Reinforcement Learning from Theorem Prover Feedback (RLTPF), a framework that replaces human annotation with theorem prover feedback in Reinforcement Learning from Human Feedback (RLHF). Across multiple LLMs, applying TP-as-a-Judge and RLTPF improves benchmarks with only 3,508 samples, achieving 5.56% accuracy gain on Mistral-7B for MultiArith, 6.00% on Llama-2-7B for SVAMP, and 3.55% on Llama-3.1-8B for AQUA.


翻译:由于合成数据在提升大语言模型(LLM)数学能力方面的潜力,数学推理领域对合成数据的需求日益增长。然而,确保中间推理步骤的有效性仍然是一个重大挑战,这影响了数据质量。虽然通过定理证明器进行形式化验证能有效检验LLM的推理过程,但数学证明的自动形式化仍然容易出错。为此,我们提出了迭代自动形式化方法,该方法通过迭代优化定理证明器的形式化过程来减少错误,从而将Lean证明器上的执行率从60%提升至87%。在此基础上,我们提出了“定理证明器作为评判者”(TP-as-a-Judge)方法,该方法利用定理证明器形式化来严格评估LLM的中间推理,从而有效地将自动形式化与合成数据生成相结合。最后,我们提出了基于定理证明器反馈的强化学习(RLTPF)框架,该框架在基于人类反馈的强化学习(RLHF)中用定理证明器反馈替代了人工标注。在多个LLM上的实验表明,应用TP-as-a-Judge和RLTPF仅需3,508个样本即可提升基准测试性能:在MultiArith任务上,Mistral-7B的准确率提升了5.56%;在SVAMP任务上,Llama-2-7B的准确率提升了6.00%;在AQUA任务上,Llama-3.1-8B的准确率提升了3.55%。

0
下载
关闭预览

相关内容

【ACL2025教程】LLM时代的合成数据,228页slides
专知会员服务
31+阅读 · 2025年7月30日
大模型数学推理数据合成相关方法
专知会员服务
36+阅读 · 2025年1月19日
《大语言模型的数据合成与增强综述》
专知会员服务
43+阅读 · 2024年10月19日
【大模型对齐】利用对齐使大型语言模型更好地推理
专知会员服务
48+阅读 · 2023年9月8日
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
「因果推理」概述论文,13页pdf
专知
16+阅读 · 2021年3月20日
基于深度元学习的因果推断新方法
图与推荐
12+阅读 · 2020年7月21日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
国家自然科学基金
9+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Arxiv
0+阅读 · 1月7日
VIP会员
相关基金
国家自然科学基金
9+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员