TL;DR
HILBERT is a novel multi-agent framework that bridges the gap between informal mathematical reasoning and formal proof verification in Lean 4. By recursively decomposing complex mathematical problems into simpler subgoals and leveraging real-time verifier feedback, HILBERT achieves a groundbreaking 70.0% success rate on the ultra-challenging PutnamBench, vastly outperforming both open-source baselines and proprietary systems.
What Problem Does This Paper Address?
While large language models (LLMs) have gotten remarkably good at solving high-school and college-level math problems in natural language, they suffer from a fatal flaw: they frequently hallucinate, introducing subtle logical fallacies or calculation errors that are difficult to detect automatically.
To guarantee absolute correctness, researchers use formal theorem provers like Lean 4, which mathematically verify every step of a proof. However, specialized "prover LLMs" trained on formal code are brittle and struggle with the high-level conceptual planning required for complex problems. Conversely, general-purpose reasoning LLMs can sketch out a proof but fail at the rigorous syntax required by formal verifiers. HILBERT addresses this gap by combining the intuitive, informal reasoning of general LLMs with the precise, tactical execution of formal provers.
Methods
HILBERT orchestrates a multi-turn agentic workflow using four core components:
- An Informal Reasoner: A general-purpose LLM (like Gemini 2.5 Pro) that excels at conceptual mathematical planning and error interpretation.
- A Formal Prover: A specialized LLM (like Goedel-Prover-V2) optimized for generating Lean 4 tactics.
- A Verifier: The Lean 4 compiler, providing ground-truth correctness feedback.
- A Retriever: A semantic search engine that finds relevant theorems within Lean's standard library (
Mathlib).
When given a target theorem, HILBERT first attempts a direct proof using the Prover. If that fails, it initiates a Subgoal Decomposition phase:
- The Reasoner generates an informal proof strategy and translates it into a Lean 4 proof sketch using
sorryplaceholders for unproven steps. - These subgoals are extracted into independent theorem statements.
- HILBERT then attempts to solve each subgoal using a two-stage approach: a direct Prover attempt, followed by a "shallow solve" fallback with the Reasoner if the Prover fails.
- If a subgoal remains unsolved, the framework recursively decomposes it further (up to a maximum depth $D$), breaking the problem down until every piece can be formally verified.
Datasets
The authors evaluated HILBERT on two primary benchmarks:
- miniF2F-Test: A benchmark consisting of 244 competition-level math problems drawn from the AMC, AIME, and IMO.
- PutnamBench: A highly demanding benchmark containing 660 undergraduate-level problems from the prestigious William Lowell Putnam Mathematical Competition (evaluated on the September 2025 version).
Key Insights and Ideas
- Bypassing Context Limits via Modularization: Traditional LLMs struggle to generate long formal proofs because errors compound over extended contexts. HILBERT's recursive decomposition acts as a divide-and-conquer strategy, allowing it to generate proofs spanning thousands of lines of code by isolating individual subproblems.
- The Reasoner is the Captain: Interestingly, the choice of the informal reasoner model matters more than the strength of the formal prover. Upgrading from Gemini 2.5 Flash to Pro yielded a larger performance boost than switching between different formal prover models.
- Retrieval Saves Compute: Integrating a semantic theorem retriever does more than just boost accuracy; it significantly reduces inference cost. By surfacing the exact theorem names from
Mathlib, it prevents the models from wasting compute cycles guessing syntax or failing due to minor naming mismatches.
Key Results
HILBERT achieved state-of-the-art performance across both evaluated datasets:
miniF2F
When paired with Gemini 2.5 Pro and Goedel-Prover-V2-32B, HILBERT achieved a 99.2% pass rate on miniF2F, setting a new record for publicly available methods and failing on only two problems.
PutnamBench
On the notoriously difficult PutnamBench, HILBERT solved 462 out of 660 problems (70.0%). This represents a massive 422% relative improvement over the best previous publicly available baseline (Goedel-Prover-V2 at 13.4%) and comfortably beats proprietary state-of-the-art systems like Google's SeedProver (50.4%).
Limitations and Future Work
The primary trade-off for HILBERT's high accuracy is its inference-time compute cost. Solving the most complex Putnam problems required millions of tokens and thousands of sequential LLM calls per sample, exhibiting a pronounced long-tail distribution where a few hard problems consumed the vast majority of resources.
For future work, the authors propose a "virtuous cycle": using the massive, verified formal proofs generated by HILBERT as training data to fine-tune and improve the base Prover and Reasoner models, ultimately making the entire pipeline faster and more computationally efficient.
Summary updated