Robots Atlas>ROBOTS ATLAS
Reasoning

Autoformalization

2022ActiveUpdated: 19 August 2026Published
Key innovation
Automatically translating mathematics and statements from natural language into the formal language of proof assistants (e.g. Lean), combining LLM flexibility with the rigor of formal verification.
Category
Reasoning
Abstraction level
Pattern
Operation level
InferenceTraining
Use cases
Formalizing mathematical statements and proofsVerifiable AI mathematical reasoning (e.g. AlphaProof)Building and extending formal libraries (e.g. mathlib)Checking the correctness of model reasoningAssisting mathematicians with formalization

How it works

A language model receives an informal statement (e.g. a theorem in English) and generates its formal-language equivalent (e.g. Lean), often along with a proof sketch. The generated code is passed to a proof assistant that checks its correctness; errors and verifier messages return to the model as a signal to improve (a generate-verify-repair loop). Training and fine-tuning use informal-to-formal pairs and reinforcement learning based on the verification outcome.

Problem solved

Formalizing mathematics by hand is very labor-intensive, and LLMs can hallucinate in reasoning. Autoformalization automates translation into a formal form that can be machine-verified, combining AI scale with proof certainty.

Key mechanisms

Natural-language → formal-language translation (Lean/Isabelle/Coq)
LLM candidate generation
Proof-assistant verification and a repair loop
Reinforcement learning on the verification signal
Informal-to-formal data pairs for training

Strengths & limitations

Strengths
✓Combines LLM flexibility with formal-proof certainty
✓Eliminates hallucinations on mathematical tasks
✓Enables scalable formalization of mathematics
✓Provides a verifiable reward signal for training
Limitations
✗Difficulty translating ambiguous, informal mathematics
✗Limited coverage of formal libraries
✗Costly generation and verification of long proofs
✗Narrow applicability beyond mathematics/logic

Components

Translation model (LLM)Generation

Generates formal statements and proofs from informal content.

Official

Proof assistantVerification

A verifier (e.g. Lean) checking the generated code.

Official

Feedback loopIteration

Verifier messages guide the repair of subsequent attempts.

Official

Evolution

Original paper · 2022 · NeurIPS 2022 · Yuhuai Wu
Autoformalization with Large Language Models
Yuhuai Wu, Albert Q. Jiang, i in. (et al.)
2022
Autoformalization with LLMs
Inflection point

Wu et al. show LLMs can translate mathematics into formal language.

2024
AlphaProof (Google DeepMind)
Inflection point

A system combining autoformalization and Lean reaches IMO medal level.

Hyperparameters (configurable axes)

Formal languageHigh
LeanMost popular in AI-for-math (mathlib).
Isabelle/CoqAlternative proof assistants.
Training signalHigh
pary nieformalne↔formalneSupervised learning.
RL na wyniku weryfikacjiReward from the proof assistant.