Long-term Spatio-Temporal Forecasting via Dynamic Multiple-Graph Attention

Wei Shao, Zhiling Jin, Shuo Wang, Yufan Kang, Xiao Xiao, Hamid Menouar, Zhaofeng Zhang, Junshan Zhang, Flora D. Salim

Introduction

Spatio-temporal forecasting—predicting variables such as traffic flow, parking availability, or air quality—is a cornerstone of smart city infrastructure. However, modeling these variables is notoriously difficult because it requires capturing complex dependencies across both space and time. While Multi-Graph Neural Networks (MGNNs) have shown promise by leveraging different types of spatial relationships, they often struggle with Long-term Spatio-Temporal Forecasting (LSTF) due to static relationship modeling and architectural rigidity.

The Challenge of Long-term Spatio-Temporal Forecasting

Existing methods for spatio-temporal forecasting face three major hurdles when extending prediction horizons:

  1. Low Generality: Most fusion methods are tightly coupled to specific model architectures, making them difficult to adapt.
  2. Static Relationships: Models often rely on static spatial distances, failing to capture how relationships evolve or how "functional" similarities (e.g., two distant school zones behaving similarly) impact long-term trends.
  3. Imbalanced Fusion: Simple averaging or summing of different graphs fails to account for the varying importance of specific relationships for different nodes.
Conceptual illustration of multiple spatial graphs (Functionality, Distance, Neighbor) representing different urban relationships.

Methodology: Dynamic Multi-graph Fusion

The authors propose a modular framework designed to be "plugged into" existing Spatio-Temporal Graph Neural Networks (ST-GNNs). The core of this framework lies in advanced graph construction and a dynamic fusion mechanism.

Advanced Graph Construction

The framework utilizes five distinct graphs to represent spatial relationships. Beyond standard Distance and Neighbor graphs, the authors introduce:

  • Heuristic Graph: This graph uses historical data distributions (histograms) and exponential approximation to capture stable, long-term patterns that are often obscured in short-term windows.
  • Functionality Graph: This uses Pearson correlation to link areas with similar utilities, such as factories or schools, regardless of their physical distance.

Dynamic Multi-graph Fusion and SG-ATT

Instead of static weights, the model employs a trainable weight tensor and a Spatial-Graph Attention (SG-ATT) mechanism. This dual-attention approach captures correlations between different nodes within the same graph (Spatial Attention) and correlations for the same node across different graphs (Graph Attention). A learnable gated fusion mechanism then determines the optimal balance between spatial and graph-level information for each specific node.

The proposed framework architecture featuring the Dynamic Multi-graph Attention Block and Spatial-Graph Attention (SG-ATT) mechanism.

Experimental Evaluation

The model was evaluated on two large-scale real-world datasets: the Melbourne Parking Dataset (42 million events) and the Jiangsu Air Quality Dataset (hourly $PM_{2.5}$ concentrations).

Key Results

  • Significant Accuracy Gains: When integrated with the STGCN baseline, the proposed fusion method resulted in an average RMSE decrease of 9.5% across all prediction horizons.
  • Superior Long-term Stability: In tasks predicting up to 24 steps ahead, the proposed model maintained high accuracy and showed much flatter error curves compared to vanilla baselines, which typically suffer sharp performance drops.
  • Architecture Agnostic: The framework proved effective across five different state-of-the-art baselines (including STGCN and ASTGCN), demonstrating that improved graph fusion can enhance a wide variety of existing models.

Conclusion and Future Work

By introducing dynamic attention and novel heuristic/functionality graphs, this framework addresses the core instabilities of long-term spatio-temporal forecasting. While the computational complexity of multi-head attention across five graphs is a consideration, the gains in stability and accuracy are substantial. Future research may explore adapting these dynamic graphs to real-time system "shocks," such as sudden weather changes or road closures, and extending the framework to other graph-based domains.

Summary updated

Abstract

Many real-world ubiquitous applications, such as parking recommendations and air pollution monitoring, benefit significantly from accurate long-term spatio-temporal forecasting (LSTF). LSTF makes use of long-term dependency between spatial and temporal domains, contextual information, and inherent pattern in the data. Recent studies have revealed the potential of multi-graph neural networks (MGNNs) to improve prediction performance. However, existing MGNN methods cannot be directly applied to LSTF due to several issues: the low level of generality, insufficient use of contextual information, and the imbalanced graph fusion approach. To address these issues, we construct new graph models to represent the contextual information of each node and the long-term spatio-temporal data dependency structure. To fuse the information across multiple graphs, we propose a new dynamic multi-graph fusion module to characterize the correlations of nodes within a graph and the nodes across graphs via the spatial attention and graph attention mechanisms. Furthermore, we introduce a trainable weight tensor to indicate the importance of each node in different graphs. Extensive experiments on two large-scale datasets demonstrate that our proposed approaches significantly improve the performance of existing graph neural network models in LSTF prediction tasks.
BibTeX
@inproceedings{shao2022long,
  author = {Wei Shao and Zhiling Jin and Shuo Wang and Yufan Kang and Xiao Xiao and Hamid Menouar and Zhaofeng Zhang and Junshan Zhang and Flora D. Salim},
  title = {{Long-term Spatio-Temporal Forecasting via Dynamic Multiple-Graph Attention}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/309},
}
Figure