Discuss how you would leverage Shapley values to enhance the explainability of a complex machine learning model, and detail the potential limitations of this approach.
Instruction: For a two-feature cooperative game, v(empty)=10, v({A})=14, v({B})=12 and v({A,B})=20. Compute Shapley attributions for A and B by averaging marginal contributions across both feature orders. Explain the role of the background/missing-feature definition and why attribution is not causality.
Updated
Worked answer
A Shapley value averages a feature's marginal contribution over all possible predecessor sets, weighted by their frequency in feature orderings. With two features, the orders are A→B and B→A, each with weight 1/2.
For A, contribution is 14−10=4 when added first and 20−12=8 when added after B. Thus φA=(4+8)/2=6. For B, contribution is 12−10=2 when first and 20−14=6 when after A, so φB=(2+6)/2=4. The baseline plus attributions is 10+6+4=20, matching the full coalition value.
For n features, φi=Σ over S not containing i of [|S|!(n−|S|−1)!/n!]×[v(S∪{i})−v(S)]. In model explanation, defining v is substantive: conditional background expectations respect observed feature dependence differently from interventional approaches that vary features against a background distribution. Correlated features, implausible combinations and the chosen background can change the attribution question and result.
Use attributions to investigate predictions and possible proxy reliance, then test hypotheses with model/data/domain review. These values allocate a model prediction under the specified game; they do not prove that changing A causes a six-unit real-world outcome change, that the model is fair, or that the explanation is actionable. Exact enumeration scales poorly; approximate methods need uncertainty and implementation checks.
Reference: A Unified Approach to Interpreting Model Predictions.