Abstract
The main target of retrosynthesis is to recursively decompose desired molecules into available building blocks. Existing template-based retrosynthesis methods follow a template selection stereotype and suffer from limited training templates, which prevents them from discovering novel reactions. To overcome this limitation, we propose an innovative retrosynthesis prediction framework that can compose novel templates beyond training templates. As far as we know, this is the first method that uses machine learning to compose reaction templates for retrosynthesis prediction. Besides, we propose an effective reactant candidate scoring model that can capture atom-level transformations, which helps our method outperform previous methods on the USPTO-50K dataset. Experimental results show that our method can produce novel templates for 15 USPTO-50K test reactions that are not covered by training templates.
Introduction
Retrosynthesis—the process of working backward from a target molecule to find available starting materials—is a cornerstone of organic chemistry. Machine learning approaches generally fall into two camps: template-free (which generate molecules from scratch) and template-based (which use predefined "rules" or templates extracted from known reactions).
While template-based methods are highly interpretable and chemically robust, they suffer from a major flaw: they can only predict reactions that follow templates seen during training. This "template selection" bottleneck prevents them from discovering novel chemistry. RetroComposer aims to bridge this gap, creating a system that retains the interpretability of templates while gaining the generative flexibility to "invent" new ones by treating templates as modular assemblies of subgraphs.
Methods
RetroComposer operates in two main stages: the Template Composer Model (TCM) and the Reactant Scoring Model (RSM).
Template Composer Model (TCM)
Instead of picking a whole template from a library, the TCM builds one. It first uses a Product Subgraph Selection Model (PSSM) with a Graph Attention Network (GAT) to identify the "reaction center" within the product molecule. A novel Negative Log-Likelihood loss function is used to rank applicable subgraphs. Then, a Reactant Subgraph Selection Model (RSSM) sequentially selects reactant subgraphs to match the product's reaction center. Finally, the system uses the Indigo toolkit to annotate atom movements, stitching subgraphs into a functional template.
Reactant Scoring Model (RSM)
To ensure the predicted reactants are viable, the RSM captures atom-level transformations. It maps atoms between the product and candidate reactants and uses a GAT to learn the specific chemical change (the "delta") at each node. This granular approach provides a stronger distinguishing ability than models relying on global molecular fingerprints.
Results and Discussion
The model was evaluated on the USPTO-50K dataset. RetroComposer established a new state-of-the-art (SOTA) on this benchmark:
- Without Reaction Types: Achieved 54.5% Top-1 accuracy, outperforming the previous best template-based method (GLN) by 2.0%.
- With Reaction Types: Achieved 65.9% Top-1 accuracy.
- Novelty Discovery: Most impressively, the model successfully discovered chemically valid templates for 15 test reactions that were not covered by any templates in the training set.
Limitations
The method relies heavily on accurate atom-mapping. Existing tools like Indigo's automap only successfully annotated about 70% of the training templates, requiring manual intervention. Additionally, scaling to larger, noisier datasets like "USPTO-full" remains challenging due to incorrect mapping numbers in raw data.
Conclusion
RetroComposer demonstrates that by moving from template selection to template composition, machine learning models can achieve both high accuracy and the ability to discover novel chemical reactions. Future work will focus on improving handling of noisy data and refining the subgraph vocabulary to further enhance generative capabilities.
Summary updated