Source-linked AI summary

Molecular graph generation with Graph Neural Networks

Pietro Bongini, Monica Bianchini, Franco Scarselli

arXiv:2012.07397v2stat.MLcs.LGq-bio.BM

TL;DR

Molecular graph generation can reduce the cost of designing candidate molecules, but generating realistic molecular graphs remains a complex task. MG2N2 addresses this with a sequential, modular GNN generator that adds nodes and connections while using the produced subgraph as input. On QM9 and Zinc, it generalizes molecular patterns without overfitting and outperforms challenging unconditional-generation baselines.

  • Problem

    Designing candidate molecules requires substantial time and money, motivating computational generation methods for molecular graphs.

  • Method

    MG2N2 sequentially generates molecular graphs with modular GNNs, adding nodes and connections while using the previously produced subgraph at each step.

  • Results

    MG2N2 generalizes molecular patterns without overfitting and outperforms challenging baselines for unconditional generation on QM9 and Zinc.

  • Takeaways & Limitations

    Its sequential and modular design makes generation interpretable, allowing errors and the atoms or bonds involved to be identified in the generation sequence.

  • Takeaways & Limitations

    Zinc experimentation was limited to literature comparisons because the number of network parameters made broader experimentation computationally infeasible.

Abstract

from arXiv · show

Drug Discovery is a fundamental and ever-evolving field of research. The design of new candidate molecules requires large amounts of time and money, and computational methods are being increasingly employed to cut these costs. Machine learning methods are ideal for the design of large amounts of potential new candidate molecules, which are naturally represented as graphs. Graph generation is being revolutionized by deep learning methods, and molecular generation is one of its most promising applications. In this paper, we introduce a sequential molecular graph generator based on a set of graph neural network modules, which we call MG^2N^2. At each step, a node or a group of nodes is added to the graph, along with its connections. The modular architecture simplifies the training procedure, also allowing an independent retraining of a single module. Sequentiality and modularity make the generation process interpretable. The use of graph neural networks maximizes the information in input at each generative step, which consists of the subgraph produced during the previous steps. Experiments of unconditional generation on the QM9 and Zinc datasets show that our model is capable of generalizing molecular patterns seen during the training phase, without overfitting. The results indicate that our method is competitive, and outperforms challenging baselines for unconditional generation.

1 Introduction

Graph generation has progressed from classical random graph models to deep-learning approaches, including VAEs, GANs, reinforcement learning, and Graph Nets. MG2N2 introduces a sequential molecular graph generator using modular GNNs for interpretable generation.

  • Deep learning methods learn domain characteristics from example graphs and use them to generate new graphs.
  • MG2N2 adds one node and its connections at each step, processing one node’s neighbors before expanding the next.It uses BFS ordering, generates edges in parallel, and prevents disconnected components.
  • Three GNN modules control MG2N2’s decisions while using the previously generated subgraph as input at each step.The sequential and modular design makes the generation process interpretable.

2 The GNN Model

The model updates vertex states through iterative message passing and neighborhood aggregation, then applies output functions to node- and edge-level classification tasks. Its GNN implementation learns the state update function while using fixed message and aggregation functions.

  • Each vertex state is updated iteratively and in parallel from its previous state and messages received from neighboring vertices.The process continues until state convergence or a maximum iteration count is reached.
  • Message passing, neighborhood aggregation, and state updating respectively determine received information, its combination, and the new vertex state.In this work, the state update function F is learned with an MLP, while M and A remain fixed.
  • Neighborhood messages are aggregated either by arithmetic mean or element-wise sum through a coefficient a.The coefficient is set to 1/|Ne(vi)| for averaging or 1 for summation.
  • The output function supports graph-, node-, and edge-based problems; MG2N2 uses one node-based and two edge-based classification subtasks.Node outputs use Eq. (5), whereas edge outputs use Eq. (6).
  • Training compares supervised targets with output-network predictions and updates weights using Backpropagation Through Time.

3 Method

