Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 May 13;17(1):72.
doi: 10.1186/s13321-025-00981-x.

Generating diversity and securing completeness in algorithmic retrosynthesis

Affiliations

Generating diversity and securing completeness in algorithmic retrosynthesis

Florian Mrugalla et al. J Cheminform. .

Abstract

Chemical synthesis planning has considerably benefited from advances in the field of machine learning. Neural networks can reliably and accurately predict reactions leading to a given, possibly complex, molecule. In this work we focus on algorithms for assembling such predictions to a full synthesis plan that, starting from simple building blocks, produces a given target molecule, a procedure known as retrosynthesis. Objective functions for this task are hard to define and context-specific. In order to generate a diverse set of synthesis plans for chemists to select from, we capture the concept of diversity in a novel chemical diversity score (CDS). Our experiments show that our algorithm outperforms the algorithm predominantly employed in this domain, Monte-Carlo Tree Search, with respect to diversity in terms of our score as well as time efficiency. SCIENTIFIC CONTRIBUTION: We adapt Depth-First Proof-Number Search (DFPN) (Please refer to https://github.com/Bayer-Group/bayer-retrosynthesis-search for the accompanying source code.) and its variants, which have been applied to retrosynthesis before, to produce a set of solutions, with an explicit focus on diversity. We also make progress on understanding DFPN in terms of completeness, i.e., the ability to find a solution whenever there exists one. DFPN is known to be incomplete, for which we provide a much cleaner example, but we also show that it is complete when reinforced with a threshold-controlling routine from the literature.

Keywords: Chemical diversity score; Computer-Assisted Synthesis Planning (CASP); DFPN; Retrosynthesis.

PubMed Disclaimer

Conflict of interest statement

Declarations. Competing interests: The authors declare no competing financial interest. Bayer AG was part of the MIT-led MLPDS consortium in the years 2018–2022.

Figures

Fig. 1
Fig. 1
The graph G that shows that DFPN is not complete.The molecule nodes and the reaction nodes are depicted as squares and circles, respectively
Fig. 2
Fig. 2
Comparison between DFPN* and MCTS: a Chemical diversity score (CDS) for DFPN* and MCTS routes for different search times. DFPN* routes show significantly higher diversity score throughout all data points (Asymptotic Wilcoxon-Mann-Whitney Test, significance level $\alpha=0.01$, colored boxes correspond to the IQR between the first and third quantile, whiskers go up-to/down-to 1.5 times of the upper/lower bound of the IQR). b For smaller search times (60 s/120 s) the mean number of used reaction over all routes and solved molecules by our DFPN* implementation is 3.5/3.9 vs. 2.6/3.5 for the MCTS implementation. For longer search times this trend reverses and the highest median number of used reactions seen for the DFPN* implementation is 5.1 vs 7.3 for the MCTS implementation (colored boxes correspond to the IQR between the first and third quantile, whiskers go up-to/down-to 1.5 times of the upper/lower bound of the IQR)
Fig. 3
Fig. 3
Mean multiplicative viability score for DFPN* and MCTS routes for different search times. The viability scores for each reaction of a route are multiplied with each other to give the estimated route viability. The respective mean score from each target molecule is given here. Higher values can be associated with a higher likelihood that the particular route will work in the lab. (Colored boxes correspond to the IQR between the first and third quantile, whiskers go up-to/down-to 1.5 times of the upper/lower bound of the IQR)
Algorithm 1
Algorithm 1
search (DFPN with TCA)
Fig. 4
Fig. 4
The graph G from Simpler counter example without TCA section in vertical orientation. Recall that the nodes in V0 and V1 are depicted as squares and circles, respectively, and that W0={v6},W1=
Fig. 5
Fig. 5
The explored part of G right after the expansion of v0
Fig. 6
Fig. 6
The explored part of G at the second visit to v0
Fig. 7
Fig. 7
The explored part of G at the third visit to v0
Fig. 8
Fig. 8
The explored part of G at the fourth visit to v0
Fig. 9
Fig. 9
Fraction of the cumulative number of samples relative to the full data set (red)
Fig. 10
Fig. 10
Top k accuracy and applicability for models trained on transformation classes reweighted according to their size, resulting in the same importance of all classes, and without such reweighting. Reactions found in in-house lab journals are stronger weighted in both cases and for the Applicability metric reactions were checked with our fast filter model
Fig. 11
Fig. 11
Percentage of solved molecules for the DFPN* and MCTS algorithms respectively. Shorter search times favor the DFPN* algorithm
Fig. 12
Fig. 12
Number of unique molecules per Route. The differences of the medians for DFPN* and MCTS are statistically significant for all computing times (Asymptotic Wilcoxon-Mann–Whitney Test, significance level α=0.01). We believe the much broader IQRs in the data generated by the DFPN* are a result of the higher diversity in said data. We assume a superlinear relation between CDS and the number of unique molecules, yielding wider IQRs than those found in the CDS analysis. Due to its mechanism of finding multiple routes via penalizing nodes on the search graph, the DFPN* algorithm is forced to explore a wider variety of molecules. (Colored boxes correspond to the IQR between the first and third quantile, whiskers go up-to/down-to 1.5 times of the upper/lower bound of the IQR, dots represent outliers.)
Fig. 13
Fig. 13
Comparison between DFPN* and MCTS with respect to the minimum and maximum route viability: (left) Minimum multiplicative viability score for DFPN* and MCTS routes for different search times. The viability scores for each reaction of a route are multiplied with each other to give the estimated route viability. The respective minimum score from each target molecule (i.e. the assumably worst route found) is distributed around lower values for the DFPN* than for the MCTS implementation for search times 60 and 120 s. For longer search times both algorithms converge to the approximately same level. (Colored boxes correspond to the IQR between the first and third quantile, whiskers go up-to/down-to 1.5 times of the upper/lower bound of the IQR). (right) Maximum multiplicative viability score for DFPN* and MCTS routes for different search times. The viability scores for each reaction of a route are multiplied with each other to give the estimated route viability. The respective maximum score from each target molecule (i.e. the assumably best route found) is distributed around lower values for the DFPN* than for the MCTS implementation for search times 60, 120, and 300 s. At 600 s the distribution is very similar, while for 900 and 1200~s the trend reverses. (Colored boxes correspond to the IQR between the first and third quantile, whiskers go up-to/down-to 1.5 times of the upper/lower bound of the IQR)

References

    1. Corey EJ, Long AK, Rubenstein SD (1985) Computer-assisted analysis in organic synthesis. Science 228(4698):408–418 - PubMed
    1. Corey EJ (1967) General methods for the construction of complex molecules. Pure Appl Chem 14(1):19–38
    1. Corey EJ, Wipke WT (1969) Computer-assisted design of complex organic syntheses: pathways for molecular synthesis can be devised with a computer and equipment for graphical communication. Science 166(3902):178–192 - PubMed
    1. Chen B, Li C, Dai H, Song L. Retro* (2020) Learning retrosynthetic planning with neural guided A* search. In International Conference on Machine Learning (ICML), 1608–1616
    1. Coley CW, Rogers L, Green WH, Jensen KF (2017) Computer-assisted retrosynthesis based on molecular similarity. ACS Cent Sci 3(12):1237–1245 - PMC - PubMed

LinkOut - more resources