From Local Structures to Size Generalization in Graph Neural Networks
Gilad Yehudai, Ethan Fetaya, Eli A. Meirom, Gal Chechik, Haggai Maron
Abstract
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 nongeneralizing 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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 682267f5-adfa-4156-af9f-7110625c7ea8Cited by top-tier papers73
- The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das et al.NeurIPS 2023 · 444 citations
- Exploring Length Generalization in Large Language ModelsCem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz et al.NeurIPS 2022 · 267 citations
- Handling Distribution Shifts on Graphs: An Invariance PerspectiveQitian Wu, Hengrui Zhang, Junchi Yan, David WipfICLR 2022 · 261 citations
- Learning Causally Invariant Representations for Out-of-Distribution Generalization on GraphsYongqiang Chen, Yonggang Zhang, Yatao Bian, Han Yang et al.NeurIPS 2022 · 246 citations
- Learning Invariant Graph Representations for Out-of-Distribution GeneralizationHaoyang Li, Ziwei Zhang, Xin Wang, Wenwu ZhuNeurIPS 2022 · 170 citations
Builds on10
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Strategies for Pre-training Graph Neural NetworksWeihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik et al.ICLR 2020 · 1,744 citations
- Learning to Simulate Complex Physics with Graph NetworksAlvaro Sanchez-Gonzalez, Jonathan Godwin, Tobias Pfaff, Rex Ying et al.ICML 2020 · 1,439 citations
- Principal Neighbourhood Aggregation for Graph NetsGabriele Corso, Luca Cavalleri, Dominique Beaini, Pietro Liò et al.NeurIPS 2020 · 914 citations
- GCC: Graph Contrastive Coding for Graph Neural Network Pre-TrainingJiezhong Qiu, Qibin Chen, Yuxiao Dong, Jing Zhang et al.KDD 2020 · 755 citations
Related papers
- GAUSS: GrAph-customized Universal Self-Supervised LearningLiang Yang, Weixiao Hu, Jizhong Xu, Runjie Shi et al.WWW 2024 · 5 citations
- Tackling Size Generalization of Graph Neural Networks on Biological Data from a Spectral PerspectiveGaotang Li, Danai Koutra, Yujun YanKDD 2025
- Robust Self-Supervised Structural Graph Neural Network for Social Network PredictionYanfu Zhang, Hongchang Gao, Jian Pei, Heng HuangWWW 2022 · 48 citations
- On Size-Oriented Long-Tailed Graph Classification of Graph Neural NetworksZemin Liu, Qiheng Mao, Chenghao Liu, Yuan Fang et al.WWW 2022 · 27 citations
- Disentangled Graph Self-supervised Learning for Out-of-Distribution GeneralizationHaoyang Li, Xin Wang, Zeyang Zhang, Haibo Chen et al.ICML 2024 · 13 citations
