02

One round of messages

Freeze the old states. Gather neighbor information. Apply the same update everywhere.

Start with C

C begins at 1. Its neighbors A, B and D begin at 2, 0 and 3. Imagine that each neighbor sends its current value along the connecting edge. With all gates equal to one, C receives three messages: 2, 0 and 3.

Our toy rule keeps half of C's own value and adds half of the mean incoming message. The mean is the sum divided by the number of neighbors:

mean at C=2+0+33=53\text{mean at C}=\frac{2+0+3}{3}=\frac53
hC(1)=12(1)+12(53)=43h_C^{(1)}=\frac12(1)+\frac12\left(\frac53\right)=\frac43
FIG-ROUNDEvery new state reads the same old snapshot.
A → Cold A = 2
B → Cold B = 0
D → Cold D = 3

Three messages → mean 5/3 → half self plus half mean → new C=4/3.

Derived first layer · a=b=½, all gates 1
NodeInput h⁽⁰⁾New h⁽¹⁾
A2.0001.250
B0.0000.750
C1.0001.333
D3.0001.750
E0.0001.500

The arithmetic at every other node follows the same rule. D uses old C=1 and old E=0, so D's neighbor mean is 1/2 and its new state is 7/4. D does not read the newly computed C=4/3 in this round.

This is a synchronous update: everyone reads the same old snapshot, then all new states replace it together. Updating an array in place as you walk through the nodes would make later nodes read earlier results and create a different computation.

CL-009 · Derived from the toy rule. Fractions are exact; tables round only for display.

Give the operations names

Let N(i)N(i) be the neighbor set of node ii, and let di=∣N(i)∣d_i=|N(i)| be its degree, the count of neighbors. The index jj runs through that set. The gate eije_{ij} multiplies the sender's state.

qi(ℓ)=1di∑j∈N(i)eijhj(ℓ)q_i^{(\ell)}=\frac{1}{d_i}\sum_{j\in N(i)}e_{ij}h_j^{(\ell)}
hi(ℓ+1)=a hi(ℓ)+b qi(ℓ)h_i^{(\ell+1)}=a\,h_i^{(\ell)}+b\,q_i^{(\ell)}

The first line aggregates messages into qi(ℓ)q_i^{(\ell)}. The second combines the aggregate with the node's own state. We stipulate a=b=1/2a=b=1/2 for every node and every round. An isolated node has no neighbors; our declared convention sets its aggregate to zero, giving hi(ℓ+1)=ahi(ℓ)h_i^{(\ell+1)}=a h_i^{(\ell)}.

Degree counts present edges, even if a gate reduces a message. It does not sum the gate values. That detail will matter when we edit C–D. Self information is carried by the ahia h_i term; there are no self-edges in our edge list.

CL-008 · Toy assumption: this exact averaging rule and isolated-node convention are choices for an inspectable model.

Where the neural part enters

A learned message-passing network replaces these simple operations with parameterized functions. A message function MθℓM_{\theta_\ell} can use the receiver's state, sender's state and edge attributes. An update function UθℓU_{\theta_\ell} combines the aggregate with the receiver. The symbol θℓ\theta_\ell denotes the learnable parameters at layer ℓ\ell.

mij(ℓ)=Mθℓ(hi(ℓ),hj(ℓ),eij)m_{ij}^{(\ell)}=M_{\theta_\ell}(h_i^{(\ell)},h_j^{(\ell)},e_{ij})
qi(ℓ)=AGG⁡j∈N(i)mij(ℓ)q_i^{(\ell)}=\operatorname{AGG}_{j\in N(i)}m_{ij}^{(\ell)}
hi(ℓ+1)=Uθℓ(hi(ℓ),qi(ℓ))h_i^{(\ell+1)}=U_{\theta_\ell}(h_i^{(\ell)},q_i^{(\ell)})

AGG means an aggregation such as sum or mean. Our toy uses M(hi,hj,e)=ehjM(h_i,h_j,e)=e h_j, a mean aggregate, and U(h,q)=ah+bqU(h,q)=a h+bq. Practical functions can transform vectors and use nonlinearities. The small arithmetic example exposes the same message–aggregate–update structure.

The functions are shared across nodes within a layer. C and E use the same parameters but receive different inputs. General networks may use different parameters in different layers; we additionally tie our two coefficients across rounds.

CL-002 · Gilmer et al., §2, equations (1)–(3)

Nothing in this guide fits those coefficients. A forward pass computes states with supplied parameters. Training would require an objective and an optimizer to change parameters. Advancing the layer control is another stage of the forward computation, not another training step.

CL-015 · Derived distinction: the canonical lab contains no loss, gradient calculation or parameter update.