MachinoAI Research
Magenta: Closing the Loop Between Mathematical Reasoning and Lean Verification
A training-free agentic loop uses Lean verification as feedback to repair mathematical reasoning and formal proof generation.
TL;DR
Magenta reports 100% on AIME 2025, AIME 2026, and HMMT February 2026, and all six IMO 2026 problems with K2-Horizon-7B.
Why It Matters
The engineering lesson is to make verification a control signal inside the agent loop while separating semantic statement faithfulness from deterministic proof checking.
Research Brief
The shortest useful explanation.
Magenta reports 100% on AIME 2025, AIME 2026, and HMMT February 2026, and all six IMO 2026 problems with K2-Horizon-7B.
Core Explanation
We introduce Magenta, a training-free agentic pipeline that produces an answer, expresses it as a Lean 4 statement, and constructs a machine-checked proof. A statement judge checks whether the formalisation preserves the original problem, while an error-attribution judge routes failures to mathematical re-derivation or local Lean repair.
Why It Matters
The engineering lesson is to make verification a control signal inside the agent loop while separating semantic statement faithfulness from deterministic proof checking.

Figure 1 — Magenta pipeline
Original paper architecture diagram showing reasoning, Lean formalisation, statement adjudication, proof verification and error-attribution feedback.
Section 01
Problem
01 The Problem
Natural-language mathematical reasoning can be persuasive while still containing silent errors. Formal theorem proving provides deterministic proof checking, but conventional formal benchmarks often assume the theorem statement is already correct. Magenta targets the missing bridge: derive an answer, formalise the problem, check statement faithfulness, prove it in Lean, and route failures to the component that should be repaired.
Section 02
How It Works
03 How It Works
The loop is reason -> formalise -> adjudicate -> prove -> verify -> attribute -> repair. Syntax failures regenerate the Lean proof while holding mathematical content fixed. Math failures return verification feedback to the reasoner for re-derivation. Rejected formal statements are resampled before proof search.
Section 03
Architecture
05 Architecture
Magenta separates Reasoner, Formaliser, Prover, Verifier and Judge roles. The Judge implements statement adjudication and error attribution. SafeVerify rejects forbidden constructs such as sorry, admit, native_decide and undeclared axioms.
Section 04
Experiments
06 Experiments
The main evaluation covers 93 problems from AIME 2025, AIME 2026 and HMMT February 2026. Claude Opus 5, Gemini 3.7 Flash and Kimi K3 are answer-only pass@1 baselines. K2-Horizon-7B rises from 74.19% overall to 100.00% with Magenta (+25.81); K2-Horizon-375B from 84.95% to 100.00% (+15.05); Qwen3.8-27B from 91.40% to 100.00% (+8.60); GPT-5.6-Sol (Codex) from 84.95% to 100.00% (+15.05). K2-Horizon-7B + Magenta solves all six IMO 2026 problems. On paraphrased AIME 2026, K2-Horizon-7B and K2-Horizon-375B with Magenta remain at 100.0%; standalone models fall to 70.0% and 86.7%. The 7B model averages 5 correction rounds on AIME 2026 and 5.7 on IMO 2026 versus 2 for 375B on AIME 2026.
Formulas
Error routing
Syntax failures trigger local proof regeneration; mathematical failures trigger new reasoning conditioned on verification feedback.
Statement adjudication
The statement judge accepts or rejects whether the generated Lean statement faithfully represents the original problem and answer.
Related Research
Generative Agents
An agent architecture combining memory, retrieval, reflection, and planning to simulate believable long-horizon behavior.
AI AgentsMIRA
MIRA is an autonomous medical agent evaluated in a sandboxed EHR workflow with tools for diagnosis, testing, treatment, and admission decisions.
AI AgentsAgentic Reasoning
A tool-using agent framework that extends LLM reasoning with web search, coding, and structured reasoning memory for deep research tasks.