A credit model denies a loan. A hiring filter sorts a resume to the bottom. A classifier flags a transaction. When someone asks why, the honest answer for most of these systems is: a gradient-boosted ensemble said so, and nobody can point to a line of code that made the call. For a decade the standard response to that problem has been a formula from 1953 that was designed to split the winnings of a cooperative card game.
This is an explanation of SHAP, the most widely used method for answering "why did this model produce this number for this input", and of the arguments, current as of late 2026, about how much that answer is actually worth.
The 1953 result: a fair way to split credit
Lloyd Shapley was a mathematician at RAND Corporation when he published "A Value for n-person Games" in the 1953 volume Contributions to the Theory of Games II, edited by Harold Kuhn and Albert Tucker (an earlier draft circulated as a RAND note in 1951). The setting: players form coalitions, every coalition has a known payoff, and the full coalition wins some total. How should the payout be split?
Shapley's answer was not a proposal among many. He showed that exactly one distribution rule satisfies a small set of axioms that any reasonable split should obey. Each player's share is the average of their marginal contribution across every possible way the coalition could assemble: for each ordering of players, add them one by one and record how much each addition changes the payoff, then average over all orderings. The closed-form version weights each subset of the other players by the factorials of its size. If you contribute nothing wherever you join, you get zero. If two players do identical work, they get identical shares. If you double the game, you double the payout.
The result became one of the foundational objects of cooperative game theory, and part of what earned Shapley a share of the 2012 Nobel Memorial Prize in Economic Science.

From card games to model predictions
The move that turns Shapley's value into a debugging tool is a metaphor with a precise mapping, made by Scott Lundberg and Su-In Lee in "A Unified Approach to Interpreting Model Predictions" (NeurIPS 2017, arXiv:1705.07874):
- The players are the input features of one specific prediction.
- The payoff of a coalition is what the model would output if only those features had their actual values and the rest were replaced by a baseline drawn from the data distribution.
- The full coalition's payoff is the actual prediction, minus the baseline prediction.
A SHAP explanation assigns each feature an importance value for that one prediction, and the values sum to the gap between the prediction and the baseline. Lundberg and Lee's framing was deliberately reconciliatory: before 2017 the explainability field had a pile of local attribution methods, LIME among them (arXiv:1602.04938), each with its own justification. The paper identified a single class of additive explanation methods that subsumed six existing approaches, showed the Shapley value is the unique member satisfying two stated properties, local accuracy and consistency, and derived approximations inside that class. LIME, for instance, turned out to be one particular weighted loss function within the same framework.
The cost problem, and the shortcuts that made SHAP a standard
Exact Shapley values require the model to be evaluated on every subset of features: 2 to the power of d evaluations for d features. For a 50-feature table that is about a quadrillion model calls for one single explanation.
The practical answer was approximation. Sampling orders or subsets converges to the true value at the cost of noise. For tree ensembles, Lundberg and colleagues produced the genuinely consequential result: a first-polynomial-time algorithm, TreeSHAP, that computes exact Shapley values by walking the tree structure instead of enumerating coalitions (Nature Machine Intelligence, 2020, DOI: 10.1038/s42256-019-0138-9). Since gradient-boosted trees and random forests still run a large share of tabular production ML, exact-attribution became cheap exactly where black-box pressure was heaviest: credit, insurance, medicine.
That is where the industrial adoption happened. The UK government's AI Assurance Techniques catalogue, summarising an Nvidia case study on credit-risk management, records that after 2017 financial-services firms explored Shapley-based explanations, found the results effective, and initially found the compute cost too high for scale until GPU acceleration closed the gap (GOV.UK entry). The open-source Python package shap, released alongside the 2017 paper, is the standard open-source implementation of these methods; Christoph Molnar's free book Interpretable Machine Learning documents both the method and its failure modes (SHAP chapter).

