MolLean: A Process-Verifiable Language for Chemical Reasoning
Jiatong Li, Yatao Bian
cs.CL
Oct 14, 2026 · v1
cs.CE cs.PL
TL;DR
Implements a Lean kernel that checks molecular state transitions and structural assertions for LLM chemical reasoning, with Lean-proved soundness of valence and connectivity validation.
Abstract
Chemical chain-of-thought can contain hallucinated structural and property claims. We thereby introduce MolLean, a process-verifiable language that grounds chemical reasoning in an explicit molecular state. A layered Lean-based kernel checks state transitions and assertions over molecular readouts, from primitive graph edits to compound transformations. Meanwhile, a typed witness protocol separates native structural checks from externally supplied measurements. We further introduce MolLean-MCP, a stateful tool interface that exposes these transitions, checks, and readouts during generation: the model receives feedback to decide its next action, and rejected actions leave the state unchanged. MolLean supports one-pass trace execution, whole-trace refinement, and interactive reasoning through MolLean-MCP. We evaluate these three modes with direct chain-of-thought on 8,800 matched examples across 12 tasks spanning molecular generation, editing, optimization, and reactions. With Qwen3.6-27B, whole-trace refinement outperforms direct chain-of-thought on all 12 tasks. MolLean-MCP complements whole-trace refinement with stepwise verification feedback, reaching better performance in reaction tasks. Together, these results highlight an executable foundation for chemical reasoning, in which explicit chemical commitments can be checked and revised rather than remaining solely in free-form explanations.
Problem
Chemical chain-of-thought produced by language models can contain hallucinated structural and property claims, such as absent functional groups, lost bonds, or unproven property improvements. Free-form explanations offer no mechanism to check these claims.
Approach
MolLean is a process-verifiable language grounded in an explicit molecular state. A layered Lean kernel checks transitions (graph edits, compound transformations) and native structural assertions, and Lean proves soundness properties for valence and connectivity validation. A typed witness protocol lets external providers such as RDKit supply descriptor measurements, to which Lean applies predicates. Python handles parsing and orchestration, and MolLean-MCP exposes stateful tools for interactive generation. One-pass, whole-trace refinement, and MCP modes are compared against direct chain-of-thought.
Results
On 8,800 examples across 12 tasks with Qwen3.6-27B, whole-trace refinement outperforms direct chain-of-thought on all 12 tasks. MCP gives the best results on forward reaction and retrosynthesis. Qwen3-4B also gains substantially on structural tasks.
| Task | CoT | One-pass | Refine | MCP |
|---|
| Atom counts | 42.0 | 61.4 | 88.8 | 82.6 |
| QED optimization | 24.8 | 41.1 | 59.0 | 49.4 |
| Forward reaction | 35.0 | 23.6 | 62.8 | 66.4 |
| Retrosynthesis | 3.0 | 11.6 | 20.8 | 27.4 |
| ChEBI-20 text to molecule | 18.1 | 25.3 | 33.1 | 23.5 |
Accuracy (%) with Qwen3.6-27B on selected tasks