Skip to content

When the Agent Has to Prove It: Three Routes to Verifiable Machine Science

#ai-for-science #lean4 #formal-verification #autonomous-agents #arc-agi #numerical-methods

When the Agent Has to Prove It: Three Routes to Verifiable Machine Science ​

Getting an LLM agent to run a full study is close to solved. Getting the study to survive scrutiny is not.

An agent can propose a hypothesis, write the analysis code, run it, and produce a confident write-up in an afternoon. It can also produce a confident write-up of something the data does not support, and the write-up will read exactly the same. Confidence is not a signal here. That is the whole problem with autonomous science right now, and it is why three papers from this month are worth reading together.

One builds a lab where agents audit each other and revise their own measurement protocols. One builds a knowledge base of numerical methods that terminates in Lean-checked implications. One builds a world model that turns exploration of an unknown environment into kernel-checked proofs, including proofs that a goal cannot be reached at all.

Different domains, different scales, same instinct: put a checkable artifact between the model's claim and the claim's acceptance.

Three systems, three places to put the check ​

SystemDomainWhere the check livesWhat it refuses to accept
Collaborative spin-lab agentsDiamond NV-center spin ensemblesRepeated reference measurements and adversarial experiment designA result that matches theory but drifts during collection
FARMSRandomized numerical linear algebra, numerical PDEsLean-checked implications from explicit source premisesA method description that can't be traced to its source, meaning, and cost
AWMUnknown game environments (ARC-AGI-3)Lean 4 kernel over all legal move sequencesA winning trajectory as evidence that no other path exists

The three checks are not equivalent. The spin lab's check is empirical and statistical. FARMS's check is logical but conditional on premises the pipeline extracted from papers. AWM's check is fully formal and closes over an entire state space.

What they share is a refusal to let the last step be a sentence in English.

How a self-auditing lab loop runs ​

The quantum spin work is the most concrete of the three, so start there. The setup is ensembles of nitrogen-vacancy centers in diamond, probed with microwave pulse sequences. The agents had to derive the minimum number of calibration settings needed to predict how the ensemble responds to a defined family of sequences.

Three design choices in that diagram matter more than the physics.

Agents can reject each other's research questions before any compute gets spent. Theory gets a separate check by an agent that did not produce it. And the acceptance criteria are fixed before the experiment runs, which is the part most human labs also claim to do and frequently don't.

Quick Take: The interesting result in the spin-lab paper is not that the agents got the right answer. It's that they caught their own instrument drifting and downgraded a result they liked.

The drift that saved the paper ​

Here is the sequence. The agents derived a theoretical prediction for the minimum calibration settings, verified it computationally, then designed experiments specifically meant to distinguish their prediction from a competing one. The first experiment agreed with theory.

That is where a single-agent pipeline ships the result and moves on.

Instead, repeated reference measurements showed the signal was drifting during data collection. The agents marked the run inconclusive. They revised the measurement protocol and left the acceptance criteria exactly where they were. The revised experiment met the original bar and supported the prediction.

A drift check is cheap. Ignoring it is what produces the retraction. The agents' behavior here is a policy choice, not a capability: nothing in the model architecture forces a system to treat an agreeing result as suspect. This lab was built so that it does.

FARMS: making numerical methods machine-checkable ​

FARMS attacks a different layer. Numerical analysis is full of statements like "this randomized algorithm has expected error bounded by X at cost Y," and those statements live in papers as prose, half-explicit assumptions, and notation that varies by author. An AI system that wants to pick and adapt a solver needs that knowledge in a form it can reason over without silently inventing constraints.

FARMS converts it into three linked things: the formal statement, the source context it came from, and the algorithmic meaning plus cost guarantee.

StageInputOutputReported behavior
Source preparationPapers and reference materialStatements cleaned and reattached to contextPreserves provenance so a claim can be audited later
Reusable representationsA statementAlgorithmic meaning and quantitative guaranteeLets a planner choose a method and know its cost
Semantic reviewA representationAccepted or rejected target14 of 171 targets rejected in the reported run

Key numbers from FARMS:

  • 171 target statements drawn from randomized numerical linear algebra and numerical PDEs
  • 157 accepted by the pipeline, a 91.8% acceptance rate
  • $0.85 to $2.29 mean estimated cost per target across sources
  • A full pass over the 171-target corpus lands somewhere around $150 to $390, which is a grant line item nobody needs to defend

That cost figure is the part that changes adoption. At a couple of dollars per target, you can afford to run the pipeline over a whole subfield and throw away the failures. At $200 per target you'd be arguing about it in a review meeting.

The paper illustrates the payoff with a heat-flow solve and wave-response compression, where Lean-checked implications connect the selected statement to the computational skill it licenses. That connection is the point. The system doesn't just retrieve a method; it carries a proof that this method's guarantees apply to this problem.

AWM: turning an unknown world into a Lean theorem ​

The third paper asks a sharper question. Math AIs already produce Lean proofs, but they do it against definitions a human handed them. Can a system reason rigorously about a world it has never seen, with no formal spec provided?

AWM's answer is a pipeline from exploration to category theory to kernel.

The typed-object layer is doing the heavy lifting. Raw Python hypotheses are unconstrained; typed objects with shared rules give the system something that can be simplified and then formalized without losing meaning. Category-theory-guided rewriting is what keeps the model small enough for a kernel check to finish.

The impossibility results are the headline. On two game levels that cannot be won, AWM produced closed, kernel-checked Lean proofs excluding every legal winning sequence, in all six runs. Claude Opus 5.5 and GPT-6 Astra, both equipped with coding tools, produced zero such proofs across twelve baseline runs. Proving a negative over an entire state space is a category of claim that sampling-based agents cannot make at all, no matter how many rollouts you give them.

