MolGAN: An implicit generative model for small molecular graphs

Nicola De Cao, Thomas KipfarXiv 2018 · OpenReview

TL;DR

This paper introduces MolGAN, a novel generative model that creates molecular graphs directly, bypassing the limitations of string-based representations. By combining Generative Adversarial Networks (GANs) with reinforcement learning, MolGAN can generate valid and chemically relevant molecules with specific desired properties, outperforming existing methods in key metrics.

What Problem Does This Paper Address?

The search for new molecules with specific properties, like those used in pharmaceuticals, is a monumental task due to the sheer size and discrete nature of the chemical space. Traditional methods often rely on generating molecules as strings (e.g., SMILES), which can be inefficient and prone to errors. While some methods generate graphs directly, they often require computationally expensive procedures to evaluate the likelihood of a generated graph or are limited by node ordering heuristics. This paper tackles the challenge of efficiently and effectively generating valid molecular graphs with desired chemical characteristics directly in the graph space.

Methods

MolGAN is an implicit, likelihood-free generative model that adapts Generative Adversarial Networks (GANs) to operate directly on graph-structured data.

  • Generative Adversarial Networks (GANs): MolGAN uses a GAN framework with a generator that learns to produce molecular graphs and a discriminator that distinguishes between real and generated graphs.
  • Graph Convolutional Networks (GCNs): Both the discriminator and a reward network utilize Relational-GCNs, which are designed to handle graph-structured data and are invariant to node ordering. This is crucial for processing molecular graphs where the order of atoms doesn't inherently define the molecule.
  • Reinforcement Learning (RL) Objective: To guide the generation towards molecules with specific desired chemical properties (e.g., solubility, synthesizability), MolGAN incorporates a reinforcement learning objective. It uses a deterministic policy gradient algorithm (similar to DDPG) to optimize the generator based on a learned reward function that approximates external property predictors.
  • Implicit Generation: By being an implicit model, MolGAN avoids the need for explicit likelihood calculations, which are notoriously difficult for graph structures.
  • Discretization Handling: Since the generator initially outputs continuous representations of graph structures, the paper explores three methods (using continuous values directly, adding Gumbel noise, or using Gumbel-Softmax) to handle the necessary discretization into discrete graph components for downstream tasks.

Datasets

  • QM9 Dataset: This is the primary dataset used for training and evaluation. It's a subset of the GDB-17 database containing around 133,885 organic compounds with up to 9 heavy atoms (C, O, N, F). The paper also mentions using a smaller 5k subset of QM9 for some experiments.

Key Insights and Ideas

  • Direct Graph Generation is Viable: The paper demonstrates that it's possible and effective to generate molecular graphs directly, bypassing the complexities and inefficiencies of string-based representations.
  • GANs for Graphs: Adapting GANs to operate on graph structures, particularly with permutation-invariant components like GCNs, is a powerful approach for generative modeling in this domain.
  • RL for Property Optimization: Combining GANs with reinforcement learning provides a flexible way to steer molecule generation towards specific desirable chemical properties, which is critical for practical applications like drug discovery.
  • Deterministic Policy Gradients are Effective: Using deterministic policy gradients for the RL component proved more stable and effective than stochastic methods for this graph generation task.
  • Mode Collapse is a Persistent Challenge: Despite using improved GAN techniques, the model still exhibits a tendency towards mode collapse, generating a limited variety of molecules.

Key Results

  • High Validity: MolGAN consistently achieves very high validity scores (close to 100%) for generated molecules, meaning most outputs are chemically valid structures.
  • Improved Property Scores: When optimizing for specific properties like druglikeness and synthesizability, MolGAN outperforms baseline methods like ORGAN, achieving better scores in these metrics.
  • Faster Training: MolGAN offers significantly faster training times compared to sequential models like ORGAN, often achieving comparable or better results in a fraction of the time.
  • Novelty: The model demonstrates good novelty, generating molecules that are not simply memorized from the training set.
  • Mode Collapse: The unique score, a measure of sample diversity, is consistently low (around 2%), indicating a susceptibility to mode collapse, where the generator produces only a limited set of distinct molecules.

Limitations and Future Work

  • Mode Collapse: The paper explicitly acknowledges that MolGAN is susceptible to mode collapse, leading to a lack of diversity in generated samples. The authors suggest this could be addressed through careful reward function design or advanced pretraining techniques.
  • Fixed Graph Size: The current generator architecture is designed for graphs of a pre-chosen maximum size, which limits its applicability to molecules beyond that size.
  • Future Directions: The authors suggest exploring alternative generative architectures within the MolGAN framework, such as recurrent graph-based models, to overcome the fixed-size limitation and potentially improve diversity. They also propose MolGAN as a framework for testing GAN stability improvements in the context of molecular graph generation.

Summary updated

Abstract

Deep generative models for graph-structured data offer a new angle on the problem of chemical synthesis: by optimizing differentiable models that directly generate molecular graphs, it is possible to side-step expensive search procedures in the discrete and vast space of chemical structures. We introduce MolGAN, an implicit, likelihood-free generative model for small molecular graphs that circumvents the need for expensive graph matching procedures or node ordering heuristics of previous likelihood-based methods. Our method adapts generative adversarial networks (GANs) to operate directly on graph-structured data. We combine our approach with a reinforcement learning objective to encourage the generation of molecules with specific desired chemical properties. In experiments on the QM9 chemical database, we demonstrate that our model is capable of generating close to 100% valid compounds. MolGAN compares favorably both to recent proposals that use string-based (SMILES) representations of molecules and to a likelihood-based method that directly generates graphs, albeit being susceptible to mode collapse. Code at https://github.com/nicola-decao/MolGAN
BibTeX
@misc{cao2018molgan,
  author = {Nicola De Cao and Thomas Kipf},
  title = {{MolGAN: An implicit generative model for small molecular graphs}},
  year = {2018},
  eprint = {1805.11973},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.11973},
}
Figure