Order Matters in Retrosynthesis: Structure-aware Generation via Reaction-Center-Guided Discrete Flow Matching Chenguang Wang, Zihan Zhou, Lei Bai, Tianshu Yu Abstract Template-free retrosynthesis methods treat the task as black-box sequence generation, limiting learning efficiency, while semi-template approaches rely on rigid reaction libraries that constrain generalization. We address this gap with a key insight: atom ordering in neural representations matters. Building on this insight, we propose a structure-aware template-free framework that encodes the two-stage nature of chemical reactions as a positional inductive bias. By placing reaction center atoms at the sequence head, our method transforms implicit chemical knowledge into explicit positional patterns that the model can readily capture. The proposed RetroDiT backbone, a graph transformer with rotary position embeddings, exploits this ordering to prioritize chemically critical regions. Combined with discrete flow matching, our approach decouples training from sampling and enables generation in 20–50 steps versus 500 for prior diffusion methods. Our method achieves state-of-the-art performance on both USPTO-50k (61.2% top-1) and the large-scale USPTO-Full (51.3% top-1) with predicted reaction centers. With oracle centers, performance reaches 71.1% and 63.4% respectively, surpassing foundation models trained on 10 billion reactions while using orders of magnitude less data. Ablation studies further reveal that structural priors outperform brute-force scaling: a 280K-parameter model with proper ordering matches a 65M-parameter model without it. 1 Introduction Retrosynthesis, the task of identifying precursor molecules to synthesize a target compound, is fundamental to organic chemistry and drug discovery ( Vleduts 1963 ; Corey & Wipke 1969 ) . Single-step retrosynthesis prediction, which determines the immediate reactants for a given product, underpins multi-step route planning and has driven extensive research in machine learning ( Coley et al. 2019 ; Schwaller et al. 2020 ; Chen et al. 2020 ; Xie et al. 2022 ; Tripp et al. 2022 ; Liu et al. 2023 ; Tripp et al. 2023 ; Zhong et al. 2023b ) . Existing approaches to single-step retrosynthesis fall into three paradigms. Template-based methods ( Coley et al. 2017 ; Segler & Waller 2017 ; Dai et al. 2019 ; Chen & Jung 2021 ; Yan et al. 2022 ) match products against a library of reaction templates extracted from known reactions. While interpretable, they generalize poorly to novel reactions not covered by the template library. Semi-template methods ( Shi et al. 2020 ; Yan et al. 2020 ; Wang et al. 2021 ; Chen et al. 2023 ; Gao et al. 2022 ; Zhong et al. 2023a ) decompose the task into reaction center identification followed by synthon completion, making the learning problem more tractable. However, they still rely on templates or predefined rules for completing synthons, limiting generation flexibility. Template-free methods ( Zheng et al. 2019 ; Sacha et al. 2021 ; Tu & Coley 2022 ; Zeng et al. 2024 ; Igashov et al. 2023 ; Yao et al. 2024 ; Zhong et al. 2022 ; Han et al. 2024 ; Yadav et al. 2025 ) directly generate reactants from products in an end-to-end manner, offering maximum flexibility. Yet by treating the task as a black-box transformation, they ignore the intrinsic structure of chemical reactions, leading to inefficient learning. These observations raise a natural question: Can we combine the structural insights of semi-template methods with the generation flexibility of template-free approaches? In this work, we address this question with a key insight: single-step retrosynthesis naturally decomposes into two stages, identifying the reaction center and generating the corresponding reactant structures. This two-stage structure explains why template-free methods struggle with learning efficiency. They must implicitly learn both tasks simultaneously, without guidance on the problem’s inherent decomposition. Building on this insight, we propose a structure-aware template-free framework that combines structural decomposition with generation flexibility. The core idea is reaction-center-aware atom ordering: by designating reaction center atoms as root nodes and traversing the molecular graph accordingly, we place reaction centers at the beginning of the node sequence. This encodes the two-stage structure as a positional inductive bias. To capture this ordering, we introduce RetroDiT, a graph transformer backbone equipped with Rotary Position Embeddings (RoPE) ( Su et al. 2024 ) . Built upon Discrete Flow Matching ( Campbell et al. 2024 ; Gat et al. 2024 ; Qin et al. 2024 ) , our framework decouples training from sampling, enabling generation in 20–50 steps versus 500 for prior diffusion methods. Our framework adopts a modular design. During training, ground-truth reaction centers from atom mapping serve as root nodes; during inference, a separately trained predictor provides the roots. This separation allows each component to be optimized independently, and future improvements in reaction center prediction will directly boost overall performance. We evaluate our approach on USPTO-50k and USPTO-Full ( Lowe 2012 ; Zhong et al. 2023b ) . With oracle reaction centers, our method achieves 71.1% top-1 accuracy on USPTO-50k and 63.4% on USPTO-Full, establishing strong upper bounds that surpass foundation models trained on 10 billion samples. With predicted reaction centers, we achieve 61.2% and 51.3% respectively, outperforming existing template-free methods by over 10 points on USPTO-50k. Training converges 6 \times faster than previous baselines. Ablation studies reveal two key findings. First, positional inductive bias is more effective than scaling model size or training data: a 280K-parameter model with proper ordering matches a 65M-parameter model without it. Second, reaction center prediction is the primary performance bottleneck, providing clear direction for future work. Our main contributions are: • We introduce a structure-aware template-free paradigm that encodes the two-stage nature of retrosynthesis as a positional inductive bias through atom ordering, eliminating the need for explicit templates; • We propose RetroDiT, a graph backbone with rotary position embeddings to capture structural priors in ordered molecular graphs, and achieve state-of-the-art performance with 6 \times training speedup and up to 25 \times fewer sampling steps via discrete flow matching; • We provide systematic analysis demonstrating that structure-aware inductive bias outperforms brute-force scaling, identifying reaction center prediction as the key bottleneck for future improvement. 2 Related Work Single-step Retrosynthesis Prediction. Existing approaches fall into three paradigms. Template-based methods ( Coley et al. 2017 ; Segler & Waller 2017 ; Dai et al. 2019 ; Chen & Jung 2021 ; Yan et al. 2022 ; Gaiński et al. 2025 ) match targets against predefined reaction libraries, providing interpretability at the cost of limited generalization. Semi-template methods ( Shi et al. 2020 ; Yan et al. 2020 ; Wang et al. 2021 ; Chen et al. 2023 ; Gao et al. 2022 ; Zhong et al. 2023a ) decompose the task into reaction center identification and synthon completion, reducing learning difficulty but relying on rigid completion rules. Template-free methods ( Zheng et al. 2019 ; Sacha et al. 2021 ; Tu & Coley 2022 ; Zhong et al. 2022 ; Yao et al. 2024 ; Han et al. 2024 ; Zeng et al. 2024 ) formulate retrosynthesis as end-to-end generation using sequence Transformers or graph generative models ( Igashov et al. 2023 ; Yadav et al. 2025 ) . Recent work further scales this approach through large language models pretrained on massive reaction corpora ( Deng et al. 2025 ; Wang et al. 2025 ; Zhao et al. 2025b ; Ozer et al. 2025 ; Zhang et al. 2025 ) . Our method belongs to the template-free paradigm but incorporates structural insights from semi-template approaches through positional inductive biases, without requiring templates or completion rules. Inductive Biases in Retrosynthesis. Prior work has explored various inductive biases to simplify learning. Topological approaches exploit graph-level constraints, using dual representations to highlight reaction centers ( Sun et al. 2025 ) or enforcing chemical plausibility through embedding constraints ( Somnath et al. 2021 ; Zhao et al. 2025a ) . Sequence-level approaches focus on alignment strategies, from root-aligned SMILES ( Zhong et al. 2022 ; Yao et al. 2024 ) to Maximum Common Substructure matching ( Hu et al. 2025 ) , to reduce the search space. Other work addresses prediction uncertainty through data augmentation ( Zhong et al. 2022 ; Sun et al. 2025 ) or round-trip verification ( Yadav et al. 2025 ) . Our approach differs by encoding structural priors directly into the positional encoding scheme, allowing a standard Transformer to capture reaction-center-aware patterns without specialized architectures. Discrete Generative Models. Graph generation has evolved from continuous diffusion ( Song et al. ) to discrete denoising frameworks ( Austin et al. 2021 ; Vignac et al. 2022 ; Lou et al. ; Sahoo et al. 2024 ) . Flow Matching ( Lipman et al. 2024 ) offers a simulation-free alternative with efficient training, and recent extensions to discrete spaces ( Campbell et al. 2024 ; Gat et al. 2024 ) and graphs ( Qin et al. 2024 ) have shown strong results. We build on Discrete Flow Matching for its decoupled training and sampling, which enables efficient generation in 20–50 steps while maintaining high accuracy. Figure 1 : Overview of the structure-aware retrosynthesis framework. Left (Training): Ground-truth reaction centers are identified via atom mapping, generating multiple ordered graph candidates G_{0} with different RC atoms as roots. Discrete flow matching trains RetroDiT to predict the target reactants G_{1} from intermediate states G_{t} . Right (Inference): An R-GCN predicts reaction center probabilities, and top- k candidates (4 in the illustration) are used to generate ordered graphs. CTMC sampling progressively transforms the product ( t=0 ) into reactants ( t=1 ). The training and inference pipelines are decoupled, allowing independent optimization of each component. 3 Background Graph Notation. We represent a molecule as an undirected graph G=(x^{1:N},e^{1:i0}p_{t|0,1}(G_{t}|G_{0},G_{1})}, where Z_{t}^{>0} is a normalization constant. In practice, we use Euler discretization with S steps, where each step has size \Delta t=1/S . As shown in Appendix G.3 , our experiments show that S=20 – 50 steps suffice for high-quality generation, compared to 500 steps required by prior diffusion-based methods ( Igashov et al. 2023 ) . Algorithm 2 Modular Inference Pipeline 1: Input: Product G_{P} , RC Predictor \phi , RetroDiT f_{\theta} , sampling steps S , repeat times M , \mathcal{G}_{\text{reactants}}\leftarrow\emptyset 2: Obtain top-k predicted RCs: \mathcal{R}\leftarrow\phi(G_{P}) 3: for m=1 to M do 4: Sample root r\in\mathcal{R} 5: V_{\mathrm{ordered}}\leftarrow\text{Canonicalize}(G_{P},\text{root}=r) 6: G_{0}\leftarrow\text{Sort}(G_{P},V_{\mathrm{ordered}}) 7: for i=0 to S-1 do 8: t\leftarrow i/S , \Delta t\leftarrow 1/S 9: Predict posterior: {p}^{\theta}_{1|t}\leftarrow f_{\theta}(G_{t},t) 10: Compute rate matrix R_{t}^{\theta}(G_{t},\cdot|G_{0}) via Eq. 5 11: Sample next state G_{t+\Delta t} via Eq. 4 , G_{t}\leftarrow G_{t+\Delta t} 12: end for 13: Add G_{t=1} to \mathcal{G}_{\text{reactants}} 14: end for 15: Return \mathcal{G}_{\text{reactants}} 4.4 Modular Inference Pipeline During training, ground-truth reaction centers from atom mapping provide the root nodes for ordering. At inference time, however, the reaction center is unknown. We address this with a two-stage pipeline that separates reaction center prediction from structure generation. Stage I: Reaction Center Prediction. We train a lightweight Relational Graph Convolutional Network (R-GCN) ( Schlichtkrull et al. 2018 ) to predict reaction centers. The model scores each atom in G_{P} based on its likelihood of belonging to \mathcal{S}_{\text{RC}} , framing the task as binary classification. To handle the multi-modal nature of retrosynthesis, where multiple valid disconnection sites may exist, we retain the top- k atoms as candidate roots. Predictor details are provided in Appendix E.2 . Stage II: Structure-Aware Generation. For each candidate root from Stage I, we construct the ordered sequence using reaction-center-rooted ordering (Section 4.1 ), then generate reactants using RetroDiT with CTMC sampling (Sections 4.2 – 4.3 ). Each candidate produces one reactant proposal; we collect all proposals and rank them by model likelihood. Benefits of Modularity. This design offers two practical benefits. First, efficiency : by solving “where to react” separately, the generative model focuses on “how to react,” enabling high-quality generation in few steps. Second, upgradability : the two components can be improved independently. Future advancements in either reaction center prediction accuracy or generative backbone architecture can be seamlessly integrated to boost overall performance without necessitating a full system retrain. Our analysis in Section 5.4 shows that reaction center prediction is currently the primary bottleneck, making this modularity particularly valuable. The complete inference procedure is summarized in Algorithm 2 , and Figure 1 provides an overview of the entire framework, illustrating how the training and inference pipelines share the same RC-rooted ordering scheme while remaining independently optimizable. 5 Experiments 5.1 Experimental Setup Datasets. We evaluate our framework on two widely adopted benchmark datasets derived from the US Patent Office (USPTO) database. USPTO-50k contains approximately 50,000 atom-mapped reactions and serves as the standard retrosynthesis benchmark. USPTO-Full contains approximately 1 million reactions, providing a larger-scale testbed for evaluating scalability. We use the standard 80%–10%–10% split for both datasets ( Maziarz et al. 2025 ) . Baselines. We compare against methods from three paradigms: (1) Template-based: RetroSim ( Coley et al. 2017 ) , NeuralSym ( Segler & Waller 2017 ) , GLN ( Dai et al. 2019 ) , LocalRetro ( Chen & Jung 2021 ) , and RetroComposer ( Yan et al. 2022 ) ; (2) Semi-template: G2G ( Shi et al. 2020 ) , RetroXpert ( Yan et al. 2020 ) , RetroPrime ( Wang et al. 2021 ) , G 2 Retro ( Chen et al. 2023 ) , SemiRetro ( Gao et al. 2022 ) , and Graph2Edits ( Zhong et al. 2023a ) ; (3) Template-free: SCROP ( Zheng et al. 2019 ) , MEGAN ( Sacha et al. 2021 ) , Graph2SMILES ( Tu & Coley 2022 ) , Ualign ( Zeng et al. 2024 ) , RetroBridge ( Igashov et al. 2023 ) , NAG2G ( Yao et al. 2024 ) , R-SMILES ( Zhong et al. 2022 ) , EditRetro ( Han et al. 2024 ) , and RetroFlow ( Yadav et al. 2025 ) . We also compare against RSGPT ( Deng et al. 2025 ) , a large language model pretrained on 10 billion reactions. While delivering superior performance, it relies on massive computational resources and a complex multi-stage pipeline (see Appendix E.1 for a detailed comparison). Metrics. Following Maziarz et al. 2025 , we report Top- k Exact Match Accuracy ( k\in\{1,3,5,10\} ), which measures whether the ground-truth reactants appear in the top- k predictions. We also report Round-Trip Accuracy in Appendix F.1 , which verifies that generated reactants can reproduce the target product when passed through a forward synthesis model, providing a measure of chemical validity. Detailed definitions are in Appendix E.3 . Implementation. Our main experiments use RetroDiT-Large (8M parameters) with 50 sampling steps. For comparison, prior diffusion-based methods such as RetroBridge require 500 steps. We use a lightweight GNN for reaction center prediction. Full training and sampling configurations are provided in Appendix E . 5.2 Main Results Performance on USPTO-50K. Table 1 presents the comparative results on the USPTO-50k benchmark with reaction classes unknown. Our framework, utilizing a lightweight GNN-based reaction center predictor, achieves a Top-1 accuracy of 61.2% , demonstrating remarkable performance against established baselines. Crucially, our method significantly outperforms RetroBridge ( Igashov et al. 2023 ) and RetroSynFlow ( Yadav et al. 2025 ) , the representative diffusion-based and flow-based generative baselines, by margins of 10.4% (61.2% vs. 50.8%) and 1.2% (61.2% vs. 60.0%) in Top-1 accuracy, respectively. This substantial gap validates our core claim: incorporating structural inductive bias via atom ordering is far more effective than treating graph generation as a black-box diffusion process. Furthermore, our method outperforms all semi-template methods, including Graph2Edits (55.1%) and G2Retro (54.1%), indicating that our “structure-aware template-free” paradigm successfully combines the precision of decomposition with the flexibility of generative modeling. Compared to RSGPT ( Deng et al. 2025 ) , a Large Language Model pretrained on 10 billion reactions, our method achieves highly competitive results (61.2% vs. 63.4%) using orders of magnitude less data (only 50k training samples) and significantly fewer parameters. This suggests that the positional inductive bias serves as a data-efficient alternative to brute-force scaling, allowing the model to capture chemical rules without massive pretraining. Table 1 : Top- k Exact Match Accuracy on USPTO-50k (Reaction Class Unknown). Baselines are categorized by paradigm. The best results are bolded and the second best are underlined . Model Top-1 Top-3 Top-5 Top-10 LLM-based RSGPT ( Deng et al. 2025 ) 63.4 84.2 89.2 93.0 RSGPT ( \times 20) ( Deng et al. 2025 ) 77.0 90.9 94.3 96.7 Template-based RetroSim ( Coley et al. 2017 ) 37.3 54.7 63.6 74.1 NeuralSym ( Segler & Waller 2017 ) 44.4 65.3 72.4 78.9 GLN ( Dai et al. 2019 ) 52.5 69.0 75.6 83.7 LocalRetro ( Chen & Jung 2021 ) 53.4 77.5 85.9 92.4 RetroComposer ( Yan et al. 2022 ) 54.5 77.2 83.2 87.7 Semi-template-based G2G ( Shi et al. 2020 ) 48.9 67.6 72.5 75.5 RetroXpert ( Yan et al. 2020 ) 50.4 61.1 62.3 63.4 RetroPrime ( Wang et al. 2021 ) 51.4 70.8 74.0 76.1 G 2 Retro ( Chen et al. 2023 ) 54.1 74.1 81.2 86.7 SemiRetro ( Gao et al. 2022 ) 54.9 75.3 80.4 84.1 Graph2Edits ( Zhong et al. 2023a ) 55.1 77.3 83.4 89.4 Template-free SCROP ( Zheng et al. 2019 ) 43.7 60.0 65.2 68.7 MEGAN ( Sacha et al. 2021 ) 48.1 70.7 78.4 86.1 Graph2SMILES ( Tu & Coley 2022 ) 52.9 66.5 70.0 72.9 Ualign ( Zeng et al. 2024 ) 52.9 68.2 72.5 76.4 RetroBridge ( Igashov et al. 2023 ) 50.8 74.1 80.6 85.6 NAG2G ( Yao et al. 2024 ) 55.1 76.9 83.4 89.9 R-SMILES ( Zhong et al. 2022 ) 56.3 79.2 86.2 91.0 EditRetro ( Han et al. 2024 ) 60.8 80.6 86.0 90.3 RetroProdFlow ( Yadav et al. 2025 ) 50.0 74.3 81.2 85.8 RetroSynFlow ( Yadav et al. 2025 ) 60.0 77.9 82.7 85.3 Ours (Pred. RC) 61.2 81.5 86.2 89.2 Ours (Orac. RC) 71.1 90.8 94.5 96.0 Scalability on USPTO-Full. To evaluate scalability, we report results on the larger USPTO-Full dataset in Table 2 . Our method achieves 51.3% Top-1 accuracy with predicted reaction centers, surpassing all existing template-based, semi-template, and non-LLM template-free baselines (e.g., NAG2G at 49.7% and R-SMILES at 48.9%). Moreover, under the Oracle setting, our generative backbone achieves 63.4% Top-1 accuracy, notably outperforming RSGPT (59.2%). This result is particularly significant as it demonstrates that our structure-aware generative model, when guided correctly, possesses a superior capacity to model complex chemical transformations even at scale, surpassing large-scale foundation models. Table 2 : Top- k Exact Match Accuracy on USPTO-Full . The best results are bolded and the second best are underlined . Model Top-1 Top-3 Top-5 Top-10 LLM-based RSGPT ( Deng et al. 2025 ) 59.2 74.2 78.2 82.1 Template-based RetroSim ( Coley et al. 2017 ) 32.8 – – 56.1 GLN ( Dai et al. 2019 ) 39.3 – – 63.7 LocalRetro ( Chen & Jung 2021 ) 39.1 53.3 58.4 63.7 Semi-template-based RetroPrime ( Wang et al. 2021 ) 44.1 59.1 62.8 68.5 Template-free R-SMILES ( Zhong et al. 2022 ) 48.9 66.6 72.0 76.4 NAG2G ( Yao et al. 2024 ) 49.7 64.6 69.3 74.0 Ours (Pred. RC) 51.3 67.8 72.3 75.8 Ours (Orac. RC) 63.4 77.6 80.9 83.6 Upper Bound with Oracle Reaction Centers. A key advantage of our modular framework is that the generative backbone is decoupled from the reaction center predictor.To assess the full potential of our generative backbone, we evaluate performance using ground-truth (Oracle) reaction centers. As shown in our analysis, under this Oracle setting, our method achieves a staggering 71.1% Top-1 accuracy on USPTO-50k. This performance significantly surpasses RSGPT (63.4%) and even approaches the performance of RSGPT with test-time augmentation ( RSGPT \times 20 : 77.0%), without requiring any test-time sampling tricks or massive pretraining. This result establishes a strong upper bound and confirms that our generative model is extremely capable; the primary bottleneck lies in the accuracy of the upstream reaction center predictor, which we analyze further in Section 5.4 . Figure 2 : Positional Inductive Bias vs. Model Scaling on USPTO-Full. Performance comparison across four model sizes (280K to 65M). RC-Rooted ordering consistently outperforms the Canonical baseline. The Oracle setting with a Small model (280K) matches the Canonical X-Large model (65M), showing that structure-aware priors are more parameter-efficient than scaling alone. 5.3 Analysis: Positional Inductive Bias vs. Scaling A central hypothesis of this work is that encoding the two-stage structure of retrosynthesis as a positional inductive bias is more effective than scaling model parameters. To test this, we conducted experiments on USPTO-Full across four model sizes (280K, 2M, 8M, and 65M parameters). Effect of Ordering Strategies. Figure 2 shows the Top-1, Top-3, and Top-5 accuracies (at 50 sampling steps) for models trained with Canonical and our RC-Rooted ordering strategies. The results show a clear trend: RC-Rooted ordering (green bars) consistently outperforms the Canonical baseline (blue bars) across all model scales. For instance, with the X-Large model (65M), our method achieves 51.2% Top-1 accuracy compared to 50.4% for Canonical. More importantly, the RC-Rooted (Oracle) results (pink bars) provide strong support for our claim that structural bias outweighs scaling. Our Small model (280K parameters) with oracle ordering achieves \approx 51% Top-1 accuracy, matching the X-Large model (65M parameters) with Canonical ordering (50.4%). This indicates that precise structural guidance can compensate for a 200 \times reduction in parameter count. Even with predicted reaction centers, we maintain a consistent advantage over Canonical ordering. The gap to oracle performance (reaching 63.4% at 65M) highlights the potential of the generative backbone when the predictor bottleneck is removed. Mechanism Verification: The Necessity of RoPE. To understand how ordering improves performance, we analyze the impact of different positional embedding (PE) schemes on RetroDiT-8M (evaluated on USPTO-50k). As shown in Table 3 , ordering atoms alone is insufficient if the network cannot exploit this sequence information. Without any PE ( w/o PE ), the model struggles to leverage the RC-Rooted structure, as the self-attention mechanism remains permutation invariant. While Absolute PE provides significant improvement, RoPE yields the highest accuracy across all metrics. This confirms that RoPE is essential for capturing the relative topological distances implied by our BFS-based ordering, effectively enabling the “Head-to-Tail” interaction between the reaction center and dummy nodes discussed in Section 4.2 . Table 3 : Ablation of Positional Embeddings. Performance of RetroDiT-8M with RC-Rooted ordering under different PE configurations on USPTO-50k. Configuration Top-1 (%) Top-5 (%) Top-10 (%) w/o PE 50.4 77.3 81.5 w/ Absolute PE 68.5 93.2 94.8 w/ RoPE (Ours) 71.0 94.6 96.5 Backbone Architecture. Finally, our Diffusion Transformer (DiT) backbone consistently outperforms a standard Graph Transformer (GTF) across all model sizes. We attribute this to DiT’s adaptive layer normalization, which better handles the time-dependent dynamics of the flow matching process. Detailed comparisons are provided in Appendix F.2 . 5.4 The Bottleneck: Impact of RC Prediction Accuracy Our modular framework allows us to isolate the impact of reaction center (RC) prediction on overall performance. To quantify this impact, we conducted a sensitivity analysis on both USPTO-50k and USPTO-Full. Using fixed RetroDiT-8M models trained with RC-rooted ordering, we simulated inference with varying RC accuracies from 10% to 100% by randomly replacing the correct root with a random atom with probability (1-\text{Acc\%}) . Sensitivity Analysis. Figure 3 shows the Top-1 generation accuracy as a function of simulated RC accuracy. The results reveal two key observations. First, generation accuracy exhibits a strong positive correlation with RC accuracy on both datasets. As RC accuracy approaches 100%, generation accuracy reaches 71% on USPTO-50k and 62% on USPTO-Full, establishing clear upper bounds. Second, we observe a crossover point with the Canonical baseline (dashed lines) at approximately 35–40% RC accuracy. Below this threshold, incorrect roots actively mislead the model, resulting in worse performance than permutation-invariant canonical ordering. Above this threshold, the structural inductive bias yields consistent gains, reaching over 10 points improvement at 70% RC accuracy. Implications. This analysis confirms a key finding: the generative backbone is not the primary performance bottleneck. RetroDiT is effective at reconstructing reactants when conditioned on correct structural context. The performance gap between our predicted setting ( \approx 61% on USPTO-50k) and the oracle upper bound (71%) is largely due to the limited accuracy of the current RC predictor. This validates our modular design: the framework provides a strong generative backbone that can directly benefit from future advances in RC prediction without requiring retraining of the generator. Additional analysis is provided in Appendix F.4 . Figure 3 : Impact of RC Prediction Accuracy on Generation Performance. The solid lines track the Top-1 Accuracy of our RC-Rooted model as the reaction center accuracy varies from 10% to 100%. The dashed lines represent the performance of the Canonical ordering baseline (which is independent of RC prediction). 6 Conclusion and Future Work We propose a structure-aware template-free paradigm for single-step retrosynthesis that encodes the two-stage nature of chemical reactions as a positional inductive bias through reaction-center-rooted atom ordering. Combined with RetroDiT and discrete flow matching, our approach combines the structural precision of semi-template methods with the generative flexibility of template-free approaches. On USPTO-50k and USPTO-Full, our method achieves state-of-the-art performance while training 6 \times faster and requiring only 20–50 sampling steps compared to 500 for prior diffusion methods. Experiments with oracle reaction centers establish upper bounds of 71.1% and 63.4% Top-1 accuracy, showing that the generative backbone is effective. Beyond these results, our work highlights a broader principle: well-designed inductive biases outperform brute-force scaling . A 280K-parameter model with proper ordering matches a 65M-parameter model without it, demonstrating that domain-specific structural priors can be more effective than increasing model size or training data and suggesting a promising direction for efficient and accurate molecular design in AI for Science. Future work will focus on improving reaction center prediction and extending this framework to multi-step retrosynthetic planning. Impact Statement This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. Appendix A Detailed Definition and Extraction of Reaction Centers In our framework, the accurate identification of reaction centers is crucial for constructing the positional inductive bias. We implement a rigorous extraction algorithm using RDKit to identify all atoms in the product molecule that undergo chemical changes during the reaction. Specifically, we classify reaction centers into two major groups covering eight distinct types of chemical transformations. Let G_{P} and G_{R} denote the product and reactant graphs, respectively. An atom a (identified by its atom-mapping number) is considered part of the reaction center if it satisfies any of the following criteria: Topological Changes These criteria capture changes in the connectivity or bond types associated with an atom: 1. Formed Bonds : Atom a is part of a bond (a,b) that exists in G_{P} but does not exist in G_{R} . This corresponds to bond formation in the forward reaction (or bond breaking in retrosynthesis). 2. Broken Bonds : Atom a is part of a bond (a,b) that exists in G_{R} but does not exist in G_{P} . This corresponds to bond breaking in the forward reaction (or bond formation in retrosynthesis). 3. Bond Order Changes : Atom a is part of a bond (a,b) that exists in both G_{P} and G_{R} , but its bond type (e.g., single, double, triple, aromatic) differs. Atom Property Changes These criteria capture changes in the intrinsic chemical properties of an atom, even if its local connectivity remains unchanged: 4. Charge Changes : The formal charge of atom a differs between G_{P} and G_{R} . 5. H-Count Changes : The total number of implicit and explicit hydrogen atoms attached to atom a changes (e.g., due to protonation/deprotonation). 6. Chirality Changes : The chiral tag of atom a changes (e.g., inversion of stereochemistry from R to S , or loss/gain of a chiral center). 7. Aromaticity Changes : The aromatic state of atom a changes (e.g., due to ring opening or closure). 8. Hybridization Changes : The orbital hybridization of atom a changes (e.g., sp^{3}\rightarrow sp^{2} ). A.1 Extraction Logic via Atom Mapping Our extraction script systematically compares the product and reactant SMILES based on atom mapping numbers. If any of the above eight changes are detected for an atom, it is flagged as a reaction center. This fine-grained definition ensures that our model captures subtle chemical transformations that might be missed by coarser definitions. The specific implementation using RDKit is provided in Listing . This function returns a dictionary containing lists of product atom indices for each of the eight change categories. ⬇ 1 from rdkit import Chem 2 3 def get_reaction_center ( rxn_smiles ): 4 reactants , _ , products = rxn_smiles . split ( ’>’ ) 5 reactant_mols = [ Chem . MolFromSmiles ( r ) for r in reactants . split ( ’.’ ) if r ] 6 product_mols = [ Chem . MolFromSmiles ( p ) for p in products . split ( ’.’ ) if p ] 7 8 # 1. Build Map: Atom Map Number -> Product Atom Index 9 product_map_to_idx = {} 10 for mol in product_mols : 11 if mol is None : continue 12 for atom in mol . GetAtoms (): 13 map_num = atom . GetAtomMapNum () 14 if map_num : product_map_to_idx [ map_num ] = atom . GetIdx () 15 16 product_atom_maps = set ( product_map_to_idx . keys ()) 17 rc_dict = { k : [] for k in [ ’formed_bonds’ , ’broken_bonds’ , ’bond_order_changes’ , 18 ’charge_changes’ , ’h_count_changes’ , ’chirality_changes’ , 19 ’aromatic_changes’ , ’hybridization_changes’ ]} 20 21 # Helper to extract bond dict: (map1, map2) -> bond_type 22 def get_bond_info ( mols ): 23 bonds = {} 24 for mol in mols : 25 if mol is None : continue 26 for bond in mol . GetBonds (): 27 m1 = bond . GetBeginAtom (). GetAtomMapNum () 28 m2 = bond . GetEndAtom (). GetAtomMapNum () 29 if m1 and m2 : 30 bonds [ tuple ( sorted (( m1 , m2 )))] = bond . GetBondTypeAsDouble () 31 return bonds 32 33 r_bonds = get_bond_info ( reactant_mols ) 34 p_bonds = get_bond_info ( product_mols ) 35 36 # 2. Detect Topological Changes 37 # Formed Bonds (in Product but not Reactant) 38 for bond in set ( p_bonds . keys ()) - set ( r_bonds . keys ()): 39 if bond [0] in product_atom_maps and bond [1] in product_atom_maps : 40 rc_dict [ ’formed_bonds’ ]. append ([ product_map_to_idx [ bond [0]], 41 product_map_to_idx [ bond [1]]]) 42 43 # Broken Bonds (in Reactant but not Product) 44 for bond in set ( r_bonds . keys ()) - set ( p_bonds . keys ()): 45 # Only record atoms that still exist in the product 46 indices = [] 47 if bond [0] in product_map_to_idx : indices . append ( product_map_to_idx [ bond [0]]) 48 if bond [1] in product_map_to_idx : indices . append ( product_map_to_idx [ bond [1]]) 49 if indices : rc_dict [ ’broken_bonds’ ]. append ( indices ) 50 51 # Bond Order Changes 52 for bond in set ( r_bonds . keys ()) & set ( p_bonds . keys ()): 53 if r_bonds [ bond ] != p_bonds [ bond ]: 54 if bond [0] in product_atom_maps and bond [1] in product_atom_maps : 55 rc_dict [ ’bond_order_changes’ ]. append ([ product_map_to_idx [ bond [0]], 56 product_map_to_idx [ bond [1]]]) 57 58 return rc_dict Listing 1: Algorithm for extracting 8 types of reaction centers from atom-mapped SMILES. A.2 Dataset-level Analysis Having defined the eight specific categories of reaction centers, we now analyze their distribution across the datasets to understand the prevalence of different chemical phenomena and data characteristics. Distribution of Reaction Center Types. Figure 4 shows the percentage of reactions containing each type of chemical change across training, validation, and test splits for both USPTO-50k and USPTO-Full. The distributions reveal significant structural differences between the two datasets: • USPTO-50k (Figure 4(a) ): H-count changes are nearly universal ( >91\% ), reflecting the ubiquity of proton transfer. Bond breaking is the second most prevalent ( >93\% ), while formed bonds occur in 71.5% of reactions. Notably, bond order changes are relatively sparse ( \approx 11%), and subtle property changes like chirality ( \approx 6%) and aromaticity ( \approx 2%) remain rare. • USPTO-Full (Figure 4(b) ): A striking distributional shift emerges. While H-count changes remain dominant ( >90\% ), the pattern reverses for topological changes: formed bonds are now most prevalent (78.6%), bond breaking becomes extremely sparse ( \approx 2.2%), and bond order changes play a substantially larger role ( \approx 32%). This suggests USPTO-Full contains different reaction types compared to USPTO-50k. • Consistency across splits : All eight change types show remarkably stable distributions across train, validation, and test splits in both datasets, with variations typically under 1%, confirming proper dataset partitioning. (a) USPTO-50k (b) USPTO-Full Figure 4 : Distribution of Reaction Center Types. Percentage of reactions containing each chemical change type. Note the distinct distributional shifts between datasets, particularly in bond formation/breaking patterns. Figure 5 : Cumulative Reaction Coverage. Change types ordered by prevalence. The top-2 types alone cover over 99% of reactions in both datasets. Coverage Analysis. To assess the completeness of our eight-category definition, Figure 5 plots the cumulative percentage of reactions covered by the top- k change types (ordered by frequency for each dataset). Despite the combinatorial complexity of chemical reactions, coverage saturates remarkably quickly. The top-1 change type alone covers over 90% of reactions in both datasets. By including just the top-2 types, cumulative coverage exceeds 99% across all splits. Specifically: • USPTO-50k : The top-2 types (H-count changes and bond breaking) achieve > 99% coverage, with the curve plateauing by the third type. • USPTO-Full : Similarly, the top-2 types (H-count changes and formed bonds) cover > 99% of reactions, demonstrating that despite the distributional shift, the eight-category framework remains comprehensive. This analysis confirms that our reaction center definition is both chemically intuitive and statistically complete, capturing effectively all reaction patterns in standard benchmarks while revealing important dataset characteristics that may influence model generalization. Critically, this comprehensive coverage addresses a key limitation of prior work. Semi-template methods ( Shi et al. 2020 ) and synthon-based approaches ( Yadav et al. 2025 ) typically consider only two transformation types: formed bonds and broken bonds. While sufficient for USPTO-50k (where these two types have high coverage), this simplified definition fails on USPTO-Full, covering at most 80.8% (78.6% formed + 2.2% broken) of reactions. The remaining 20% involve bond order changes, hybridization changes, and other property modifications that are ignored by these approaches. Our eight-category framework overcomes this limitation, achieving > 99% coverage with just the top-2 types across both datasets, ensuring robust performance regardless of reaction type or dataset distribution. Appendix B Implementation of Rooted Atom Ordering To enforce the positional inductive bias, we leverage the robust canonicalization routines provided by RDKit. The core mechanism relies on the rootedAtAtom argument in the SMILES generation function, which forces the traversal to begin at a specific atom index (assigning it Index 0 in the sequence) while determining the order of the remaining atoms deterministically based on canonical invariants (e.g., Morgan algorithm). We implement two specific variations of this routine for the training and inference phases, respectively. Training Phase. The training data typically contains atom-mapped SMILES. To ensure the model learns from the intrinsic chemical structure rather than arbitrary mapping numbers, we first strip the atom map information before generating the rooted sequence. ⬇ 1 from rdkit import Chem 2 3 def Canonicalize ( smi , root =-1): 4 "" " 5 Clears atom map numbers and generates a canonical/rooted SMILES. 6 Args: 7 smi (str): Input SMILES with atom maps. 8 root (int): Index of the atom to set as the root (Index 0). 9 If -1, standard canonicalization is used. 10 " "" 11 mol = Chem . MolFromSmiles ( smi ) 12 # Clear existing atom maps to ensure clean features 13 for atom in mol . GetAtoms (): 14 if atom . HasProp ( ’molAtomMapNumber’ ): 15 atom . ClearProp ( ’molAtomMapNumber’ ) 16 17 # Generate SMILES rooted at the specific atom 18 return Chem . MolToSmiles ( mol , isomericSmiles = True , rootedAtAtom = root , canonical = True ) Listing 2: Rooted SMILES generation during training (with map clearing). Inference Phase. During inference, the input is a standard product SMILES without ground-truth atom maps. The reaction center predictor outputs the index of the predicted root atom. We directly use this index to reorder the graph. ⬇ 1 def Canonicalize ( smi , root_idx ): 2 "" " 3 Generates a SMILES string rooted at the predicted reaction center. 4 Args: 5 smi (str): Input Product SMILES (canonical). 6 root_idx (int): The index of the predicted reaction center atom. 7 " "" 8 mol = Chem . MolFromSmiles ( smi ) 9 # Force the traversal to start at root_idx 10 # The rest of the graph is ordered canonically by RDKit 11 return Chem . MolToSmiles ( mol , rootedAtAtom = root_idx , canonical = True ) Listing 3: Rooted SMILES generation during inference. This implementation ensures that for any given reaction center, the resulting sequence of atoms is unique, deterministic, and chemically meaningful, providing a stable input for the RetroDiT backbone. Appendix C Probabilistic Decomposition and Training Objectives In this appendix, we provide a detailed derivation of the conditional independence assumptions underlying our discrete flow matching framework for retrosynthesis, and formally present the node-level and edge-level training objectives. C.1 Conditional Independence Decomposition Our framework operates on molecular graphs G=(X,E) , where X=\{x^{(n)}\}_{n=1}^{N} denotes the set of node (atom) features with x^{(n)}\in\mathcal{X} , and E=\{e^{(ij)}\}_{1\leq i