MG2N2 generates small organic molecular graphs sequentially with three decision functions implemented by GNN modules. The procedure expands one node at a time, guarantees connectivity, and parallelizes additional edge decisions.

  • 3 Method: The method combines a graph-generation algorithm for small organic molecules with a GNN implementation.The paper separates the algorithm, implementation, preprocessing, and node-ordering descriptions.
  • 3.1 Generation Algorithm: Generation starts from one vertex and repeatedly adds a node, connects it to the focus node, and processes its possible additional connections.The process stops after all nodes are expanded or the maximum node count is reached.
  • 3.1 Generation Algorithm: P1 decides whether to add a neighbor and supplies its label, while P2 assigns the connecting edge label.
  • 3.1 Generation Algorithm: P3 determines additional edges from the new node to existing vertices and processes those edges in parallel.Parallel processing reduces time cost but ignores dependencies between edges.
  • 3 Method: The training data decomposes each molecular graph into incomplete graphs representing successive generative steps.For M1, each sequence contains n = 2|V| − 1 graphs.
  • 3 Method: Graphs from one generative sequence remain in the same dataset split and batch to avoid evaluation bias from near-duplicate examples.
  • 3 Method: Node ordering determines which atoms are generated first and is learned from the ordering strategy represented in the training set.For example, prioritizing carbon atoms teaches the model to generate carbon neighbors first.

4 Experimental Methodology

The study evaluates MG2N2 on QM9 and Zinc using graph-generation metrics and chemical-property distributions, while exploring graph-size and module configurations. Results examine validity, uniqueness, novelty, VUN, and similarity to reference molecules, with Zinc experiments constrained by computational cost.

  • Datasets and evaluation: Experiments evaluate MG2N2 on QM9 and Zinc, using batches of 10,000 generated graphs and comparisons with established unconditional-generation baselines.QM9 is a benchmark of 133,885 molecules with up to nine heavy atoms; Zinc experiments focus on literature comparisons because larger molecules and models increase time and memory costs.
  • Datasets and evaluation: Validity, uniqueness, novelty, and VUN measure generated-graph quality, while molecular weight, logP, and QED distributions assess chemical-property similarity.VUN combines validity, uniqueness, and novelty into one measure; logP describes solvent partitioning and QED summarizes drug-likeness descriptors.
  • QM9 experiments: The QM9 study varies the maximum graph size |V|max to test whether sequential generation can extend toward molecules larger than those seen during training.Higher |V|max values produce more valid and unique compounds, but divergence from validation-set QED and molecular-weight averages suggests |V|max = 29 as the best configuration.
  • QM9 experiments: Alternative M3 configurations compare neighborhood aggregation and class-weighted supervision, while C1, C2, and C3 trade off validity, QED, and molecular-weight matching.The two aggregation functions show equivalent results and balancing weights bring no advantage; C3 has more valid molecules, C2 the highest QED, and C1 the closest average molecular weight to 127.5.
  • Results and comparisons: C2 reproduces the test-set logP and QED distributions closely, whereas further optimization of C3 improves validity but conflicts with uniqueness, novelty, and QM9-like properties.On Zinc, MG2N2 outperforms standard VAE baselines in validity, and sequential generation becomes more important as the number of atom types grows.

5 Conclusions

MG2N2 combines sequential molecular graph generation with GNN-based graph processing and modular training. On QM9 and Zinc, it reproduced test-set chemical-descriptor distributions and achieved strong performance against competitive baselines.

  • MG2N2 is a generative model for molecular graphs paired with a sequential generation algorithm.
  • Graph Neural Networks process the graph produced at each previous step, rather than only the sequence of earlier decisions.
  • Modular training makes learning less resource demanding and permits identifying errors or atom and bond creation steps during generation.
  • The generated chemical-descriptor distributions retraced those of the held-out QM9 test set.
  • MG2N2 outperformed competitive baselines on QM9, while a similar performance level was observed on Zinc against similar approaches.
Loading 2012.07397v2…