Manuscript Offprint
arXiv:2611.12013Enhancing Multi-Step Chemical Mechanism Prediction with Graph-Guided Preference Data
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Yu Zhang
Shanghai Jiao Tong University
Shanghai, China
Ruijie Yu
Shanghai Jiao Tong University
Shanghai, China
Xuelin Zhao
Shanghai Jiao Tong University
Shanghai, China
Jinming Yang
Shanghai Jiao Tong University
Shanghai, China
Feng Zhu
Shanghai Jiao Tong University
Shanghai, China
Xiaokang Yang
Shanghai Jiao Tong University
Shanghai, China
Yaohui Jin
Shanghai Jiao Tong University
Shanghai, China
Yanyan Xu
Shanghai Jiao Tong University
Shanghai, China
Abstract
Predicting multi-step chemical reaction mechanisms requires identifying plausible intermediates and correctly ordering the elementary reaction steps. Existing computational methods focus on single-step elementary reaction prediction, limiting their ability to generalize to unseen reaction spaces. We introduce a graph-guided framework for multi-step chemical mechanism prediction that leverages a chemical mechanism knowledge graph (ChemMechKG) to guide large language models (LLMs). To improve pathway prediction, we develop a graph-aligned reaction mechanism predictor (GRMP) that uses graph neural networks to generate synthetic candidate pathways for pathway optimization. During inference, we design a relation retrieval (RR) module to extract relevant graph evidence from the KG for pathway refinement. Experiments show that GRMP achieves the highest pathway accuracy among all compared methods on ChemMechQA and oMe-Gold, reaching 48.1% and 57.9%, respectively. On a fixed sample of 110 out-of-distribution reactions from ChemMechQA-Hard, GRMP achieves 36.4% top-1 pathway accuracy. LLM-as-Judge and human assessment further demonstrate its ability to generalize to unseen reactions. Code and data are available in the grmp.
1 Introduction
In organic chemistry, a reaction mechanism is a theoretical trajectory mapping electron redistribution during a chemical transformation. Chemists rely on reaction mechanisms as a foundational framework for predicting outcomes, typically represented using "arrow pushing" formalism [21]. By sequentially applying arrow-pushing logic to reactants, elementary intermediates are generated until final products are reached. However, due to the exponentially expanding search space of potential pathways, proposing accurate multi-step mechanistic routes remains a daunting challenge even for experienced domain experts.
Traditional methods for mechanism prediction involve three stages: (1) developing rule-based template systems to encode expert knowledge and label mechanistic data [2, 4, 18]; (2) retraining end-to-end machine learning models on mechanism data for single-step elementary reaction prediction [29]; (3) developing deep learning-based or generative methods to model electron redistribution to adhere to fundamental physical laws for single-step elementary reaction prediction [5, 17]. However, these methods are inherently constrained by their reliance on single-step elementary reaction data. Consequently, they are unable to extrapolate across complex, multi-step mechanistic pathways, even failing to generalize to unseen reactions where the mechanistic logic deviates from known training patterns.
Recent advances in large language models (LLMs) have demonstrated remarkable reasoning capabilities across diverse chemical domains [9, 22, 35]. Nevertheless, current LLM-based applications in mechanism prediction remain predominantly confined to simplified multiple-choice selection tasks, leaving true multi-step mechanistic generation virtually unexplored [11]. This gap stems from a fundamental bottleneck: multi-step mechanistic prediction requires complex, long-chain scientific reasoning, where standard LLMs severely struggle with structural hallucinations and a deficiency in chemical grounding [13, 14, 25, 32]. To mitigate hallucinations in long-chain reasoning, Knowledge Graph (KG) integration has emerged as a promising paradigm to anchor LLMs with factual domain knowledge. However, existing KG-augmented approaches falter when directly deployed in complex chemical spaces. Extracting multi-hop mechanistic pathways from dense chemical graphs introduces substantial topological noise.
To address these issues, many studies have integrated Knowledge Graphs (KGs), which encapsulate factual information in a structured format, to improve the reasoning abilities of LLMs. However, existing KG-augmented approaches fail when directly deployed in complex chemical spaces. Extracting comprehensive, multi-hop mechanistic pathways from a chemical graph introduces severe topological noise. Conversely, shallow retrieval is insufficient for governing chemical steps, leaving downstream LLMs under-informed and still prone to cascading hallucinations.

