Predicting Traffic Flow Parameters for Sustainable Highway Management: An Attention-Based EMD–BiLSTM Approach
Abstract
:1. Introduction
- (1)
- Statistical prediction methods primarily aim for the smallest discrepancy between output data and real data. They seek optimal parameters during the fitting process of historical traffic data, and then incorporate these optimal parameters into the model for optimization, achieving the minimal prediction error, including the ARIMA model [1], SARIMA model [2], and -nearest neighbor (k-NN) model [3]. Within the traffic flow prediction methods based on statistical learning, time series methods predict the future based on the development patterns of historical traffic flow data.
- (2)
- With the global rise in artificial intelligence and big data technologies, scholars from various countries have also started using artificial intelligence techniques for traffic flow parameter prediction, primarily encompassing the recurrent neural network (RNN) [4], the convolutional neural network (CNN), the graph neural network (GNN) [5] and others.
- (1)
- EMD Data Processing and Denoising: We present a novel utilization of empirical mode decomposition (EMD) for the preprocessing and denoising of raw traffic data. EMD effectively decomposes the original traffic flow and speed time series data into intrinsic mode functions, thereby elevating data quality and minimizing the impact of fluctuations. This process provides a more dependable foundation of input data for our model. Furthermore, we have streamlined the input data by focusing on key features that significantly impact traffic prediction, which in turn reduces the complexity and computational demands of the model.
- (2)
- EMD–BiLSTM–Attention Model: Our study introduces an innovative model for predicting traffic flow parameters by combining EMD with bidirectional long short-term memory (BiLSTM) and the attention mechanism. This model proficiently captures spatiotemporal features, leading to more precise predictions of traffic flow and speed. It demonstrates significant performance advantages over traditional forecasting methods. This model employs efficient data preprocessing techniques that reduce the computational burden during the training phase. By optimizing the way data are handled, it has managed to decrease the time and resources required for model training. This research has also carefully designed the architecture of the EMD–BiLSTM–Attention model to ensure that it is as lean as possible without compromising on performance. This involves using fewer layers and parameters, thus reducing the computational load.
2. Literature Review
2.1. Traffic Parameter Prediction Models Based on Statistics
2.2. Traffic Parameter Prediction Models Based on Artificial Intelligence
3. Data Preparation
3.1. Raw Data Description
3.2. Data Denoising Based on the Empirical Mode Decomposition Algorithm
- Step 1: For the original input signal series, traverse the entire time series data , examining each point in sequence to identify its local maxima and minima. Using the cubic spline interpolation method, fit the maxima and minima, resulting in the upper envelope and the lower envelope , respectively.
- Step 2: Calculate the mean of the upper and lower envelopes and define the mean as . This calculation is shown in Equation (2). Define the new signal series as . This new series is obtained by subtracting the envelope mean from the original series, as indicated in Equation (3).
- Step 3: Repeat the above steps 1 and 2 until condition is satisfied. Specifically, the mean of the local maxima and minima upper and lower envelopes should be close to zero, and the difference between the number of extrema and zero-crossings must be no more than one. This results in the extraction of the first IMF denoted as . This IMF is then subtracted from the original signal series to obtain the residual series .
- Step 4: Take the residual series as the new input series and repeat steps 1 to 4. This process continues until the resultant series is a monotonic function or a constant. The final residual series is the residue , and a total of IMFs are obtained through the process.
- Step 5: The EMD algorithm concludes.
3.3. Analysis of Denoised Data
4. Methodology
4.1. Bidirectional Long Short-Term Memory (BiLSTM) Neural Network Algorithm
4.2. Traffic Flow Parameter Prediction Model Based on EMD–Attention–BiLSTM Model
- Input layer: Every min traffic parameter, i.e., volume, speed, and road physical structure, is used as input.
- EMD decomposition: The time series data are decomposed into several IMFs.
- BiLSTM layer: Uses both forward and backward LSTM models.
- Attention layer.
- Output layer.
4.3. Prediction Using EMD–BilSTM–Attention
- Handling Missing Values:
- Sample Construction:
- Sample Preprocessing:
- Model Construction:
- Grid Search for Optimal Parameters:
- Stage 1, Calculating Similarity: Based on the query and the input key–value pairs, calculate their similarity . The calculation formula is shown in Equation (11).is the key vector for the input data;is the calculation model. Common models include dot product model, represented as ; cosine similarity model, represented as ; and MLP, represented as .
- Stage 2, Normalization: The SoftMAX function is introduced for two primary reasons. First, it transforms raw score values into a probability distribution where the weights sum up to . Second, it accentuates the weights of important elements through the intrinsic mechanism of SoftMAX. The attention score value of the query vector against the key vector can be represented as , with the calculation formula shown in Equation (12).
- Stage 3, Weighted Sum: At this stage, the attention scores are summed to yield the attention values of the query vector concerning the input data. The computation can be represented by Equation (13).The computational structure flowchart is shown in Figure 6.
4.4. Evaluation Criteria
5. Experiment and Results
5.1. Experiment Environment
5.2. Performance Comparison among Different Prediction Models
5.3. EMD–Attention–BiLSTM Model Prediction Result Analysis
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Shahriari, S.; Ghasri, M.; Rashidi, T. Ensemble of ARIMA: Combining parametric and bootstrapping technique for traffic flow prediction. Transportmetrica 2020, 16, 1552–1573. [Google Scholar] [CrossRef]
- Lin, X.F.; Huang, Y.Z. Short-Term High-Speed Traffic Flow Prediction Based on ARIMA-GARCH-M Model. Wirel. Pers. Commun. 2021, 117, 3421–3430. [Google Scholar] [CrossRef]
- Guo, J.H.; Huang, W.; Williams, B.M. Adaptive Kalman filter approach for stochastic short-term traffic flow rate prediction and uncertainty quantification. Transp. Research. Part C Emerg. Technol. 2014, 43, 50–64. [Google Scholar] [CrossRef]
- Mers, M.; Yang, Z.Y.; Hsieh, Y.; An, T.Y. Recurrent Neural Networks for Pavement Performance Forecasting: Review and Model Performance Comparison. Transp. Res. Rec. 2023, 2677, 156–178. [Google Scholar] [CrossRef]
- Chen, W.; An, J.; Li, R.; Fu, L.; Xie, G.; Bhuiyan, M.Z.A.; Li, K. A novel fuzzy deep-learning approach to traffic flow prediction with uncertain spatial–temporal data features. Future Gener. Comput. Syst. 2018, 89, 78–88. [Google Scholar] [CrossRef]
- Ahmed, M.A. Analysis of Freeway Traffic Time-Series Data by Using Box-Jenkins Techniques. Transp. Res. Rec. 1979, 17, 1–9. [Google Scholar]
- Clark, S. Traffic prediction using multivaruate nonparametric regression. J. Transp. Eng. 2003, 129, 161–168. [Google Scholar] [CrossRef]
- Thomas, T.; Weijermars, W.; Van, B.E. Predictions of urban volumes in single time series. IEEE Trans. Intell. Transp. Syst. 2010, 11, 71–80. [Google Scholar] [CrossRef]
- Min, W.; Wynter, L. Real-timr road traffic prediction with spatio-temporal correlations. Transp. Res. Part C 2011, 19, 606–616. [Google Scholar] [CrossRef]
- Dia, H. An object-oriented neural network approach to short-term traffic forecasting. Eur. J. Oper. Res. 2001, 131, 253–261. [Google Scholar] [CrossRef]
- Yang, Y.Q.; Lin, J.; Zheng, Y.B. Short-Time Traffic Forecasting in Tourist Service Areas Based on a CNN and GRU Neural Network. Appl. Sci. 2022, 12, 768–799. [Google Scholar]
- Lu, Z.; Lv, W.; Cao, Y.; Xie, Z.; Peng, H.; Du, B. LSTM variants meet graph neural networks for road speed prediction. Neurocomputing 2020, 400, 34–45. [Google Scholar] [CrossRef]
- Byeonghyeop, Y.; Lee, Y.J.; Sohn, K. Forecasting road traffic speeds by considering area-wide spatio-temporal dependencies based on a graph convolutional neural network (GCN). Transp. Res. Part C: Emerg. Technol. 2020, 114, 189–204. [Google Scholar]
- Do, L.N.; Vu, H.L.; Vo, B.Q.; Liu, Z.; Phung, D. An effective spatial-temporal attention based neural network for traffic flow prediction. Transp. Res. Part C Emerg. Technol. 2019, 108, 12–28. [Google Scholar] [CrossRef]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Wang, Y.; Long, M.; Wang, J.; Gao, Z.; Yu, P.S. Predrnn: Recurrent neural networks for predictive learning using spatiotemporal lstms. In Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 879–888. [Google Scholar]
- Feng, X.X.; Ling, X.Y.; Zheng, H.F.; Chen, Z.; Xu, Y. Adaptive Multi-Kernel SVM With Spatial-Temporal Correlation for Short-Term Traffic Flow Prediction. IEEE Trans. Intell. Transp. Syst. 2019, 20, 2001–2013. [Google Scholar] [CrossRef]
- Olayode, I.; Tartibu, L.K.; Okwu, M.; Severino, A. Comparative Traffic Flow Prediction of a Heuristic ANN Model and a Hybrid ANN-PSO Model in the Traffic Flow Modelling of Vehicles at a Four-Way Signalized Road Intersection. Sustainability 2021, 13, 119–10704. [Google Scholar] [CrossRef]
- Maryam, S.; Collin, M.; Wanxin, L.; Xiaoliang, Z.; Mark, N. Traffic prediction using artificial intelligence: Review of recent advances and emerging opportunities. Transp. Res. Part C Emerg. Technol. 2022, 145, 103921. [Google Scholar]
- Rilling, G.; Flandrin, P.; Goncalves, P. On empirical mode decomposition and its algorithms. In Proceedings of the IEEE-EURASIP Workshop on Nonlinear Signal and Image Processing, Grado IEEE, Antalya, Turkey, 20–23 June 2003; Volume 3, pp. 8–11. [Google Scholar]
- Guo, Z.; Zhang, Y.; Lu, W. Attention guided graph convolutional networks for relation extraction. arXiv 2019, arXiv:1906.07510. [Google Scholar]
Model | Prediction Type | |||
---|---|---|---|---|
Volume | Speed | |||
RMSE | MAE | RMSE | MAE | |
ARIMA | 8.79851 | 6.34704 | 6.97533 | 5.47037 |
LSTM | 8.53072 | 6.44815 | 5.33418 | 4.23885 |
BiLSTM | 6.74355 | 5.55348 | 5.02398 | 4.20131 |
EMD–BiLSTM–Attention | * 6.03410 | * 5.01282 | * 4.98031 | * 3.32175 |
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. |
© 2023 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
Rui, Y.; Gong, Y.; Zhao, Y.; Luo, K.; Lu, W. Predicting Traffic Flow Parameters for Sustainable Highway Management: An Attention-Based EMD–BiLSTM Approach. Sustainability 2024, 16, 190. https://doi.org/10.3390/su16010190
Rui Y, Gong Y, Zhao Y, Luo K, Lu W. Predicting Traffic Flow Parameters for Sustainable Highway Management: An Attention-Based EMD–BiLSTM Approach. Sustainability. 2024; 16(1):190. https://doi.org/10.3390/su16010190
Chicago/Turabian StyleRui, Yikang, Yannan Gong, Yan Zhao, Kaijie Luo, and Wenqi Lu. 2024. "Predicting Traffic Flow Parameters for Sustainable Highway Management: An Attention-Based EMD–BiLSTM Approach" Sustainability 16, no. 1: 190. https://doi.org/10.3390/su16010190
APA StyleRui, Y., Gong, Y., Zhao, Y., Luo, K., & Lu, W. (2024). Predicting Traffic Flow Parameters for Sustainable Highway Management: An Attention-Based EMD–BiLSTM Approach. Sustainability, 16(1), 190. https://doi.org/10.3390/su16010190