Graph Neural Networks for
Modeling Small Molecules
Thomas Kipf*, Petar Veličković, Yujia Li
Google ResearchBrain Team

DeepMind

DeepMind

24 March 2020
Small Organic Molecules Workshop, University of Oxford*talk content based on work done at University of Amsterdam, prior to joining Google

(Some) Deep Learning success stories
VisionAudio / Speech

Language
The cat sat on the mat.
Die Katze saß auf der Matte.

http://www.image-net.org/

Grid-based games

Graph-structured data
Social networks
Citation networks
Communication networks
World Wide Web

Knowledge graphs

Protein interaction networks

Challenging for standard deep neuralnetwork architectures (CNNs / RNNs)

Road maps

Image © Google3Talk overview
1)

Introduction to Graph Neural Networks (GNNs)a)

Convolution-based GNNs (“Graph Convolutional Networks”)b)

GNNs with attention mechanismsc)

Neural Message Passing formulation2)

Molecular property prediction with GNNs

3)

Generative models for molecules

4)

Modeling interactions between molecules

Graph Neural Networks (GNNs)
Scarselli et al., The Graph Neural Network Model (2009)

The bigger picture:

Graph
Node features
Edge features

Figure: http://tkipf.github.io/graph-convolutional-networks/

Main idea: Pass messages along edges of graph, agglomerate & transform

5

CNNs (on grids) as message passing
Single CNN layer
with 3x3 filter:

Update for a single pixel:●Transform messages individually●

Add everything upare (hidden layer) activations of a pixel/node(Animation byVincent Dumoulin)

Full update:6

Convolution-based Graph Neural Networks
Neural FP: Duvenaud et al. (NIPS 2015), Graph Convolutional Networks (GCN): Kipf & Welling (ICLR 2017)

Consider thisundirected graph:

Calculate updatefor node in red:

Neighbor indices(Optional) normalization constant7

Figure from Vaswani et al. (NIPS 2017)

More expressive GNN variants
Adding support for relation types
GG-NN: Li et al. (ICLR 2016), R-GCN: Schlichtkrull et al. (2017)

Attention-based aggregation
GAT: Veličković et al. (ICLR 2018), Transformers: Vaswani et al. (NIPS 2017)8

Neural Message Passing formulation of GNNs
Message Passing Neural Networks (MPNN): Gilmer et al. (ICML 2017), GraphNets: Battaglia et al. (2018)

Edge update (message)

Node features

Node update
9Figure: T. N. Kipf, Deep Learning with Graph-Structured Representations (unpublished)Code repositories●

Graph Convolutional Networks (Kipf and Welling, ICLR 2017)○●

Graph Attention Networks (Veličković et al., ICLR 2018)○●https://github.com/tkipf/gcn (TensorFlow)

https://github.com/PetarV-/GAT (TensorFlow)

Message Passing Neural Networks (Gilmer et al., ICML 2017)○https://github.com/brain-research/mpnn (TensorFlow)Molecular property prediction with GNNs11

GNNs applied to molecular data
Sanchez-Lengeling et al., Machine Learning for Scent: Learning Generalizable Perceptual
Representations of Small Molecules (2019)

Animation: https://ai.googleblog.com/2019/10/learning-to-smell-using-deep-learning.html

GNNs on molecules for discovery of antibiotics
Stokes et al., A Deep Learning Approach to Antibiotic Discovery (Cell 2020)

Simple recipe:1)

Train GNN (simple GCN, termed “ChemNet”) on database ofmolecules with known antibiotic properties

2)

Evaluate GNN on a much larger database of molecules

3)

Rank molecules by predicted property

4)Top-ranked molecules are good candidates for antibiotics!

Generative models of molecule graphs

Graph generation●We seek a model capable of producing graphs that “capture” the empiricalproperties of a given distribution of graphs.

●Very challenging! (discrete decisions)○

Until recently, most results in domain of small chemicals (< 50 nodes!)See “Efficient Graph Generation with Graph Recurrent Attention Networks” (Liao et al., NeurIPS’19): recent large-scale results.

