IndiMathBench: Autoformalizing Mathematical Reasoning Problems with a Human Touch

Param Biyani, Shashank Kirtania, Yasharth Bajpai, Sumit Gulwani, Ashish Tiwari

TL;DR

The paper introduces IndiMathBench, a new human-verified benchmark of 312 mathematical problems from the Indian Mathematics Olympiads formalized in Lean 4. To overcome the high cost of manual formalization, the authors developed a human-AI collaborative pipeline that uses LLM ensembles and compiler feedback to accelerate expert annotation by 3.5×. Evaluation of frontier LLMs reveals a stark gap between their ability to generate syntactically valid code and semantically correct math, especially in geometry.

What Problem Does This Paper Address?

For AI to truly master mathematics, it needs to interact with interactive theorem provers (ITPs) like Lean 4, which mechanically verify the logical validity of proofs. However, translating natural-language mathematical problems into formal code—a task known as autoformalization—is incredibly difficult.

Existing formal benchmarks (like MiniF2F or PutnamBench) are small, heavily exposed to data contamination in LLM pretraining sets, and skewed toward Western curricula that underrepresent domains like Olympiad-style geometry and combinatorics. Creating new benchmarks manually is a massive bottleneck, requiring rare dual expertise in high-level mathematics and formal proof programming languages. This paper addresses this data scarcity by introducing a scalable, human-AI collaborative framework to build high-quality formal math benchmarks.

Methods

The authors designed a three-step automated pipeline to generate candidate formalizations, which are then delivered to human experts via a custom user interface:

  1. Category-Based Retrieval: To prevent LLMs from hallucinating non-existent Lean modules, an LLM agent first explores the mathlib repository to extract relevant definitions and formulas, creating a domain-specific static context for the prompt.
  2. Iterative Refinement with Error Feedback: The LLM generates a Lean theorem statement, which is immediately compiled. If the Lean compiler throws parse or type errors, they are fed back into the model for up to six self-debugging iterations.
  3. Multi-Model Ensemble & Dashboarding: The problem is processed by 12 frontier LLMs. A final LLM summarizes and ranks these generations, highlighting shared errors and promising code fragments.
Figure 2: Overview of approach for creating IndicMath dataset: Human is assisted by a multiple LLM anno- tators. Each LLM generation is conditioned on the natural language and documentation, and goes through a validation check by Lean. Errors are provided as feedback in subsequent iterations. The final generations from all LLMs are summarized by an LLM in a dashboard to help optimize annotation efficiency.

These aggregated candidates are fed into a custom VS Code extension dashboard, allowing human annotators to quickly inspect, compile, edit, and verify the final ground-truth formalizations.

Datasets

The paper introduces IndiMathBench, which consists of 312 problems sourced from the Regional Mathematical Olympiad (RMO) and Indian National Mathematical Olympiad (INMO). Each entry pairs an informal problem statement and proof in English with a verified Lean 4 theorem statement.

Unlike other datasets, it intentionally focuses on high-school competition math excluding calculus, pushing deeper into multi-step reasoning within specific domains:

Problem distribution by topic domain in IndiMathBench

Key Insights and Ideas

  • The Compilation vs. Semantics Gap: Syntactic validity does not equal semantic correctness. Models frequently generate Lean code that compiles perfectly but completely alters or omits crucial constraints from the original problem (e.g., confusing positive natural numbers $\mathbb{N}^+$ with Lean's default $\mathbb{N}$ which includes zero, rendering a problem unprovable).
  • Human-AI Symbiosis is the Way Forward: Pure automation fails to preserve precise mathematical intent, but the full pipeline reduces human cognitive load immensely. Experts don't have to write boilerplate code from scratch; they simply act as high-level editors.
  • The Geometry Bottleneck: LLMs struggle severely with coordinate-free geometric formalization. This is compounded by the fact that Lean's standard library (mathlib) lacks robust, competition-level geometric abstractions, forcing models to hallucinate or fail.

Key Results

  • Annotation Speedup: In a controlled study, the full system allowed an expert to formalize problems in just 4 minutes per problem, representing a 3.5× speedup over purely manual formalization (14 minutes) and a 2.2× speedup over using masked LLM candidates without the summary dashboard.
Figure 4: Annotation time for 12 RMO problems under the three workflows
  • Autoformalization Performance: The iterative feedback loop enabled models to achieve high compilation success rates (e.g., Claude Opus 4 successfully compiled 77.9% of its generations). However, measured by logical equivalence (BEq metric), Claude Opus 4 only achieved true semantic correctness on 54 out of 312 problems.
Model evaluation across semantic and syntactic metrics
  • Automated Theorem Proving: When tasked with actually proving the theorems in IndiMathBench, LLMs struggled heavily. In a single-turn setting, frontier models solved only 1 out of 312 problems. With 10 turns of iterative compiler feedback, GPT-5 achieved the highest success rate, but still only solved 11% (36/312) of the dataset, confirming that IndiMathBench is a highly challenging testbed.

Limitations and Future Work

The authors note that IndiMathBench's automated theorem proving success rates remain low, particularly because no model managed to solve a single geometry problem. This stems directly from the limitations of Lean 4's current ecosystem regarding spatial reasoning and geometric constructs. Future work includes expanding the benchmark scale and developing better scaffolding techniques to handle coordinate-free geometry proofs automatically.

Summary updated

BibTeX
@misc{biyani2025indimathbench,
  author = {Param Biyani and Shashank Kirtania and Yasharth Bajpai and Sumit Gulwani and Ashish Tiwari},
  title = {{IndiMathBench: Autoformalizing Mathematical Reasoning Problems with a Human Touch}},
  year = {2025},
  eprint = {2512.00997},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.00997},
}
Figure