Structure & Discovery / ICML 2022

Generate a Molecule With a Route in Mind

A conditional model proposes reaction sequences that end near a seed molecule in structural space. The route stays attached to the proposed product.

Path-aware and Structure-preserving Generation of Synthetically Accessible Molecules

Juhwan Noh, Dae-Woong Jeong, Kiyoung Kim, Sehui Han, Moontae Lee, Honglak Lee, Yousung Jung

Overview

A computer can draw a molecule that resembles a promising compound. A chemist still has to ask how to make it. This work makes the reaction path part of generation. The model starts with a target structure and proposes variants through a library of transformations, so every candidate comes with the sequence that produced it in the simulator.

Key Findings

Can a chemist make what the model draws?

Imagine a drug-discovery team looking at a promising molecule from a generative model and asking how to build it. Often nobody knows. Moontae and his colleagues describe this gap between predicted and makeable molecules, and they set out to close it. Their approach produces molecules that resemble a chosen seed compound and delivers the reaction route for each one.

Why picking similar ingredients falls short

Earlier work took two routes. Scoring heuristics estimate synthesizability without a route. Retrosynthesis planning works backward after the design is done, which the authors call slow and ineffective. A closer precedent, DINGOS from Button and colleagues, picks starting molecules that look most like the seed and applies known reaction templates. The authors argue that similar reactants do not guarantee a similar product, since the reaction transforms the structure. Their central claim is that the whole reaction information must inform the similarity measure.

One latent space for structure and route

The authors build a conditional reaction sequence variational autoencoder, called C-RSVAE. An autoencoder compresses an input into a short vector and rebuilds it. Here the input is a reaction sequence of up to three steps. Each step has a main reactant, a partner reactant and a reaction template, and one step's product becomes the next step's main reactant. Molecules appear as 166-bit MACCS keys, which mark the presence of predefined substructures. A separate encoder turns the seed's key into a condition vector.

Training minimizes the loss in Equation 5, simplified here by dropping the sum over mini-batch examples:

L=1L∑j=1Lα CE(xt(j),x^t(j))+1L∑k=0L−1BCE(xp(k),x^p(k))+β LKL\mathcal{L} = \frac{1}{L}\sum_{j=1}^{L}\alpha\,\mathrm{CE}\big(x_{t}^{(j)},\hat{x}_{t}^{(j)}\big) + \frac{1}{L}\sum_{k=0}^{L-1}\mathrm{BCE}\big(x_{p}^{(k)},\hat{x}_{p}^{(k)}\big) + \beta\,\mathcal{L}_{KL}

CE scores template predictions, BCE scores reactant-fingerprint predictions, and the KL term keeps the latent space close to a standard Gaussian. The weights are α = 0.3 and β cycling up to 0.1, using the cyclical annealing schedule the authors show in Figure 10.

Figure 10 shows the cyclic annealing schedule for β, rising linearly over half of each of four cycles and then holding at 0.1.
Figure 10 shows the cyclic annealing schedule for β, rising linearly over half of each of four cycles and then holding at 0.1.

Sampling a route around a seed

At generation time the model draws a random latent vector and combines it with the seed condition. The decoder predicts a starting molecule's key, and the nearest real candidates in a library of 5,000 starting molecules are retrieved by Hamming distance, which counts differing bits. A hybrid rule in Equation 7 also weighs similarity to the seed directly, using λ = 0.5. The decoder then picks a template greedily and finds a partner reactant, repeating until an end token or three steps. The algorithm rejects sampled sequences according to its seed-distance criterion. Figure 3 follows generation from a seed through a proposed route.

The data come from 150,560 purchasable molecules, filtered to 137,687 by molecular weight, plus 58 templates. The authors enumerate 3 million sequences and hold out 100,000 for testing.

Evidence on recovery and similarity

Reconstructing full test sequences works 98% of the time. In seed recovery on 1,000 test products (Figure 4), DINGOS-Prior starts from the ground-truth reactants and beats DINGOS-k (k = 1, 5, 20) by 2 to 7 times. C-RSVAE matches that level without ground-truth reactants and also beats DINGOS-k by 2 to 7 times. This supports the claim that structurally similar reactants are insufficient.

