## 3 Methodology
### The ReMAHA Algorithm
#### 3.2.4 ReMAHA
If the generated data are too concentrated, they will not yield significant performance improvement, while overly dispersed generated data can blur the boundaries between different categories. ReMAHA, as proposed in this paper, balance the generated data well through the process of clustering and data generation. Due to CatBoost's improvements in handling prediction shift and conditional shift, it reduces overfitting. Combined with the characteristics of symmetric trees, it performs exceptionally well on datasets like traffic accidents, which are characterized by sparse features and extreme class imbalance. Recent research has already demonstrated the effectiveness of hybrid approaches combining sampling and prediction models [47]. [PERSON] [48] proposed a hybrid sampling model combined with the GNN model, validating the effectiveness of

Figure 10: Comparison of effects before and after sampling. Figure 9: Performance on different models: (**a**) performance on the prediction model; and (**b**) performance on the hybrid model. hybrid samplers on public datasets. [PERSON] et al. [49] introduced the MatFind model, which used the K-nearest neighbors algorithm to balance the dataset and employed SVM for prediction, leading to improved performance in miRNA identification. These successful cases suggest that hybrid models combining sampling and prediction are feasible when dealing with imbalanced and large datasets. However, based on existing work, it is clear that the problems caused by data imbalance in machine learning tasks are far from being completely resolved. Additionally, data imbalance is a common phenomenon in real-life datasets, and the current achievements are not enough to fully trust the models. Particularly, the dataset used in this study, the US-Accidents traffic accident dataset, has a class data difference of 91.40 times, such a massive difference leads to many oversampling algorithms and prediction models not achieving ideal results. Therefore, future work will continue to focus on improving the credibility of models and enhancing their generalization capabilities. Future work will primarily focus on the following three aspects: exploring correlations among data within the same category from multiple dimensions to generate more representative data; leveraging additional traffic accident data to enhance the model's generalization ability; and further refining feature engineering to improve the model's computational efficiency. ## 6 Conclusions

In this study, we proposed the ReMAHA-CatBoost model tailored for the imbalanced domain of traffic accident prediction. Our key design comprised three parts: utilizing the relief-F algorithm for feature selection and acquiring feature weight matrices in the feature selection step; integrating the feature weight matrices into the distance calculation process of sample points to enhance the reliability of oversampled data; and, finally, training the CatBoost model using the oversampled dataset. These designs ensured the model's capability to identify different features' impact on accident severity while enhancing the recognition of minority class samples. Experimental results demonstrated the effectiveness of ReMAHA-CatBoost in predicting accident severity, especially its superior performance in identifying minority class samples compared to other oversampling algorithms (SMOTE, ADASYN, and ROS). ReMAHA-CatBoost enables us to accurately classify potential traffic accidents, assisting traffic management authorities in efficiently allocating limited resources for potential severe accidents. Moreover, the proposed model aids relevant authorities in taking necessary preventive measures to mitigate the economic and healthcare burdens caused by traffic accidents. ## 7 Patents

Patent application number: CN202211527542.5. Conceptualization, G.L. and Y.W. ; methodology, G.L. ; validation, G.L., Y.W., and Y.B. ; formal analysis, W.Z. ; investigation, G.L. ; data curation, Y.B. ; writing--original draft preparation, G.L. ; writing--review and editing, W.Z. ; visualization, Y.B.