Urban Traffic Volume Prediction using LSTM and Bi-LSTM: Performance Evaluation on the Metro Interstate Dataset


Andri Pranolo(1*); Shoffan Saifullah(2); Agung Bella Utama Putra(3); Rafał Dreżewski(4); Aji Prasetya Wibawa(5);

(1) Universitas Ahmad Dahlan
(2) AGH University of Krakow
(3) Universitas Negeri Malang
(4) AGH University of Krakow
(5) Universitas Negeri Malang
(*) Corresponding Author

  

Abstract


Urban traffic forecasting underpins the mitigation of congestion, enhancement of road safety, and reduction of emissions in intelligent transportation systems. We benchmark Long Short-Term Memory (LSTM) and Bidirectional LSTM (Bi-LSTM) models on the Metro Interstate Traffic Volume dataset under an identical preprocessing and training pipeline for a fair comparison. Using a 24-hour multivariate input window (temperature, rainfall, snowfall, cloud cover), LSTM delivers the best overall balance of accuracy and efficiency on the full test sequence (RMSE = 0.196, MAPE = 2.36%, R² = 0.480; 7,344 s training). Bi-LSTM achieves competitive short-window accuracy but underperforms on the full sequence (RMSE = 0.231, MAPE = 2.92%, R² = 0.280; 12,672 s training). We attribute the Bi-LSTM gap to prediction "flattening" over long horizons, i.e., over-smoothed peaks from bidirectional averaging, despite its slightly stronger short-segment fit. Compared with prior RNN/GRU/CNN baselines on the same data, LSTM improves variance explanation while remaining deployable for near-real-time use. We also examine seasonality (daily/weekly cycles), weather effects, and data imbalance (peak versus off-peak) as factors that shape model error. These results support LSTM as a practical default for city-scale forecasting and motivate future work with attention/Transformer encoders and richer exogenous signals (incidents, events). The findings inform policy by enabling proactive traffic management that can reduce delays, emissions, and crash risk through earlier, data-driven interventions.

Keywords


LSTM; Bi-LSTM; Deep Learning; Time Series Forecasting; Urban Traffic

  
  

Full Text:

PDF
  

Article Metrics

Abstract view: 127 times
PDF view: 37 times
     

Digital Object Identifier

doi  https://doi.org/10.33096/ilkom.v17i3.3001.227-240
  

Cite

References


M. Elassy, M. Al-Hattab, M. Takruri, and S. Badawi, “Intelligent transportation systems for sustainable smart cities,” Transp. Eng., vol. 16, p. 100252, Jun. 2024, doi: 10.1016/j.treng.2024.100252.

A. A. Musa, S. I. Malami, F. Alanazi, W. Ounaies, M. Alshammari, and S. I. Haruna, “Sustainable Traffic Management for Smart Cities Using Internet-of-Things-Oriented Intelligent Transportation Systems (ITS): Challenges and Recommendations,” Sustainability, vol. 15, no. 13, p. 9859, Jun. 2023, doi: 10.3390/su15139859.

K. Yao, L. Chen, and S. Chen, “Time-evolving traffic resilience performance forecasting during hazardous weather toward proactive intervention,” Reliab. Eng. Syst. Saf., vol. 253, p. 110521, Jan. 2025, doi: 10.1016/j.ress.2024.110521.

H. Huang, J. Chen, R. Sun, and S. Wang, “Short-term traffic prediction based on time series decomposition,” Phys. A Stat. Mech. its Appl., vol. 585, p. 126441, Jan. 2022, doi: 10.1016/j.physa.2021.126441.

C. Gijón, M. Toril, S. Luna-Ramírez, M. L. Marí-Altozano, and J. M. Ruiz-Avilés, “Long-Term Data Traffic Forecasting for Network Dimensioning in LTE with Short Time Series,” Electronics, vol. 10, no. 10, p. 1151, May 2021, doi: 10.3390/electronics10101151.

D. Bouabdallaoui, T. Haidi, F. Elmariami, M. Derri, and E. M. Mellouli, “Application of four machine-learning methods to predict short-horizon wind energy,” Glob. Energy Interconnect., vol. 6, no. 6, pp. 726–737, Dec. 2023, doi: 10.1016/j.gloei.2023.11.006.

W. Li et al., “Location and time embedded feature representation for spatiotemporal traffic prediction,” Expert Syst. Appl., vol. 239, p. 122449, Apr. 2024, doi: 10.1016/j.eswa.2023.122449.

B. Medina-Salgado, E. Sánchez-DelaCruz, P. Pozos-Parra, and J. E. Sierra, “Urban traffic flow prediction techniques: A review,” Sustain. Comput. Informatics Syst., vol. 35, p. 100739, Sep. 2022, doi: 10.1016/j.suscom.2022.100739.

K. Nellore and G. Hancke, “A Survey on Urban Traffic Management System Using Wireless Sensor Networks,” Sensors, vol. 16, no. 2, p. 157, Jan. 2016, doi: 10.3390/s16020157.

