- Updated: June 13, 2026
- 6 min read
Risk-Controlled Lean-as-Judge for Natural-Language Mathematical Reasoning

Direct Answer
The paper introduces COVCAL, a risk‑controlled selector that decides when to trust Lean’s partial formal proofs for natural‑language math answers. By providing a statistically sound “accept‑or‑abstain” rule, it lets AI systems rely on formal verification only when the underlying auto‑formalizer offers sufficient coverage, dramatically improving answer reliability.
Background: Why This Problem Is Hard
Natural‑language mathematical reasoning (NL‑MR) has become a benchmark for large language models (LLMs). Researchers often use the Lean theorem prover as an external judge to verify whether a model’s answer can be turned into a correct proof. However, three intertwined challenges limit this approach:
- Partial coverage: Auto‑formalizers frequently fail to translate a problem into Lean syntax, leaving many answers unevaluated.
- Signal ambiguity: A failed proof does not necessarily mean the answer is wrong; it could stem from missing library lemmas or type errors.
- Unfaithful formalizations: Even when a proof is produced, it may not faithfully reflect the original natural‑language statement, leading to false confidence.
Existing pipelines either treat any Lean failure as a negative signal—causing massive false‑negative rates—or ignore Lean altogether, missing the safety net it can provide. As AI agents are increasingly deployed in high‑stakes domains (e.g., finance, scientific discovery), a principled way to harness partial formal signals without over‑trusting them is essential.
What the Researchers Propose
The authors present COVCAL (Coverage‑Controlled Lean‑as‑Judge), a framework that sits on top of any Lean‑based auto‑formalizer and decides, for each problem, whether to accept the Lean verdict or to abstain. COVCAL operates under two statistical regimes:
- Conservative Bonferroni bound: Guarantees a worst‑case risk across all selected instances, suitable when coverage is low.
- Dev‑then‑Cal rule: Uses a development set to estimate risk more tightly, allowing higher acceptance rates when the formalizer is strong.
Key components include:
- Coverage estimator: Tracks the proportion of problems that the auto‑formalizer successfully translates.
- Risk calculator: Computes a selective‑risk bound based on observed proof successes and failures.
- Selector policy: Applies the chosen statistical rule to decide “accept” or “abstain” per instance.
By treating Lean’s output as a noisy signal and explicitly bounding the probability of accepting a wrong answer, COVCAL transforms an unreliable judge into a trustworthy oracle under well‑defined risk thresholds.
How It Works in Practice
The workflow can be visualized as a pipeline with three stages:
- Auto‑formalization: An LLM (e.g., a 7B model) attempts to convert a natural‑language problem into Lean code. Success is recorded as “covered.”
- Lean proof attempt: The Lean engine tries to prove the formalized statement. The outcome is either “proved” or “failed.”
- COVCAL selection: Using the coverage estimator and risk calculator, COVCAL decides whether the proof result is reliable enough to be accepted. If not, the system abstains, deferring to alternative evaluation (e.g., self‑consistency checks).
What sets COVCAL apart is its statistical rigor: rather than a heuristic threshold, it leverages bootstrap partitions of the data to compute confidence intervals for the selective risk. When coverage is high (as with a prover‑specialized formalizer reaching ~79% coverage), the dev‑then‑cal rule permits accepting nearly half of the problems while maintaining >98% accepted accuracy. Conversely, with sparse coverage (the 7B generic formalizer at 28%), the conservative Bonferroni bound forces abstention, preventing unsafe acceptance.
Evaluation & Results
The authors evaluated COVCAL on the MATH‑500 benchmark, a curated set of 500 natural‑language math problems. Two auto‑formalizers were compared:
- 7B generic auto‑formalizer: Covered 28% of problems; only 43% of generated proofs were faithful.
- Prover‑specialized formalizer: Covered 79% of problems; fidelity rose to roughly 60%.
Key findings:
| Metric | 7B Formalizer (Bonferroni) | Specialized Formalizer (Dev‑then‑Cal) |
|---|---|---|
| Accepted Coverage | 0% (abstained on all partitions) | ≈48% of problems |
| Accepted Accuracy | — | 0.98 (98% correct among accepted) |
| Overall Proof‑Winning Accuracy | 20% at low coverage, 96% at high coverage | — |
These results demonstrate that COVCAL can safely harness partial formal signals when the underlying auto‑formalizer is strong enough, while automatically defaulting to abstention when risk cannot be bounded. Notably, self‑consistency alone already yields 91% accuracy, but COVCAL pushes the trustworthy envelope to >98% for the subset it accepts.
Why This Matters for AI Systems and Agents
For developers building AI agents that must reason mathematically or verify logical claims, COVCAL offers a concrete safety layer:
- Risk‑aware orchestration: Agents can query Lean via COVCAL and only act on answers that meet a pre‑specified risk budget, reducing catastrophic mis‑reasoning.
- Hybrid evaluation pipelines: Combine COVCAL’s selective acceptance with cheaper heuristics (e.g., self‑consistency) to balance speed and safety.
- Scalable deployment: By abstaining on low‑coverage cases, systems avoid costly false positives while still leveraging formal verification where it shines.
Practically, this translates to more reliable AI‑driven tutoring platforms, automated theorem‑proving assistants, and financial modeling agents that need provable guarantees. Organizations can embed COVCAL into their UBOS platform overview to enrich workflow automation with formal safety checks.
What Comes Next
While COVCAL marks a significant step, several avenues remain open:
- Improving auto‑formalizer coverage: Training larger, domain‑specialized models (e.g., leveraging Ollama) could push coverage beyond 90%, unlocking higher acceptance rates.
- Dynamic risk budgeting: Future work could adapt the risk threshold per user or per task, integrating with Workflow automation studio for context‑aware decisions.
- Cross‑formalism verification: Extending COVCAL to other provers (Coq, Isabelle) would broaden applicability across different formal ecosystems.
- Human‑in‑the‑loop feedback: Incorporating expert review of abstained cases could iteratively improve the formalizer’s training data.
These directions align with broader AI safety goals and open the door for commercial products such as AI marketing agents that need mathematically sound reasoning for budget optimization, or Openclaw (Clawdbot, MoltBot) bots that could benefit from provable decision logic.
For a deeper dive into the methodology and statistical guarantees, consult the original Risk‑Controlled Lean‑as‑Judge paper.
Conclusion
COVCAL transforms Lean’s partial formal feedback from a noisy, often misleading signal into a rigorously bounded decision tool. By coupling coverage estimation with selective‑risk guarantees, it enables AI systems to safely exploit formal verification where it is reliable, while gracefully abstaining elsewhere. As auto‑formalization technology matures, frameworks like COVCAL will become foundational components of trustworthy AI agents, bridging the gap between raw language model output and provable correctness.
Explore more on how formal methods can enhance your AI workflows at the UBOS homepage and discover ready‑to‑use templates in the UBOS templates for quick start.
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.