Explainable Imbalance-Aware Spatiotemporal Learning for Traffic Accident Risk Prediction in Medan Metropolitan City

Authors

  • Rusmin Saragih STMIK Kaputama, Medan, Indonesia
  • Enda Ribka Meganta P STMIK Kaputama, Medan, Indonesia
  • Theodora MV Nainggolan Universitas Sisingamangaraja XII Tapanuli, Indonesia
  • Frans Ikorasaki Universitas Putra Abadi Langkat, Medan, Indonesia
  • Fithry Tahel Universitas Budi Darma Medan, Indonesia

DOI:

https://doi.org/10.56313/jictas.v5i1.530

Keywords:

Class Imbalance, Explainable Artificial Intelligence, Intelligent Transportation Systems, Spatiotemporal Graph Learning, Traffic Accident Prediction

Abstract

Traffic accident prediction in rapidly urbanizing metropolitan regions remains a critical challenge due to the complex interplay of spatiotemporal dynamics, severe class imbalance, and the opacity of predictive models that limits actionable policy interpretation. Existing approaches tend to address these challenges in isolation—deploying graph neural networks without imbalance correction, or applying oversampling without incorporating spatial context—thereby falling short of the comprehensive decision-support capability demanded by intelligent transportation systems. This paper presents a novel integrated framework, designated SLT-SHAP, that systematically unifies spatiotemporal graph convolutional learning, Synthetic Minority Oversampling Technique (SMOTE) applied exclusively to the training partition, Long Short-Term Memory (LSTM) networks for sequential temporal dependency modeling, a Transformer encoder for long-range contextual attention across hourly traffic sequences, and SHapley Additive exPlanations (SHAP) for post-hoc model interpretability. The study employs a curated spatiotemporal dataset of 132,480 observations collected at hourly resolution across 48 administrative zones in Medan Metropolitan City, Indonesia, encompassing traffic, meteorological, infrastructural, and geospatial variables with an inherent accident class imbalance of 12.4%. Experimental results demonstrate that SLT-SHAP achieves an F1-score of 0.796, AUC-ROC of 0.963, AUPRC of 0.784, and Matthews Correlation Coefficient (MCC) of 0.783, surpassing all baseline and ablation variants. Ablation analysis confirms that each component—graph construction, SMOTE, LSTM, and Transformer—contributes independently to performance. SHAP analysis identifies congestion index, hour of day, and average speed as the three most influential predictors, with spatial heatmapping delineating persistent high-risk zones. The proposed framework offers a replicable and interpretable decision-support architecture for urban road safety analytics in the Indonesian and broader Southeast Asian metropolitan context.

References

C. Nguyen Hai and L. Trinh Duc, ‘Sleep Disorders and Traffic Accidents: Unveiling the Hidden Risks’, Am. J. Case Rep., vol. 25, 2024, doi: 10.12659/AJCR.943346.

R. Saragih, T. Wahyono, I. Sembiring, T. Wellem, and B. Yanto, ‘Hybrid Deep Learning Models with Explainable AI and Reinforcement Learning for Traffic Accident Prediction’, in Proceeding - 2025 4th International Conference on Creative Communication and Innovative Technology: Empowering Transformative MATURE LEADERSHIP: Harnessing Technological Advancement for Global Sustainability, ICCIT 2025, 2025. doi: 10.1109/ICCIT65724.2025.11167723.

A. Abdi, S. Seyedabrishami, and S. O’Hern, ‘A Two-Stage Sequential Framework for Traffic Accident Post-Impact Prediction Utilizing Real-Time Traffic, Weather, and Accident Data’, J. Adv. Transp., vol. 2023, 2023, doi: 10.1155/2023/8737185.

D. Turab et al., ‘Data-driven analysis and prediction of traffic accident dynamics using spatiotemporal modeling and optimized machine learning techniques’, 2026. doi: 10.1007/s41060-025-00938-1.

R. Liu, P. Xing, Z. Deng, A. Li, C. Guan, and H. Yu, ‘Federated Graph Neural Networks: Overview, Techniques, and Challenges’, IEEE Trans. Neural Netw. Learn. Syst., vol. 36, no. 3, 2025, doi: 10.1109/TNNLS.2024.3360429.

Z. Wu, S. Pan, F. Chen, G. Long, C. Zhang, and P. S. Yu, ‘A Comprehensive Survey on Graph Neural Networks’, IEEE Trans. Neural Netw. Learn. Syst., vol. 32, no. 1, 2021, doi: 10.1109/TNNLS.2020.2978386.

A. A. Hasibuan, Ali Amran Nst, Aldi Antoni, Ray Handika, Budi Yanto, and Akhmad Zulkifli, ‘Advanced Classification of Oil Palm Fruit Ripeness Using ResNet50 and Real-Time Image Analysis for Enhanced Agricultural Practices’, JOURNAL OF ICT APLICATIONS AND SYSTEM, vol. 3, no. 2, 2024, doi: 10.56313/jictas.v3i2.395.

Z. Zhang, W. Yang, and S. Wushour, ‘Traffic Accident Prediction Based on LSTM-GBRT Model’, Journal of Control Science and Engineering, vol. 2020, 2020, doi: 10.1155/2020/4206919.

S. U?uz and E. Büyükgöko?lan, ‘A Hybrid CNN-LSTM Model for Traffic Accident Frequency Forecasting During the Tourist Season’, Tehnicki Vjesnik, vol. 29, no. 6, 2022, doi: 10.17559/TV-20220225141756.

