The SHAP Framework: Additive Feature Attribution
What you'll learn: How SHAP unifies multiple interpretability methods under a single mathematical framework based on additive feature attribution.
The Core Idea
SHAP (SHapley Additive exPlanations) doesn't just compute Shapley values—it establishes a unified framework that multiple interpretability methods actually follow, often without realizing it. The key insight: any explanation method that assigns an importance value to each feature and sums them to approximate the model's prediction is performing additive feature attribution.
The Additive Framework
Mathematically, SHAP defines an explanation model as:
g(z') = φ₀ + φ₁z'₁ + φ₂z'₂ + ... + φₘz'ₘ
Where:
g(z')is the explanation modelφ₀is the base value (expected prediction)φᵢis the attribution (importance) for featureiz'ᵢindicates whether featureiis present (1) or absent (0)
When all features are present, this sum equals (or approximates) your model's actual prediction.
Why This Matters
SHAP proves that methods like LIME, DeepLIFT, and Layer-Wise Relevance Propagation are all special cases of this additive framework—they just make different assumptions about how to compute the φᵢ values. SHAP itself guarantees certain desirable properties (like consistency and local accuracy) that other methods may violate.
Think of it like discovering that different recipes for bread all follow the same fundamental chemistry—SHAP identified the "chemistry" underlying feature attribution methods.
Key Takeaway: SHAP provides a rigorous additive framework where feature attributions sum to explain individual predictions, unifying disparate interpretability methods under shared mathematical principles and guaranteeing consistency properties through Shapley values.