arXiv:2609.35703cs.LGSep 2026

Manuscript Offprint

arXiv:2609.35703

A Unified Uncertainty Representation for Graph Neural Networks via Doubly-Spectral Stochastic Expansion

Fred Xu, Thomas Markovich, Florence Regol, Yizhou Sun

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Fred Xu ∗^{*}

Department of Computer Science

University of California, Los Angeles

fredxu@cs.ucla.edu

Florence Regol

Mila, Quebec AI Institute

florence.regol@mila.quebec

Thomas Markovich

Block, Inc.

tmarkovich@squareup.com

Yizhou Sun

Department of Computer Science

University of California, Los Angeles

yzsun@cs.ucla.edu

Abstract

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.

1 Introduction

Graph neural networks (GNNs) perform well on graph-structured data, yet reliable deployment in drug discovery [31], fraud detection [7], or traffic forecasting [18] requires calibrated probabilities, out-of-distribution (OOD) detection, and robustness to distribution shift. On graphs the three needs are coupled, because uncertainty depends on neighborhood structure as well as node features, and they are

*Work done during an internship at Block, Inc.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

instances of one question: when, and how confidently, can the model predict? Calibration measures the agreement between confidence and accuracy in distribution (ID), OOD detection requires low confidence outside the training support, and shift robustness requires that accuracy decrease slowly as the input distribution changes. A representation that explicitly encodes predictive uncertainty addresses all three, with calibrated probabilities, OOD evidence, and a regularized residual under shift obtained from one signal. Most existing methods target one requirement: sampling-based uncertainty methods add computational overhead [10, 17, 19]; evidential models such as Graph Posterior Network (GPN) [30] provide OOD evidence but not shift-robust classification, and intrinsic uncertainty models such as G-ΔUQ [33] target calibration under shift; energy-based detectors [9, 36] provide separation scores rather than calibrated probabilities; and robust-training methods [1, 27, 38] do not model uncertainty explicitly.

Spectral GNNs learn filters along the graph-frequency axis [6]; we add a second spectral axis for stochastic variation. DSS-GNN represents each node embedding as a polynomial chaos expansion in a scalar Gaussian latent [37] and propagates the joint graph-frequency/chaos-order coefficients through a learnable doubly-spectral layer (Figure 4, Appendix H). One deterministic forward pass gives task-matched readouts: the quadrature-averaged predictive distribution, whose argmax is the point predictor, is used for prediction and calibration, with the higher-order coefficients encoding structured logit variation; the zeroth-order mean logit gives an energy score for OOD detection that retains the common-logit shifts that softmax cancels; and, paired with a deterministic encoder (DSS-Hybrid, e.g., GCN [15]), the DSS branch acts as a regularized low-/high-pass residual under distribution shift. DSS-GNN is thus one uncertainty representation with two deployment modes; Section 4.5 evaluates both on all three tasks and states which to prefer where. Our contributions are:

  1. A doubly-spectral stochastic representation for GNNs with a capacity theorem: under a full-rank feature assumption, a restricted DSS subfamily matches the chaos coefficients of any Gaussian-latent random graph signal, with exponentially decaying truncation error for targets with an entire extension of Gaussian growth (Theorem 2). The theorem (Section 3.3) establishes representational capacity, consistent with the empirical plateau at P=1-2, but does not by itself guarantee calibration, OOD detection, or robustness, which are supported empirically.

  2. A learnable doubly-spectral layer whose quadrature-averaged loss differs from the mean-logit loss by a curvature-weighted correction over the chaos covariance (Proposition 2), relating the chaos coefficients to calibration, bounding the gap between the quadrature predictive and the mean-logit softmax (Corollary 1), and identifying the mean-logit energy as the readout that retains common-logit shifts.

  3. Empirically, the lowest Brier score among compared uncertainty-aware baselines on all 14 calibration benchmarks (standalone), the best AUROC on most node-OOD settings with competitive cross-graph OOD, and the strongest shifted accuracy on all 7 concept-shift benchmarks under ERM (hybrid), plus a cross-evaluation of both modes on all three tasks, component-wise ablations (Table 21), and explicit deployment guidance.

References (37)