Spiking Graph Predictive Coding for Reliable OOD Generalization
Authors: Jing Ren, Jiapeng Du, Bowen Li, Ziqi Xu, Xin Zheng, Hong Jia, Suyu Ma, Xiwei Xu, +1 more
Organizations: RMIT University, Melbourne, Australia · University of Auckland, Auckland, New Zealand · CSIRO’s Data61, Melbourne, Australia · CSIRO’s Data61, Sydney, Australia
Graphs provide a powerful basis for modeling Web-based relational data, with expressive GNNs to support the effective learning in dynamic web environments. However, real-world deployment is hindered by pervasive out-of-distribution (OOD) shifts, where evolving user activity and changing content semantics alter feature distributions and labeling criteria. These shifts often lead to unstable or overconfident predictions, undermining the trustworthiness required for Web4Good applications. Achieving reliable OOD generalization demands principled and interpretable uncertainty estimation; however, existing methods are largely post-hoc, insensitive to distribution shifts, and unable to explain where uncertainty arises especially in high-stakes settings. To address these limitations, we introduce SpIking GrapH predicTive coding (SIGHT), an uncertainty-aware plug-in graph learning module for reliable OOD Generalization. SIGHT performs iterative, error-driven correction over spiking graph states, enabling models to expose internal mismatch signals that reveal where predictions become unreliable. Across multiple graph benchmarks and diverse OOD scenarios, SIGHT consistently enhances predictive accuracy, uncertainty estimation, and interpretability when integrated with GNNs.
Figures & tables
Figure 1. Overview of the proposed framework SIGHT. In training, the encoded node representations are learned by aggregating neighbor information through GNNs. Before propagation, predictions are refined via an iterative predictive coding (PC) unit over LIF neurons. In testing, the model will be tested on datasets with covariate shift , where the input feature distribution changes while the underlying labels remain stable (i.e., Ptrain(X)=Ptest(X) but Ptrain(Y∣X)=Ptest(Y∣X) ), and with concept shift , where the meaning of labels or the feature–label relationship itself changes over time (i.e., Ptrain(Y∣X)=Ptest(Y∣X) ).
Method
Accuracy ↑
ECE ↓
NLL ↓
BS ↓
AUROC ↑
ID
OOD
ID
OOD
ID
OOD
ID
OOD
ID
OOD
Cora
GCN
89.8 ± 0.3
43.5 ± 5.2
0.019 ± 0.003
0.391 ± 0.071
0.318 ± 0.008
2.595 ± 0.512
0.150 ± 0.004
0.919 ± 0.103
88.7 ± 0.3
59.9 ± 3.7
+G- Δ UQ
91.3 ± 0.4
80.1 ± 4.7
0.019 ± 0.004
0.053 ± 0.031
0.270 ± 0.018
0.574 ± 0.149
0.130 ± 0.007
0.288 ± 0.068
87.3 ± 1.2
81.5 ± 2.8
+SIGHT
93.2 ± 0.6
95.6 ± 0.2
0.015 ± 0.002
0.009 ± 0.002
0.241 ± 0.021
0.153 ± 0.010
0.105 ± 0.009
0.068 ± 0.003
86.7 ± 1.2
89.8 ± 1.5
Citeseer
GCN
82.1 ± 0.4
46.6 ± 1.9
0.026 ± 0.003
0.334 ± 0.027
0.503 ± 0.012
1.838 ± 0.051
0.252 ± 0.006
0.793 ± 0.026
84.1 ± 0.8
74.1 ± 1.6
+G- Δ UQ
81.6 ± 0.4
71.0 ± 4.2
0.021 ± 0.008
0.066 ± 0.027
0.531 ± 0.037
0.889 ± 0.145
0.263 ± 0.010
0.416 ± 0.056
82.2 ± 1.6
76.5 ± 1.3
Table 1. Node classification accuracy and uncertainty on ID and OOD datasets with the GCN backbone. Best results are in bold , and SIGHT is marked with a . Results with the GAT backbone are in Table 6 .
Figure 2. Comparison of label distribution between training and testing sets on Twitch and CBAS.
Figure 3. Comparison of feature distribution between training and testing sets on Cora, Citeseer, and Pubmed.
Dataset
# Nodes
# Edges
# Classes
# Features
Shift Type
Cora
2,708
5,429
7
1,433
Covariate
Citeseer
3,327
4,732
6
3,703
Covariate
Pubmed
19,717
44,338
3
500
Covariate
Twitch
34120
892346
2
128
Concept
CBAS
700
3962
4
4
Concept
Table 2. Statistics of the experimental datasets.
GCN
GAT
Model
Accuracy ↑
ECE ↓
Accuracy ↑
ECE ↓
w/o SIGHT
w/ SIGHT
w/o SIGHT
w/ SIGHT
w/o SIGHT
w/ SIGHT
w/o SIGHT
w/ SIGHT
Cora
✗
43.5 ± 5.2
95.6 ± 0.2
0.391 ± 0.071
0.009 ± 0.002
67.4 ± 4.1
96.3 ± 0.7
0.164 ± 0.026
0.008 ± 0.002
CAGCN
40.9 ± 3.3
95.6 ± 0.2
0.439 ± 0.081
0.037 ± 0.019
67.4 ± 4.1
95.8 ± 0.7
0.255 ± 0.031
0.042 ± 0.022
Dirichlet
42.1 ± 4.4
95.5 ± 0.1
0.412 ± 0.039
0.012 ± 0.001
65.9 ± 3.0
96.6 ± 0.4
0.174 ± 0.024
0.009 ± 0.003
ETS
42.1 ± 5.7
95.6 ± 0.2
0.419 ± 0.055
0.009 ± 0.001
67.0 ± 3.9
95.2 ± 1.0
0.176 ± 0.017
0.011 ± 0.003
Table 3. Accuracy and ECE under distribution shifts for different post-hoc calibration models using GCN and GAT backbones, w/o and w/ SIGHT ( a ). ✗ denotes no post-hoc calibration.
Figure 4. Correlation between PC error and confidence scores on the Cora, Citeseer, and Pubmed OOD sets. Higher PC errors consistently correspond to lower confidence, showing that PC residuals serve as an intrinsic measure of uncertainty.
Method
Cora
Citeseer
Pubmed
Twitch
CBAS
GCN
70.4 ± 2.8
74.1 ± 1.1
72.6 ± 1.2
53.2 ± 0.5
74.5 ± 3.8
+G- Δ UQ
83.0 ± 2.2
77.7 ± 1.0
74.8 ± 0.4
52.2 ± 4.6
72.3 ± 6.6
+SIGHT
89.0 ± 1.6
84.0 ± 1.2
85.1 ± 0.2
54.5 ± 2.4
78.1 ± 2.4
GAT
73.9 ± 2.1
78.3 ± 1.1
77.0 ± 0.6
49.5 ± 2.4
75.9 ± 4.1
+G- Δ UQ
83.3 ± 2.4
80.4 ± 1.1
82.7 ± 0.8
49.3 ± 3.9
78.3 ± 5.3
+SIGHT
88.0 ± 2.8
81.1 ± 1.8
82.1 ± 0.2
52.7 ± 3.1
83.1 ± 3.4
Table 4. AUROC results for OOD detection. Best results are in bold , and SIGHT is marked with a .
GCN
GAT
Method
Acc ↑
ECE ↓
NLL ↓
BS ↓
AUROC ↑
Acc ↑
ECE ↓
NLL ↓
BS ↓
AUROC ↑
Cora
SIGHT
95.6 ± 0.2
0.009 ± 0.002
0.153 ± 0.010
0.068 ± 0.003
89.8 ± 1.5
96.3 ± 0.7
0.008 ± 0.002
0.138 ± 0.028
0.058 ± 0.012
89.6 ± 2.1
w/o Spik
68.4 ± 5.1
0.146 ± 0.043
1.011 ± 0.196
0.473 ± 0.084
71.4 ± 2.3
64.5 ± 5.5
0.175 ± 0.048
1.243 ± 0.230
0.551 ± 0.093
66.3 ± 4.7
w/o PC
95.2 ± 0.3
0.020 ± 0.005
0.158 ± 0.004
0.076 ± 0.002
89.3 ± 1.4
97.1 ± 0.2
0.017 ± 0.005
0.135 ± 0.022
0.048 ± 0.006
83.3 ± 5.2
w/o SPC
43.5 ± 5.2
0.391 ± 0.071
2.595 ± 0.512
0.919 ± 0.103
59.9 ± 3.7
67.4 ± 4.1
0.164 ± 0.026
1.072 ± 0.108
0.498 ± 0.059
71.1 ± 3.2
Citeseer
SIGHT
91.2 ± 0.4
0.024 ± 0.004
0.307 ± 0.016
0.136 ± 0.008
83.4 ± 0.8
93.4 ± 0.2
0.028 ± 0.003
0.261 ± 0.012
0.105 ± 0.005
80.8 ± 1.2
Table 5. Ablation study of SIGHT with GCN and GAT backbones. Best results are in bold .
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Accuracy ↑
ECE ↓
NLL ↓
BS ↓
AUROC ↑
ID
OOD
ID
OOD
ID
OOD
ID
OOD
ID
OOD
Cora
GAT
90.6 ± 0.5
67.4 ± 4.1
0.015 ± 0.001
0.164 ± 0.026
0.286 ± 0.027
1.072 ± 0.108
0.137 ± 0.011
0.498 ± 0.059
88.9 ± 0.7
71.1 ± 3.2
+G- Δ UQ
93.9 ± 0.4
80.2 ± 3.5
0.015 ± 0.002
0.061 ± 0.033
0.211 ± 0.007
0.578 ± 0.098
0.097 ± 0.004
0.291 ± 0.053
87.2 ± 1.6
81.8 ± 3.0
+SIGHT
93.9 ± 0.9
96.3 ± 0.7
0.017 ± 0.002
0.008 ± 0.002
0.227 ± 0.036
0.138 ± 0.028
0.097 ± 0.016
0.058 ± 0.012
87.1 ± 3.0
89.6 ± 2.1
Citeseer
GAT
82.1 ± 0.4
46.6 ± 1.9
0.026 ± 0.003
0.334 ± 0.027
0.503 ± 0.012
1.838 ± 0.051
0.252 ± 0.006
0.793 ± 0.026
84.1 ± 0.8
74.1 ± 1.6
+G- Δ UQ
81.6 ± 0.4
71.0 ± 4.2
0.021 ± 0.008
0.066 ± 0.027
0.531 ± 0.037
0.889 ± 0.145
0.263 ± 0.010
0.416 ± 0.056
82.2 ± 1.6
76.5 ± 1.3
Appendix
Table 6. Node classification accuracy and uncertainty calibration on ID and OOD datasets with the GAT backbone. Best results are in bold , and SIGHT is marked with a . Results with the GCN backbone are in Table 1 .
Figure 5. Correlation between PC error and confidence scores on the Cora, Citeseer, and Pubmed ID test sets. Higher PC errors consistently correspond to lower confidence, showing that PC residuals serve as an intrinsic measure of uncertainty.
Figure 6. Sensitivity analysis of SGPC under predictive coding iterations ( K ), timesteps ( T ), and learning rate ( LR ) on AUROC are evaluated across five datasets.
Graph Neural Networks (GNNs) have demonstrated remarkable success across diverse tasks. However, their generalization capability is often hindered by spurious correlations between node features and labels in the graph. Our analysis reveals that GNNs tend to exploit imperceptible statistical correlations in training data, even when such correlations are unreliable for prediction. To address this challenge, we propose the Spurious Correlation Learning Graph Neural Network (SCL-GNN), a novel framework designed to enhance generalization on both Independent and Identically Distributed (IID) and Out-of-Distribution (OOD) graphs. SCL-GNN incorporates a principled spurious correlation learning mechanism, leveraging the Hilbert-Schmidt Independence Criterion (HSIC) to quantify correlations between node representations and class scores. This enables the model to identify and mitigate irrelevant but influential spurious correlations effectively. Additionally, we introduce an efficient bi-level optimization strategy to jointly optimize modules and GNN parameters, preventing overfitting. Extensive experiments on real-world and synthetic datasets demonstrate that SCL-GNN consistently outperforms state-of-the-art baselines under various distribution shifts, highlighting its robustness and generalization capabilities.
Yuxiang Zhang, Enyan Dai
The Hong Kong University of Science and Technology (Guangzhou)
Reliable deployment of graph neural networks requires calibration, out-of-distribution (OOD) detection, and robustness to distribution shift, yet existing methods address these needs with separate models and objectives. We model uncertain node embeddings as random graph signals: graph Fourier filters capture structural variation, and a scalar orthogonal-polynomial chaos coordinate captures latent stochastic variation. The resulting doubly-spectral stochastic (DSS) expansion supplies task-matched readouts from one representation: the mean coefficient encodes class evidence for the energy-based OOD score, the higher-order coefficients encode structured logit variation, and quadrature averaging over the chaos coordinate defines the single predictive distribution used for prediction and calibration. A capacity theorem shows that, under a full-rank feature assumption, a restricted subfamily matches the chaos coefficients of any Gaussian-latent random graph signal, with exponentially decaying truncation error under a growth condition; the task-level claims are established empirically. DSS-GNN has two deployment modes: standalone, or as a residual branch beside a deterministic encoder (DSS-Hybrid). Standalone DSS-GNN achieves the lowest Brier score among the compared uncertainty-aware baselines on all 14 node classification benchmarks without post-hoc correction; DSS-Hybrid achieves the best AUROC on most node-OOD settings, competitive cross-graph OOD detection, and the strongest shifted accuracy on all 7 GOOD concept-shift benchmarks under standard empirical risk minimization (ERM). Cross-evaluating both modes on all three tasks shows that each remains effective on the other's tasks, with documented exceptions, and yields explicit deployment guidance.
Fred Xu, Thomas Markovich, Florence Regol +1
Department of Computer Science University of California, Los Angeles · Block, Inc. · Mila, Quebec AI Institute
Although dynamic graph neural networks (DyGNNs) have demonstrated promising capabilities, most existing methods ignore out-of-distribution (OOD) shifts that commonly exist in dynamic graphs. Dynamic graph OOD generalization is non-trivial due to the following challenges: 1) Identifying invariant and variant patterns amid complex graph evolution, 2) Capturing the intrinsic evolution rationale from these patterns, and 3) Ensuring model generalization across diverse OOD shifts despite limited data distribution observations. Although several attempts have been made to tackle these challenges, none has successfully addressed all three simultaneously, and they face various limitations in complex OOD scenarios. To solve these issues, we propose a Dynamic graph Causal Invariant Learning (DyCIL) model for OOD generalization via exploiting invariant spatio-temporal patterns from a causal view. Specifically, we first develop a dynamic causal subgraph generator to identify causal dynamic subgraphs explicitly. Next, we design a causal-aware spatio-temporal attention module to extract the intrinsic evolution rationale behind invariant patterns. Finally, we further introduce an adaptive environment generator to capture the underlying dynamics of distributional shifts. Extensive experiments on both real-world and synthetic dynamic graph datasets demonstrate the superiority of our model over state-of-the-art baselines in handling OOD shifts.
Xinxun Zhang, Pengfei Jiao, Mengzhou Gao +2
School of Cyberspace, Hangzhou Dianzi University, China · State Key Laboratory of AI Safety, Beijing · School of Computer Science, Wuhan University, China +1