Abstract
Graph Neural Networks (GNNs) are the standard for node classification in graph-structured data. However, they typically assume a stationary distribution where $\Pr_\text{train}(X,Y) = \Pr_\text{test}(X,Y)$. In practice, data shifts—such as new classes appearing or class balances changing—degrade performance. While domain adaptation methods exist, they often focus solely on feature alignment and neglect conditional shifts. We propose Shift-Robust Node Classification (SRNC), which leverages graph homophily to adapt to unlabeled target data. By combining an unsupervised clustering GNN with a supervised classifier through adversarial training and an Expectation-Maximization (EM) framework, SRNC achieves superior generalization on test graphs with data shift.
1. Introduction: The Challenge of Distribution Shift
Standard Graph Neural Networks (GNNs) operate under the assumption that the data distribution remains constant between training and deployment. In real-world applications, graphs are rarely static, leading to two major challenges:
- Open-set shift: The emergence of entirely new, unseen classes in the test graph (e.g., a new variant of a virus in a contact-tracing network).
- Close-set shift: Changes in the distribution of existing classes over time (e.g., shifting research trends in citation networks).
Existing domain adaptation techniques primarily focus on aligning feature distributions ($X$) but often fail to account for conditional shift, where the relationship between features and labels ($P(Y|X)$) changes. SRNC addresses this by explicitly modeling the class structure on the target graph using inherent graph properties.
2. Methodology: Shift-Robust Node Classification (SRNC)
The core of SRNC is a dual-GNN architecture that utilizes graph homophily—the tendency of connected nodes to share similar properties—as a stable signal across different data distributions.
2.1 Dual-GNN Architecture
The framework consists of two interacting modules:
- The Clustering GNN ($Q_\Phi$): This unsupervised module groups nodes on the target graph into clusters. It optimizes a modularity objective to ensure that nodes within a cluster are densely connected, effectively discovering latent class structures without labels.
- The Classification GNN ($P_\theta$): This is the primary predictive model. It is trained on labeled source data and "adversarial samples" (pseudo-labels) generated by the Clustering GNN from the target graph.
2.2 Adversarial Training and Optimization
The two GNNs are optimized iteratively via an Expectation-Maximization (EM) framework. The clustering GNN is regularized to ensure its clusters on the source data align with known ground-truth labels. Simultaneously, the classifier learns to be robust by training on the clusters identified in the target data. This adversarial cooperation allows the model to adapt to shifts that feature-alignment methods might miss.
3. Experimental Evaluation
The authors evaluated SRNC on several standard benchmarks, modified to simulate real-world shifts:
- Citation Networks (Cora, Citeseer, PubMed): Used for open-set shift experiments by masking specific classes during training and treating them as "unknown" during testing.
- OGB-Arxiv: A large-scale citation dataset used for close-set shift. The data was split by year, training on papers published before 2011 and testing on subsequent intervals up to 2020.
- DBLP: A computer science bibliography graph used for a case study in discovering previously unseen research categories.
4. Key Results and Insights
- Superiority in Open-Set Detection: On Cora, Citeseer, and PubMed, SRNC outperformed the previous state-of-the-art (PGL) by at least 3% in Micro-F1 accuracy. It demonstrated a significantly higher capability for identifying "unknown" classes.
- Robustness to Temporal Evolution: On the
ogb-arxivdataset, traditional domain adaptation methods (like DANN) often underperformed compared to standard GNNs. SRNC, however, provided a >2% absolute improvement, successfully mitigating the negative effects of time-evolving data. - Discovery of Latent Classes: In the DBLP case study, the model successfully identified clusters corresponding to real-world research areas like "Networks" that were entirely absent from the training labels.
- Structure as a Stabilizer: A key insight is that while node features may change drastically across domains, graph structure (connectivity) remains a more stable signal. By focusing on homophily, SRNC can find latent classes even when features are misleading.
5. Conclusion and Future Work
SRNC offers a unified framework for handling both open-set and close-set shifts by adjusting the cluster count in the GNN. While the method relies on the assumption of graph homophily and requires careful tuning of the number of clusters ($|C|$), it represents a significant advancement in building robust GNNs for unstable environments. Future work may involve extending this approach to heterophilous graphs and high-stakes domains like medical diagnosis.
Summary updated