Learning to Extend Molecular Scaffolds with Structural Motifs
Authors: Krzysztof Maziarz
Henry Richard Jackson-Flux
Pashmina Cameron
Finton Sirockin
Nadine Schneider
Nikolaus Stiefl
Marwin Segler
Marc Brockschmidt
Venue: ICLR 2022 Poster (2022)
Keywords: molecules
graph neural networks
scaffold
generative model

Abstract: Recent advancements in deep learning-based modeling of molecules promise to accelerate in silico drug discovery. A plethora of generative models is available, building molecules either atom-by-atom and bond-by-bond or fragment-by-fragment. However, many drug discovery projects require a fixed scaffold to be present in the generated molecule, and incorporating that constraint has only recently been explored. Here, we propose MoLeR, a graph-based model that naturally supports scaffolds as initial seed of the generative procedure, which is possible because it is not conditioned on the generation history. Our experiments show that MoLeR performs comparably to state-of-the-art methods on unconstrained molecular optimization tasks, and outperforms them on scaffold-based tasks, while being an order of magnitude faster to train and sample from than existing approaches. Furthermore, we show the influence of a number of seemingly minor design choices on the overall performance.

Published as a conference paper at ICLR 2022
LEARNING TO EXTEND MOLECULAR SCAFFOLDS WITH STRUCTURAL MOTIFS
Krzysztof Maziarz'
Henry Jackson-Flux
Pashmina Cameron
Finton Sirockin
Microsoft Research
Microsoft Research United Kingdom
Microsoft Research
Novartis
United Kingdom
United Kingdom
Switzerland
Nadine Schneider
Nikolaus Stiefl Novartis Switzerland
Marwin Segler
Mare Brockschmidt
Novartis Switzerland
Microsoft Research
Microsoft Research
United Kingdom
United Kingdom
ABSTRACT
Recent advancements in deep Searning-basee modeling of molecules promise to accelerate in silico drug discovery. A plethora of generative models available, building molecules either atom-by-atom and bond-hy-bond or fragment- by-fragment. However, many drug discovery projects require a fixed scaffold to be present in the generated molecule. and incorporating that constraint has only recently been explored. Here, we propose MoLeR, a graph-based model that naturally supports scaffolds as initial seed of the generative procedure, which is possible because is not conditioned on the generation history. Our experiments show that MoLeR performs comparably state-of-the-art methods on unconstrained molecular optimization tasks, and outperforms them on scaffold- based tasks, while being an order of magnitude faster to train and sample from than existing approaches. Furthermore, we show the influence of a number of seemingly minor design choices on the overall performance.
INTRODUCTION
The problem in silico drug discovery requires navigating a vast chemical space in order to find molecules that satisfy complex constraints on their properties and structure. This poses challenges well beyond those solvable by brute-force search, leading to the development of more sophisticated approaches. Recently, deep learning models are becoming increasingly popular choice, they can discern the nuances of drug-likeness from raw data.
While early generative models of molecules relied the textual SMILES representation and reused architectures from natural language processing (Segler et al.; 2018 Gömeez-oobarell et al. 2018: Winter et al. 2019a; Ahn al. (2020), many recent approaches
built around molecular graphs (De Cao & Kipl 2018| Liu et al. 2018 Li et al. 201 8b Assouel et al. 2018 Simonnvsky Komodakis 2018 Jin al. 2018 2020 Bradshaw al. 2020). Compared to SMILES based methods, graph- based models that employ a sequential generator enjoy perfect validity of generated molecules, they can enforce hard chemical constraints such as valence during generation.
However, even if molecule does not violate valence constraints, it is merely a sign of syntactic validity; the molecule can still be semantically incorrect by containing unstable or unsynthesisable substructures. Intermediate states during atom-by-atom generation may contain atypical chemical fragments, such as alternating bond patterns corresponding to unfinished aromatic rings. Therefore, some works (Rarey & Dixon 1998 Jin et al. 2018 2020 Ståhl et al. 2019: Xie et al. (021) propose data-driven methods to mine common molecular fragments referred to as motifs which can be used to build molecules fragment-by by-framment instead of atom-by-aton When motifs employed, most partial molecules during generation are semantically sensible, as they do not contain half-built structures such as partial rings.
"Correspondence krzysztof. waw.aerfaaaaaaaemmmmooooooo

---

Published as a conference paper at ICLR 2022
Preprocessing
(b) Decomposition
Encoder
Training data
embeddiig lookug
Encoder GNN
M
My
Motif vocabulary
(d) Decoder steps
[6]
(empty graph)
Decoder GNN
Decoder GNN
Decoder GNN
Decoder GNN
Decoder GNN
PickAtomOrMatif
PickAtorOrMatif
PickArtachrment
PickBond
PickBond
BORDS
RONDS
Figure 1: Overview of our approach. We discover motifs from data (a) and use them decompose an input molecule (b) into motifs and single atoms. In the encoder (c), atom features (bottom) are combined with motif embeddings (top), making the motif information available the atom level. Decoder steps (d) are only conditioned on the encoder output and partial graph (hence independent) and have to select one of the valid options (shown below, correct choices marked red).
A common additional constraint in drug discovery projects is the inclusion of predefined subgraph, called a scaffold (Schuffenhauer et al. 2007). Sampling molecules that contain given scaffold can be approached by unconditional generation followed by post-hoc filtering. While simple, this method not scalable, as the number of samples required may grow exponentially with scaffold size. Instead, enforce the presence of given scaffold (Lim al. 2019 Li al. 2019
some recent models
Arús-Pous et al. 2020; Langevin et al. 2020). However, extending an arbitrary generative model to perform scaffold- based generation often non-trivial,
discuss in Section
In this work we make the following contributions:
In Section we present MoLeR, new graph-based generative model suitable for the commonly required task of extending partial molecules. It can use motifs (molecule fragments) to generate outputs (similarly to Jin al. 2018: 2020)), but integrates this with atom- noom-by-atom generation.
We show experimentally in Section that MoLeR (a) is able learn to generate molecules matching the distribution of the training data (with and without scaffolds); (b) together with an off-the-shelff optimization method (MSO (Winter et al. (019b)) can be used for molecular optimization tasks, matching the state of the art methods in unconstrained optimization, and outperforming them on scaffold-constrainel tasks; and (c) is faster in training and inference than baseline methods.
We also perform experiments in Section 3 to analyze two design decisions that are understudied in the literature: the choice of the generation order and the size of the motif vocabulary. Our results show how varying these two parameters affects model performance.
Code is available / http:////ggg.tbb.oooo/ooorrsttt/ otg.:/ororrrrtoooooeeeeeeeeeeere
OUR APPROACH
2.1 DATA REPRESENTATION
Motif's Training our model relies on set of fragments M called the motif vocabulary which we infer directly from data. For each training molecule, we decompose into fragments by breaking some of the bonds; as breaking rings is chemically challenging, we only consider acyelic bonds, i.e. bonds that do not lie on a cycle. We break acyclic bonds adjacent to a cycle (i.e. at least one endpoint lies cycle), as that separates the molecule into cyclic substructures, such as ring systems, and acyclic substructures, such as functional groups We then aggregate the resulting fragments over the entire training set, and define M as the most common motifs, where is hyperparameter. Having selected M, we pre- pre-process molecules (both for training and during inference) by noting which atoms covered by motifs belonging the vocabulary. This is done by applying the same
2

---

Published as a conference paper at ICLR 2022
hond-breaking procedure used for motif vocabulary extraction. During generation, model can either add an entire motif in one step, or generate atoms and bonds one-by-one. This means that can generate arbitrary structures, such as an unusual ring, even if they do not appear in the training data.
Finally, note that in contrast to Jin et al. (202)) we do not decompose ring systems into individual rings. This means that our motifs are atom-disjoint, and we consequently do not need to model motif-specific attachment point vocabulary, as attaching a motif to a partial graph requires adding only single bond, and thus there is only one attachment point.
Molecule Representation We represent a molecule as a graph 9 = (V,E), where vertices V are atoms, and edges & are bonds. Edges may also be annotated with extra features such as the bond type. Each node (atom) v E V is associated with an initial node feature vector (( chosen as chemically relevant features (Pocha al.) (020), both describing the atom (type, charge, mass, valence, and isotope information) and its local neighborhood (aromaticity and presence of rings). These features can be readily extracted using the RDKit library (Landrum al., 2006). Additionally, for atoms that are part of motif, we concatenate hy (fmit) with the motif embedding; for the other atoms we use a special embedding vector signify the lack of motif. We show this at the top of Figure I
Throughout this paper we use Graph Neural Networks (Li et al. 2015 Kipf & Welling 2016) to learn contextualized node representations h, (see Appendix for background information GNNs). Motif embeddings are initialized randomly, and learned end-to-end with the rest of the model.
2.2 THE MOLER DECODER
Algorithm MoLeR's Generative Procedure
Input: vector 2, scaffold as partial graph Output: molecule M and probability p
Our generative procedure is shown Algorithm II and example steps are shown at the bottom of Figure | takes as input a conditioning input vector which can either be obtained from encoding (in our setting of training it as an autoencoder) or from sampling (at inference time), and optionally partial molecule to start generation from. Our generator constructs a molecule piece by piece. In each step, it first selects a new atom or entire motif to add the current partial molecule, or to stop the generation. generation continues, the new atom (or an atom picked from the added motif) is then in "focus" and connected to the partial molecule by adding one several bonds.
M. p + S.
while True do a, a.p" + PickktomOrMotii(.....
p - p-p" END_GEII then
if
return M.P
M + AddAAtoOrrotii((M. a))
8 pp <- PickAAtachment((, M,a)
x p.p
while True do b, p2 + PickBond M,, M, v
p t p- p.p" p²
if b = END BONDS then
break
Our decoder relies on three neural networks to implement the functions PickAtomOrMotif, PickAttachment and PickBond. These share a common GNN to process the partial molecule M, yielding high-level features h, for each atom v and aggregated graph-level feature vector hmat- We call our model MoLcR, as each step is conditioned on the Molecule-Level Representation hmot-
M +- AddBond
PickAtomOrMotif uses hmot as an input an MLP that selects from the set of known atom types, motifs, and special END_GEN GEN class to signal the end of the generation. PickAttachment is used to select which of the atoms an added motif to connect the partial molecule (this is trivial in the case of adding single atom). This is implemented by another MLP that computes score for each added atom Va using its representation he, and hmai- As motifs are often highly symmetric, we determine the symmetries using RDKit and only consider one atom per equivalence class. An example of this is shown step (3) at the bottom of Figure D where only three of the five atoms in the newly-added added motif are available as choices, there are only three equivalence classes.
Finally, PickBond used to predict which bonds to add, using another MLP that scores each candidate bond between the focus atom の and a potential partner ts using their representations h,s. he, and hmott We also consider a special, learned END BONDS partner to allow the network to choose stop adding bonds. Similarly to Liu et al. (2018), employ valence checks to mask out bonds that would lead to chemically invalid molecules. Moreover, if o was selected as an attachment point in motif, we mask out edges other atoms in the same motif.
3

---

Published as a conference paper at ICLR 2022
The probability of generation sequence is the product of probabilities of its steps; we note that the probability a molecule is the sum over the probability of all different generation sequences leading to it, which is infeasible to compute. However, note that steps are only conditioned on the input and the current partial molecule M. Our decoding is therefore not fully auto-regressive, as it marginalizes over all different generation sequences yielding the partial molecule M. During training, we use softmax over the candidates considered by each subnetwork to obtain probability distribution. As there are many steps where there are several correct next actions (e.g. many atoms could be added next), during training, we use multi-ho hot objective that encourages the model to learn a uniform distribution over all correct choices. For more details about the architecture see Appendix B
2.3 MOLECULE GENERATION ORDERS
Algorithm 2 Determining generation order
As alluded to above, to train MoLeR we need to provide supervision for each individual step of the generative procedure, which is complicated by the fact that a single molecule may be generated in a variety of different orders. To define a concrete generation sequence, we first choose a starting atom, and then for every partial molecule choose the next atom from its frontier, i.c. atoms adjacent already generated atoms. After each choice, if the currently selected atom is part of a motif, we add the entire motif into the partial graph at once. We formalize this concept in Algorithm 2
Input: Target molecule M, partial mapping A from atoms to motifs that cover them
t, Vo < 0, 0
while not all atoms visited do if 0 then
C - ValidFirstAtoms(M))
else
C t ValidNextAtoms( M)
at ~ U(a.)
D Saaple a, uniformly
if a; is covered by A then
V+ + A(ar)
Add an entire motif
else
V faet V441, tv,
Add a single atom
In Section 3 we evaluate orders commonly used in the literature: random, where ValidFirstAtoms returns all atoms and ValidNextAAtms all atoms
on the frontier on the current partial graph, i.e., randomly chosen valid generation order; canonical, which is fully deterministic and follows a canonical ordering (Schneider et al., 2015) the atoms computed using RDKit; and two variants of breadth-first search (BFS), where we choose the first atom either randomly or as the first atom in canonical order, and then explore the remaining atoms in BFS order, breaking ties between equidistant next nodes randomly.
2.4 TRAINING MOLER
MoLeR is trained in the autoencoder paradigm, and so we extend our decoder from above with an encoder that computes a single representation for the entire molecule. This encoder GNN operates directly on the full molecular graph. but is motif-aware through the motif annotations included in the atom features. These annotations are deterministic functions of the input molecule, and thus in principle could be learned by the GNN itself, but we found them to be crucial to achieve good performance. Our model is agnostic to the concrete GNN type; practice, we use a simple yet expressive GNN-MLP layer, which computes messages for each edge by passing the states of its endpoints through an MLP. Similar to Brockschmidt (2020), we found that this approach outperforms commonly used GNN layers such as GCN (Kipf & Welling 2016) or GIN (Xu et al. 2018).
We train our overall model to optimize a standard VAE loss (Kingma & Welling, 2013) with several minor modifications, resulting in the linear combination Apriorrpprior (z) Cree (z) ) >Xprop (z))
The weights Aprior and Aprop are hyperparameters that we tuned empirically. We now elaborate on each of these loss components.
We define (c) = - D pl)(p(()) where p(=) is a multivariate Gaussian; as discussed above, the encoder qe is implemented mean and the standard deviation of the latent code =. We found that choosing Aprior < 1 and using a sigmoid annealing schedule (Bowman al. 2016 was required to make the training stable.
GNN followed by two heads used parameterize the
Following our decoder definition above, the reconstruction term free could be written as a sum over the log probabilities of each step s,, conditioned on the partial molecule M,. However, we instead rewrite this term as an expectation with the step chosen uniformly over the entire generation:
Crea (x) E Ez (=|z) Binzs log p(s; M:).
4

---

Published as a conference paper at ICLR 2022
This makes it explicit that different generation steps for fixed input molecule do not depend on each other. Figure [ Illlustrates this visually, as there are no dependencies between the individual steps. We use this to train in parallel on all generation steps at once (i.e., a batch is made up of many steps like (1)-() in Figure D. Additionally, we subsample generation steps, i.e., uniformly at random drop some of the generation steps from training. to get a wider variety of molecules within each batch. These enhancements improve training speed and robustness, and are feasible precisely because our model does not depend on the generation history. In Appendix 1.2 we show empirically that subsampling leads to faster convergence on several downstream metrics.
J. we use ( to ensure that simple chemical propertics can be accurately predicted from the latent encoding of a molecule. Concretely, we use an MI.P regressor on top of the sampled latent code to predict molecular weight, synthetic accessibility (SA) score, and octanol-water partition coefficient (logP), using MSE on these values as objective. We found that choosing the weight Xprop of this objective to be smaller than 0.1 was necessary to avoid the decoder ignoring the latent code z. All of these properties can be readily computed from the input molecule x using the RDKit library, and hence do not require additional annotations in the training data. Note that due to the inherent stochasticity in the VAE encoding process, obtaining a low value of prop is only possible the latent space learned by qo is smooth with respect to the predicted properties.
Finally, following prior works
al. 2018 Winter et al. 2019a; Li et al. 2021]
3 EXPERIMENTS
Setup We use training data from GuacaMol (Brown et al., 2019), which released curated set of =1.5M drug-like molecules, divided into train, validation and test sets. We train MoLeR on the GuacaMol training set until loss on the validation set does not improve; we then use the best checkpoint selected based on validation loss to evaluate on downstream tasks. As discussed above, we found that subsampling generation sequence steps to use only half of the steps per molccule tends to speed up convergence, as it yields more variety within each batch. Therefore, we subsample generation steps for all MoLeR experiments unless noted otherwise. For molecular optimization, we pair MoLeR with Molecular Swarm Optimization (MSO) (Winter et al.) (019b)) which is black-box latent space optimization method that was shown to achieve state-of- the-art performance. For more We show
details on the training routine, experimental setup, and hyperparameters, see Appendix C samples from the model's 's prior in Appendix D
As baselines, consider three established graph-based generative models: CGVAE LLu it al. 2018), JT-VAE (Jin et al. 2018)) and HierVAE (Jin et al. 20220). Since the publicly released code Liu et al. 2018) does not scale datasets large as GuacaMol, we re-implemented CGVAE following the released code to make it more efficient. For VAE, we used the open-source code, but implemented multithreaded decoding, which made sampling 8x faster. For HierVAE, we used the released code with no changes. Due to the high cost of training JT-VAE and HierVAE, we did not tune their hyperparameters and instead used the default values.
Baselines
Table I: Training and sampling speed for our model and the baselines on a Tesla K80 GPU.
3.1 QUANTITATIVE RESULTS
Efficiency We measure the speed of different models in training and inference, quantified by the number of molecules processed per second.
Model
Train (mol/sec)
Sample (mol/sec)
CGVAE JT-VAE
57.0
1.4
Note that we do not subsample generation steps for this comparison, so that every model processes all the steps, even though MoleR can learn from only subset of them. We compare these results in Table I We see that, thanks to simpler formulation and parallel training all generation steps, MoLeR is much faster than all baselines for both training and inference.
3.2
3.4
HiE
17.0
12.3
MoLeR
95.2
34.2
Unconstrained Generation Similarly to Brown et al. (201)), we use Frechet ChemNet Distance (FCD) (Preuer et al., 2018)) to measure how much sampled molecules resemble those in the training data. We show the results in Figure (left,, in which we compare different models and variations of MoLeR trained with different choices of generation order (see Section 2.3) and different motif vocabulary sizes. It shows that MoLeR with large vocabulary outperforms the baselines substantially,
5

---

Published as a conference paper at ICLR 2022
Frechet ChemNet Distance u.
CGVAE
Canonical
Random
Frechet ChamNet Distance
Canonical
Random
DFS (canonical start)
13
BFS (canonical start)
BFS frandom start)
(random start)
9
HiervAE
IT-VEE
1024 2048 4096 6192 Motif vocabulary size
128
32
512 1024 2048 4096 6192 Motif vocabulary size
Figure 2: Frechet ChemNet Distance (lower is better) for different generation orders and vocabulary sizes. We consider generation from scratch (left), and generation starting from a scaffold (right).
despite being much faster to train and sample from, and having support for scaffold-constrained generation. Furthermore, we can see that MoLeR's 's performance increases as the vocabulary size grows. Finally, we note that training with generation orders with deterministic starting point performs best, and that random order performs less well, as modeling wide range of orders harder.
Unlike some prior work (De Cao & Kipi 2018 Brown et al. 2019). we do not compare validity, uniqueness and novelty, as our models get near pear-perfect results on these metrics, making comparison meaningless. Concretely, we obtain 100% validity by design (due to the use of valence checks), uniqueness above 99%, and novelty above 97%.
ceafoldd-cossrainee Generation Next, we consider the setting of enforcing a given scaffold. We first choose a chemically relevant scaffold Σ (PubChem CID 12658820) that commonly appears in GuacaMol training data. We then estimate the posterior distribution on latent codes induced by Σ by encoding all training molecules that contain it and approximating the result with a Gaussian Mixture Model (GMM) with 50 mixture components. Finally, we draw latent codes from the GMM, decode them starting the generation process from Σ, and compare the resulting molecules with molecules from the data that contain Σ. By using samples from the EMM-approximmted posterior, opposed to samples from the prior, we ensure that we use latent codes which are compatible with the scaffold E, which we found to dramatically improve the downstream metrics. Intuitively, constraining the decoding restricts the latent codes of output molecules to a manifold defined by the scaffold constraint; using an approximate posterior ensures that the projected samples lie close that manifold.
In Figure 2 (right) we show the resulting FCD. We find that the relative performance of different generation orders is largely reversed: since the models trained with canonical order can only complete prefixes of that order, they are not well equipped to complete arbitrary scaffolds. On the other hand, models trained with randomized orders are more flexible and handle the task well, As with generation from scratch, using larger motif vocabulary tends to help, especially if motifs happen to decompose the scaffold into smaller fragments (or even the entire scaffold may appear in the vocabulary). Finally, note that BFS order using a random starting point gives the best results for this task, while still showing good performance for unconstrained sampling.
Unconstrained Optimization We experiment the GuacaMol optimization benchmarks (Brown) et al. 2019), tracking two metrics: raw performance score, and quality, defined as absence of undesirable substructures. In Table 2 (left), we compare literature. We find that MoLeR maintains a good balance between raw score and quality. Note that the quality filters not directly available the models during optimization, and rather are evaluated post-hoc on the optimized molecules. This ensures that high quality scores can only be achieved the model is biased towards reasonable molecules, and not by learning to exploit and "slip through" the quality filters, similarly to what has been shown for property predictors (Renz et al.) 2020). Consequently, the best performing models often produce unreasonable molecules (Winter al. 2019b Xu et al.) 2020). While the SMILES LSTM baseline of Brown et al. (2019) also gets good results on both score and quality, as we will see below, it struggles to complete arbitrary scaffolds. Note that, out of 20 tasks in this suite, only one tests optimization from a scaffold, and that task uses small scaffold (Figure 3 (top)), making it relatively easy (even simple models get near near-perfect results). In contrast, scaffolds typically used in drug discovery Schuffeneeee (2012). We conclude that while MoLeR shows good performance on GuacaMol tasks, they do not properly evaluate the ability to complete realistic scaffolds.
results with those taken from the
much more complex (Schuffenhauer et al.)

