TL;DR
This paper introduces a novel neural network-guided instantiation strategy for the cvc5 automated theorem prover. By training a Graph Neural Network (GNN) on existing proof data, they significantly improve the prover's ability to solve first-order logic problems, achieving a 109% speedup in realistic scenarios without requiring specialized hardware.
What Problem Does This Paper Address?
Automated theorem provers (ATPs) are powerful tools for verifying mathematical theorems and software. A crucial step in many ATPs, including SMT (Satisfiability Modulo Theories) solvers like cvc5, is instantiation. This process involves replacing quantified variables (like "for all x") with specific terms to derive concrete statements that can be checked. The challenge lies in the sheer number of possible instantiations, making it difficult for traditional heuristics to efficiently explore the search space. While machine learning has been applied to guide other parts of ATPs, directly applying neural methods to the complex instantiation process in SMT solvers like cvc5, which involves many low-level decisions, has been largely unexplored due to potential performance bottlenecks.
Methods
The core of this work is a Graph Neural Network (GNN) integrated into cvc5's enumerative instantiation strategy. Instead of relying on predefined heuristics, the GNN learns to predict which quantified expressions (QEs) are most likely to be useful for a proof and which ground terms are best suited to instantiate their variables.
Here's a breakdown of their approach:
- Graph Representation: The current state of the theorem prover (the "proof state") is represented as a graph. Nodes in this graph represent terms and variables, and edges capture their relationships.
- GNN Architecture: A custom GNN is implemented using PyTorch and integrated directly into cvc5's C++ frontend. This avoids communication overhead and allows for efficient, CPU-based inference. The GNN uses message passing to aggregate information from neighboring nodes, learning to represent complex relationships within the proof state.
- Training Data: Crucially, the GNN is trained not on the enumerative instantiation process itself, but on data generated by cvc5's more powerful e-matching instantiation strategy. This provides a richer source of successful instantiations.
- Output and Guidance: The GNN outputs two types of scores:
- QE Scores: Probabilities indicating how likely each asserted quantified expression is to be useful.
- Term Scores: Probabilities for each variable-term pair, suggesting the likelihood of a useful instantiation.
- Integration: The GNN's predictions are used to guide the enumerative instantiation process. They experiment with different strategies for using these scores, including sampling and thresholding.
Datasets
- Training Data Generation: The authors modified cvc5 to log proof states and successful instantiations when run in e-matching mode on a large set of problems. This generated data was then used to train the GNN.
- Evaluation Datasets:
- Small Dataset: A subset of the Mizar library (MPTP2078 benchmark), yielding 2172 problems, split into training, development, and holdout sets.
- Large Dataset: The full MPTP1147 benchmark, which is over 25 times larger than the small dataset, containing 57917 problems.
Key Insights and Ideas
- Leveraging Stronger Heuristics for Training: Training the GNN on data from the more powerful e-matching strategy, rather than the simpler enumerative strategy it's meant to guide, is key to its success. This allows the GNN to learn from a wider range of successful proof steps.
- CPU-Friendly Neural Guidance: The paper demonstrates that effective neural guidance for ATPs can be achieved on a single CPU thread, without the need for expensive GPUs during inference. This makes the approach more accessible and practical for integration into existing solvers.
- Enumerative Instantiation as a Target: While e-matching is more powerful, the paper focuses on improving the enumerative strategy. This is because enumerative instantiation is conceptually simpler, complete, and offers fine-grained control, making it a good candidate for ML-guided improvement.
- The Trade-off Between Advice and Action: The GNN provides "advice" (scores), but the actual instantiation process still needs to be performed. The paper explores how to best utilize this advice, finding that allowing multiple instantiations per QE can be more effective.
Key Results
- Significant Speedup: On the large MPTP1147 dataset, the GNN-guided enumerative instantiation achieved a 109% improvement in real time compared to the standard enumerative mode. This means it solved problems nearly twice as fast.
- Outperforming Unguided Enumeration: The ML-guided cvc5 consistently outperformed the unguided enumeration mode on both development and holdout sets across different datasets.
- E-matching Still Dominant: While the neural guidance significantly improves enumeration, the paper acknowledges that cvc5's default e-matching strategy remains stronger on the Mizar-based benchmarks used.
- Performance Metrics: The paper reports on metrics like the number of problems solved within a 10-second timeout and the number of instantiations performed.
Limitations and Future Work
- Dataset Size and Generalization: The authors note that the training dataset for the small experiment might have been too small to learn sufficiently strong guidance. They suggest investigating generalization performance on problems from other theorem proving systems (e.g., Isabelle, Coq).
- SMT with Theories: The current work focuses on first-order logic without explicit theories. Extending the approach to non-clausal SMT with theories is a natural next step, though it may require modifications to the data extraction process.
- Optimizing Advice Utilization: The paper suggests that the expensive advice from the GNN might be under-utilized. Future work could explore better balancing the cost of GNN predictions with the number of instantiations performed.
- Neural Network Speed: Further optimization of the GNN's speed is a potential area for improvement, possibly by using smaller networks.
Summary updated