In Figure 5, 1,000 seeds come from the test set and from USPTO 2016, an out-of-domain patent reaction set. Against a boosted baseline, DINGOS-20+, C-RSVAE gives closer top-K averages (K = 1, 5, 20) for more seeds on both sets. Varying λ in Appendix F on 100 seeds, even λ = 0 beats the baseline for 67–70% of test seeds and 56–67% of USPTO seeds, and λ = 0.5 reaches 70–77% and 59–68%.

Properties, docking and ablations

Seed and generated properties correlate strongly (Figure 6). Generated molecules often exceed out-of-domain seeds in penalized logP and QED, which the authors credit to the random latent vector widening property range. Starting from seeds previously optimized by JT-VAE and SSVAE, penalized logP rose from 5.30 to 7.37 and from 4.93 to 5.29. QED barely improved, though plausible routes appeared. For docking against DRD3 and the SARS-CoV-2 main protease, C-RSVAE gave better scores than DINGOS-20+ among the top-200 seeds from 5,000 ZINC molecules, shown in Figure 8. These are computed docking scores from Quick Vina 2. Lab measurements would be needed to establish binding.

Ablations in Figure 9 show that models without seed conditioning recover seeds poorly. A variant that aligns the latent vector to the seed, Zm-RSAE, does slightly better in-domain, but C-RSVAE wins on USPTO 2016. The authors suggest the seed encoder generalizes less well there. A preliminary Appendix G comparison with SynNet-R, retrained on the same data, favors SynNet in-domain and is mixed out-of-domain. The authors call it preliminary.

What the route does not yet cover

Synthesizability here means reachable from the listed starting molecules, partner reactants, 58 templates and at most three linear steps. MACCS keys also give a coarse similarity that can miss fine structure. The authors point to richer templates, longer and nonlinear routes and better molecular representations as next steps.

Questions & Answers

Q: Does a generated route prove the molecule can be made?

A: A route is a proposed sequence of reactions under the template rules. It gives a chemist something concrete to assess. It does not establish experimental conditions or yield.

Q: Why use a fingerprint to measure similarity?

A: It provides a simple measure of which substructures are shared. It can miss meaningful differences between molecules, which is why the paper also checks exact identity when discussing recovery.

Q: Why compare with the ground-truth reactant baseline?

A: That baseline illustrates what changes when the starting reactant is known. The generation setting lacks that information, so it is a helpful reference with an information advantage.

Q: How much of the result depends on the reaction library and evaluation domain?

A: The library and route-length cap define which proposals the system can make. The appendix reports stronger in-domain reconstruction for retrained SynNet and more favorable out-of-domain results for C-RSVAE. This makes the data split important when comparing two methods. A route that matches templates still needs chemical assessment for practical feasibility.

Future Ideas

Give route proposals to a blinded chemistry panel

For a small collection of seed compounds with public routes, let several methods propose structurally similar products under a shared reactant catalog and step budget. Show chemists the candidate and route without identifying the method. Ask them to record which step needs revision and why.

Compare product similarity, route plausibility, and reviewer time. Hold out reaction families and report those failures separately. If suitable experimental data exist, compare the panel’s decisions with actual outcomes before using its ratings to select higher-stakes synthesis work.

Ask each blinded reviewer whether they recognize the original route, then examine agreement and plausibility ratings on the unfamiliar cases separately.

Sources

Original abstract

Computational chemistry aims to autonomously design specific molecules with target functional- ity. Generative frameworks provide useful tools to learn continuous representations of molecules in a latent space. While modelers could optimize chemical properties, many generated molecules are not synthesizable. To design synthetically ac- cessible molecules that preserve main structural motifs of target molecules, we propose a reaction- embedded and structure-conditioned variational autoencoder. As the latent space jointly encodes molecular structures and their reaction routes, our new sampling method that measures the path- informed structural similarity allows us to effec- tively generate structurally analogous synthesiz- able molecules. When targeting out-of-domain as well as in-domain seed structures, our model generates structurally and property-wisely simi- lar molecules equipped with well-defined reac- tion paths. By focusing on the important region in chemical space, we also demonstrate that our model can design new molecules with even higher activity than the seed molecules.