Weather Interaction-Aware Spatio-Temporal Attention Networks for Urban Traffic Flow Prediction
Abstract
:1. Introduction
- We utilized the proposed the WST-ANet model, which consists of a spatio-temporal attention module for weather interaction sensing and a cross-attention mechanism. The model adaptively simulates the complex spatio-temporal interdependencies between weather and traffic using an encoder–decoder architecture, with an attention mechanism to achieve dynamic spatio-temporal and complex-dependent traffic prediction incorporating weather factors. This allows the model to adaptively focus on the spatial and temporal characteristics of the region, realizing the capture of the dynamic spatial and temporal characteristics of the road network, thus improving the accuracy of the prediction.
- We designed a new DGM, a dynamic graph module that adaptively captures the connectivity relationships of road networks on a spatial level, mines the adaptive graph for hidden information, and extracts the spatial correlations among the nodes step by step in depth. This method updates the adjacency matrix and iterates the aggregation of features to better fit the dynamic scenarios of urban road networks, thus improving the robustness of the prediction.
- We constructed an interactive perception fusion method of weather features and spatio-temporal features. The vector embedding was utilized to fuse temporal features, spatial features, and weather attributes to generate contextual semantics on exogenous weather-driven multimodal feature embedding. This spatio-temporal scenario synergizes weather changes to learn the multimodal urban road network characteristics and comprehensively grasp the weather and spatio-temporal interactive fusion of the traffic conditions in the city.
- In order to validate the effectiveness of the proposed model, we conducted comprehensive comparison experiments and prediction validation with 14 baseline models on two datasets.
2. Related Work
2.1. Time-Series Traffic Forecasting
2.2. Space–Time Traffic Forecasting
2.3. Spatio-Temporal Traffic Prediction with Embedded Factors
3. Methodology
3.1. Problem Description
3.2. Framework Overview
3.3. Feature Embedding Module
3.4. Dynamic Graph Module
3.5. Temporal-Weather Interactive Module
3.6. Cross-Attention
3.7. Loss Function
4. Experimentation
4.1. Experimental Datasets
4.2. Parameter Settings
4.3. Baselines
- (1)
- HA [26]: Prediction of traffic flow in future time slots by averaging a sequence of a fixed number of terms computed from the historical traffic flow.
- (2)
- LSTM [29]: Long Short-Term Memory Network, a special RNN model that processes longer sequences of signal data through input gates, output gates, and forgetting gates.
- (3)
- GRU [30]: Gated Recurrent Unit Network, a special RNN model that optimizes the parameter structure within the network to improve the convergence performance of processing sequence data.
- (4)
- GCN [31]: Graph Convolutional Network, which abstracts the traffic road network as a graph structure, aggregates the feature information between neighboring nodes through the graph convolution mechanism, and realizes feature update of traffic data between domains.
- (5)
- GAT [32]: Graph Attention Network, based on (3), the attention mechanism is introduced between nodes, so that each node can be adaptively weighted according to the features of its neighboring nodes; this adaptation can effectively aggregate and process the complex feature relationships between traffic data nodes.
- (6)
- DCRNN [36]: Bidirectional spatio-temporal adaptive transformer, which adopts encoder–decoder architecture and an adaptive mechanism to construct a spatio-temporal feature information extraction structure.
- (7)
- AGCRN [38]: Adaptive graph convolution recurrent network that enhances traditional graph convolution through adaptive graph generation and node-adaptive parameter learning, integrating into recurrent neural networks to capture more complex spatio-temporal correlations.
- (8)
- ST-CGCN [41]: A spatio-temporal complex graph convolutional network based on constructing complex correlation matrices through multi-feature and attention mechanisms to characterize dynamic spatio-temporal features.
- (9)
- GMAN [45]: Employs an encoder–decoder structure containing multiple spatio-temporal attentional blocks that use attentional mechanisms to model dynamic spatial and temporal correlations.
- (10)
- ST-WA [37]: A spatio-temporal perceptual attention network that randomly encodes time series to generate site-specific and time-varying model parameters to better capture spatio-temporal dynamics.
- (11)
- STPGCN [40]: A Spatio-Temporal Location-aware Graph Convolutional Network, which adaptively infers the correlation weights of three important spatio-temporal relationships through a spatio-temporal location-aware relationship inference module, aggregating and updating the node features to capture node-specific model features guided by location embedding.
- (12)
- ASTGCN [33]: Attention-based spatio-temporal graph convolutional network, combining the attention mechanism and spatio-temporal graph convolution to construct a convolutional model capable of capturing the spatio-temporal features to capture spatio-temporal dynamic correlations.
- (13)
- STSGCN [34]: A graph convolution spatio-temporal network based on a road network structure, using a graph convolution method to capture complex local spatio-temporal correlations, modeling spatio-temporal heterogeneity for mutually independent components.
- (14)
- AFDGCN [35]: A novel dynamic graph convolutional network with attention fusion functionality, which jointly models synchronous spatio-temporal correlations through a dynamic graph learner and a GRU.
4.4. Evaluation Metrics
5. Analysis of Results
5.1. Performance Analysis
5.2. Analysis of Predicted Results
5.3. Ablation Study
- W/O DGM: indicates the removal of the dynamic graph structure module. The spatial convolutional layer of the graph is constructed using directly introduced spatial feature structures.
- W/O TWE: denotes that the WST-ANet model removes the sequence feature embedding of temporal weather interactions.
- W/O SWE: denotes that the WST-ANet model removes the positional feature embedding of spatial weather interactions.
- W/O CrossAtt: indicates that the WST-ANet model removes the cross-attention mechanism module that connects the encoder and decoder
5.4. Visualization Results
6. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Wang, C.; Tian, R.; Hu, J.; Ma, Z. A trend graph attention network for traffic prediction. Inf. Sci. 2023, 623, 275–292. [Google Scholar] [CrossRef]
- Tu, Y.; Lin, S.; Qiao, J.; Liu, B. Deep traffic congestion prediction model based on road segment grouping. Appl. Intell. 2021, 51, 8519–8541. [Google Scholar] [CrossRef]
- Wang, K.; Liu, L.; Liu, Y.; Li, G.; Zhou, F.; Lin, L. Urban regional function guided traffic flow prediction. Inf. Sci. 2023, 634, 308–320. [Google Scholar] [CrossRef]
- Lv, Z.; Zhang, S.; Xiu, W. Solving the Security Problem of Intelligent Transportation System with Deep Learning. IEEE Trans. Intell. Transp. Syst. 2021, 22, 4281–4290. [Google Scholar] [CrossRef]
- Haydari, A.; Yılmaz, Y. Deep reinforcement learning for intelligent transportation systems: A survey. IEEE Trans. Intell. Transp. Syst. 2020, 23, 11–32. [Google Scholar] [CrossRef]
- Rani, P.; Sharma, R. Intelligent transportation system for internet of vehicles based vehicular networks for smart cities. Comput. Electr. Eng. 2023, 105, 108543. [Google Scholar] [CrossRef]
- Zhou, F.; Yang, Q.; Zhong, T.; Chen, D.; Zhang, N. Variational Graph Neural Networks for Road Traffic Prediction in Intelligent Transportation Systems. IEEE Trans. Ind. Inform. 2021, 17, 2802–2812. [Google Scholar] [CrossRef]
- Yin, X.; Wu, G.; Wei, J.; Shen, Y.; Qi, H.; Yin, B. Deep Learning on Traffic Prediction: Methods, Analysis and Future Directions. IEEE Trans. Intell. Transp. Syst. 2021, 23, 4927–4943. [Google Scholar] [CrossRef]
- Yuan, H.; Li, G. A Survey of Traffic Prediction: From Spatio-Temporal Data to Intelligent Transportation. Data Sci. Eng. 2021, 6, 63–85. [Google Scholar] [CrossRef]
- Chandra, S.; Al-Deek, H. Predictions of Freeway Traffic Speeds and Volumes Using Vector Autoregressive Models. J. Intell. Transp. Syst. 2009, 13, 53–72. [Google Scholar] [CrossRef]
- Yu, H.-F.; Rao, N.; Dhillon, I.S. Temporal regularized matrix factorization for high-dimensional time series prediction. In Proceedings of the Proceedings of the 30th International Conference on Neural Information Processing Systems, Barcelona, Spain, 5–10 December 2016; pp. 847–855. [Google Scholar]
- Lippi, M.; Bertini, M.; Frasconi, P. Short-Term Traffic Flow Forecasting: An Experimental Comparison of Time-Series Analysis and Supervised Learning. IEEE Trans. Intell. Transp. Syst. 2013, 14, 871–882. [Google Scholar] [CrossRef]
- Pan, Z.; Zhang, W.; Liang, Y.; Zhang, W.; Yu, Y.; Zhang, J.; Zheng, Y. Spatio-Temporal Meta Learning for Urban Traffic Prediction. IEEE Trans. Knowl. Data Eng. 2022, 34, 1462–1476. [Google Scholar] [CrossRef]
- Ma, X.; Dai, Z.; He, Z.; Ma, J.; Wang, Y.; Wang, Y. Learning Traffic as Images: A Deep Convolutional Neural Network for Large-Scale Transportation Network Speed Prediction. Sensors 2017, 17, 818. [Google Scholar] [CrossRef]
- Zhang, J.; Zheng, Y.; Qi, D. Deep Spatio-Temporal Residual Networks for Citywide Crowd Flows Prediction. In Proceedings of the AAAI Conference on Artificial Intelligence, San Francisco, CA, USA, 4–9 February 2017. [Google Scholar] [CrossRef]
- Ali, A.; Zhu, Y.; Zakarya, M. Exploiting dynamic spatio-temporal correlations for citywide traffic flow prediction using attention based neural networks. Inf. Sci. 2021, 577, 852–870. [Google Scholar] [CrossRef]
- Kipf, T.N.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv 2016, arXiv:1609.02907. [Google Scholar]
- Defferrard, M.; Bresson, X.; Vandergheynst, P. Convolutional neural networks on graphs with fast localized spectral filtering. Adv. Neural Inf. Process. Syst. 2016, 29. [Google Scholar] [CrossRef]
- Elias, V.R.; Martins, W.A.; Werner, S. Extended adjacency and scale-dependent graph Fourier transform via diffusion distances. IEEE Trans. Signal Inf. Process. Over Netw. 2020, 6, 592–604. [Google Scholar] [CrossRef]
- Theofilatos, A.; Yannis, G. A review of the effect of traffic and weather characteristics on road safety. Accid. Anal. Prev. 2014, 72, 244–256. [Google Scholar] [CrossRef] [PubMed]
- Bi, H.; Ye, Z.; Zhu, H. Data-driven analysis of weather impacts on urban traffic conditions at the city level. Urban. Clim. 2022, 41, 101065. [Google Scholar] [CrossRef]
- Shi, X.; Qi, H.; Shen, Y.; Wu, G.; Yin, B. A spatial–temporal attention approach for traffic prediction. IEEE Trans. Intell. Transp. Syst. 2020, 22, 4909–4918. [Google Scholar] [CrossRef]
- Yao, W.; Qian, S. From Twitter to traffic predictor: Next-day morning traffic prediction using social media data. Transp. Res. Part. C Emerg. Technol. 2021, 124, 102938. [Google Scholar] [CrossRef]
- Yang, T.; Yu, X.; Ma, N.; Zhao, Y.; Li, H. A novel domain adaptive deep recurrent network for multivariate time series prediction. Eng. Appl. Artif. Intell. 2021, 106, 104498. [Google Scholar] [CrossRef]
- Du, S.; Li, T.; Yang, Y.; Horng, S.-J. Multivariate time series forecasting via attention-based encoder–decoder framework. Neurocomputing 2020, 388, 269–279. [Google Scholar] [CrossRef]
- Storani, F.; Di Pace, R.; Bruno, F.; Fiori, C. Analysis and comparison of traffic flow models: A new hybrid traffic flow model vs. benchmark models. Eur. Transp. Res. Rev. 2021, 13, 58. [Google Scholar] [CrossRef]
- Williams, B.M.; Hoel, L.A. Modeling and forecasting vehicular traffic flow as a seasonal ARIMA process: Theoretical basis and empirical results. J. Transp. Eng. 2003, 129, 664–672. [Google Scholar] [CrossRef]
- Kumar, S.V. Traffic Flow Prediction using Kalman Filtering Technique. Procedia Eng. 2017, 187, 582–587. [Google Scholar] [CrossRef]
- Ma, X.; Tao, Z.; Wang, Y.; Yu, H.; Wang, Y. Long short-term memory neural network for traffic speed prediction using remote microwave sensor data. Transp. Res. Part. C Emerg. Technol. 2015, 54, 187–197. [Google Scholar] [CrossRef]
- Chung, J.; Gulcehre, C.; Cho, K.; Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar]
- Chen, X.; Chen, S.; Yao, J.; Zheng, H.; Zhang, Y.; Tsang, I.W. Learning on attribute-missing graphs. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 44, 740–757. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30. [Google Scholar] [CrossRef]
- Zhang, C.; James, J.; Liu, Y. Spatial-temporal graph attention networks: A deep learning approach for traffic forecasting. IEEE Access 2019, 7, 166246–166256. [Google Scholar] [CrossRef]
- Guo, S.; Lin, Y.; Feng, N.; Song, C.; Wa, H. Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 21 January–1 February 2019. [Google Scholar]
- Song, C.; Lin, Y.; Guo, S.; Wan, H. Spatial-temporal synchronous graph convolutional networks: A new framework for spatial-temporal network data forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; pp. 914–921. [Google Scholar]
- Luo, X.; Zhu, C.; Zhang, D.; Li, Q. Dynamic Graph Convolution Network with Spatio-Temporal Attention Fusion for Traffic Flow Prediction. arXiv 2023, arXiv:2302.12598. [Google Scholar]
- Li, Y.; Yu, R.; Shahabi, C.; Liu, Y. Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. arXiv 2017, arXiv:1707.01926. [Google Scholar]
- Cirstea, R.-G.; Yang, B.; Guo, C.; Kieu, T.; Pan, S. Towards spatio-temporal aware traffic time series forecasting. In Proceedings of the 2022 IEEE 38th International Conference on Data Engineering (ICDE), Kuala Lumpur, Malaysia, 9–12 May 2022; pp. 2900–2913. [Google Scholar]
- Bai, L.; Yao, L.; Li, C.; Wang, X.; Wang, C. Adaptive graph convolutional recurrent network for traffic forecasting. Adv. Neural Inf. Process. Syst. 2020, 33, 17804–17815. [Google Scholar]
- Wu, Z.; Pan, S.; Long, G.; Jiang, J.; Zhang, C. Graph wavenet for deep spatial-temporal graph modeling. arXiv 2019, arXiv:1906.00121. [Google Scholar]
- Zhao, Y.; Lin, Y.; Wen, H.; Wei, T.; Jin, X.; Wan, H. Spatial-Temporal Position-Aware Graph Convolution Networks for Traffic Flow Forecasting. IEEE Trans. Intell. Transp. Syst. 2023, 24, 8650–8666. [Google Scholar] [CrossRef]
- Bao, Y.; Huang, J.; Shen, Q.; Cao, Y.; Ding, W.; Shi, Z.; Shi, Q. Spatial–Temporal Complex Graph Convolution Network for Traffic Flow Prediction. Eng. Appl. Artif. Intell. 2023, 121, 106044. [Google Scholar] [CrossRef]
- Zhang, W.; Yao, R.; Du, X.; Liu, Y.; Wang, R.; Wang, L. Traffic flow prediction under multiple adverse weather based on self-attention mechanism and deep learning models. Phys. A Stat. Mech. Appl. 2023, 625, 128988. [Google Scholar] [CrossRef]
- Nigam, A.; Srivastava, S. Weather impact on macroscopic traffic stream variables prediction using recurrent learning approach. J. Intell. Transp. Syst. 2023, 27, 19–35. [Google Scholar] [CrossRef]
- Geng, X.; Li, Y.; Wang, L.; Zhang, L.; Yang, Q.; Ye, J.; Liu, Y. Spatiotemporal multi-graph convolution network for ride-hailing demand forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; pp. 3656–3663. [Google Scholar]
- Zheng, C.; Fan, X.; Wang, C.; Qi, J. Gman: A graph multi-attention network for traffic prediction. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; pp. 1234–1241. [Google Scholar]
- Zou, G.; Lai, Z.; Wang, T.; Liu, Z.; Bao, J.; Ma, C.; Li, Y.; Fan, J. Multi-task-based spatiotemporal generative inference network: A novel framework for predicting the highway traffic speed. Expert Syst. Appl. 2024, 237, 121548. [Google Scholar] [CrossRef]
- Zhang, F.; Feng, N.; Liu, Y.; Yang, C.; Zhai, J.; Zhang, S.; He, B.; Lin, J.; Du, X. PewLSTM: Periodic LSTM with Weather-Aware Gating Mechanism for Parking Behavior Prediction. In Proceedings of the International Joint Conference on Artificial Intelligence, Yokohama, Japan, 11–17 July 2020; pp. 4424–4430. [Google Scholar]
- Wang, Y.; Ren, Q.; Li, J. Spatial–temporal multi-feature fusion network for long short-term traffic prediction. Expert Syst. Appl. 2023, 224, 119959. [Google Scholar] [CrossRef]
- Grover, A.; Leskovec, J. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, New York, NY, USA, 13–17 August 2016; pp. 855–864. [Google Scholar]
- Zheng, J.; Liu, H.; Feng, Y.; Xu, J.; Zhao, L. CASF-Net: Cross-attention and cross-scale fusion network for medical image segmentation. Comput. Methods Programs Biomed. 2023, 229, 107307. [Google Scholar] [CrossRef] [PubMed]
- Tian, R.; Wang, C.; Hu, J.; Ma, Z. Multi-scale spatial-temporal aware transformer for traffic prediction. Inf. Sci. 2023, 648, 119557. [Google Scholar] [CrossRef]
- Huang, S.; Wu, Q. Robust pairwise learning with Huber loss. J. Complex. 2021, 66, 101570. [Google Scholar] [CrossRef]
- Chen, C.; Liu, Y.; Chen, L.; Zhang, C. Bidirectional Spatial-Temporal Adaptive Transformer for Urban Traffic Flow Forecasting. IEEE Trans. Neural Netw. Learn. Syst. 2022, 34, 6913–6925. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions, and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions, or products referred to in the content. |
Datasets | Nodes | Edges | Time Interval | Duration | Time Steps Length |
---|---|---|---|---|---|
PeMS04 | 307 | 340 | 5 min | 1 January 2018~28 February 2018 | 16,992 |
PeMS08 | 170 | 296 | 5 min | 1 July 2016~31 August 2016 | 17,856 |
Module | PEMS04 | PEMS08 | ||||
---|---|---|---|---|---|---|
MAE | RMSE | MAPE (%) | MAE | RMSE | MAPE (%) | |
HA | 38.03 | 59.24 | 27.88% | 34.86 | 52.04 | 24.07% |
LSTM | 28.91 | 37.93 | 33.31% | 23.15 | 34.46 | 21.86% |
GRU | 24.05 | 35.51 | 24.88% | 21.43 | 25.58 | 21.59% |
GCN | 34.84 | 51.43 | 25.45% | 35.14 | 49.12 | 22.26% |
GAT | 34.22 | 50.99 | 25.07% | 33.89 | 48.03 | 23.32% |
DCRNN | 24.93 | 36.38 | 15.48% | 17.86 | 27.84 | 11.46% |
AGCRN | 20.16 | 32.12 | 11.42% | 16.77 | 27.28 | 11.99% |
ST-CGCN | 20.79 | 33.62 | 14.21% | 17.84 | 26.43 | 11.37% |
GMAN | 19.41 | 31.06 | 13.55% | 14.51 | 24.68 | 10.45% |
ST-WA | 19.25 | 28.54 | 13.05% | 14.44 | 23.61 | 11.32% |
STPGCN | 19.36 | 30.97 | 11.75% | 14.53 | 24.62 | 9.94% |
AFDGCN | 26.45 | 37.50 | 14.46% | 19.09 | 31.01 | 12.62% |
STSGCN | 21.26 | 33.68 | 13.96% | 17.44 | 26.82 | 11.01% |
ASTGCN | 22.17 | 35.69 | 16.45% | 18.88 | 29.17 | 11.34% |
WST-Anet (ours) | 18.59 | 30.03 | 11.79% | 13.92 | 24.04 | 10.39% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhong, H.; Wang, J.; Chen, C.; Wang, J.; Li, D.; Guo, K. Weather Interaction-Aware Spatio-Temporal Attention Networks for Urban Traffic Flow Prediction. Buildings 2024, 14, 647. https://doi.org/10.3390/buildings14030647
Zhong H, Wang J, Chen C, Wang J, Li D, Guo K. Weather Interaction-Aware Spatio-Temporal Attention Networks for Urban Traffic Flow Prediction. Buildings. 2024; 14(3):647. https://doi.org/10.3390/buildings14030647
Chicago/Turabian StyleZhong, Hua, Jian Wang, Cai Chen, Jianlong Wang, Dong Li, and Kailin Guo. 2024. "Weather Interaction-Aware Spatio-Temporal Attention Networks for Urban Traffic Flow Prediction" Buildings 14, no. 3: 647. https://doi.org/10.3390/buildings14030647