Introduction
In machine learning, understanding why a model makes a specific decision is often as critical as the accuracy of the decision itself. Interpretability typically falls into two categories: global importance, which identifies the most influential features across an entire dataset, and local importance, which isolates the features driving a prediction for a specific instance.
For tree-based models like Random Forests, Mean Decrease of Impurity (MDI) is a highly popular, computationally "free" global importance metric, though it has historically been viewed as a heuristic. Conversely, Shapley values—rooted in cooperative game theory—offer a mathematically rigorous and "fair" method for assigning feature credit, often used for local explanations (e.g., SHAP). However, they can be computationally expensive.
This paper bridges the gap between traditional Random Forest heuristics and modern game-theoretic interpretability. The authors prove that under specific conditions, the classic MDI measure is mathematically equivalent to a Shapley value. Furthermore, they introduce a novel, computationally efficient "Local MDI" measure to explain individual predictions, demonstrating its theoretical consistency with global importance.
Theoretical Framework and Methodology
The authors ground their work in a categorical setting (categorical inputs and outputs) utilizing Shannon entropy as the impurity measure. Their methodology is built on several core theoretical advancements:
- Theoretical Unification: The authors prove that for "totally randomized trees" (where split variables are chosen uniformly at random rather than greedily), a feature's global MDI importance is exactly its Shapley value. In this context, the cooperative "game" being played is the maximization of mutual information between the features and the target variable.
- Defining Local MDI: To transition from global to local interpretability, the authors propose a new Local MDI formula. Instead of aggregating impurity decreases across the entire tree, Local MDI only sums the impurity decreases along the specific decision path a single instance $x$ traverses.
- The Global-Local Link: They establish a mathematically elegant connection: global MDI is simply the expected value (average) of the Local MDI values across all training samples.
- Local Shapley Proof: The authors further prove that this newly defined Local MDI is itself a Shapley value for a specific local characteristic function, which measures the reduction in uncertainty for a given individual instance.
To validate these theoretical claims, the paper utilizes two primary classification benchmarks: the synthetic "led" problem (predicting digits 0-9 from seven binary segments) and the standard "digits" problem (classifying $8 \times 8$ grayscale images of handwritten digits).
Key Insights and Results
By unifying MDI and Shapley values, the paper elevates MDI from a mere heuristic to a principled metric with desirable game-theoretic properties, such as Efficiency (importance scores sum to the total information gain) and Symmetry (equal contributors receive equal scores).
Local MDI Dynamics
Interestingly, while global MDI is strictly non-negative, Local MDI can be negative. This occurs when a feature's value actually increases uncertainty for a specific instance—for example, if a generally predictive feature is misleading for a particular outlier.
Computational Efficiency
Because Local MDI relies entirely on traversing existing tree paths and utilizing pre-calculated impurity values stored at the nodes, it can be computed with virtually no additional overhead compared to standard inference.
Experimental Validation
In experiments on the "led" and "digits" datasets, Local MDI demonstrated strong empirical performance:
- Consistency: Local MDI importance maps were highly correlated with established, more computationally intensive methods like TreeSHAP and Saabas.
- Visual Explanations: On the digits task, Local MDI successfully identified the specific pixels that distinguished one digit from another for individual images, matching the qualitative performance of complex attribution methods.
- Double Decomposition: The authors demonstrated that total mutual information $I(V; Y)$ can be seamlessly decomposed twice: first by feature (yielding global importance), and subsequently by instance (yielding local importance).
The "Masking" Effect
The authors also explore the behavior of standard Random Forests that use greedy splitting (where the number of candidate variables at each split, $K$, is greater than 1). They show that greedy splitting introduces a "masking" effect, where redundant or correlated features lose their importance scores. This causes the metric to depart from the strictly "fair" distribution guaranteed by Shapley values.
Limitations and Future Work
While theoretically robust, the paper's core proofs rely on a few constraints. The primary theoretical link to Shapley values is strongest within the categorical mutual information framework (Shannon entropy), though the authors discuss extensions to regression and Gini impurity in the appendix.
Additionally, the proofs depend on asymptotic conditions, assuming infinite data and infinite trees. Real-world performance on finite, noisy datasets may exhibit variance. Finally, because the exact equivalence to Shapley values breaks down under standard greedy splitting ($K > 1$), future work is necessary to better characterize these masking effects in non-asymptotic, practical settings.
Conclusion
By proving that MDI is a Shapley value under randomized conditions and deriving a mathematically consistent Local MDI, this work provides a rigorous foundation for Random Forest interpretability. It offers practitioners a fast, built-in mechanism for both global and local feature attribution without relying on external, model-agnostic explainers.
Summary updated