A. Khan, M. M. Fouda, D.-T. Do, A. Almaleh, and A. U. Rahman, “Short-Term Traffic Prediction Using Deep Learning Long Short-Term Memory: Taxonomy, Applications, Challenges, and Future Trends,” IEEE Access, vol. 11, pp. 94371–94391, 2023, doi: 10.1109/ACCESS.2023.3309601.

Y. Mao, A. Pranolo, A. P. Wibawa, A. B. Putra Utama, F. A. Dwiyanto, and S. Saifullah, “Selection of Precise Long Short Term Memory (LSTM) Hyperparameters based on Particle Swarm Optimization,” 2022 Int. Conf. Appl. Artif. Intell. Comput., pp. 1114–1121, May 2022, doi: 10.1109/ICAAIC53929.2022.9792708.

I. D. Mienye, T. G. Swart, and G. Obaido, “Recurrent Neural Networks: A Comprehensive Review of Architectures, Variants, and Applications,” Information, vol. 15, no. 9, p. 517, Aug. 2024, doi: 10.3390/info15090517.

E. Elgohary, M. Galal, M. Aref, and M. Gharib, “Long Short-Term Memory and Gated Recurrent Unit for Automated Deep Learning Prediction,” IJCI. Int. J. Comput. Inf., pp. 0–0, Jan. 2024, doi: 10.21608/ijci.2024.235027.1119.

W. Shu, K. Cai, and N. N. Xiong, “A Short-Term Traffic Flow Prediction Model Based on an Improved Gate Recurrent Unit Neural Network,” IEEE Trans. Intell. Transp. Syst., vol. 23, no. 9, pp. 16654–16665, Sep. 2022, doi: 10.1109/TITS.2021.3094659.

C. Ounoughi and S. Ben Yahia, “Sequence to sequence hybrid Bi-LSTM model for traffic speed prediction,” Expert Syst. Appl., vol. 236, p. 121325, Feb. 2024, doi: 10.1016/j.eswa.2023.121325.

B. Naheliya, P. Redhu, and K. Kumar, “MFOA-Bi-LSTM: An optimized bidirectional long short-term memory model for short-term traffic flow prediction,” Phys. A Stat. Mech. its Appl., vol. 634, p. 129448, Jan. 2024, doi: 10.1016/j.physa.2023.129448.

A. Pranolo, S. Saifullah, A. Bella Utama, A. P. Wibawa, M. Bastian, and C. Hardiyanti P, “High-performance traffic volume prediction: An evaluation of RNN, GRU, and CNN for accuracy and computational trade-offs,” BIO Web Conf., vol. 148, p. 02034, Jan. 2024, doi: 10.1051/bioconf/202414802034.

H. Alizadegan, B. Rashidi Malki, A. Radmehr, H. Karimi, and M. A. Ilani, “Comparative study of long short-term memory (LSTM), bidirectional LSTM, and traditional machine learning approaches for energy consumption prediction,” Energy Explor. Exploit., vol. 43, no. 1, pp. 281–301, Jan. 2025, doi: 10.1177/01445987241269496.

O. A. Wani et al., “Predicting rainfall using machine learning, deep learning, and time series models across an altitudinal gradient in the North-Western Himalayas,” Sci. Rep., vol. 14, no. 1, p. 27876, Nov. 2024, doi: 10.1038/s41598-024-77687-x.

B.-L. Ye, M. Zhang, L. Li, C. Liu, and W. Wu, “A Survey of Traffic Flow Prediction Methods Based on Long Short-Term Memory Networks,” IEEE Intell. Transp. Syst. Mag., vol. 16, no. 5, pp. 87–112, Sep. 2024, doi: 10.1109/MITS.2024.3400679.

C. Wu et al., “Time-Series Data-Driven PM2.5 Forecasting: From Theoretical Framework to Empirical Analysis,” Atmosphere (Basel)., vol. 16, no. 3, p. 292, Feb. 2025, doi: 10.3390/atmos16030292.

H. Abbasimehr and R. Paki, “Improving time series forecasting using LSTM and attention models,” J. Ambient Intell. Humaniz. Comput., vol. 13, no. 1, pp. 673–691, Jan. 2022, doi: 10.1007/s12652-020-02761-x.

N. Ranjan, S. Bhandari, H. P. Zhao, H. Kim, and P. Khan, “City-Wide Traffic Congestion Prediction Based on CNN, LSTM and Transpose CNN,” IEEE Access, vol. 8, pp. 81606–81620, 2020, doi: 10.1109/ACCESS.2020.2991462.

K. S. Kumar, K. Abirami, C. H. Sulochana, T. A. Kumar, S. A. Ajagbe, and C. Morris, “Multimodal Spatial-Temporal Prediction and Classification Using Deep Learning,” in A, J., Abimannan, S., El-Alfy, ES.M., Chang, YS. (eds) Spatiotemporal Data Analytics and Modeling. Big Data Management, Singapore: Springer, 2024, pp. 89–114.

