MobileNetV3–Transformer-Based Prediction of Highway Accident Severity
Abstract
1. Introduction
2. Related Works
2.1. Study on Factors Affecting Accident Severity
2.2. Study on Accident Severity Prediction Model
2.3. Interpretability Study of Accident Severity Prediction Models
3. Methodology
3.1. MobileNetV3
- Depthwise Separable Convolution
- Squeeze-and-Excitation
3.2. Transformer
- Input Embedding and Positional Encoding
- 2.
- Scaled Dot-Product Attention
- 3.
- Multi-Head Attention
- 4.
- Feed-Forward Network, FFN
- 5.
- Layer Normalization
3.3. LSTM-Transformer
3.4. MobileNetV3–Transformer (Large)
4. Results and Discussion
4.1. Dataset
4.2. Selection of Evaluation Metrics
4.3. Experimental Results and Analysis
4.4. Model Interpretability and Key Factor Identification
5. Conclusions and Limitations
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A. Detailed Model Architecture and Hyperparameters
Appendix A.1. Data Preprocessing and GAF Encoding
Appendix A.2. MobileNetV3 Configuration
Appendix A.3. Transformer Encoder Configuration
Appendix A.4. Classification Head
Appendix A.5. Training Settings
| Parameter | Value |
|---|---|
| Batch size | 128 |
| Optimizer | AdamW |
| Learning rate | 0.001 |
| Weight decay | 0.0001 (default for AdamW) |
| Epochs | 100 |
| Loss function | CrossEntropyLoss |
| SMOTE | False |
| Hardware | AMD Ryzen 7 7840 H |
| Framework | PyTorch 22.5.1 |
| Batch size | 128 |
References
- Micheale, K.G. Road traffic accident: Human security perspective. Int. J. Peace Dev. Stud. 2017, 8, 19–25. [Google Scholar] [CrossRef]
- World Health Organization. Global Status Report on Road Safety 2023; WHO: Geneva, Switzerland, 2023. [Google Scholar]
- Yan, X.; Harb, R.; Radwan, E. Analyses of factors of crash avoidance maneuvers using the General Estimates System. Traffic Inj. Prev. 2008, 9, 173–180. [Google Scholar] [CrossRef]
- Miaou, S.P. The relationship between truck accidents and geometric design of road sections: Poisson versus negative binomial regressions. Accid. Anal. Prev. 1994, 26, 471–480. [Google Scholar] [CrossRef]
- Lancsar, E.; Fiebig, D.G.; Hole, A.R. Discrete choice experiments: A guide to model specification, estimation and software. Pharmacoeconomics 2017, 35, 697–716. [Google Scholar] [CrossRef]
- Chen, Z. Analysis and Prediction of Road Traffic Accident Severity Considering Weather and Road Conditions. Master’s Thesis, Beijing Jiaotong University, Beijing, China, 2022. [Google Scholar]
- Wang, L. Analysis of Accident Severity at Intersections Based on XGBoost and SVM. Master’s Thesis, Beijing Jiaotong University, Beijing, China, 2022. [Google Scholar]
- Liu, J.; Leng, J.; Shang, P.; Luo, L. Analysis of highway accidents and severity factors under icy and snowy road conditions. J. Harbin Inst. Technol. 2022, 54, 1–10. [Google Scholar]
- Delen, D.; Sharda, R.; Bessonov, M. Identifying significant predictors of injury severity in traffic accidents using a series of artificial neural networks. Accid. Anal. Prev. 2006, 38, 434–444. [Google Scholar] [CrossRef] [PubMed]
- Rahim, M.A.; Hassan, H.M. A deep learning based traffic crash severity prediction framework. Accid. Anal. Prev. 2021, 154, 106090. [Google Scholar] [CrossRef]
- Zeiler, M.D.; Fergus, R. Visualizing and Understanding Convolutional Networks. In Computer Vision—ECCV.; Springer: Cham, Switzerland, 2014; pp. 818–833. [Google Scholar] [CrossRef]
- Li, G.; Wu, Y.; Bai, Y.; Zhang, W. ReMAHA-CatBoost: Addressing imbalanced data in traffic accident prediction tasks. Appl. Sci. 2023, 13, 13123. [Google Scholar] [CrossRef]
- Mohanty, M.; Gupta, A. Factors affecting road crash modeling. J. Transp. Lit. 2015, 9, 15–19. [Google Scholar] [CrossRef]
- Santamariña-Rubio, E.; Pérez, K.; Olabarria, M.; Novoa, A.M. Gender differences in road traffic injury rate using time travelled as a measure of exposure. Accid. Anal. Prev. 2014, 65, 1–7. [Google Scholar] [CrossRef]
- Choudhary, P.; Pawar, N.M.; Velaga, N.R.; Pawar, D.S. Overall performance impairment and crash risk due to distracted driving: A comprehensive analysis using structural equation modelling. Transp. Res. Part F Traffic Psychol. Behav. 2020, 74, 120–138. [Google Scholar] [CrossRef]
- Behzadi Goodari, M.; Sharifi, H.; Dehesh, P.; Mosleh-Shirazi, M.A.; Dehesh, T. Factors affecting the number of road traffic accidents in Kerman province, southeastern Iran (2015–2021). Sci. Rep. 2023, 13, 6662. [Google Scholar] [CrossRef]
- Çelik, A.K.; Oktay, E. A multinomial logit analysis of risk factors influencing road traffic injury severities in the Erzurum and Kars provinces of Turkey. Accid. Anal. Prev. 2014, 72, 66–77. [Google Scholar] [CrossRef] [PubMed]
- AlKheder, S.; AlRukaibi, F.; Aiash, A. Risk analysis of traffic accidents’ severities: An application of three data mining models. ISA Trans. 2020, 106, 213–220. [Google Scholar] [CrossRef] [PubMed]
- Habib, M.F.; Motuba, D.; Huang, Y. Beyond the surface: Exploring the temporally stable factors influencing injury severities in large-truck crashes using mixed logit models. Accid. Anal. Prev. 2024, 205, 107650. [Google Scholar] [CrossRef] [PubMed]
- Ratanavaraha, V.; Suangka, S. Impacts of accident severity factors and loss values of crashes on expressways in Thailand. IATSS Res. 2014, 37, 130–136. [Google Scholar] [CrossRef]
- Haq, M.T.; Zlatkovic, M.; Ksaibati, K. Investigating occupant injury severity of truck-involved crashes based on vehicle types on a mountainous freeway: A hierarchical Bayesian random intercept approach. Accid. Anal. Prev. 2020, 144, 105654. [Google Scholar] [CrossRef]
- Liu, X.; Wu, H.; Yu, D.; Chen, Y.; Wu, H. A construction and representation learning method for a traffic accident knowledge graph based on the enhanced TransD model. Appl. Sci. 2025, 15, 6031. [Google Scholar] [CrossRef]
- Hou, Q.; Meng, X.; Huo, X.; Cheng, Y.; Leng, J. Effects of freeway climbing lane on crash frequency: Application of propensity scores and potential outcomes. Phys. A 2019, 517, 246–256. [Google Scholar] [CrossRef]
- Abbas, K.A. Traffic safety assessment and development of predictive models for accidents on rural roads in Egypt. Accid. Anal. Prev. 2004, 36, 149–163. [Google Scholar] [CrossRef]
- Jiang, X.; Huang, B.; Zaretzki, R.L.; Richards, S.; Yan, X.; Zhang, H. Investigating the influence of curbs on single-vehicle crash injury severity utilizing zero-inflated ordered probit models. Accid. Anal. Prev. 2013, 57, 55–66. [Google Scholar] [CrossRef] [PubMed]
- Harb, R.; Yan, X.; Radwan, E.; Su, X. Exploring precrash maneuvers using classification trees and random forests. Accid. Anal. Prev. 2009, 41, 98–107. [Google Scholar] [CrossRef]
- Tang, J.; Zheng, L.; Han, C.; Yin, W.; Zhang, Y.; Zou, Y.; Huang, H. Statistical and machine-learning methods for clearance time prediction of road incidents: A methodology review. Anal. Methods Accid. Res. 2020, 27, 100123. [Google Scholar] [CrossRef]
- Olutayo, V.A.; Eludire, A.A. Traffic accident analysis using decision trees and neural networks. Int. J. Inf. Technol. Comput. Sci. 2014, 6, 22–28. [Google Scholar] [CrossRef]
- Yan, M.; Shen, Y. Traffic accident severity prediction based on random forest. Sustainability 2022, 14, 31729. [Google Scholar] [CrossRef]
- Shahdah, U.; Saccomanno, F.; Persaud, B. Integrated traffic conflict model for estimating crash modification factors. Accid. Anal. Prev. 2014, 71, 228–235. [Google Scholar] [CrossRef]
- Sameen, M.I.; Pradhan, B. Severity prediction of traffic accidents with recurrent neural networks. Appl. Sci. 2017, 7, 476. [Google Scholar] [CrossRef]
- Alhaek, F.; Liang, W.; Rajeh, T.M.; Javed, M.H.; Li, T. Learning spatial patterns and temporal dependencies for traffic accident severity prediction: A deep learning approach. Knowl.-Based Syst. 2024, 286, 111406. [Google Scholar] [CrossRef]
- Manzoor, M.; Umer, M.; Sadiq, S.; Ishaq, A.; Ullah, S.; Madni, H.A.; Bisogni, C. RFCNN: Traffic accident severity prediction based on decision level fusion of machine and deep learning model. IEEE Access 2021, 9, 128359–128371. [Google Scholar] [CrossRef]
- Kour, V.; Kumar, S.; Reddy, T.V.; Poojary, K.; Misra, R.; Singh, T.N. Exploring spatiotemporal relational learning with TimeSformer for identifying the severity of the road accidents. IEEE Trans. Comput. Soc. Syst. 2025, 12, 345–356. [Google Scholar] [CrossRef]
- Cicek, E.; Akin, M.; Uysal, F.; Topcu Aytas, R. Comparison of traffic accident injury severity prediction models with explainable machine learning. Transp. Lett. 2023, 15, 1043–1054. [Google Scholar] [CrossRef]
- Ma, Z.; Mei, G.; Cuomo, S. An analytic framework using deep learning for prediction of traffic accident injury severity based on contributing factors. Accid. Anal. Prev. 2021, 160, 106322. [Google Scholar] [CrossRef]
- Roscher, R.; Bohn, B.; Duarte, M.F.; Garcke, J. Explainable machine learning for scientific insights and discoveries. IEEE Access 2020, 8, 42200–42216. [Google Scholar] [CrossRef]
- Howard, A.; Sandler, M.; Chu, G.; Chen, L.C.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; et al. Searching for MobileNetV3. arXiv 2019, arXiv:1905.02244. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 5998–6008. [Google Scholar] [CrossRef]
- Lundberg, S.M.; Lee, S. A unified approach to interpreting model predictions. Nat. Mach. Intell. 2017, 1, 221–227. [Google Scholar] [CrossRef]








