[Paper Review] TacticZero: Learning to Prove Theorems from Scratch with Deep Reinforcement Learning
TacticZero proposes a deep reinforcement learning framework that learns to prove theorems from scratch in HOL4 by formulating interactive theorem proving as a Markov decision process (MDP), enabling end-to-end learning of tactic selection, argument prediction, and dynamic proof search with backtracking. It outperforms existing hammers and state-of-the-art baselines on unseen problems by autonomously exploring proof paths and discarding dead ends.
We propose a novel approach to interactive theorem-proving (ITP) using deep reinforcement learning. The proposed framework is able to learn proof search strategies as well as tactic and arguments prediction in an end-to-end manner. We formulate the process of ITP as a Markov decision process (MDP) in which each state represents a set of potential derivation paths. This structure allows us to introduce a novel backtracking mechanism which enables the agent to efficiently discard (predicted) dead-end derivations and restart from promising alternatives. We implement the framework in the HOL4 theorem prover. Experimental results show that the framework outperforms existing automated theorem provers (i.e., hammers) available in HOL4 when evaluated on unseen problems. We further elaborate the role of key components of the framework using ablation studies.
Motivation & Objective
- To address the limitations of existing learning-based ITP methods that rely on limited human-provided proofs and fixed search strategies like BFS or DFS.
- To enable an agent to learn proof search strategies, tactic selection, and argument prediction in an end-to-end manner from scratch.
- To introduce a novel backtracking mechanism within an MDP framework that allows efficient pruning of unproductive derivation paths and restart from promising alternatives.
- To outperform existing automated theorem provers (hammers) in HOL4 on unseen theorems without relying on human-annotated proof libraries.
- To validate the contribution of key components—such as the MDP formulation, policy gradient training, and backtracking—via ablation studies.
Proposed method
- Formulate interactive theorem proving as a Markov decision process (MDP), where each state represents a set of potential derivation paths, enabling multi-path tracking during proof search.
- Design a hierarchical action space that supports tactic application with both theorem names and terms as arguments, allowing rich and flexible proof actions.
- Implement a deep reinforcement learning agent using multiple recurrent and feed-forward neural networks to jointly predict actions at the backtracking, goal, tactic, and argument levels.
- Use policy gradient methods (e.g., REINFORCE) to train the agent end-to-end, optimizing for proof completion while learning to backtrack from unproductive paths.
- Integrate a novel backtracking mechanism that allows the agent to discard dead-end derivations and restart from previously visited, promising proof states.
- Train and evaluate the agent in the HOL4 theorem prover, using self-generated proof attempts and a reward signal based on proof success.
Experimental results
Research questions
- RQ1Can a reinforcement learning agent learn effective proof search strategies in interactive theorem proving without relying on human-annotated proof examples?
- RQ2How effective is a backtracking mechanism integrated into an MDP-based framework for pruning unproductive proof paths in ITP?
- RQ3To what extent does end-to-end learning of tactic and argument prediction improve performance on unseen theorems compared to fixed search strategies?
- RQ4What is the contribution of key architectural components—such as the MDP formulation, policy gradient training, and backtracking—to overall proof performance?
- RQ5Can the agent generalize to new theorems beyond the training distribution, outperforming existing automated provers (hammers) in HOL4?
Key findings
- TacticZero outperforms state-of-the-art hammers (E, Z3, Vampire) in HOL4 on unseen theorems, demonstrating superior generalization and proof-finding capability.
- The agent successfully discovers shorter proofs than human-verified proofs in the library, including a minimized proof for a complex lemma that was previously proven with many redundant steps.
- Ablation studies confirm that the backtracking mechanism and the joint learning of tactic and argument prediction are critical for performance, with ablation of either component leading to significant drops in success rate.
- The MDP formulation enables the agent to explore multiple proof paths simultaneously and dynamically shift focus, avoiding the inefficiencies of BFS and DFS.
- The framework achieves high sample efficiency by learning from self-generated proof attempts, reducing reliance on external proof libraries.
- The agent learns to select both tactics and their arguments—including complex HOL4 terms—without requiring pre-engineered scoring functions for premise selection.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.