Abstract
Retrosynthetic planning aims to devise a complete multi-step synthetic route from starting materials to a target molecule. Current strategies use a decoupled approach of single-step retrosynthesis models and search algorithms, taking only the product as the input to predict the reactants for each planning step and ignoring valuable context information along the synthetic route. In this work, we propose a novel framework that utilizes context information for improved retrosynthetic planning. We view synthetic routes as reaction graphs and propose to incorporate context through three principled steps: encode molecules into embeddings, aggregate information over routes, and readout to predict reactants. Our approach is the first attempt to utilize in-context learning for retrosynthesis prediction in retrosynthetic planning. The entire framework can be efficiently optimized in an end-to-end fashion and produce more practical and accurate predictions. Comprehensive experiments demonstrate that by fusing in the context information over routes, our model significantly improves the performance of retrosynthetic planning over baselines that are not context-aware, especially for long synthetic routes.
Introduction
Retrosynthesis is often described as the "chess" of organic chemistry. Starting with a complex target molecule, chemists must work backward to identify a sequence of reactions leading to simple, commercially available starting materials. Modern AI-driven retrosynthesis typically employs a decoupled approach: a search algorithm explores potential routes while a single-step model predicts reactants for each node.
However, these single-step models often suffer from a form of "amnesia," ignoring the broader context of the synthetic route. This lack of context can lead to chemically inconsistent proposals. Furthermore, the standard metric for success—the "search success rate"—can be misleading. As shown in Figure 1, models with relatively low single-step prediction accuracy often exhibit disproportionately high search success rates, suggesting that current benchmarks may mask underlying model weaknesses.
The FusionRetro Framework
To address these limitations, we introduce FusionRetro (also referred to as Metro), an end-to-end framework that treats a synthetic route as a reaction graph. By incorporating "in-context learning," FusionRetro allows the model to use surrounding reaction information to inform current predictions. The architecture follows three principled steps:
- Encode: Molecules within the reaction graph are converted into vector embeddings using standard encoders (e.g., Transformers or GNNs).
- Aggregate (The Fusion Step): Using an attention mechanism, the model passes messages along the reaction graph, "fusing" the representation of the current molecule with those of its ancestors in the synthetic route.
- Readout: The model predicts reactants for the current step using this context-aware fused representation.
Experimental Setup and Results
We evaluated FusionRetro using RetroBench, a new benchmark curated from the USPTO-full dataset. RetroBench specifically focuses on multi-step planning, excluding targets that can be synthesized in a single step. To ensure rigorous evaluation, we proposed a set-wise exact match metric, which requires the model to find the correct set of starting materials rather than just any valid route.
Key Findings
- Superior Accuracy: FusionRetro achieved a 37.5% Top-1 exact match accuracy, significantly outperforming the standard Transformer baseline (31.3%).
- Resilience to Route Depth: While most models' performance degrades sharply as synthetic routes lengthen, FusionRetro maintains higher accuracy for deeper routes, proving that context is most valuable for complex planning tasks.
- Template-Free Advancement: FusionRetro narrows the performance gap between flexible template-free approaches and traditionally more accurate template-based models.
Conclusion
By explicitly modeling the relationships between reactions in a synthetic route, FusionRetro demonstrates that context is vital for accurate retrosynthetic planning. This approach reduces error compounding in long sequences and moves AI closer to the holistic thinking of expert process chemists. Future work will focus on integrating context-aware embeddings directly into search heuristics and exploring metrics that better capture chemical plausibility alongside exact matches.
Summary updated