Abstract
Graph Neural Networks (GNNs) are susceptible to distribution shifts, creating vulnerability and security issues in critical domains. There is a pressing need to enhance the generalizability of GNNs on out-of-distribution (OOD) test data. Existing methods that target learning an invariant (feature, structure)-label mapping often depend on oversimplified assumptions about the data generation process, which do not adequately reflect the actual dynamics of distribution shifts in graphs. In this paper, we introduce a more realistic graph data generation model using Structural Causal Models (SCMs), allowing us to redefine distribution shifts by pinpointing their origins within the generation process. Building on this, we propose a causal decoupling framework, DeCaf, that independently learns unbiased feature-label and structure-label mappings. We provide a detailed theoretical framework that shows how our approach can effectively mitigate the impact of various distribution shifts. We evaluate DeCaf across both real-world and synthetic datasets that demonstrate different patterns of shifts, confirming its efficacy in enhancing the generalizability of GNNs.
Introduction
Graph Neural Networks (GNNs) have become fundamental in various applications, from recommendation systems to bioinformatics. However, their performance often degrades significantly when faced with Out-of-Distribution (OOD) data—scenarios where the test data distribution differs from the training distribution. Traditional GNNs rely on the assumption that training and testing data are independent and identically distributed (i.i.d.). In practice, graphs are dynamic; for instance, citation networks evolve over time, and social network structures vary across different demographics.
Existing OOD generalization methods typically attempt to find invariant patterns by treating node features ($x$) and neighborhood structures ($a$) as a combined entity. The authors of DeCaf argue that this coupling is problematic because features and structures can shift independently. For example, a user might update their profile information without changing their social connections. Modeling these as a single unit leads to biased predictions when the environment changes.
Methodology: Causal Decoupling
The core innovation of DeCaf is the use of a Structural Causal Model (SCM) to represent the graph data generation process. The framework posits that an unobserved latent variable ($z$), representing a node's "true nature," causes both its features ($x$) and its connections ($a$). Because $x$ and $a$ share a common cause, they act as confounders for each other in the prediction of the label ($y$).
DeCaf addresses this through several key components:
- Causal Decoupling: Instead of a single mapping, DeCaf learns two separate mappings: $\Psi^X(x)$ for feature-to-label and $\Psi^A(a)$ for structure-to-label.
- Generalized Robinson Decomposition (GRD): This allows the model to treat high-dimensional embeddings as "treatments" to estimate the specific causal effect of features versus structure.
- Dual Causal Decomposition: A two-stage training paradigm where the two causal models share underlying representations of common factors, ensuring efficiency.
- Background Counterfactual Selection: To calculate the net effect of observed features and structure, DeCaf uses random samples from the dataset as counterfactuals, effectively simulating the absence of specific structural or feature-based influences.
Experimental Evaluation
The researchers evaluated DeCaf against several state-of-the-art OOD methods, including IRM, EERM, and StableGL, across a variety of datasets including real-world covariate shifts (Cora, Citeseer), heterophilous graphs (Squirrel), and temporal shifts (OGB-elliptic).
Key Results
DeCaf consistently outperformed baseline models across all tested scenarios. On homophilous graphs like Cora, DeCaf showed an average improvement of 4.2% over standard Empirical Risk Minimization (ERM). Notably, on the OGB-elliptic (Bitcoin) dataset, where many OOD methods failed to beat basic baselines due to incorrect assumptions about distribution shifts, DeCaf maintained superior and stable performance.
In synthetic tests specifically designed to evaluate confounding (the h-feat test), DeCaf significantly outperformed architectural separation models like H2GCN, proving that its causal approach is more robust at handling complex dependencies between features and topology.
Conclusion
DeCaf introduces a novel perspective on GNN generalization by treating node features and neighborhood structures as independent causal treatments. By decoupling these elements, the framework identifies invariant relationships that hold true across distribution shifts. While currently focused on homogeneous graphs, future work aims to extend this causal decoupling to heterogeneous graphs, potentially enhancing robustness in multi-relational domains like healthcare and cybersecurity.
Summary updated