Machine Learning for Liability Attribution in Pedestrians Involved in Traffic Crashes: Interpretability and Class Imbalance Solutions
Felisa C. Gragera-Peña, Miguel A. Jaramillo-Morán, Alejandro Moreno-Sanfélix
This paper proposes a Machine Learning (ML) framework designed to attribute liability betweendrivers and pedestrians in traffic crashes. This study applies classification algorithmsand interpretability techniques to analyze judicial rulings related to pedestrian crashesin Badajoz, Spain, from 2015 to 2024. The primary objective is to identify recurring crashpatterns and determine liability levels for the parties involved. Several classification algorithmswere evaluated, including Support Vector Machines (SVM), Neural Network (NN),Decision Trees (DT), Boosted Trees (BT), Naïve Bayes (NB), Random Forest (RF), K-NearestNeighbors (K-NN), and Logistic Regression (LR). Among them, the quadratic-kernel SVMachieved the highest overall performance. To address the severe class imbalance of thedata, stratified k-fold cross-validation and the Synthetic Minority Oversampling Technique(SMOTE) were applied to enhance the robustness and generalization capability of themodel. A multiclass classification framework was implemented, and SHAP (SHapleyAdditive exPlanations) was integrated to improve interpretability by quantifying the contributionof each feature to the model’s predictions. The analysis identified critical factorsthat play a significant role in determining liability outcomes: driver license status, crashlocation, lighting conditions, reaction time, and the presence of drugs or alcohol. This researchaims to contribute to the legal domain. While most existing studies have focused onpredicting injury severity, few have addressed liability attribution. This is a multifactorialtask that requires a comprehensive analysis of judicial decisions. The results demonstratethat machine learning-driven liability attribution can support judicial decision-making andprovide valuable insights for the development of proactive urban traffic safety strategies.