Learning Graph Models for Retrosynthesis Prediction
Authors: Vignesh Ram Somnath
Charlotte Bunne
Connor W. Coley
Andreas Krause
Regina Barzilay
Venue: NeurIPS 2021 Poster (2021)
Keywords: Retrosynthesis
Graph-Neural Networks
Synthons
Computational Chemistry

Abstract: Retrosynthesis prediction is a fundamental problem in organic synthesis, where the task is to identify precursor molecules that can be used to synthesize a target molecule. A key consideration in building neural models for this task is aligning model design with strategies adopted by chemists. Building on this viewpoint, this paper introduces a graph-based approach that capitalizes on the idea that the graph topology of precursor molecules is largely unaltered during a chemical reaction. The model first predicts the set of graph edits transforming the target into incomplete molecules called synthons. Next, the model learns to expand synthons into complete molecules by attaching relevant leaving groups. This decomposition simplifies the architecture, making its predictions more interpretable, and also amenable to manual correction. Our model achieves a top-1 accuracy of 53.7%, outperforming previous template-free and semi-template-based methods.

Learning Graph Models for Retrosynthesis Prediction
Vignesh Ram Somnath !
Charlotte Bunne'
Connor W. Coley?
Andreas Krause
Regina Barzilay²
Department of Computer Science, ETH DDpaarmment of Chemical Engineering, MIT *Computer Science and Artificial Intelligence Lab, MIT
1 {vsomnath, bunnec, krausea)@ethz..ce ch, cccoeyymit. edd,, "reginaccsail. satiisaaallllla................e mit.edu
Abstract
Retrosynthesis prediction a fundamental problem in organic synthesis, where the task is to identify precursor molecules that can be used synthesize target molecule. A key consideration in building neural models for this task is aligning model design with strategies adopted by chemists. Building this paper introduces a graph- based approach that capitalizes on the idea that the graph topology of precursor molecules largely unaltered during a chemical reaction. The model first predicts the set of graph edits transforming the target into incomplete molecules called synthons. Next, the model learns expand synthons into complete molecules by attaching relevant leaving groups. This decomposition simplifies the architecture, making its predictions more interpretable, and also amenable to manual correction. Our model achieves top-1 accuracy of 53.7%, outperforming previous template-free and memi--tmmlltee-bee based methods.
this viewpoint,
Introduction
Retrosynthesis prediction, first formalized by E. J. Corey [Corey, 1991] is fundamental problem in organic synthesis that attempts to identify a series of chemical transformations for synthesizing target molecule. In the single-step formulation, the task is to identify set of reactant molecules given a target. Beyond simple reactions, many practical tasks involving complex organic molecules are difficult even for expert chemists. As result, substantial experimental exploration is needed to cover for deficiencies of analytical approaches. This has motivated interest in computer-assisted retrosynthesis [Corey and Wipke, 1969], with recent surge in machine learning methods [Chen et al., 2019, Coley et al., 2017b, Dai et al., 2019, Zheng et al., 2019, Genheden et al., 2020].
Computationally. the main challenge is how to explore the combinatorial space of reactions that can yield the target molecule. Largely, previous methods for retrosynthesis prediction can be divided into template-based [Coley et al., 201 7b, Dai et al., 2019, Segler and Waller, 2017] and template-free [Chen et al., 2019, Zheng et al., 2019] approaches. Template-
methods match target molecule against a large set of templates, which are molecular subgraph patterns that highlight changes during a chemical reaction. Despite their interpretability, these methods fail to generalize to new reactions. Template-free methods bypass templates by learning direct mapping from the SMILES [Weininger, 1988] representations of the product to reactants. Despite their greater generalization potential, these methods generate reactant SMILES character by character, increasing generation complexity.
35th Conference on Neural Information Processing Systems (NcurIPS 2021).

---

