Applied Sciences (Aug 2023)

Hierarchical Spatial-Temporal Neural Network with Attention Mechanism for Traffic Flow Forecasting

  • Qingyun Lian,
  • Wei Sun,
  • Wei Dong

DOI
https://doi.org/10.3390/app13179729
Journal volume & issue
Vol. 13, no. 17
p. 9729

Abstract

Read online

Accurate traffic flow forecasting is pivotal for intelligent traffic control and guidance. Manually capturing the intricate dependencies between spatial and temporal dimensions in traffic data presents a significant challenge. Prior methods have primarily employed Recurrent Neural Networks or Graph Convolutional Networks, without fully accounting for the interdependency between spatial and temporal factors. To address this, we introduce a novel Hierarchical Spatial-Temporal Neural Networks with Attention Mechanism model (HSTAN). This model concurrently captures temporal correlations and spatial dependencies using a multi-headed self-attention mechanism in both temporal and spatial terms. It also integrates global spatial-temporal correlations through a hierarchical structure with residuals. Moreover, the analysis of attention weight matrices can depict complex spatial-temporal correlations, thereby enhancing our traffic forecasting capabilities. We conducted experiments on two publicly available traffic datasets, and the results demonstrated that the HSTAN model’s prediction accuracy surpassed that of several benchmark methods.

Keywords