[Paper Review] From Local Structures to Size Generalization in Graph Neural Networks
This paper identifies that graph neural networks (GNNs) struggle to generalize from small to large graphs when local structures—measured via d-patterns—differ between training and test distributions. It proposes a novel self-supervised learning task to learn meaningful local structure representations, improving classification accuracy by 4% on average across real datasets, especially in social and biological networks with high structural discrepancy.
Graph neural networks (GNNs) can process graphs of different sizes, but their ability to generalize across sizes, specifically from small to large graphs, is still not well understood. In this paper, we identify an important type of data where generalization from small to large graphs is challenging: graph distributions for which the local structure depends on the graph size. This effect occurs in multiple important graph learning domains, including social and biological networks. We first prove that when there is a difference between the local structures, GNNs are not guaranteed to generalize across sizes: there are "bad" global minima that do well on small graphs but fail on large graphs. We then study the size-generalization problem empirically and demonstrate that when there is a discrepancy in local structure, GNNs tend to converge to non-generalizing solutions. Finally, we suggest two approaches for improving size generalization, motivated by our findings. Notably, we propose a novel Self-Supervised Learning (SSL) task aimed at learning meaningful representations of local structures that appear in large graphs. Our SSL task improves classification accuracy on several popular datasets.
Motivation & Objective
- To understand when and why GNNs fail to generalize from small to large graphs.
- To identify graph distributions where local structure depends on graph size, leading to poor generalization.
- To propose a self-supervised learning approach that improves size generalization by learning d-pattern representations.
- To empirically validate the impact of d-pattern discrepancy on GNN generalization across real-world datasets.
Proposed method
- The paper introduces d-patterns as a formalization of local structures within d-hop neighborhoods, generalizing node degrees.
- It proves theoretically that even small d-pattern discrepancies between train and test sets can lead to non-generalizing global minima in GNNs.
- A novel self-supervised pretext task is proposed to learn meaningful representations of d-patterns from large graphs.
- The method trains on labeled small graphs and applies the self-supervised task on large graphs to improve generalization.
- The approach is evaluated on real-world datasets including NCI1, DD, IMDB-Binary, and social networks.
- Total variation distance is used to quantify d-pattern distribution discrepancies between small and large graphs.
Experimental results
Research questions
- RQ1Under what conditions do GNNs fail to generalize from small to large graphs?
- RQ2How does the discrepancy in local structures (d-patterns) between training and test graphs affect GNN generalization?
- RQ3Can a self-supervised learning task that focuses on d-pattern representation improve size generalization in GNNs?
- RQ4To what extent do real-world graph datasets exhibit d-pattern discrepancies between small and large graphs?
- RQ5Does the proposed self-supervised method lead to measurable performance gains on large graphs?
Key findings
- A theoretical analysis shows that GNNs can converge to global minima that generalize poorly when local structures (d-patterns) differ between training and test graphs.
- Empirical results demonstrate a strong negative correlation between d-pattern discrepancy and GNN generalization performance, especially in social and biological networks.
- The total variation distance between d-pattern distributions is high (up to 1.0) in datasets like IMDB-Binary, Deezer, and Twitch, indicating near-zero overlap in local structures.
- The proposed self-supervised learning task improves classification accuracy by 4% on average across real datasets, with larger gains in datasets with high d-pattern discrepancy.
- The method shows particular benefit in social networks like Twitch and Deezer, where d-patterns in small and large graphs are nearly disjoint.
- In contrast, datasets like NCI1 and D& D show low d-pattern discrepancy and minimal improvement from the self-supervised task, confirming the link between discrepancy and performance gain.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.