Proposition 2I.14.P0249 of 100 in the corpus
A graph convolution is a degree-weighted average, and it cannot tell its neighbours apart.
The graph Laplacian supplies a graph's frequencies, and a first-order filter on them, renormalised, is the graph convolution. Its coefficients come from degrees alone, so it has no notion of direction, and it merges nodes whose neighbourhoods coincide.
Frequencies on a graph
On a grid, convolution is multiplication in the Fourier basis: each frequency is scaled by the kernel’s response. A graph has no sines and cosines, but it has a matrix that plays their role. Let be the diagonal matrix of degrees and the graph Laplacian. Since counts each edge’s two endpoints once each, and counts each edge twice,
The Laplacian's eigenvectors are a graph's frequencies, and a filter reweights them.
The first line measures how much a signal varies across edges. The Laplacian is symmetric, so it has an orthonormal eigenbasis (Rank, eigenvalues and the singular value decomposition 0.LA.04). An eigenvector with a small eigenvalue varies little across edges: it is a low frequency. On a cycle the eigenvectors are exactly the discrete sines and cosines. The third line is a spectral filter: transform into the eigenbasis, scale each frequency by , and transform back.
Bruna and colleagues (2014) learned directly. That needs the eigendecomposition, which costs ; its filters are not local; and a filter learned on one graph means nothing on another, whose eigenvectors differ. Defferrard, Bresson and Vandergheynst (2016) made a polynomial of degree . A polynomial in needs no eigenvectors, and by I.14.T2 it reaches exactly hops.
The first-order filter, renormalised
Kipf and Welling (2017) kept the polynomial at degree one and tied its two coefficients, giving . That matrix has eigenvalues in , so stacking it can amplify a signal without bound. Their repair, which they called the renormalisation trick, adds a self-loop to every node first:
A graph convolution averages each node with its neighbours, weighted by degree.
Here holds the degrees counted with the self-loop, so for every neighbour of and for . The eigenvalues of lie in for a connected graph, a fact proposition 3 uses. The layer is a fixed average over each node’s closed neighbourhood followed by one weight matrix shared by every node: the convolution of I.11 with the kernel replaced by a rule.
On the paw graph the degrees with self-loops are , , and . Node ‘s row of is , and for
What the average cannot see
The coefficients of (I.14.5) depend on the degrees at the two ends of an edge and on nothing else. A node therefore cannot tell one neighbour from another, except through their states. The figure sets this against I.11. On a line, a kernel of width three has three weights, , and , and can weigh the left neighbour differently from the right.
On a cycle the difference is exact. There every degree with self-loop is , and averages each node with its two neighbours by each. Its eigenvalues are for the cycle’s frequencies , a low-pass filter. A difference filter, which returns , is an antisymmetric matrix. Every polynomial in the symmetric is symmetric, so no stack of linear graph convolutions computes a directional difference (I.14.X04). Equivariance was bought by forgetting which neighbour is which.
The rule has a second consequence. Nodes and of the paw have the same closed neighbourhood, , and the same degree, so their rows of are identical. One graph convolution gives both the value , although their features are and : the difference between them is erased. The sum layer of (I.14.3) keeps them apart, because its self-term has its own weights.
Attention gives the coefficients more freedom. In the graph attention network of Veličković and colleagues (2018) each edge’s weight is computed from the two nodes’ states, so the average can favour some neighbours. It is still a function of the states and not of an ordering, so it still cannot invent a direction the features do not carry.
What it costs
Each layer multiplies by an matrix and then by a weight matrix:
A sparse graph is cheap only if its sparsity is used.
For a million nodes, ten million edges and width , the dense product alone is multiply-accumulates and the matrix occupies bytes. With an edge list the whole layer is about operations (I.14.B04). When even that is too much, Hamilton, Ying and Leskovec (2017) sample a fixed number of neighbours per node and layer, trading an exact average for an unbiased estimate of it (I.14.X09).
Build the matrix
from math import sqrt
A = [[0, 1, 1, 0], [1, 0, 1, 0], [1, 1, 0, 1], [0, 0, 1, 0]] # the paw graph
d = [sum(row) + 1 for row in A] # degrees with self-loops
Ahat = [[(A[i][j] + (i == j))/sqrt(d[i]*d[j]) for j in range(4)] for i in range(4)]
x = [1.0, 2.0, 3.0, 4.0]
print(d)
print([round(v, 6) for v in Ahat[0]])
print([round(sum(a*b for a, b in zip(row, x)), 6) for row in Ahat])
It prints the degrees [3, 3, 4, 2], node 1’s row
[0.333333, 0.333333, 0.288675, 0.0], and the convolved signal
[1.866025, 1.866025, 3.030239, 3.06066], with the first two
entries equal.
Sources
Depends on
Used by
Problems using this
- I.14.B01 — One round of message passing, three aggregatorsnumeric▲△△
- I.14.B02 — Where repeated averaging converges, and how fastsymbolic▲▲▲
- I.14.B04 — What a graph layer costscomplexity▲▲△
- I.14.X01 — A graph convolution on a path of threenumeric▲△△
- I.14.X04 — No direction on a cyclesymbolic▲▲△
- I.14.X06 — Backpropagation through one graph convolutiongradient▲▲△
- I.14.X09 — Averaging over sampled neighboursprobability▲▲△
- I.BOOK.B07 — Cross-entropy through a graph convolutiongradient▲▲△