[Paper Review] Size-Invariant Graph Representations for Graph Classification Extrapolations
This paper proposes a causal model and a size-invariant graph representation method that enables graph neural networks to generalize to out-of-distribution (OOD) test data with different graph sizes and vertex attribute distributions. By leveraging the independence between cause and mechanism (ICM) and using homomorphism densities from subgraphs, the method learns invariant representations that extrapolate effectively even when training and test graphs differ significantly in size, outperforming IRM and GNN extrapolation baselines on real-world and synthetic datasets.
In general, graph representation learning methods assume that the train and test data come from the same distribution. In this work we consider an underexplored area of an otherwise rapidly developing field of graph representation learning: The task of out-of-distribution (OOD) graph classification, where train and test data have different distributions, with test data unavailable during training. Our work shows it is possible to use a causal model to learn approximately invariant representations that better extrapolate between train and test data. Finally, we conclude with synthetic and real-world dataset experiments showcasing the benefits of representations that are invariant to train/test distribution shifts.
Motivation & Objective
- To address the challenge of out-of-distribution (OOD) graph classification where training and test graphs differ in size and vertex attribute distributions.
- To develop a graph representation method that generalizes robustly to unseen test distributions without access to test data during training.
- To formalize a structural causal model (SCM) that captures distribution shifts in graph size and attributes, enabling invariant representation learning.
- To demonstrate that invariant representations based on homomorphism densities can generalize better than existing methods like IRM and GNN-based extrapolation techniques.
Proposed method
- Formalizes a structural causal model (SCM) using twin network DAGs to represent how test distributions can shift from training distributions in terms of graph size and vertex attributes.
- Applies the independence between cause and mechanism (ICM) assumption, ensuring that the conditional label distribution P(Y|G) remains invariant across training and test distributions.
- Uses homomorphism densities of small subgraphs (k=4) as invariant representations, computed via the Lovász-Szegedy framework, to capture structural invariance across graphs of different sizes.
- Employs a GNN-based architecture with 3 layers and an MLP classifier, using subgraph representations to learn size-invariant features that generalize to OOD test data.
- Tunes hyperparameters including learning rate, batch size, and network width, and uses early stopping based on validation performance to prevent overfitting.
- For comparison, evaluates standard GNNs, IRM, and graph kernels (e.g., Weisfeiler-Lehman) under the same OOD split protocol.
Experimental results
Research questions
- RQ1Can graph representations be made invariant to distribution shifts in graph size and vertex attributes without access to test data?
- RQ2Does a causal model that captures shifts in graph size and attribute distributions enable better OOD generalization in graph classification?
- RQ3Can homomorphism densities of small subgraphs serve as effective, size-invariant representations for OOD graph classification?
- RQ4How does the proposed method compare to IRM and GNN-based extrapolation methods in terms of OOD generalization performance?
Key findings
- The proposed method achieves state-of-the-art OOD generalization performance on NCI1, NCI109, PROTEINS, and DD datasets under OOD test splits.
- On the NCI1 dataset, the method achieves a test accuracy of 59.56% on the largest 10% of graphs, outperforming IRM and GNN baselines.
- On the DD dataset, the method achieves 58.65% accuracy on the largest 10% of graphs, significantly outperforming IRM and GNN-based approaches.
- The method generalizes effectively even when test graphs are much larger than training graphs, demonstrating strong extrapolation capability.
- Graph kernels and standard GNNs perform poorly on OOD test sets, especially on large graphs, highlighting the limitations of distributional generalization without invariance.
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.