Deciphering Spatio-Temporal Graph Forecasting: A Causal Lens and Treatment

Yutong Xia, Yuxuan Liang, Haomin Wen, Xu Liu, Kun Wang, Zhengyang Zhou, Roger Zimmermann

Introduction

Spatio-temporal graph (STG) forecasting—the task of predicting time-varying signals across networked nodes, such as traffic flow in a city or air quality across a region—is a cornerstone of modern urban computing. While Deep Learning models, specifically Spatio-Temporal Graph Neural Networks (STGNNs), have achieved significant success, they often struggle with generalization. These models typically rely on the assumption that the future will mirror the past, leaving them vulnerable to performance degradation when the underlying data distribution shifts.

In this work, we introduce CaST (Causal Spatio-Temporal neural networks), a framework that reframes STG forecasting through the lens of causal inference. By moving beyond simple correlation-based learning, CaST addresses two fundamental hurdles: temporal Out-of-Distribution (OoD) shifts and the complex, dynamic ripple effects of spatial causation.

The Causal Challenge in STG Forecasting

Traditional STGNNs face two primary limitations that stem from a lack of causal awareness:

  1. Temporal Out-of-Distribution (OoD) Issues: External factors—such as weather changes, holidays, or policy shifts—constantly alter the data distribution. A model trained on clear-weather traffic patterns may fail during a heavy storm because it has not disentangled the core signal from the environmental context.
  2. Dynamic Spatial Causation: Most models utilize static, distance-based graphs. However, spatial relationships are inherently dynamic and causal. For instance, a traffic accident at a specific intersection creates a "ripple effect" that propagates through the network. Standard correlation-based models often fail to capture how these effects move through the graph's edges over time.

The CaST Framework: A Dual Causal Treatment

To address these challenges, CaST utilizes a Structural Causal Model (SCM) and implements two distinct causal treatments: back-door and front-door adjustments.

Back-door Adjustment for Temporal Robustness

To handle temporal distribution shifts, CaST employs an Environment Disentangler. This module separates the input data into two components: "invariant entities" (the fundamental features of the signal) and "temporal environments" (the context). These environments are mapped to a learnable Environment Codebook. By weighting these environment vectors, the model can approximate unseen scenarios—such as a specific combination of weather and traffic—by synthesizing known states from its codebook. To ensure these representations remain distinct, the framework incorporates Mutual Information Regularization, minimizing the overlap between entity and environment features.

Front-door Adjustment for Spatial Ripple Effects

To capture the propagation of causal effects, CaST introduces the Hodge-Laplacian (HL) Deconfounder. Unlike traditional GNNs that perform convolutions on nodes, the HL Deconfounder performs edge-level convolution. This allows the model to treat causal relationships as signals themselves, effectively modeling how a change in one link propagates to others. This "front-door" adjustment creates a surrogate entity that filters out spurious spatial correlations—nodes that appear related due to shared context but lack a direct causal link.

Experimental Evaluation

We evaluated CaST on three real-world datasets: PEMS08 (traffic flow in San Bernardino), AIR-BJ (air quality in Beijing), and AIR-GZ (air quality in Guangzhou).

Performance and Robustness

CaST consistently outperformed seven state-of-the-art baselines, including AGCRN, STGNCDE, and MTGNN. On the PEMS08 dataset, CaST achieved the lowest Mean Absolute Error (MAE) of 16.44 and Root Mean Square Error (RMSE) of 26.61. Ablation studies confirmed that both the environment disentanglement and the edge-level causal convolution are essential; removing either component resulted in a significant drop in forecasting accuracy.

Interpretability: The Beijing Case Study

A key advantage of the causal approach is interpretability. In a case study of Beijing’s air quality, CaST demonstrated an ability to "understand" its environment. When a southern wind was present, the model’s learned causal strengths shifted logically, correctly identifying the movement of pollutants from southern monitoring stations to northern ones. This confirms that the model is capturing physical propagation rather than just statistical noise.

Conclusion and Future Work

CaST represents a significant step forward in making spatio-temporal forecasting more robust and interpretable by integrating causal inference. By disentangling environment from entity and modeling edge-level propagation, it overcomes the limitations of traditional correlation-based GNNs.

Despite its success, the framework faces challenges regarding computational complexity, as edge-level convolutions are more resource-intensive than node-based methods. Future research will explore transitioning from a discrete Environment Codebook to continuous environment modeling to better reflect the seamless transitions of real-world contexts, as well as improving scalability for extremely large-scale networks.

Summary updated

BibTeX
@inproceedings{xia2023deciphering,
  author = {Yutong Xia and Yuxuan Liang and Haomin Wen and Xu Liu and Kun Wang and Zhengyang Zhou and Roger Zimmermann},
  title = {{Deciphering Spatio-Temporal Graph Forecasting: A Causal Lens and Treatment}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=17Zkztjlgt},
}
Figure