Inductive Representation Learning on Large Graphs

William L. Hamilton, Rex Ying, Jure Leskovec

2017 · NeurIPS

hamiltonGraphSAGE2017

Problem

Framing

Most node-embedding methods were transductive: they optimized one vector per node and could not infer embeddings for unseen nodes or new graphs. GraphSAGE closes this gap by learning neighborhood aggregation functions over node features, then applying them inductively at test time. On unseen-node classification, it reports up to 0.954 micro-F1 on Reddit.

Currently Used Methods

Foundational

Proposed Method

Architecture

GraphSAGE learns KK hop-specific aggregators. At layer kk, node vv samples neighbors, aggregates their previous-layer states, concatenates that summary with its own state, then applies a shared linear map and nonlinearity. The paper studies mean, GCN-style, LSTM, and max-pooling aggregators.

GraphSAGE pipeline: sample a k-hop neighborhood, aggregate neighbor features with hop-specific aggregators, then predict context and labels from the resulting node embedding.

Loss / Objective

The unsupervised objective pulls random-walk neighbors together and pushes sampled negatives apart.

JG(zu)=log(σ(zuzv))QEvnPn(v)log(σ(zuzvn))J_G(\mathbf{z}_u) = -\log\left(\sigma\left(\mathbf{z}_u^\top \mathbf{z}_v\right)\right) - Q\,\mathbb{E}_{v_n \sim P_n(v)} \log\left(\sigma\left(-\mathbf{z}_u^\top \mathbf{z}_{v_n}\right)\right)

Algorithm

Forward propagation alternates neighbor aggregation and node-state updates, then L2L_2-normalizes the result.

hN(v)kAGGREGATEk({huk1,  uN(v)})\mathbf{h}_{\mathcal{N}(v)}^k \leftarrow \mathrm{AGGREGATE}_k\left(\left\{ \mathbf{h}_u^{k-1},\; \forall u \in \mathcal{N}(v) \right\}\right) hvkσ(WkCONCAT(hvk1,hN(v)k)),zvhvKhvK2\mathbf{h}_v^k \leftarrow \sigma\left(\mathbf{W}^k \cdot \mathrm{CONCAT}\left(\mathbf{h}_v^{k-1}, \mathbf{h}_{\mathcal{N}(v)}^k\right)\right), \qquad \mathbf{z}_v \leftarrow \frac{\mathbf{h}_v^K}{\|\mathbf{h}_v^K\|_2}

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Ablations

Results figure

DeepWalk has similar training cost but far slower inductive inference because unseen nodes require new random walks and SGD.

Runtime bar chart on Reddit: GraphSAGE variants have similar per-batch training times, while DeepWalk has dramatically higher full-test inference time than GS-GCN, GS-mean, GS-pool, and GS-LSTM.

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers