TL;DR
HOList is an open-source reinforcement learning (RL) environment and benchmark designed to bridge the gap between deep learning and higher-order logic theorem proving. By instrumenting the HOL Light theorem prover with a Python API and introducing a neural prover called DeepHOL, researchers demonstrate that machines can learn to navigate complex mathematical proofs, achieving a 39% success rate on a challenging benchmark of nearly 30,000 theorems.
What Problem Does This Paper Address?
Formalizing mathematics—translating human proofs into a machine-verifiable format—is a monumental task. For example, the formal proof of the Kepler conjecture (the Flyspeck project) took over 20 person-years to complete. While Automated Theorem Provers (ATPs) exist, they often struggle with "higher-order logic," which allows for reasoning about functions and infinite sets, the bread and butter of modern mathematics.
Historically, the field has lacked a unified, large-scale benchmark similar to ImageNet in computer vision. Existing attempts were often fragmented across different logical foundations or lacked the "friendly" APIs needed for modern machine learning researchers to apply deep reinforcement learning effectively.
Methods
The authors present two major contributions: the HOList environment and the DeepHOL prover.
1. The HOList Environment
The team modified HOL Light, a classic interactive theorem prover, to act as an RL environment.
- Python API: They wrapped the OCaml-based prover in a stable Python interface.
- Stateless Interaction: Unlike traditional provers that require a strict linear order, HOList allows agents to apply "tactics" (mathematical maneuvers) to any "goal" (a statement to be proven) in any order.
- Proof Logging: They instrumented the system to "dump" thousands of existing human-written proofs into a format that can be used for imitation learning.
2. DeepHOL Prover Architecture
DeepHOL uses a two-tower neural network to make decisions during the proof search.
- Goal Tower: Encodes the current mathematical statement into a vector embedding.
- Premise Tower: Encodes potential "arguments" (previously proven theorems) that might be needed to solve the current goal.
- Action Generation: The model predicts which of 41 available tactics to use and then ranks which theorems from the library should be passed as arguments to that tactic.
3. The Learning Loop
The system uses a hybrid approach:
- Supervised Learning: Initially, the model learns by imitating human proof logs.
- Reinforcement Learning: The prover then enters a "loop" where it attempts to prove theorems on its own. Successful proofs are added back into the training pool to further refine the model.
Datasets
The paper introduces a benchmark derived from three HOL Light corpora:
- Core: Basic foundational theorems.
- Complex: Theorems related to complex calculus and analysis.
- Flyspeck: The massive library of lemmas used to prove the Kepler conjecture.
In total, the dataset scales to 2,199 definitions and 29,462 theorems. The authors provide a standard 60:20:20 split (train/validation/test) to ensure reproducible research.
Key Insights and Ideas
- Normalization is Crucial: HOL Light generates many "generic" variable names (e.g.,
GEN%PVAR%9675). The authors found that mapping these to a small, consistent set of names was vital to prevent the neural network from getting confused by arbitrary labels. - Subgoal Sharing: In a proof search, different paths often lead to the same mathematical problem. By detecting these identical subgoals and "sharing" them in a search graph, the system avoids redundant calculations.
- The Power of Pruning: Human proofs are often "messy" and contain unnecessary theorem references. The authors implemented a greedy pruning step to shorten argument lists, creating "cleaner" data for the model to learn from.
- Two-Tower Efficiency: By separating the goal and premise encoders, the system can pre-compute embeddings for the entire library of 30,000 theorems, making real-time proof search significantly faster.
Key Results
The authors compared DeepHOL against standard "hard-coded" automated solvers, demonstrating massive improvements when utilizing reinforcement learning loops.
- Baseline: A standard first-order prover (ASM_MESON_TAC) solved only 6.1% of the theorems in the complex analysis validation set.
- Supervised Learning: A WaveNet-based model trained purely on human proofs reached 32.65%.
- Reinforcement Learning: The full RL loop (Loop tactic dependent) achieved the highest performance at 38.9%.
- Generalization: When tested on the difficult Flyspeck dataset, the model automatically closed 37.0% of the proofs.
Limitations and Future Work
- String Representation: Currently, the model treats mathematical expressions as strings (S-expressions). The authors note that future models should probably exploit the tree-like structure of these expressions more directly.
- Limited Tactic Arguments: DeepHOL currently only predicts theorem arguments. It cannot yet generate "arbitrary terms" (like specific numbers or custom-built formulas) required for some complex proofs.
- Search Strategy: The current prover uses a relatively simple breadth-first search. Integrating more sophisticated strategies like Monte Carlo Tree Search (MCTS) is a logical next step.
- Cold Start: While the system can learn from scratch, it currently performs significantly better when "seeded" with human proof data. Finding ways to bridge this gap is an open challenge.
Summary updated