Figure 1: An illustration of our proposed framework. It contains GRMP, a graph-aligned LLM predictor, and a Relation Retrieval (RR) verifier for the mechanism pathway prediction and reasoning.
To bridge this gap, we construct the Chemical Mechanism Knowledge Graph (ChemMechKG) by enriching reaction sequences with inferred intermediates derived from expert-validated elementary reaction templates. Building on ChemMechKG, we propose a graph-guided framework for multi-step chemical mechanism prediction (Figure 1). Specifically, we develop a GNN-based pathway generator to construct synthetic preference pairs for optimizing a graph-aligned reaction mechanism predictor (GRMP) via direct preference optimization (DPO). During inference, we design a relation retrieval (RR) module to extract relevant graph evidence from the KG for pathway refinement. Evaluations on ChemMechQA and oMe-Gold demonstrate that our framework achieves the highest pathway accuracy among the evaluated methods, while additional ablation studies investigate its generalization to held-out reaction classes and mechanism templates.
The main contributions of this work are as follows:
- We construct ChemMechKG, a knowledge graph that enriches raw reaction data with imputed intermediates using expert-curated templates.
- We propose a graph-guided framework for multi-step chemical mechanism prediction, in which GCN-generated candidate pathways provide synthetic preference data for pathway optimization.
- We conduct extensive experiments and human evaluation, demonstrating that GRMP achieves state-of-the-art performance and generalizes effectively to unseen reactions.
Synthetic data for LLM Training. Synthetic data generation plays a pivotal role in expanding LLM capabilities beyond human-annotated corpora [19]. Conventional selection strategies frequently filter synthetic data based on model confidence, prioritizing high-probability generations [12, 15]. However, recent studies demonstrate that such a strategy yields diminishing marginal information gains and exacerbates model bias. Consequently, contemporary paradigms advocate for balanced curriculum mining, strategically incorporating both low-uncertainty ("easy") and high-uncertainty ("hard") samples to maximize training efficiency [27, 36]. Nevertheless, systematically identifying informative samples remains non-trivial, particularly in complex scientific domains.
3 Preliminary
Chemical mechanism pathway. A chemical reaction transforms reactants under given conditions into final products . We distinguish the molecular-state pathway from its auxiliary elementary-template sequence . The -th elementary step is . Each is a molecular state represented by SMILES and may contain multiple dot-separated chemical components; is a reaction template represented by SMARTS.
In ChemMechKG, molecular states and templates are distinct entity types, and , with . The corresponding annotated graph walk is . We use for a generic entity at graph position , so that and . Graph relations label the edges between these entities and are distinct from the template entities . Thus, a pathway with elementary chemical steps has graph hops and entity positions. GRMP generates the molecular-state pathway during training and inference.
ChemMechQA. We frame multi-step mechanism prediction as a specialized QA task over . Given a natural language query , specifying the initial molecular state , the objective is to learn a function that predicts a mechanistic pathway anchored in , such that .
4 Methods
4.1 ChemMechKG Curation
We build our mechanistic dataset on the processed Pistachio database [23], containing 15 million reactions. Building on the previous methodology for imputing mechanistic pathways [18], we derive structured mechanistic pathways from 50,000 experimentally reported reactions using 676 expert-annotated reaction templates proposed by [17]. All mechanistic data are automatically reviewed and cleaned to enhance their consistency and reliability.
We define reaction templates and molecules as entities and labeled molecule-template connections as relations to construct ChemMechKG (Figure 2). This yields 247,832 entities: 247,156 molecule nodes and 676 template nodes. Unlike datasets centered on isolated elementary steps, ChemMechKG provides pathway-level annotations of ordered intermediates, mechanism templates, natural-language descriptions, and reaction conditions in SMILES format. Details of our KG are in Table 5 and Table 6. For model development, we extract the shortest reasoning paths, defined as sequences of consecutive triplets: , where , , and to construct ChemMechQA. Notably, all molecules and intermediates are excluded from the KG during model inference to avoid data leakage.
4.2 GCN for Pathway Prediction
We employ a query-dependent Graph Neural Network (GNN) model to learn the topological dependencies within ChemMechKG and predict the mechanism pathway. Our implementation uses a two-layer graph convolutional network (GCN) [20] encoder with a multilayer perceptron (MLP) decoder. Based on the definitions in the preliminary, we map each entity node to an initial textual embedding using a pre-trained text embedding model [3].
Algorithm 1 Pair-Wise Synthetic Preference Data Construction
Require: Annotated training set ; graph
Require: Trained GCN predictor and SFT model ; graph-hop limit ;
Ensure: Preference dataset and companion reference SFT data
1: Initialize GCN-preferred set and reference-preferred set to
2: for do
3: Generate from
4:
5: Generate GCN molecular-state pathway using within graph hops
6: if reaches the annotated product then
7: Retain ; set
8: else
9: Discard as a preference candidate
10: end if
11: if a retained GCN candidate exists and then
12: Add to
13: else if then
14: Add to
15: end if
16: end for
17: Approximately balance pair types by downsampling excess pairs in
18: Form from by deduplicating triples and serializing for DPO
19: Save corresponding as companion SFT data, deduplicated by reaction
20: return and the companion SFT data
We designate the reactant nodes in the input query as query-relevant nodes, denoted . The query-conditioned initial node representation is defined as:
where is the query embedding derived from the input reactant SMILES, denotes the indicator function, and is a single-layer MLP that fuses the intrinsic node embedding with the query vector for query-relevant nodes, while leaving non-query nodes unchanged. We then perform message-passing layers over the entity graph. At each layer , the embedding of node is updated by aggregating features from its localized neighborhood:
where represents the set of incoming messages from neighboring entities. The message function parameterizes the interaction between connected entities as an element-wise product:
where denotes element-wise multiplication. The function aggregates neighbor messages, and non-linearly combines them with the previous node representation.
We construct pathways by iteratively selecting and applying reaction templates. The two-layer MLP decoder assigns an edge score to the current molecular state and each candidate template , using the query-conditioned GCN representations. During training, the encoder and decoder are optimized with a

