Abstract
In this paper, we consider a perturbation-based metric of predictive faithfulness of feature rankings (or attributions) that we call $PGI^2$. When applied to decision tree-based regression models, the metric can be computed accurately and efficiently for arbitrary independent feature perturbation distributions. In particular, the computation does not involve Monte Carlo sampling that has been typically used for computing similar metrics and which is inherently prone to inaccuracies. Moreover, we propose a method of ranking features by their importance for the tree model's predictions based on $PGI^2$. Our experiments indicate that in some respects, the method may identify the globally important features better than the state-of-the-art SHAP explainer.
The Challenge of Faithfulness in Tree Models
In the world of "Black Box" machine learning, tools like SHAP or LIME are frequently used to explain model predictions by identifying which features (e.g., age, income, or blood pressure) were most influential. However, a critical question remains: how do we know if these explanations are actually faithful to the model's internal logic?
A common measure of faithfulness is the Prediction Gap (PGI), which calculates the change in prediction when "important" features are perturbed. Traditionally, calculating this gap requires Monte Carlo (MC) sampling—running the model thousands of times with random noise. This process is inherently noisy, prone to sampling error, and computationally expensive, especially when high precision is required to compare different explanation methods.
The $PGI^2$ Solution
The authors address the intractability of the standard PGI metric by introducing two key innovations:
- The Squared Metric ($PGI^2$): Standard PGI uses absolute differences, which are mathematically difficult to handle in expectations. By switching to a squared difference—$(f(x') - f(x))^2$—the authors eliminate the "cancellation problem" (where positive and negative changes cancel out) and enable a cleaner mathematical framework.
- The Exact Algorithm: The researchers prove that for tree ensemble models (such as XGBoost or Random Forests), $PGI^2$ can be computed exactly in $O(n^2)$ time, where $n$ is the total number of nodes. This closed-form calculation bypasses the need for random sampling entirely.
- Greedy Feature Ordering: Leveraging this exact calculation, they propose a new ranking method. Instead of relying on SHAP, they greedily select features that maximize the $PGI^2$ metric, ensuring the resulting ranking is as faithful as possible by design.
Experimental Validation
The researchers evaluated their approach on three regression datasets: Red Wine Quality, California Housing, and Parkinson Telemonitoring. They tested both single-tree models and larger gradient-boosted ensembles.
As shown in the experimental results, standard sampling methods require a massive number of iterations to approach the accuracy of the exact algorithm. For larger models, even 20,000 iterations of Monte Carlo sampling may not achieve the stability of the closed-form $PGI^2$ calculation.
Key Insights and Results
- Efficiency and Stability: For a tree ensemble with $n$ nodes, the exact $PGI^2$ for a specific feature set is computed in $O(n^2)$. This provides a stable "ground truth" that avoids the variance associated with sampling.
- SHAP vs. Greedy $PGI^2$: While SHAP is the industry standard, the greedy $PGI^2$ ranking often identifies different "top" features. In faithfulness benchmarks, the $PGI^2$ method frequently outperformed SHAP, particularly when perturbations were small.
- The Power of Squaring: Squaring the prediction gap amplifies large, important prediction shifts while marginalizing insignificant ones, which is a desirable property for identifying truly impactful features.
Limitations and Future Work
While powerful, the exact algorithm is currently limited to tree-based models and cannot be directly applied to neural networks. Additionally, the feature ranking method is a greedy heuristic; finding the absolute optimal ordering to maximize faithfulness remains a computationally hard problem. Future work may explore whether the "squared change" metric aligns better with human intuition than traditional absolute change metrics.
Summary updated