Advanced Traffic Flow Optimization Using Hybrid Machine Learning and Deep Learning Techniques

Abstract

Road traffic congestion remains a persistent and critical challenge in modern urban environments, adversely affecting travel times, fuel consumption, air quality, and overall urban livability. To address this issue, this study proposes a hybrid ensemble learning framework for accurate short-term traffic flow prediction across signalized urban intersections. The model integrates Random Forest, Gradient Boosting, and Multi-Layer Perceptron within a weighted voting ensemble mechanism, wherein model contributions are dynamically scaled based on individual validation performance. Benchmarking is performed against traditional and advanced baselines, including Linear Regression, Support Vector Regression, and Long Short-Term Memory (LSTM) networks. A real-world traffic dataset, comprising 56 consecutive days of readings from six intersections, is utilized to validate the approach. A robust preprocessing pipeline is implemented, encompassing anomaly detection, temporal feature engineering especially time-of-day and day-of-week normalization, and sliding window encoding to preserve temporal dependencies. Experimental evaluations on 4-intersection and 6-intersection scenarios reveal that the ensemble consistently outperforms all baselines, achieving a peak R² of 0.954 and an RMSE of 0.045. Statistical significance testing using Welch’s t-test confirms the reliability of these improvements. Furthermore, SHAP-based interpretability analysis reveals the dominant influence of temporal features during high-variance periods. While computational overhead and data sparsity during rare events remain limitations, the framework demonstrates strong applicability for deployment in smart traffic systems. Its predictive accuracy and model transparency make it a viable candidate for adaptive signal control, congestion mitigation, and urban mobility planning. Future work may explore real-time streaming adaptation, external event integration, and generalization across heterogeneous urban networks.

Downloads

Download data is not yet available.

References

K. Mohammed Almatar, “Traffic congestion patterns in the urban road network: (Dammam metropolitan ar-ea),” Ain Shams Engineering Journal, vol. 14, no. 3, p. 101886, 2023, doi:https: //doi.org/10.1016/j.asej.2022.101886.

J. Seong, Y. Kim, H. Goh, H. Kim, and A. Stanescu, “Measuring Traffic Congestion with Novel Metrics: A Case Study of Six U.S. Metropolitan Areas,” ISPRS Int J Geoinf, vol. 12, no. 3, 2023, doi: 10.3390/ijgi12030130.

M. Wang and N. Debbage, “Urban morphology and traffic congestion: Longitudinal evidence from US cities,” Comput Environ Urban Syst, vol. 89, p. 101676, Sep. 2021, doi: 10.1016/J.COMPENVURBSYS.2021.101676.

P. González-Aliste, I. Derpich, and M. López, “Re-ducing Urban Traffic Congestion via Charging Price,” Sustainability, vol. 15, no. 3, 2023, doi: 10.3390/su15032086.

M. G. F. Md. Mokhlesur Rahman Pooya Najaf and J.-C. Thill, “Traffic congestion and its urban scale factors: Empirical evidence from American urban areas,” Int J Sustain Transp, vol. 16, no. 5, pp. 406–421, 2022, doi: 10.1080/15568318.2021.1885085.

T. Sipos, A. Afework Mekonnen, and Z. Szabó, “Spa-tial Econometric Analysis of Road Traffic Crashes,” Sustainability, vol. 13, no. 5, 2021, doi: 10.3390/su13052492.

T. Bokaba, W. Doorsamy, and B. S. Paul, “A Compar-ative Study of Ensemble Models for Predicting Road Traffic Congestion,” Applied Sciences, vol. 12, no. 3, 2022, doi: 10.3390/app12031337.

T. Champahom, S. Jomnonkwao, C. Banyong, W. Nambulee, A. Karoonsoontawong, and V. Ratanavaraha, “Analysis of Crash Frequency and Crash Severity in Thailand: Hierarchical Structure Models Approach,” Sustainability, vol. 13, no. 18, 2021, doi: 10.3390/su131810086.

