Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Inductive Representation Learning on Large Graphs

  • Problem Most node embedding methods learn one vector per node of a fixed graph, so nodes that arrive later need extra optimization before they can be embedded.
  • Method GraphSAGE learns aggregation functions that combine the features of sampled neighbors across depths, and trains them with a graph-based unsupervised loss or a supervised loss.
  • Results Unsupervised GraphSAGE-pool reached a micro-averaged F1 of 0.798 on the citation data, against 0.701 for DeepWalk plus features.

Why fixed-graph node embeddings struggle with new nodes

Node embeddings compress a node's graph neighborhood into a dense vector that downstream classifiers and link predictors can consume. Most of these methods optimize a separate vector for every node using matrix-factorization-style objectives on a single graph, so a node that appears later has no vector until the model is updated. Adapting these methods to unseen nodes is possible, but each new node then requires further optimization steps before it can be scored, which makes the adaptation expensive.

Several of these objectives do not change under orthogonal transformations of the embeddings, so embedding spaces learned from different graphs or training runs need not line up.

Graph convolutional networks offered a different route, but they had only been used in the transductive setting on fixed graphs, which leaves inductive unsupervised learning open. Generalizing to a new node means placing its newly observed subgraph relative to embeddings that were already optimized, so the model has to recognize neighborhood structure rather than rely on node identity.

Learning aggregators instead of node vectors

GraphSAGE drops the per-node lookup table. It learns a small set of aggregation functions, and each one combines the features of a node's neighbors, so information from farther away enters the node's representation as the depth grows. Figure 1 illustrates the sample and aggregate pattern that this produces. Node features are the base input, and structural features such as node degree can also be used, so the same method applies to graphs that come without node features.

Because the learned functions are shared across nodes, a new node is embedded by running them over its own neighborhood, with no training on that node. Training is driven either by an unsupervised graph-based loss or by a supervised task loss, so the same architecture covers both settings.

The forward pass in Algorithm 1

At depth k, each node combines the depth k minus one representations of its neighbors into one vector with the aggregator, \[ h_{\mathcal{N}(v)}^k \leftarrow \text{AGGREGATE}_k\big(\{h_u^{k-1}, \forall u \in \mathcal{N}(v)\}\big) \] The node's own depth k minus one representation is concatenated with that aggregate, multiplied by the weight matrix \(W^k\), and passed through the nonlinearity \(\sigma\), so that \(h_v^k \leftarrow \sigma(W^k \cdot \mathrm{CONCAT}(h_v^{k-1}, h_{\mathcal{N}(v)}^k))\).

Each depth's output is then divided by its L2 norm, \(h_v^k \leftarrow h_v^k / \|h_v^k\|_2\), so every representation passed to the next depth has unit length.

After K depths, the output for each node is \(z_v \equiv h_v^K\), and the aggregator is the only part that changes between architectures. The computation is defined node by node and assumes fixed parameters, which is why the same steps can be run on nodes that lie outside the training graph once training is finished.

Fixed-size neighborhood sampling

Using all neighbors would make the memory and runtime of a batch depend on node degree, which in the worst case scales with the size of the whole graph. GraphSAGE instead draws a uniform, fixed-size set of neighbors for each node at every depth and every iteration, so that the cost of a batch stays bounded.

The per-batch space and time complexity is fixed at a product over the depths of the sample sizes \(S_i\), which the authors found enough for high performance with K = 2 and \(S_1 \cdot S_2 \leq 500\). The experiments use K = 2 with \(S_1 = 25\) and \(S_2 = 10\).

Unsupervised and supervised training

The unsupervised objective asks nearby nodes to have similar representations and disparate nodes to have dissimilar ones. Nearby means that two nodes co-occur on a fixed-length random walk. The loss is \[ J_G(z_u) = -\log\big(\sigma(z_u^\top z_v)\big) - Q \cdot \mathbb{E}_{v_n \sim P_n(v)} \log\big(\sigma(-z_u^\top z_{v_n})\big) \] where \(v\) co-occurs with \(u\), \(\sigma\) is the sigmoid, \(P_n\) is the negative sampling distribution and \(Q\) is the number of negative samples.

The first term rewards a high sigmoid score for a co-occurring pair, and the second term lowers the score for \(Q\) negative samples drawn from \(P_n\), so minimizing the loss pulls co-occurring pairs together and pushes random pairs apart. The vectors \(z_u\) come from the neighborhood aggregation rather than from an embedding lookup, which is the change from earlier embedding objectives.

