Authors: Simi Job, Xiaohui Tao, Taotao Cai, Haoran Xie, Jianming Yong, Xin Wang
Organizations: School of Mathematics, Physics, and Computing, University of Southern Queensland, Australia · School of Data Science, Lingnan University, Hong Kong · School of Business, University of Southern Queensland, Australia · Schulich School of Engineering, University of Calgary, Canada
Graph data is becoming increasingly prevalent due to the growing demand for relational insights in AI across various domains. Organizations regularly use graph data to solve complex problems involving relationships and connections. Causal learning is especially important in this context, since it helps to understand cause-effect relationships rather than mere associations. Since many real-world systems are inherently causal, graphs can efficiently model these systems. However, traditional graph machine learning methods including graph neural networks (GNNs), rely on correlations and are sensitive to spurious patterns and distribution changes. On the other hand, causal models enable robust predictions by isolating true causal factors, thus making them more stable under such shifts. Causal learning also helps in identifying and adjusting for confounders, ensuring that predictions reflect true causal relationships and remain accurate even under interventions. To address these challenges and build models that are robust and causally informed, we propose CCAGNN, a Confounder-Aware causal GNN framework that incorporates causal reasoning into graph learning, supporting counterfactual reasoning and providing reliable predictions in real-world settings. Comprehensive experiments on six publicly available datasets from diverse domains show that CCAGNN consistently outperforms leading state-of-the-art models.
Figures & tables
Figure 1. Traditional vs causal GNN in predicting patient recovery; causal GNN isolates medication’s true effect by adjusting for confounders (age, other patient factors); intervention-based causal GNN models treatment changes for robust predictions.
Figure 2. Causal graphs: (a) Z influences both X and Y ; (b) Isolates true effect of X on Y , independent of Z
Figure 3. CCAGNN Architecture: (i) Node features are split into causal and non-causal parts using gated GAT layers for structure-aware encoding; (ii) Hybrid feature masking, attention-guided noise and structural changes simulate interventions, processed through dual GAT pipelines for causal and non-causal features; (iii) A dual-encoder estimates and minimizes mutual information between causal and non-causal features with a confidence-based fusion gate for disentangled representations; (iv) Counterfactual interventions and multi-branch learning with gated fusion allows robust predictions.
Dataset
# Nodes
# Edges
# Classes
Cora
2708
10556
7
Citeseer
3327
9104
6
PubMed
19717
88648
3
Twitch
9498
315774
2
Amazon-Computers
13752
491722
10
Amazon-Photo
7650
238162
8
Table 1. Summary of datasets used in the study.
Category
Model
Twitch
Amazon-c
Amazon-p
Cora
Citeseer
PubMed
Vanilla
GCN ( Kipf and Welling, 2016 )
96.39
97.78
98.85
72.61
44.88
40.00
methods
GAT ( Veličković et al., 2017 )
96.82
97.83
99.07
72.41
45.74
36.80
GraphSAGE ( Hamilton et al., 2017 )
74.36
91.24
96.81
70.81
42.07
39.01
GCN-CAL ( Sui et al., 2022 )
97.14
98.32
99.46
68.80
39.67
76.84
Causal
GAT-CAL ( Sui et al., 2022 )
98.10
98.22
99.34
66.27
39.06
85.42
Table 2. F-Scores (%) for node classification tasks
Figure 4. Mutual Information Loss Plots
Figure 5. Ablation study results showing F-scores for different model configurations across datasets.
Graph data often contain noisy and spurious correlations that mask the true causal relationships, which are essential for enabling graph models to make predictions based on the underlying causal structure of the data. Dependence on spurious connections makes it challenging for traditional Graph Neural Networks (GNNs) to generalize effectively across different graphs. Furthermore, traditional aggregation methods tend to amplify these spurious patterns, limiting model robustness under distribution shifts. To address these issues, we propose Causal Neighbourhood Learning with Graph Neural Networks (CNL-GNN), a novel framework that performs causal interventions on graph structure. CNL-GNN effectively identifies and preserves causally relevant connections and reduces spurious influences through the generation of counterfactual neighbourhoods and adaptive edge perturbation guided by learnable importance masking and an attention-based mechanism. In addition, by combining structural-level interventions with the disentanglement of causal features from confounding factors, the model learns invariant node representations that are robust and generalize well across different graph structures. Our approach improves causal graph learning beyond traditional feature-based methods, resulting in a robust classification model. Extensive experiments on four publicly available datasets, including multiple domain variants of one dataset, demonstrate that CNL-GNN outperforms state-of-the-art GNN models.
Simi Job, Xiaohui Tao, Taotao Cai +2
School of Science, Engineering and Digital Technologies, University of Southern Queensland, Australia. · School of Data Science, Lingnan University, Hong Kong.
Modeling causal relationships in graph representation learning remains a fundamental challenge. Existing approaches often draw on theories and methods from causal inference to identify causal subgraphs or mitigate confounders. However, due to the inherent complexity of graph-structured data, these approaches frequently aggregate diverse graph elements into single causal variables, an operation that risks violating the core assumptions of causal inference. In this work, we prove that such aggregation compromises causal validity. Building on this conclusion, we propose a theoretical model grounded in the smallest indivisible units of graph data to ensure that the causal validity is guaranteed. With this model, we further analyze the costs of achieving precise causal modeling in graph representation learning and identify the conditions under which the problem can be simplified. To empirically support our theory, we construct a controllable synthetic dataset that reflects realworld causal structures and conduct extensive experiments for validation. Finally, we develop a causal modeling enhancement module that can be seamlessly integrated into existing graph learning pipelines, and we demonstrate its effectiveness through comprehensive comparative experiments.
Counterfactual inference asks how an observed outcome might have differed under different circumstances, such as whether a patient would have recovered had they received a different treatment. Such questions arise whenever decisions depend on the outcomes of alternatives that were not observed. Answering counterfactual queries generally requires knowledge of the underlying causal structure, which is often unavailable in practice. A common approach is therefore to first estimate the causal graph from observational data and then perform counterfactual inference. However, errors in the estimated causal graph can propagate to downstream counterfactual predictions. To address this challenge, we introduce the Counterfactual Graph Neural Process (CFGNP), an end-to-end approach that answers counterfactual queries directly from observational data without first estimating a causal graph. CFGNP uses Graph Neural Networks (GNNs) to exploit the dual-graph structure by restricting cross-world message passing to corresponding factual--counterfactual variables. Across synthetic and image-based benchmarks, CFGNP achieves stronger predictive performance than existing approaches, including on the German Loan benchmark, where it reduces MSE from 4.51×10−2 to 0.19×10−2. Furthermore, on synthetic causal graphs, a model trained only on 10-node graphs maintains strong predictive performance on graphs with up to 30 nodes, without retraining.
Hendrik Stumpf, Francesco Quinzan
Department of Computer Science, University of Oxford · Department of Engineering, University of Oxford