Course contentsShow
← Machine Learning and Deep Learning
Lesson 2512 of 3,53854. Graph Neural NetworksFree lesson

Message Passing Neural Networks Framework

The general MPNN framework unifying GNN variants: message, aggregation, and update functions.

Message Passing Neural Networks Framework

What you'll learn: How the Message Passing Neural Networks (MPNN) framework provides a unified mathematical structure for understanding all GNN variants.

The Unifying View

You've now seen GCN, GraphSAGE, and GAT — different architectures with different strengths. But they all share a common pattern. The MPNN framework formalizes this shared structure, showing that every graph neural network can be described using three core functions:

  1. Message function φ: How to compute messages from neighbors
  2. Aggregation function ⊕: How to combine messages (sum, mean, max, attention-weighted)
  3. Update function γ: How to compute the new node representation

The General Formula

For each node v at layer k, the MPNN framework defines:

m_v^(k) = ⊕_{u ∈ N(v)} φ(h_v^(k-1), h_u^(k-1), e_{u,v})
h_v^(k) = γ(h_v^(k-1), m_v^(k))

Where:

  • φ creates messages from neighbor features and optional edge features
  • ⊕ aggregates all neighbor messages (permutation invariant)
  • γ updates the node embedding using old state and aggregated messages

How Your Models Fit

  • GCN: φ is identity with normalization, ⊕ is normalized sum, γ applies weights and activation
  • GraphSAGE: φ is identity, ⊕ can be mean/max/LSTM, γ concatenates and transforms
  • GAT: φ computes attention scores, ⊕ is attention-weighted sum, γ applies final transformation

Think of MPNN as the "recipe template" — every GNN is just filling in different ingredients for these three functions.

Key Takeaway: The MPNN framework unifies all GNN architectures as variations of three composable functions: message, aggregation, and update — making it easier to understand, compare, and design new graph neural networks.