Introduction
Interactive Theorem Proving (ITP) is a critical tool for verifying mathematical proofs and software correctness. However, the process is notoriously labor-intensive; for example, the verification of the seL4 microkernel required approximately 25 person-years of effort. While AI-driven automation offers a promising solution, the research landscape is currently fragmented. Different groups utilize disparate ITP systems (e.g., Lean, HOL4, Coq), datasets, and mathematical representations, making it difficult to objectively compare the effectiveness of different embedding architectures—the models responsible for translating mathematical formulas into machine-understandable vectors.
The BAIT Framework
To address this fragmentation, the authors present BAIT (Benchmarking Architecture for Interactive Theorem-Proving). BAIT is a modular framework designed to decouple the data, the proving environment, and the model architecture, providing a standardized environment for evaluating AI models in ITP.
Using this framework, the study evaluates several embedding strategies:
- Transformers: Processing formulas as linear text sequences.
- Graph Neural Networks (GNNs): Representing formulas as abstract syntax trees.
- Structure Aware Transformers (SAT): A hybrid model that uses a GNN to process the graph structure before applying a Transformer layer for global context.
- Directed SAT: A variant of SAT that explicitly respects the directional nature of mathematical operations.
Key Insights
The benchmarking process yielded several significant findings:
- Structure is Paramount: Mathematical formulas possess inherent hierarchical structures. Models that explicitly account for this structure, such as Directed SAT, consistently outperform those treating math as flat text.
- Addressing the Encoder Bottleneck: In end-to-end systems like TACTICZERO, the primary limitation was often the "encoder" rather than the logical reasoning component. Swapping basic text encoders for GNN or Transformer-based ones significantly improved proving success rates.
- Semantic Awareness: Qualitative analysis showed that GNN-based models are better at grouping mathematically related expressions (e.g., "union" and "subset") in vector space, whereas text-based models are often misled by character-level similarities.
- The Power of Ensembles: Combining GNNs and Transformers into an ensemble often produced the best results, indicating that these architectures capture complementary aspects of mathematical logic.
Results
The Directed SAT model emerged as the top performer in supervised learning tasks, achieving an accuracy of 85.1% on the HOList top-5 premise selection benchmark, outperforming standard GNNs and Transformers.
In end-to-end proving within the HOL4 environment, upgrading the TACTICZERO encoder to a GNN increased the "pass@1" rate (the percentage of theorems solved in one attempt) from 43.0% to 64.6%. This represents a substantial leap in proving capability achieved solely through architectural improvements to the formula representation. Furthermore, these advanced encoders demonstrated superior generalization to unseen validation goals compared to the original baseline.
Limitations and Future Directions
While highly effective, Structure Aware Transformers (SAT) are computationally demanding due to the GNN pass required at every layer. Future work involves exploring more efficient architectures and integrating Large Language Models (LLMs) into the BAIT framework to leverage their reasoning capabilities. Additionally, the authors plan to expand prover coverage to include systems like LeanDojo to remain at the forefront of the evolving ITP landscape.
Summary updated