[Paper Review] SizeShiftReg: a Regularization Method for Improving Size-Generalization in Graph Neural Networks
This paper proposes SizeShiftReg, a regularization method that improves graph neural network (GNN) generalization from smaller to larger graphs by simulating size shifts via graph coarsening and enforcing distributional similarity between original and coarsened graph embeddings using central moment discrepancy (CMD). When applied to standard GNNs like GCN and PNA, it boosts performance by up to 30% on test sets with graphs 3–9 times larger than training graphs.
In the past few years, graph neural networks (GNNs) have become the de facto model of choice for graph classification. While, from the theoretical viewpoint, most GNNs can operate on graphs of any size, it is empirically observed that their classification performance degrades when they are applied on graphs with sizes that differ from those in the training data. Previous works have tried to tackle this issue in graph classification by providing the model with inductive biases derived from assumptions on the generative process of the graphs, or by requiring access to graphs from the test domain. The first strategy is tied to the quality of the assumptions made for the generative process, and requires the use of specific models designed after the explicit definition of the generative process of the data, leaving open the question of how to improve the performance of generic GNN models in general settings. On the other hand, the second strategy can be applied to any GNN, but requires access to information that is not always easy to obtain. In this work we consider the scenario in which we only have access to the training data, and we propose a regularization strategy that can be applied to any GNN to improve its generalization capabilities from smaller to larger graphs without requiring access to the test data. Our regularization is based on the idea of simulating a shift in the size of the training graphs using coarsening techniques, and enforcing the model to be robust to such a shift. Experimental results on standard datasets show that popular GNN models, trained on the 50% smallest graphs in the dataset and tested on the 10% largest graphs, obtain performance improvements of up to 30% when trained with our regularization strategy.
Motivation & Objective
- Address the critical challenge of poor size-generalization in GNNs, where models underperform on graphs larger than those in training data.
- Overcome limitations of prior methods that rely on domain-specific inductive biases or require access to test-distribution graphs.
- Develop a general-purpose regularization strategy applicable to any GNN model without modifying architecture or requiring test-time data.
- Improve robustness to size shifts in graph classification tasks, especially in scenarios where labeling large graphs is expensive or infeasible.
Proposed method
- Simulate size shifts in training graphs by applying graph coarsening techniques to generate coarsened versions of each training graph.
- Train the GNN model to produce node embeddings that are distributionally similar between original graphs and their coarsened counterparts.
- Use central moment discrepancy (CMD) as the discrepancy measure to minimize distributional differences between original and coarsened graph embeddings.
- Integrate CMD-based regularization into the standard GNN training objective, enabling end-to-end optimization without architectural changes.
- Apply the regularization during training on the 50% smallest graphs, while evaluating on the 10% largest graphs to test size-generalization.
- Leverage coarsening functions that preserve structural and feature information to maintain representational fidelity across size transformations.
Experimental results
Research questions
- RQ1Can a general-purpose regularization method improve GNNs’ ability to generalize from smaller to larger graphs without requiring assumptions about the data-generative process?
- RQ2How effective is coarsening-based data augmentation combined with CMD regularization in enhancing size-generalization in graph classification?
- RQ3Does the proposed method outperform existing approaches that rely on domain adaptation or inductive biases when only training data is available?
- RQ4To what extent can standard GNNs like GCN and PNA improve their performance on large graphs when trained with SizeShiftReg?
- RQ5Is the regularization robust across diverse graph datasets with varying sizes and structural properties?
Key findings
- SizeShiftReg improves GNN performance on graphs 3 to 9 times larger than the training graphs by up to 30% compared to standard training.
- The method achieves significant gains on benchmark datasets such as OGB-Mol, OGB-Products, and PROTEINS, even when training on only the 50% smallest graphs.
- The regularization is effective across multiple GNN architectures, including GCN, PNA, and GIN, demonstrating its generalizability.
- CMD-based discrepancy minimization outperforms other discrepancy measures like MMD in promoting robustness to size shifts.
- The method does not require access to test-distribution graphs or domain labels, making it practical for real-world scenarios with limited data.
- Empirical results show that SizeShiftReg effectively mitigates performance degradation on out-of-distribution graph sizes, even when the test graphs are substantially larger than training graphs.
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.