G. Kreindler, “Peak-hour road congestion pricing: Ex-perimental evidence and equilibrium implications,” 2023.

Q. Zhu, Y. Liu, M. Liu, S. Zhang, G. Chen, and H. Meng, “Intelligent Planning and Research on Urban Traffic Congestion,” Future Internet, vol. 13, no. 11, 2021, doi: 10.3390/fi13110284.

J. Zang, P. Jiao, S. Liu, X. Zhang, G. Song, and L. Yu, “Identifying Traffic Congestion Patterns of Urban Road Network Based on Traffic Performance Index,” Sustainability, vol. 15, no. 2, 2023, doi: 10.3390/su15020948.

Z. Fang, Q. Long, G. Song, and K. Xie, “Spatial-Temporal Graph ODE Networks for Traffic Flow Forecasting,” in Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, in KDD ’21. New York, NY, USA: Associa-tion for Computing Machinery, 2021, pp. 364–373. doi: 10.1145/3447548.3467430.

X. Zhang et al., “Traffic Flow Forecasting with Spa-tial-Temporal Graph Diffusion Network,” Proceed-ings of the AAAI Conference on Artificial Intelligence, vol. 35, no. 17, pp. 15008–15015, May 2021, doi: 10.1609/aaai.v35i17.17761.

M. Li and Z. Zhu, “Spatial-Temporal Fusion Graph Neural Networks for Traffic Flow Forecasting,” Pro-ceedings of the AAAI Conference on Artificial Intelli-gence, vol. 35, no. 5, pp. 4189–4196, May 2021, doi: 10.1609/aaai.v35i5.16542.

B. Tu, Y. Zhao, G. Yin, N. Jiang, G. Li, and Y. Zhang, “Research on intelligent calculation method of intelli-gent traffic flow index based on big data mining,” In-ternational Journal of Intelligent Systems, vol. 37, no. 2, pp. 1186–1203.

H. Qin and H. Zhang, “Intelligent traffic light under fog computing platform in data control of real-time traffic flow,” J Supercomput, vol. 77, no. 5, pp. 4461–4483.

F. Cugurullo, R. A. Acheampong, M. Gueriau, and I. Dusparic, “The transition to autonomous cars, the re-design of cities and the futu re of urban sustainability,” Urban Geogr, vol. 42, no. 6, pp. 833–859.

P. Saeidizand, K. Fransen, and K. Boussauw, “Revisit-ing car dependency: A worldwide analysis of car travel in globa l metropolitan areas,” Cities, vol. 120, p. 103467.

A. Essien, I. Petrounias, P. Sampaio, and S. Sampaio, “A deep-learning model for urban traffic flow predic-tion with traffic e vents mined from twitter,” World Wide Web, vol. 24, no. 4, pp. 1345–1368.

M. Akhtar and S. Moridpour, “A review of traffic congestion prediction using artificial intelligenc e,” J Adv Transp, vol. 2021, no. 1, p. 8878011.

K. Ramana et al., “A vision transformer approach for traffic congestion prediction in urb an areas,” IEEE Transactions on Intelligent Transportation Systems, vol. 24, no. 4, pp. 3922–3934.

T. Mzili, I. Mzili, and M. E. Riffi, “Artificial rat opti-mization with decision-making: A bio-inspired me-taheuristic algorithm for solving the traveling salesman problem,” Decision Making: Applications in Manage-ment and Engineering, vol. 6, no. 2, pp. 150–176, Jun. 2023, doi: 10.31181/dmame622023644.

S. Majumdar, M. M. Subhani, B. Roullier, A. Anjum, and R. Zhu, “Congestion prediction for smart sustaina-ble cities using IoT and machi ne learning approach-es,” Sustain Cities Soc, vol. 64, p. 102500.

G. Kothai et al., “A new hybrid deep learning algo-rithm for prediction of wide traffic co ngestion in smart cities,” Wirel Commun Mob Comput, vol. 2021, no. 1, p. 5583874.

