Every node in the last chapter's graph carries its own number. What's the simplest possible way to let a node's value be influenced by where it sits in the graph, not just its own starting value?
Click "pass one round of messages" a few times. Every node's number nudges toward the average of itself and its direct neighbors — nothing fancier than that.
A Graph Convolutional Network (GCN) layer replaces the standard neural-net update with message passing: each node's new feature is a function of the (multi-)set of its neighbors' current features, plus its own:
- — node 's feature after rounds of message passing.
- — node 's updated feature after one more round of message passing.
- — a neighbor 's current feature, one of the values node aggregates.
- — node 's neighborhood: every node it shares an edge with.
- AGGREGATE — the combining function; this chapter fixes it to a plain mean of the node and its neighbors.
- AGGREGATE fixed to a plain mean
The simplest possible choice of AGGREGATE — the one this chapter uses — is a plain mean: average the node's own value together with every neighbor's.
- Stacking layers reaches further hops
Stack of these layers, and information from nodes up to hops away has had a chance to reach any given node.
Watch the variance number, not just the graph. It shrinks every single round — nodes that started far apart in value are ending up closer and closer together. That's not a bug; it's exactly what averaging repeatedly does, and it's the double-edged sword of stacking too many GCN layers: over-smoothing.
Starting features for nodes :
- One round, computed by hand for a leaf and a hub
- Node (a leaf, neighbor ): .
- Node (a hub, neighbors ): .
Every node's group size is — the denominator changes depending on the node, since degrees aren't uniform (Chapter 1).
- Full round 1
The same mean rule for the remaining four nodes:
- (self , neighbors with features )
- (self , neighbors with features )
- (self , neighbors with features )
- (self , neighbor with feature )
Together with and from the step above: .
The new mean is , so the new variance is — down from the original , already less than a third of where it started.
- Keep going and it keeps shrinking
Running the identical mean rule for three more rounds:
- Round : , variance
- Round : , variance
- Round : , variance
Every node's value is crawling toward the graph's overall average. Nodes and started a full apart; a few rounds of pure local averaging is already enough to blur that gap down to .
Pass rounds of messages until the variance across all six node values drops under 0.2.
Message passing is the graph generalization of convolution: instead of a fixed spatial window, every node aggregates whatever neighbors it actually has. But stacking too many rounds washes out exactly the local structure that made the graph interesting in the first place — real GCNs use a learned weight matrix per layer (not just a mean) and rarely go past 2-3 layers for precisely this reason. The next chapter tackles a different problem the mean rule quietly assumes away: what happens when a node has thousands of neighbors, not six?