Figure 2: The distribution of our curated ChemMechQA.
binary edge-classification loss that distinguishes positive from negative edges. During inference, we normalize the candidate template scores:
We select the highest-scoring template and apply its SMARTS transformation to to generate the next molecular state . Repeating template selection and application constructs the pathway until termination or the predefined maximum graph-hop threshold is reached. The resulting alternating molecule-template sequence is denoted by . Its molecular-state subsequence provides candidate responses for the preference construction described below.
4.3 Graph-Aligned LLM for Mechanism Prediction (GRMP)
Given a chemical reasoning prompt and an initial molecular state identified within , GRMP predicts an ordered molecular-state pathway , as defined in the preliminary. Let denote the molecular-state subsequence of the shortest annotated walk in ChemMechKG. Reaction templates provide graph information but are not included in the LLM output. The workf
Supervised fine-tuning (SFT) stage. We first apply SFT [24] to learn these annotated pathways. Let be its reference token sequence. For target tokens, the objective is:
where denotes the SFT model parameters.
Graph-grounded synthetic data for preference optimization. For each training reaction, we extract all molecular-state subsequences of the SFT model and GCN-derived pathways to ensure they share the same format. GCN-derived pathways provide synthetic and diverse candidate pathways for constructing pair-wise preference data.
Below, and denote these SFT and GCN molecular-state pathways, respectively. We extract intermediates from each candidate and the reference, canonicalize them, and compute their multiset matching rates against the reference. Let be the multiset of canonicalized intermediates in , and the multiplicity of intermediate . The intermediate matching rate is reference-normalized multiset recall:
We define a criterion for preference selection termed the intermediate recall: and . This score measures intermediate coverage without encoding step order.
Based on this criterion, we construct two types of preferred-rejected pairs using different thresholds and . The workflow of synthetic data selection is in Algorithm 1. A GCN-preferred pair is formed when . A reference-preferred pair is formed when . If a reaction satisfies both conditions, we retain only its GCN-preferred pair. We downsample excess reference-preferred pairs to approximately balance the two types, then deduplicate by the triple, where and are the preferred and rejected responses. Finally, we use the resulting pairs to construct for DPO training.
Preference Optimization. Starting from the SFT model, we optimize the target policy using DPO [26], with the frozen SFT model as :
Here, denotes the probability of the serialized molecular-state pathway. The function is the sigmoid function and scales the preference term. The objective favors reference pathways or GCN alternatives selected for greater intermediate coverage over the SFT candidates.
4.4 Relation Retrieval for Inductive Reasoning
During inference, the RR module extracts factual triplets as structural priors for inductive reasoning. Given an input reaction query , GRMP generates a candidate molecular-state pathway . For each state , entity linking selects a molecular-state node using Tanimoto similarity:
The linked nodes form the anchor set . For each anchor , we retrieve the relation triplets in its -hop graph neighborhood . Here, counts graph edges rather than elementary chemical steps; the retrieved neighborhoods can include both molecular-state and template nodes. Finally, the retrieved triplets guide the general-purpose LLM to generate the final pathway , using the prompt in Appendix:
Leakage-controlled retrieval. Before retrieval, we remove the molecule nodes and incident edges associated with each test reaction from ChemMechKG, preventing RR from directly accessing its annotated pathway.
5 Experiments
Our experiments aim to address the following research questions (RQs):
(1) RQ1: How does GRMP compare with the general-purpose LLMs and prediction baselines?
(2) RQ2: How do the key components of GRMP contribute to generalization on unseen reactions?
(3) RQ3: How sensitive is performance to preference thresholds, node embeddings, and pathway length?
(4) RQ4: How do automated and human assessments characterize pathway plausibility?
5.1 Experimental Setup
Datasets. We evaluate on ChemMechQA, our primary dataset constructed directly from ChemMechKG, oMe-Gold (196 literature-verified pathways) [34], and ChemMechQA-Hard. ChemMechQA-Hard comprises 2,009 reactions drawn from eleven held-out reaction classes and 24 unseen mechanism templates, providing an out-of-distribution (OOD) evaluation setting. We conduct an ablation study and human evaluation using a fixed 110-reaction sample from ChemMechQA-Hard. Dataset statistics appear in Appendix A.
Baselines and metrics. We compare nine LLM configurations and three mechanistic baselines in three categories: 1) LLM reasoning methods, 2) mechanistic models including Reacton [5], FlowER [17], and Graph2SMILES [18], and 3) our graph-aligned method. Following prior work [17, 18], we report Validity, Main Product Accuracy (MPA), Intermediate Hit (I-hit), Pathway Accuracy (PA), and Sequence Rank (SR). PA measures exact pathway matching. MPA is evaluated from the final responses of model generation. Full metric definitions appear in Appendix B.
Implementation. We utilize Qwen2.5-7B-Instruct as the foundation model. For LLM training in both the SFT and DPO stages, we adopt LoRA-based fine-tuning. The batch size for SFT is set to 4, and the learning rate is set to 5e-6. To construct synthetic data for preference optimization, we design a two-layer GCN [20] with BGE embeddings [3] that follows an encoder-decoder architecture. We use 2× A6000-48G GPUs for training. During inference, our framework includes Gemini-3.1-Pro for final refinement. Gemini generates separate candidate sets for each k, so top-k scores need not be monotonic. Experimental settings and hyperparameters are detailed in Appendix B.
5.2 Main Results (RQ1)
We evaluate the mechanism prediction performance of GRMP against state-of-the-art baselines across two benchmark datasets: ChemMechQA and oMe-Gold. Table 1 reports top-1 results. Notably, GRMP represents our proposed graph-aligned LLM utilizing our two-stage training but without inductive reasoning. GRMP (Gemini-3.1-Pro) achieves the highest reported Pathway Accuracy (PA) among the evaluated configurations on both datasets: 48.1% on ChemMechQA and 57.9% on oMe-Gold. Besides, our method outperforms the strongest mechanistic baseline (Graph2SMILES, 33.5% PA) by 14.6 percentage points on ChemMechQA. While general-purpose LLMs like Gemini-3.1-Pro and DeepSeek-V4-Pro exhibit high SMILES validity (up to 95.0%), their full-pathway accuracy remains poor, frequently falling at or below 10.0%. Therefore, high molecular validity does not imply accurate reconstruction of complete pathways. On the independent, literature-verified oMe-Gold benchmark, Graph2SMILES and Reacton each achieve 5.2% PA. These results indicate limited generalization capabilities for the two evaluated mechanistic models on this benchmark. Instead, our method achieves 57.9% PA on oMe-Gold, exceeding Gemini-3.1-Pro (34.9%) by 23.0 percentage points and GPT-5.2 + CoT (36.9%) by 21.0 percentage points. Further, GRMP without final LLM refinement also achieves 41.8% PA.
Next, we stratify ChemMechQA by the number of elementary steps : Easy ( ), Medium ( ), and Hard ( ). Table 2 shows that Graph2SMILES leads in Easy PA (62.1%), but
Table 1: Overall performance on ChemMechQA and oMe-Gold. For general-purpose LLMs, results are averaged over five runs, each using a randomly sampled subset of 200 samples from ChemMechQA. GRMP* excludes final general-purpose LLM refinement. Bold and underline indicate the best and second-best performance for each metric.
| Method | ChemMechQA ↑ | oMe-Gold ↑ | ||||||
|---|---|---|---|---|---|---|---|---|
| Validity (%) | MPA (%) | I-hit (%) | PA (%) | Validity (%) | MPA (%) | I-hit (%) | PA (%) | |
| General LLMs for mechanism reasoning | ||||||||
| GPT-5.2 [28] | 70.3±0.09 | 10.0±0.09 | 8.1±0.51 | 5.0±0.22 | 90.1 | 23.1 | 29.1 | 23.6 |
| GPT-5.2 + Few-shot [33] | 78.9±0.85 | 13.1±0.27 | 13.0±0.00 | 0.0±0.35 | 90.6 | 17.8 | 11.3 | 18.3 |
| Gemini-3.1-Pro [31] | 90.1±0.30 | 52.2±0.20 | 7.3±0.31 | 10.0±0.27 | 90.5 | 57.8 | 37.9 | 34.9 |
| DeepSeek-V4-Pro [8] | 95.0±0.24 | 48.0±0.30 | 12.9±1.01 | 5.0±0.40 | 87.6 | 45.3 | 25.0 | 22.5 |
| Llama-3.1-8B [10] | 40.0±0.77 | 0.0±0.00 | 0.81±0.00 | 0.0±0.00 | 73.5 | 12.6 | 3.3 | 2.7 |
| Qwen2.5-7B [16] | 55.5±0.50 | 1.0±0.00 | 1.0±0.22 | 0.0±0.00 | 58.4 | 14.9 | 4.7 | 3.2 |
| ChemDFM [37] | 44.2 | 0.0 | 0.0 | 0.0 | 17.4 | 0.0 | 0.0 | 0.0 |
| Mechanistic models for multi-step mechanism prediction | ||||||||
| Reactron [5] | 93.0 | 68.6 | 29.3 | 11.8 | 91.8 | 8.6 | 33.6 | 5.2 |
| Graph2SMILES [18] | 96.7 | 61.9 | 37.6 | 33.5 | 93.9 | 7.0 | 28.3 | 5.2 |
| FlowER [17] | 100.0 | 51.8 | 31.4 | 27.2 | - | - | - | - |
| Graph-aligned framework | ||||||||
| GRMP* (w/o general LLMs) | 92.1 | 48.3 | 50.3 | 36.9 | 83.4 | 53.6 | 61.3 | 41.8 |
| GRMP (Gemini-3.1-Pro) | 93.9 | 67.8 | 64.3 | 48.1 | 89.3 | 73.8 | 63.6 | 57.9 |
its PA falls to 11.2% on Hard reactions. On Hard reactions, GRMP* achieves 29.0% PA and 67.1% SR; refinement increases these to 32.0% and 73.1%. However, we notice that the gains are metric-dependent: refinement slightly reduces PA from 42.0% to 41.6% on Medium reactions. Overall, these results highlight the advantages of GRMP* over conventional baselines on complex, multi-step reactions, while indicating that the benefits of refinement vary across difficulty levels and evaluation metrics.
5.3 Ablation Study (RQ2)
As reported in Table 3, we evaluate four variants, including base predictors, LLM refinement, DPO parameters, and RR configurations on the fixed 110-reaction samples from ChemMechQA-Hard. We make the following observations:
Foundational models. Qwen2.5-7B consistently outperforms Llama-3.1-8B under the setting of w/o LLM refinement, achieving higher top-1 I-hit (19.9% vs. 11.3%), and MPA (14.5% vs. 11.8%). This superiority persists when paired with Gemini-3.1-Pro (30.9% vs. 21.8% top-1 MPA). These comparisons support Qwen2.5-7B as the base predictor among the two evaluated backbones.
LLM refinement. Integrating LLM refinement improves MPA in the reported comparisons, but its effect on PA depends on the base model and refiner itself. For the SFT-only predictor, integrating Gemini-3.1-Pro with Qwen2.5-7B boosts MPA from 14.5% to 30.9% at top-1, while PA remains 12.7%. For the GRMP* with Gemini-3.1-Pro, it substantially enhances top-1 MPA from 35.4% to 49.1% and top-1 PA from 27.2% to 34.5%.
DPO provides the largest sequential gain for predicting mechanism pathways. To isolate the contribution of graph-guided
Table 2: Performance comparison across different reaction complexities on ChemMechQA. Bold and underline indicate the best and second-best performance for each difficulty level.
| Method | MPA (%)↑ | I-hit (%)↑ | PA (%)↑ | SR (%)↑ |
|---|---|---|---|---|
| Easy Complexity | ||||
| FlowER | 63.6 | 57.0 | 53.5 | 60.5 |
| Graph2SMILES | 73.4 | 64.2 | 62.1 | 67.4 |
| GRMP* | 64.2 | 40.9 | 32.4 | 62.3 |
| GRMP | 70.8 | 71.4 | 57.2 | 67.5 |
| Medium Complexity | ||||
| FlowER | 54.0 | 31.2 | 24.5 | 38.9 |
| Graph2SMILES | 65.0 | 38.6 | 31.6 | 46.0 |
| GRMP* | 55.7 | 60.4 | 42.0 | 81.6 |
| GRMP | 67.3 | 68.9 | 41.6 | 86.0 |
| Hard Complexity | ||||
| FlowER | 38.8 | 23.3 | 7.8 | 35.1 |
| Graph2SMILES | 48.1 | 28.1 | 11.2 | 43.1 |
| GRMP* | 37.1 | 41.9 | 29.0 | 67.1 |
| GRMP | 38.1 | 41.1 | 32.0 | 73.1 |
preference construction, we compare our approach with a reference-only DPO baseline that constructs preference pairs directly from reference pathways and incorrect SFT predictions. The results show that reference-only DPO achieves a top-1 PA of only 5.5%, compared with 27.2% for graph-guided DPO, an absolute improvement of 21.7
Table 3: Ablation study on the components of GRMP using fixed 110-reaction samples from ChemMechQA-Hard, where the best results are in bold.
| Configuration(Components of methods) | Validity (%) ↑ | I-hit (%) ↑ | MPA (%) ↑ | PA (%) ↑ | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Top-1 | Top-3 | Top-5 | Top-1 | Top-3 | Top-5 | Top-1 | Top-3 | Top-5 | Top-1 | Top-3 | Top-5 | |
| Mechanistic models | ||||||||||||
| FlowER | 100.0 | 100.0 | 100.0 | 18.6 | 19.0 | 20.2 | 14.6 | 14.6 | 14.6 | 10.9 | 10.9 | 10.9 |
| Graph2SMILES | 89.1 | 90.9 | 90.9 | 15.7 | 17.7 | 18.2 | 12.7 | 14.6 | 14.6 | 7.3 | 9.1 | 9.1 |
| Ablation of general LLMs (SFT-only predictors; w/o DPO, w/o RR) | ||||||||||||
| SFT-only predictor: Llama-3.1-8B | ||||||||||||
| w/o LLM refinement | 66.7 | 70.0 | 72.7 | 11.3 | 12.5 | 13.2 | 11.8 | 12.7 | 13.6 | 8.2 | 9.1 | 10.0 |
| + GPT-5.2 | 88.4 | 90.0 | 90.9 | 23.0 | 25.0 | 25.8 | 14.5 | 16.4 | 18.2 | 6.4 | 7.3 | 8.2 |
| + Gemini-3.1-Pro | 90.0 | 92.7 | 93.6 | 25.4 | 29.2 | 30.5 | 21.8 | 24.5 | 26.4 | 10.0 | 10.9 | 11.8 |
| SFT-only predictor: Qwen2.5-7B | ||||||||||||
| w/o LLM refinement | 85.4 | 90.6 | 94.5 | 19.9 | 20.7 | 21.0 | 14.5 | 20.0 | 21.0 | 12.7 | 12.7 | 13.6 |
| + GPT-5.2 | 88.0 | 91.8 | 92.7 | 25.8 | 28.5 | 30.1 | 24.5 | 26.3 | 28.2 | 7.3 | 10.9 | 12.7 |
| + Gemini-3.1-Pro | 90.3 | 93.6 | 94.5 | 28.4 | 28.2 | 29.5 | 30.9 | 33.6 | 33.6 | 12.7 | 12.7 | 13.6 |
| Ablation of training components (Qwen2.5-7B; w/o RR) | ||||||||||||
| w/ DPO (reference-only) | 78.2 | 80.0 | 85.4 | 14.1 | 24.6 | 28.2 | 3.6 | 7.3 | 9.1 | 5.5 | 12.7 | 12.7 |
| w/ DPO (α = 0.3, β = 0.3) | 93.6 | 93.6 | 96.3 | 23.0 | 25.8 | 29.4 | 35.4 | 36.3 | 38.2 | 27.2 | 36.3 | 36.3 |
| Ablation of relation retrieval components (Qwen2.5-7B + DPO; w/ Gemini-3.1-Pro) | ||||||||||||
| GRMP* | 96.4 | 96.4 | 96.4 | 29.8 | 38.3 | 38.4 | 49.1 | 52.7 | 52.7 | 34.5 | 34.5 | 34.5 |
| GRMP (w/ RR, template-hidden KG) | 90.9 | 93.6 | 93.6 | 34.7 | 40.3 | 40.7 | 66.4 | 70.9 | 75.5 | 37.3 | 38.1 | 40.9 |
| GRMP (w/ RR, standard KG) | 89.3 | 96.3 | 96.3 | 34.8 | 40.9 | 46.6 | 66.4 | 72.7 | 76.3 | 36.4 | 38.2 | 38.2 |
percentage points. Next, we discuss the contribution of DPO for the prediction performance. Compared with GRMP (SFT-only) without final LLM refinement, DPO with α = β = 0.3 raises top-1 MPA from 14.5% to 35.4% and PA from 12.7% to 27.2%, respectively. Collectively, using GCN-derived synthetic preference pairs for DPO training effectively improves OOD generalization, providing a structurally aligned foundation for subsequent LLM verification.
The RR module primarily improves intermediate and product prediction. For each prediction query, the standard RR refers to retrieving a KG that excludes its own reference pathway. Template-hidden KG additionally excludes the 24 held-out template nodes and their related edges. Compared to the GRMP* (w/o RR), RR with template-hidden KG raises top-1 I-hit from 29.8% to 34.7% and MPA from 49.1% to 66.4%, respectively. Compared to GRMP* (w/o RR), top-1 PA increases from 34.5% to 37.3% with template-hidden RR and to 36.4% with standard RR. These consistent gains confirm that incorporating external mechanistic knowledge via relation retrieval provides critical structural priors, effectively constraining search spaces and guiding the LLM toward globally coherent reaction pathways.
5.4 Sensitivity and Failure Analyses (RQ3)
Based on the ablation study results, we conduct sensitivity analysis of the DPO threshold parameters (α, β ∈ [0.2, 0.4]) and GCN embeddings, respectively.

