graph SAGE

[[concept]]
Graph SAGE

Introduced by Hamilton-Ying-Leskovee in 2017, each Graph SAGE layer implements the following 2 operations:

Aggregate

(Uℓ)i=AGGREGATEℓ({(xℓ)j,j∈N(i)})

Concatenate

(xℓ)i=σ(CONCAT((xℓ−1)i,(Uℓ)i))

The standard AGGREGATE operation is an average over N(i). Letting H=[H0H1]T, we get

(Uℓ)i=1|N(i)|∑j∈N(i)(xℓ−1)j⟹Uℓ=SXℓ−1,S=D−1/2AD−1/2xℓ=σ([xℓ−1Uℓ]H)=σ(xℓ−1H0+SXℓ−1H1)

where A is the binary adjacency matrix, which is equivalent to a GCN with nodewise normalization (xℓ)i||(xℓ)i||2. This normalization helps in some cases (empirically).

notes

  • SAGE implementations allow for a variety of AGGREGATE functions, including max and LSTMs (which look at N(i) as a sequence, losing permutation equivariance). In these cases, SAGE is no longer a graph convolution.

    • There are both advantages and disadvantages of staying a GCN and using other functions.
  • the authors of SAGE popularized the AGGREGATE=UPDATE representation of GNNs (with K=2) meaning

xℓ=σ(SXℓ−1Hℓ)

Sxℓ is the "aggregate" and σ(…Hℓ) is the "update"

Mentions

File
the WL test is at least as powerful as a GNN for detecting graph non-isomorphism
2025-02-17 graphs lecture 8
2025-02-24 graphs lecture 10
2025-04-16 lecture 21
2025-02-25 equivariant lecture 4