TLDR: Autoformalizer with Tool Feedback (ATF) is a novel AI approach that translates natural language mathematical problems into formal statements for Automated Theorem Proving. It integrates Lean 4 compilers for syntax correction and a multi-LLMs-as-judge system for semantic consistency validation. This tool-guided feedback mechanism allows the model to adaptively refine its output, leading to significantly improved syntactic validity and semantic consistency compared to previous formalizers. The training involves cold-start, expert iteration, and Direct Preference Optimization phases, and the project also open-sources a large dataset of formal statements.
The field of Automated Theorem Proving (ATP) is seeing rapid advancements thanks to large language models (LLMs). However, a significant hurdle remains: the scarcity of formalized mathematical data. This is where autoformalization comes in, aiming to translate mathematical problems from natural language into precise, verifiable formal statements.
Historically, efforts in autoformalization have shifted from directly prompting general LLMs to training specialized, end-to-end formalizer models. While these dedicated models have shown impressive progress, they still face challenges in consistently generating statements that are both syntactically correct and semantically consistent with the original problem.
Introducing Autoformalizer with Tool Feedback (ATF)
To tackle these persistent issues, researchers have proposed a novel approach called Autoformalizer with Tool Feedback (ATF). This system integrates crucial syntactic and consistency information directly into the formalization process, acting as ‘tools’ that guide the model.
ATF leverages Lean 4 compilers for real-time syntax corrections, ensuring that the generated formal statements adhere to the strict rules of the target formal language. For semantic consistency, it employs a sophisticated multi-LLMs-as-judge approach. This method benchmarks the ability of multiple LLMs to identify even subtle misalignments between informal and formal expressions, using an ensemble vote to enhance reliability. By incorporating this feedback, ATF can adaptively refine its generated statements, significantly boosting both their syntactic validity and semantic accuracy.
How ATF is Trained
The training of ATF is a multi-stage process designed to instill robust formalization capabilities:
-
Cold-Start Phase: The model first undergoes a cold-start phase, where it’s trained on synthetic tool-calling data. This initial stage teaches the model the fundamental mechanics of using the feedback tools.
-
Expert Iteration Phase: Following the cold-start, an expert iteration phase refines the model’s formalization skills. Here, the model learns to effectively implement revisions based on the feedback received from the tools.
-
Direct Preference Optimization (DPO): The final stage uses Direct Preference Optimization to address and reduce ineffective revisions, encouraging the model to achieve correct formalizations in fewer attempts.
Also Read:
- Aria: Advancing Automated Mathematical Formalization
- Ensuring Logical Precision in AI-Generated Optimization Models with Semantic Alignment
Key Achievements and Impact
Experimental results demonstrate that ATF significantly outperforms a range of existing baseline formalizer models. Its superior performance has been validated through both automated metrics and human evaluations. Notably, ATF shows excellent inference scaling properties, meaning its performance continues to improve with more revision attempts and parallel sampling.
The benefits are particularly evident in semantic consistency, where ATF-32B achieved substantial improvements over the strongest baselines across various benchmarks. It also exhibited strong generalization capabilities, performing robustly even on out-of-distribution datasets like CombiBench, which contains complex combinatorial mathematics problems.
Beyond the model itself, the researchers have open-sourced Numina-ATF, a comprehensive dataset containing 750,000 synthetic formal statements. This valuable resource is expected to accelerate further advancements in autoformalization and Automated Theorem Proving research. You can find more details about this research in the original paper: Autoformalizer with Tool Feedback.


