UMR: A Lean-Style Language for Representation and Structural Verification of Organic Reaction Mechanisms

Sirui Shao, Haichuan Tan, Tao Huang, Bowen GaoarXiv 2026

TL;DR

Large language models can fluently explain how a chemical reaction gets from reactant A to product B, even when the underlying physics of their proposed steps don't actually add up. Inspired by the Lean theorem prover in mathematics, the authors created Unified Mechanism Representation (UMR)—an executable programming language that forces AI to explicitly account for every electron movement, catches chemical hallucinations in real time, and lets the model debug its own reaction pathways.

What Problem Does This Paper Address?

In organic chemistry, knowing what you start with and what you end up with is only half the story; understanding the mechanism—the exact step-by-step choreography of breaking bonds and moving electrons—is where the real science happens.

When you ask an LLM to explain a reaction with a known product, it often works backward, stringing together plausible-sounding intermediate molecules. However, if you actually track the electrons, the moves it describes often fail to connect one intermediate to the next. The authors call this a spurious mechanism: a chemically fluent narrative built on broken bookkeeping. Existing molecular formats (like SMILES strings) only record static molecular graphs without tracking electron flow, or are restricted to basic reaction types without offering real-time error feedback.

Methods

Just as the Lean proof assistant checks mathematical arguments line by line against formal axioms, UMR turns organic reaction mechanisms into executable, verifiable code.

  • Persistent State Tracking: UMR assigns permanent IDs to atoms and tracks valence electrons, lone pairs, bonds, and formal charges on Lewis structures—plus oxidation states and ligands for metals.
  • Unified Elementary Events: Instead of just guessing the next molecule, the LLM writes explicit electron-pushing instructions (like PAIR for moving lone pairs, SPLIT for breaking bonds, or FISHHOOK for single-electron radical moves). Remarkably, polar, radical, pericyclic, and organometallic reactions all share this exact same syntax.
  • Execution and Local Repair: An independent executor runs the proposed instructions against the current molecular state, checking electron and material conservation. If an action violates chemical rules (e.g., breaking an octet or missing a concerted bond-breaking step), the executor rejects it with a specific diagnostic error, allowing the LLM to revise its code from the last valid intermediate rather than starting over.
Four types of chemical events written as executable UMR code, showing electron movement and resulting structures.

Datasets

The authors did not train a new model, instead evaluating inference and representation coverage across two fronts:

  • Named-Reaction Catalogues (New UMR Corpus): To prove UMR's expressiveness, the authors encoded all 278 entries from Jie Jack Li’s Name Reactions and all 250 chapters from Kürti and Czakó’s Strategic Applications of Named Reactions in Organic Synthesis, linking 528 textbook entries into 321 verified, executable UMR programs.
  • FukuyamaBench: For LLM evaluation, they used the 319 known-product problems in FukuyamaBench, spanning introductory (78), graduate-level (131), and research-lab (110) difficulty.

Key Insights and Ideas

  • Chemistry as Formal Verification: Treating electron-pushing arrows as state-transition functions exposes silent structural errors. For instance, in one case study, the baseline LLM wrote text claiming it formed a double bond, yet submitted a SMILES string containing a single bond and two accidental, unflagged radicals. UMR caught and prevented this immediately.
  • Compositional Hierarchy: Because UMR is programmatic, mechanisms scale cleanly across levels of abstraction—from single electron actions, to elementary events, to reusable "basic transformations" (like an $\text{S}_\text{N}2$ step), all the way up to complex catalytic cycles like the Larock indole synthesis.
  • Validity $\neq$ Selectivity: A crucial philosophical insight of the paper is where the Lean analogy stops. In math, any valid proof settles the theorem. In chemistry, multiple pathways can be structurally valid (obeying all electron-counting rules), while experimental conditions (solvents, temperature, sterics) dictate which pathway actually dominates in the flask.

Key Results

Testing gpt-6.2-astra on FukuyamaBench (requiring an exact, ordered match of every reference intermediate checkpoint):

  • Overall Accuracy Boost: Complete-pathway accuracy rose from 19.4% (62/319) using standard SMILES output to 26.0% (83/319) with UMR and its interactive executor—a net gain of 21 solved mechanisms.
  • Gains by Difficulty: Introductory problems saw the biggest jump, climbing from 29.5% to 47.4% (+14 problems). Graduate-level accuracy rose from 22.9% to 26.7% (+5), and research-lab problems ticked up from 8.2% to 10.0% (+2).
Accuracy comparison across FukuyamaBench difficulty tiers showing UMR outperforming direct prediction.
  • 100% Replayability: Every single one of the 306 submitted UMR pathways (1,993 elementary events) successfully replayed without structural or electron-balance violations, even when the model chose the wrong chemical pathway (223 cases).

Limitations and Future Work

  • Token Overhead: Interactive verification isn't cheap. The UMR workflow consumed ~83.6M metered tokens across 3,602 tool requests (median ~213k tokens/question), compared to just ~1.2M tokens total (median 3,675/question) without UMR. Furthermore, 13 UMR runs scored zero due to missing or unconfirmed submissions within budget ceilings.
  • Chemical Selectivity: UMR verifies if a path is chemically legal, not whether nature prefers it. Of 306 structurally valid UMR paths, 223 still missed reference checkpoints because the model picked the wrong reacting site, species, or event order.
  • Next Steps: The authors plan to pair UMR's branch-saving capabilities with selectivity-aware models that rank competing, structurally verified pathways based on reagents and stereochemistry—eventually tackling forward product prediction and retrosynthesis.

Summary updated

BibTeX
@misc{shao2026umr,
  author = {Sirui Shao and Haichuan Tan and Tao Huang and Bowen Gao},
  title = {{UMR: A Lean-Style Language for Representation and Structural Verification of Organic Reaction Mechanisms}},
  year = {2026},
  eprint = {2611.36803},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.36803},
}
Figure