ETH Zurich's HumanLean checks AI-written math code against its papers

ETH Zurich's HumanLean checks AI-written math code against its papers

OpenAI released 700-odd AI-generated math papers in October, along with code files meant to help verify some of the math. In the months since, WIRED reports, it has become clear that a lot of this AI-generated code does not correspond with the claims in the accompanying natural-language papers. The code that is correct has also proven hard for humans to follow.

A group led by ETH Zurich computer science professor Martin Vechev says the problem is widespread. His group found inconsistencies across publications by OpenAI, startup Axiom Math and 29 other AI-assisted math proofs it audited. Most are mismatches between the method laid out in the paper and the logic in the code, so the problem is still solved, but in a different way than the paper suggests. More consequentially, the team found that the code files sometimes do not correctly state, let alone prove, the paper's main theorem. A separate review of OpenAI's October release by British mathematician Kevin Buzzard found 38 instances of this as well. OpenAI did not respond to WIRED's request for comment.

The background: frontier labs claimed this year to have solved hundreds of major math problems, partly to show their models can reason and write code. To make the solutions machine-checkable, they translate ("formalize") the problem from everyday language and notation into logical steps in the open-source language Lean, which automates verification. Vechev says there are not enough human experts to check these outputs, which are hard to read because they are not human-generated. He says the issue extends beyond mathematics to anything that translates from a human language into Lean, such as writing and verifying software.

Vechev's team built a system called HumanLean to stamp out errors and make formalizations easier to read by annotating them with assumptions and cited external results. It works in steps. An AI agent (OpenAI's Astra in this case) audits the proof to lay out the goal, assumptions and arguments. Another independent agent checks for inconsistencies, which are filed separately for human review. AI agents then reconstruct the proof's steps with the extra annotations, and the result is merged into one publication after a final check. In a test where the group formalized nine math papers across various topics, human reviewers found no mismatches. The experiment also shows HumanLean can make formalizations easier to read by cutting unnecessary statements. Vechev says AI companies should publish versions of their solutions that humans can follow more easily, and he urges labs to use HumanLean, noting it is compatible with multiple large language models.

Others are less convinced. Leonardo de Moura, an AWS scientist and cofounder of Lean FRO (a nonprofit dedicated to developing the Lean theorem prover and programming language), was not involved in the project. He calls mistakes in stating problems serious, but questions whether adding another AI tool is the solution. He adds that inconsistencies in how a proof is argued are less concerning if the solution still stands up. Ashvin Swaminathan, a member of the technical staff at Axiom Math, argues that because Lean machine-verifies every proof, a theorem's correctness does not depend on following the human-written argument step by step. He calls the differences between the Lean code and the human-written argument "intentional": the company instructed its agents to produce valid, efficient proofs, and in his words that is the expected outcome, not an inconsistency. He says the theorems proved are the same and every proof is verified, and that the statement mismatches had already been identified and corrected.

The readability fight has a famous example. Anthropic researcher Levent Alpöge posted a Lean solution to the Riemann hypothesis in late November, running more than 17 million lines, which he later called a "travesty of slop." Mathematicians have since whittled the proof down to about 100,000 lines in the past couple of weeks. De Moura says it is unclear whether an AI tool like HumanLean would help refine it further. He also notes that Lean can check whether a formal proof is correct but not whether it is intuitive, simple or straightforward, which are subjective questions. If the goal is an exposition for humans, he says, humans will be in the loop.

Key facts

  • Vechev's ETH Zurich group found mismatches between AI-generated Lean code and the natural-language papers across publications by OpenAI, Axiom Math and 29 other AI-assisted math proofs it audited.
  • Most mismatches are in method (the problem is solved differently than the paper says); more seriously, code sometimes does not correctly state the main theorem. Kevin Buzzard found 38 such instances in OpenAI's October release of 700-odd papers.
  • HumanLean uses AI agents to audit a proof, flag inconsistencies for human review, and rebuild it with annotations; in a nine-paper test human reviewers found no mismatches.
  • Axiom Math's Ashvin Swaminathan says the differences are intentional and every proof is Lean-verified; AWS's Leonardo de Moura questions adding another AI tool.
  • Levent Alpöge's late-November Lean proof of the Riemann hypothesis ran over 17 million lines; mathematicians have cut it to about 100,000.

Why it matters

Labs say AI has solved hundreds of major math problems, and Lean is meant to make those claims machine-checkable. If the code does not state the same theorem as the paper, or proves it by a different route, the paper and the verified artifact can drift apart. Vechev argues the problem reaches beyond mathematics to any work that translates human language into Lean, such as writing and verifying software. The dispute also shows the gap between verified and understandable: even correct code is hard for people to follow, as the 17-million-line Riemann hypothesis proof showed.

Who it affects

Mathematicians who are swamped by AI-generated papers and cannot check them all by hand are the most direct audience. AI labs that publish formalizations, including OpenAI and Axiom Math, are named in the audit. People who build Lean tooling or use Lean for software verification are also in scope, since Vechev says the translation problem applies there too.

How to use it

Vechev urges labs themselves to use HumanLean and says it works with multiple large language models. The pipeline has four stages: an audit of goal, assumptions and arguments, an independent inconsistency check with flagged items sent to human reviewers, reconstruction of the proof with annotations, and a final check before merging. The source gives no release details for HumanLean.

How solid is it

The audit findings are Vechev's group's, relayed by WIRED, and Buzzard's separate review of OpenAI's release found 38 instances of misstated main theorems. The HumanLean result rests on a small test of nine papers, where human reviewers found no mismatches. Axiom Math disputes the framing, saying the differences were intentional and the statement mismatches had already been corrected. OpenAI did not respond to WIRED's request for comment. The source does not say how many of the audited publications had inconsistencies or how many were OpenAI's versus Axiom Math's.

Risks and caveats

De Moura questions whether adding another AI tool is the answer, and says it is unclear whether HumanLean would help shrink the Riemann hypothesis proof further. Inconsistencies in how a proof is argued matter less if the solution stands up, in his view, while mistakes in stating the problem are serious. He also notes that Lean cannot judge whether a proof is intuitive or simple. The nine-paper test is small, and the source gives no figure for how much shorter the code became.

“If the goal is to have an exposition to humans, humans will be in the loop.”

— Leonardo de Moura, AWS scientist and cofounder of Lean FRO