Traffic safety is a critical factor for the sustainable development of urban transportation systems. This study investigates the impact of historical accident information on the prediction of future traffic accident risks, as well as the interaction between this information and other features, such as driver violations and vehicle attributes. Using a comprehensive dataset of traffic accidents involving passenger vehicles in a western Chinese city, we developed two predictive models: Model 1, which is based on vehicle information and driver violations, and Model 2, which integrates historical accident data. The results indicate that the inclusion of historical accident information significantly enhances the predictive performance of the model, particularly in terms of AUC (Area Under the Curve) and AP (Average Precision) values. Furthermore, through feature importance analysis and SHAP (SHapley Additive exPlanations) value evaluation, this study reveals the interaction effects between historical accident data and other features, and how these interactions influence model decisions. The findings suggest that historical accident data play a positive role in predicting future accident risk, with varying effects on risk mitigation. These insights provide a scientific basis for developing strategies to ensure the sustainable development of urban transportation systems.