# Research on Slope Stability Prediction Based on MC-BKA-MLP Mixed Model
## 5 SHAP Analysis  
SHAP is a method for interpreting the predictions of machine learning models [38], whose core idea is to calculate a SHAP value for each feature, representing the impact of that feature on the model's output. Specifically, the SHAP value reflects the average change in the model's predicted outcome when a given feature is added to the model. The calculation of SHAP values takes into account all possible feature combinations to ensure that the contribution of each feature is evaluated in all possible scenarios, thus providing a unified framework for global and local explanations. The trained BKA-MLP prediction model computed the Shapley values based on the test set data and visualized the results, as illustrated in Figures 9 and 10. From the feature importance histogram, it is evident that feature \(X_{2}\) has the most significant impact on the model output, with an average SHAP value of approximately 0.07. Features \(X_{1}\) and \(X_{5}\) also exhibit considerable influence, while \(X_{3}\) has a relatively minor impact with a SHAP value around 0.02. Contrary to the initial statement, changes in features \(X_{1}\) and \(X_{2}\) have substantial effects on the model output. Figure 10 elucidates the influence of each feature on the model's prediction outcomes. A positive Shapley value signifies that an increase in the corresponding feature enhances the safety of the prediction, indicating a positive influence on slope stability. Conversely, negative Shapley values denote a detrimental effect. The horizontal axis illustrates the magnitude of the Shapley values; a larger Shapley value associated with a data point implies a more significant impact of that feature on slope stability. The color gradient from blue to red represents the feature values from low to high. For features \(X_{1}\) and \(X_{2}\), the distribution of sample points is relatively dispersed, and their SHAP values are notably large. When the value of \(X_{2}\) is low, its SHAP value is positive, indicating a positive impact on the model's predictions. However, as the value of \(X_{2}\) increases, the SHAP value gradually approaches zero and transitions to a negative value, suggesting that the influence of \(X_{2}\) on the model initially decreases and then increases. When \(X_{2}\) is high, the SHAP value becomes negative, indicating a detrimental effect on the model's prediction results. Conversely, the SHAP analysis of \(X_{1}\) shows a trend opposite to that of \(X_{2}\). From a rock mechanics perspective, an increase in shear strength enhances the deformation resistance of the slope's rock and soil mass, thereby increasing the safety factor. This relationship is corroborated by the interaction between \(X_{1}\) and the predicted model in Figure 10. However, \(X_{2}\) exhibits both positive and negative SHAP values, implying that an increase in effective stress does not necessarily lead to an increase in the safety  
Figure 9: Average SHAP Values for Feature Importance. factor. The point distributions for the other four features are relatively concentrated, with smaller SHAP values, particularly for X4, which has the least influence on the model and predominantly negative SHAP values. In fact, an increase in slope height tends to decrease the safety factor. However, this relationship is not absolute. When the slope height is greater, the negative impact of the slope height can be mitigated by a smaller slope angle and higher effective stress, potentially resulting in an elevated safety factor. In summary, features X1 to X6 are ranked by their contribution to the model from greatest to least, and the order is X2, X1, X5, X3, X6, and X4. This indicates that the sensitivity of each feature index to the slope safety factor F follows the order \(\sigma^{\prime}\) (effective stress), \(\tau\) (shear strength), \(\alpha\) (slope angle), \(\gamma\) (unit weight), H (slope height), and ru (pore water pressure).