Source-linked AI summary
Molecular Generation with Recurrent Neural Networks (RNNs)
Esben Jannik Bjerrum, Richard Threlfall
TL;DR
Because the estimated space of drug-like molecules greatly exceeds known compound databases, the paper investigates RNN-based generation of virtual molecules from SMILES. The generated molecules were often novel, had property distributions resembling their training sets, and were mostly assessed as synthesizable.
Problem
Drug-like chemical space is estimated at 10^23 to 10^60 molecules, far exceeding known compound databases and motivating virtual libraries for in silico discovery.
Source: Introduction · p. 1Method
The paper trains LSTM-based recurrent neural networks on existing compounds encoded as SMILES and samples new molecular sequences from the models.
Source: Introduction · p. 2, Datasets · p. 2, Neural Network · p. 2Results
63% of fragment-like and 83% of drug-like generated molecules were absent from their training sets; generated properties closely resembled training distributions, and routes were found for most compounds assessed.
Source: Discussion · p. 6, Conclusion · p. 7Takeaways & Limitations
Filtering training datasets can tune generated-molecule property distributions, supporting exploration of matched-property compounds for expanding known series and in silico libraries.
Source: Conclusion · p. 7
Abstract
from arXiv · showhide
The potential number of drug like small molecules is estimated to be between 10^23 and 10^60 while current databases of known compounds are orders of magnitude smaller with approximately 10^8 compounds. This discrepancy has led to an interest in generating virtual libraries using hand crafted chemical rules and fragment based methods to cover a larger area of chemical space and generate chemical libraries for use in in silico drug discovery endeavors. Here it is explored to what extent a recurrent neural network with long short term memory cells can figure out sensible chemical rules and generate synthesizable molecules by being trained on existing compounds encoded as SMILES. The networks can to a high extent generate novel, but chemically sensible molecules. The properties of the molecules are tuned by training on two different datasets consisting of fragment like molecules and drug like molecules. The produced molecules and the training databases have very similar distributions of molar weight, predicted logP, number of hydrogen bond acceptors and donors, number of rotatable bonds and topological polar surface area when compared to their respective training sets. The compounds are for the most cases synthesizable as assessed with SA score and Wiley ChemPlanner.
Introduction
The vast estimated space of drug-like molecules has motivated virtual-library generation for in silico discovery. This paper explores whether an RNN trained on SMILES can generate novel, chemically sensible molecules and evaluates their properties and synthesizability.
Introduction
- Drug-like chemical space is estimated at 10^23 to 10^60 molecules, far exceeding current compound databases and motivating virtual libraries for in silico discovery.The estimates are attributed to [1, 2, 3], database examples to [4, 5, 6], and virtual-library interest to [7].Source: Introduction · p. 1
- Fragment-library enumeration can ensure product synthetic feasibility, and existing approaches include eSynth, iLibDiverse, CombiGen, and the GDB sets.The enumeration strategy is cited to [8], software examples to [9, 10], and GDB sets to [11, 12, 13].Source: Introduction · p. 1
- RNNs process sequences by updating their state at each input step, while LSTM cells use input, forget, and output gates to retain state over longer stretches.The passage describes RNNs as successful for sequence-based input and notes that LSTM and GRU microarchitectures improved their performance.Source: Introduction · pp. 1–2
- The study trains an RNN on molecules encoded as SMILES, then examines generated-molecule properties and assesses synthetic feasibility using scoring and computer-aided retrosynthetic analysis.SMILES describes molecular atom configurations and connections; the RNN generates sequences by feeding each predicted character back into the network.Source: Introduction · p. 2
Methods
The methods prepare fragment-like and drug-like SMILES datasets, train LSTM-based RNNs, and sample molecules from the trained models. Generated molecules are then compared with training sets and assessed for molecular properties and retrosynthetic routes.
Datasets
- The study downloaded clean drug-like and fragment subsets from ZINC12 as SMILES, shuffled the lines, and prefixed and padded strings before one-hot vectorization.The preprocessing produces HDF5 data files and saves each dataset's character-to-index mapping.Source: Datasets · p. 2
Neural Network
- The Keras RNN used two 256-unit LSTM layers followed by time-distributed feed-forward layers, and training used chunks of 100,000 SMILES in mini-batches of 512.The first chunk served as validation; the learning rate started at 0.007 and was lowered when validation loss failed to improve over five chunks.Source: Neural Network · p. 2
A sampling
- At temperature 1.0, each trained model generated 50,000 molecules by sampling next-character probabilities and stopping when the end character was predicted.The model reset its state before generation; RDKit checked molecular validity, and canonical SMILES were intersected with the corresponding full training set to count overlaps.Source: A sampling · pp. 2–3
Calculation of Molecular Properties
- The generated and training sets were compared on hydrogen-bond acceptors and donors, polar surface area, rotatable bonds, molecular weight, predicted LogP, and SA score.Compounds were neutralized before SA-score calculation.Source: Calculation of Molecular Properties · p. 3
Retrosythetic analysis
- Retrosynthetic analysis selected compounds near the 5th, 50th, and 95th SA-score percentiles and the highest-scoring compound, excluding those already in training sets.ChemPlanner used default settings, initially limited linear routes to three steps, and progressively relaxed step and reaction-rule constraints when routes to affordable commercial starting materials were not found.Source: Retrosythetic analysis · p. 3
Results
Generated samples largely retained the property and SA-score distributions of their respective training sets. ChemPlanner route findings varied across SA-score groups.
Results
- Training covered about 22 passes for p12 and 3.5 for p13; p13's final validation loss was 0.167, with negligible train-validation differences for both.Source: Results · p. 3
- Drug-like-model samples included plausible benzene and heterocyclic rings, fused ring systems, and charge patterns reflecting the training set's normalization.Fragment-model outputs appeared smaller and simpler on average.Source: Results · p. 4, Figure 2 · p. 4, Figure 3 · p. 4
- At a sampling temperature of 1.0, approximately 2% of generated SMILES were malformed; the error rate rose significantly above 1.2.Typical parsing errors involved unclosed parentheses or unmatched ring closures.Source: Results · p. 4, Figure 4 · p. 4
- 37% of generated fragments and 17% of generated drug-like molecules were found in their respective training sets.Source: Results · p. 4
Comparison of molecular features
- Generated molecules' distributions largely overlap their respective training sets across MW, LogP, TPSA, HBA, HBD, and rotatable bonds, though MW tails extend higher.The generated sets only partly follow the training sets' sharp molecular-weight cutoffs.Source: Comparison of molecular features · pp. 4–5, Figure 5 · p. 5
- Generated and training-set SA-score distributions were essentially similar, with synthetic feasibility assessed using the SA score.The score combines fragment contributions with measures of topological complexity, including unusual ring systems, stereochemical complexity, and molecular size.Source: Comparison of molecular features · p. 5, Figure 6 · p. 5
- ChemPlanner found routes for every sampled easy-group compound; the medium group had issues for 2 of 6, while one hard-group compound lacked a route.For the compound with the highest SA score, no route from commercially available starting materials was identified.Source: Comparison of molecular features · p. 5, Table 1 · p. 6
Discussion
Generated molecules were often novel and generally had synthesizability support, but the networks appeared to expand chemical space only modestly. The discussion also considers using the models to generate compounds near known active molecules and to iteratively optimize predicted properties.
Discussion
- Most generated compounds had identifiable retrosynthetic routes, though compounds with the highest SA scores showed more potential problems.The authors suggest SA score as a first screen, with detailed retrosynthetic evaluation still needed for most cases beyond the easiest.Source: Discussion · p. 6
- 63% of fragment-like and 83% of drug-like generated molecules were absent from their respective training sets.The drug-like molecules were more novel despite a training set almost an order of magnitude larger.Source: Discussion · p. 6
- The networks seemed to generate molecules near training examples, limiting expansion of chemical space; similar training and test sets may contribute to this overfitting.The authors suggest scaffold-based clustering before splitting as a possible way to encourage coverage of more diverse chemical space.Source: Discussion · p. 6
- Generating molecules near compounds with known biological activity could support similarity-focused design, but small active datasets risk extensive overfitting.The authors also describe an iterative proposal: evaluate generated molecules with QSAR models or docking, then retrain on the best half.Source: Discussion · pp. 6–7
Conclusion
The authors conclude that LSTM recurrent neural networks can generate novel, chemically plausible molecules whose property distributions resemble those of their training sets. They also report support for synthesizability, alongside a limitation in detailed route analysis.
Conclusion
- LSTM recurrent neural networks generated novel, chemically plausible molecules as assessed by SA scores and Wiley ChemPlanner retrosynthetic analysis.The authors report a correlation between SA score and retrosynthetic-route properties, although routes could not be generated for two compounds selected for detailed analysis.Source: Conclusion · p. 7
- Generated molecules closely resembled their training sets in molecular-property distributions, allowing network outputs to be tuned by filtering the training data.Source: Conclusion · p. 7
- The authors identify matched-property expansion of known compound series as a possible use for generating larger in silico libraries.Source: Conclusion · p. 7
Conflict of interests
The authors disclose professional relationships with Wildcard Pharmaceutical Consulting and Wiley-VCH.
Conflict of interests
- Bjerrum owns Wildcard Pharmaceutical Consulting, which is usually contracted by biotechnology and pharmaceutical companies for third-party services.Source: Conflict of interests · p. 7
- Threlfall is an employee of Wiley-VCH.Source: Conflict of interests · p. 7