Skip to main content
QUICK REVIEW

[Paper Review] Thor: Wielding Hammers to Integrate Language Models and Automated Theorem Provers

Albert Q. Jiang, Wenda Li|arXiv (Cornell University)|May 22, 2022
Mathematics, Computing, and Information ProcessingComputer Science19 citations
TL;DR

Thor is a hybrid framework that integrates language models with automated theorem provers via hammer methods to improve premise selection in formal theorem proving. By training a language model to predict when to invoke a hammer, Thor boosts success rates on PISA from 39.0% to 57.0% and achieves a 29.9% success rate on MiniF2F with significantly less computation than expert iteration, solving 8.2% of problems beyond the reach of either component alone.

ABSTRACT

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.

Motivation & Objective

  • To address the critical challenge of premise selection in formal theorem proving, where language models struggle with large libraries of facts.
  • To leverage the strengths of automated theorem provers—specifically hammer methods—by offloading premise selection to them.
  • To design a lightweight, deployable framework that enhances language model performance in interactive theorem proving without requiring major architectural changes.
  • To demonstrate that hybrid neuro-symbolic systems can outperform purely neural or symbolic approaches in automated reasoning.
  • To establish Thor as a computationally efficient, reusable baseline for language model-based theorem proving across multiple interactive theorem provers.

Proposed method

  • Thor uses a protocol where hammers are applied to all proof states in training data to identify successful premise selections.
  • A language model is fine-tuned to predict a special token (e.g., <hammer>) when a hammer application would be effective at a given proof state.
  • During inference, the model invokes the hammer when it generates the <hammer> token, leveraging the ATP’s ability to select relevant premises.
  • The framework is instantiated on Isabelle using Sledgehammer as the hammer, enabling seamless integration with existing ITPs.
  • The method incurs minimal computational overhead, as it only adds a single token prediction head and does not alter the core language model training process.
  • Thor is designed to be extensible and can be adapted to other hammer-enabled ITPs with minimal configuration.

Experimental results

Research questions

  • RQ1Can integrating hammer methods into language model reasoning pipelines significantly improve success rates in formal theorem proving?
  • RQ2Can a hybrid neuro-symbolic system outperform both standalone language models and automated theorem provers on premise selection tasks?
  • RQ3Does Thor achieve state-of-the-art performance with substantially reduced computational cost compared to expert iteration or co-training methods?
  • RQ4Can Thor solve problems that neither language models nor ATPs alone can resolve?
  • RQ5Is the framework generalizable across different interactive theorem provers with minimal adaptation?

Key findings

  • Thor increases the success rate of a language model-based system on the PISA dataset from 39.0% to 57.0%, a significant improvement.
  • Thor solves 8.2% of theorems that are intractable to both standalone language models and the Sledgehammer ATP.
  • On the MiniF2F benchmark, Thor achieves a 29.9% one-pass success rate, slightly exceeding the prior state-of-the-art of 29.6% achieved via expert iteration.
  • Thor achieves this performance with a much smaller computational budget than expert iteration, making it more efficient.
  • The framework demonstrates that offloading premise selection to hammers enables language models to focus on proof planning, improving overall reasoning efficiency.
  • Thor is deployable on any hammer-enabled interactive theorem prover, suggesting broad applicability and potential as a standard baseline in the field.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.