M. B. McDermott, H. Zhang, L. H. Hansen, G. Angelotti, and J. Gallifant, ‘A Closer Look at AUROC and AUPRC under Class Imbalance’, in Advances in Neural Information Processing Systems, 2024. doi: 10.52202/079017-1400.

K. Wang, Q. Xue, Y. Xing, and C. Li, ‘Improve aggressive driver recognition using collision surrogate measurement and imbalanced class boosting’, Int. J. Environ. Res. Public Health, vol. 17, no. 7, 2020, doi: 10.3390/ijerph17072375.

A. Franseda, W. Kurniawan, S. Anggraeni, and W. Gata, ‘Integrasi Metode Decision Tree dan SMOTE untuk Klasifikasi Data Kecelakaan Lalu Lintas’, Jurnal Sistem dan Teknologi Informasi (Justin), vol. 8, no. 3, 2020, doi: 10.26418/justin.v8i3.40982.

H. R. Sayegh, W. Dong, and A. M. Al-madani, ‘Enhanced Intrusion Detection with LSTM-Based Model, Feature Selection, and SMOTE for Imbalanced Data’, Applied Sciences (Switzerland), vol. 14, no. 2, 2024, doi: 10.3390/app14020479.

H. Z. Yuan, K. H. Ghazali, A. Lubis, S. Sunardi, and B. Yanto, ‘Implementing Image Processing for Quality Inspection of Car Air Conditioning Vents †’, 2025.

B. Yanto et al., ‘S Mart H Ome M Onitoring P Intu R Umah D Engan I Dentifikasi W Ajah M Enerapkan C Amera Esp32 B Erbasis I O T’, vol. 11, pp. 53–59, 2022.

S. Dong, A. Khattak, I. Ullah, J. Zhou, and A. Hussain, ‘Predicting and Analyzing Road Traffic Injury Severity Using Boosting-Based Ensemble Learning Models with SHAPley Additive exPlanations’, Int. J. Environ. Res. Public Health, vol. 19, no. 5, 2022, doi: 10.3390/ijerph19052925.

F. Qayyum, N. A. Samee, M. Alabdulhafith, A. Aziz, and M. Hijjawi, ‘Shapley-based interpretation of deep learning models for wildfire spread rate prediction’, 2024. doi: 10.1186/s42408-023-00242-y.

K. Rukun, B. H. Hayadi, I. Mouludi, A. Lubis, Safril, and Jufri, ‘Diagnosis of toddler digestion disorder using forward chaining method’, in 2017 5th International Conference on Cyber and IT Service Management, CITSM 2017, 2017. doi: 10.1109/CITSM.2017.8089230.

T. B. Joewono, U. Vandebona, and Y. O. Susilo, ‘Behavioural Causes and Categories of Traffic Violations by Motorcyclists in Indonesian Urban Roads’, Journal of Transportation Safety and Security, vol. 7, no. 2, 2015, doi: 10.1080/19439962.2014.952467.

Y. Boo and Y. Choi, ‘Comparison of mortality prediction models for road traffic accidents: an ensemble technique for imbalanced data’, BMC Public Health, vol. 22, no. 1, 2022, doi: 10.1186/s12889-022-13719-3.

M. Girija and V. Divya, ‘Deep Learning-Based Traffic Accident Prediction: An Investigative Study for Enhanced Road Safety’, EAI Endorsed Transactions on Internet of Things, vol. 10, 2024, doi: 10.4108/eetiot.5166.

Q. He et al., ‘Attention-Based Spatiotemporal Adaptive Graph Diffusion Convolutional Network For Traffic Flow Prediction’, Transp. Res. Rec., vol. 2679, no. 7, 2025, doi: 10.1177/03611981251330897.

J. Chen, Q. Feng, and D. Fan, ‘Vehicle Trajectory Prediction Based on Local Dynamic Graph Spatiotemporal–Long Short-Term Memory Model’, World Electric Vehicle Journal, vol. 15, no. 1, 2024, doi: 10.3390/wevj15010028.

J. M. Johnson and T. M. Khoshgoftaar, ‘Survey on deep learning with class imbalance’, J. Big Data, vol. 6, no. 1, 2019, doi: 10.1186/s40537-019-0192-5.

Y. Cao, R. Jiao, and Z. Wang, ‘CTLE: A Hybrid CNN-Transformer-LSTM Equalizer with Multi-Head Attention for Low-BER Signal Recovery in Multipath Fading Channel’, in 2025 IEEE 5th International Conference on Electronic Technology, Communication and Information, ICETCI 2025, 2025. doi: 10.1109/ICETCI64844.2025.11084190.

O. I. Aboulola, E. A. Alabdulqader, A. A. Alarfaj, S. Alsubai, and T. H. Kim, ‘An Automated Approach for Predicting Road Traffic Accident Severity Using Transformer Learning and Explainable AI Technique’, IEEE Access, vol. 12, 2024, doi: 10.1109/ACCESS.2024.3380895.

S. Kolekar, S. Gite, B. Pradhan, and A. Alamri, ‘Explainable AI in Scene Understanding for Autonomous Vehicles in Unstructured Traffic Environments on Indian Roads Using the Inception U-Net Model with Grad-CAM Visualization’, Sensors, vol. 22, no. 24, 2022, doi: 10.3390/s22249677.

Published

2026-06-11

How to Cite

Saragih, R., Enda Ribka Meganta P, Theodora MV Nainggolan, Frans Ikorasaki, & Fithry Tahel. (2026). Explainable Imbalance-Aware Spatiotemporal Learning for Traffic Accident Risk Prediction in Medan Metropolitan City. Journal of ICT Aplications and System, 5(1), 23-40. https://doi.org/10.56313/jictas.v5i1.530