Submitted:
06 July 2026
Posted:
07 July 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Literature Review
2.1. Highway–Rail Grade Crossing Safety
2.2. Temporal Evolution of Transportation Safety
2.3. Machine Learning and Explainable Artificial Intelligence
2.4. Research Gaps
3. Methodology
3.1. Data Preparation
3.2. Trend Breakpoint Identification
- = total incidents in year
- = slope of the Epoch 0 regime
- = slope of the candidate Epoch 1 regime
- = random error term
- n = number of observations
- h = number of lags evaluated
- = autocorrelation coefficient at lag k
- n is the number of annual observations
- k is the total number of estimated model parameters
3.3. Cross Regime Casualty Analysis
- Ci is the total casualties for incident i
- Ki is the number of fatalities reported for incident i
- Ii is the number of injuries reported for incident i
- Y = 1 denotes an incident involving at least one injury or fatality (casualty)
- Y = 0 denotes an incident involving no reported injuries or fatalities (non-casualty)
- is the observed casualty proportion
- x is the number of casualty incidents
- n is the total number of incidents within the corresponding regime
- and are the observed casualty proportions for the two regimes
- n1 and n2 are the corresponding sample sizes
- is the pooled casualty proportion
- Non-casualty Ci = 0
- Injury Ii > 0 and Ki = 0
- Fatality Ki > 0
- is the observed frequency in cell (i, j)
- is the corresponding expected frequency assuming independence
- r is the number of rows
- c is the number of outcome categories
- is the chi-square statistic
- n is the total number of observations
- k is the smaller of the number of rows or columns in the contingency table
3.4. One-Hot Encoding
3.5. Random Forest Classification
- = predicted casualty class
- = prediction from tree b
- B = total number of trees
- = predictor vector
3.6. SHAP-Based Model Explanation
- = model prediction
- = baseline prediction
- = SHAP contribution of predictor j
- p = total number of predictors
- F = full predictor set
- S = subset of predictors excluding predictor j
- = model prediction using predictor subset S
3.6.1. Global Importance Estimation
- Ij = global importance of predictor j
- N = number of observations
- = SHAP value of predictor j for observation i
3.6.2. Directional Association Analysis
3.6.3. Epoch Comparison
- = SHAP importance
- = predictor rank
- = directional SHAP effect
4. Results
4.1. Data Reduction
4.2. Regime Transition and Plateau Identification
4.3. Cross-Regime Casualty Outcomes
4.4. SHAP Analysis of Casualty Predictors
5. Discussions
5.1. Interpreting the Persistent HRGC Safety Plateau
5.2. Engineering and Policy Implications
5.3. Limitations
6. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Kutela, B.; Kitali, A.E.; Kidando, E.; Mbuya, C.; Langa, N. Exploring the need to model severity of single- and multi-occupant vehicles crashes separately: A case of crashes at highway-rail grade crossings. Int. J. Transp. Sci. Technol. 2022, 12, 996–1005. [Google Scholar]
- Shangguan, Q.; Wang, Y.; Fu, L. Quantifying the effectiveness of an active treatment in improving highway-railway grade crossing safety in Canada: an empirical Bayes observational before–after study. Can. J. Civ. Eng. 2024, 52, 17–28. [Google Scholar]
- Soltaninejad, M.; Salum, J.H.; Kinero, A.; Alluri, P. Modeling highway-rail grade crossing (HRGC) crash severity using statistical and machine learning methods. Int. J. Inj. Control Saf. Promot. 2025, 32, 523–547. [Google Scholar] [CrossRef]
- Badshah, I.; Ali, A.; Lu, P. Risky User Behavior at Highway–Rail Grade Crossings: A Systematic Literature Review with Empirical Insights. Appl. Sci. 2025, 15, 12021. [Google Scholar] [CrossRef]
- Benfaress, I.; Bouhoute, A.; Zinedine, A. Enhancing Traffic Accident Severity Prediction Using ResNet and SHAP for Interpretability. AI 2024, 5, 2568–2585. [Google Scholar] [CrossRef]
- Wang, Y.; Jiao, Y.; Fu, L.; Shangguan, Q. Exploring Causal Factor in Highway–Railroad-Grade Crossing Crashes: A Comparative Analysis. Infrastructures 2025, 10, 216. [Google Scholar] [CrossRef]
- Çiçek, E.; Akın, M.; Uysal, F.; Aytas, R.T. Comparison of traffic accident injury severity prediction models with explainable machine learning. Transp. Lett. 2023, 15, 1043–1054. [Google Scholar] [CrossRef]
- Mostafa, A.M.; Aldughayfiq, B.; Tarek, M.; Alaerjan, A.; Allahem, H.; Elbashir, M.K.; Ezz, M.; Hamouda, E. AI-based prediction of traffic crash severity for improving road safety and transportation efficiency. Sci. Rep. 2025, 15, 27468. [Google Scholar] [CrossRef]
- Se, C.; Champahom, T.; Laphrom, W.; Jomnonkwao, S.; Ratanavaraha, V. Analysis of factors influencing crash injury severities at highway–rail grade crossings accommodating for unobserved heterogeneity. Front. Built Environ. 2023, 9. [Google Scholar] [CrossRef]
- Farooq, M.U.; Khattak, A.J. Investigating Highway–Rail Grade Crossing Inventory Data Quality’s Role in Crash Model Estimation and Crash Prediction. Appl. Sci. 2023, 13, 11537. [Google Scholar] [CrossRef]
- Zhao, L.; Farooq, M.U.; Khattak, A.J. Data Accuracy Matters: Improving Highway-Rail Grade Crossings Crash Predictions through Inventory Verification. Transp. Res. Rec. J. Transp. Res. Board 2024, 2679, 1616–1627. [Google Scholar] [CrossRef]
- Anagnostopoulos, A. Assessing Safety and Infrastructure Design at Railway Level Crossings Through Microsimulation Analysis. Future Transp. 2025, 5, 24. [Google Scholar] [CrossRef]
- Nguyen, N.A.T.; Truong, L.T.; Skarbez, R. Improving Nighttime Visibility and Safety at Passive Railway Level Crossings: New Designs Incorporating Photoluminescent Markings and Signs. Traffic Inj. Prev. 2026, 27, 100–107. [Google Scholar] [PubMed]
- Ladich, M.; Miletics, D. Adaptation of road safety inspection method to railway level crossings. Pollack Period. 2024, 20, 39–45. [Google Scholar]
- Vivek, A.K.; Mohanty, M.; Mohapatra, S.S. Evaluation of Road Users’ Violations at Railroad Grade Crossings. J. Transp. Eng. Part A Syst. 2023, 149. [Google Scholar] [CrossRef]
- Khattak, A.J.; Farooq, M.U.; Farhan, A. Motor Vehicle Drivers’ Knowledge of Safely Traversing Highway-Rail Grade Crossings. Transp. Res. Rec. J. Transp. Res. Board 2023, 2678, 604–621. [Google Scholar] [CrossRef]
- Ren, Q.; Xu, M. Exploring factors affecting the injury severity of highway-rail grade crossing crashes during the COVID-19 pandemic. Transp. Lett. 2024, 17, 816–826. [Google Scholar] [CrossRef]
- Aue, A.; Horváth, L. Structural breaks in time series. J. Time Ser. Anal. 2013, 34, 1–16. [Google Scholar]
- Senkondo, E.; Chimba, D.; Madalo, M.; Yeboah, A.; Blue, S. Comparative Analysis of Machine Learning and Statistical Models for Railroad–Highway Grade Crossing Safety. Vehicles 2025, 7, 163. [Google Scholar] [CrossRef]
- Alanazi, F.; Umar, I.K.; Yosri, A.M.; Okail, M.A. Comparative Evaluation of Deep Learning and Traditional Models for Predicting Traffic Accident Severity in Saudi Arabia. Sci. Rep. 2025, 15, 32568. [Google Scholar] [CrossRef]
- Qi, Z.; Yao, J.; Zou, X.; Pu, K.; Qin, W.; Li, W. Investigating Factors Influencing Crash Severity on Mountainous Two-Lane Roads: Machine Learning Versus Statistical Models. Sustainability 2024, 16, 7903. [Google Scholar] [CrossRef]
- Aboulola, O. Improving traffic accident severity prediction using MobileNet transfer learning model and SHAP XAI technique. PLoS ONE 2024, 19, e0300640. [Google Scholar] [CrossRef] [PubMed]
- Jiang, Y.; Qu, X.; Zhang, W.; Guo, W.; Xu, J.; Yu, W.; Chen, Y. Analyzing Crash Severity: Human Injury Severity Prediction Method Based on Transformer Model. Vehicles 2025, 7, 5. [Google Scholar] [CrossRef]
- Aziz, K.; Chen, F.; Khattak, A. A Novel Bayesian Optimized-Combined Kernel & Tree Boost Approach for Road Traffic Crash Severity Analysis. Int. J. Civ. Eng. 2025, 23, 1483–1501. [Google Scholar] [CrossRef]
- Xiao, Y.; Duan, Z. An explainable multi-task deep learning framework for crash severity prediction using multi-source data. Sci. Rep. 2025, 15, 21978. [Google Scholar] [CrossRef]
- Sunkpho, J.; Se, C.; Wipulanusat, W.; Ratanavaraha, V. SHAP-based convolutional neural network modeling for intersection crash severity on Thailand’s highways. IATSS Res. 2024, 49, 27–41. [Google Scholar]
- Sorum, N.G.; Pal, D. Identification of the best machine learning model for the prediction of driver injury severity. Int. J. Inj. Control Saf. Promot. 2024, 31, 360–375. [Google Scholar] [CrossRef]
- Yan, R.; Hu, L.; Li, J.; Lin, N.K. Accident Severity Analysis of Traffic Accident Hot Spot Areas in Changsha City Considering Built Environment. Sustainability 2024, 16, 3054. [Google Scholar] [CrossRef]
- Samerei, S.A.; Aghabayk, K. Interpretable machine learning for evaluating risk factors of freeway crash severity. Int. J. Inj. Control Saf. Promot. 2024, 31, 534–550. [Google Scholar] [CrossRef]
- Panda, C.; Mishra, A.K.; Dash, A.K.; Nawab, H. Predicting and explaining severity of road accident using artificial intelligence techniques, SHAP and feature analysis. Int. J. Crashworthiness 2022, 28, 186–201. [Google Scholar] [CrossRef]
- Asadi, R.; Khattak, A.; Vashani, H.; Almujibah, H.; Rabie, H.; Asadi, S.; Dimitrijević, B. Self-Paced Ensemble-SHAP Approach for the Classification and Interpretation of Crash Severity in Work Zone Areas. Sustainability 2023, 15, 9076. [Google Scholar] [CrossRef]
- Santos, K.; Firme, B.; Dias, J.P.; Amado, C. Analysis of Motorcycle Accident Injury Severity and Performance Comparison of Machine Learning Algorithms. Transp. Res. Rec. J. Transp. Res. Board 2023, 2678, 736–748. [Google Scholar] [CrossRef]
- Barua, S.; Dutta, A.K.; Das, S. A Multimodal Data Framework for Motorcyclist Injury Severity on Rural Undivided Roads. Sci. Rep. 2026, 16, 11511. [Google Scholar] [CrossRef] [PubMed]
- Daoud, R.; Vechione, M.; Gurbuz, O.; Sundaravadivel, P.; Tian, C. Comparison of Machine Learning Models to Predict Nighttime Crash Severity: A Case Study in Tyler, Texas, USA. Vehicles 2025, 7, 20. [Google Scholar] [CrossRef]
- Junaid, M.; Jiang, C.; Alotaibi, S.; Wang, T.; Almarhab, Y. Investigating factors influencing injury severity in crashes involving vulnerable road users in Pakistan. Sci. Rep. 2025, 15, 32317. [Google Scholar] [CrossRef]
- Zhou, J.; Chen, F.; Khattak, A.; Dong, S. Interpretable Ensemble-Imbalance Learning Strategy on Dealing with Imbalanced Vehicle-Bicycle Crash Data: a Case Study of Ningbo, China. Int. J. Crashworthiness 2024, 29, 884–897. [Google Scholar] [CrossRef]
- Adanu, E.K.; Dzinyela, R.; Okafor, S.; Jones, S. Injury-severity analysis of crashes involving defective vehicles and accounting for the underlying socioeconomic mediators. Heliyon 2024, 10, e26944. [Google Scholar] [CrossRef] [PubMed]
- Ogungbire, A.; Pulugurtha, S.S. Effectiveness of Data Imbalance Treatment in Weather-Related Crash Severity Analysis. Transp. Res. Rec. J. Transp. Res. Board 2024, 2678, 88–105. [Google Scholar] [CrossRef]
- Nasab, E.J.; Sheikholeslami, A.; Vassallo, J.M.; Moeinaddini, A. Modeling Farm Equipment Vehicle Crash Injury Severity Using Random Parameters Logit and Multi-Class Support Vector Machine in a Developing Country. Sci. Rep. 2026, 16, 16074. [Google Scholar] [CrossRef]
- Xu, P.; Wei, F.; Guo, D.; Guo, Y.; Sun, L.; Liu, C.; Zhou, B. Exploring the Injury Severity of Unlicensed Powered Two-and Three-Wheeler Drivers in Two-Vehicle Crashes in China. Sci. Rep. 2025, 15, 11802. [Google Scholar] [CrossRef]
- Budzyński, A.; Czerepicki, A. Towards Sustainable Road Safety: Feature-Level Interpretation of Injury Severity in Poland (2015–2024) Using SHAP and XGBoost. Sustainability 2025, 17, 8026. [Google Scholar] [CrossRef]
- Alotaibi, J. Enhancing Traffic Accident Severity Prediction: Feature Identification Using Explainable AI. Vehicles 2025, 7, 38. [Google Scholar] [CrossRef]
- Chen, F.; Liu, X.Q.; Yang, J.; Liu, X.K.; Hui, J.; Chen, J.; Xiao, H.Y. Traffic accident severity prediction based on an enhanced MSCPO-XGBoost hybrid model. Sci. Rep. 2025, 15, 25729. [Google Scholar] [CrossRef]
- Bridgelall, R. Hierarchical Reconciliation of Fifty-One Years of Highway-Rail Grade Crossing Data with Verified Multistage Inference. Algorithms 2026, 19, 282. [Google Scholar] [CrossRef]
- Brooks, C. Introductory Econometrics for Finance, 3rd ed.; Cambridge University Press: Cambridge, 2014; p. 716. [Google Scholar]
- Özkan, M.; Yerlikaya, M.A.; Yildiz, K. A machine learning optimisation integration for enhanced railway crossing safety. In Proceedings of the Institution of Civil Engineers-Transport; 2026. [Google Scholar]
- Chen, H.; Covert, I.C.; Lundberg, S.M.; Lee, S.-I. Algorithms to estimate Shapley value feature attributions. Nat. Mach. Intell. 2023, 5, 590–601. [Google Scholar] [CrossRef]
- Bridgelall, R. Driving standardization in infrastructure monitoring: A role for connected vehicles. Vehicles 2023, 5, 1878–1891. [Google Scholar] [CrossRef]
- Frank, J.; Roussel, C.; Böhm, K. Analysis of Semi-Global Factors Influencing the Prediction of Crash Severity. Geo-Information 2025, 14, 454. [Google Scholar] [CrossRef]
- Byegon, D.; Bisrat, B.R.; Vushe, K. Review paper on positive train control technology. Int. J. Innov. Eng. Res. Technol. 2021, 8, 248–258. [Google Scholar]
- Cheng, C.; Chen, S.; Ma, Y.; Qiao, F.; Xie, Z. Crash Severity Prediction and Interpretation for Road Determinants Based on a Hybrid Method. J. Transp. Saf. Secur. 2025, 17, 30–56. [Google Scholar]
- Jaradat, S.; Elhenawy, M.; Paz, A.; Alhadidi, T.I.; Ashqar, H.I.; Nayak, R. A Cross-Cultural Crash Pattern Analysis in the United States and Jordan Using BERT and SHAP. Electronics 2025, 14, 272. [Google Scholar] [CrossRef]