The bounds comparison is the more informative number. Four of six correct on the first pass against 1 for Opus 5.5 and 0 for GPT-6 Astra. Then, given only the signal that a cheaper win exists, AWM revised its rules and reached six of six. That single-bit feedback loop is worth more than the raw score, because it means the model's errors are localized and repairable rather than diffuse.

On the generality side: across all 25 public ARC-AGI-3 games, AWM's extracted models let Lean replay the winning trajectories for all 183 levels. The models also predict unseen transitions and flag when game mechanics change. With Claude Opus 5 driving, AWM clears every level at a score of 99.9, and the certified winning trajectories use 43% of the human baseline's actions.

An efficiency claim backed by a proof is a different object than an efficiency claim backed by a benchmark average. That 43% is checkable, level by level, by anyone with the Lean toolchain and the extracted model.

What tripped me up when I tried to reproduce the loop ​

I spent a weekend wiring a small FARMS-style pipeline against a handful of my own numerical analysis notes, and the friction was nowhere I expected.

Extracting the cost guarantee from prose took longer than the Lean check did. Half my notes stated a bound with an assumption buried two paragraphs earlier, and the pipeline was only as good as my source preparation. When I skimped on that stage, the Lean file compiled beautifully and proved a statement about a method under conditions that did not apply to my problem. The kernel has no opinion about whether your premises are the ones you meant.

The second surprise was toolchain latency. Lean 4 kernel checks are fast, but the surrounding plumbing (elaboration, imports, the Mathlib dependency graph) is where the minutes go. If you're running this inside an agent loop with a few hundred iterations, budget for the toolchain, not the proof search.

And the spin-lab drift result landed differently after that. My instinct when a run disagrees with theory is to adjust the acceptance threshold and re-run. The agents in that paper did the opposite, and they were right to.

Common pitfalls ​

Relaxing the acceptance criteria when the experiment fails. This is the default human behavior under deadline pressure, and it silently converts a null result into a positive one. The spin-lab agents froze their criteria before the run and revised the protocol instead. Write your thresholds down before you collect data, and treat any mid-run edit as a red flag in your own logs.

Reading a Lean check as a correctness check. Lean verifies that the proof follows from the stated premises. It says nothing about whether the premises match reality. FARMS invests heavily in source preparation for exactly this reason. If your formalization step drops the assumptions on a theorem's applicability, you get a proof of the wrong statement and zero warnings.

Letting one agent write the hypothesis, the model, and the formal spec. If a single component generates all three, a bug anywhere in the chain yields a perfectly proved falsehood. AWM's typed-object step and the spin lab's separate theory check both exist to break that dependency. Keep the formalizer independent of the explorer.

Assuming impossibility proofs transfer across rule sets. A closed proof that a level is unwinnable holds for the rules the system induced. If the environment shifts, the proof is stale and looks identical to a valid one. Cross-check extracted rules against transitions you have not observed before trusting the negative result.

Paying for formalization on targets nobody will reuse. The $0.85 to $2.29 per-target figure is cheap in absolute terms and still wasted if the resulting statements never get picked up. Run the pipeline where a downstream planner will actually consume the output, not across a corpus for coverage's sake.

Where the seams still show ​

All three systems are narrow in ways that matter.

The spin lab worked on one physical platform with a well-characterized noise model. Diamond NV ensembles are unusually cooperative: the observables are stable, the pulse sequences are parameterized, and the theory is settled. Swap in a biological assay with batch effects and the drift detection problem gets much harder.

FARMS covers randomized numerical linear algebra and numerical PDEs, two areas where the mathematics is already written down in a formalizable style. Fields where results are stated as "our method works well in practice" don't have statements to extract, and no amount of Lean will fix that.

AWM's category-theory simplification step is doing a lot of unexamined work. The paper reports the outcomes and describes the transformations, but the choice of which transformations to apply is where a wrong simplification would hurt most, and that choice is not itself proved correct. If the model gets simplified into a form that's easier to formalize and no longer equivalent to the observations, the kernel check passes and the world model is wrong.

That's the general shape of the risk across all three: formal verification moves the trust boundary, it doesn't remove it. You end up trusting the source prep, the premise extraction, and the simplification step instead of trusting the LLM's conclusion. That's progress. It is not the same as trusting nothing.

One thing to remember ​

Every one of these systems puts the check somewhere the language model cannot edit after the fact: a frozen acceptance threshold, a Lean kernel, an explicit source premise. The verification layer is the product. The agent is the part that's easy to swap.

The Bottom Line ​

If you're building an AI-for-science pipeline that makes empirical claims, copy the spin lab's policy before its architecture. Freeze acceptance criteria at question-selection time and require a separate agent to sign off on theory. That change costs almost nothing and catches the failure mode that ends with a retraction.

If you're building a solver or method-selection system over numerical code, FARMS is the template to steal. At $0.85 to $2.29 per target, the economics work for corpora in the low hundreds, and the source-premise linkage is what saves you from proving statements about the wrong problem. Skip it if your field's results are non-mathematical; there's nothing to extract.

If you're evaluating agents on tasks where the answer is a negative claim (this configuration cannot be reached, this plan cannot succeed), stop scoring them on trajectories and start requiring kernel-checked certificates. AWM's 6-of-6 against 0-of-12 gap on impossible levels is not a benchmark lead. It's a capability that the baseline models don't have at any sample budget, and it will read as a much larger gap once anyone starts measuring for it.