ImProver 2: Iteratively Self-Improving LMs for Neurosymbolic Proof Optimization
Riyaz Ahuja, Tate Rowney, Jeremy Avigad, Sean Welleck
cs.AI
May 21, 2026 · v1
TL;DR
Introduces ImProver 2, a neurosymbolic framework for automated proof optimization in Lean 4.
Abstract
Formal mathematics libraries are rapidly expanding, creating a growing need to refactor verified proofs for maintainability and to improve training data quality for neural provers. However, scalable proof optimization is hindered by heterogeneous and heuristically specified objectives, scarce data, and high training and inference costs. To overcome these challenges, we introduce ImProver 2, a neurosymbolic framework for automated proof optimization in Lean 4. ImProver 2 combines a data-efficient expert-iteration pipeline with a scaffold that exposes formal structure alongside lightweight informal abstractions. We further introduce a suite of metrics capturing structural proof properties. Using ImProver 2, we train a 7B-parameter model that outperforms orders-of-magnitude larger models within the same model family, and is competitive with mid-tier frontier models across metrics. We additionally demonstrate that our neurosymbolic scaffold significantly improves performance across both small and frontier models. We show that with proper scaffolding and training, small models can effectively restructure research-level proofs over complex and varied metrics, matching substantially larger systems and establishing proof optimization as a scalable, learnable task.
Problem
Formal mathematics libraries are expanding rapidly, but scalable proof optimization is hindered by heterogeneous objectives, scarce data, and high training/inference costs. Existing methods rely on expensive closed-source models.
Approach
ImProver 2 is a neurosymbolic framework for automated proof optimization in Lean 4 combining a data-efficient expert-iteration (IRPO) training pipeline with a scaffold exposing formal structure (goal states, premise retrieval) alongside lightweight informal abstractions. The system trains a 7B-parameter model through iterative preference optimization: generating proof candidates, scoring them on structural metrics (length, modularity, dependencies), and training on filtered preference pairs with a replay buffer.
Results
The trained 7B model outperforms orders-of-magnitude larger models within the same family and is competitive with mid-tier frontier models across all three metrics. On research-level proofs from miniCTX-v2, ImProver 2 achieves 0.330 length, 0.143 modularity, and 0.206 dependency scores, matching or exceeding GPT-5-chat while running locally.
| Model | Length | Mod. | Dep. | Cost |
|---|
| DS-R1 7B | 0.118 | 0.003 | 0.050 | Local |
| GPT-4o | 0.336 | 0.034 | 0.050 | $2.50/$10 |
| GPT-5-high | 0.660 | 0.120 | 0.208 | $1.25/$10 |
| ImProver | 0.355 | 0.088 | 0.047 | $2.50/$10 |
| ImProver 2 | 0.330 | 0.143 | 0.206 | Local |
Model comparison on proof optimization metrics