Multi-step citywide traffic flow forecasting based on multiscale spatio-temporal transformer
Accurate citywide traffic flow forecasting is an essential task in intelligent transportation systems. Unlike single-step forecasting, multi-step traffic flow forecasting offers extended insights that support proactive traffic management and resource allocation over longer time horizons. This paper proposes a Multi-Step Multiscale Spatial–Temporal Transformer (MS-MSTformer) for citywide traffic flow forecasting, which leverages a multiscale patch mechanism to capture both local and global spatial dependencies while integrating temporal patterns of closeness, period, and trend. Two novel cross-attention modules, namely Patch-Temporal Cross-Attention (PTCA) and Region-Temporal Cross-Attention (RTCA) are presented. These modules utilize temporal information as the query, with PTCA and RTCA focusing on patches and regions, respectively, to effectively fuse diverse spatio-temporal features. Extensive experiments on the widely used New York City Taxi (NYCTaxi) and New York City Bike (NYCBike) datasets demonstrate the MS-MSTformer’s capability to provide accurate multi-step citywide traffic flow forecasting. Specifically, the proposed model outperforms the baseline models in 11 out of 12 evaluation scenarios. On average, MS-MSTformer improves Root Mean Square Error (RMSE) by 31.13% and Mean Absolute Error (MAE) by 29.22% over the deep learning baselines. In addition, the ablation study demonstrates the contributions of both PTCA and RTCA to the proposed MS-MSTformer. • A novel multi-step forecasting framework is proposed for citywide traffic flow forecasting. • A multiscale patch captures both local and global spatial dependencies with temporal patterns. • A cross-attention mechanism (PTCA & RTCA) fuses spatio-temporal features effectively. • The model achieves state-of-the-art accuracy on NYCTaxi and NYCBike datasets.
Authors
- Xiao Yan (ORCID: https://orcid.org/0000-0002-8770-4531)
- Taiyong Li (ORCID: https://orcid.org/0000-0002-1546-8015)
- Jiang Wu (ORCID: https://orcid.org/0000-0001-9286-4073)
- Shaowu Zhang (ORCID: https://orcid.org/0000-0002-3551-5587)
- Yingqi Chen (ORCID: https://orcid.org/0009-0004-8897-0104)
Institutions
- Southwestern University of Finance and Economics (CN)
- China Electronics Technology Group Corporation (CN)
Publication Details
- Journal
- Engineering Applications of Artificial Intelligence
- Published
- 2025-06-17
- DOI
- https://doi.org/10.1016/j.engappai.2025.111362
- Citations
- 2
- Primary Topic
- Traffic Prediction and Management Techniques
- Type
- article
- Field-Weighted Citation Impact
- 2.01
Funders
- Humanities and Social Science Fund of Ministry of Education of China