For a specific downstream task, the unsupervised loss can be replaced or augmented by a task-specific objective such as cross-entropy, and the supervised variants are trained that way. The parameters are updated by stochastic gradient descent with backpropagation, using Adam in the experiments.

Three aggregator designs for an unordered neighbor set

A node's neighbors have no natural ordering, so an aggregator should be symmetric, or at least behave as if it were, to handle arbitrarily ordered neighbor sets. The mean aggregator takes the element-wise mean of the neighbor vectors, which is symmetric by construction. Its convolutional variant averages the node's own vector together with its neighbors and applies the weight matrix, \[ h_v^k \leftarrow \sigma\big(W \cdot \mathrm{MEAN}(\{h_v^{k-1}\} \cup \{h_u^{k-1}, \forall u \in \mathcal{N}(v)\})\big) \] and it does not concatenate the node's own vector in the way the other variants do.

The authors read the concatenation as a skip connection between depths and report significant performance gains from it. The LSTM aggregator has larger expressive capacity than the mean, but an LSTM is not permutation invariant. The authors therefore apply it to a random permutation of each node's neighbors. The pooling aggregator passes each neighbor through a fully connected layer and then takes an element-wise max, \[ \mathrm{AGGREGATE}^{\mathrm{pool}}_k = \max\big(\{\sigma(W_{\mathrm{pool}} h_{u_i}^k + b), \forall u_i \in \mathcal{N}(v)\}\big) \] where the experiments use single-layer transformations.

Mean and max pooling produced no significant difference in development tests, so the experiments focus on max-pooling.

Link to the Weisfeiler-Lehman test

If Algorithm 1 uses K equal to the number of nodes, identity weight matrices and a hash function with no nonlinearity as its aggregator, it becomes the Weisfeiler-Lehman test, also called naive vertex refinement. GraphSAGE can be read as a continuous approximation of that test, with trainable neural aggregators in place of the hash function.

The authors use the link as theoretical context for the design, not as a method for testing graph isomorphism, and they note that the Weisfeiler-Lehman test fails in some cases.

Datasets, baselines and training conditions

The citation data is an undirected graph from the Web of Science Core Collection covering six biology-related fields for 2000 to 2005. It has 302,424 nodes with an average degree of 9.15. Training uses the 2000-2004 data, testing uses the 2005 data, and 30% of the data is used for validation. Features are node degrees together with abstract embeddings computed with Arora et al.'s sentence embedding approach over 300-dimensional word vectors.

It has 232,965 posts with an average degree of 492. Training uses the first 20 days and testing uses the remaining days, with 30% of the data used for validation. Post features are 300-dimensional GloVe CommonCrawl vectors of the title and comments, together with the post score and the comment count.

The PPI collection has one graph per human tissue, with 121 gene ontology label sets and an average of 2373 nodes per graph. Training uses 20 graphs, testing uses two graphs that were unseen during training, and two other graphs are used for validation. Baselines are a random classifier, logistic regression on raw features, DeepWalk, and DeepWalk concatenated with the raw features.

The four GraphSAGE variants are GraphSAGE-GCN, GraphSAGE-mean, GraphSAGE-LSTM and GraphSAGE-pool, each trained unsupervised and supervised. For the citation and Reddit data, DeepWalk embeds test nodes through online training with new SGD rounds, while in the multi-graph setting DeepWalk is not applied because embedding spaces from disjoint graphs can be rotated arbitrarily relative to each other.

All GraphSAGE variants share one hyperparameter sweep, with the best setting for each chosen on a validation set, and the sweep ranges were set in early tests on subsets of the citation and Reddit data that were later discarded.

Citation and Reddit results

On the citation data, unsupervised GraphSAGE-pool reached 0.798 micro-averaged F1, compared with 0.701 for DeepWalk plus features and 0.575 for raw features. The table lists gains over the features baseline of 39% for unsupervised and 46% for supervised GraphSAGE on the citation data. The full table of micro-averaged F1 scores for every method on the three datasets is given as Table 1.

On Reddit, unsupervised GraphSAGE-LSTM reached 0.907, compared with 0.691 for DeepWalk plus features, 0.585 for raw features and 0.324 for DeepWalk alone. Unsupervised GraphSAGE-pool outperforms DeepWalk plus features by 13.8% on the citation data and by 29.1% on Reddit, while the supervised version gains 19.7% and 37.2% respectively.