Figure 3: Top-1 PA and MPA (%) for nine preference-threshold configurations on the 110-reaction OOD samples. Both metrics are highest at α = β = 0.3 among the evaluated settings.
Preference thresholds. As we discussed before, increasing α selects fewer GCN-preferred pairs with larger intermediate-recall gains over SFT predictions, whereas increasing β broadens the candidate pool for reference-preferred pairs. Therefore, we design nine configurations where α, β ∈ [0.2, 0.4] for sensitivity analysis. In Figure 3, the highest observed PA and MPA occur at α = β = 0.3 (27.2% and 35.4%). At (0.2, 0.4), both scores fall to 5.45%. Increasing α to 0.4 with β = 0.3 yields 18.1% PA and 22.7% MPA. These results favor moderate selection thresholds, with both more permissive and more restrictive settings yielding lower PA and MPA than in the evaluated configurations.
GCN embeddings. We evaluate the effectiveness of embeddings used for the GCN predictor on ChemMechQA. Note that we do not evaluate it on OOD reactions because standard GCN models exhibit severely degraded performance across all embedding variants in OOD regimes. Figure 4a compares 3D molecular embeddings (Uni-Mol) against textual semantic embeddings (BGE) alongside our complete GRMP* across reaction complexities (Easy, Medium, Hard). Text-based BGE embeddings consistently outperform Uni-Mol across all complexities for the isolated GCN module (e.g., 39.8% vs. 2.1% MPA on Easy, 11.4% vs. 0.0% MPA on Medium, and 2.0% vs. 0.0% MPA on Hard). Building upon BGE's superior semantic representation, our integrated GRMP* achieves substantial reasoning gains, reaching 64.2%, 37.7%, and 12.2% PA on Easy, Medium, and Hard tasks, respectively. Although full PA naturally decreases as reaction complexity grows due to step-wise error propagation, BGE's strong domain alignment makes it the optimal structural foundation for our predictor.
a GCN emb. (dataset, ChemMechQA)

b Low-recall cases (I-hit < 50%)

Figure 4: GCN embedding comparison and failure-case analysis on ChemMechQA. (a) The performance of GCN with different embeddings and our GRMP* across different reaction complexities; (b) Failure-case analysis and optimization results of our GRMP*.
Failure cases analysis across pathway lengths. Defining failure cases as samples with I-hit below 50% in the initial GRMP* predictions, we select a 90-subset from ChemMechQA to investigate model robustness. Figure 4b analyzes MPA and PA metrics across elementary steps, comparing baseline methods and our proposed framework GRMP. For the unrefined predictor GRMP*, performance remains consistently low across all step counts. However,
incorporating LLM refinement (GRMP) dramatically improves these failure cases across all steps. GRMP achieves perfect MPA (100.0%) at Step 3 and Step 5 and maintains a notable PA lead over both G2S and GRMP* on short-to-medium sequences (e.g., 60.0% PA at Step 1 and 30.0% at Step 2). While PA declines on long-chain reactions ( 6 steps), post-hoc refinement effectively prevents catastrophic error propagation, preserving robustness across complex multi-step mechanisms.
5.5 LLM-as-Judge and Human Evaluation (RQ4)
To evaluate the plausibility and chemical rigor of our generated pathways, we conduct an LLM-as-Judge evaluation alongside human assessment on the 110 sampled OOD reactions. Specifically, we prompt GPT-5.2 to evaluate the pathways across five expert-defined criteria detailed in Appendix. We evaluate three methods: FlowER, the reference pathway (Gold), and our GRMP.
Figure 5 shows that GRMP achieves higher scores than FlowER on four of the five criteria. Notably, GRMP obtains 0.632 on mechanistic plausibility and 0.512 on pathway completeness, representing absolute improvements of 0.372 and 0.220 over FlowER, respectively. Overall, after being verified by a powerful general-purpose LLM, GRMP produces more chemically plausible and complete reaction pathways than FlowER, highlighting its effectiveness in modeling multi-step reaction mechanisms.