What the critics say the plots do not mean
The axioms that make the Shapley value "fair" are about games, and a model is not a game. Three objections have hardened into a sustained literature.
First, features are not players. Shapley values treat features as removable coalition members, which means computing what the model would say if some features were missing. Real inputs are correlated: engine size and fuel-economy readings are not independent players, and a baseline that marginalises over one while holding the other implicitly feeds the model data combinations it never sees in training. Kumar, Venkatasubramanian, Scheidegger and Friedler argued at ICML 2020 (PMLR 119) that repairing this forces you into causal reasoning, and that once you do, you have left the simple feature-removal game behind.
Second, the math can provably mislead. Huang and Marques-Silva constructed classifiers for which the Shapley values assign more importance to a feature that is provably irrelevant to a prediction than to one that is provably relevant ("The Inadequacy of Shapley Values for Explainability", arXiv:2302.08160), and followed with additional evidence in 2023 (arXiv:2310.00416). Their point is not that implementations are buggy; it is that the definition itself permits pathologies when the feature-removal game and the actual model behaviour come apart.
Third, an attribution is not an explanation of anything a human asked. A genuine explanation is contrastive, selecting among alternatives, and there is no theorem that average marginal contributions map onto the counterfactuals a loan officer or an appellant actually wants.
The reasonable reading as of 2026: SHAP values are a consistent, well-scaled accounting of how a fitted model partitions one output across its inputs under a stated baseline. That is a genuinely useful diagnostic, and it is not the same thing as a reason.
SHAP meets the LLM stack
The method never left tabular ML, but the last five years pushed it into language models.
- In 2021, Ethayarajh and Jurafsky showed that attention-flow scores over transformer attention weights are exactly Shapley value explanations of the token-contributions game (arXiv:2105.14652), lending game-theoretic rigour to a heuristic everyone was already plotting.
- Held and colleagues used Shapley credit assignment over attention heads to find and prune heads that introduce interference between languages in multilingual models (arXiv:2210.05709).
- TokenShapley (2025, arXiv:2507.05261) brings the machinery to retrieval-augmented generation: which context tokens actually caused which generated tokens, computed at the level needed to highlight a name or a number in an answer, with KNN retrieval making the coalition game tractable and reported attribution accuracy above embedding-similarity baselines on four benchmarks.
- The field-level survey of LLM explainability (Zhao et al., arXiv:2309.01029) places Shapley-style attribution among the gradient-free families and catalogues the two recurring problems: choosing the baseline, and estimating the exponential game cheaply.
In other words, the same structure that explains a credit tree now explains why a model anchored a generated sentence on one span of retrieved context rather than another, with the same cost caveats.
What to take away
Three sentences to remember before trusting a summary plot: the baseline is a choice, and SHAP values only ever explain the gap between the prediction and whatever "nothing happened" distribution you selected; correlated features make the implicit counterfactuals unrealistic; and the critics' existence proofs are for pathological models, which have not yet been shown to describe most real deployments well enough to retire the tool, nor to endorse it. SHAP is the most principled way available to bill a prediction across its inputs. Treat it like an invoice: useful, auditable, and not the same thing as the work being done.
Sources
- Shapley, L. S. (1953). A Value for n-person Games. In Kuhn & Tucker (eds.), Contributions to the Theory of Games II, Princeton University Press, pp. 307-317. Overview: https://en.wikipedia.org/wiki/Shapley_value
- Nobel Prize in Economic Sciences 2012, Lloyd S. Shapley: https://www.nobelprize.org/prizes/economic-sciences/2012/shapley/facts/
- Lundberg, S. & Lee, S.-I. (2017). A Unified Approach to Interpreting Model Predictions: https://arxiv.org/abs/1705.07874
- Ribeiro, T., Singh, S. & Guestrin, C. (2016). Why Should I Trust You? Explaining the Predictions of Any Classifier: https://arxiv.org/abs/1602.04938
- Lundberg, S. et al. (2020). From local explanations to global understanding with explainable AI for trees, Nature Machine Intelligence 2:56-67: https://pubmed.ncbi.nlm.nih.gov/32607472/
- UK GOV.UK AI Assurance Techniques, Nvidia explainable AI for credit risk: https://www.gov.uk/ai-assurance-techniques/nvidia-explainable-ai-for-credit-risk-management-applying-accelerated-computing-to-enable-explainability-at-scale-for-ai-powered-credit-risk-management-using-shapley-values-and-shap
- Molnar, C. Interpretable Machine Learning, SHAP chapter: https://christophm.github.io/interpretable-ml-book/shap.html
- Kumar, I. E., Venkatasubramanian, S., Scheidegger, C. & Friedler, S. A. (2020). Problems with Shapley-value-based explanations as feature importance measures, ICML/PMLR 119: https://proceedings.mlr.press/v119/kumar20e.html
- Huang, X. & Marques-Silva, J. (2023). The Inadequacy of Shapley Values for Explainability: https://arxiv.org/abs/2302.08160
- Huang, X. & Marques-Silva, J. (2023). Refutation of Shapley Values for XAI, Additional Evidence: https://arxiv.org/abs/2310.00416
- Ethayarajh, K. & Jurafsky, D. (2021). Attention Flows are Shapley Value Explanations: https://arxiv.org/abs/2105.14652
- Held, W. et al. (2022). Shapley Head Pruning: Identifying and Removing Interference in Multilingual Transformers: https://arxiv.org/abs/2210.05709
- Xiao, Y. et al. (2025). TokenShapley: Token Level Context Attribution with Shapley Value: https://arxiv.org/abs/2507.05261
- Zhao, H. et al. Explainability for Large Language Models: A Survey: https://arxiv.org/abs/2309.01029
