Introduction
The field of Explainable Machine Learning (XAI) has long been bifurcated. On one hand, practitioners use inherently interpretable models like Generalized Additive Models (GAMs), which are transparent by design but often sacrifice predictive power. On the other, they employ post-hoc explanation algorithms like SHAP to interpret complex "black-box" models. This paper bridges this divide by proving that Shapley-based explanations are essentially a way of viewing any function as a specific type of GAM.
The Theoretical Bridge: $n$-Shapley Values
The authors introduce $n$-Shapley Values, a parametric family of algorithms that generalizes standard Shapley values ($n=1$). While standard attributions focus on individual features, $n$-Shapley values account for interactions between up to $n$ features. For example, $n=2$ corresponds to standard Shapley Interaction Values.
A central contribution is the Shapley-GAM. The researchers demonstrate a one-to-one correspondence between value functions used for explanation and functional decompositions. They prove a Recovery Theorem: if a model is already a GAM of order $n$, then $n$-Shapley values will perfectly recover its original component functions. This provides a rigorous foundation for using these methods to audit model logic.
Key Insights: Interactions and "Smearing"
One of the most profound insights is the concept of "smearing." Standard Shapley values implicitly assume a model lacks interactions. When interactions do exist, the algorithm takes these high-order effects and distributes them evenly across individual features. As shown in the figure above, the transition from standard Shapley to the full Shapley-GAM reveals the hidden complexity of feature interactions that are otherwise collapsed into simple main effects.
The Complexity-Accuracy Trade-off
Using datasets like Folktables and California Housing, the authors explored the relationship between model accuracy and interaction complexity. They found that:
- Gradient Boosted Trees generally utilize higher-order interactions to achieve superior accuracy.
- The kNN Paradox: k-Nearest Neighbor models often exhibit extreme interaction complexity without a corresponding boost in performance, suggesting that high-order interactions can sometimes represent "noise" rather than meaningful logic.
Practical Limits and Future Work
While theoretically powerful, $n$-Shapley values face practical hurdles. Estimating high-order interactions is computationally expensive; for instance, detecting 7-way interactions can require millions of samples. Furthermore, human cognitive limits make it difficult to interpret interactions beyond the 2nd or 3rd order.
To support the community, the authors released the nshap Python package, enabling practitioners to visualize the Shapley-GAM of their own models and better understand the trade-offs between interpretability and complexity.
Summary updated