Accurate traffic accident prediction remains a key challenge in the context of improving road safety, as the traditional statistical approaches often overlook complex spatio-temporal patterns and seasonal dynamics. This study proposes an advanced system for forecasting the number of accidents across five regions of Serbia, based on multi-scale temporal modeling and ensemble machine learning methods. The analysis that was carried out relies on official data from the Road Traffic Safety Agency of the Republic of Serbia covering the 2015-2020 period, and comprising approximately 1.8 million records. Based on this dataset, 185 advanced temporal features were generated in order to capture the short-, medium-, and long-term dynamics of traffic accidents. The proposed model combines the XGBoost, LightGBM, and Random Forest algorithms through a weighted ensemble strategy, with a strict temporal validation and robust protection against data leakage. The experimental results included a mean absolute error of 10.62 ± 0.61 accidents per week per region, corresponding to a 64% and 84% reduction in the value of MAE in comparison with the Naive (Last) and Naive (Mean) baseline approaches, respectively, while achieving a R² value of 0.97 ± 0.01. The regional analysis confirmed the proposed system’s ability to recognize risk heterogeneity with regard to traffic accidents and identify the high-risk periods, particularly in urban areas with a pronounced traffic volatility. This system provides interpretable insights and actionable recommendations, demonstrating its applicability for the Road Traffic Safety Agency and the local governments in planning preventive measures and optimizing the allocation of police and municipal resources.
Traffic accident prediction, Ensemble learning, Temporal feature engineering, Spatio-temporal modeling, Road safety, Machine learning.
Stefan ĆIRKOVIĆ, Aleksa IRIČANIN, Marija BLAGOJEVIĆ, Srećko ĆURČIĆ, "Advanced Multi-Scale Temporal Pattern Recognition for Regional Traffic Accident Prediction: An Ensemble Machine Learning Approach", Studies in Informatics and Control, ISSN 1220-1766, vol. 35(2), pp. 41-51, 2026. https://doi.org/10.24846/v35i2y202604