Drug discovery
Application: drug design is very important:-Drug discovery is costly, time-expensive;
Use drug databases and machine learning models to support searching thecomplex space of candidates (10^23 -- 10^60)

Want targeted molecules that optimise for specific properties.

Taxonomy of related work

JTVAE●

Junction Tree Variational Autoencoder (Jin et al., ICML 2018)●Generate molecular graphs iteratively, guided by the molecule’s
substructures, from a variational representation.

●

Perform targeted optimisation within the representation space.

JTVAE components●

Junction Tree Variational Autoencoder (Jin et al., ICML 2018)

JTVAE components●

Junction Tree Variational Autoencoder (Jin et al., ICML 2018)

JTVAE components●Junction Tree Variational Autoencoder (Jin et al., ICML 2018)

Putting it all together

Putting it all together
MPNN for encoding graphs and trees

Putting it all together
Decode tree in depth-first fashion

Putting it all together
Decode graph by reassembling from tree

Once trained...
1.

Sample tree codes z_T2.

Decode junction tree3.

Decode graph from junction tree

4.

Repeat to keep generating :)

GCPN
●

Graph Convolutional Policy Network (You et al., NeurIPS 2018)●At each step, take a partially constructed molecule, and a set of motifs, anddiscretely decide on:○○○●Two atoms to connect (one must be in molecule);
Bond type between them;
Whether to stop.

Evaluate decisions via reinforcement learning framework.

GCPN Pipeline

GCPN Pipeline

GCN (parametrised by bond type) for encoding graphs

GCPN Pipeline

Sample actions by scoring appropriate tuples of inputs

GCPN Pipeline

Check whether new molecule breaks valency constraints
If so---restart and give reward of -1.

GCPN Pipeline

Evaluate reward using property scores and GAN score

Optimise rewards using reinforcement learning (e.g. PPO).

Code repositories●Junction Tree Variational Autoencoders (Jin et al., ICML 2018)○●https://github.com/wengong-jin/icml18-jtnn (PyTorch)

Graph Convolutional Policy Network (You et al., NeurIPS 2019)○https://github.com/bowenliu16/rl_graph_generation (TensorFlow)GNN models of molecular interactions“Drug-Drug Adverse Effect Prediction with Graph Co-Attention”
Deac et al., ICML WCB 2019“Modeling polypharmacy side effects with graph convolutional networks”Žitnik et al., Bioinformatics
Also see:“Graph Matching Networks for Learning the Similarity of Graph Structured Objects”
Li et al., ICML 2019Drug use is increasing

2000

2011

Prescription Drug Use

51%

59%

>5 drugs

8.2%

15%

Polypharmacy
Polypharmacy is the concurrent use of multiple medications by a patient.
It is necessary for chronic, complex or multiple conditions and most of the increasein cost comes from treating these.

“Hulk & Iron Man” analogy: drugs correspond to ‘heroes’, but putting them together
can destroy the surrounding city!

Adverse side-effects
Side effects affecting 15% of the population, treatment costs exceeding $177
billion/year
Some found in Phase IV of clinical trials
But plenty are undiscovered when the drugs are put on the market

Related work--

Most models predict if a side-effect exists
or not (using drug-drug similarity: chemicalsubstructures, individual drug side effects,
interaction profile fingerprints)
Others model the interactions between
pairs of drugs, pairs of proteins anddrug-protein pairs to predict “missing” links
between them.

* Modeling polypharmacy side effects with graph convolutional networks, Žitnik et al, 2018

Molecules as graphs
Represent the input drugs as graphs consisting of atomsbonds between these atoms
as edges.

as nodes andDDI - Tasks

Graph co-attention

41

The architectureVariants consideredQuantitative results

Code repositories●Multi-head co-attentive drug-drug interactions (MHCADDI) (Deac et al., ICMLWCB 2019):○

https://github.com/andreeadeac22/graph_coattention (PyTorch)