Figure 5: LLM-as-Judge assessments of reference pathways (Gold), FlowER, and GRMP based on five chemical criteria.
Next, we invite three organic chemistry Ph.D. candidates to independently evaluate the predicted pathways and score the results based on the same criteria. We then systematically compute the average scores across eleven distinct reaction classes, indexed from 1 to 11 as mapped in Table 7. Statistical analysis reveals that GRMP achieves an average score exceeding 0.60 in five out of the eleven reaction categories. Further, we supplement three representative case studies in Appendix C. These include: (1) a typical failure case; (2) a reaction example where experts judge the model's prediction to be more reasonable than the reference label (Figure 6); and (3) an example where both the reference and the prediction are logical under the LLM judge, yet human experts prefer the model's route on chemical grounds (Figure 7). These evaluations provide complementary evidence that the framework can generate plausible alternatives to a single reference annotation, while experimental validation would be required before any such route could be treated as a discovered mechanism.
6 Conclusion
We introduce a novel approach for reliable multi-step reaction mechanism prediction by integrating structural chemical knowledge graphs with the generative power of large language models. We construct ChemMechKG using expert-annotated reaction templates and intermediates. We propose a graph-aligned framework consisting of GRMP and an RR verifier for multi-step mechanism pathway prediction. Empirical experiments and human evaluation demonstrate the effectiveness of our approach, showcasing its potential to generate plausible mechanistic pathways.
References
[1] AM Bran, TA Neukomm, DP Armstrong, Z Jončev, and P Schwaller. [n.d.]. Chemical reasoning in LLMs unlocks steerable synthesis planning and reaction mechanism elucidation. arXiv 2025. arXiv preprint arXiv:2503.08537 ([n.d.]).
[2] Jordi Burés and Igor Larrosa. 2023. Organic reaction mechanism classification using machine learning. Nature 613, 7945 (2023), 689–695.
[3] Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024. Bge m3-embedding: Multi-lingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation. arXiv preprint arXiv:2402.032164, 5 (2024).
[4] Shuan Chen, Ramil Babazade, Taewan Kim, Sunkyu Han, and Yousung Jung. 2024. A large-scale reaction dataset of mechanistic pathways of organic reactions. Scientific Data 11, 1 (2024), 863.
[5] Shuan Chen, Kye Sung Park, Taewan Kim, Sunkyu Han, and Yousung Jung. 2025. Predicting Chemical Reaction Outcomes Based on Electron Movements Using Machine Learning. arXiv preprint arXiv:2503.10197 (2025).
[6] Xingyu Dang, Haocheng Tang, Junmei Wang, and Yanjun Li. 2026. Learning Mechanistic Reasoning for Chemical Reactions with Large Language Models. arXiv preprint arXiv:2607.12771 (2026).
[7] Manajit Das, Ajnabul Hoque, Mayank Baranwal, and Raghavan B Sunoj. 2026. DeepMech: a machine learning framework for chemical reaction mechanism prediction. Chemical Science (2026).
[8] DeepSeek-AL. 2026. DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence.
[9] Juraj Gottweis, Wei-Hung Weng, Alexander Daryin, Tao Tu, Petar Sirkovic, Artiom Myaskovsky, Grzegorz Glowaty, Felix Weissenberger, Alessio Orlandi, Dan Popovici, et al. 2026. Accelerating scientific discovery with Co-Scientist. Nature (2026), 1–3.
[10] Aaron Grattafori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783 (2024).
[11] Li Hao, He Cao, Bin Feng, Daniel Shao, Robert Tang, Zhiyuan Yan, Yonghong Tian, Li Yuan, and Yu Li. 2026. Beyond chemical qa: Evaluating Ilm's chemical reasoning with modular chemical operations. Advances in Neural Information Processing Systems 38 (2026).
[12] Audrey Huang, Adam Block, Dylan Foster, Dhruv Rohatgi, Cyril Zhang, Max Simchowitz, Jordan Ash, and Akshay Krishnamurthy. 2025. Self-improvement in language models: The sharpening mechanism. In International Conference on Learning Representations, Vol. 2025. 76687–76739.
[13] Jie Huang and Kevin Chen-Chuan Chang. 2023. Towards Reasoning in Large Language Models: A Survey. In Findings of the Association for Computational Linguistics: ACL 2023. 1049–1065.
[14] Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xinying Song, and Denny Zhou. 2024. Large Language Models Cannot Self-Correct Reasoning Yet. In The Twelfth International Conference on Learning Representations.
[15] Jiaxin Huang, Shixiang Gu, Le Hou, Yuexin Wu, Xuezhi Wang, Hongkun Yu, and Jiawei Han. 2023. Large language models can self-improve. In Proceedings of the 2023 conference on empirical methods in natural language processing. 1051–1068.
[16] Binyuan Hui, Jian Yang, Zeyu Cui, Jiaxi Yang, Dayiheng Liu, Lei Zhang, Tianyu Liu, Jiajun Zhang, Bowen Yu, Keming Lu, et al. 2024. Qwen2.5-coder technical report. arXiv preprint arXiv:2409.12186 (2024).
[17] Joonyoung F Joung, Mun Hong Fong, Nicholas Casetti, Jordan P Liles, Ne S Dassanayake, and Connor W Coley. 2025. Electron flow matching for generative reaction mechanism prediction. Nature 645, 8079 (2025), 115–123.
[18] Joonyoung F Joung, Mun Hong Fong, Jihye Roh, Zhengkai Tu, John Bradshaw, and Connor W Coley. 2024. Reproducing Reaction Mechanisms with Machine-Learning Models Trained on a Large-Scale Mechanistic Dataset. Angewandte Chemie International Edition 63, 43 (2024), e202411296.
[19] Feiyang Kang, Newsha Ardalani, Michael Kuchnik, Youssef Emad, Mostafa El-houshi, Shubhabrata Sengupta, Shang-Wen Li, Ramya Raghavendra, Ruoxi Jia, and Carole-Jean Wu. 2025. Demystifying synthetic data in Ilm pre-training: A systematic study of scaling laws, benefits, and pitfalls. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing. 10750–10769.
[20] Thomas N Kipf and Max Welling. 2016. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907 (2016).
[21] Daniel E Levy. 2017. Arrow-pushing in organic chemistry: an easy approach to understanding reaction mechanisms. John Wiley & Sons.
[22] Haote Li, Sumon Sarkar, Wenxin Lu, Patrick O Loftus, Tianyin Qiu, Yu Shee, Abbigayle E Cuomo, John-Paul Webster, H Kelly, Vidhyadhar Manee, et al. 2026. Collective intelligence for AI-assisted chemical synthesis. Nature (2026), 1–3.
[23] NextMove Software. [n.d.]. Pistachio. https://www.nextmovesoftware.com/pistachio.html.
[24] Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. 2022. Training language models to follow instructions with human feedback. Advances in neural information processing systems 35 (2022), 27730–27744.
[25] Shuofei Qiao, Yixin Ou, Ningyu Zhang, Xiang Chen, Yunzhi Yao, Shumin Deng, Chuanqi Tan, Fei Huang, and Huajun Chen. 2023. Reasoning with Language Model Prompting: A Survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 5368–5393.
[26] Rafael Rafalov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. 2023. Direct preference optimization: Your language model is secretly a reward model. Advances in neural information processing systems 36 (2023), 53728–53741.
[27] Amrith Setlur, Saurabh Garg, Xinyang Geng, Naman Garg, Virginia Smith, and Aivral Kumar. 2024. RI on incorrect synthetic data scales the efficiency of Ilm math reasoning by eight-fold. Advances in Neural Information Processing Systems 37 (2024), 43000–43031.
[28] Adatiya Singh, Adam Fry, Adam Perelman, Adam Tart, Adi Ganesh, Ahmed El-Kishky, Aidan McLaughlin, Aiden Low, AJ Ostrow, Akhila Ananthram, et al. 2025. Openai gpt-5 system card. arXiv preprint arXiv:2601.03267 (2025).
[29] Mohammadamin Tavakoli, Pierre Baldi, Ann Marie Carlton, Yin Ting Chiu, Alexander Shmakov, and David Van Vranken. 2023. Ai for interpretable chemistry: Predicting radical mechanistic pathways via contrastive learning. Advances in Neural Information Processing Systems 36 (2023), 4080–4096.
[30] Mohammadamin Tavakoli, Yin Ting T Chiu, Pierre Baldi, Ann Marie Carlton, and David Van Vranken. 2023. Rmehcbd: A public database of elementary radical reaction steps. Journal of chemical information and modeling 63, 4 (2023), 1114–1123.
[31] Gemini Team, Rohan Anil, Sebastian Borgeaud, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan Schalkwyk, Andrew M Dai, Anja Hauth, Katie Milican, et al. 2023. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805 (2023).
[32] Keheng Wang, Feiyu Duan, Sirui Wang, Peiguang Li, Yunsen Xian, Chuantao Yin, Wenge Rong, and Zhang Xiong. 2023. Knowledge-Driven CoT: Exploring Faithful Reasoning in LLMs for Knowledge-intensive Question Answering. arXiv preprint arXiv:2308.13259 (2023).
[33] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems 35 (2022), 24824–24837.
[34] Ruiling Xu, Yifan Zhang, Qingyun Wang, Carl Edwards, and Heng Ji. 2025. oMeBench: Towards Robust Benchmarking of LLMs in Organic Mechanism Elucidation and Reasoning. arXiv preprint arXiv:2510.07731 (2025).
[35] Yu Zhang, Yang Han, Shuai Chen, Ruijie Yu, Xin Zhao, Xianbin Liu, Kaipeng Zeng, Mengdi Yu, Jidong Tian, Feng Zhu, et al. 2025. Large language models to accelerate organic chemistry synthesis. Nature Machine Intelligence (2025), 1–13.
[36] Yu Zhang, Ruijie Yu, Jidong Tian, Feng Zhu, Jiapeng Liu, Xiaokang Yang, Yaohui Jin, and Yanyan Xu. 2025. ChemActor: Enhancing automated extraction of chemical synthesis actions with LLM-generated data. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 24291–24314.
[37] Zihan Zhao, Da Ma, Lu Chen, Liangtai Sun, Zihao Li, Yi Xia, Bo Chen, Hongshen Xu, Zichen Zhu, Su Zhu, et al. 2025. Developing ChemDFM as a large language foundation model for chemistry. Cell Reports Physical Science 6, 4 (2025).
Table 4: Comparison of representative mechanistic resources. ChemMechQA contains 259 categories of mechanistic subtypes (13 parent types). “MI?”, “NL”, “MP”, and “Cond” indicate the presence of mechanistic intermediates, natural language descriptions, mechanistic pathways, and reaction conditions in SMILES format, respectively.
| Dataset | #Reactions | #Reaction Types | #Mech. types/ subtypes | MI? | NL? | MP? | Cond? |
|---|---|---|---|---|---|---|---|
| Tavakoli et al. [30] | 5k+ | - | 7 | ✓ | ✗ | ✗ | ✗ |
| Chen et al. [4] | 31k | 86 | 13 | ✗ | ✗ | ✓ | ✗ |
| Joung et al. [18] | 192k | 86 | 13 | ✓ | ✗ | ✗ | ✓ |
| Hao et al. [11] | 275 | 86 | 13 | ✗ | ✓ | ✗ | ✗ |
| Xu et al. [34] | 2.8k | - | 8 | ✓ | ✓ | ✓ | ✗ |
| ChemMechQA | 50k | 182 | 259 | ✓ | ✓ | ✓ | ✓ |
A Chemical Mechanism Knowledge Graph (ChemMechKG) Construction
ChemMechQA provides template-imputed pathways for multi-step mechanism prediction. Table 4 compares the source corpus with representative mechanistic resources, which differ in annotation granularity and coverage.
To construct the mechanistic dataset, we leverage the Pistachio patent database (2025Q2 release), which comprises more than 15 million organic reactions. To ensure data quality, we implement a rigorous preprocessing pipeline. First, we canonicalize all reaction components (reactants, products, agents, solvents, and catalysts) in SMILES format. Second, building upon the methodology introduced by [18], we impute mechanistic pathways from experimentally reported reactions. After filtering samples with invalid mechanistic pathways and eliminating duplicates, we obtain 942,343 reactions and 8,222,189 elementary reactions with mechanistic pathways across 182 reaction classes and 676 reaction templates (see Table 5).
Finally, from this refined pool, we randomly partition 40,000, 5,000, and 5,000 reactions for training, validation, and testing, respectively (Table 6). For OOD evaluation, we isolate 11 reaction classes and 24 mechanism templates absent from training to construct ChemMechQA-Hard, which contains 2,009 reactions (Table 7). Together, the resulting resource comprises 52,009 reactions and 217,441 elementary reaction steps.
B Implementation Details and Experiment Settings
Foundation LLMs. We compare GPT-5.2 [28], Gemini-3.1-Pro [31], DeepSeek-V4-Pro [8], Llama-3.1-8B [10], Qwen2.5-7B [16], and ChemDFM [37].
Mechanistic Models. We evaluate three expert models as baselines for chemical mechanistic reasoning, including Reacton [5], FlowER [17], and Graph2SMILES [18].
-
Reacton models electron movement to predict reaction products and arrow-pushing mechanisms.
-
FlowER is a flow-matching-based generative model designed to model electronic rearrangement pathways in a continuous latent space. We adopt the publicly released implementation of this model and retain its default network architecture. We retrain the model on ChemMechQA. Due to the scale difference between datasets, we slightly adjust
Table 5: Key statistics of ChemMechKG.
| Statistic | Count |
|---|---|
| Entities | 247,832 |
| Molecule nodes | 247,156 |
| Template nodes | 676 |
| Triples | 422,160 |
| Reaction types | 182 |
| Mechanism types | 13 |
| Mechanism subtypes | 259 |
| KG analysis | |
| Maximum hops | 18 |
| Average hops | 8.4432 |
| Max. template in-degree | 10,220 |
| Min. template in-degree | 1 |
| 13,816 | |
| 20,526 | |
| 15,658 | |
Table 6: Split statistics for ChemMechQA and oMeBench. The oMeBench test split corresponds to oMe-Gold, with 722 elementary steps after preprocessing. * denotes the class- and template-held-out OOD split.
| Dataset | Split | Mol. | Rxns. | Steps | Types |
|---|---|---|---|---|---|
| oMeBench | Train | 12,684 | 2,508 | 10,619 | - |
| Test | 1,151 | 196 | 722 | - | |
| ChemMechQA | Train | 197,759 | 40,000 | 168,545 | 167 |
| Val. | 25,162 | 5,000 | 21,354 | 132 | |
| Test | 24,981 | 5,000 | 21,181 | 132 | |
| ChemMechQA-Hard | OOD Test | 8,008 | 2,009 | 6,361 | 11 |
a subset of training hyperparameters. The modified training hyperparameters are: warmup_steps = 3,000, epoch = 200, max_steps = 3,000,000, save_iter = 3,000, log_iter = 10, and eval_iter = 3,000. When retraining and evaluating the FlowER model, we use atom-mapped versions of
Table 7: Overview of mechanism and reaction types in ChemMechQA.
| Category | Space |
|---|---|
| Mechanism Type | Pericyclic, Rearrangement, Radical, Electron transfer, Substitution, Cleavage, Addition, Elimination, Coordination, Proton transfer / Dissociation, Organometallic, Activation, Condensation |
| Mechanism Subtype | Deprotonation, Proton transfer, Elimination, Neutralization of protonated ether / Addition of alcohol under basic pKa, Nucleophilic Addition, Proton exchange, Amine addition, Halide leaves, Alkoxide leaves, Hydroxide addition, ... |
| Hard Reaction Type | Appel bromination (index 5), Carboxylic acid + sulfonamide condensation (index 6), Diels-Alder cycloaddition (index 9), Hydroxy to bromo (index 1), Menshutkin reaction (index 8), N-Bn deprotection (index 11), Negishi coupling (index 2), Prilezhaev epoxidation (index 10), Staudinger reduction (index 4), Transamidation (index 3), Urea Schotten-Baumann (index 7) |
ChemMechQA, as required by the model's architecture. The same applies to Graph2SMILES. The model is trained for elementary reaction prediction.
- Graph2SMILES is a graph-to-sequence model that encodes molecular graphs using DGCN and decodes reaction outcomes as SMILES sequences with a Transformer. The reproduction method of Graph2SMILES is similar to that of FlowER. The modified training hyperparameters are: warmup_steps = 800, epoch = 2,000, log_iter = 10, eval_iter = 500, and save_iter = 1,000.
GCN-based mechanism prediction. The model architecture for mechanism prediction follows an encoder–decoder for link prediction. Specifically, the encoder is a two-layer GCN, and the decoder is an MLP. For training, existing relations in the dataset are treated as positive edges. For each positive edge, a template node is randomly sampled for its corresponding molecule node to construct a negative edge. This strategy preserves the same bipartite node-type constraints as the positive edges while generating non-existent molecule–template connections. Each positive edge is paired with two negative edges, resulting in a balanced 1:2 ratio between positive and negative samples. The encoder and decoder are optimized jointly with a binary link prediction loss. We train GCN-based predictors for 1000 epochs using Adam with a learning rate of . The dropout rate is set to 0.5.
Metrics. Previous works [17, 18] primarily evaluate model performance at the level of single-step elementary reactions. In this work, we focus on the more challenging task of multi-step mechanism imputation. To comprehensively assess pathway prediction quality, we adopt five evaluation metrics: Validity, Main Product Accuracy (MPA), Intermediate Hit (I-hit), Pathway Accuracy (PA), and Sequence Rank (SR). Specifically, the Validity metric measures the proportion of chemically valid molecules generated among the predicted mechanistic pathways. The Main Product Accuracy (MPA) metric evaluates whether the predicted main product exactly matches the ground-truth main product. The Intermediate Hit (I-hit) measures intermediate recall by calculating the proportion of correctly predicted intermediates among all ground-truth intermediates across the dataset. Pathway Accuracy (PA) measures the proportion of samples whose entire predicted molecular mechanistic pathways exactly match the reference pathways, thereby evaluating end-to-end pathway reconstruction capability. Additionally, Sequence Rank (SR) measures whether the top-1
predicted mechanistic pathway matches any potential pathway within the ChemMechKG. For pathway prediction, each reported score is the arithmetic mean of the corresponding metric over five runs. For predictions without Gemini refinement, top- MPA and PA use cumulative hits among the first candidate pathways. For Gemini-based variants, a separate candidate set is generated for each value of , and MPA and PA measure cumulative hits within that set. These sets are not required to be nested across , so the reported scores need not increase with . Top- Validity and I-hit are arithmetic means of the corresponding candidate-level scores.
C Cases
Figures 6 and 7 show qualitative judgments of predicted and reference pathways, rather than experimental validation.
a

