Spatial–temporal combination and multi-head flow-attention network for traffic flow prediction

Lianfei Yu,Wenbo Liu,Dong Wu,Dongmei Xie,Chuang Cai,Zhijian Qu,Panjing Li
DOI: https://doi.org/10.1038/s41598-024-60337-7
IF: 4.6
2024-04-27
Scientific Reports
Abstract:Traffic flow prediction based on spatial–temporal data plays a vital role in traffic management. However, it still faces serious challenges due to the complex spatial–temporal correlation in nonlinear spatial–temporal data. Some previous methods have limited ability to capture spatial–temporal correlation, and ignore the quadratic complexity problem in the traditional attention mechanism. To this end, we propose a novel spatial–temporal combination and multi-head flow-attention network (STCMFA) to model the spatial–temporal correlation in road networks. Firstly, we design a temporal sequence multi-head flow attention (TS-MFA), in which the unique source competition mechanism and sink allocation mechanism make the model avoid attention degradation without being affected by inductive biases. Secondly, we use GRU instead of the linear layer in traditional attention to map the input sequence, which further enhances the temporal modeling ability of the model. Finally, we combine the GCN with the TS-MFA module to capture the spatial–temporal correlation, and introduce residual mechanism and feature aggregation strategy to further improve the performance of STCMFA. Extensive experiments on four real-world traffic datasets show that our model has excellent performance and is always significantly better than other baselines.
multidisciplinary sciences
What problem does this paper attempt to address?
The paper primarily addresses the issue of traffic flow prediction, particularly how to effectively utilize spatiotemporal data for traffic state prediction in Intelligent Transportation Systems (ITS). The core challenge of the research lies in capturing the spatial and temporal correlations from complex nonlinear spatiotemporal data. Specifically, the paper proposes a new model—Spatiotemporal Combination and Multi-Head Flow Attention Network (STCMFA), aimed at solving the following key problems: 1. **Capturing Spatiotemporal Correlations**: Existing methods often capture only local spatial or temporal correlations when dealing with spatiotemporal data, neglecting global correlations. STCMFA captures spatiotemporal correlations in complex road networks by combining Graph Convolutional Networks (GCN) with improved time series modeling methods. 2. **Avoiding the Limitations of Attention Mechanisms**: Traditional attention mechanisms have specific inductive bias issues and exhibit quadratic growth in computational complexity when handling long sequence data. STCMFA introduces a unique source competition mechanism and sink allocation mechanism, which not only avoids the impact of inductive bias but also addresses the computational complexity issue. 3. **Enhancing Time Series Modeling Capability**: By using Gated Recurrent Units (GRU) to replace the linear layers in traditional attention mechanisms, the model's ability to handle long time series data is further enhanced. 4. **Improving Overall Performance**: To further enhance model performance, the researchers introduced residual mechanisms and feature aggregation strategies in STCMFA. The experimental section validated the superior performance of STCMFA on four real-world traffic datasets, namely PeMS03, PeMS04, PeMS07, and PeMS08. The results show that STCMFA significantly outperforms other baseline models in terms of prediction performance.