Abstract
Tree-based ensembles are powerful but often opaque. While Shapley values provide local explanations, they struggle to capture complex feature interactions efficiently. We present TreeSHAP-IQ, an algorithm that computes any-order Shapley interactions with significant speedups (up to 10,000x) by framing tree traversal as polynomial arithmetic. This allows for a deeper understanding of model behavior, such as identifying geographic location learning in housing models or complex risk factors in credit scoring.
Introduction: The Interaction Gap
Tree ensembles are the gold standard for tabular data, yet they are often treated as "black boxes." Standard interpretability tools like TreeSHAP calculate individual feature contributions but miss the synergies between variables. For example, latitude and longitude may have low individual importance but high interaction importance. Until now, calculating these interactions for any number of features was computationally prohibitive.
Methodology: TreeSHAP-IQ
TreeSHAP-IQ (Interaction Quantification) introduces a mathematical framework that treats tree traversal as polynomial arithmetic.
- Efficiency: It computes interaction scores in a single recursive traversal of the tree, rather than evaluating every possible feature combination.
- Summary Polynomials: The algorithm uses "Interaction Polynomials" and "Quotient Polynomials" to track feature subset contributions as it moves down the branches.
- Versatility: It supports a broad class of Cardinal Interaction Indices (CIIs), including the Shapley Taylor Interaction Index (STI) and the Faithful Shapley Interaction Index (FSI).
Experimental Setup
The authors evaluated TreeSHAP-IQ across seven benchmark datasets, including German Credit, Adult Census, and California Housing, covering both classification and regression tasks.
Key Results
Massive Speedups
Compared to brute-force computation, TreeSHAP-IQ achieved speedups ranging from 10x to 10,000x. The gains are most pronounced in datasets with more features, making it viable for state-of-the-art ensembles.
Visualizing the Interaction "Web"
The paper introduces "Network Plots" to intuitively grasp feature synergies. In these plots, vertices represent individual features and edges represent their interactions, providing a clear map of how variables "team up" to influence the model.
Insights and Complexity Decay
- Geographic Learning: In the California housing dataset, the importance of Longitude is revealed to be driven almost entirely by its interaction with Latitude, confirming the model learns geographic locations.
- Order of Complexity: Analysis of the German Credit dataset suggests that interaction effects significantly diminish after the 5th order, suggesting that low-to-mid-order interactions often provide a sufficient picture of model behavior.
Limitations and Future Work
Current methods use path-dependent feature perturbation; an interventional approach remains a challenge. Additionally, while we can now calculate complex interactions, better visualization techniques are needed to prevent human users from being overwhelmed by the increased information density. Future work will focus on user studies to see how these higher-order explanations improve human trust and understanding.
Summary updated