Why is pathway 1 less reasonable?
Requires pre-formation of a tight ion pair (less favorable in common organic solvents).
Needs DMAP(strong nucleophile) to initiate the process, but DMAP is usually not required in carbodiimide couplings.
Involves multiple rearrangements and acyl transfer steps, higher activation energy.
Less consistent with well-established carbodiimide reactivity.
Pathway 2 (annotated) - more plausible
Why is pathway 2 more reasonable?
Follows the classic carbodiimide coupling mechanism (well known and widely documented).
O-acylisourea intermediates are well-established and have been extensively characterized.
Consistent with reactivity: carboxylate is a strong nucleophile and attacks the electrophilic carbodiimide carbon.
Requires fewer steps and has lower activation energy.
Explains the formation of dicyclohexylurea (DCU), a common byproduct observed in experiments.
b
Pathway 1 (predicted) - more plausible

Why is pathway 1 less reasonable?
Consistent with well-established SnAr Mechanism
2,4-difluoroaromatic ring activated by electron-withdrawing quinazoline-like heterocycle.
Fluorine is an excellent leaving group. Strong activation significantly facilitates F-departure.
Reaction conditions (TFA) are appropriate. Only adjusts protonation equilibrium and solubility, consistent with literature reports.
Clean reaction is practice. Typically affords the desired mono-substituted product at elevated temperature.
Pathway 2 (annotated) - less plausible
Why is Pathway 2 less reasonable?
Amide is not sufficiently activated. Aromatic amides are resonance-stabilized; TFA alone is not strong enough to activate the amide.
Mechanism is complex. Involves multiple steps: activation, cleavage, exchange, and proton transfer.
Side reactions are likely. Transamidation, hydrolysis, and amide scrambling are possible.
Inconsistent with experimental observations. Usually leads to multiple byproducts rather than a single clean product.
Figure 6: Qualitative pathway comparisons: a, a failure case; b, a prediction judged more reasonable than the reference by experts.
Table 8: Prompt for GRMP in Mechanism Pathway Prediction with Retrieval Refinement
| Mechanism pathway prediction with retrieval-guided refinement |
|---|
| Question: Please generate the product SMILES based on the given reactant SMILES.# Topic entities: [input SMILES]Use the predicted molecular-state pathway and retrieved graph triplets below to assess and refine the prediction.Predicted pathway: [input predicted pathway]Retrieved graph triplets: [input retrieved triplets]Check SMILES validity and chemical consistency using the retrieved triplets. Correct the predicted pathway if needed; otherwise retain it. Output only the ordered molecular-state SMILES in a code block, separated by arrows. Do not output template SMARTS or explanatory text. Do not leave the output empty. |
Table 9: Rubrics and Prompt for LLM-as-Judge
| LLM-as-Judge: evaluation rubric |
|---|
| Assess the chemical plausibility of the supplied molecular-state pathway using the reactants, reaction conditions, and rubric below.Task: Rate the supplied predicted pathway.# Topic entities: [input SMILES]Evaluate the supplied pathway using these expert-defined criteria:Predicted pathway: [input predicted pathway] |
| Rubrics: |
| (1) Intermediate Structural Validity: Intermediate molecular states should have chemically valid structural representations, including appropriate valence, bond orders, and formal charges. Do not penalize justified reactive, charged, or radical intermediates merely for being unstable. Assess intermediate states here; assess the final product under Product Electronic Validity.(2) Mechanistic Plausibility: All mechanistic steps and the predicted final product must be chemically consistent with the provided reactants and reaction conditions;(3) Electron-Transfer Coherence: The reasoning process must avoid self-reinforcing or circular electron-transfer loops;(4) Pathway Completeness: The pathway should include the essential stages needed to complete the proposed transformation, without premature termination or omission of necessary steps.(5) Product Electronic Validity: The final predicted product should not contain unpaired or artificially retained electrons.Assign each criterion a numeric score between 0.0 and 1.0, inclusive, with higher scores indicating better satisfaction of the criterion. Provide a brief rationale for each score. |

Figure 7: The LLM judge accepts both pathways; human evaluators prefer the prediction. Neither route is experimentally validated by these judgments.