C. Li and P. Xu, “Application on traffic flow predic-tion of machine learning in intellig ent transportation,” Neural Comput Appl, vol. 33, no. 2, pp. 613–624.

S. Khatri et al., “Machine learning models and tech-niques for VANET based traffic managem ent: Im-plementation issues and challenges,” Peer Peer Netw Appl, vol. 14, pp. 1778–1805.

C. Li and P. Xu, “Application on traffic flow predic-tion of machine learning in intellig ent transportation,” Neural Comput Appl, vol. 33, no. 2, pp. 613–624.

X. Chen et al., “Traffic flow prediction by an ensem-ble framework with data denoising a nd deep learning model,” Physica A: Statistical Mechanics and Its Ap-plications, vol. 565, p. 125574.

I. Moumen, J. Abouchabaka, and N. Rafalia, “Adap-tive traffic lights based on traffic flow prediction using machine learning models,” International Journal of Electrical and Computer Engineering, vol. 13, no. 5, pp. 5813–5823, Oct. 2023, doi: 10.11591/ijece.v13i5.pp5813-5823.

A. Navarro-Espinoza et al., “Traffic flow prediction for smart traffic lights using machine learnin g algo-rithms,” Technologies (Basel), vol. 10, no. 1, p. 5.

Y. Cai, J. Xu, and S. Jiao, “Intelligent Prediction of Urban Road Network Carrying Capacity and Traffic Flow Based on Deep Learning,” IEEE Trans Veh Technol, pp. 1–13, 2024, doi: 10.1109/TVT.2024.3356519.

Z. Li, J. Cao, X. Shi, and W. Huang, “QPSO-AHES-RC: a hybrid learning model for short-term traffic flow prediction,” Soft comput, vol. 27, no. 14, pp. 9347–9366, 2023, doi: 10.1007/s00500-023-08291-w.

C. Axenie and S. Bortol, “https://zenodo.org/records/3653880.” Accessed: Jul. 27, 2024. [Online]. Available: https://zenodo.org/records/3653880

W. Zhao, “Accurate non-stationary short-term traffic flow prediction method,” 2022, [Online]. Available: https://arxiv.org/abs/2205.00517

H. Khan et al., “Machine learning driven intelligent and self adaptive system for traff ic management in smart cities,” computing, pp. 1–15.

J. Prakash, L. Murali, N. Manikandan, N. Nagaprasad, and K. Ramaswamy, “A vehicular network based in-telligent transport system for smart citie s using ma-chine learning algorithms,” Sci Rep, vol. 14, no. 1, p. 468.

N. U. Khan, M. A. Shah, C. Maple, E. Ahmed, and N. Asghar, “Traffic flow prediction: an intelligent scheme for forecasting traffic flow using air pollution data in smart cities with bagging ensemble,” Sustaina-bility, vol. 14, no. 7, p. 4164.

S. M. Abdullah et al., “Optimizing traffic flow in smart cities: Soft GRU-based recurrent neur al networks for enhanced congestion prediction using deep learning,” Sustainability, vol. 15, no. 7, p. 5949.

M. Bai, Y. Lin, M. Ma, P. Wang, and L. Duan, “PrePCT: Traffic congestion prediction in smart cities with relative po sition congestion tensor,” Neurocom-puting, vol. 444, pp. 147–157.

D. Borup, B. J. Christensen, N. S. Mühlbach, and M. S. Nielsen, “Targeting predictors in random forest re-gression,” Int J Forecast, vol. 39, no. 2, pp. 841–868.

S. A. Zargari, N. A. Khorshidi, H. Mirzahossein, and H. Heidari, “Analyzing the effects of congestion on planning time index–Grey models vs. random forest regression,” International journal of transportation sci-ence and technology, vol. 12, no. 2, pp. 578–593.

M. Geubbelmans, A.-J. Rousseau, T. Burzykowski, and D. Valkenborg, “Artificial neural networks and deep learning,” American Journal of Orthodontics and Dentofacial Orthopedics, vol. 165, no. 2, pp. 248–251.

