journal article·2025-09-29Open access

A Two-Layer Stacking Model for Expressway Traffic Accident Rate Prediction: Leveraging Neural Networks and Tree-Based Models

Yanting Hu, Shifeng Niu, Chenhao Zhao, Jianyu Song

Applied Sciences· Volume 15· Issue 19

Abstract

Given the high casualty rate on expressways, this study aimed to accurately predict traffic accident rates and the key factors influencing them. Taking an expressway in Southern China as the research object, we constructed a two-layer stacking model integrating neural networks and tree models, based on accident data, traffic flow data, and road segment characteristic data. Six base models were integrated for prediction, and the Shapley Additive exPlanations (SHAP) method was used to analyze influencing factors. Results showed that the proposed model achieved the best performance, with a root mean square error (RMSE) of 11.05 and a mean absolute error (MAE) of 6.12, and its performance was significantly superior to that of other models (p < 0.05). Results from hyperparameter optimization and 5-fold cross-validation indicated that the proposed model had an RMSE of 8.91 ± 2.03, which was better than that of other models. Among all input factors, the proportion of tunnel length to total length and the variance of bridge width had the most significant impact on the expressway traffic accident rate, while the average width of tunnels had the lowest impact. This study realizes accurate prediction using widely available data and clarifies key factor mechanisms, providing support for expressway safety management and early risk warnings.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Traffic and Road Safety · Traffic Prediction and Management Techniques · Traffic control and management

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

School of Automobile, Chang’an University, Xi’an 710000, China

References (33)

Show source-provided references
1. (2023). Global Status Report on Road Safety 2023, World Health Organization. [1st ed.].
2. Analysis of Injury Severity in Traffic Crashes: A Case Study of Korea Expressways10.1007/s12205-012-1527-3 ↗
3. Negative Binomial Analysis of Intersection-Accident Frequencies10.1061/(ASCE)0733-947X(1996)122:2(105) ↗
4. Comparison of Two Negative Binomial Regression Techniques in Developing Accident Prediction Models10.1177/0361198106195000102 ↗
5. Empirical Assessment of the Impact of Highway Design Exceptions on the Frequency and Severity of Vehicle Accidents10.1016/j.aap.2009.07.013 ↗
6. Deretić, N., Stanimirović, D., Awadh, M.A., Vujanović, N., and Djukić, A. (2022). SARIMA Modelling Approach for Forecasting of Traffic Accidents. Sustainability, 14.10.3390/su14084403 ↗
7. Effects of Low Sample Mean Values and Small Sample Size on the Estimation of the Fixed Dispersion Parameter of Poisson-Gamma Models for Modeling Motor Vehicle Crashes: A Bayesian Perspective10.1016/j.ssci.2007.03.005 ↗
8. Modeling Road Traffic Crashes with Zero-Inflation and Site-Specific Random Effects10.1007/s10260-010-0136-x ↗
9. Analysing the Main and Interaction Effects of Commercial Vehicle Mix and Roadway Attributes on Crash Rates Using a Bayesian Random-Parameter Tobit Model10.1016/j.aap.2021.106089 ↗
10. A Correlated Random Parameters Tobit Model to Analyze the Safety Effects and Temporal Instability of Factors Affecting Crash Rates10.1016/j.aap.2019.105326 ↗
11. A Bayesian Spatial Random Parameters Tobit Model for Analyzing Crash Rates on Roadway Segments10.1016/j.aap.2016.12.023 ↗
12. A Multivariate Random-Parameters Tobit Model for Analyzing Highway Crash Rates by Injury Severity10.1016/j.aap.2016.11.018 ↗
13. A Study of Factors Affecting Highway Accident Rates Using the Random-Parameters Tobit Model10.1016/j.aap.2011.09.015 ↗
14. Markov Switching Negative Binomial Models: An Application to Vehicle Accident Frequencies10.1016/j.aap.2008.11.001 ↗
15. Application of Finite Mixture Models for Vehicle Crash Data Analysis10.1016/j.aap.2009.03.007 ↗
16. Bias Properties of Bayesian Statistics in Finite Mixture of Negative Binomial Regression Models in Crash Data Analysis10.1016/j.aap.2009.11.002 ↗
17. Predicting Motor Vehicle Crashes Using Support Vector Machine Models10.1016/j.aap.2008.04.010 ↗
18. Verification Analysis of Relationship between Driving Failure Probability and Traffic Accident Rate
19. Traffic Transformer: Transformer-Based Framework for Temporal Traffic Accident Prediction10.3934/math.2024617 ↗
20. Modeling Nonlinear Relationship between Crash Frequency by Severity and Contributing Factors by Neural Networks
21. Traffic Accident Prediction without Object Detection for Single-Vehicle Accidents10.1587/transfun.2024IMP0005 ↗
22. Filapek, A., Faruga, Ł., and Baranowski, J. (2025). Bayesian Modeling of Traffic Accident Rates in Poland Based on Weather Conditions. Appl. Sci., 15.10.3390/app15137332 ↗
23. Predicting Interstate Motor Carrier Crash Rate Level Using Classification Models10.1016/j.aap.2018.06.005 ↗
24. Haykin, S.S. (2009). Neural Networks and Learning Machines, Prentice Hall. [3rd ed.].
25. Lundberg, S., and Lee, S.-I. (2017). A Unified Approach to Interpreting Model Predictions. arXiv.
26. An Integrated Framework for Driving Risk Evaluation That Combines Lane-Changing Detection and an Attention-Based Prediction Model10.1080/15389588.2024.2399301 ↗
27. Factors Affecting Injury Severity in Motorcycle Crashes: Different Age Groups Analysis Using Catboost and SHAP Techniques10.1080/15389588.2023.2297168 ↗
28. Predicting Effects of Built Environment on Fatal Pedestrian Accidents at Location-Specific Level: Application of XGBoost and SHAP10.1016/j.aap.2021.106545 ↗
29. The Significance of Endogeneity Problems in Crash Models: An Examination of Left-Turn Lanes in Intersection Crash Models10.1016/j.aap.2006.04.017 ↗
30. Developing Crash Prediction Models Using Parametric and Nonparametric Approaches for Rural Mountainous Freeways: A Case Study on Wyoming Interstate 8010.1016/j.aap.2018.10.011 ↗
31. Tobit Analysis of Vehicle Accident Rates on Interstate Highways10.1016/j.aap.2007.09.006 ↗
32. Refined-Scale Panel Data Crash Rate Analysis Using Random-Effects Tobit Model10.1016/j.aap.2014.09.025 ↗
33. Stacked Generalization10.1016/S0893-6080(05)80023-1 ↗