---

Published as a conference paper at ICLR 2022
Table 2: Results on 20 GuacaMol tasks (left) and 4 additional scaffold-based tasks (right). First five rows correspond to baselines from Brown et al. (2019). We do not compute quality if less than 100 molecules per benchmark were found.
GuacaMol
Scaffolds
Method
Score
Quality
Score
Quality
Best of dataset
0.61
0.77
0.17
SMILES LSTM
0.87
0.77
0.45
SMILES GA
0.72
0.36
0.45
GRAPH MCTS
0.45
0.22
0.20
GRAPH GA
0.90
0.40
0.79
CDDD + MSO
0.90
0.58
0.92
0.59
Figure 3: Scaffold from a GuacaMol benchmark (top) and a scaffold from our additional benchmark (bottom).
MNCE-RL
0.92
0.54
0.95
0.47
MoLeR + MSO
0.82
0.75
0.93
0.63
Scaffold-constrainee Optimization To evaluate scaffold-constrained optimization, we extend the GuacaMol benchmarks with 4 new scaffold-based tasks, using larger scaffolds extracted from or inspired by clinical candidate molecules marketed drugs, which are more representative of real- world drug discovery (e.g. (botte]( The task is to perform scaffold-constraineed exploration towards target property profile; as the components of the scoring functions are aggregated via the geometric mean, and presence of the scaffold is binary, molecules that do not contain the scaffold receive total score of (sce Appendix E for more details). We show the results in Table 2 (right). We see that MoLeR performs well, while most baseline approaches struggle to maintain the scaffold.
Finally, we run the tasks of Lim al. (201)), where the aim is to generate 100 distinct decorations of large scaffolds to match one or several property targets: molecular weight, logp and TPSA. While the model of Lim al. (2019) is specially designed to produce samples conditioned on the values of these three properties in ohe-shot, we convert the target property values into a single objective that we can optimize with MSO. Concretely, for each property we compute the absolute difference to the target value, which we divide by the result of [im et al. (2019) for a given task, and then average over all properties of interest; under the resulting metric, the model of Lim et al. (2019) gets score of 1.0 by design. We show the results in Figure 4 Despite not being trained for this this task, MoLeR outperforms the baseline on all benchmarks. These results show that MoLeR can match the capabilities of existing craffold-based models out-of-the-bon To verify that this cannot be attributed solely to using MSO, we also tried using CDDD as the generative model. We find that CDDD often produces invalid molecules molecules that do contain the scaffold; MoI.eR avoids both of these problems thanks to valence constraints and some cases CDDD needs many steps to discover 100 distinct decorations or does not discover them at all; having 100 decorations is needed to compare the average result to Lim et al. 2019).. Thus, for CDDD we plot modified score by duplicating the worst score an appropriate number of times; this was not needed for MoLeR, as it always finds enough decorations in the first few steps.
generation. As a result, in
3.2 QUALITATIVE RESULTS
Unconstrained and constrained interpolation To test the smoothness of our latent space and analyze how adding the scaffold constraint impacts decoding, we select chemically relevant scaffold (PubChem CID 7375) and two dissimilar molecules m and m2 that contain it. We then linearly interpolate between the latent encodings of mi and m2, and select those intermediate points at which the corresponding decoded molecule changes. We show in Figure 5 (top) that MoLeR correctly identifies a smooth transition from my to m2. Most of the differences between my and m2 stem from the latter containing two additional rings, and we see that rings are consistently added during the interpolation. For example, the third step, the molecule grows by one extra ring, but of a type that does not appear in m2; in the next step, this ring transforms into the correct type, and is then present in all subsequent steps (a similar pattern can be observed for the other ring). However, we see that some intermediate molecules do not contain the scaffold: although all of the scaffold's building blocks are present, the interpolation goes through a region in which the model decides to move the NH group to different location. thus breaking the integrity of the scaffold. This shows that while latent space distance strongly correlates with structural similarity, latent space smoothness alone does not guarantee the presence of scaffold, which necessitates scaffold-based generation.
7

---

Published as a conference paper at ICLR 2022
MW
TPSA
logp
All
2
Distance to tataaet
MoLeR
1
CDDD
Lim et
0
0
100
100
100
0
100
Steps
Steps
Steps
Steps
Figure 4: Comparison on tasks from Lim et al. 2019). We show both single-property optimization tasks as well as one where all properties must be optimized simultancously. We plot averages and standard error over 20 runs for each task; each run uses a different scaffold and property targets.
Figure 5: Interpolation between latent encodings of two molecules; unconstrained decoding (top), constrained with scaffold (bottom). The scaffold is highlighted in each molecule that contains it.
In contrast, in Figure 3 (bottom), we show the same sequence of latent codes decoded with a scaffold constraint. We see that the constraint keeps the NH group locked in place, so that all intermediate molecules contain the scaffold. The molecule decoded under a scaffold constraint is typically very similar to the one decoded without, showing that constrained decoding preserves chemical features that are not related to the presence of the scaffold. However, when trying include the scaffold, our model does not have to resort to a simple rearrangement of existing building blocks: for example, in the 7th step, adding constraint also modifies one of the ring types, which results in smoother interpolation in comparison to the unconstrained case. Finally, while the interpolation points were chosen remove duplicates from the unconstrained path, we see that the last two latent points both get mapped to m2 when the constraint is introduced. This is because the last step of the unconstrained interpolation merely rearranges the motifs, moving back the NH group its initial location, and restoring the scaffold. This modification is not needed if the scaffold is already present, and therefore our model chooses to project both latent codes to the same point on the
manifold.
Latent Space Neighborhood To analyze the structure of our select another scaffold and perform scaffold-conse constrraied decoding of group of neighboring latent points. We note that close-by latent codes decode to similar molecules, often composing the same motifs in different way, mirroring the observation of Jin et al. (2018). Moreover, some latent space directions seem to track simple chemical properties. For further analysis of this result see Appendix FF]
latent space, we
Learned Motif Representations To better understand how MoLeR uses motifs, we extract learned motif representations from trained model. We found that, despite the weights having no direct access to molecular structure or features of motifs, nearest neighbors in the representation space correspond to pairs of nearly identical motifs. See Appendix G for visualization and further discussion.
3.3 ABLATIONS
We tested a number of ablations of our model to analyze the effect of its individual components. Tigure[ssoow the effect of motif vocabulary size; in particular, the points for 0 motifs correspond to not using any motif information at all. In Appendix H we repeat the analysis from Figure for optimization performance, showing that some of the trends transfer also to that setting. Finally, we considered partially removing motifs by not using motif embeddings in the encoder, and found that this also decreases performance, as the model needs to use some of its capacity to recognize motifs in the input graphs (see Appendix I.] for details).
We also evaluated the impact of subsampling generation steps (as described in Section 2.4). and found that this method allows MoLeR to match the training data more rapidly, as measured by FCD (see Appendix 1.2 for details). Finally, we analyzed the influence of using the auxiliary loss term Eprop- and found that in model trained without this objective, molecules that are close in latent space are less similar to each other in important chemical properties such as synthetic accessibility (details can be found in Appendix
8

---

Published as a conference paper at ICLR 2022
4 RELATED WORK
Our work naturally relates to the rich family of in silico drug discovery methods. However, it is most related to works that perform iterative generation of molecular graphs, works that employ fragments or motif', and works that explicitly consider scaffolds.
Iterative generation of molecular graphs
Many graph-based models for molecule generation
employ some form of iterative decoding. Often single arbitrary ordering is chosen: Liu al. first generate all atoms in a one-shot manner, and then generate bonds in BFS order; Jin et al. 2018
(2018)
2020) generate a coarsened tree-structured form of the molecular graph in a deterministic DFS order;
You et al. (2018) use random order. Some works go beyond a single ordering: [iao et al. (2019)
marginalize over several orders, while Mereado et al.] (2020) try both random and canonical, and find the latter produces better samples, which is consistent with our unconstrained generation results. Sacha et al. (2020) generate graph edits with the goal of modeling reactions, and evaluate a range of editing orders. Although the task in their work is different, the results are surprisingly close to ours: fully random order performs badly, and the optimal amount of non-determinism is task desendennd.nn.
Motif extraction Several other works make of motif extraction approaches related to the one described in Section 2.T Jin et al. (2020) propose a very similar strategy, but additionally do not break leaf bonds, i.e. bonds incident to atom of degree which we found produces many motifs that are variations of the same underlying structure (e.g. a ring) with different combinations of leaf atoms; for simplicity, we chose omit that rule in our extraction strategy. More complex molecular fragmentation approaches also exist (Degen et al. 2008), and we plan to explore them in future work.
Motif-based generation Our work is closely related to the work Jin et al. (2018 2020), which also uses motifs to generate molecular graphs. However, these works cannot be easily extended to scaffold-based generation, and cannot generate molecules which use building blocks not covered by the motif vocabulary. While HierVAE (Jin et al. 2020) does include individual atoms and bonds in its vocabulary, motifs are still assembled in tree-like manner, meaning that the model cannot generate an arbitrary cyclic structure if its base cycles are not present in the vocabulary.
scaffild-conditioneed generation Some prior works can construct molecules under hard scaffold constraint. Lim et al. (2019) proposes a graph-based model with persistent state; scaffold- generation possible because the model is explicitly trained on (scaffold, molecule) pairs. In contrast, MoLeR treats every intermediate partial graph as if it were scaffold to be completed. Li et al. (2018a) use a soft constraint, where the scaffold is part of the input, but is not guaranteed to be present in the generated molecule. Finally, Aruss-oos et al. (2020): Langevin et al. (2020) adapt SMILES-basee models to work with scaffolds, and cannot guarantee validity of generated molecules.
Overall, it is non-trivial to extend existing molecule generators to the scaffold setting. For SMILES- based models, the scaffold may not be represented by a substring of the SMILES representation of the complete molecule, and its presence cannot easily be enforced by forcing some of the decoder's 's choices. Junction tree-based models (Jin et al. 2018) start the generation at leaf of the junction tree, but the junction tree for a scaffold does not necessarily match that of the full molecule, or reaches its leaves. Furthermore, gwwpg- based models often use recurrent state updated throughout models that do not
the entire generative procedure (Jin et al. 2018 2020). Finally, fragment- support substructures not covered by their fragment library (Jin et al. (020)p fail when scaffold is not fully covered by known fragments. MoLeR, through seemingly minor design choices (graph-based, conditioned only a partial graph, not reliant on fixed generation order, flexibility to switch between fragment- based and atom-by-aat bom-byy-tom generation), side-steps all of these issues.
5 CONCLUSION
In this work, we presented MoLeR: a novel graph-based model for molecular generation. As our model does not depend on history, it can complete arbitrary scaffolds, while still outperforming graph-base generative models in unconstrained generation. Our quantitative and qualitative results show that MoLeR retains desirable properties of generative models such as smooth interpolation- while respecting the scaffold constraint. Finally, we show that it exhibits good performance in unconstrained optimization, while excelling in scaffold-constrainedd optimization.
9

---

Published as a conference paper at ICLR 2022
ETHICS STATEMENT
As we consider our work to be fundamental research, there are no direct ethical risks or societal consequences; these have be analyzed per concrete applications. Broadly speaking, tools such as MoLeR can be widely beneficial for the pharmaceutical industry. However, note that while MoLeR performs optimization tasks that would otherwise be done manually by medicinal chemists, is unlikely to be considered replacement for them, and rather enhancement their creative process.
ACKNOWLEDGMENTS
would like to thank Hubert Misztela, Michal Pikusa and William Jose Godinez Navarro for work on the VT-VAE baseline. Moreover, want to acknowledge the larger team (Ashok Thillaisundaram, Jessica Lanini, Megan Stanley, Nikolas Fechner, Pawel Czyž, Richard Lewis, Sarah Lewis and Qurrat UI Ain) for engaging in helpful discussions.
REFERENCES
Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for large-scale machine learning. In 12th USENIX symposium on operating systems design and implementation (OSDI 16), pp. 265-283, 2016.
Sungsoo Ahn, Junsu Kim, Hankook Lee, and Jinwoo Shin. Guiding deep molecular optimization with genetic exploration. arXiv preprint arXiv:2007. 04897, 2020.
Apixaban. Pubchem compound summary for cid 101 0018999,, apixaban. November, 2021. URL https://pubchem. ncbi. nlm. n....nnn gww. htt..//ww.......oommm///////aaaa
Josep Arús-Pous, Atanas Patronov, Esben Jannik Bjerrum, Christian Tyrchan, Jean-Louis Reymond, Hongming Chen, and Ola Engkvist. Smiles- based deep generative scaffold decorator for de-novo drug design. Journal of cheminformaties, 12:1-18, 2020.
Rim Assouel, Mohamed Ahmed, Marwin H Segler, Amir Saffari, and Yoshua Bengio. Defactor: Differentiable edge factorization based probabilistic graph generation. arXiv preprint arXiv: 181 1, 1.09766, 2018.
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint 1rXiv:1607006450 2016.
Samuel R. Bowman, Luke Vilnis, Oriol Vinyals, Andrew Dai, Rafal Jozefowicz. and Samy Bengio. Generating sentences from a continuous space. In Proceedings of The 20th SIGNLL Conference Computational Natural Language Learning, pp. 10 21, 2016.
John Bradshaw, Brooks Paige, Matt Kusner, Marwin HS Segler, and José Miguel Hernández-Lobat. Barking up the right tree: an approach to search over molecule synthesis dags. arXiv preprint arXiv:2012.11522 2020.
Mare Brockschmidt. GNN-film: Graph neural networks with feature-wise linear modulation. In International Conference Machine Learning, pp. 1144-1152. PMLR, 2020.
Nathan Brown, Marco Fiscato, Marwin HS Segler, and Alain C Vaucher. Guacamol: benchmarking models for de novo molecular design. Journal of chemical information and modeling, 59(3): 1096-1108, 2019.
Gabriele Corso, Luca Cavalleri, Dominique Beaini, Pietro Liò, and Petar Veličkovié. Principal neighbourhood aggregation for graph nets. arXiv preprint arXiv:2004.057/1 2020.
Nicola De Cao and Thomas Kipf. Molgan: An implicit generative model for small molecular graphs.
arXiv preprint arXiv: 1805. 1973, 2018.
10

---

Published as a conference paper at ICLR 2022
Jörg Degen, Christof Wegscheid Geelaa,,,,, Andrea Zaliani, and Matthias Rarey. On the art of compiling and using' drug- like' chemical fragment spaces. ChemMedChem: Chemistry Enabling Drug Discovery, 3(10):1503-13 1507, 2008.
Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. arXiv preprini arXiv: 1704.01422...2.. 2017.
Rafael Gómezz-ombarellt. Jennifer N Wei, David Duvenaud, José Miguel Hernández-Lobate Benjamín Sänchez--Lenelling Dennis Sheberla, Jorge aguilera-Iparragurre Timothy D Hirzel, Ryan P Adams, and Alán Aspuru-Guzik. Automatic chemical design using data-driven continuous representation of molecules. ACS central science, 4(2):268-276, 2018.
Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. arXiv preprint /802 1802.00364. 2018.
Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Hierarchical generation of molecular graphs using structural motifs. arXiv preprint arXiv:2002.032.:6 2020.
Diederik P Kingma and Jimmy Ba. Adam: method for stochastic optimization. arXiv preprint orXiv::412.6900 2014.
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
Thomas Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint SSS:::6699009000 2016.
Greg Landrum et al. Rdkit: Open-source cheminformatics. 2006. URL
Grg
Maxime Langevin, Hervé Minoux, Maximilien Levesque, and Mare Bianciotto. Scaffold-constrrineed molecular generation. Journal of Chemical Information and Modeling. 2020.
Lenacapavir. Pubchem compound summary for cid 133082658, lenacapavir. November, 2021. URL
httts:://pubchett ncbi. nwm....mmmm.mmm..mmmmm.........m www.nii...... http.//w.w....ooooooee/eeaaaaaaa
Yibo Li, Liangren Zhang, and Zhenming Liu. Multi-objective de novo drug design with conditional graph generative model. Journal of cheminformatics, 10(1):1-24, 2018a.
Yibo Li, Jianxing Hu, Yanxing Wang, Jielong Zhou, Liangren Zhang, and Zhenming Liu. Deepscaffold: A comprehensive tool for scaffold-based de novo drug discovery using deep learning. Journal of chemical information and modeling. 60(1):77-91, 2019.
Yifeng Li, Hsu Kiang Ooi, and Alain Tchagang. Deep evolutionayy learning for molecular design, 2021. URL BtLLtttps///ppeeeviiiie http://pweeeeeee..eee..ooooaoaas
Yujia Li, Daniel Tarlow, Mare Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. arXiv preprint arXiv: /5/ 1.0593,, 2015.
Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, and Peter Battaglia. Learning deep generative models of graphs. arXiv preprint /803 /80.0334, 2018b.
Renjie Liao, Yujia Li, Yang Song, Shenlong Wang, Charlie Nash, William L Hamilton, David Duvenaud, Raquel Urtasun, and Richard S Zemel. Efficient graph generation with graph recurrent attention networks. arXiv preprint urXiv:1910.00770 2019.
Jacchang Lim, Yeon Hwang, Seungsu Kim, Seokhyun Moon, and Woo Youn Kim. Scaffold- based molecular design using graph generative model. arXiv preprint drXiv:1905.136:: 2019.
Qi Liu, Miltiadis Allamanis, Mare Brockschmidt,, and Alexander Gaunt. Constrained graph variational autoencoders for molecule design. Advances in neural information processing systems, 31:7795- 7804, 2018.
Andrew L Maas, Awni Y Hannun, and Andrew Ng. Rectifier nonlinearities improve neural network acoustic models. In Proc. ieml, volume 30, pp. 3. Citeseer, 2013.
11

---

Published as a conference paper at ICLR 2022
Rocío Mercado, Tobias Rastemo, Edvard Lindelöf, Günter Klambauer, Ola Engkvist, Hongming Chen, and Esben Jannik Bjerrum. Graph networks for molecular design. Machine Learning: Science and Technology, 2020.
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang. Zachary Vito Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d' d'Alché-Bie Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems 32, pp. 8024-8035. Curran Associates, Inc., 2019.
Agnieszka Pocha, Tomasz Danel, and Lukasz Maziarka. Comparison of atom representations in graph neural networks for molecular property prediction. arXiv preprint arXiv:2012.044444, 2020.
Kristina Preuer, Philipp Renz, Thomas Unterthiner, Sepp Hochreiter, and Günter Klambauer. Frechet chemnet distance: metric for generative models for molecules in drug discovery. Journal of chemical information and modeling, 58(9):1736-117) 1741, 2018.
PubChem CID 12658820. Pubchem compound summary for cid 12658820 1,4-Dihyydrqquiollie. January, 2021. URL https://pubbchmm. hcb.eeemmmccc...o htt.:/a...m.m...oo...e... wtt..//wwii...oooocmmoouo///////
Di Oihydroquinoling
PubChem CID 57732551. Pubchem compound summary for eid 57732551 L.3-Dimethylquinolin-
4(HH)-one. January, 2021. URL
3_ Dimeeimt Squeethhlluinniiin 4_1H_ one ncw...nccii....... bocbi.nnmg wtw..mmiih...v.. http://i.........//ooooooooooo
PubChem CID 7375. Pubchem compound summary for cid 7375, 3-trifttorometthllaaiiinee
January, 2021. URL https::/ppbcchee ncbi. nlm. nih. wtt.lloo/ccooooo gow/compound/3-
Trifluoromethyl aniline
Matthias Rarey and J Scott Dixon. Feature trees: new molecular similarity measure based on tree matching. Journal of computer-aided molecular design, 12(5):471-990, 1998.
Philipp Renz, Dries Van Rompaey, Jörg Kurt Wegner, Sepp Hochreiter, and Günter Klambauer. On failure modes of molecule generators and optimizers. 2020.
Mikolaj Sacha, Mikolaj Blaž, Piotr Byrski, Pawet Włodarczyk- Prausyyyykk- and Stanistaw Jastrzebski. Molecule edit graph attention network: Modeling chemical reactions as sequences of graph edits. arXiv preprini arXiv:2006.1 15426, 2020.
Nadine Schneider, Roger A Sayle, and Gregory A Landrum. Get your atoms in order - an open-source implementation of novel and robust molecular canonicalization algorithm. Journal of chemical information and modeling, 55(10):21 1112111-21121 1-2120, 2015.
Ansgar Schuffenhauer. Computational methods for scaffold hopping. Wiley Interdisciplinary Reviews: Computational Molecular Science, 2(6):842-867, 2012.
Ansgar Schuffenhauer, Peter Ertl, Silvio Roggo, Stefan Wetzel, Mareus A Koch, and Herbert Waldmann. The scaffold tree- visualization of the scaffold universe by hierarchical scaffold classification. Journal of chemical information and modeling, 47(1):47-58, 2007.
Marwin HS Segler, Thierry Kogej, Christian Tyrchan, and Mark P Waller. Generating focused molecule libraries for drug discovery with recurrent neural networks. ACS central science, 4(1): 120-131, 2018.
Sildenafil. Pubchem compound summary for cid 135398744, sildenafil. November, 2021. URL www...............ooooooo..... htt../.h..oo.cooooooo/ooooooooo 1denafi]
httts::/pubbcett ncbi . www...m......o......
Martin Simonovsky and Nikos Komodakis. Graphvae: Towards generation of small graphs using variational autoencoders. In International Conference on Artificial Neural Networks, pp. 412 422.. Springer, 2018.
12