Edit Prediction
N
N
Product
Synthons
Synthon Completion
Br
N-N
Synthons
Reactunts
Figure I: Overview of Our Approach. Edit Prediction. We train model to learn distribution over possible graph edits. In this case, the correct edit corresponds to breaking the bond marked in red. Applying this edit produces two synthons. b. Synthon Completion. Another model is trained to pick candidate leaving groups (blue) for each synthon from discrete vocabulary, which are then attached to produce the final reactants.
Another important consideration in building retrosynthesis models is aligning model design with strategics adopted by expert chemists. These strategies are influenced by fundamental properties of chemical reactions, independent of complexity level: (i.) the product atoms are always subset of the reactant atoms', and (ii.) the molecular graph topology is largely unaltered from products to reactants. For example, in the standard retrosynthesis dataset, only 6.3% of the atoms in the product undergo any change in connectivity.
This consideration has received more attention in recent semi-template-bee Yan et al., 2020], that generate reactants from a product two stages: (i.) first identify intermediate molecules called synthons, (ii.) and then complete synthons into reactants by sequential generation of atoms or SMILES characters.. Our model GRAPHRETRO also uses a similar workflow. However, we avoid sequential generation for completing synthons by instead selecting subgraphs called leaving groups from precomputed vocabulary. This vocabulary is constructed during preprocessing by extracting subgraphs that differ between synthon and the corresponding reactant. The vocabulary has a small size (170 for USPTO-50K) indicating remarkable redundancy, while covering 99.7% of the test set. Operating the level of these subgraphs greatly reduces the complexity of reactant generation, with improved empirical performance. This formulation also simplifies our architecture, and makes our predictions more transparent, interpretable and amenable manual correction.
methods [Shi al., 2020,
The benchmark dataset for evaluating retrosynthesis models USPTO-50k [Schneider et al., 2016), which consists of 50000 reactions across 10 reaction classes. The dataset contains unexpected shortcut towards predicting the edit, in that the product atom with atom- mapping 1 is part of the edit in 75% of the cases, allowing predictions that depend the position of the atom overestimate performance. We canonicalize the product SMILES and remap the existing dataset, thereby removing the shorteut. On this remapped dataset, GRAPHRETRO achieves top-1 accuracy of 53.7% when the reaction class is not known, outperforming both template- frre and semi-template-bart -ased methods.
2 Related Work
Retrosynthesis Prediction Existing machine learning methods for retrosynthesis prediction can be divided into template-based, template-free and recent semi-template-basee approaches.
Template-Bact Based:: Templates are either hand-crafted by experts [Hartenfeller al., 201 Szymkué et al., 2016], or extracted algorithmically from large databases Coley et al. [2017a], Law et al. [2009]. Exhaustively applying large template sets is expensive due to the involved subgraph
'ignoring impurities

---

matching procedure. Template-baseer methods therefore utilize different ways of prioritizing templates, by either learning a conditional distribution over the template set [Segler and Waller, 2017], ranking templates based on molecular similarities to precedent reactions [Coley et al., 2017b] or directly modelling the joint distribution of templates and reactants using logic variables [Dai et al., 2019]. Despite their interpretability, these methods fail to generalize outside their rule set.
Template-Fres Free: Template-fre methods [Liu al., 2017, Zheng et al., 2019, Chen al., 2019] learn a direct transformation from products to reactants using architectures from neural machine translation and a string based representation of molecules called SMILES [Weininger, 1988]. Linearizing molecules as strings does not utilize the inherently rich chemical structure. In addition, the reactant SMILES are generated from scratch, character by character. Attempts have been made to improve validity by adding syntax correcter [Zheng et al., 2019] and a mixture model to improve diversity of suggestions [Chen et al., 2019], but the performance remains worse than [Dai et al., 2019] on the standard retrosynthesis dataset. Sun et al. [2021] formulate retrosynthesis using energy-based -base models, with additional parameterizations and loss terms to enforce the duality between forward (reaction prediction) and backward (retrosynthesis) prediction.
Semi Weeeeeea---aseeeeee Our work is closely related to recently proposed semi-template-bue -baed methods [Shi al., 2020, Yan et al., 2020], which first identify synthons and then expand synthons into reactants through sequential generation using either graph generative model [Shi et al., 2020] or Transformer (Yan al., 2020]. To reduce the complexity of reactant generation, we instead complete synthons using subgraphs called leaving groups selected from precomputed vocabulary. This allows us to view synthon completion as a classification problem instead of a generative We also utilize the dependency graph between possible edits, and update edit predictions using a message passing network (MPN) [Gilmer et al., 2017] on this graph. Both innovations together yield 4.8% and 3.3% performance improvement respectively over previous semi-template-bart baased methods.
Reaction Center Identification The reaction center covers small number of participating atoms involved in the reaction. Our work is also related to models that predict reaction outcomes by learning to rank atom pairs based on their likelihood be in the reaction center [Coley al., 2019, Jin et al., 2017]. The task of identifying the reaction center is related to the step of deriving the synthons in our formulation. Our work departs from [Coley al., 2019, Jin et al., 2017] as we utilize the property that new bond formations occur rarely (-0.1 ()) from products to synthons, allowing us to predict score only for existing bonds and atoms and reduce prediction complexity from O to O(N). We also utilize the dependency graph between possible edits, and update edit predictions using a MPN on this graph.
Utilizing Substructures Substructures have been utilized in various tasks from sentence generation by fusing phrases to molecule generation and optimization [Jin et al., 2018, 2020]. Our work is closely related to [Jin al., 2020] which uses precomputed substructures building blocks for property-condittoned molecule generation. However, instead of precomputing, synthons aanalggous building blocks for reactants are indirectly learnt during training.
Model Design
Our approach leverages the property that graph topology is largely unaltered from products to reactants. To achieve this, we first derive suitable building blocks from the product called synthons, and then complete them into valid reactants by adding specific functionalities called leaving groups. These derivations, called edits, are characterized by modifications bonds or hydrogen counts on atoms. We first train neural network to predict score for possible edits (Section 3.1). The edit with the highest score is then applied the product obtain synthons. Since the number of unique leaving groups are small, we model leaving group selection as a classification problem over a precomputed vocabulary (Section 3.2). To produce candidate reactants, we attach the predicted leaving group to the corresponding synthon through chemically constrained rules. The overall process is outlined in Figure 1. Before describing the two modules, we introduce relevant preliminaries that set the background for the remainder of the paper.
3

---

Retrosynthesis Prediction A retrosynthesis pair R is described by pair of molecular graphs (G,, G.). where Gp are the products and G, the reactants. molecular graph described as G (V. E) with atoms V as nodes and bonds & as edges. Prior work has focused on the single product case, while reactants can have multiple connected components, i.e. 9, {gr.)==1 Retrosynthesis pairs are atom-mapped so that each product atom has a unique corresponding reactant atom. The retrosynthesis task then, is to infer {Gr JC given Gp.
Edits Edits consist of (i.) atom pairs {(a; aj)} where the bond type changes from products to reactants, and (ii.) atoms {as} where the number of hydrogens attached to the atom change from products to reactants. We denote the set of edits by E. Since retrosynthesis pairs in the training set are atom-mapped edits can be automatically identified by comparing the atoms and atom pairs in the product their corresponding reactant counterparts.
Synthons and Leaving Groups Applying edits E to the product 9p results in incomplete molecules called synthons. Synthons are analogous to rationales or building blocks, which are expanded into valid reactants by adding specific functionalities called leaving groups that are responsible for its reactivity. We denote synthons by G3 and leaving groups by Gt. We further assume that synthons and leaving groups have the same number of connected components as the reactants, i.e G.- (G., )C and Gi = [Gt Jc- This assumption holds for 99.97% reactions in the training set.
Formally, our model generates reactants by first predicting the set of edits E that transform Gp into g.. followed by predicting leaving group Gr, to attach to each synthon G..- The model is defined as
P(G.
Σ ((Gl,) E.G
where G. G. are deterministic given E, Gr, and Gp-
3.1 Edit Prediction
For given retrosynthesis pair = (Gp. Gr), we predict an edit score only for existing bonds and atoms, instead of every atom pair as in [Coley et al., 2019, Jin et al., 2017]. This choice is motivated by the low frequency (-0.1% 1%) of new bond formations in the training set examples. Coupled with the sparsity of molecular graphs, this reduces the prediction complexity from O(N2) to O(N) for product with N atoms. Our edit prediction model has variants tailored to single and multiple edit prediction. Since 95% of the training set consists of single edit examples, the remainder of this section describes the setup for single edit prediction. A detailed description of our multiple edit prediction model can be found in Appendix ??.
Each bond (u, v) in Gp is associated with a label Burk {0, 1} indicating whether its bond type k has changed from the products to reactants. Each atom is associated with a label yı. {0, 1} indicating a change in hydrogen count. We predict edit scores using representations that are learnt using a graph encoder.
Graph Encoder To obtain atom representations, we use a variant of the message passing network (MPN) deseribed in [Gilmer al., 2017]. Each atom has a feature vector x., indicating its atom type, degree and other properties. Each bond (u, v) has feature vector X.v indicating its aromaticity, bond type and ring membership. For simplicity, denote the encoding process by MPN(-) and describe architectural details in Appendix ??. The MPN computes atom representations (c.ul u E 9} via
{c = MPN(G, {x,}. (XwrTeeN((())
(2)
where (u) denotes the neighbors of atom The graph representation Cg is aggregation of atom
representations, i.c. Cg = Euev Cu- When has connected components { we get a set of graph representations {cg,), ). For bond (u, v). we define its representation Cue = (ABS(c.,, c,, ]] c., + C.).
where ABS denotes absolute difference and refers to concatenation. This ensures our representations are permutation invariant. These representations are then used to predict atom and bond edit scores using corresponding neural networks,

---

Ua T (W W +
(3)
Suck uk =u T(WKCor bk),
(4)
where 7(-) is the ReLU activation function.
Updating Bond Edit Scores Unlike a typical classification problem where the labels are indepen- dent, edits can have possible dependencies between each other. For example, bonds part of stable system such as an aromatic ring have greater tendency to remain unchanged (label 0). We attempt leverage such dependencies to update initial edit scores. To this end, we build graph with bonds (u, v)) as nodes, and introduce an edge between bonds sharing an atom. We use another MPN(.) on this graph to learn aggregated neighborhood messages muss and update the edit scores Sank manner similar to how LSTMs update representations,
Juok a (W x + W. km m
(W kxx + Wi km m m Muuk Um (W xxx + W
buok o (
km m
mare
Suck fack Suvk + buck myek-
Training
We train by minimizing the cross-entropy loss over possible bond and atom edits
C. - Σ (9p, E) ((UD)),)EE
Σ
Vavklog(Swokk
Σ MEE
yalog(su)
The cross-entropy loss enforces the model to learn distribution possible edits instead of reasoning about each edit independently, as with the binary cross entropy loss used in [Jin et al., 2017, Coley et al., 2019].
3.2 Synthon Completion
Synthons are completed into valid reactants by adding specific functionalities called leaving groups. This involves two complementary tasks: (i.) selecting the appropriate leaving group, and (ii.) attaching the leaving group the synthon. As ground truth leaving groups not directly provided, extract the leaving groups and construct a vocabulary X' of unique leaving groups during preprocessing.
The vocabulary has a limited size (I.Y) 170 for standard dataset with 50. 000 examples, and 72000 synthons) indicating the redundancy of leaving groups used in accomplishing retrosynthetic transformations. This redundancy also allows us to formulate leaving group selection as a classi- fication problem over X, while retaining the ability to generate diverse reactants using different combinations of leaving groups.
Vocabulary Construction Before constructing the vocabulary, we align connected components of synthon and reactant graphs by comparing atom mapping overlaps. Using aligned pairs 9s, (V.,, Es.) and Gr, (Vr, Er.) as input, the leaving group vocabulary X' is constructed by extracting subgraphs Gr, (V,,, EL.) such that Vr, Vr. V... Atoms {a,} in the leaving groups that attach to synthons are marked with a special symbol. We also add three tokens to X' namely START, which indicates start of synthon completion, END, which indicates that there no leaving group to add and PAD, which is used to handle variable numbers of synthon components in minibatch.
Leaving Group Selection For synthon component S C. where C is the number of connected components in the synthon graph, we use three inputs for leaving group selection the product representation cg,, the synthon component representation cg., and the leaving group representation for the previous synthon component, er. 1. The product and synthon representations are learnt using the MPN(.). For each &; E X, representations can be learnt by either training independent embedding vectors (ind) or by treating each v; as a subgraph and using the MPN(-) (shared). In the shared setting, we use the same MPN(-) as the product and synthons.
5

---

The leaving group probabilities are then computed by combining Cg,, Cg.g and Cle-1 via a single layer neural network and softmax function
Ø = softmax (UT (WICe, + W2c0. + ()ee(-)))
(10)
where @t. distribution learnt over X. Using the representation of the previous leaving group er. allows the model to understand combinations of leaving groups that generate the desired product from the reactants, We also include the product representation cg2 as the synthon graphs are derived from the product graph.
Training For step e, given the one hot encoding of the true leaving group qt we minimize the cross-entropy loss
C C. = Σ C(i 9.).
(II)
Training utilizes teacher-forcing [Williams and Zipser, 1989] so that the model makes predictions given correct histories. During inference, at every step, we use the representation of leaving group from the previous step with the highest predicted probability.
Leaving Group Attachment Attaching leaving groups to synthons a deterministic process and not learnt during training. The task involves identification of the type of bonds add between attaching atoms in the leaving group (marked during vocabulary construction), and the atom(s) participating in the edit. These bonds can be inferred by applying the valency constraint, which determines the maximum number of neighbors for each atom. The attachment process does not modify any stereochemistry. Given synthons and leaving groups, the attachment process has 100% accuracy. The detailed procedure is described in Appendix ??.
3.3 Inference
Inference is performed using beam search with a log-liielihood scoring function. For beam width n, we select n edits with highest scores and apply them to the product to obtain n synthons, where each synthon consist of multiple connected components. The synthons form the nodes for beam search. Each node maintains a cumulative score by aggregating the log-likelihoods of the edit and predicted leaving groups. Leaving group inference starts with connected component for each synthon, and selects n. leaving groups with highest logllikellhoods. From the n² possibilities, we select n nodes with the highest cumulative scores. This process is repeated until all nodes have leaving group predicted for each synthon component.
Evaluation
Evaluating retrosynthesis models is challenging as multiple sets of reactants can be generated from the same product. To deal with this, previous works [Coley et al., 2017b, Dai et al., 2019] evaluate the ability of the model recover retrosynthetic strategies recorded in the dataset.
Data We use the benchmark dataset USPTO-500 -0kk [Schneider et al., 2016] for all our experiments. The dataset contains 50, 000 atom-mapped reactions across 10 reaction classes. We use the same dataset version and splits as provided by [Dai et al., 2019]. The USPTO-50K dataset contains shorteut in that the product atom with atom-mapping is part of the edit -55% of the cases. If the product SMILES is not canonicalized, predictions utilizing operations that depend on the position of the atom bond will be able use the shortcut, and overestimate performance. We canonicalize the product SMILES, and reassign mom-mappings to the reactant atoms based the canonical ordering, which removes the shorteut. Details on the remapping procedure can be found in Appendix ??
We use the top-n accuracy (n = 1, 5, 10) as our evaluation metric, defined as the fraction of examples where recorded reactants are suggested by the model with rank S n. Follow- ing prior work [Coley et al., 2017b, Zheng et al., 2019, Dai et al., 2019], compute the accuracy
Evaluation

---

Table 1: Top-n exact match accuracy. Best values within each section are highlighted in bold.
Top-n Accuracy
(%
Model
Reaction class known
Reaction class unknown
5
10
10
Template-Based
RETROSIM [Coley 2017b]
52.9
73.8
81.2
88.1
37.3
54.7
63.3
74.1
NEURALSYM [Segler and Waller, 2017]
55.3
76.0
81.4
85.1
44.4
72.4
78.9
GLN [Dai et al., 2019]
64.2
79.1
85.2
90.0
52.5
69.0
75.6
83.7
DUALTB [Sun et al., 2021]
67.7
84.8
88,9
92.0
55.2
74.6
80.5
86.9
Template-Free
SCROP IZheng et al., 2019]
59.0
74.8
78.1
81.1
43.7
60.0
65.2
68.7
LN-TRANSFORMER [Chen et al., 2019]
40.5
65.1
72.8
79.4
DEALTT [Sun et al., 2021]
65.7
81.9
84.7
85.9
53.6
70.7
74.6
77.0
Semi- Soni-Template-Beee
G2Gs [Shi et al., 2020]
61.0
81.3
86.0
88.7
48.9
67.6
72.5
75.5
RETROXPERT [Yan al., 2020]
62.1
75.8
78.5
80.9
50.4
61.1
62.3
63.4
GRAPHRETRO (ours)
63.9
81.5
85.2
88.1
53.7
68.3
72.2
75.5
by comparing the canonical SMILES of predicted reactants the ground truth. Atom-mappinn is excluded from this comparison, but stereochemistry. which describes the relative orientation of atoms in the molecule, is retained. The evaluation is carried out for two settings, with the reaction class being known or unknown.
Baselines For evaluating overall performance, we compare GRAPHRETRO to nine baselines four template-based, three template-free, and two semi-template-based methods. These include:
Template Bamplate-Based:: RETROSIM Coley et al. [2017b] ranks templates for given target molecule by computing molecular similarities to precedent reactions. NEURALSY: [Segler and Waller, 2017] trains a model to rank templates given a target molecule. GLN [Dai et al., 2019] models the joint distribution of templates and reactants in hierarchical fashion using logic variables. DUAL.B [Sun et al., 2021] uses an energy-based model formulation for retrosynthesis, with additional parameterizations and loss terms enforce the duality between forward (reaction prediction) and backward (retrosynthesis prediction). Inference is carried out using reactant candidates obtained the products.
by applying an extracted template
Template-Free SCROP [Zheng et al., 2019], LV- TRANSFOORRE [Chen et al., 2019] and DUALTF [Sun et al., 2021] use the Transformer architecture [Vaswani et al., 2017] to output reactant SMILES given a product SMILES. To improve the validity of their suggestions, SCROP in- clude second Transformer that functions latent variable mixture model to improve diversity of suggestions. DUALTF utilizes additional parameterizations and loss terms enforce the duality between forward (reaction prediction) and backward (retrosynthesis prediction).
syntax correcter. L.Y-TRANSFORMER uses
Semi-Template Basee:: G2Gs [Shi et al., 2020] and RETROXPERT [Yan al., 2020] first identify synthons, and then expand the synthons into reactants by either sequential generation of atoms and bonds (G2Gs), or using the Transformer architecture (RETROXPERT). The training dataset for the Transformer in (Yan et al., 2020] is augmented with incorrectly predicted synthons with the goal of learning correction mechanism.
Results for NEURALSYM are taken from [Dai et al., 2019]. The authors [Yan et al., 2020] report their performance being affected by the dataset leakage". Thus, the most recent results from their website on the canonicalized dataset. For remaining baselines, we directly use the values reported in their paper. For the synthon completion module, the ind configuration given its better empirical performance.

---

4.1 Overall Performance
Reaction class unknown As shown in Table 1, when the reaction class is unknown, GRAPHRETRO outperforms G2Gs by 4.8% and and RETROXPERT by 3.3% in top-1 accuracy. Performance improvements are also seen for larger n. except for n = Barring DUALTB, the top-1 accuracy is also better than other template-free and template-based methods. For larger n,, one reason for lower top-n accuracies than most template-base of leaving group patterns. In contrast, model learns to discover these during training. A second hypothesis to this end is that simply adding log-likelihood scores from edit prediction and symthon completion models may be suboptimal and bias the beam search in the direction of the more dominating term. We leave to future work to investigate scoring functions that rank the attachment.
methods is that templates already contain combinations
Reaction class known When the reaction class is known, GRAPHRETRO outperforms G2Gs and RETROXPERT by a margin of 3% and 2% respectively in top-1 accuracy. GRAPURETRO also outperforms all the template-fie free methods in top-n accuracy. for GRAPHRETRO are also better than most template-bel based and template- free methods. When the reaction class is known, RETROSIM and GLN restrict template sets corresponding the reaction class, thus improving performance. The increased edit prediction performance (Section 4.2) for GRAPHRETRO helps outweigh this factor, achieving comparable better performance till 5.
4.2 Individual Module Performance
To gain more insight into the working of GRAPHRETRO, we evaluate the top-n accuracy (n 1, 2. 3, 5) of edit prediction and synthon completion modules, along with corresponding ablation studies, with results shown in Table 2.
Edit Prediction For the edit prediction module, we compare the true edit(s) to top-n edits predicted by the model. We also consider two ablation studies, one where we directly use the initial edit scores without updating them, and the other where we predict edits using atom-pairs instead of existing bonds and atoms. Both design choices lead to improvements in performance, as shown Table We hypothesize that the larger improvement compared to edit prediction using atom-pairs is due to the easier optimization procedure, with lesser imbalance between labels and
Synthon Completion For evaluating the synthon completion module, we first apply the true edits to obtain synthons, and compare the true leaving groups top-n leaving groups predicted by the model. We test the performance of both the ind and shared configurations. Both configurations perform similarly, and are able identify 97% (close to its upper bound of 99.7%) of the true leaving groups in its top-5 choices, when the reaction class is known. The top-1, and 5 accuracies of the synthon completion for unknown reaction classes for G2Gs are 61.1%, 81.5% and 86.7% respectively, while ours are 75.6%. 92.5% and 96.1%, indicating 10-14% performance improvement using a classification formulation over the generative one adopted by G2Gs.
Table 2: Performance Study of edit prediction and synthon completion modules
Top-n Accuracy (%)
Setting
Reaction class known
Reaction class unknown
2
3
5
1
2
5
Edit Prediction
84.6
92.2
93.7
94.5
70.8
85.1
89.5
92.7
without edit score updates
84.3
92.1
93.7
94.5
70.1
84.8
89.4
92.6
predicting on atom pairs
81.9
89.5
90.9
92.1
68.6
83.2
88.3
91.8
Synthon Completion (ind)
77.4
89.5
94.2
97.6
75.6
87.4
92.5
96.1
Synthon Completion (shared)
76.9
89.6
93.9
97.4
74.9
87.7
92.9
96.3

---

4.3 Example Predictions
In Figure 2, we visualize the model predictions and the ground truth for three cases. Figure 2a shows an example where the model identifies both the edits and leaving groups correctly. In Figure 2b, the correct edit is identified but the predicted leaving groups are incorrect. We hypothesize this due to the fact that in the training set, leaving groups attaching to the carbonyl carbon (C=O) are small (e.g. -OH, 22 halides). The true leaving group in this example, however, large. The model is unable to reason about this and predicts the small leaving group -I. In Figure 2c, the model identifies the edit and consequently the leaving group incorrectly. This highlights a limitation of our model. If the edit is predicted incorrectly, the model cannot suggest the true precursors.
4.4 Limitations
The simplified and interpretable construction of GRAPHRETRO comes with certain limitations. First, the overall performance of the model is limited by the performance of the edit prediction step. If the predicted edit is incorrect, the reactants cannot be salvaged. This limitation is partly remedied by our model design, that allows for user intervention to correct the edit. Second, our method is reliant on atom-mapping for extracting edits and leaving groups. Extracting edits directly based on substructure matching currently suffer from false positives, and heuristics to correct for these result in correct edits in only ~90% of the cases. Third, our formulation assumes that we have as many synthons as reactants, which is violated in some reactions. We leave it to future work to extend the model realize single reactant from multiple synthons, and introduce more chemically meaningful edit correction mechanisms.
Product
True Renetants
Predicted Reactonts
Br
Br
Product
Predicted
HN
HN
HO
Product
Predicted
Figure 2: Example Predictions. The true edit and incorrect edit (if any) are highlighted in green and red respectively. The true and predicted leaving groups are highlighted in blue. a. Correctly predicted example by the model. b. Correctly predicted edit but incorrectly predicted leaving groups. e. Incorrectly predicted edit and leaving group.
Conclusion
Previous methods for single-step retrosynthesis either restrict prediction to template set, are insensitive to molecular graph structure or generate molecules from scratch. We address these shortcomings by introducing graph-based semi-template-basee model inspired by chemist's

---

workflow, enhancing the interpretability of retrosynthesis models. Given a target molecule, we first identify synthetic building blocks (synthons) which are then realized into valid reactants, thus avoiding molecule generation from scratch. Our model outperforms previous semi-template methoos by significant margins on the benchmark dataset. Future work aims to extend the model realize single reactant from multiple synthons, and introduce more chemically meaningful components to improve the synergy between such tools for retrosynthesis prediction and a practitioner's expertise.
Acknowledgements
This research was supported by the Machine Learning for Pharmaceutical Discovery and Synthesis Consortium at MIT. V.R.S. was also supported by the Zeno Karl Schindler Foundation. C.B. was supported by the Swiss National Science Foundation under the National Center of Competence in Research (NCCR) Catalysis under grant agreement SINF40 180544. We thank the Leonhard scientific computing cluster at ETH Zürich for providing computational resources.
References
B. Chen, T. Shen, T. S. Jaakkola, and R. Barzilay. Learning to Make Generalizable and Diverse Predictions for Retrosynthesis. In Submission, 2019.
C. W. Coley, R. Barzilay, T. S. Jaakkola, W. H. Green, and K. F. Jensen. Prediction of Organic Reaction Outcomes Using Machine Learning. In ACS Central Science, ACS Publications, 2017a.
C. W. Coley, L. Rogers, W. H. Green, and K. Jensen. Computer-Assisted Retrosynthesis Based on Molecular Similarity. ACS Central Science, 3, 2017b.
C. W. Coley, W. Jin, L. Rogers, T. F. Jamison, T. S. Jaakkola, W. H. Green, R. Barzilay, and K. F. Jensen. A graph-convolutional neural network model for the prediction of chemical reactivity. Chemical Science, 10, 2019.
E. Corey and W. T. Wipke. Computer-assister design of complex organic syntheses. Science, 166 (3902):178-19))) 1969.
E. Corey. The Logic of Chemical Synthesis: Multistep Synthesis of Complex Carbogenic Molecules (Nobel Lecture). Angewandte Chemie International Edition, 30, 1991.
H. Dai, Li, C. Coley, Dai, and L. Song. Retrosynthesis Prediction with Conditional Graph Logic Network. In Advances in Neural Information Processing Systems (NeurIPS), volume 32, 2019.
S. Genheden, A. Thakkar, V. Chadimová, J.-L. Reymond, O. Engkvist, and E. Bjerrum. Aizyn- thfinder: fast, robust and flexible open-source software for retrosynthetic planning. Journal of cheminformatics, 12(1):1-9, 2020.
J. Gilmer, S. S. Schoenholz, P. F. Riley, O. Vinyals, and G. E. Dahl. Neural Message Passing for Quantum Chemistry. In International Conference on Machine Learning (ICML), volume 70, 2017.
M. Hartenfeller, M. Eberle, P. Meier, C. Oberhbbbe K.-H. Altmann, G. Schneider, E. Jacoby, and S. Renner. A Collection of Robust Organic Synthesis Reactions for In Silico Molecule Design. In Journal of Chemical Information and Modeling. volume 51. ACS Publications, 2011.
W. Jin, C. Coley, Barzilay, and T. Jaakkola. Predicting Organic Reaction Outcomes with Weisfeiler- Lehman Network. In Advances in Neural Information Processing Systems (NeurIPS), volume 30, 2017.
W. Jin, R. Barzilay, and T. Jaakkola. Junction Tree Variational Autoencoder for Molecular Graph Generation. In International Conference Machine Learning (ICML), volume 32, 2018.
Jin, R. Barzilay, and T. Jaakkola. Composing Molecules with Multiple Property Constraints, In International Conference on Machine Learning (ICML), 2020.
10

---

J. Law, Z. Zsoldos, A. Simon, D. Reid, Y. Liu, S. Y. Khew, A. P. Johnson, S. Major, R. A. Wade, and H. Y. Ando. Route Designer: A Retrosynthetic Analysis Tool Utilizing Automated Retrosynthetic Rule Generation. Journal of Chemical Information and Modeling, 49, 2009.
B. Liu, B. Ramsundar, P. Kawthekar, J. Shi, J. Gomes, Q. Luu Nguyen, S. Ho. J. Sloane, P. Wender, and V. Pande. Retrosynthetic Reaction Prediction Using Neural Sequence-to-Seqqeee Models. In ACS Central Science, volume ACS Publications, 2017.
N. Schneider, N. Stiefl, and G. A. Landrum. What's What: The (Nearly) Definitive Guide to Reaction Role Assignment. In Journal of Chemical Information and Modeling, volume 56. ACS Publications, 2016.
M. H. Segler and M. Waller. Neural-Symbolic Machine Learning for Retrosynthesis and Reaction Prediction. Chemistry-A European Journal, 23, 2017.
C. Shi, M. Xu, H. Guo, M. Zhang, and J. Tang. A graph to graphs framework for retrosynthesis prediction, 2020.
R. Sun, H. Dai, L. Li, S. Kearnes, and B. Dai. Energy-based view of retrosynthesis, 2021. URL
S. Szymkué, E. Gajewska, T. Klucznik, K. Molga, P. Dittwald, M. Startek, M. Bajezyk, and B. A. Grzybowski. Computer-assisted synthetic planning: The end of the beginning. Angewandle Chemie International Edition, 55020):594--5937 2016.
A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is All You Need. In Advances in Neural Information Processing Systems (NeurIPS), volume 30, 2017.
D. Weininger. SMILES, Chemical Language and Information System. Journal of Chemical Information and Computer Sciences, 28, 1988.
R. J. Williams and D. Zipser. A Learning Algorithm for Continually Running Fully Recurrent Neural Networks. Neural Computation, volume 1. MIT Press, 1989.
C. Yan, Q. Ding, Zhao, S. Zheng, J. YANG, Y. Yu, and J. Huang. Retroxpert: Decompose retrosyn- thesis prediction like chemist. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 1124--1225, Curran Associates, Inc., 2020. URL https: Paper pdf.
S. Zheng, J. Rao, 7. Zhang, J. Xu, and Y. Yang. Predicting Retrosynthetic Reactions using Self- Corrected Transformer Neural Networks. Journal of Chemical Information and Modeling. ACS Publications, 2019.


Reviews:
[{"review_id": "xz8QkAXP5_C", "reviewer": "Reviewer_bGnx", "summary": "This paper proposes a new retrosynthetic prediction model using neural networks. The algorithm proposed to make the prediction based on breaking the target product into synthons and adding leaving groups to the synthons. The main difference of the proposed algorithm to the existing synthon-based retrosynthetic model is on introducing the vocabulary of leaving groups to complete the synthons in an efficient way.  Extensive evaluation verifies that the proposed method is competitive with the existing algorithms, and each algorithmic component plays a meaningful role.", "questions": "", "limitations": "", "rating": 6, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "This paper proposes a solid idea to using leaving groups to simplify the procedure of completing the synthons obtained from the target molecule. Additional neural architecture to better predicts the bond edit score seems like a useful trick. Although the performance is not strictly state-of-the-art (when compared to DualTF), I think the proposed idea is meaningful enough to be published at the NeurIPS conference.\n\nComments and questions:\n- It seems that the proposed method underperforms when compared to DualTF although it uses an additional knowledge of synthons. Still, I do not think this is a critical weakness since the DualTF idea (enforcing duality) is quite general and applicable to the proposed model.\n- I suggest the authors to make reference to [Cai et al., 2020] who used line graphs to make link prediction using graph neural network. The line graph is exactly the same graph used for updating bond edit scores, i.e., a graph with bond as nodes and edges between bonds sharing an atom. \n- Title and naming (GraphRetro) of the algorithm can be improved. They do not give much information about the proposed idea. ", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "The authors adequately addressed the limitations and potential negative societal impact of their work.", "review_text": "", "extra_scores": {"needs_ethics_review": "No", "ethics_review_area": "", "time_spent_reviewing": "2"}, "extra_text": {}}, {"review_id": "s4r-5Sc2x7H", "reviewer": "Reviewer_okuQ", "summary": "This paper deals with molecular graph generation via synthon, incomplete molecular graphs. \nUnlike existing works, this paper formulates the completion of incomplete molecular graphs not as a generation problem but as a classification problem to select one of a set of pre-computed leaving groups fragments.\nThe training and evaluation are performed using the standard dataset USPTO-50k. The proposed model has high retrosynthesis performance, covering a large number of responses with a small set of leaving groups.", "questions": "", "limitations": "", "rating": 5, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "## Originality: \n\nGraph retrosynthesis based on synthon was proposed by [20], and this paper is its follower. Therefore, this paper does not propose a new paradigm to the retrosynthesis problem.\nHowever, unlike [20, 26], which has been sticking to the graph generation model, the switch to the problem of identifying the missing parts is novel.\n\nRecently AIzynthfinder has become a hot topic as a free and powerful retrosynthesis engine.\nEven if NeurIPS is purely a place for research in machine learning theory (which I don't think it is), I think retrosynthesis works should cite and comment on this engine. \n\n- Thakkar A, Kogej T, Reymond J-L, et al (2019) Datasets and their influence on the development of computer assisted synthesis planning tools in the pharmaceutical domain. Chem Sci. https://doi.org/10.1039/C9SC04944D\n- Genheden S, Thakkar A, Chadimova V, et al (2020) AiZynthFinder: a fast, robust and flexible open-source software for retrosynthetic planning. J. Cheminf. https://jcheminf.biomedcentral.com/articles/10.1186/s13321-020-00472-1\n\n## Quality:\nTechnical contents are sound. In Sec. 4.4, the limitations are analyzed in a detailed manner. this is a plus. \n\n## Clarity:\nThis paper lacks an explanation of the background knowledge of the retrosynthesis problem. Therefore, it may be almost incomprehensible for readers who have no prior knowledge of this problem.\nIn addition, some readers may find it difficult to understand the network architecture (Eqs. (2-8)), because the intuition why this configuration was chosen is not described.\n\n## Significance: \nClassification problems are generally less complex than generative problems. Therefore, I expected good experimental results. \nUnfortunately, the reported results are not clearly superior to the seminal work of [20].\n\nThe graph-to-graph method needs to perform atom mapping in advance. On the other hand, the SMILES-focused template-free method does not require such analysis. Table 1 also shows that DualTF [21], which is a template-free method, outperforms synthon-based methods including the proposed method, especially in class unknown cases.\n\nTherefore, I have to say that it is difficult to convincingly argue the necessity of the novel proposal to solve the retrosynthesis by leaving group classification. \n\n(+) novel classification formulation of retrosynthesis\n(-) lack of explanations in basic retrosynthesis problem\n(--) experimental results are weak\n\n## After author feedbacks\n\nFirst of all, I would like to thank the authors for their efforts for detailed feedbacks. \nFeedbacks resolve some of my concerns. \n\nAt the same time, I still have a concern about experimental performances. As explained in the submitted manuscript and the feedbacks, the performance of the entire retrosynthesis is largely affected by the edit prediction. I understand the effectiveness of the proposed framework for the synthon completion subproblem, but its impact on the main retrosynthesis problem is mixed: sometimes win and sometimes lose against the G2Gs baseline. \n\nGiven these, my final evaluation score is weak reject (+1). Thank you. \n", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "No specific opinion. ", "review_text": "", "extra_scores": {"ethical_concerns": "No specific concerns. ", "needs_ethics_review": "No", "ethics_review_area": "", "time_spent_reviewing": "4"}, "extra_text": {}}, {"review_id": "W0l4c-yRSL", "reviewer": "Reviewer_Az8s", "summary": "The paper proposes an elegant model for stepwise retrosynthesis prediction via retrons and synthons using a graph neural network based model and symbolic graph manipulation.\n\nStrong results are achieved.", "questions": "", "limitations": "", "rating": 8, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The authors present a neural-symbolic algorithm that performs retrosynthetic step prediction by using graph neural networks to predict symbolic graph edits. This is done in a very elegant way, using a two step procedure inspired by how chemists learn to perform retrosynthesis: By identifying reaction centers (graph edits) and then filling in the missing components. This is done using a vocabulary of synths instead of letting a graph generative model freely adding in atoms and bonds, which is very important for maintaining reasonableness. This paper is a very important step forward for computer aided synthesis.\n\nThis reviewer would recommend to accept the paper at Neurips, but would encourage the authors to add some extra info (see below)\n\npositives:\n- the model is very well motivated, elegant, and strongly maps to the domain.\n- the use of edit prediction reduces the complexity to O(N) instead of O(N^2) for atom pair prediction.\n- The presentation is very clear\n- the validation uses an established dataset\n- Some limitations remain, but the authors clearly highlight how they can be solved in future work.\n- Related work is well acknowledged.\n= code is provided and reads well (no time to run it unfortunately)\n\nnegatives:\n- a breakdown for performance across different reaction classes would be desirable\n- the description of stereochemistry handling could be improved\n", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "Yes, the limitations are clearly and openly described.", "review_text": "", "extra_scores": {"ethical_concerns": "None", "needs_ethics_review": "No", "ethics_review_area": "", "time_spent_reviewing": "3"}, "extra_text": {}}, {"review_id": "Oq27wmRPw0M", "reviewer": "Reviewer_aDNh", "summary": "This paper proposes a new strategy for reactants generation for the retrosynthesis prediction. Motivated by the fact that the graph topology of precursor molecules is largely unchanged during the chemical reaction, the authors propose to expand intermediate synthons into reactants by selecting and attaching leaving groups (molecule sub-graphs extracted from training data) to the synthons. The product molecule is transformed into synthons through graph edits. The proposed method achieves 53.7% top-1 accuracy.", "questions": "", "limitations": "", "rating": 4, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The major contribution of this paper is a new formulation to complete synthons by selecting leaving groups to obtain the final reactants. While existing methods G2Gs generate reactants by adding atoms one-by-one to the synthons and RetroXpert predicts reactants with a Transformer model from synthons. The advantage of the proposed method is that the reactant generation process is simplified and therefore can achieve better accuracy than G2Gs and RetroXpert. However, the related method RetroPrime [1] is not compared in this paper, which also belongs to the semi-template methods and it achieves 64.8% top-1 accuracy while the proposed method 63.9%. This makes the proposed method less significant. I am worried that the contribution of this paper is incremental and not significant enough.\n\nLine #48 Is the atom-mapping bias first found by the authors, any reference to the shortcut removing method?\n\nLine #130 \"95% of the training set consists of single edit examples the remainder of this section describes the setup for single edit \n prediction\", line #150 proposes to leverage the dependencies of multiple edits, it seems contradictory.\n\nLine #152 \"build a graph with bonds (u, v) as nodes, and introduce an edge between bonds sharing an atom\" sounds interesting, is this originally proposed by the authors? \n\nCould the authors also provide experimental results on the larger dataset USPTO-full as GLN to demonstrate the scalability of the proposed method? I am worried that the proposed leaving groups attachment method can only be applied to small datasets and is not generalizable.\n\n\n[1] Wang, Xiaorui, et al. \"RetroPrime: A Diverse, plausible and Transformer-based method for Single-Step retrosynthesis predictions.\" Chemical Engineering Journal 420 (2021): 129845.\n\n", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "Yes.", "review_text": "", "extra_scores": {"needs_ethics_review": "No", "ethics_review_area": "", "time_spent_reviewing": "5"}, "extra_text": {}}]

Author rebuttal:

Meta-review: This paper proposes a new method, GraphRetro, for single step retrosynthesis. GraphRetro treats retrosynthesis as a two stage problem. The first stage predicts the reaction edit, which is similar to previous methods. The second one predicts which leaving group should be attached to the synthons. Different from existing methods, this paper treats the second stage as a multi-class classification problem, which is simpler and achieves some better top-k accuracy for k<5. However, this paper should compare GraphRetro with G2Gs more sufficiently and provide more insights. Besides, this paper should provide large scale experiments on USPTO-full.
Decision: Accept (Poster)