Y. Li, M. Liang, H. Li, Z. Yang, L. Du, and Z. Chen, “Deep learning-powered vessel traffic flow prediction with spatial-temporal attributes and similarity grouping,” Eng. Appl. Artif. Intell., vol. 126, p. 107012, Nov. 2023, doi: 10.1016/j.engappai.2023.107012.

T. Liu, A. Jiang, X. Miao, Y. Tang, Y. Zhu, and H. K. Kwan, “Graph-Based Dynamic Modeling and Traffic Prediction of Urban Road Network,” IEEE Sens. J., vol. 21, no. 24, pp. 28118–28130, Dec. 2021, doi: 10.1109/JSEN.2021.3124818.

J. Chen, D. Li, G. Zhang, and X. Zhang, “Localized Space-Time Autoregressive Parameters Estimation for Traffic Flow Prediction in Urban Road Networks,” Appl. Sci., vol. 8, no. 2, p. 277, Feb. 2018, doi: 10.3390/app8020277.

Y. He, P. Huang, W. Hong, Q. Luo, L. Li, and K.-L. Tsui, “In-Depth Insights into the Application of Recurrent Neural Networks (RNNs) in Traffic Prediction: A Comprehensive Review,” Algorithms, vol. 17, no. 9, p. 398, Sep. 2024, doi: 10.3390/a17090398.

H. Yang, W. Yu, G. Zhang, and L. Du, “Network-Wide Traffic Flow Dynamics Prediction Leveraging Macroscopic Traffic Flow Model and Deep Neural Networks,” IEEE Trans. Intell. Transp. Syst., vol. 25, no. 5, pp. 4443–4457, May 2024, doi: 10.1109/TITS.2023.3329489.

K. Cao, T. Zhang, and J. Huang, “Advanced hybrid LSTM-transformer architecture for real-time multi-task prediction in engineering systems,” Sci. Rep., vol. 14, no. 1, p. 4890, Feb. 2024, doi: 10.1038/s41598-024-55483-x.

D. Salman, C. Direkoglu, M. Kusaf, and M. Fahrioglu, “Hybrid deep learning models for time series forecasting of solar power,” Neural Comput. Appl., vol. 36, no. 16, pp. 9095–9112, Jun. 2024, doi: 10.1007/s00521-024-09558-5.

B. Lim and S. Zohren, “Time-series forecasting with deep learning: a survey,” Philos. Trans. R. Soc. A Math. Phys. Eng. Sci., vol. 379, no. 2194, p. 20200209, Apr. 2021, doi: 10.1098/rsta.2020.0209.

A. Boukerche and J. Wang, “Machine Learning-based traffic prediction models for Intelligent Transportation Systems,” Comput. Networks, vol. 181, p. 107530, Nov. 2020, doi: 10.1016/j.comnet.2020.107530.

K. Ibrahim Mohammad Ata, M. Khair Hassan, A. Ghany Ismaeel, S. Abdul Rahman Al-Haddad, T. Alquthami, and S. Alani, “A multi-Layer CNN-GRUSKIP model based on transformer for spatial −TEMPORAL traffic flow prediction,” Ain Shams Eng. J., p. 103045, Sep. 2024, doi: 10.1016/j.asej.2024.103045.

Z. Zhou and T. Zhan, “The Improved Bi-LSTM-Transformer Model and its Application,” in 2024 5th International Conference on Computer, Big Data and Artificial Intelligence (ICCBD+AI), Nov. 2024, pp. 71–75, doi: 10.1109/ICCBD-AI65562.2024.00019.

J. Hogue, “Metro Interstate Traffic Volume.” 2019.

B. Kovalerchuk and E. McCoy, “Explainable Machine Learning for Categorical and Mixed Data with Lossless Visualization,” in Kovalerchuk, B., Nazemi, K., Andonie, R., Datia, N., Banissi, E. (eds) Artificial Intelligence and Visualization: Advancing Visual Knowledge Discovery. Studies in Computational Intelligence, vol. 1126, Cham: Springer, 2024, pp. 73–123.

M. Shantal, Z. Othman, and A. A. Bakar, “A Novel Approach for Data Feature Weighting Using Correlation Coefficients and Min–Max Normalization,” Symmetry (Basel)., vol. 15, no. 12, p. 2185, Dec. 2023, doi: 10.3390/sym15122185.

R. L. Abduljabbar, H. Dia, and P.-W. Tsai, “Unidirectional and Bidirectional LSTM Models for Short-Term Traffic Prediction,” J. Adv. Transp., vol. 2021, pp. 1–16, Mar. 2021, doi: 10.1155/2021/5589075.


Refbacks

  • There are currently no refbacks.


Copyright (c) 2025 Andri Pranolo, Shoffan Saifullah, Agung Bella Utama Putra, Rafał Dreżewski, Aji Prasetya Wibawa

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.