TL;DR
The authors introduce STOCHBENCH, a new domain-specific benchmark for Lean 4 consisting of 450 graduate-level problems in stochastic processes. While a baseline LLM-powered agent solves nearly 70% of problems that map directly to Lean's standard library, its success rate plummets to 23% on abstracted problems that require complex, hierarchical reasoning. This benchmark shifts the focus of formal theorem proving from competition math to the nuanced realities of graduate-level applied mathematics.
What Problem Does This Paper Address?
While large language models (LLMs) have made impressive strides in formal theorem proving, current evaluation benchmarks (like miniF2F or PutnamBench) focus heavily on competition mathematics (e.g., Olympiads and the Putnam exam). These puzzles rely on clever tricks but poorly represent how mathematics is actually applied in specialized scientific fields.
Furthermore, fields like graduate-level stochastic processes—which are foundational to statistics and machine learning—are severely underrepresented in Lean’s standard mathematical library (Mathlib). This lack of infrastructure makes it difficult to evaluate how consistently automated provers can handle the recurring, domain-specific arguments essential to everyday mathematical research.
Methods
To construct STOCHBENCH, the authors combined mathematician-led curation with LLM-assisted formalization. They translated textbook and course problems into Lean 4 theorem targets.
Because Mathlib lacks some of the advanced infrastructure required for stochastic calculus, the authors designed two distinct types of problem representations:
- Direct Targets: Problems that utilize existing Mathlib objects or newly created shared definitions (e.g., matrix representations for finite-state Markov chains).
- Abstracted Targets: Problems where the missing foundational properties are provided explicitly as hypotheses. This isolates the prover's ability to chain complex arguments together without getting bogged down by a lack of library support.
For evaluation, they built a multi-turn, tool-using baseline agent powered by Claude 4.8 Opus. The agent interacted with the Lean Language Server Protocol (LSP), allowing it to inspect compiler errors, query search tools (like Loogle and Leansearch), and iteratively revise its proofs within a 15-minute per-problem limit.
Datasets
The paper introduces STOCHBENCH, a dataset containing 450 Lean 4 theorem targets paired with their natural-language sources, shared definitions, and baseline proof attempts. The corpus spans eight core topics in graduate stochastic processes:
- Poisson processes
- Markov chains (finite & countable)
- Renewal processes
- Continuous-time Markov chains & queues
- Random walks & large deviations
- Martingales & stopping times
- Brownian motion & stochastic calculus
- Weak convergence & functional limits
Key Insights and Ideas
- Depth Over Breadth: By focusing deeply on a single mathematical domain rather than testing broad high-school math, STOCHBENCH exposes structural failures in LLM reasoning that aggregate benchmark scores usually hide.
- The "Abstraction" Paradox: Providing intermediate results as hypotheses (abstracted targets) should theoretically make a problem easier. However, it actually makes it harder for LLMs because they can no longer rely on rote memorization or simple library lookups. They must instead engage in long-horizon, hierarchical proof construction.
- The Rigor Gap: Qualitative analysis revealed that when agents failed, it was often due to subtle formalization omissions—such as forgetting to explicitly assume measurability, integrability, or non-emptiness conditions.
Key Results
The baseline Opus 4.8 agent achieved an overall clean proof rate of 34.9% (157 out of 450 problems solved). However, performance varied drastically depending on how the problem was framed and the specific topic at hand:
- Direct vs. Abstracted: The agent excelled at direct targets, achieving a 69.3% success rate, but struggled heavily on abstracted targets, dropping to 23.2%.
- Topic Variance: Problems involving Martingales & stopping saw the highest success (61.7%), whereas Renewal processes (4.9%) and Brownian motion & stochastic calculus (17.8%) proved to be incredibly difficult for the agent.
Limitations and Future Work
The authors note that the curation, faithfulness review, and classification of problems were conducted by human curators, which introduces subjective bias since terminologies were not rigorously formalized.
Additionally, many proof failures stemmed from difficult library interfaces or missing foundational lemmas in Mathlib. The authors hope that STOCHBENCH will serve as a valuable testbed for training future autoformalization models and reinforcement learning agents, ultimately driving forward the formalization of applied mathematics.
Summary updated