# MechParser: A Vision-Language Framework for Parsing Chemical Reaction Mechanism Diagrams

> MechParser turns curved-arrow diagrams into ordered SM-SMARTS strings of bond and atom-state changes. On 151 real diagrams, its full pipeline scored 76.2% equivalence-aware exact match, using a cleaned copy for structure recognition and the original for arrows.

- arXiv: https://arxiv.org/abs/2612.05340
- Authors: Yufan Chen, Shing Hin Lu, Yujian Yuan, Ching Ting Leung, Hanyu Gao
- Published: 2026-12-04
- Topic: Multimodal
- Visual carousel: https://instaxiv.com/p/2612.05340
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## Can a vision model read reaction arrows as chemistry?

**76.2%** EA-EM, full pipeline on 151 real diagrams

## The product hides the electron-flow sequence

**Net transformation:** Reaction-image parsers extract reactants and products, not the ordered curved-arrow electron flow connecting one step to the next.

**MechParser:** MechParser reads each arrow against an atom-indexed scaffold and records bond and atom-state edits in an ordered string.

## Two views separate arrow reading from atom lookup

![Figure 2](https://cdn.instaxiv.com/figures/2612.05340/figure2.webp)

SAM3 removes arrows from a copy; MolNexTR performs optical chemical structure recognition on it. The original sits beside an indexed redraw for MechParser-VL's arrow prediction, then deterministic code writes cumulative SM-SMARTS. (Figure 2)

## Each arrow edits the previous molecular state

$$
\begin{gathered} S_i=\operatorname{Apply}(\amber{S_{i-1}},a_i) \end{gathered}
$$

Bond symbols ^, ; and _ mark triple, double and single bonds; a separate marker means cleavage, while δ marks formation. α marks donor valence up; γ marks acceptor valence down. Edits accumulate.

- $S_i$: Scaffold after arrow i
- $S_{i-1}$: Cumulative state before arrow i
- $a_i$: The next ordered arrow

## Training progresses from synthetic arrows to real drawings

1. **Single-arrow pretraining**: 200,000 synthetic single-arrow diagrams teach endpoints and output format with the vision tower frozen.
2. **Multi-arrow training**: 100,000 synthetic diagrams with 2–3 arrows train ordered reasoning with the vision tower unfrozen.
3. **Bridge to real drawings**: Mixed-domain fine-tuning combines 3,000 synthetic samples with 620 expert-annotated real diagrams.
4. **Reward-based refinement**: Group Relative Policy Optimization refines on 420 real diagrams with chemistry-aware and format rewards; 151 of 1,191 annotated diagrams are held out for Real-Eval.

## The full 4B recipe beats an 8B flat-SFT control

| Method | EA-EM (%) |
| --- | --- |
| 4B flat SFT: overlay/min. | 41.1 |
| 4B flat SFT: left-right/min. | 49.0 |
| 4B flat SFT: left-right/full | 55.6 |
| 8B flat SFT: left-right/min. | 57.4 |
| **MechParser-VL (4B) (+22.7 pp)** | **80.1** |

_Real-Eval table, seed 1; Qwen3-VL family, LoRA, data/splits shared. Flat SFT lacks curriculum/RL. EA-EM: exact arrows in valid orders._

## On Real-Eval, task training sharpens arrow grounding

**Gemini 2.5 Pro:** Strongest tested zero-shot VLM: 51.7% EA-EM (95% diagram-bootstrap CI [43.7, 59.7]).

**MechParser-VL (4B):** Task-trained: 80.1% EA-EM (95% diagram-bootstrap CI [73.8, 86.4]) with the same prompt and oracle scaffold.

EA-EM matches arrow identity, direction and count exactly, while allowing valid orders.

## Does a separate reference panel help?

**Atom-index overlay + GRPO:** Five-seed mean: 74.17% EA-EM; standard deviation 2.09.

**Left-right + GRPO:** Mean: 79.07%, standard deviation 1.79; paired gain 4.90 points (95% CI [2.26, 7.54]), positive in all five seeds.

GRPO is held fixed; the paired interval excludes zero.

## Arrow removal protects every downstream stage

| Method | OCSR accuracy (%) | SM-SMARTS F1 (%) | EA-EM (%) |
| --- | --- | --- | --- |
| Raw diagram | 57.0 | 42.1 | 33.1 |
| **MechParser after SAM3 cleanup (+43.1 pp EA-EM)** | **93.4** | **84.5** | **76.2** |

_Real-Eval (151 diagrams; seed 1): raw vs SAM3-cleaned input to OCSR, then downstream SM-SMARTS scores. Table: arrow-removal ablation._

## What this result does not establish

- **Single-panel crops**: It starts from a cropped, printed scheme; PDF figure detection and linking multiple panels are not evaluated.
- **Transcription, not validation**: Synthetic arrows are geometrically generated, not chemically checked; the model reads diagrams rather than judging mechanism correctness.
- **Source shift**: The 151-diagram test shares all four sources with training; leave-one-source-out runs scored 3.97 EA-EM points below matched controls on average.

Best used when: Best for converting a cropped printed panel into arrow-step records, with chemical validation supplied separately.

## Key takeaways

- The full pipeline reaches 76.2% EA-EM on 151 held-out Real-Eval diagrams.
- A practical parser should keep the original arrows and provide a separate clean, atom-indexed view for molecule recognition.
- Can mapped panels be linked reliably enough to build literature-scale mechanism data?

## Links

- arXiv: https://arxiv.org/abs/2612.05340
- PDF: https://arxiv.org/pdf/2612.05340
- Code: https://github.com/CYF2000127/MechParser

## Citation

```bibtex
@article{chen2026mechparser,
  title   = {MechParser: A Vision-Language Framework for Parsing Chemical Reaction Mechanism Diagrams},
  author  = {Chen, Yufan and Lu, Shing Hin and Yuan, Yujian and Leung, Ching Ting and Gao, Hanyu},
  journal = {arXiv preprint arXiv:2612.05340},
  year    = {2026},
  url     = {https://arxiv.org/abs/2612.05340}
}
```
