# RTACompensator: Leveraging AraBERT and XGBoost for Automated Road Accident Compensation
## 4 Research Methodology
### Analysis and Discussion  
The results presented in Table 5 demonstrate the outstanding performance of the proposed model on the Gemini-augmented dataset, achieving the highest metrics across all models: precision (97.7%), recall (97.6%), f1-score (97.7%), and accuracy (97.3%). These results highlight the suitability of our approach for the task of determining responsibility in road accident cases. Our model leverages AraBERT's head+tail truncation strategy to retain essential information from both the beginning and end of accident descriptions, which is critical for accurately capturing key contextual elements influencing responsibility attribution. Compared with competitive approaches, such as XGBoost with AraBERT embeddings limited to either head or tail truncation (f1-scores of 96.0% and 96.2%, respectively), our model minimizes the loss of valuable information. Although ALBERT performs well \begin{table}
\begin{tabular}{l l} \hline \hline
**Models** & **Acc (\%)** \\ \hline CGRU [55] & 96.0 \\ \hline DL ArCAR [56] & 97.47 \\ \hline Part of responsibility Model & **97.81** \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Comparison between our classifier and other work on the Khaleej dataset. Figure 17: Comparison of performance metrics for the part of responsibility model: precision (**a**), recall (**b**), f1-score (**c**), and accuracy (**d**) on Gemini and BERT corpora in different responsibility categories. (f1-score of 97.2%), it does not achieve the same level of precision, highlighting the additional benefit of XGBoost's structured learning capabilities when combined with AraBERT embeddings. Traditional ML models, such as LR (f1-score of 90.2%) and SVM (f1-score of 89.2%), further demonstrate their limitations in handling complex, high-dimensional, and contextually rich Arabic texts. The integration of AraBERT's deep, context-aware embeddings is a cornerstone of the proposed method's success. These embeddings excel in capturing the linguistic intricacies of Arabic, including its morphological richness and syntactic dependencies, enabling the model to represent accident descriptions in a highly nuanced way. In contrast, traditional embedding techniques such as Doc2 vec (f1-score of 85.1%) and TF-IDF (f1-score of 93.8%) struggle to handle sparse, unstructured legal text, which reduces their overall effectiveness. The results presented in Table 6 illustrate the superior performance of our proposed model on the dataset augmented using multilingual BERT. Achieving the highest scores across all key metrics, precision of 97.3%, recall of 97.2%, f1-score of 97.3%, and accuracy of 97.0%, the proposed model demonstrates exceptional effectiveness in determining the part of responsibility in road accidents. This performance underscores the advantages of combining AraBERT and XGBoost, where AraBERT captures rich, context-aware embeddings tailored for Arabic text, and XGBoost provides robust classification capabilities. Compared with competitive approaches such as ALBERT (f1-score of 96.9% and accuracy of 96.6%) and XGBoost with AraBERT embeddings using head or tail truncation strategies (f1-scores of 95.6% and 95.9%, respectively), our model consistently outperforms its counterparts. Traditional methods like SVM and LR, with significantly lower f1-scores (88.7% and 89.8%, respectively), further highlight the limitations of these approaches for handling complex, high-dimensional text data. Notably, the large performance gap between our model and methods using Doc2 vec (f1-score of 84.7%) or TF-IDF (f1-score of 93.4%) emphasizes the importance of contextual embeddings. In summary, our model demonstrates its performance against other approaches by achieving the highest metrics. Notably, the model trained on the Gemini-augmented corpus outperforms the one trained on the multilingual BERT-augmented corpus. As shown in Tables 5 and 6, the Gemini-augmented dataset enables the model to achieve slightly higher precision (97.7% vs. 97.3%), recall (97.6% vs. 97.2%), f1-score (97.7% vs. 97.3%), and accuracy (97.3% vs. 97.0%).