RetCL: A Selection-based Approach for Retrosynthesis via Contrastive Learning
Authors: Hankook Lee
Sungsoo Ahn
Seung-Woo Seo
You Young Song
Eunho Yang
Sung Ju Hwang
Jinwoo Shin
Venue:  (2021)
Keywords: molecule
retrosynthesis
contrastive learning
graph representation learning

Abstract: Retrosynthesis, of which the goal is to find a set of reactants for synthesizing a target product, is an emerging research area of deep learning. While the existing approaches have shown promising results, they currently lack the ability to consider availability (e.g., stability or purchasability) of the reactants or generalize to unseen reaction templates (i.e., chemical reaction rules).
In this paper, we propose a new approach that mitigates the issues by reformulating retrosynthesis into a selection problem of reactants from a candidate set of commercially available molecules. To this end, we design an efficient reactant selection framework, named RetCL (retrosynthesis via contrastive learning), for enumerating all of the candidate molecules based on selection scores computed by graph neural networks. For learning the score functions, we also propose a novel contrastive training scheme with hard negative mining. Extensive experiments demonstrate the benefits of the proposed selection-based approach. For example, when all 671k reactants in the USPTO database are given as candidates, our RetCL achieves top-1 exact match accuracy of 71.3% for the USPTO-50k benchmark, while a recent transformer-based approach achieves 59.6%. We also demonstrate that RetCL generalizes well to unseen templates in various settings in contrast to template-based approaches. The code will be released.

Under review as a conference paper at ICLR 2021
RETCL: A SELECTION-BASED APPROACH FOR RETROSYNTHESIS VIA CONTRASTIVE LEARNING
Anonymous authors
Paper under double-blind review
ABSTRACT
Retrosynthesis, of which the goal is to find a set of reactants for synthesizing a target product, is emerging research area of deep learning. While the existing approaches have shown promising results, they currently lack the ability to consider availability (e.g., stability or purchasability) of the reactants or generalize to unseen reaction templates (i.e., chemical reaction rules). In this paper, we propose a new approach that mitigates the issues by reformulating retrosynthesis into a selection problem of reactants from candidate set of commercially available molecules. To this end, we design an efficient reactant selection framework, named RETCI. (retrosynthesis via contrastive learning), for enumerating all of the candidate molecules based on selection scores computed by graph neural networks. For learning the score functions, we also propose novel contrastive training scheme with hard negative mining. Extensive experiments demonstrate the benefits of the proposed selection-based approach. For example, when all 671k reactants in the USPTO database are given as candidates, our RETCL achieves top-1 exact match accuracy of 71.3% for the USPTO-50k benchmark, while recent transformer-based approach achieves 59.6%. We also demonstrate that RETCL generalizes well unseen templates in various settings in contrast template-based approaches. The code will be released.
INTRODUCTION
Refrosynthesis (Corey, 1991), finding a synthetic route starting from commercially available reactants to synthesize target product (see Figure la), is at the center of focus for discovering new materials in both academia and industry. plays an essential role in practical applications by finding a new synthetic path, which can be more cost-effective or avoid patent infringement. However, retrosynthesis is a challenging task that requires searching over a vast number of molecules and chemical reactions, which is intractable enumerate. Nevertheless, due to its utter importance, researchers have developed computer-aided frameworks to automate the process of retrosynthesis for more than three decades (Corey al., 1985).
The computer-aided approaches for retrosynthesis mainly fall into two categories depending on their reliance on the reaction templates, i.e., sub-graph patterns describing how the chemical reaction occurs among reactants (see Figure lb). The template-based approaches (Coley et al., 2017b; Segler & Waller, 2017; Dai et al., 2019) first enumerate known reaction templates and then apply well- matched template into the target product to obtain reactants. Although they can provide chemically interpretable predictions, they limit the search space to known templates and cannot discover novel synthetic routes. In contrast, template-free approaches (Liu et al., 2017; Karpov et al., 2019; Zheng al., 2019; Shi et al., 2020) generate the reactants from scratch to avoid relying on the reaction templates. However, they require to search the entire molecular space, and their predictions could be either unstable or commercially unavailable.
We emphasize that retrosynthesis methods are often required to consider the availability of reactants and generalize to unseen templates real-world scenarios. For example, when a predicted reactant is not available (e.g., not purchasable) for chemist laboratory, the synthetic path starting from the predicted reactant cannot be instantly used in practice. Moreover, chemists often require retrosynthetic analysis based on unknown reaction rules. This is especially significant due to

---

Under review as a conference paper at ICLR 2021
Reactants
Products
Reaction template
Synthesis (forward)
Retrasynthesis (backward)
(a) Chemical reaction
(b) Reaction template
Figure 1: Examples of (a) chemical reaction and (b) the corresponding reaction template in the USPTO-50k dataset. The objective of retrosynthesis to find the reactants for the given product.
incomplete knowledge of chemical reactions; e.g., 29 million reactions were regularly recorded between 2009 and 2019 in Reaxys' (Mutton Ridley, 2019).
Contribution. In this paper, we propose a new selection-ber bassdd approach, which allows considering the commercial availability of reactants. To this end, we reformulate the task of retrosynthesis as problem where reactants are selected from candidate set of available molecules. This approach has two benefits over the existing ones: (a) it guarantees the commercial availability of the selected reactants, which allows chemists proceeding to practical procedures such lab-scale experiments or optimization of reaction conditions; (b) it can generalize to unseen reaction templates and find novel synthetic routes.
For the selection based retrosynthesis, we propose an efficient selection framework, named RETCL (retrosynthesis via contrastive learning). To this end, design effective selection scores in synthetic and retrosynthetic manners. To be specific, we use the cosine similarity between molecular embeddings of the product and the reactants computed by graph neural networks. For training the score functions, we also propose novel contrastive learning scheme (Sohn, 2016; He et al., 2019; Chen et al., 2020b) with hard negative mining (Harwood al., 2017) overcome scalability issue while handling a large-scale candidate set.
To demonstrate the effectiveness of our RETCL, we conduct various experiments based on the USPTO database (Lowe, 2012) containing 1.8M chemical reactions in the US patent literature. Thanks to our prior knowledge on the candidate reactants, our method achieves 71.3% test accuracy and significantly outperforms the baselines without such prior knowledge. Furthermore, our algorithm demonstrates its superiority even when enhancing the basclines with candidate reactants, c.g., our algorithm improves upon the existing template-free approach (Chen et al., 2019) by 11.7%. We also evaluate the generalization ability of RETCL by testing USPTO-50K 1770-500-trained models on the USPTO- full dataset; obtain 39.9% test accuracy while the state-of-the-an art template- -aste approach (Dai et al., 2019) achieves 26. 2..7%. Finally, we demonstrate how our RETCL can improve multi-step retrosynthetic analysis where intermediate reactants are not in our candidate set.
We believe our scheme has the potential to improve further in the future, by utilizing (a) additional chemical knowledge such as atom-mapping leaving groups (Shi et al., 2020; Somnath et al., 2020); (b) various constrastive learning techniques in other domains, e.g., computer vision (He et al., 2019; Chen al., 2020b; Hénaff et al., 2019; Tian al., 2019), audio processing (Oord et al., 2018), and reinforcement learning (Srinivas et al., 2020).
SELECTION-BASED RETROSYNTHESIS VIA CONTRASTIVE LEARNING
2.1 OVERVIEW OF RETCL
In this section, we propose selection framework for retrosynthesis via contrastive learning, coined RETCL. Our framework is based on solving the retrosynthesis task as a selection problem over a candidate of commercially available reactants given the target product. Especially, we design selection procedure based on molecular embeddings computed by graph neural networks and train the networks via contrastive learning.
To this end, we define a chemical reaction R + P as synthetic process of converting a reaclant-set R R i.e., a set of reactant molecules, to a product molecule P (see Figure la). We
A chemical datahase, https:/ www. reaxys ccom
2