A. Anagnostopoulos, F. Kehagia, and G. Aretoulis, “Implementation of Multilayer Perceptron and Radial Basis Function Neur al Networks for Estimating Roundabouts Entry Traffic Flow,” Available at SSRN 4725778.

B.-L. Ye, S. Zhu, L. Li, and W. Wu, “Short-term traf-fic flow prediction at isolated intersections based on parallel multi-task learning,” Systems Science & Control Engineering, vol. 12, no. 1, p. 2316160.

S. M. Robeson and C. J. Willmott, “Decomposition of the mean absolute error (MAE) into systematic and unsystematic components,” PLoS One, vol. 18, no. 2 February, Feb. 2023, doi: 10.1371/journal.pone.0279774.

A. Gogineni, M. K. D. Rout, and K. Shubham, “Evalu-ating machine learning algorithms for predicting com-pressive stre ngth of concrete with mineral admixture using long short-term memory ( LSTM) Technique,” Asian Journal of Civil Engineering, vol. 25, no. 2, pp. 1921–1933.

S. A. Gamel, E. Hassan, N. El-Rashidy, and F. M. Ta-laat, “Exploring the effects of pandemics on transpor-tation through correlati ons and deep learning tech-niques,” Multimed Tools Appl, vol. 83, no. 3, pp. 7295–7316.

J. Han, M. Kamber, and J. Pei, “12 - Outlier Detection,” in Data Mining: Concepts and Techniques (Third Edition), J. Han, M. Kamber, and J. Pei, Eds., Boston: Morgan Kaufmann, 2012, pp. 543–584. doi: https://doi.org/10.1016/B978-0-12-381479-1.00012-5.

X. Su, X. Yan, and C.-L. Tsai, “Linear regression,” Wiley Interdiscip Rev Comput Stat, vol. 4, no. 3, pp. 275–294.

G. Biau and E. Scornet, “A random forest guided tour,” Test, vol. 25, no. 2, pp. 197–227.

M. W. Gardner and S. R. Dorling, “Artificial neural networks (the multilayer perceptron)—a review of app lications in the atmospheric sciences,” Atmos Environ, vol. 32, no. 14–15, pp. 2627–2636.

F. A. Gers, J. Schmidhuber, and F. Cummins, “Learning to forget: Continual prediction with LSTM,” Neural Comput, vol. 12, no. 10, pp. 2451–2471.

M. Awad, R. Khanna, M. Awad, and R. Khanna, “Support vector regression,” Efficient learning machines: Theories, concepts, and applications for engineers and system designers, pp. 67–80.

W.-Y. Loh, “Classification and regression trees,” Wiley Interdiscip Rev Data Min Knowl Discov, vol. 1, no. 1, pp. 14–23.

Z. Zhang and M. Sabuncu, “Generalized cross entropy loss for training deep neural networks with noisy labels,” Adv Neural Inf Process Syst, vol. 31.

C. J. Willmott and K. Matsuura, “Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance,” Clim Res, vol. 30, no. 1, pp. 79–82.

T. Chai and R. R. Draxler, “Root mean square error (RMSE) or mean absolute error (MAE)?–Arguments against avoiding RMSE in the literature,” Geosci Model Dev, vol. 7, no. 3, pp. 1247–1250.

S. Nakagawa and H. Schielzeth, “A general and simple method for obtaining R2 from generalized linear m ixed-effects models,” Methods Ecol Evol, vol. 4, no. 2, pp. 133–142.

P. McCullagh, Generalized linear models. Routledge.

Published
2025-06-27
How to Cite
[1]
M. El Kaim Billah and A. Mabrouk, “Advanced Traffic Flow Optimization Using Hybrid Machine Learning and Deep Learning Techniques ”, j.electron.electromedical.eng.med.inform, vol. 7, no. 3, pp. 817-834, Jun. 2025.
Section
Electronics