GSA-Forecaster: Forecasting Graph-Based Time-Dependent Data with Graph Sequence Attention

Yang Li, Di Wang, José M. F. Moura · DOI

Abstract

Forecasting graph-based, time-dependent data has broad practical applications but presents challenges. Effective models must capture both spatial and temporal dependencies in the data, while also incorporating auxiliary information to enhance prediction accuracy. In this paper, we identify limitations in current state-of-the-art models regarding temporal dependency handling. To overcome this, we introduce GSA-Forecaster, a new deep learning model designed for forecasting in graph-based, time-dependent contexts. GSA-Forecaster utilizes graph sequence attention, a new attention mechanism proposed in this paper, to effectively manage temporal dependencies. GSA-Forecaster integrates the data's graph structure directly into its architecture, addressing spatial dependencies. Additionally, it incorporates auxiliary information to refine its predictions further. We validate its performance using real-world graph-based, time-dependent datasets, where it demonstrates superior effectiveness compared to existing state-of-the-art models.

Introduction

Forecasting data that resides on a graph—such as taxi demand across city blocks or traffic speeds across a highway network—is notoriously difficult. Unlike standard time-series forecasting, this task involves tracking hundreds of interconnected signals that are often noisy, non-stationary, and influenced by external factors like weather.

Graph-based time-dependent data involves interconnected signals across a spatial structure, such as city blocks in Manhattan.

Most modern forecasting models rely on the Transformer architecture and its standard attention mechanism. Standard attention works by taking the current data point (the "query") and comparing it to every historical data point (the "keys") to identify similarities. However, this "point-to-point" approach is vulnerable to noise and non-stationarity. If the current data point is an outlier, the model may focus on irrelevant historical outliers. Furthermore, a single numerical value fails to capture the underlying trend (e.g., whether traffic is increasing or decreasing).

Methods: Graph Sequence Attention (GSA)

To address these limitations, we introduce Graph Sequence Attention (GSA). Instead of using a single point as a query, GSA aggregates a small window of recent points into a Temporal Neighborhood (TN).

GSA compares the current temporal neighborhood (TN) against historical neighborhoods to identify similar trends rather than just similar values.

By matching sequences rather than points, the model effectively filters out noise and ensures it pays attention to historical periods with similar trends. The GSA-Forecaster architecture handles both time and space through:

  • Spatial Dependency: Utilizing sparse linear layers that mirror the physical or logical graph structure. If the graph is unknown, Gaussian Markov Random Fields are used to infer it.
  • Two-Stage Attention: An Encoder uses GSA to denoise historical data, while a Decoder uses GSA to generate the forecast.
  • GRU Integration: A Gated Recurrent Unit (GRU) acts as a "safety net" for highly non-stationary data, balancing historical patterns with immediate trend projections.

Datasets and Evaluation

The GSA-Forecaster was evaluated on four large-scale datasets: NYC Taxi (1.06 billion trips), PEMS-BAY (traffic speed), ECL (electricity consumption), and road occupancy traffic data. These datasets represent complex, real-world scenarios where spatial and temporal dependencies are critical.

Key Results

GSA-Forecaster consistently outperformed state-of-the-art models such as DCRNN and Graph WaveNet. On the NYC Taxi dataset, it reduced Root-Mean-Square Error (RMSE) by 6.7% and Mean Absolute Percentage Error (MAPE) by 5.8%. It also showed superior accuracy across various forecasting horizons for traffic data and outperformed long-sequence models like Informer on electricity data. Notably, the execution time remained comparable to standard attention mechanisms (approx. 10.3ms vs 10.2ms per sample), demonstrating high efficiency.

Conclusion

By shifting from point-to-point attention to neighborhood-to-neighborhood comparisons, GSA-Forecaster provides a robust solution for complex spatial-temporal forecasting. Its ability to integrate graph topology and handle non-stationary trends makes it a powerful tool for real-world applications in urban planning, energy management, and transportation.

Summary updated

BibTeX
@misc{li2021gsa,
  author = {Yang Li and Di Wang and José M. F. Moura},
  title = {{GSA-Forecaster: Forecasting Graph-Based Time-Dependent Data with Graph Sequence Attention}},
  year = {2021},
  eprint = {2104.05914},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.05914},
}
Figure