A Shapley value is a way to divide a shared outcome fairly among contributors. Start with every possible coalition: each group has a value, and a contributor receives credit for how much value they add when joining those groups. Averaging those marginal contributions across coalitions gives that contributor’s attribution. In a prize-splitting analogy, the attributions divide the team’s total winnings according to each member’s contribution to the collaboration. section 9.4.2
Figure 9.16 All possible coalitions of Ava, Ben, Cam, and Dev, and their corresponding values (in units of $1,000). The last coalition contains all four friends and has a value of $20,000, the total prize money. There is one coalition of size 0, four coalitions of size 1, six coalitions of size 2, four coalitions of size 3, and one coalition of size 4. This table is called the characteristic function.
The characteristic function lists every coalition and its value. It supplies the evidence needed to compare a coalition with and without each contributor. section 9.4.2
To compute one person’s value, compare each coalition containing that person with the matching coalition without them. Weight each difference, then sum the weighted differences. For Dev, this procedure produces a Shapley value of 6 in thousands of dollars. Repeating the procedure for every participant yields a complete allocation of the grand coalition’s value. section 9.4.2
From team members to model features
In local model interpretability, features take the role of players and an individual prediction is the shared outcome to explain. SHAP uses Shapley-based feature attributions to show how feature contributions move a prediction relative to a base value. A waterfall plot displays individual contributions, while a force plot shows features pushing the prediction higher or lower; their contributions add up to the prediction. section 9.4.2 section 9.4.2
Enumerating all feature combinations becomes infeasible for real-world data with many features and examples. SHAP uses a local surrogate approach to approximate Shapley values, and TreeSHAP computes them efficiently for tree-based models. These methods focus on individual feature importances rather than feature interactions, although Shapley values retain an additivity property useful when ensembling models. section 9.6 section 9.6

