Molecular generative model based on conditional variational autoencoder for de novo molecular design

Jaechang Lim, Seongok Ryu, Jin Woo Kim, Woo Youn Kim · DOI

Introduction

The "chemical space" of potential drug-like molecules is unimaginably vast, estimated at between $10^{23}$ and $10^{60}$ possibilities. Traditional drug discovery relies on high-throughput screening or genetic algorithms, both of which are computationally expensive and often fail to find molecules that meet a specific, multi-dimensional profile (e.g., a specific weight, solubility, and surface area).

While standard Variational Autoencoders (VAEs) can map molecules to a continuous "latent space" for optimization, they do not offer direct control during the generation phase. This paper, published in the Journal of Cheminformatics in 2018, addresses the need for multivariable control: the ability to impose specific property requirements directly onto the generative process using a Conditional Variational Autoencoder (CVAE).

Methods: The Conditional Twist

The researchers utilized a CVAE architecture where an encoder compresses a molecule into a latent vector ($z$), and a decoder reconstructs it. The innovation lies in the introduction of a condition vector ($c$) containing five key molecular properties:

  1. Molecular Weight (MW)
  2. Partition coefficient (LogP)
  3. Number of Hydrogen Bond Donors (HBD)
  4. Number of Hydrogen Bond Acceptors (HBA)
  5. Topological Polar Surface Area (TPSA)
Schematic of the CVAE architecture showing the integration of molecular properties into the encoder and decoder.

This condition vector is fed into both the encoder and the decoder. This forces the latent vector ($z$) to capture structural information independent of these five properties. To generate a new molecule, a researcher provides a specific target profile (condition vector) and a latent vector, and the decoder attempts to construct a SMILES string that fits that profile. The architecture uses a 3-layer Recurrent Neural Network (RNN) with Long Short-Term Memory (LSTM) cells to handle the sequential nature of SMILES strings.

Datasets and Training

The model was trained on a subset of the ZINC dataset, a public repository of commercially available chemical compounds. The authors used 500,000 molecules, finding this size sufficient for the model to converge and perform effectively compared to larger sets.

Distribution of the five key molecular properties within the training dataset.

Key Insights

  • Decoupling Structure and Property: By conditioning the latent space, the model learns to separate the molecular scaffold from its properties, allowing for independent manipulation.
  • Property Extrapolation: The model can generate molecules with properties outside the range of the training set. By inputting a condition vector with a LogP higher than any molecule it has ever seen, the model can attempt to "extrapolate" a suitable structure.
  • The "Mother Molecule" Approach: By sampling latent vectors close to a known molecule (like Aspirin) while tweaking the condition vector, the model can generate analogs—molecules that look like the original but have improved properties.

Key Results

The model successfully generated molecules matching the property profiles of Aspirin and Tamiflu. In a case study using Tamiflu's profile, the authors varied LogP from -0.23 to 3.55 while holding other properties constant; the model generated a series of molecules that gradually increased in hydrophobicity as requested.

While the success rate for hitting all five targets simultaneously was relatively low (0.11% to 0.62%), this was significantly higher than the success rate when using a random condition vector (~0.01%), proving the CVAE effectively learned the relationship between conditions and structures.

Limitations and Future Work

SMILES strings are notoriously "brittle," where a single character error (like a missing parenthesis) makes the entire molecule invalid. Furthermore, some properties are naturally linked (e.g., MW and TPSA), making it difficult to adjust them entirely independently. Future directions include moving toward graph-based representations and incorporating Reinforcement Learning to further improve the validity and property-accuracy of generated molecules.

Summary updated

BibTeX
@article{lim2018molecular,
  author = {Jaechang Lim and Seongok Ryu and Jin Woo Kim and Woo Youn Kim},
  title = {{Molecular generative model based on conditional variational autoencoder for de novo molecular design}},
  journal = {J. Cheminformatics},
  year = {2018},
  doi = {10.1186/s13321-018-0286-7},
}
Figure