---

Under review as a conference paper at ICLR 2021
Candidate set
Ra
Rı
Reate
trbbeddnng sector
he
Craph noural network
Melocule
N Select R4
Select R₂
Select Roat:
4 Check synthesizability
fo
50
gl
ho
Se
9o
P
R1
12
R
Rg
Figure 2: Illustration of the search procedure in RETCL. It first (1-3) selects reactants sequentially based vi( (R[P, Ri and then (4) check the synthesizability of the selected reactant-set based on o( (P)... The overall score is the average over all scores from (1) to (4).
aim to solve the problem of retrosynthesis by finding the reactant-set R from a candidate C which can be synthesized to the target product P. Especially, we consider the case when the candidate set C consists of commercially available molecules. Throughout this paper, we say that the synthetic direction (from R to P) is forward and the retrosynthetic direction (from P to R) is backward.
Note that framework stands out from the existing works in terms of the candidate set C. To be specific, (a) remplate-free approaches (Lin et al., 2019; Karpov et al., 2019; Shi et al.. 2020) choose C as the whole space of (possibly unavailable) molecules; and (b) remplate-based approaches (Coley et al., 201 7b; Segler & Waller, 2017; Dai et al., 2019) choose C as possible reactants extracted from the known reaction templates. comparison, our framework neither requires (a) search over the entire space of molecules, or (b) domain knowledge to extract the reaction templates.
We now briefly outline the RETCL framework. Our framework first searches the most likely reactant- sets R1, ..,..., Rr C C in sequential manner based on backward selection score vi (R) P, Rgiven), and then ranks the reactant-sets using vb( [ P, Rgiven) and another forward score di (()... For learning the score functions, we propose novel contrastive learning scheme with hard negative mining for improving the selection qualities. We next provide detailed descriptions of the search procedure and the training scheme in Section 2.2 and 2.3, respectively.
2.2 SEARCH PROCEDURE WITH GRAPH NEURAL NETWORKS
We first introduce the search procedure of RETCL in detail. To find a reactant-set R = { Ry J. we select each element R, sequentially from the candidate set based the backward (retrosyntheticc selection score v)( R P, Rgiven). It represents selection score of a reactant R given a target product P and a set of previously selected reactants R Rgiven C. Note that the score function is also capable of selecting special reactant Reait to stop updating the reactant-set. Using beam search, we choose top likely reactant-sets RI,..., RT.
Furthermore, we rank the chosen reactant-sets RI,..., Rr based on the backward selection score 4b P, Rgiven) and the forward (synthetic) score d(.(). The latter represents the synthesizability of R for P. Note that vi R. P, Rgiven) and (P correspond to backward and forward directions of a chemical reaction R >> P, respectively (see Section 2.1 and Figure la). Using both score functions, we define overall score on chemical reaction R P follows:
1
score(P.R)
max FENT
4 (R ... Raq-1)3) +
(1)
+
where R = Reait and II is the space of permutations defined on the integers 1,.... n+ satisfying (n+1)) = 1+1. Based on score( (P, R), decide the rankings of R1,..., ; Rr Rr for synthesizing
3

---

Under review as a conference paper at ICLR 2021
the target product P. We note that the max operator and the - term make the overall score (equation 1) be independent of order and number of reactants, respectively. Figure 2 illustrates this search procedure our framework.
Score design. We next elaborate our design choices for the score functions to and ø. We first observe that the molecular graph of the product can be decomposed into subgraphs from each reactant of the reactant-set R, as illustrated in Figure la. Moreover, when selecting reactants sequentially, the structural information of the previously selected reactants Rgiven should be ignored to avoid duplicated selections. From these observations, design the scores th (R P. Rgiven) and Φ (P(R) as follows:
(R)P, Rgiven) CosSim
fa(P) Σ Re
go(S), ho (o((
((PRR) CosSim
E
RER go (R), ho(P)).
where CosSim is the cosine similarity and fe- Io. ha are embedding functions from molecule to fixed-sized vector with parameters 0. Note that one could think that fa and go are query functions for product and reactant, respectively, while ha is key function for molecule. Such query-key separation allows the search procedure to be processed as an efficient matrix-vector multiplication. This computational efficiency is important in our selection-basee setting because the number of candidates is often very large, e.g., |C| ~ 6 x 10 for the USPTO dataset.
To parameterize the embedding functions fo- 9o and ho. network (GNN) architecture, structure2vec (Dai et al., 2016; 2019). The implementation details of the architecture is described in Section 3.1.
the recently proposed graph neural
Incorporating reaction types. A human expert could have some prior information about a reaction type, e.g., carbon-carbon bond formation, for the target product P. To utilize this prior knowledge, add trainable embedding bias vectors (t)) and e)()) for each reaction type into the query embeddings of va and Φ, respectively. For example, (()(R becomes CosSim( RER. go + v(9, he ho(P)). The bias vectors are initialized by zero at beginning of training.
2.3 TRAINING SCHEME WITH CONTRASTIVE LEARNING
Finally, we describe our learning scheme for training the score functions defined in Section 2.1 and 2.2. We are inspired by how the score functions vi P, Rgiven) and of ((R) resemble the classification scores of selecting (a) the reactant R given the product P and the previously selected reactants Rgiven and (b) the product P given all of the selected reactants R, respectively. Based on this intuition, we consider two classification tasks with the following probabilities:
exp())(R|P) Rgiven)/T)
P(R|P, R Rgiven: C) Σ EREEC(()) (xp((((")))))eeeeeeeeeeeeee Rgivea)/T)
exp(o(P(R)/T)
q(PIRRC) = EPECA exp(p (P)R))
where T is hyperparameter for temperature scaling and C is the given candidate set of molecules. Note that we do not consider P and R R as available reactants and products for the classification tasks of p and q, respectively. This reflects our prior knowledge that the product P is always different from the reactants R in chemical reaction. As result, we arrive at the following losses defined on a reaction of the product P and the reactant-set R = (Ri,... R.):
n+1 log p( (R /)) P. (.( Re(i-1)CC).
Lrackvard (P,R C) = max TEl
1=1
Crorwara (P,R = log (P
where Ru+1 = REalt and II is the space of permutations defined on the integers 1,..., n+1 satisfying (n++1 = 11 We note that minimizing the above losses increases the scores (R) Rgiven) and of (P(R) of the correct pairs of product and reactants, i.c., numerators, while decreasing that of wrong pairs, i.e., denominators. Such objective is known contrastive loss which has recently gained
4

---

Under review as a conference paper at ICLR 2021
much attention in various domains (Sohn, 2016; He al., 2019; Chen al., 2020b; Oord et al., 2018; Srinivas et al., 2020).
Unfortunately, the optimization of Luackvard and Lorvard is intractable since the denominators of p( Rgiven: C) and qP C) require summation over the large set of candidate molecules C. To resolve this, for each mini-batch of reactions B sampled from the training dataset, approximate C with the following set of molecules:
CB {M (R, E B such that M = P or M E R}:
i.e. CB is the set of all molecules in B. Then we arrive at the following training objective:
((
1
Σ (R.P)EB
Crackward (aackkaar(P,R88,0,. (P,R,8,CB) Coorvara(P,R188_0
B
Hard negative mining. In our setting, molecules in the candidate set CB are easily distinguishable. Hence, learning to discriminate between them is often not informative. To alleviate this issue, we replace the CB with its augmented version ČB by adding hard negative samples, i.e., similar molecules, follows:
CB U MECB (Top-K K nearest neighbors of M from C}:
where K is a hyperparameter controlling hardness of the contrastive task. The nearest neighbors defined with respect to the cosine similarity
(M)) Mec. Since computing all embeddings (Ma(M) Mec for every iteration is time-consuming, we update information of the nearest neighbors periodically. We found that the hard negative mining plays significant role in improving the performance of RETCL (see Section 3.3).
EXPERIMENTS
3.1 EXPERIMENTAL SETUP
Dataset. We mainly evaluate framework in USPTO-50K, which is standard benchmark for the task of retrosynthesis. contains 50k reactions of 10 reaction types derived from the US patent literature, and we divide it into raining/validationnfe apply our framework, we choose the candidate set of commercially available molecules C as the all reactants in the entire USPTO database as Guo al. (2020) did. This results in the candidate set with a size of 67 671,518. For the evaluation metric, we use the top-k exact match accuracy, which is widely used in the retrosynthesis literature. We also experiment with other USPTO benchmarks for more challenging tasks, e.g., generalization to unseen templates. We provide more detailed description of the USPTO benchmarks in Appendix A.
splits following Coley al. (2017b). To
Hyperparameters. We use single shared 5-layer structure2vee (Dai et al., 2016; 2019) architecture and three separate 2-layer residual blocks with an embedding size 256. To obtain graph-level embedding vectors, we use pooling over mean pooling since it captures the size information of molecules. For contrastive learning, we use a temperature for hard negative mining. More details are provided in Appendix B.
0.1 and 4 nearest neighbors
3.2 SINGLE-STEP RETROSYNTHESIS IN USPTO-50K
Table evaluates our RETCL and other baselines using the top-k exact match accuracy with k (1,3,5, 5, 10, 20, 50). We first note that our framework significantly outperforms a concurrent selection- based approach. Bayesian-Retro (Guo et al., 2020), by 23.8% and 23.7% in terms of top-1 accuracy when reaction type is unknown and given, respectively. Furthermore, ours also outperforms template- based approaches utilizing the different knowledge, i.e.. reaction templates instead of candidates, with large margin, e.g. 18.8% over GLN (Dai et al., 2019) in terms of top-1 accuracy when reaction type is unknown.
Note that Bayesian- (Guo al., 2020) is scalable large candidate See Section 4 for details.
5

---

Under review as a conference paper at ICLR 2021
Table 1: The top-k exact match accuracy (%) of computer-aided approaches in USPTO-50K. The template-based approaches use the knowledge of reaction templates while others do not. The results are reproduced using the code of Chen et al. (2019).
Category
Method
Top-1
Top-3
Top-5
Top-10
Top-20
Top-50
Reaction type is unknown
Transformer (Karpov et al., 2019)
37.9
57.3
62.7
SCROP (Zheng et al., 2019)
43.7
60.0
68.7
Template- free
Transformer (Chen et al., 2019)
44.8
62.6
67.7
71.1
G2Gis (Shi et al., 2020)
48.9
67.6
72.5
75.5
retrosim (Coley et ul., 2017b)
37.3
54.7
63.3
74.1
82.0
85.3
Template-bused
neuralsym (Segler & Waller, 2017)
44.4
65.3
72.4
78.9
82.2
83.1
GLN (Dai et al., 2019)
52.5
69.0
75.6
83.7
89.0
92.4
Bayesian-Retee Retro (Guo et al., 2020)
47.5
67.2
77.0
80.3
Selection-bused
RETCL (Ours)
71.3
86.4
92.0
94.1
95.0
96.4
Reaction type given as prior
seg2seq (Liu et al., 2017)
37.4
52.4
57.0
61.7
65.9
70.7
Template-free
Transformer (Chen al., 2019)
54.1
70.0
74.2
77.8
80.4
83.3
SCROP (Zheng et al., 2019)
59.0
74.8
78.1
81.1
G2Gs (Shi et al., 2020)
61.0
81.3
86.0
88.7
retrosim (Coley et al., 201 7h)
52.9
73.8
81.2
88.1
91.8
92.9
Template-based
neuralsym (Segler & Waller, 2017)
55.3
76.0
81.4
85.1
86.5
86.9
GLN (Dai et al., 2019)
64.2
79.1
85.2
90.0
92.3
93.2
Bayesian- Retro (Guo et al., 2020)
55.2
74.1
81.4
83.5
Selection-basee based
RETCL (Ours)
78.9
90.4
93.9
95.2
95.8
96.7
Table 2: The top-k exact match accuracy (%) of our RETCL, Transformer (Chen al., 2019) and GLN (Dai et al., 2019) with discarding predictions not in the candidate set C.
Category
Method
Top-1
Top-5
Top-10
Top-50
Top- Top-100 100
Top-200
Reaction type unknown
Transformer (Chen et al., 2019)
59.6
74.3
77.0
79.4
79.5
79.6
Template- free
RETCL (Ours)
71.3
92.0
94.1
96.4
96.7
97.1
Template-based
GLN (Dai et al., 2019)
77.3
90.0
92.5
93.3
93.3
93.3
Reaction type is given prior
Transformer (Chen et al., 2019)
68.4
82.4
84.3
85.9
86.0
86.1
Template-free
RETCI. (Ours)
78.9
93.9
95.2
96.7
97.1
97.5
Template -ased
GLN (Dai al., 2019)
82.0
91.7
92.9
93.3
93.3
93.3
Incorporating the knowledge candidates into baselines. However, is hard to fairly compare between methods operating under different assumptions. For example, template based approaches require the knowledge of reaction templates, while our selection- approach requires that of available reactants. To alleviate such concern, we incorporate our prior knowledge of candidates C into the baselines; we filter out reactants outside the candidates from the predictions made by the baselines. As reported in Table 2, our framework still outperforms the template-free approaches with a large margin, c.g., Transformer (Chen et al., 2019) achieves 68.4% in the top-1 accuracy, while we achieve 78.9% when reaction type is given. Although GLN uses more knowledge than in this setting, its top-k accuracy is saturated to 93.3% which the coverage of known templates, i.e., the upper bound of template-based approaches. However, framework continues increase the top-k accuracy as increases, e.g., 97.5% in terms of top-200 accuracy. We additionally compare with SCROP (Zheng et al., 2019) using their publicly available predictions with reaction types; SCROP achieves 70.4% in the t accuracy, which also underperforms ours.
3.3 ANALYSIS AND ABLATION STUDY
Failure cases. Figure 3 shows examples of wrong predictions from our framework. We found that the reactants of wrong predictions are still similar to the ground ones. For example, the top-3 predictions of the examples A and B are partially correct; the larger reactant is correct while the

---

Under review as a conference paper at ICLR 2021
Product
Ground-truth Reaclants
Top-1
Top-2
Top-3
Example
Exampls
Example
Figure
Failure cases of RETCL.
Example A
Top nearest neighbars of A
Example B
Top 4 nearest neighbors of B
Figure 4: The top-4 nearest neighbors of two randomly sampled molecules in C.
smaller one is slightly different. the example C, ring at the center of the product is broken in the ground-truth reactants while our RETCL predicts non-broken reactants. Surprisingly, in chemical database, Reaxys, we found synthetic route starting from reactants in the top-2 prediction to synthesize the target product. We attach the corresponding route to Appendix C. These results show that our RETCL could provide meaningful information for retrosynthetic analysis in practice.
Nearest neighbors molecular embeddings. For hard negative mining described in Section 2.3, it is required to find similar molecules using the cosine similarity on (ho( Mec. As illustrated in Figure 4, ho (M) is capable of capturing the molecular structures.
Effect of components. Table 3 shows the effect components of our framework. First, we found that the hard negative mining as described in Section 2.3 increases the performance signifi- cantly. This is because there are many similar molecules in the candidate set C, thus a model could predict slightly different reactants without hard negative mining. We also demonstrate the effect of checking the synthesizablity of the predicted reactants with db P(R). As seen the fourth and fifth rows Table 3, using &( (P)) provides a 2.6% gain in terms of top-10 10 accuracy. Moreover, we empirically found that sum pooling for aggregating node embedding vectors is more effective than mean pooling. This because the former can capture the size of molecules the norm of graph embedding vectors.
Table Ablation study.
((PR)
K
Top-1
Top-10
59.5
79.8
1
69.6
92.2
2
92.7
4
71.1
92.9
4
69.8
90.3
94.1
3.4 MORE CHALLENGING RETROS YNTHESIS TASKS
Generalization unseen templates. The advantage of our framework over the template-based approaches is the generalization ability to unseen reaction templates. To demonstrate it, we remove reactions of classes (i.e., reaction types) from 6 to 10 in training/validation splits of the USPTO-50k benchmark. Then the number of remaining reactions is 27k. In this case, the templates extracted from the modified dataset cannot applied to the reactions different classes. Hence the template-based approaches suffer from the generalization issue; for example, GLN (Dai et al., 2019) cannot provide correct predictions for reactions of unseen types as reported Table 4, while our RETCI. is able to provide correct answers.
We also conduct more realistic experiment: test- ing on larger dataset, the test split of USPTO- full dataset preprocessed by Dai et al. (2019), us- ing model trained smaller dataset, USPTO- 50k. We note that the number of reactions for training, 40k, is smaller than that of testing reac-
Table 5: Generalization to USPTO-full.
Method
Top-1
Top-
Top-50
Transformer (Chen 2019)
GLN (Dai al., 2019)
26.7
42.2
46.7
RETCL (Ours)
39.9
57.1
60.9

---

Under review as a conference paper at ICLR 2021
Table 4: The top-10 10 exact match accuracy (%) of our RETCL and GLN (Dai et al., 2019) trained on USPTO-50K without reaction types from 6 to 10. The average column indicates the average of class-wise accuracy for each reaction type.
Reaction type
Method
Average
2
3
4
5
6
7
8
9
10
GLN (Dai al., 2019)
39.7
84.3
92.2
70.7
59.3
89.7
0.0
0.0
0.0
0.5
0.0
RETCL (Ours)
55.6
93.9
97.6
86.4
67.0
95.6
59.1
11.9
18.3
26.1
0.0
tions, 100k. As reported in Table 5, our framework provides consistent benefit over the template- based approaches. These results show that our strength of generalization ability.
Multi-step retrosynthesis. To consider a more practical scenario, we evaluate our algorithm for the task of mulpi-step retrosynthesis. To this end. we use the synthetic route benchmark provided by Chen et al. (2020a). Here, we assume that only the building blocks (or starting materials) commercially available, and intermediate reactants require being synthesized from the building blocks. In this challenging task, we demonstrate how our method could be used to improve the existing template-free Transformer model (TF, Chen et al. 2019). Given a target product, the hybrid algorithm operates as follows: (1) our RETCL proposes set of reactants from the candidates C; (2) TF proposes additional reactants outside the candidates C: (3) TF chooses the top-K reactants based on its fog-likelihood of all the proposed reactants. As an additional baseline, we replace RETCL. by another independently trained TF the hybrid algorithm. We use Retro (Chen et al., 2020a) for efficient route search with the retrosynthesis models and evaluate the discovered routes based on the metries used by Kishimoto et al. (2019); Chen et al. (2020a). As reported in Table 6, our model can enhance the search quality of the existing template-free model in the multi-step retrosynthesis scenarios. This is because our RETCL is enable to recommend available and plausible reactants to TF for each retrosynthesis step. Note that the MLP column is the same reported in Chen et al. (2020a) which uses a template-based single-step MLP model. The detailed description of this multi-step retrosynthesis experiment and the discovered routes are provided in Appendix D.
Table 6: Multi-step retrosynthesis.
Single
Hybrid
Single-step model
MLP
TF
TF+TF
RETCL+TF
Succ. rate (5i)
86.84
91.05
90.54
96.84
Avg. length
4.30
4.31
3.90
RELATED WORK
The cemplate-basee approaches (Coley et al., 2017b; Segler & Waller, 2017: Dai et al., 2019) rely on reaction templates that are extracted from a reaction database (Coley et al., 2017a; 2019) or encoded by experts (Szymkué et al., 2016). They first select one among known templates, and then apply it to the target product. On the other hand, template-free methods (Liu et al., 2017; Karpov et al., 2019; Zheng et al., 2019; Shi et al., 2020) consider retrosynthesis as a conditional generation problem such as machine translation. Recently, synthon-based approaches (Shi et al., 2020; Somnath et al., 2020) have also shown the promising results based on utilizing the atom- mommmapping between products and reactants as additional type of supervisions.
Concurrent to our work, Guo et al. (2020) also propose a selection- approach, Bayesian Retto, based sequential Monte Carlo sampling (Del Moral et al., 2006). As reported in Table 1, our RETCL significantlly outperforms Bayesian-Retro The gap is more evident since it uses 6 x 10 forward evaluations (i.e., 6 hours²) of Molecular Transformer (Schwaller et al., 2019a) for single-step retrosynthesis of one target product while our RETCL requires only one second.
5 CONCLUSION
In this paper, we propose RETCL for solving retrostthhssssssssssssss.. To this end, we reformulate retrosynthesis as selection problem of commercially available reactants, and propose a contrastive learning scheme with hard negative mining to train our RETCL. Through the extensive experiments, we show that our framework achieves outstanding performance for the USPTO benchmarks. Furthermore, we demonstrate the generalizability of RETCL to unseen reaction templates. We believe that extending
See https:///gt http:/gtthhhh...
retret
8

---

Under review as a conference paper at ICLR 2021
framework to multi-step retrosynthesis combining with various contrastive learning techniques in other domains could be interesting future research directions.
REFERENCES
Benson Chen, Tianxiao Shen, Tommi S Jaakkola, and Regina Barzilay. Learning to make generaliz- able and diverse predictions for retrosynthesis. arXiv preprint
09688, 2019.
Binghong Chen, Chengtao Li, Hanjun Dai, and Le Song, Retro*: Learning retrosynthetic planning with neural guided a search. In ICML, 2020a.
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020b.
Connor W Coley, Regina Barzilay, Tommi S Jaakkola, William H Green, and Klavs F Jensen. Prediction of organic reaction outcomes using machine learning. ACS central science, 3(5): 434-443, 2017a.
Connor W Coley, Luke Rogers, William H Green, and Klavs F Jensen. Computer-assisted retrosyn- thesis based on molecular similarity. ACS central science, 3(12):1237-1245 2017b.
Connor W Coley William H Green, and Klavs F Jensen. Rdchiral: An rdkit wrapper for han- dling stereochemistry in retrosynthetic template extraction and application. Journal of chemical information and modeling, 59(6):2529-2537, 2019.
Elias James Corey. The logic of chemical synthesis: multistep synthesis complex carbogenic molecules (nobel lecture). Angewandte Chemie International Edition in English, 30(5):455-465 1991.
Elias James Corey, Alan K Long, and Steward D Rubenstein. Computer-assisted analysis in organic synthesis. Science, 228(4698):408 41884448.110 1985.
Hanjun Dai, Bo Dai, and Le Song. Discriminative embeddings of latent variable models for structured data. In International conference on machine learning, pp. 2702-2711111 2211, 2016.
Hanjun Dai, Chengtao Li, Connor Coley, Bo Dai, and Le Song. Retrosynthesis prediction with conditional graph logic network. In H. Wallach, Larochelle, A. Beygelzimer, d'Alché- Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems 32, pp. Curran Associates, Inc., 2019.
Pierre Del Moral, Arnaud Doucet, and Ajay Jasra. Sequential monte carlo samplers. Journal of the Royal Statistical Society: Series (Statistical Methodology), 68(3):411 1-36,, 2006.
Zsombor Gonda and Zoltan Novak. Transition-metal n-arylation of pyrazoles with diaryliodo- nium salts. Chemistry (Weinheim an der Bergstrasse, Germany). 21 1601-1688800 2015.
Zhongliang Guo, Stephen Wu, Mitsuru Ohno, and Ryo Yoshida. A bayesian algorithm for retrosyn- thesis. arXiv preprint wrXiv:2003.03190 2020.
Ben Harwood, BG Kumar, Gustavo Cameiro, Ian Reid, Tom Drummond, et al. Smart mining for deep metric learning. Proceedings of the IEEE International Conference on Computer Vision. pp. 2821-2829, 2017.
Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. arXiv preprint arXiv:1911.05722. 2019,
Olivier Hénaff, Aravind Srinivas, Jeffrey De Fauw, Ali Razavi, Carl Doersch, SM Eslami, and Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. arXiv preprint 1X05::9050009777 2019.
Pavel Karpov, Guillaume Godin, and Igor Tetko. A transformer model for retrosynthesis. In International Conference Artificial Newral Networks, pp. 817-830. Springer, 2019.

---

Under review as a conference paper at ICLR 2021
Akihiro Kishimoto, Beat Buesser, Bei Chen, and Adi Botea. Depth-first proof-number search with heuristic edge cost and application to chemical synthesis planning. In Advances in Neural Information Processing Systems, pp. 7226-7236, 2019.
Kangjie Lin, Youjun Xu, Jianfeng Pei, and Luhua Lai. Automatic retrosynthetic pathway planning using template-free models. arXiv preprini arXiv: 023600 2019.
Bowen Liu, Bharath Ramsundar, Prasad Kawthekar, Jade Shi, Joseph Gomes, Quang Luu Nguyen, Stephen Ho, Jack Sloane, Paul Wender, and Vijay Pande. Retrosynthetic reaction prediction using neural seuueennett--squenee models. ACS central science, 3(10):1 103-1113, 2017.
Daniel Mark Lowe. Extraction of chemical structures and reactions from the literature. PhD thesis, University of Cambridge, 2012.
Troy Mutton and Damon Ridley. Understanding similarities and differences between two prominent web-based chemical information and data retrieval tools: Comments on searches for research topics, substances, and reactions. Journal of Chemical Education, 96(10):2167-211 2019.
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint 1807.03745 2018.
Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary Vito,, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS 2017 Autodiff Workshop, 2017.
Nadine Schneider, Nikolaus Stiefl, and Gregory A Landrum. What's what: The (nearly) definitive guide to reaction role assignment. Journal of chemical information and modeling, 56(12):2336 2346, 2016.
Philippe Schwaller, Teodoro Laino, Théophile Gaudin, Peter Bolgar, Christopher Hunter, Costas Bekas, and Alpha A Lee. Molecular transformer: A model for uncertainty-calibraeed chemical reaction prediction. ACS central science, 5(9):1572-1583, 2019a.
Philippe Schwaller, Vishnu H Nair, Riccardo Petraglia, and Teodoro Laino. Evaluation metrics for single-step retrosynthetic models. In Second Workshop on Machine Learning and the Physical Sciences (NeurIPS 2019), 2019b.
Marwin HS Segler and Mark P Waller. Neural-symbolie machine learning for retrosynthesis and reaction prediction. Chemistry-A European Journal, 23625):5966-5971, 2017.
Chence Shi, Minkai Xu, Hongyu Guo, Ming Zhang, and Jian Tang. A graph to graphs framework for retrosynthesis prediction. arXiv preprint arXiv:2003.12725. 2020.
Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In D. D. Lee, M. Sugiyama, U. Luxburg, Guyon, and R. Garnett (eds.), Advances Neural Information Processing Systems 29, pp. 1857-1865. Curran Associates, Inc., 2016.
Vignesh Ram Somnath, Charlotte Bunne, Connor W Coley, Andreas Krause, and Regina Barzilay. Learning graph models for template-free retrosynthesis. arXiv preprint arXiv:2006.0703: 2020.
Aravind Srinivas, Michael Laskin, and Pieter Abbeel. Curl: Contrastive unsupervised representations for reinforcement learning. arXiv preprint arXiv:2004.041 044166, 2020.
Sara Szymkuć, Ewa P Gajewska, Tomasz Klucznik, Karol Molga, Piotr Dittwald, Michat Startek, Michat Bajezyk, and Bartosz Grzybowski. Computer-assisted synthetic planning: The end of the beginning. Angewandte Chemie International Edition, 55(20):500455337 2016.
Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint a7Xiv:1906.05849, 2019.
Minjie Wang, Lingfan Yu, Da Zheng, Quan Gan, Yu Gai, Zihao Ye, Mufei Li, Jinjing Zhou, Qi Huang, Chao Ma, et al. Deep graph library: Towards efficient and scalable deep learning on graphs. arXiv preprint 1909.01 2019.
10

---

Under review as a conference paper at ICLR 2021
David Weininger. Smiles, a chemical language and information system. 1. introduction to methodol- ogy and encoding rules. Journal of chemical information and computer sciences, 28 1988.
Shuangjia Zheng, Jiahua Rao, Zhongyue Zhang, Jun Xu, and Yuedong Yang. Predicting retrosynthetic reactions using self-corrected transformer neural networks. Journal of Chemical Information and Modeling, 2019.

---

Under review as a conference paper at ICLR 2021
A DATASET DETAILS
We here describe the details of USPTO datasets. The reactions the USPTO datasets are derived from the US patent literature (Lowe, 2012). The entire set, USPTO 1976-2016, contains 1.8 million raw reactions. The commonly-used benchmark of single-step retrosynthesis is USPTO-50K containing 50k clean atom- atom- mampedd reactions which can be classified into 10 broad reaction types (Schneider et al., 2016). See Table 7a for the information of the reaction types. For generalization experiments in Section 3.4, we introduce a filtered dataset, reaction types from to 5. We report the number of reactions of the modified dataset in Table 7b. We also use the USPTO-ful dataset, provided by Dai et al. (2019), which contains 1.1 million reactions. Note that we use only the test split of USPTO-ful (i.e., only 101k reactions) for testing generalizability. Note that we do not use alpm-nappings the USPTO benchmarks, Moreover, we do not consider reagents for stngle-tep retrosynthesis following prior work (Liu al., 2017; Dai et al., 2019; Lin et al., 2019; Karpov et al., 2019).
which contains reactions of
Table 7: The detailed information on USPTO datasets.
(a) The information about reaction types in USPTO-50k.
(b) The number reactions USPTO datasets.
ID
Fraction (%)
Description
Dataset
Split
# of reactions
30.3
heteroatom alkylation and arylation
Train
40,008
23.8
acylation and related processes
USPTO-50k
Val
5,001
11.3
C-C bond formation
Test
5,007
1.8
heterocycle formation
Train
27,429
1.3
protections
USPTO-560-modiited
3,429
16.5
deprotections
Test
5,007
9.2
reductions
1.6
oxidations
Train
810,496
3.7
functional group interconversion (FGI)
USPTO-full
Val
101.311
10
0.5
functional group addition (FGA)
Test
101,311
12

---

Under review as a conference paper at ICLR 2021
B IMPLEMENTATION DETAILS
We here provide a detailed description of our implementation. Since the USPTO datasets provide molecule information based on the SMILES (Weininger, 1988) format, we convert SMILES representation to a bidirectional graph with atom and bond features. To this end, we use RDKit" and Deep Graph Library (DGL) (Wang et al., 2019). Let G (V. E) be the molecular graph, and (() E R and X (wv) E R are features for an atom molecular graph G. respectively. The atom feature (v) includes the atom type (e.g., C. I, B), degree, formal charge, and so on; the bond feature X (ww) includes the bond type (single, double, triple or aromatic), whether the bond is in a ring, and so on. For more details, we highly recommend to see DGL and its extension, DGL-LifeSci."
V and a bond we E E in the
Architecture. We build our graph neural network (GNN) architecture based on the molecular graph G' with features X as follows:
( (v) ReLU
BN
W:(0) aton-
X(v) + Σ EueN(e) Wi Woon)X((u)))
H0 ReLU
w/(0) Σ EueNte) 1111)(() + Σ E uEN(()
W bond (uv)
(EN(e)
(v) (v)
ReLU
BN
( (v) + (i))) for 1,2,..., Lt
(1)) t (1
where NNv) is the set of adjacent vertices with v. This architecture is based on structure2vee (Dai et al., 2019; 2016), however it is slightly different with the model used by Dai et al. (2019): use ReLU after BN instead of BN after ReLU; we append last linear model W Wiast- Based on the atom-level embeddings (v). we construct query and key embeddings So, go. and he using three separate residual blocks as follows:
fo(M) + Σ
(((u) + (
VEV
(o(M) + Σ
[H(v) BN(W R ReLu
ho(M)
Σ
H())) BN( Re ReLU(
VV
where M is the corresponding molecule with the molecular graph G. Note that 0 includes all W defined above, and omit bias vectors of the linear layers due to the notational simplicity. We found that these design choices, c.g., sharing GNN layers and using residual layers, also provide an accuracy gain. Therefore, more sophisticated architecture designs could provide further improvements; leave it for future work.
Optimization. For learning the parameter 0, learning rate of 0.01, a momentum of 0.9, weight decay of 10-5, a batch size of 64, and gradient clip of 5.0. We train our model for 200k iterations and evaluate on the validation split every 1000 iterations. The information of the nearest neighbors is also updated every 1000 iterations. When evaluating on the test split, we use the best validation model with a beam size of 200.
the stochastic gradient descent (SGD) with
To sum up. we use Pytorch (Paszke et al., 2017) for automatic differentiation. Deep Graph Library (Wang al., 2019) for building graph neural networks, and RDKit for processing SMILES (Weininger, 1988) representations. All our models can be executed on single NVIDIA RTX 2080 Ti GPU.
COpen-Source Cheminformatics Software, https: //www, rakit.
BBinging Graph Neural Networks Chemistry and Biology, https: fesci. dg] .a/
13

---

Under review as a conference paper at ICLR 2021
C
FAILURE CASE STUDY
Ground-truth reactants
prediction (Top-2)
Reagent 2 (thiophene)
Reagent 1 (sodium acetate)
Intermediate product
Intermediate product
Product
Reactant
Reactant 2
Figure 5: A synthetic path existing in Reaxys based on RETCL's prediction.
As illustrated in Figure 5, we found that our RETCL's prediction differs from the ground-trute reactants in USPTO-50k, however, it exists as 3-step reaction with two reagents (sodium acetate and thiophene) the chemical literature (Gonda Novak, 2015). 6 Note that our framework currently does not consider reagent prediction. Therefore, our prediction can be regarded as an available (i.e., correct) synthetic path in practice.
WWe found this synthetic path and the corresponding literature from chemical datahase, Reaxys. Note that the sodium acetate and the thiophene considered reagents in Reaxys.
14

---

Under review as a conference paper at ICLR 2021
D MULTI-STEP RETROSYNTHESIS
For the multi-step retrosynthesis experiment described in Section 3.4, we use a synthetic route dataset provided by Chen al. (2020a). This dataset constructed from the USPTO (Lowe, 2012) database like other benchmarks. We recommend to see Chen et al. (2020a) for the construction details. The dataset contains 299202 training routes, 65274 validation routes, and 190 test routes. We first extract single-step reactions and molecules from the training and validation splits of the dataset. The extracted reactions are used for training our RETCL and Transformer (TF, Chen al. 2019), and the molecules are used as the candidate set Cerain' for ours. When testing the single-step models with Retro (Chen al., 2020a), we use all starting molecules (i.e., 1 11802 molecules) in the routes the dataset the candidate set C. This reflects more practical scenarios because intermediate reactants often be unavailable in multi-step retrosynthesis. We remark that TF also uses the candidate set C as the prior knowledge for finishing the search procedure.
The evaluation metrics used in Section 3.4 are success rate and average length of routes. The success means that synthetic route for target product is successfully discovered under limit of the number of expansions. We set the limit by 100 and use only the top-5 predictions of a single or hybrid model for each expansion. When computing the average length, we only consider the cases where all the single-step models discover routes successfully. As Chen et al. (2020a) did, we use the negative log-likelihood computed by TF as the reaction cost.
Figure 6 and 7 illustrate the discovered routes by TF and RETCL+TF under the aforementioned setting. The molecules in the blue boxes building blocks (i.e., available reactants) and the numbers indicate the reaction costs (i.e., the negative logllikelshoods computed by TF). As shown in the
figures, our algorithm allows discover a shorter and cheaper route.
Target product
2.9604
0.4364
Total cost: 3.8009
0.4040
(a) Transformer
Target product
1.9954
0.4364
Total cost: 2.4318
(b) RETCL-Transformer (ours)
Figure 6: Synthetic routes discovered by (a) Transformer and (b) our
Note that this candidate is used only for training.
15

---

Under review as a conference paper at ICLR 2021
Target product
0.1062
2.7295
0.5370
0.6537
Total cost: 6.9446
0.7298
0.1946
1.9935
(a) Transformer
Target product
0.1062
5.1618
0.0113
Total cost: 6.5565
0.8532
0.4238
(b) RETCL+Transfrme (ours)
Figure 7: Synthetic routes discovered by (a) Transformer and (b) our Transforranoommmerr
16

---

Under review as a conference paper at ICLR 2021
E GENERALIZATION TO UNSEEN CANDIDATES
The knowledge of the candidate set C could be updated after learning the RETCL framework. this case, the used in the test phase is larger than that in the training phase, i.e., Crrain & Creat. One can learn the framework once again, however someone want to use it instantly without additional training. To validate that our framework can generalize to unseen candidates, we conduct additional experiments with smaller candidate set Csmall. We first train our model with Ctrain = Cemall and then test with the larger candidate set Crest Ciarge- Here we consider two cases Canall: : (a) 91k molecules in training and validation splits of USPTO-50K; (b) 100k molecules in all splits of USPTO-50k. As reported Table the model trained with Cenall achieves comparable performance to the model trained with Carge This demonstrates that our model trained with small corpora (c.g.. USPTO-50K) can work with unseen candidates.
Table 8: Generalization to unseen candidates.
[C.rainl
[Crest|
Top-1
Top-3
Top-5
Top-10
Top-20
Top-50
671,518
71.3
86.4
92.0
94.1
95.0
96.4
100.508
671,518
68.8
84.1
87.6
90.0
91.8
93.5
91,297
69.0
84.9
88.1
91.0
92.8
94.4
17

---

Under review as a conference paper at ICLR 2021
F RESTRICTION OF KNOWLEDGE OF CANDIDATE REACTANTS
One might have very restricted knowledge the candidate set of commercially available reactants due own circumstances such budget limit. In this case, one of ground-truth reactants might be missing from the candidate set. Since there exist multiple solutions in the retrosynthesis task, retrosynthesis tools should be able provide alternative solutions in such case. To verify that our RETCL can recommend such solution, we experiment with varying sizes of the candidate set C. Remark that using smaller candidate set means only small number of reactants is practically available, thus performance degradation is expected. Here, we use two metrics: exact-match accuracy and coverage proposed by Schwaller et al. (2019h). To be specific, the coverage measures whether the target product is synthesized from the predicted reactant-set made by RetCL using forward synthesis model (Schwaller et al., 2019a). This can evaluate plausibility of the prediction even if one of the reactants is missing from the candidate set. We report the metrics using top- 10 predictions the USPTO-50k test split. As shown in Table 9, even though some ground-true -tuthh candidates are missing, our framework can provide plausible solutions.
Table 9: Top-10 10 exact-match accuracy (%) and coverage under restricted knowledge of the candidate set C of commercially available reactants.
Subset size
25%
50%
75%
100%
Exact-match
10.2
29.9
57.9
93.8
Coverage
25.3
52.1
72.7
89.0
Exact-mater or Coverage
27.4
56.8
79.3
97.9
18


Reviews:
[{"review_id": "xpW0x_Ocsvm", "reviewer": "AnonReviewer3", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 4, "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "This paper poses an approach to retrosynthesis that addresses the challenges of (i) availability of reactants and (ii) generalization to unseen templates. To achieve this the authors reformulate retrosynthesis as the selection of reactants from a fixed set, in the case of the USPTO database this is the set of 671,578 commercially available reactants used in the database. Their reactant selection framework RetCL uses GNNs to calculate selection scores for all candidate molecules. A novel contrastive training scheme is used to learn the selection score, which is computed as the cosine similarity between embeddings of the product and the reactants computed by the graph neural networks. The authors provide a good summary of related work in this area. \n\nMy major questions for the authors of this paper concern the limitation imposed by restricting to a specific candidate set. For example, the results reported on USPTO-50k are very impressive, particularly the ability to generalize to heldout reaction types. However, the model is never challenged by reactions for which the reactants are not present in the candidate set, and it is completely unclear how the model would perform in this scenario. This is important, because to tackle the chemically relevant retrosynthesis problem it is exactly necessary to solve reactions where the reactants may not be present in the 671,518 reactants present in USPTO-50k. \n\nI find it a bit surprising that the authors do not address this constraint in the main text, and I would ask that they carry out experiments where they restrict the candidate set to a subset of the 671,518 reactants yet consider reactions from the whole database, and ask how severe this restriction is in terms of the solutions obtained by the model (it would be necessary to build these splits carefully, and provide results for multiple splits). There are other arguments that the authors could also make to defend this point in addition to these experiments - but the current state in which the issue is ignored is not satisfactory. \n\nThe description of the contrastive training approach is clear and coherent. The addition of hard negatives to the batches to improve learning is interesting, and the results of the ablation study speak to the important role that it plays. \n", "extra_scores": {}, "extra_text": {}}, {"review_id": "XCPuF0Zaii-", "reviewer": "AnonReviewer4", "summary": "", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "RETCL enumerates all of the candidate molecules (all US patent dataset, all 671k) based on selection scores computed by graph neural networks. The cosine similarity between products and reactants are used to design scores, which is later used for training. The way of ‘cosine similarity to bridge reactants to products are interesting. \n\n\n\nQ1:  Used test data as selection set during training \n\nTraining using all US patent dataset (671k) as candidates for RETCL to select from leaked test data (USPTO50K test data) during training. All US patent dataset is a superset of the USPTO50K data.  “Selection based algorithm” tends to achieve overly optimistic results due to this reason. \n\nQ2: How to generalize? \nIt is great the paper shows that RETCL generalizes well to unseen templates\nHowever, if we select upon an existing dataset (though very large). How does RETCL possibly yield totally unseen reactants (i.e. not in any existing dataset)? \n\n\nQ3 Approximation of C\nSec 2.3 \nComputing p(R|P, Rgiven, C)  and q(P|R, C)  requires summing over all candidates in C, which is necessary for proper probability, but computational expensive. \nHow does these probabilities be approximated by a mini-batch of reactions? \nThe batch statistics are very different from the C (all US patent dataset, all 671k)\n\n\n\n", "extra_scores": {}, "extra_text": {}}, {"review_id": "ELIs_D7cg4W", "reviewer": "AnonReviewer2", "summary": "", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "### Summary of the paper\nThis paper proposes a sequential reactant selection scheme for retrosynthesis. In each step, the model gives a ranking of reactants based on previously chosen reactants $R_{given}$. After all the reactants are selected, the model checks whether the chosen reactants result in desired product. The ranking module $\\psi$ is trained via contrastive learning. The negative reactant candidates are constrained to be similar to the positive reactant.\n\n### Strength and weakness\n1. The method proposes a selection based approach to address one of the weaknesses of template-free approaches -- the predicted reactants may be commercially unavailable. This is indeed an important issue that needs to be addressed. However, I am afraid the proposed approach is an overkill. If we only select reactants appeared in the USPTO database, the model cannot generalize to new reactions which involves new reactants not in the USPTO database. This is problematic for two reasons:\n 1. For instance, if the model is evaluated on a harder test set where ground truth reactants are not in USPTO database, I think the model will fail (with 0% top-1 accuracy). \n 2. Moreover, in multi-step retrosynthesis, you are allowed to make new intermediate compounds from commercially available compounds in order to make your final product. I don't see why we have to choose reactants only from commercially available compounds. \n2. Scalability: The total number of commercially available compounds are up to $10^9$ (e.g., Enamine REAL database). I am concerned that the neural network based ranking will run very slowly and cannot scale to larger sets of compounds. \n3. In section 3.4, authors evaluate their approach on a harder test set with novel reaction templates. In my opinion, template-free approaches are also capable of generalizing to novel reaction templates. Why there is no comparison to G2G or transformer in table 5?\n4. The proposed method is quite straightforward, with limited technical novelty in my opinion. I am afraid the contrastive learning part is just a straightforward application of negative sampling.\n5. The result looks very strong on the USPTO-50K test set. \n\n### Overall evaluation\nI vote for weak reject mainly for two reasons.\n1. The method seems incapable of generalizing to new reactant compounds outside of the commercial library. \n2. The approach has limited novelty to ICLR audience.\n\n### Post rebuttal\nI would like to thank the authors for their valuable response. The experimental results seem strong, but technical novelty is still limited. My review score remains the same. I believe this paper can make great impact if submitted to a chemistry journal. \n\n### Suggestions\nDespite my negative evaluation, I do appreciate the point authors are trying to address. I think the paper can be significantly strengthened if you can loosen the \"commercially available\" constraint. For instance, you can loosen the constraint to \"synthesizable\" -- choosing the reactants that can be synthesized from a given set of building blocks (via reactions)! In multi-step retrosynthesis, you are allowed to make new compounds from your building blocks for the sake of making your final products.", "extra_scores": {}, "extra_text": {}}, {"review_id": "7TO6mAC9cA0", "reviewer": "AnonReviewer1", "summary": "", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "This submission describes an approach to single-step retrosynthesis based on contrastive learning that selects reactants that can be used to synthesize a target product in a single step. The stated contributions are (1) an approach to retrosynthesis that is constrained to only select “available” starting materials; and (2) a novel contrastive learning scheme with hard negative mining. The use of a contrastive loss to learn an embedding of reactants and their products that exhibit the property that the sum of reactant vectors has a high cosine similarity to the product vector is clever. This is a nice way to give structure to a continuous vector space. The strategy of hard negative mining is also clever and identifies the examples that would intuitively be the most informative.\n\nI take some issue with the premise of constraining retrosynthetic recommendations to an enumerated list. This works for small corpora like the ones used here, but in reality, retrosynthesis is a multi-step process where most reactants are *not* commercially available and the one-step retrosynthetic expansion must be repeated recursively. This approach is fundamentally unable to operate on reaction products where multiple synthetic steps are required, which represent the challenging cases. That is why in the multi-step evaluations, the authors rely on the Transformer model to propose intermediate structures. Appendix D also suggests that in the pathway search experiments, knowledge of the routes in advance was required to construct the set of all starting materials to select from.\n\nThe empirical evaluation, as a result of the premise, is somewhat flawed. By constraining reactant proposals to an enumerated list of reactants extracted from a parent database, the authors have simplified the task in comparison to previous approaches, making a head-to-head comparison of accuracy less informative. The evaluation in 3.4 generalizing to unseen templates could simply be an indication that the model is learning atom conservation (excepting leaving groups) and to maximize substructure overlap with the products. The model has access to a restricted list of possible starting materials of which very few are likely to be plausible precursors for a given product. This advantage invalidates the comparison in Table 5; this is not evidence of generalization, since the test set answers were included in the set of candidates.\n\nWhile the contrastive learning approach is clever, this work uses a contrived formulation for retrosynthesis that is not applicable to multi-step planning and the experiments do not support the conclusions drawn.", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Meta-review: While the authors appreciated the proposed contrastive training scheme and the strong related work summary, all authors agreed that the approach was severeley limited by being a pure selection-based method. Without the help of another model that proposes molecules, the approach can only select reactants from an existing set. As target molecules become more complicated, the modeller must make a choice: (a) use a much larger initial candidate set which hopefully encompases all molecules necessary to make the target molecule, or (b) use another model to propose new intermediate molecules. The authors went with (b) which harmed their novelty claim: a big reason why retrosynthesis is hard is because of the need to generate unseen molecules, and if this is left to an already proposed model, the current approach is not adding much methodological novelty. While their approach does improve upon existing work in the multi-step setting, there's even more recent work that has not been compared against (e.g., https://arxiv.org/pdf/2006.07038.pdf) so the improved performance may be outperformed.

The fix is straightforward: modify the methodology to also propose intermediate molecules. This will fix the novelty complaint and strengthen the practicality argument: practitioners could directly use this approach to discover synthesis routes. The authors could slightly update the related work, add comparisons against recent methods, and take into account the other feedback given by the authors. The paper is very nicely written, the proposed changes are purely methodological, and not insurmountable in my opinion. I would urge the authors to make these changes which I believe will result in a very nice paper.
Decision: Reject