| Filter | Rows | Columns | Action |
| Original Raw Data | 250,660 | 154 | Loaded FRA Form 57 updated May 13, 2026 |
| Sparsity Filtering | 250,660 | 117 | Dropped >80% missing, add “Row_ID” |
| Public Crossings | 226,499 | 117 | Kept incidents at public crossings |
| HMI/CONUS | 226,094 | 120 | Added reconciled FIP5, Fix_Type, XID |
| Code Label/Meta | 226,094 | 42 | Removed fields with code descriptors and meta data |
| Many Unknown | 226,094 | 39 | Removed fields with too many unknown/missing values |
| Homogeneity Filter | 99,153 | 33 | Class I, freight, mainline, warnings, no obstruction/hazmat |
| Cardinality Trimming | 67,849 | 33 | Remove rows with sparse categories |
| Numerical Filter | 62,011 | 33 | Remove rows with extreme/unlikely values |
| Missing Values | 61,858 | 33 | Remove rows with final missing values |
| Correlated Variables | 61,858 | 31 | Removed two correlated categorical variables |
| Redundant Variables | 61,858 | 29 | Removed Year and Epoch as redundant variables |
| Replacements | 61,858 | 28 | Kept Meta: 7, Categorical: 14, Numeric: 7 |
| Fields Dropped After Filtering | M | M% | C | D | %K | Dominant |
| Railroad Type | 13 | 0.01 | 1, 1L, 1S | 36,448 | 83.88 | Class 1 |
| Equipment Type Code | 463 | 0.21 | 1 | 48,003 | 74.69 | Freight train |
| Track Type Code | 221 | 0.10 | 1 | 7,387 | 94.79 | Mainline |
| Hazmat Involvement Code | 353 | 0.16 | 4 | 20,319 | 84.87 | Neither rail nor road |
| Crossing Warning Location Code | 2,203 | 0.97 | 1 | 7,748 | 93.20 | Both sides |
| View Obstruction Code | 238 | 0.11 | 8 | 7,036 | 93.37 | Not obstructed |
| Fields Kept | M | M% | C/R | D | %K | Action |
| Casualty | 0 | 0 | [0, 1] | 0 | 100.0 | “1” if killed/injured > 0 |
| Warning | 3 | <0.01 | [1, 2–3, 7] | 3 | >99 | [Gates, FLS, CB], Other |
| Track Class | 3,398 | 1.5 | 1, 2, 3, 4 | 4,248 | 95.5 | Dropped [0, 5-9, N, O, X] |
| Driver Passed Vehicle | 5,487 | 2.4 | No, Yes | 6,048 | 92.1 | Dropped [Unknown] |
| Equipment Involved Code | 5 | <0.01 | 1, 2 | 1,862 | 97.9 | [Train-Pull, Train-Push] |
| Equipment Struck Code | 5 | <0.01 | 1, 2 | 0 | 100.0 | [RR Struck User, User Struck RR] |
| Highway User Action Code | 3,003 | 1.3 | 1, 2, 3, 4 | 3,971 | 95.1 | [Bypassed, Stop-Move, Moving, Stopped] |
| Highway User Code | 7 | <0.01 | A, B, C, D | 5,997 | 93.1 | [Auto, Truck, Trailer, Pickup] |
| Highway User Position Code | 378 | 0.2 | 1, 2, 3 | 449 | 99.4 | [Stalled, Stopped, Moving] |
| Train Direction Code | 929 | 0.4 | 1, 2, 3, 4 | 72 | 99.9 | [North, South, East, West] |
| Vehicle Direction Code | 1,551 | 0.7 | 1, 2, 3, 4 | 538 | 99.4 | [North, South, East, West] |
| Visibility Code | 17 | <0.01 | 2, 4 | 4,518 | 93.2 | [Day, Dark] |
| Weather Condition Code | 127 | 0.1 | 1, 2, 3 | 3,601 | 94.9 | [Clear, Cloudy, Rain] |
| Driver Condition Code | 6,508 | 2.9 | Missing | 138 | 99.8 | Drop missing values |
| Driver In Vehicle | 5,848 | 2.6 | Missing | 15 | 100.0 | Drop missing values |
| Year | 0 | <0.01 | [1976, 2025] | 5,519 | 94.4 | Dropped 1975, 2026 |
| Number of Cars | 49 | <0.01 | [0, 300] | 2 | 100.0 | Numerical filtering |
| Number of Locomotive Units | 13 | <0.01 | [0, 50] | 1 | 100.0 | Numerical filtering |
| Number Vehicle Occupants | 196 | 0.1 | [0, 100] | 34 | 99.9 | Numerical filtering |
| Railroad Car Unit Position | 1,208 | 0.5 | [0, 300] | 179 | 99.7 | Numerical filtering |
| Temperature (°F) | 1 | <0.01 | [-40, 116] | 2 | 100.0 | Numerical filtering |
| Time (24-hour numeric) | 26 | <0.01 | [0, 2, 359] | 9 | 100.0 | Numerical filtering |
| Train Speed | 2,406 | 1.1 | [0, 110] | 92 | 99.9 | Numerical filtering |
| Day | 0 | 0 | Retained | 0 | 0 | No filtering required |
| Month | 0 | 0 | Retained | 0 | 0 | No filtering required |
| Diagnostic | Statistic | p-value | Null Hypothesis (H0) | Decision |
| Epoch 0 (1976–2011) Slope | −101.04 | 3.22×10-23 | Slope = 0 | Reject H0 |
| Epoch 0 95% CI | [−109.4, −92.7] | — | — | — |
| Epoch 1 (2012–2025) Slope | −1.67 | 0.235 | Slope = 0 | Fail to reject H0 |
| Epoch 1 95% CI | [−4.6, 1.2] | — | — | — |
| KPSS Stationarity Diagnostic | 0.089 | 0.10 | Series is stationary | Fail to reject H0 |
| ADF Unit-Root Diagnostic | -5.45 | 1.60×10-4 | Has a unit root | Reject H0 |
| Ljung–Box Residual Diagnostic | 0.036 | 0.985 | Independently distributed | Fail to reject H0 |
| Minimum AIC | 487.056 (2012) | — | — | 2012 selected |
| Minimum BIC | 490.862 (2012) | — | — | 2012 selected |
| Buffer Sensitivity | 0 | — | — | No years removed |
| Metric | Epoch 0 | Epoch 1 |
| Incident records | 59,240 | 2,618 |
| Candidate predictors | 21 | 21 |
| Numerical predictors | 7 | 7 |
| Categorical predictors | 14 | 14 |
| One-hot encoded predictor levels | 88 | 87 |
| ROC-AUC Mean | 0.765 | 0.803 |
| ROC-AUC Standard Deviation | 0.007 | 0.015 |
| PR-AUC Mean | 0.615 | 0.669 |
| PR-AUC Standard Deviation | 0.011 | 0.032 |
| Accuracy Mean | 0.677 | 0.709 |
| Accuracy Standard Deviation | 0.006 | 0.010 |
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. |
© 2026 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 (http://creativecommons.org/licenses/by/4.0/).