Neural Message Passing for Quantum Chemistry

A unified framework for graph neural networks applied to molecular property prediction

Updated

Contents
  1. Why Students Should Care
  2. The Problem
  3. Message Passing: The Gossip Protocol
  4. 1. Message Passing Phase
  5. 2. Readout Phase
  6. Interactive Demo
  7. Key Components
  8. Unifying Prior Work
  9. Virtual Graph Elements
  10. Results on QM9
  11. Why This Matters
  12. Legacy
  13. Common Confusion
  14. Where To Go Next
  15. Key Paper

Neural Message Passing for Quantum Chemistry introduced the Message Passing Neural Network (MPNN) framework — a single recipe that turned out to describe most existing graph neural networks. The paper both unified the field and set a new state of the art on predicting molecular properties.

New to graphs in deep learning? The only prerequisite is the idea that data can be nodes connected by edges. If you want the “compare everything to everything” special case first, read Relational Reasoning.

Why Students Should Care

  • Graphs are everywhere: molecules, social networks, road maps, program syntax trees, citation networks. MPNN is the standard mental model for learning on all of them.
  • The framework move — showing that many competing architectures are one algorithm with different plug-ins — is a pattern you will see repeatedly in ML research.
  • The application is real: predicting quantum-chemical properties with a neural net in milliseconds instead of hours of physics simulation opened the door to ML-driven drug and materials discovery.

The Problem

Molecules are naturally graphs: atoms are nodes, bonds are edges. Predicting properties like energy or toxicity requires learning from this graph structure.

Why not just use a standard network? Because molecules have no natural ordering (which atom is “first”?) and vary in size. A graph network handles both automatically, because it operates on the connectivity itself.

Message Passing: The Gossip Protocol

Here is the intuition before any notation. Every atom starts out knowing only about itself (“I am carbon”). In each round, every atom sends a message to its bonded neighbors and updates its own summary based on what it hears. After one round, each atom knows about its neighbors; after two rounds, its neighbors’ neighbors; after TT rounds, information has spread TT hops across the molecule. Finally, all the atom summaries are pooled into one prediction for the whole molecule.

MPNNs formalize this in two phases.

1. Message Passing Phase

For TT timesteps, each node vv collects messages from its neighbors N(v)N(v):

mvt+1=uN(v)Mt(hvt,hut,evu)m_v^{t+1} = \sum_{u \in N(v)} M_t(h_v^t, h_u^t, e_{vu})

Then updates its hidden state:

hvt+1=Ut(hvt,mvt+1)h_v^{t+1} = U_t(h_v^t, m_v^{t+1})

2. Readout Phase

Aggregate all final node states into a graph-level prediction:

y^=R({hvTvG})\hat{y} = R(\{h_v^T | v \in G\})

You do not need to memorize the symbols. The important idea is: a message function MM (what neighbors say), an update function UU (how a node revises its state), and a readout function RR (how the graph votes on the answer). Choose those three, and you have specified a graph neural network.

Interactive Demo

Watch messages flow through a molecular graph:

Neural Message Passing

Layer 1/3
COOHH
Example: Formaldehyde (CH₂O) molecule
Phase: Message Collection
mv = Σu∈N(v) M(hu, hv, euv)
M
Message Function
U
Update Function
R
Readout Function

Key Components

ComponentFunctionCommon Choices
M (Message)Computes edge messagesMLP, attention
U (Update)Updates node statesGRU, LSTM
R (Readout)Graph-level outputSum, attention

Unifying Prior Work

The MPNN framework encompasses:

  • Convolutional Networks on Graphs (Duvenaud et al.)
  • Gated Graph Neural Networks (Li et al.)
  • Interaction Networks (Battaglia et al.)
  • Deep Tensor Neural Networks (Schütt et al.)

Each is an MPNN with specific MM, UU, and RR functions. Before this paper, these looked like rival architectures; after it, they were points in one design space.

Virtual Graph Elements

One limitation of pure message passing: information travels one bond per round, and some chemistry depends on atoms that are near in space but not bonded. The paper’s fix is “virtual edges” connecting all atom pairs:

evu=(dvu,bond type)e_{vu} = (d_{vu}, \text{bond type})

where dvud_{vu} is the 3D distance. This lets the network reason about non-bonded interactions directly.

Results on QM9

Predicting molecular properties on the QM9 dataset (lower error = better):

PropertyUnitsMPNN Error
HOMOeV0.043
LUMOeV0.038
GapeV0.066
μDebye0.030

MPNN achieved chemical accuracy on most targets — meaning errors small enough for the predictions to be practically useful to chemists.

Why This Matters

  1. Unified framework: clarified the design space of graph neural networks
  2. Practical impact: enabled ML-accelerated drug discovery
  3. Architectural insight: showed that message passing is the key inductive bias for graph data

Legacy

MPNNs became the foundation for:

  • SchNet — continuous-filter convolutions
  • DimeNet — directional message passing
  • Equivariant GNNs — respecting 3D symmetries

Common Confusion

  • MPNN is a framework, not one model: “an MPNN” usually means “some choice of MM, UU, RR.” The paper’s best QM9 model is one instance.
  • Message passing vs. attention: a Transformer is essentially message passing on a fully connected graph where message weights come from attention. GNNs restrict messages to actual edges.
  • Rounds vs. layers: each message-passing step plays the role of a layer; TT rounds means information can travel at most TT hops.
  • Graph-level vs. node-level tasks: the readout phase is for predicting a property of the whole graph; node-level tasks (like classifying each atom) skip or change RR.

Where To Go Next

  • Read Relational Reasoning for the fully-connected, single-round special case of this idea.
  • Read Relational RNNs for attention-based interaction applied to memory over time.
  • Read Attention Is All You Need to see message passing with learned attention weights on a complete graph.
  • Read Neural ODE for another example of a paper reframing many architectures as one continuous framework.

Key Paper

Found an error or want to contribute? Edit this page on GitHub

↑↓ to navigate ↵ to open esc to close