---

Published as a conference paper at ICLR 2022
Niclas Ståhl, Goran Falkman, Alexander Karlsson, Gunnar Mathiason, and Jonas Bostrom. Deep reinforcement learning for multiparameter optimization in de novo drug design. Journal of chemical information and modeling, 39(7):3166-3117) 2019.
Robin Winter, Floriane Montanari, Frank Noé, and Djork-Amé Clevert. Learning continuous and data-driven molecular descriptors by translating equivalent chemical representations. Chemical science, 10(6):1692- 1701, 2019a.
Robin Winter, Floriane Montanari, Andreas Steffen, Hans Briem, Frank Noé, and Djork-Amé Clevert. Efficient multi-objective molecular optimization in a continuous latent space. Chem. Sci., 10: 8016-8024, 2019b.
doi: 10. 10.1039/99C001928T. URL http://dee www.doooo.o......oooo...... doi.orrg/0.1139/
C9SC01928F
Xarelto. Pubchem compound summary for cid 6433119, xarelto. November, 2021. URL https //pubchem. hrc.eeeenccbi...m. n 1m. nih. gov
6433119
Yutong Xie, Chence Shi, Hao Zhou, Yuwei Yang, Weinan Zhang, Yong Yu, and Lei Li. Mars: Markov molecular sampling for multi-objective drug discovery. arXiv preprint arXiv:2 10432, 2021.
Chencheng Xu, Qiao Liu, Minlie Huang, and Tao Jiang. Reinforced molecular optimization with neighborhood-conntllled grammars. arXiv preprint arXiv:2011.07225. 2020.
Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful graph neural
networks? arXiv preprint arXiv: 18000000,, 2018.
Jiaxuan You, Bowen Liu, Rex Ying, Vijay Pande, and Jure Leskovec. Graph convolutional policy network for goal-directed molecular graph generation. arXiv preprint 100iv:18060024777 2018.
13

