# RTACompensator: Leveraging AraBERT and XGBoost for Automated Road Accident Compensation
## 1 Introduction  
An RTA is defined as a collision that occurs within a road network involving two or more entities, with at least one being a moving vehicle [1]. According to the World Health Organization (WHO), RTAs are one of the leading causes of death globally, claiming approximately 1.35 million lives each year and injuring an additional 20 to 50 million individuals [2]. These accidents impose significant social and economic burdens on individuals, their families, and nations. The associated costs include medical expenses, lost productivity due to fatalities or long-term disabilities, and damage to infrastructure. The World Bank estimates that RTAs cost countries approximately 3% of their gross domestic product annually, highlighting the substantial economic impact of these incidents [3]. InMorocco, RTAs represent a pressing public health challenge, contributing to considerable morbidity and mortality annually, as Figure 1 shows. This issue is a major problem for the transportation sector, negatively affecting the sustainable development of the nation and causing massive economic losses. The significant rise in road accidents has led to a substantial increase in cases brought before Moroccan courts, placing a heavy burden on specialized judges. These judges rely on police and medical reports to determine responsibility and calculate compensation for victims. However, this process is becoming increasingly challenging due to the limited number of specialized judges, the growing volume of cases, and the complexity of multivic-tim incidents. Moreover, judges' academic training may not fully prepare them to handle these intricacies, leading to potential errors and delays. Consequently, processing times and accuracy are negatively impacted, resulting in more socioeconomic problems. Our research is driven by the urgent need to automate the current process using advanced AI techniques, in order to reduce processing time and expedite compensation for victims. In addition, this will reduce the pressure on judges, allowing them to focus more on developing and refining traffic laws. With the proliferation of AI in decision-making processes, researchers in the field of RTA are increasingly interested in leveraging these techniques to enhance road safety, reduce accidents, and provide faster and fairer solutions to victims. Although existing studies have explored aspects such as collision detection [4; 5; 6; 7], crash risk prediction [8; 9; 10; 11; 12], crash anticipation [13; 14; 15; 16; 17; 18], and responsibility attribution [19], they have mainly focused on isolated components. Notably, none of these works address the automation of indemnification calculations for RTA victims, particularly in the Arabic language. We have developed an intelligent Arabic system named RTCompensator to streamline the process of calculating compensation for road accident victims. This system operates within civil law, specifically focusing on procedures related to RTA cases. The RTCompensator consists of two components. The first is a calculation module that determines the initial compensation amount based on the victim's personal data, the medical expert's report, and by applying the Moroccan law on compensation for accidents involving motor vehicles ([PERSON] n\({}^{\circ}\) 1.84.177 of Muharram 6, 1405 (2 October 1984)). The second component is an ML model that uses a hybrid approach, integrating AraBERT [20] with XGBoost [21], to determine the part of responsibility based on the accident description in the police report. The model was trained on a purpose-built Arabic corpus consisting of  
Figure 1: Statistics on road traffic accidents in Morocco. Source: Moroccan Ministry of Equipment, Transport, Logistics, and Water. accident descriptions, which was subsequently augmented using BERT [22] and Google Gemini [23]. Overall, we summarize our contributions as follows:  
* We developed the RTACompensator, a system that calculates compensation for road accident victims.