Abstract
Graph Neural Networks (GNNs) typically rely on the assumption that training data is sampled uniformly at random. However, real-world graph labeling is often highly localized and biased, leading to significant performance degradation. We present Shift-Robust GNN (SR-GNN), a framework designed to mitigate distributional shifts between biased training nodes and the true graph distribution. By combining hidden-representation regularization and instance reweighting, SR-GNN recovers a substantial portion of the accuracy lost to biased training data across various benchmarks.
Introduction
Semi-supervised learning on graphs involves predicting labels for an entire network based on a small set of labeled nodes. Standard machine learning theory assumes these labeled nodes are an independent and identically distributed (IID) sample. In practice, gathering labels is expensive and inherently biased; for instance, analysts might focus on a specific cluster of malicious accounts, or automated heuristics might only tag nodes with specific structural traits. When a GNN is trained on such localized data, it overfits to the spurious regularities of that specific neighborhood, failing to generalize to the broader graph.
The Representation Shift Problem
GNNs explicitly mix features with neighboring nodes, a property known as graph inductive bias. When training data is biased, this mixing causes a compounding "representation shift" within the network's hidden layers. Unlike standard machine learning where bias primarily affects input features, GNNs amplify this shift at every layer as feature information propagates through the graph structure.
As shown in the experimental analysis, there is a clear negative correlation between the Central Moment Discrepancy (CMD)—a measure of statistical distance between distributions—and the model's F1 score. As the GNN grows deeper, this distribution shift increases because biased neighborhood information compounds with each message-passing step.
The SR-GNN Framework
To address these challenges, the SR-GNN framework adapts to distributional shifts across two distinct GNN architectures:
- Traditional/Deep GNNs (e.g., GCN, GAT): In these models, graph structure and feature transformations are entangled. SR-GNN introduces a regularization term based on CMD to the loss function, minimizing the statistical distance between the hidden representations of biased training nodes and an unbiased sample of unlabeled nodes.
- Linearized/Shallow GNNs (e.g., APPNP, SGC): These models decouple non-linear feature encoding from linear graph message passing. Since the bias is applied after the learnable layers, SR-GNN employs instance reweighting via Kernel Mean Matching (KMM). This technique assigns weights to training examples so their features statistically align with the broader graph.
Experimental Results
The authors evaluated SR-GNN on five benchmarks, including citation networks (Cora, Citeseer, PubMed) and large-scale graphs (ogb-arxiv, Reddit). To simulate realistic bias, they introduced a Personalized PageRank-based sampler (PPR-S).
Key findings include:
- Bias Impact: Standard GNNs suffer massive performance drops under localized training. For example, a standard GCN experiences up to a 19% absolute drop in Macro-F1 on the PubMed dataset.
- Performance Recovery: SR-GNN consistently mitigates these effects, recovering at least 40% of the performance lost to biased data on Cora, Citeseer, and PubMed.
- Scalability: On the large-scale
ogb-arxivdataset, SR-GNN achieved relative improvements of 2.6% to 4.4%, mitigating approximately 30% of the bias-induced performance loss. - Ablation Success: Results indicate that combining instance reweighting and CMD regularization outperforms using either technique in isolation.
Conclusion
SR-GNN provides a flexible and scalable framework for training GNNs on biased, localized data. By addressing both learnable parameters and non-differentiable graph diffusion, the method significantly improves generalization in real-world scenarios where IID assumptions do not hold. Future research may focus on applying these techniques to highly skewed domains like fraud detection and exploring the intersection of shift-robustness and algorithmic fairness.
Summary updated