---

Published as a conference paper at ICLR 2022
A BACKGROUND: GRAPH NEURAL NETWORKS
In this work we consider graphs g (V, E) with vertices V and edges E. In the case of molecules, edges & correspond to bonds between pairs of atoms, and are thus typed, with each bond being either single, double triple. Formally
C (single, double, triple} x
Note that while cheminformatics tools such as RDKit also distinguish fourth type bonds, called aromatic, generating aromatic rings in step-by-step fashion is known to be challenging (Jin et al. 2018). Thus, during preprocessing we convert aromatic rings alternating single and double bonds, following process called kekulization.
Given G. we learn node and graph representations using Graph Neural Networks. The network begins with starting node representations { V}; in
set these to linear projections of the node features (énit), Each GNN layer propagates node representations {ht o E V} to compute {htt u V} using message passing (Gilmer et al. 2017
h+t1 f(h,, aggregate((mm((tt (/) : (v, E)))
where my computes the message between two nodes connected by an edge of type L, aggregate combines all messages received by given node, and f computes the new node representation given the old representation and the aggregated messages. A common choice is to use linear layer for every m,, pointwise sum for aggregate, and a GRU update for f (Li et al. 2015), but many other variants exist (Brockschmidt 2020 Corso et al. 2020).
After L layers of message passing obtain final representations {he E VJ. with h summarizing the L-hop neighborhood of These representations can pooled to form a graph-level representation by using any permutation-invarian aggregator, such weighted sum.
B ARCHITECTURE
The backbone our architecture consists of two GNNs: one used to encode input molecule, and the other used to encode the current partial graph. Both GNNs have the same architecture, but are otherwise completely separate, and do not share any parameters.
To implement our GNNs, we employ the GNN-MLP layer (Brockschmidij 2020). We use 12 layers with separate parameters, Leaky ReLU non-linearities (Maas et al. 2013). and LayerNorm (Ba) et al. (2016) after every GNN layer. If using motifs, concatenate the atom features with motif embedding of size 64, and then linearly project the result back into 64 dimensions. We use 64 as the hidden dimension throughout all GNN layers, guided by early experiments showing that wider hidden representations were less beneficial than deeper GNN. Moreover, to improve the flow of gradients in the GNNs, we produce the final node-level feature vectors by concatenating both initial and intermediate node representations across all layers, resulting in feature vectors of size 64- 13- 832. Intuitively, this concatenation serves as skip connection that shortens the path from the node features to the final representation.
To pool nove-level representations into a graph-level representation, we use an expressive multi- headed aggregation scheme. The i-th aggregation head consists of two MLPs: sf which computes a scalar aggregation score, and t which computes transformed version of the node representation. These are then used to compute the i-th graph-level output of according to
w²
(ommalize((""Aaa V))
w -t (((h,)) Σ NEV
14

---

Published as a conference paper at ICLR 2022
Specifically, compute the scores 56 (hh) for all of the nodes, normalize across the graph using normalize, and then use them to construct a weighted sum of the transformed representations t' (hey). For the normalization function in a head that implements a weighted mean) or a sigmoid (weighted sum). We use 32 heads for the encoder GNN, and 16 heads for the partial graphs GNN. In both cases, half of the heads use softmax normalization, while the other half uses sigmoid. The outputs from all heads are concatenated to form the final graph-level vector; as different heads use different normalization functions (softmax or sigmoid), this is in spirit related to Principal Neighborhood Aggregation (Corso et al. 2020), but here used for graph-level readout instead of aggregating node-level messages.
consider either passing the scores through softmax (which results
Our node aggregation layer allows to construct a powerful graph-level representation; its dimensionality can be adjusted by varying the number of heads and the output dimension of the transformations fi. For input graphs we use a 51 512-dimens graph-level representation (which is then transformed to produce the mean and standard deviation of a 512-dimensional latent code 2), and for partial graphs we use 256 dimensions.
To implement the functions used in our decoder procedure (i.e., the neural networks implementing PickAtomOrMotif, PickAttachment, and PickBond in Algorithm I we use simple multilayer perceptrons (MLPs).
The MLP for PickAtomOrMatif has to output distribution over all atom and motif types and the special END_GEN option. As input, receives the latent code 2 and the partial molecule representation himat- As the number of choices is large, use hidden layers which maintain high dimensionality (two hidden layers with dimension 256). Predicting the type of the first node in an empty graph would require encoding an empty partial molecule to obtain lmoot; in practice, we side-step this technicality by using a separate MLP to predict the first node type, which takes as input only the latent encoding
In contrast, the networks for PickAttachment and PickBond are used as scorers (i.c. need to output a single value), therefore we use MLPs with hidden layers that gradually reduce dimensionality (concretely, three hidden layers with dimension 128, 64, 32, respectively). The MLPs for PickAttachment and PickBond take the latent code z, the partial molecule representation hmol and the representation h, of each scored candidate node v. Finally, PickBond not only needs to predict the partner of a bond, but also one of three bond types (single, double and triple); for that we use an additional MLP with the same architecture as the scoring network, but used for classification.
C TRAINING AND INFERENCE
We train our model using the Adam optimizer (Kingma & Ba 2014). We found that adding an initial warm-up phase for the KL loss coefficient Aprior (i.e. increasing from 0 to a target value over the course of training) helps to stabilize the model. However, we reach the target Aprior in 5000 training steps, whereas full convergence requires around 200 000 steps. This is in contrast to Jin et al. (018)), which varies Xprior (also referred to as (3) uniformly over the entire training. A short warm-up phase is beneficial, as allows to perform early stopping based on reaching a plateau in validation loss; this cannot be done while Aprior is being varied, as there is no clear notion of improvement if the training objective is changing.
warm-up phase is relatively short:
When constructing minibatches during training, we combine the molecular graphs until a limit of 25 000 nodes is reached. We cap the total number of nodes rather than the total number of molecules, as that more robust to varying sizes of molecules in the training data.
C.I HYPERPARAMETER TUNING
Due to very large design space of GNNs, we performed only limited hyperparameter tuning during preliminary experiments. In our experience, improving the modeling (e.g. changing the motif vocabulary generation order) tends to have a larger impact than tuning low-level GNN architectural choices. For hyperparameters describing the expressiveness of the model, such as the number of layers hidden representation size, set them to reasonably high values, which is feasible as model is very efficient to train. We did not make an attempt to reduce model size; it is likely that a smaller model would give equivalent downstream performance.
15

---

Published as a conference paper at ICLR 2022
One parameter that found to be tricky to tune is the Aprior coefficient that weighs the Cprior loss term. An additional complication stems from the fact that we compute Cree as an average over the generation steps instead of a sum. While we made this design choice to make the loss scaling robust to training steps subsampling (i.e. Aprior does not have to be adjusted if we use only a subset of steps at training time), it led to decreased robustness when the difficulty of an average step varies between experiments. Concretely, when a larger motif vocabulary is used, generating a molecule entails fewer steps, but those steps are harder on average, since the underlying classification tasks distinguish between more classes. In preliminary experiments, we noticed the optimal value of Aprior increased with vocabulary size, closely following a logarithmic trend: doubling the motif vocabulary size translated to the optimum Aprior increasing by 0.005. For vocabulary sizes up to 32 we used Aprior = 0.01, and then followed the logarithmic trend described here. Note that, due to differences in the loss definitions, our value of Aprior is not directly comparable to the values for /3 in 3- 3-VAE works.
Finally, varying the generation order and the size of the motif vocabulary explores different performance trade-off's depending the downstream task. For all optimization benchmarks in Section 3 we used 128 motifs; moreover, we chose the BFS order with a random starting point for optimization.
unconstrained optimization, and the fully random order for
C.2 SOFTWARE AND HARDWARE
We performed all experiments on a single GPU, For all measurements in Table I. we used a machine with a single Tesla K80 GPU. Our own implementations (MoLeR, CGVAE) are based on TensorFlow 2 (Abadi et al. 2016). while the models of et al. (2018 2020) (JT-VAE, HierVAE)
use PyTorch Paszke et al. 2019).
Training Mo requires first preprocessing the data, which takes up to one CPU day for GuacaMol, followed by training itself, which takes up to a few GPU days. While the generation benchmarks are cheap to run, optimization benchmarks are typically expensive. Each individual optimization benchmark takes between and 130 hours of GPU time, depending on the details the scoring function and size of the molecules that the algorithm ends up exploring. In particular, scaffold-based optimization benchmarks on average tend to be more compute intensive, as for full correctness the scoring functions need to verify that the scaffold is present (even though with MoLeR it is guaranteed to be included).
C.3 OPTIMIZATION
To perform optimization we used the original MSO code Winter et al. (2019b); we found that the default hyperparameters already resulted in good performance. However, we made two modifications to the algorithms to make the interplay of MSO and MoLeR smoother.
Deterministic encoding Despite being black-box optimization method, MSO does use the encoder part of the generative model: first, to encode the seed molecules, but more interestingly, to re-encode molecules found in each step of optimization, adjusting the particle positions as x f encode (d)code(ec)))( we hypothesise that the latter was introduced to "snap back" the particles to the latent space region "preferred" by the encoder. Unlike CDDD, MoLeR is variational autoencoder, thus by design the encoding process is non-deterministic; this randomness interacts badly with MSO's re-encoding. Therefore, for all of our optimization experiments made the MoLeR encoder deterministic by always returning the maximum likelihood latent code (which coincides with the mean of the predicted Gaussian).
Latent code clipping One detail of MSO that we adapted to MoLeR is clipping of the particles' latent coordinates. Winter al. (2019)) clip to hypercube [-1, 1I where D) 512 is the latent space dimension; while this makes sense for an unregularized autoencoder such as CDDD, the output of MoLeR's 's encoder is regularized through the Eprior loss term. Concretely, the mean of the distribution predicted by the encoder is penalized proportionally to its norm. This suggests that a ball may better approximate the encoder's 's distribution than a hypercube, which we indeed found to hold in practice. Therefore, for Mol eR we clip to a ball of fixed radius R = 10; on the GuacaMol benchmarks (Brown et al., 2019) this modification alone improved MoLeR's score from 0.77 to 0.82, while also improving quality from 0.74 to 0.76. We chose the radius It so that almost all encodings of training set molecules land within the corresponding ball.
16

---

Published as a conference paper at ICLR 2022
D SAMPLES FROM THE PRIOR
HAPa
3o0
pandons
tooo
forth
aoo
too coor
Figure 6: Samples from the prior of trained MoLeR model.
17

---

Published as a conference paper at ICLR 2022
E SLAFFOLD-BASER OPTIMIZATION BENCHMARKS
Our new scaffold-based benchmarks were inspired by real-world clinical candidates or marketed drugs, and employ large challenging scaffolds. The format closely follows the used for tasks in Guacamol (Brown et al. 2019); in all cases, the score a task-specific real number in the [0, 1] range, with higher values being better, indicating how well the given molecules match target molecular profile. To measure quality, we used the same quality filters as Brown et al. (2019).
Table 3: Targets and scaffolds used in our new scaffold based optimization benchmarks.
Name
Scaffold
Similarity target
Property profile target
pde5
Modified scaffold
Sildenafil
from Sildenafil
lorlati
Scaffold inspired by Lorlatinib
Inspired by Lorlatinib's macrocyclization strategy
GCCA1
Modified scaffold from Lenacapavir
Inspired by Lenacapavir
factor xa
Scaffold from Apixaban
Xarelto
Apixaban
We designed four tasks, three of which ask to maximize similarity towards a fixed target molecule (which may already have some of the required properties about in drug discovery project
Pyrazzl and phenyl have been exchanged reduce similarity the original molecule.
18

---

Published as a conference paper at ICLR 2022
e.g. binding), while enforcing the presence of a scaffold (which is not present in the target, making the task non-trivial). In real-world drug design, this scenario known as scaffold hopping. Finally, the fourth task, apart from scaffold, uses two target molecules, maximizing structural similarity to one (Xarelto), while maintaining the properties all molecules used to define our tasks, along with references the PubChem database. The target molecules have been inspired by existing drugs, however, to make the tasks harder, have in most cases been structurally modified such that they are present the Guacamol dataset, which is used by some of the algorithms (e.g. GraphGA, SMILES LSTM) to select the set of starting molecules.
the other (Apixaban). In Table [ we show
F LATENT SPACE NEIGHBORHOOD
In this section, we present more details the latent space neighborhood learned by MoLeR. For the purpose of this analysis we fixed scaffold (PubChem CID 5773255I), and chose an arbitrary molecule m that contains it. In order visualize the neighborhood of m, encode it, and then decode a x 5 grid of neighboring latent codes centered at the encoding of m. To produce the grid, we choose two random orthogonal directions in the latent space, and then use binary search to select the smallest step size which results in all 25 latent points decoding to distinct molecules. We show the resulting latent neighborhood in Figure 7 where scaffold is highlighted each molecule. We see that the model is able to produce reasonable variations of m, while maintaining local smoothness, as most adjacent pairs of molecules are very similar. Moreover, we notice that the left-to-right direction correlated with size, showing that the latent space respects basic chemical properties. If the same 25 latent codes are decoded without the scaffold constraint, only 9 of them end up containing the scaffold, while the other 16 contain similar but different substructures.
Figure 7: Latent space neighborhood of fixed molecule containing a chemically relevant scaffold. Each latent code is decoded under scaffold constraint, so that the desired scaffold (highlighted in red) is present in each molecule.
19

---

Published as a conference paper at ICLR 2022
G LEARNED MOTIF REPRESENTATIONS
To extract learned motif representations from a trained MoLeR model, we could use any of its weights that motif-specific. We first examine the embedding layer in the encoder, which is used to construct atom features. Interestingly, we find that these embeddings do not cluster in any way, and even very similar motifs assigned distant embeddings. We hypothesize that this is due the of a simple classification loss function for Lrees which asks to recover the exact motif type, and does not give smaller penalty for predicting an incorrect but similar motif. Therefore, for two motifs that are similar on the atom level, it may be beneficial to place their embeddings further apart, since otherwise it would be hard for the GNN to differentiate them all. We hope this observation can inspire future work to scale to very large motif vocabularies, but use domain knowledge to craft soft reconstruction loss that respects motif similarity.
Now, we turn to different set of motif embeddings, which we extract from the last layer of the next node prediction MLP in the decoder. This results in one weight vector per every output class (i.e. atom and motif type); in contrast to the encoder-side embeddings, the role of these weight vectors is prediction rather than encoding. We find that pairs of motif embeddings that have high cosine similarity indeed correspond to very similar motifs, which often differ in very subtle details of the molecular graph. We show some of the closest pairs in Figure
Figure 8: Six pairs of similar motifs (one per column), as extracted from weights of trained MoL.R model.
Finally, note that the motif embeddings discussed here (both encoder side and decoder side) were trained end-to-end with the of the model, and did not have direct access graph structure or chemical features of motifs. Therefore, there is no bias that would make embeddings of similar motifs close, and this can only arise consequence of training.
H EFFECT OF USING MOTIFS ON OPTIMIZATION PERFORMANCE
In Figure we show how the choice of generation order and motif vocabulary size impact the samples generated by MoLeR. In Figure we mirror this analysis, looking at optimization performance on both groups of tasks reported in Table 2 original tasks Brown et al. (2019), and our scaffold-ban based tasks.
For unconstrained optimization, we see that using motifs generally improves results for most generation orders, but the trends are much more noisy than in the case of generation performance. We speculate this may be caused by the fact that Mol.eR not directly trained for optimization performance, and thus
more variance between reruns due randomness.
For scaffold-constrainee optimization, we see some improvement when motifs are introduced (0 + 32), but there is no improvement with larger motif vocabularies, which we attribute to the fact that our scaffold-bar based tasks use very large scaffolds, and so their optimal decorations typically do not contain large uncommon motifs. Finally, we note that MoLeR trained under canonical order performs competitively in unconstrained optimization, but underperforms optimization, matching the insights from Section 3.1
20

---

Published as a conference paper at ICLR 2022
0.93
Score
Scare
0.92
0.79
0.78
Canonical
Canonical
0.77
Random
(canonical start)
0.90
Random
(canonical start)
0.76
BFS (random start)
DFS (rendom start)
32
128
512
1024
32
128
512
1024
vocabulary
Motif vocabulary
Figure 9: Optimization performance (higher is better) for different generation orders and vocabulary sizes. We separately show the original GuacaMol benchmarks (left), and our new scaffold blsde benchmarks (right).
I ABLATION STUDIES
In this section, we perform ablation studies to understand the contribution of different design choices MoLeR's performance.
I.1 ADDING MOTIF EMBEDDINGS INPUT FEATURES
we introduced motif embeddings, which allow the encoder network to be motif-awan without having to learn to simulate the motif decomposition algorithm. Since the decoder network must reassemble the molecule using the right motifs, it is crucial for the encoder to understand which motifs are present, and including this information explicitly simplifies the learning task.
In Section 2.1
To confirm this intuition, we ran two MoLeR training runs: one using motif embeddings, and one using only atom-level features. To compare the models, we observed how samples from prior evolved over the course of training. Concretely, every 5 000 training steps we drew 10 000 samples from the prior of each model, and computed three metrics using the GuacaMol package (Brown et al. 2019): uniqueness (defined set (defined over several simple chemical properties and then transformed into the [0. 1] range; higher better) and Frechet ChemNet Distance to the training (defined as divergence in intermediate activations of ChemNet; lower is better). We show the results of this in Figure 10 We see that without motif embeddings. MoLeR takes longer to learn match the training data; this is most pronounced when comparing Frechet ChemNet distance.
fraction of unique samples; higher is better), KL divergence the training
Uniqueness
KL divergence
Frechet ChemNet Distance
1.00
10
0.95
0.9
0.90
0.8
2
80k
80k
80k
Training steps
Training steps
Training steps
motif embeddings
Without motif embeddings
Generation metrics during training, measured for MoLeR both with and without motif embeddings. Using motif embeddings simplifies the learning task, improving the quality of downstream samples.
Figure 10:
21

---

Published as a conference paper at ICLR 2022
1.2 SUBSAMPLING GENERATION STEPS
In Section 2.4, we introduced generation step subsampling as a way to get more variety within each training batch. Intuitively, different generation steps can be thought of separate training samples for the decoder network. As generation steps corresponding to the same full molecule are correlated, subsampling them decreases the intra-batch correlation.
Uniqueness
KL divergence
Frechet ChemNet Distance
1.00
10
0.9
0.95
0.90
0.8
0.85
0.7
80k
80k
80k
Training steps
Training steps
Training steps
With subsampling
Without subsampling
Figure 11: Generation metrics during training, measured for MoLeR both with and without training step subsampling. Subsampling training steps leads to faster convergence on all downstream metrics.
To show that the subsampling strategy is effective in practice, we ran an ablation study, comparing MoLeR trained with and without subsampling, following the same methodology in Appendix L.] We show the results in Figure We see that while both runs eventually reach roughly the same performance, the run employing subsampling coverges faster across all metrics; the difference is especially pronounced in the first few thousand training steps.
1.3 ENCOURAGING LATENT SPACE SMOOTHNESS WITH A PROPERTY PREDICTION Loss
Molecular Weight
SA Score
logp
Mean absolute difference
1.4
50-
0.5
1.2
1.0
40
0.4
0.8
30
0.3
0.9
1.0
0.9
1.0
0.9
1.0
Cosine similarity
Cosine similarity
Cosine similarity
With Cprop
Without Eyrup
Figure 12: Mean difference in property value when decoding random pairs of latent codes with given cosine similarity, shown for MoLeR both with and without the Lprap loss. Adding the property prediction loss increases the correlation between latent space distance and property value.
Finally, we analyze the contribution of the Cyrop auxiliary loss to the shape the latent space. In particular, we are interested in understanding whether the latent space is indeed "smooth" with respect to the predicted properties. To quantify this, we consider pairs of latent vectors with cosine similarity in the (0.9, 1.0) range, which we uniformly split into 8 buckets. We continue drawing pairs of samples and adding them to their respective buckets (or discarding them, if the similarity less than 0.9), until each bucket has at least 000 pairs. For each bucket, we compute the mean absolute difference of molecular weight, synthetic accessibility (SA) score, and actanol-water partition coefficient (logP) between the two molecules of each pair and plot this in Figure [2] The results show that using the additional objective indeed makes molecules decoded from very similar latent codes have more similar properties.
22


Reviews:
[{"review_id": "ncZH0vBNgEk", "reviewer": "Reviewer_2My6", "summary": "", "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": "The authors do a great job at presenting the general challenge they target, their method, and the design choices. The paper is throughout very well-written and clear. \n\nThe presented method is very similar to work from Jin et al. (2018, 2020). The authors explicitly acknowledge this on multiple occasions and point out why the differences matter. To strengthen this point, I would welcome if the authors could elaborate a bit more on the quantitative comparison in in Figure 2. The performance of their presented method increases with the size of the vocabulary. Is this not an expected observation? There are single dashed lines for HierVAE and JT-VAE. What equivalent vocabulary sizes do these correspond to?\nThe authors also state that \"Due to the high cost of training JT-VAE and HierVAE, we did not tune their hyperparameters and instead used the default values.\" This also seems to handicap these methods. \n\nAs a minor point, it would be nice if the authors could clarify whether the numbers shown in Table 1 are for the original baseline implementations or whether these already account for the code modifications that the authors made . \n\nI was also curious about the phrase \"After each choice, if the currently selected atom is part of a motif, we add the entire motif into the partial graph at once.\" in relation to Algorithm 2. As we move to larger vocabulary sizes, are there any individual atoms added? It would be great if these authors could elaborate on this in relation to the vocabulary sizes shown in Figure 2. ", "summary_of_the_paper": "The authors present a method for iterative small molecule generation based on an autoencoder framework with graph neural networks. The method specifically focuses on the ability to extend molecular scaffolds (predefined subparts of a molecule) with structural motifs and individual atoms. The authors show results on unconstrained molecular optimization tasks as well as tasks in which a scaffold is given. ", "summary_of_the_review": "The authors explicitly address the similarity of their work to prior contributions from Jing et al. How significant the differences are hinges in part on the quantitative comparisons. I would welcome if the authors could address my questions with respect to Figure 2 and potentially include additional comparisons. ", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "_1_BBX5ynh7", "reviewer": "Reviewer_WYph", "summary": "", "questions": "", "limitations": "", "rating": 3, "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": "Strengths of the paper: \n1.  The construction of the training objective for the model is reasonable. \n2. The proposed method could directly start with a scaffold, which is usually used in practical drug molecule discovery. \n3. The experiments show the MoLeR could generate high quality molecules comparison to a few prior methods. But there are still concerns about results. (see below)\n4. The revised fragment vocabulary construction is novel and seems working well. \n5. The experiment also show that generation order and vocab size is important to the quality.\n\nWeakness of the paper:\n1. The organization of the paper could be better. Specification of the model should be placed in the main paper, instead in the appendix. Now much is missing in the main method, making it difficult to understand.  \n2. The model using GNN+MLP is not novel. Using GNN+MLP to predict fragment, attaching atom, bond has appeared before.\n3. Metrics used in the experiment is unclear (what is score and quality in Table 2 and how they are evaluated? Is the score logP or score produced by RDKit? A bit confusing). \n4. The unconstrained generation and comparison to the original data is not solid to evaluate the generation capability of the model. It just evaluates the reconstruction capability. It could only serve as a validation purpose for whether the model can fit data. Figure 2 left shows the distance between generated molecules and the training set. But being able to generate similar molecules is not the goal, it would be more important to evaluate the model’s capability on generating novel molecules that are different from those in the training while satisfying desired properties. \n5. Certain important baseline could be compared in the experiments, including Transformer with SMILES ([1], since LSTM is a weak baseline for generation), MARS ([2] also fragment-based approach using GNN, and can start with a scaffold and multi-property optimization). \n\n[1] Transformer neural network for protein-specific de novo drug generation as a machine translation problem. 2018.\n[2] MARS: Markov Molecular Sampling for Multi-objective Drug Discovery. 2021.", "summary_of_the_paper": "The paper study the problem of fragment-based molecule generation.  They propose a model MoLeR which consists of an encoder of molecular graph using Graph convolutional neural network (two GNN, one for complete molecules and one for partial molecules), a MLP decoder layer to predict the fragment, the attaching atom on the fragment, and the bonding atoms on the partial molecule. To train the model, it includes three losses for multi-task learning: a KL term between variational posterior and prior of latent representation, a self-reconstruction loss, and a property prediction MSE loss. \nThe paper conduct experiments on GulcaMol and show that it is able to generate molecules similar to the training molecule distribution, from scratch or from a given scaffold. It shows better results than LSTM, JTVAE, CDDD-MCTS, etc. \n", "summary_of_the_review": "Reasons to accept: reasonable designed training objective for the application of drug design, good generation quality, new method of constructing molecule fragment vocabulary.\n\nReason to reject: unclear description of method, limited novelty of model, questionable metric used in the evaluation, missing baselines. ", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "2: Several of the paper’s claims are incorrect or not well-supported.", "technical_novelty_and_significance": "1: The contributions are neither significant nor novel.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "PiInVP-sFpY", "reviewer": "Reviewer_9yrY", "summary": "", "questions": "", "limitations": "", "rating": 8, "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": "Strengths:\n\nThis paper proposes a flexible framework that can use motifs to generate molecules, as well as support atom-by-atom generation. Using a scaffold as the initial seed can make sure the generated molecules contain the specified scaffold. The decoder is not conditioned on the generation history and it conditions only on the hidden vector and the current partial molecule. This design strategy makes the proposed method can be trained using all generation steps in the same batch.\n\nExperimental evaluation is comprehensive. The authors conduct extensive experiments in the unconstrained generation, scaffold-constrained generation, unconstrained optimization, and scaffold-constrained optimization to demonstrate the effectiveness of the proposed method. They also have ablation studies to verify the effectiveness of different components. The proposed method performs comparably to baselines on unconstrained molecular optimization tasks and outperforms them on scaffold-based tasks.\n\nWeaknesses:\n\nBaseline methods are not comprehensive. Some important graph-based [1] or fragment-based [2] molecule generations are not included in the experimental comparison. Especially for the training and sampling speed evaluation, the proposed method needs to embed the partial molecule graph at every generation step, which seems inefficient and slow. Are the authors aware of other methods that do not need to embed the partial graph at every step?\n\nImportant related works are not included. [3] works on a different problem but also generates molecules using a similar atom-by-atom method. Particularly, [3] has also investigated different strategies to determine the generation order, which is closely related to this work. The authors mention that it is necessary to use a small weight for the KL loss and increase its weight from 0 gradually to make the VAE model training stable. This strategy has been extensively studied in [4] which investigates the posterior collapse problem of VAE for molecule sequence generation. Could the authors include the closely related work [3, 4] for references?\n\n\n\n[1] Shi, Chence, et al. \"Graphaf: a flow-based autoregressive model for molecular graph generation.\" arXiv preprint arXiv:2001.09382 (2020).\n\n[2] Podda, Marco, Davide Bacciu, and Alessio Micheli. \"A deep generative model for fragment-based molecule generation.\" International Conference on Artificial Intelligence and Statistics. PMLR, 2020.\n\n[3] Sacha, Mikołaj, et al. \"Molecule edit graph attention network: modeling chemical reactions as sequences of graph edits.\" Journal of Chemical Information and Modeling 61.7 (2021): 3273-3284.\n\n[4] Yan, Chaochao, et al. \"Re-balancing variational autoencoder loss for molecule sequence generation.\" Proceedings of the 11th ACM International Conference on Bioinformatics, Computational Biology and Health Informatics. 2020.\n", "summary_of_the_paper": "This paper proposes a graph-based generative model for molecule generation. The proposed framework MoLeR can use scaffolds as the initial seed to incrementlly generate molecules motif by motif or atom by atom so that the generated molecules consist of the specified scaffold. Experiments show the proposed method performs comparably to existing methods on unconstrained molecular optimization tasks and outperforms these methods on scaffold-based tasks. At the same time, the proposed method is more efficient due to that it is not conditioned on the generation history.", "summary_of_the_review": "The proposed molecule graph generation method is flexible and achieves good experimentals results. ", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "GePOZEo5mRv", "reviewer": "Reviewer_V5A5", "summary": "", "questions": "", "limitations": "", "rating": 8, "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": "Among the strengths , i identify\n- that the model is practical and pragmatic. It strikes interesting balance of flexibility vs. first-principles, where some technical innovations are put at the service of the task/ \nThe \"multi-hot objective\" (pg 3) and  \"GMM posterior\" (pg 6) are both interesting and have not been applied frequently in molecule generative models. I find both compelling and helpful. I suspect they can also be applicable to other related works in the future. \n- scaffold-based generation is a meaningful problem in molecular design and the existing tools are not great. The authors text in page 9 about SMILES, graph and junction-tree models is compelling, and their approach does side step all these issues while substracting computational complexity \n\nOn the weakness, \n- Still not order invariant. These canonical ordering procedures are a little arbitrary, and \"frontier\" is degenerate. This is a fundamental issue that cannot be easily addressed, and the authors assess its impacts quite thoroughly. It is interesting, and further proof that permutation invariance is desirable, that the rank in performance in unconstrained generation is opposite to scaffold-constrained generation.\n- Pg 5 \"we did not tune their hyperparameters and instead used the default values\" This is likely an important reason why the baseline models underperform, since it's not an apples to apples comparison\n- except for the benchmarks (see above) I don't see any obvious incremental ways to build upon this class of models. I wonder if the authors could provide a roadmap for high-risk high-reward changes they could propose? Or perhaps this is a terminal approach without much obvious room for incremental improvement.\n\n\nSome questions that come to mind is\n\nPg 3 \"In each step, it first selects a new atom or entire motif to add to the current partial molecule, or to stop the generation.\" It is possible for the model to select an atom that is incompatible because there are no more active positions to connect to? That is, if the current M does not have any -H (which are the implicit reactive sites) will it know to stop? \n\nIs there a path (and how likely is it to happen) for a motif to be reconstructed atom by atom even if it is in the vocabulary? Are there any such cases in the training data?\n", "summary_of_the_paper": "This work proposes a generative model for molecules. The approach uses a library of motifs, extracted from the training data by breaking down molecules through acyclic bonds adjacent to a cycle. The model can also sample individual atoms. The method is set up in an autoencoder fashion with a GCN encoder that learns node and edge embeddings that are projected into a vectorial latent space. The nodes are initialized with features representing which motif they belong to, so the latent space is motif-aware. The generative approach from the latent space is reminiscent of autoregressive models, but it does not marginalize over the full sequential set of steps, and only through single-step transformations. Seeded with a starting atom or motif, the model sequentially samples the motif (or atom) to be connected and which atoms will be connected. Because more than one path can connect an initial and a final product, it is important to train over multiple paths", "summary_of_the_review": "I find the work overall convincing. It takes a pragmatic approach that uses relatively sophisticated (but not wildly innovative tools) to improve one obvious flaw in motif-based models which is their inability to invent new motifs. I find the addition of per-atom sampling a convincing escape route for that failure mode.\n\nThe results are relatively convincing in the innovation is practically useful, although it is hard to quantify the size of the gains, because hyperparameter optimization strategies were different for the new method and the baselines. Overall, I think it is acceptable and I would be interested in using a model like this in the practice. ", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works."}, "extra_text": {}}]

Author rebuttal:

Meta-review: Most reviewers were positive about the paper, seeing that the proposed method is practical and has convincing experimental performances. One reviewer was a bit negative and raised questions about clarity. After the authors responded, the negative reviewer didn't respond further. After reviewing all the comments, the AC feels that there is enough support from reviewers to accept this paper.
Decision: Accept (Poster)