Size Generalizability of Graph Neural Networks on Biological Data: Insights and Practices from the Spectral Perspective

by   Yujun Yan, et al.

We investigate the question of whether the knowledge learned by graph neural networks (GNNs) from small graphs is generalizable to large graphs in the same domain. Prior works suggest that the distribution shift, particularly in the degree distribution, between graphs of different sizes can lead to performance degradation in the graph classification task. However, this may not be the case for biological datasets where the degrees are bounded and the distribution shift of degrees is small. Even with little degree distribution shift, our observations show that GNNs' performance on larger graphs from the same datasets still degrades, suggesting other causes. In fact, there has been a lack of exploration in real datasets to understand the types and properties of distribution shifts caused by various graph sizes. Furthermore, previous analyses of size generalizability mostly focus on the spatial domain. To fill these gaps, we take the spectral perspective and study the size generalizability of GNNs on biological data. We identify a distribution shift between small and large graphs in the eigenvalues of the normalized Laplacian/adjacency matrix, indicating a difference in the global node connectivity, which is found to be correlated with the node closeness centrality. We further find that despite of the variations in global connectivity, graphs of different sizes share similar local connectivity, which can be utilized to improve the size generalizability of GNNs. Based on our spectral insights and empirical observations, we propose a model-agnostic strategy, SIA, which uses size-irrelevant local structural features, i.e., the local closeness centrality of a node, to guide the learning process. Our empirical results demonstrate that our strategy improves the graph classification performance of various GNNs on small and large graphs when training with only small graphs.


page 6

page 8

page 14

page 15


Explaining and Adapting Graph Conditional Shift

Graph Neural Networks (GNNs) have shown remarkable performance on graph-...

On Size Generalization in Graph Neural Networks

Graph neural networks (GNNs) can process graphs of different sizes but t...

Stable Prediction on Graphs with Agnostic Distribution Shift

Graph is a flexible and effective tool to represent complex structures i...

Demystifying Structural Disparity in Graph Neural Networks: Can One Size Fit All?

Recent studies on Graph Neural Networks(GNNs) provide both empirical and...

SizeShiftReg: a Regularization Method for Improving Size-Generalization in Graph Neural Networks

In the past few years, graph neural networks (GNNs) have become the de f...

Generalizability Analysis of Graph-based Trajectory Predictor with Vectorized Representation

Trajectory prediction is one of the essential tasks for autonomous vehic...

Node-oriented Spectral Filtering for Graph Neural Networks

Graph neural networks (GNNs) have shown remarkable performance on homoph...

Please sign up or login with your details

Forgot password? Click here to reset