| Factor Classification | Factor Name | Factor Classification | Factor Name |
|---|---|---|---|
| Accident information | Number of vehicles | Vehicle factors | Van |
| Number of casualties | Towing and articulation | ||
| Year | Age of vehicle | ||
| Season | Vehicle direction from | ||
| Day of week | Vehicle direction to | ||
| Holiday | Skidding and overturning | ||
| Hour | Offside impact | ||
| Driver factor | Age of driver | Nearside impact | |
| Sex of driver | Front impact | ||
| Environmental factor | Light conditions | Rear impact | |
| Weather conditions | Road factors | Road type | |
| Previous accident | Speed limit | ||
| Special conditions | Road surface conditions |
| Parameter Name | Parameter Value |
|---|---|
| batch size | 128 |
| optimizer | AdamW |
| epochs | 100 |
| LSTM hidden size | 256 |
| activation function | ReLU |
| learning rate | 0.0001 |
| num encoder layers | 2 |
| dropout | 0.1 |
| Models | Acc | Prec | Rec | F1 |
|---|---|---|---|---|
| CNN | 0.8267 | 0.6345 | 0.8390 | 0.6928 |
| LSTM | 0.8988 | 0.9503 | 0.6995 | 0.7825 |
| MobileNetV3 | 0.9007 | 0.9629 | 0.7841 | 0.7860 |
| Transformer | 0.9132 | 0.9623 | 0.7530 | 0.8252 |
| LSTM–Transformer | 0.9194 | 0.9657 | 0.8516 | 0.8329 |
| MobileNetV3–Transformer | 0.9549 | 0.9674 | 0.8290 | 0.8862 |
| Models | F1-Score (Mean ± SD) | p-Value vs. MobileNetV3- Transformer |
|---|---|---|
| CNN | 0.846 ± 0.002 | <0.001 |
| LSTM | 0.841 ± 0.002 | <0.001 |
| MobileNetV3 | 0.844 ± 0.003 | <0.001 |
| Transformer | 0.903 ± 0.001 | <0.001 |
| LSTM–Transformer | 0.904 ± 0.001 | <0.001 |
| MobileNetV3–Transformer | 0.942 ± 0.001 | — |
| Models | Parameters | FLOPs (G) | Inference Time (ms/Sample) |
|---|---|---|---|
| CNN | 0.39 M | 0.002 | 0.0468 |
| LSTM | 0.27 M | 0.0003 | 0.1132 |
| MobileNetV3 | 0.01 M | 0.00001 | 0.1172 |
| Transformer | 0.15 M | 0.0001 | 0.1814 |
| LSTM–Transformer | 0.58 M | 0.0005 | 0.3444 |
| MobileNetV3–Transformer | 0.11 M | 0.0001 | 0.1443 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, L.; Wei, J.; Wang, G.; Yang, X.; Qin, L. MobileNetV3–Transformer-Based Prediction of Highway Accident Severity. Appl. Sci. 2025, 15, 12694. https://doi.org/10.3390/app152312694
Chen L, Wei J, Wang G, Yang X, Qin L. MobileNetV3–Transformer-Based Prediction of Highway Accident Severity. Applied Sciences. 2025; 15(23):12694. https://doi.org/10.3390/app152312694
Chicago/Turabian StyleChen, Liang, Jia Wei, Guoqing Wang, Xiaoxiao Yang, and Lusheng Qin. 2025. "MobileNetV3–Transformer-Based Prediction of Highway Accident Severity" Applied Sciences 15, no. 23: 12694. https://doi.org/10.3390/app152312694
APA StyleChen, L., Wei, J., Wang, G., Yang, X., & Qin, L. (2025). MobileNetV3–Transformer-Based Prediction of Highway Accident Severity. Applied Sciences, 15(23), 12694. https://doi.org/10.3390/app152312694

