# An Interpretable XGBoost Framework for Predicting Oxide Glass Density
## 3 Results
### Feature Importance (XGBoost)  
The feature importance was calculated using the gain parameter (weights) and by permuting the features (importance). The weights and importances of the features for the considered attributes sets are shown in Figure 6. The features are sorted by the weights from the highest on the left. Figure 5: Histogram of errors for XGBoost model for feature sets: (**a**) Compositional; (**b**) Atomic types; (**c**) Meredig, (**d**) Magpie. Weights indicate how a feature contributes to the overall accuracy of the model. Features that lead to large reductions in the objective function (gain) are considered more important. As a consequence, the weights reflects how the model internally uses features to make decisions. Nevertheless, a feature might have high gain, but its removal does not significantly degrade overall model performance, and its true predictive power might be lower than what the weight suggests. On the other hand, the importance measures the decrease in a model's performance when a single feature's values are randomly shuffled. It reflects the actual predictive power of a feature in the context of the entire model. If permuting a feature significantly drops performance, it is truly important for the model's predictions. Thus, the importance directly quantifies the impact of a feature on the model's predictions, whereas the weight is useful for understanding the internal mechanisms of model predictions. For the model trained on simple Compositional features (Figure 6a), the oxygen fraction has the highest weight, reflecting its abundance and frequent use in the decision trees' splits. However, its permutation importance is lower than that of key network-forming cations (B, Si, P) and heavy modifiers (Pb). This accurately mirrors physical reality: while the oxygen sublattice forms the bulk of the glass volume, variations in  
Figure 6: Feature importance and weights for XGBoost model for feature sets: (**a**) Compositional; (**b**) Atomic types; (**c**) Meredig, (**d**) Magpie (limited to 20 of the most important features). density are more critically driven by the specific cations incorporated into the network. The addition of Atomic type attributes (Figure 6b) shows that while individual elements like Si and B remain highly important, the overall fraction of intermediate atoms is also relatively important, whereas the total modifier content does not significantly influence the glass density. The feature importance analysis for the advanced Meredig (Figure 6c) and Magpie (Figure 6d) sets offers deep insight into the physics captured by the algorithm. In these cases, the model's predictions are overwhelmingly driven by physically meaningful attributes. The mean atomic weight of the glass and attributes related to valence electron structure (fraction of s, p, and d electrons) emerge as the most influential predictors. This result is particularly insightful, as it aligns with the definition of density as the ratio of molar mass (M) to the molar volume (V\({}_{\text{m}}\)). The model correctly identifies the mean atomic weight as the most dominant feature, as it serves as a direct proxy for the molar mass (M). The remaining high-importance features related to electronic structure likely contribute to the model's approximation of the molar volume (V\({}_{\text{m}}\)), a complex term related to atomic packing efficiency and bond types, which are intrinsically linked to the electronic structure of the constituent atoms. This confirms that with physically informed descriptors, the model learns to approximate the underlying physical principles governing density. To gain a more granular understanding of the model's predictive behavior beyond the global feature importance, we employed SHAP (SHapley Additive exPlanations) analysis. The beeswarm plots in Figure 7 illustrate the impact of each feature on the model's output for every individual prediction in the test set.