Large Language Models (LLMs) have shown remarkable potential as "draft writers" for mathematical proofs. However, formal theorem proving—writing proofs in a strict language that a computer can verify, like Isabelle or Lean—remains notoriously difficult. The search space for logical steps is essentially infinite.
Researchers have recently developed a new framework that significantly boosts the ability of LLMs to prove mathematical theorems. By breaking complex proofs into verifiable "subgoals" and using a diffusion model to perfectly organize the examples shown to the LLM, they achieved a state-of-the-art 45.5% pass rate on the miniF2F benchmark with a 5x improvement in sampling efficiency.
The Hurdles of Automated Proving
While LLMs are adept at generating text, they face two major hurdles in formal proving:
- Coarse Guidance: Standard informal proofs are often too "jumpy." They contain logical gaps that automated provers cannot easily bridge.
- Prompt Sensitivity: LLMs are incredibly sensitive to "in-context learning"—the specific examples provided in their prompt. Choosing which examples to show and in what order is an NP-complete combinatorial problem that heavily dictates the model's success.
To tackle these issues, the authors introduce a two-part framework focusing on proof structure and demonstration curation.
Methodology: Subgoals and Diffusion
1. Subgoal-based Proof Refinement
Instead of feeding the LLM a standard, human-written informal proof, the framework breaks the proof down into a sequence of subgoals.
Using a "self-play" style loop, an LLM proposes subgoals, and an automated theorem prover (ATP) attempts to verify the transition between them. If the ATP cannot bridge the gap between two subgoals, the framework asks the LLM to break that specific step down into even smaller, more granular subgoals. This iterative refinement ensures every step in the demonstration is strictly aligned with the internal states and capabilities of the prover.
2. Demonstration Reorganization via Diffusion
To solve the combinatorial problem of prompt organization, the authors turned to Discrete Diffusion Models.
They treat the pool of available demonstration examples as nodes in a graph. Finding the best prompt is equivalent to finding the optimal path through a subset of these nodes. By training a Graph Neural Network (GNN) within a diffusion framework, the model learns to "denoise" a random selection and order of examples into the specific organization most likely to help the LLM solve a given target theorem.
Key Results and Efficiency Gains
The framework was evaluated on the miniF2F benchmark, a cross-system dataset for formal olympiad-level mathematics (including MATH, AMC, AIME, and IMO problems). The authors specifically used the Isabelle version of the dataset.
- Accuracy Boost: The integration of subgoal-based learning alone increased proof accuracy from 38.9% to 44.1%.
- State-of-the-Art: Adding the diffusion-based reorganization pushed the accuracy to 45.5%, outperforming previous systems like DSP and Lyra.
- Efficiency: The sequence of demonstrations is a primary driver of performance. By providing better-structured prompts, the model becomes significantly "smarter" per call.
As shown above, the diffusion method achieved a 5x improvement in sampling efficiency. The system reached previous state-of-the-art performance using only 20 LLM calls, whereas older methods required up to 100. Because calling high-end LLMs is computationally expensive, getting the right answer in fewer tries is a massive operational win.
Limitations and Future Work
While highly effective, the framework has limitations. The diffusion model is trained on successful organizations from the miniF2F validation set, meaning its performance might degrade on theorems significantly outside that distribution. Additionally, there is an upfront computational cost to running the iterative subgoal refinement and training the diffusion model.
Future work could explore integrating this framework with real-time error feedback from the prover, or expanding the system from Isabelle to Lean 4, which is currently heavily favored by the mathematical community.
Summary updated