The authors note that unsupervised GraphSAGE stays reasonably close to its supervised version, which they read as the framework reaching strong performance without task-specific fine-tuning. The LSTM aggregator performs well even though it is designed for sequential data rather than unordered sets.

Generalizing to unseen PPI graphs

Supervised GraphSAGE-LSTM reached 0.612 micro-averaged F1 on the PPI test graphs, compared with 0.422 for raw features. Supervised GraphSAGE-pool reached 0.600 and GraphSAGE-mean 0.598, while the GCN-based variant reached 0.500. The table gives gains over features of 19% unsupervised and 45% supervised on PPI.

The authors report that the LSTM and pooling aggregators provide substantial gains over the mean and GCN-based aggregators on this task. The comparison is against raw features only, because DeepWalk cannot be applied across disjoint PPI graphs.

Runtime and neighborhood size

Training times are comparable across methods, with GraphSAGE-LSTM the slowest, while DeepWalk must sample new random walks and run new SGD rounds for unseen nodes. That makes DeepWalk 100-500 times slower than GraphSAGE at test time.

Setting K = 2 gave a consistent boost of around 10-15% on average over K = 1 for the GraphSAGE variants. Increasing K beyond 2 gave only 0-5% more, while raising runtime by a factor of 10-100, depending on the neighborhood sample size.

Larger neighborhoods give diminishing returns, so sub-sampling keeps the runtime low at a modest accuracy cost.

Which aggregator performs best across settings

The six settings are the three datasets crossed with unsupervised and supervised training, and each is treated as one trial in a Wilcoxon signed-rank test. The LSTM, pool and mean aggregators each give a statistically significant gain over the GCN-based aggregator, with T = 1.0 and p = 0.02 for all three.

The gains of the LSTM and pool aggregators over the mean aggregator are smaller: LSTM against mean gives T = 1.5 and p = 0.03, and pool against mean gives T = 4.5 and p = 0.10. LSTM and pool do not differ significantly, with T = 10.0 and p = 0.46. GraphSAGE-LSTM is roughly 2 times slower than GraphSAGE-pool, which the authors take as a slight overall edge for the pooling aggregator.

Can feature-based GraphSAGE capture clustering coefficients?

The clustering coefficient of a node measures how many of the node's neighbor pairs are linked, that is, the share of triangles closed within its one-hop neighborhood. The authors ask whether GraphSAGE, which sees only features, can learn this quantity.

Theorem 1 takes features \(x_v\) in a compact subset \(U\) of \(\mathbb{R}^d\), with \(\|x_v - x_{v'}\|_2 > C\) for all pairs of nodes and a fixed positive constant \(C\). Under these conditions, for any \(\epsilon > 0\) there is a parameter setting \(\Theta^*\) such that after K = 4 iterations \(|z_v - c_v| < \epsilon\) for all \(v \in V\), where \(c_v\) is the clustering coefficient.

The statement is an existence result for each graph, so it does not say that gradient-based training reaches that parameter setting. The proof relies on properties of the pooling aggregator. Distinct features let each node map to an indicator vector, which identifies its neighborhood. As a corollary, GraphSAGE can learn local graph structure when node features are sampled from an absolutely continuous random distribution.

Limitations

The aggregator comparison uses six trials, and the authors state that this makes the Wilcoxon test underpowered, so its T-statistics and p-values serve as relative indicators. Sub-sampling neighborhoods induces higher variance, and the authors report that performance remains strong despite it.

The sampler draws neighbors uniformly, and non-uniform samplers are left as future work. The theorem covers only clustering coefficients and only node features that are pairwise separated and drawn from a compact set. The PPI comparison has no DeepWalk entry, so its gains are measured against raw features only.

Paper info

Authors
William L. Hamilton, Rex Ying, Jure Leskovec
Venue
arXiv · Preprint
First published
2017-6-7
Added
2026-10-20
Updated
2018-9-10
Version
v4
arXiv
1706.02216
Category
cs.SI · cs.LG · stat.ML
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

William L. Hamilton, Rex Ying, Jure Leskovec (2017). Inductive Representation Learning on Large Graphs. arXiv:1706.02216v4. https://arxiv.org/abs/1706.02216v4

BibTeX
@misc{hamilton2017inductive,
  title = {{Inductive Representation Learning on Large Graphs}},
  author = {William L. Hamilton and Rex Ying and Jure Leskovec},
  year = {2017},
  eprint = {1706.02216},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.02216v4}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up