[论文解读] Thor: Wielding Hammers to Integrate Language Models and Automated Theorem Provers
Thor 是一种混合框架,通过锤子方法将语言模型与自动定理证明器集成,以改进形式化定理证明中的前提选择。通过微调语言模型以预测何时调用锤子,Thor 将 PISA 上的成功率从 39.0% 提升至 57.0%,并在 MiniF2F 上实现了 29.9% 的成功率,计算量显著低于专家迭代方法,解决了单独使用任一组件均无法处理的 8.2% 的问题。
In theorem proving, the task of selecting useful premises from a large library to unlock the proof of a given conjecture is crucially important. This presents a challenge for all theorem provers, especially the ones based on language models, due to their relative inability to reason over huge volumes of premises in text form. This paper introduces Thor, a framework integrating language models and automated theorem provers to overcome this difficulty. In Thor, a class of methods called hammers that leverage the power of automated theorem provers are used for premise selection, while all other tasks are designated to language models. Thor increases a language model's success rate on the PISA dataset from $39\%$ to $57\%$, while solving $8.2\%$ of problems neither language models nor automated theorem provers are able to solve on their own. Furthermore, with a significantly smaller computational budget, Thor can achieve a success rate on the MiniF2F dataset that is on par with the best existing methods. Thor can be instantiated for the majority of popular interactive theorem provers via a straightforward protocol we provide.
研究动机与目标
- 为了解决形式化定理证明中前提选择这一关键挑战,因为语言模型在处理大量事实库时表现不佳。
- 通过将前提选择任务外包给自动定理证明器(特别是锤子方法),发挥其优势。
- 设计一种轻量级、可部署的框架,提升语言模型在交互式定理证明中的表现,且无需对核心架构进行重大修改。
- 证明混合神经符号系统在自动推理中可超越纯神经或纯符号方法。
- 确立 Thor 作为一个计算高效、可复用的基线框架,适用于多种交互式定理证明器的语言模型形式化定理证明。
提出的方法
- Thor 使用一种协议,即在训练数据的所有证明状态上应用锤子,以识别有效的前提选择。
- 微调语言模型,使其在特定证明状态下预测一个特殊标记(例如 <hammer>),表示此时调用锤子将有效。
- 在推理阶段,当模型生成 <hammer> 标记时,会调用锤子,利用自动定理证明器选择相关前提的能力。
- 该框架在 Isabelle 上实现,使用 Sledgehammer 作为锤子,实现与现有 ITP 的无缝集成。
- 该方法计算开销极低,仅增加一个单一的标记预测头,且不改变核心语言模型的训练流程。
- Thor 设计为可扩展,可轻松适配其他支持锤子的 ITP,仅需极少配置调整。
实验结果
研究问题
- RQ1将锤子方法集成到语言模型推理流程中,是否能显著提升形式化定理证明的成功率?
- RQ2混合神经符号系统是否能在前提选择任务上超越独立的语言模型和自动定理证明器?
- RQ3与专家迭代或联合训练方法相比,Thor 是否在显著降低计算成本的前提下实现最先进性能?
- RQ4Thor 是否能解决语言模型和 ATP 单独均无法解决的问题?
- RQ5该框架是否可在不同交互式定理证明器上实现泛化,且仅需极少适配?
主要发现
- Thor 将基于语言模型的系统在 PISA 数据集上的成功率从 39.0% 提升至 57.0%,提升显著。
- Thor 解决了 8.2% 的定理,这些定理对独立的语言模型和 Sledgehammer ATP 均属不可解。
- 在 MiniF2F 基准测试中,Thor 实现了 29.9% 的单次通过成功率,略高于通过专家迭代实现的先前最先进水平 29.6%。
- Thor 实现此性能所用计算预算远低于专家迭代,效率更高。
- 该框架表明,将前提选择任务外包给锤子,可使语言模型专注于证明规划,从而提升整体推理效率。
- Thor 可在任何支持锤子的交互式定理证明器上部署,表明其具有广泛适用性,并可能成为该领域语言模型形式化定理证明的标准基线。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。