What is the general message-passing neural network (MPNN) update for node , and how do you prove that relabelling nodes with any permutation matrix makes a node-level GNN layer permutation-equivariant while global sum or mean pooling makes a graph-level readout permutation-invariant?
Deep learning, Graph neural networks
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you know the message-passing abstraction and can prove permutation equivariance and invariance cleanly with permutation matrices.
Key idea
Because the message aggregation (such as sum, mean or max) is symmetric in the ordering of neighbours, a GNN layer satisfies for any permutation matrix , where is the adjacency matrix and holds node features as rows.
Steps
- Write the MPNN layer update at step : , where is the message function, is a permutation-invariant aggregator over neighbour set , are edge features and is the node update.
- Check matrix-form equivariance (illustrate with , where is a symmetrically normalised adjacency derived from ): permuting node order sends and (so ). Since and element-wise non-linearities commute with row permutations, .
- Generalise to any MPNN: permuting nodes preserves each node’s multiset of neighbours ; because is independent of neighbour order, each node receives the exact same updated embedding, merely placed at its new row index.
- Show graph-level invariance: global sum pooling computes . Under permutation, (since every row and column of sums to ), so the graph representation is unchanged; dividing by the node count gives the same invariance for global mean pooling.
Common mistakes
- Writing instead of when permuting the adjacency matrix; both rows and columns must be reordered.
- Confusing equivariance (output permutes with input, needed for node classification) with invariance (output stays constant, needed for graph classification).
How long your answer should be
Half a page; 3–4 minutes.
Read this
Previous in Deep learning: In SimCLR with a mini-batch of images (giving augmented views), write the NT-Xent (InfoNCE) loss for a positive pair with cosine similarity and temperature . Why is this a -way cross-entropy loss, and how does affect the gradients?
Next in Deep learning: Consider a small ReLU network with input , hidden layer with , , and scalar output with (no biases). For target and squared loss , what are the exact gradients and ?