Source-linked AI summary
MolGAN: An implicit generative model for small molecular graphs
Nicola De Cao, Thomas Kipf
TL;DR
Finding molecules with desired properties is difficult because synthesizable chemical structures occupy a vast discrete space, and prior graph likelihood methods require costly ordering or matching procedures. MolGAN directly generates small molecular graphs with an implicit GAN combined with reinforcement learning for property optimization. On QM9 and related comparisons, it reports high validity and improved property scores with faster training, while remaining susceptible to mode collapse.
Problem
Finding compounds with desired properties requires navigating a vast discrete space, while likelihood-based graph generation can require expensive matching or node-permutation evaluation.
Method
MolGAN adapts an implicit, likelihood-free GAN to generate molecular graphs directly and combines it with reinforcement learning through a learned differentiable reward model.
Results
MolGAN achieves higher validity and novelty than comparable VAE-based models, higher chemical property scores than a related SMILES-based GAN, and at least ∼5x faster training.
Takeaways & Limitations
Direct graph generation with joint GAN and reinforcement-learning training can produce small molecular graphs with favorable validity, novelty, and chemical-property outcomes without a permutation-dependent likelihood.
Takeaways & Limitations
MolGAN is susceptible to mode collapse, producing only a handful of different molecules if training is not stopped early.
Abstract
from arXiv · showhide
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
1. Introduction
Generating molecules with desired properties is difficult because chemical structures form a vast discrete search space. MolGAN addresses this by generating molecular graphs directly with a likelihood-free GAN and reinforcement learning objective.
- Motivation: Chemical synthesis requires searching a vast discrete space of synthesizable molecules to find compounds with desired properties.The task has important applications such as de novo drug design.
- Limitations of prior representations: Most recent molecular generators use SMILES strings, requiring models to learn syntax and representation order, and limiting applicability to molecular graphs.The passage also identifies SMILES-based approaches as unsuitable for generic non-molecular graphs.
- Graph representations: Direct graph generation removes overhead from converting molecules into SMILES strings and has become feasible with advances in deep learning on graphs.
- Limitations of prior graph methods: Likelihood-based graph generators require fixed or random node orderings or expensive graph matching because evaluating all node permutations is prohibitive for small graphs.
- MolGAN: MolGAN adapts an implicit, likelihood-free GAN to graph representations and adds reinforcement learning to encourage molecules with desired properties.
- MolGAN: MolGAN generates graph structure nonsequentially and uses permutation-invariant graph-convolutional discriminator and reward networks.These components operate directly on graph-structured representations.
2. Background
This background motivates graph-based implicit generation as an alternative to SMILES and likelihood-based methods, while introducing GAN, Wasserstein, and reinforcement-learning components used by MolGAN.
- Molecular representations: SMILES-based molecular generators can produce invalid or drastically different structures after small syntax changes or mistakes.Grammar VAEs address this issue by constraining generation with a grammar.
- Molecular representations: Graph-based generation avoids string encoding and can guarantee valid graphs, although the resulting graphs are not necessarily valid molecules.
- Molecules as graphs: Molecules are represented as graphs with atom-type node features and bond-type edges, summarized by node matrix X and adjacency tensor A.A_ij is a one-hot vector indicating the edge type between nodes i and j.
- Implicit versus likelihood-based methods: Likelihood-based graph methods must handle node-ordering invariance through expensive graph matching or explicit evaluation of all node permutations.Although likelihood-based methods are often easier and more stable to optimize, these graph requirements are prohibitively expensive.
- GANs and WGANs: GANs learn a generator mapping from a prior to the data distribution and a discriminator distinguishing generated samples from dataset samples.MolGAN uses graph convolutions and node aggregation to make discrimination invariant to node ordering, while omitting an explicit likelihood.
- GANs and WGANs: Improved WGAN replaces gradient clipping with a gradient penalty that softly constrains 1-Lipschitz continuity.Its discriminator loss is modified while the generator loss remains the same as in WGAN.
- Reinforcement learning: Reinforcement learning optimizes generation toward nondifferentiable chemical metrics such as synthesizability.
- Reinforcement learning: MolGAN uses a deterministic policy-gradient setup in which the generator maps prior samples to molecular graphs and a learned reward model supplies differentiable optimization signals.The reward model is trained against external-system rewards and the generator maximizes its predicted reward.
3. Model
MolGAN combines a graph generator, adversarial discriminator, and reward network to generate small molecular graphs and optimize them toward desired properties. It predicts bounded graph structures nonsequentially, discretizes them by categorical sampling, and processes them with permutation-invariant graph networks.
- MolGAN consists of a generator Gθ, discriminator Dφ, and reward network R̂ψ.
- The generator maps a prior sample to an annotated molecular graph, while the discriminator distinguishes generated graphs from dataset samples using improved WGAN training.
- The reward network approximates external, potentially non-differentiable molecular scores and supports reinforcement-learning optimization toward desired properties.
- MolGAN combines WGAN and reinforcement-learning losses through L(θ) = λ · L_WGAN(θ) + (1 − λ) · L_RL(θ), with λ controlling their trade-off.
- The generator predicts the entire bounded-size graph at once, producing dense probabilistic atom and bond representations that are converted into sparse discrete graphs through categorical sampling.
- The discriminator and reward network use Relational-GCN layers that propagate node features across edge types and produce permutation-invariant scalar graph outputs.
4. Related work
Related work includes SMILES-based recurrent and variational generators, sequential likelihood-based graph generators, and graph adversarial methods focused on link prediction. MolGAN differs by generating molecular graphs directly from scratch with an adversarial approach.
- ORGAN uses SeqGAN and REINFORCE to optimize SMILES sequences toward chemical metrics, whereas MolGAN generates graphs and uses DDPG.
- CharacterVAE, GrammarVAE, and SDVAE generate molecules from SMILES representations using recurrent or syntax-constrained variational architectures.
- Likelihood-based graph generators produce graphs sequentially and can support arbitrary size, contrasting with MolGAN’s direct graph-generation approach.
- Adversarial graph models developed for link prediction are not suitable for generating molecular graphs from scratch, making direct comparison infeasible.
5. Experiments
Experiments on QM9 evaluate MolGAN across objective settings and baselines, showing high validity, faster training, and novel samples, but persistent susceptibility to mode collapse.
- Effect of λ: λ = 0 achieves the highest valid and solubility scores and is selected for subsequent experiments.λ controls the trade-off between the WGAN and reinforcement-learning losses.
- Objectives optimization: >97% validity is achieved across MolGAN models at the end of training, and MolGAN beats ORGAN on validity and all three optimized objectives in single-metric settings.The comparison uses a joint reward when optimizing all objectives rather than alternating between objectives.
- Objectives optimization: Training on the full QM9 dataset for 10 times fewer epochs further improves results in almost all scores and exposes the model to more diverse structures and properties.The full-dataset setting observes more different samples than the smaller subset.
- Baseline comparisons: MolGAN remains susceptible to mode collapse: uniqueness stays near 2% in several settings, although 97% of its unique molecules are novel.Compared with ORGAN and VAE-based baselines, MolGAN has lower uniqueness but higher validity scores in the reported comparisons.
- Objectives optimization: At least ∼5 times faster training than ORGAN is reported on the 5k dataset because MolGAN avoids sequential generation and discrimination.MolGAN has approximately 20% more parameters than ORGAN despite the training-time advantage.
6. Conclusions
MolGAN generates small molecular graphs with higher validity and novelty than comparable VAE-based models, while avoiding permutation-dependent likelihoods and enabling faster training than a recent SMILES-based GAN. Its central limitation is mode collapse, which can reduce molecular diversity, especially without early stopping.
- MolGAN generates molecular graphs with higher validity and novelty than previous comparable VAE-based generative models without requiring a permutation-dependent likelihood function.
- Compared with a recent SMILES-based sequential GAN, MolGAN achieves higher chemical property scores while allowing at least ∼5x faster training.
- MolGAN is susceptible to mode collapse because its GAN and RL objectives do not encourage diverse, non-unique outputs.
- Without early stopping, mode collapse can result in generating only a handful of different molecules.
- Future work may address mode collapse through reward-function design or pretraining, while alternative recurrent graph-based architectures could extend the framework beyond small graphs.