Papers
Topics
Authors
Recent
Search
2000 character limit reached

Shapley Value Attribution

Updated 5 February 2026
  • Shapley value attribution is a principled framework from cooperative game theory that quantifies individual contributions via fairness axioms.
  • It employs various estimation techniques including Monte Carlo, regression-based models, and model-specific algorithms to tackle computational complexity.
  • Modern extensions integrate interaction effects and coalitions to enhance interpretability, data valuation, and applicability across AI tasks.

Shapley value attribution is a principled framework originating from cooperative game theory for quantifying the contribution of individual elements—such as features, data points, or model components—to a collective output or prediction. It is uniquely characterized by a set of fairness axioms and has become foundational in machine learning for feature attribution, model interpretability, data valuation, and broader XAI tasks. Contemporary research extends Shapley value to coalitions, interaction-centric decompositions, efficient estimation in high dimensions, applications in structured data, and intrinsic model self-attribution.

1. Mathematical Definition and Axiomatic Foundation

Let N={1,2,…,n}N = \{1, 2, \ldots, n\} be a finite player set and v:2N→Rv: 2^N \rightarrow \mathbb{R} a characteristic function assigning a real value to each subset (coalition) of players. The Shapley value ϕi(v)\phi_i(v) for player i∈Ni\in N is given by: ϕi(v)=∑S⊆N∖{i}∣S∣!(n−∣S∣−1)!n![v(S∪{i})−v(S)]\phi_i(v) = \sum_{S \subseteq N\setminus\{i\}} \frac{|S|!(n-|S|-1)!}{n!} [v(S \cup \{i\}) - v(S)] This solution is characterized by four axioms:

  • Efficiency: ∑iÏ•i(v)=v(N)−v(∅)\sum_{i}\phi_i(v) = v(N) - v(\emptyset)
  • Symmetry: Equal contributors receive equal scores.
  • Dummy (Null Player): If v(S∪{i})=v(S)v(S\cup\{i\})=v(S) for all SS, then Ï•i(v)=0\phi_i(v)=0.
  • Additivity: For any v,wv, w, Ï•i(v+w)=Ï•i(v)+Ï•i(w)\phi_i(v+w)=\phi_i(v)+\phi_i(w)

In machine learning, features, data points, documents, or model components can all serve as "players." The game value v(S)v(S) may denote, for example, the output of a predictor ff when only features in SS are retained; the performance metric after removing a data point; or the quality of a summary generated from a set of retrieved documents (Rozemberczki et al., 2022, Ye et al., 28 May 2025, Chau et al., 2021, Zheng et al., 2023).

2. Computation, Sampling, and Approximations

General Complexity: The naive calculation of ϕi(v)\phi_i(v) is exponential in nn (requiring 2n−12^{n-1} evaluations per player). This intractability motivates approximation strategies, most notably:

  • Monte Carlo Permutation Sampling: Repeatedly sample a random ordering of NN, traverse the sequence, and accumulate marginal contributions (Rozemberczki et al., 2022, Moehle et al., 2021).
  • Weighted Least-Squares Regression (KernelSHAP and Variants): Estimate Shapley values as coefficients minimizing a weighted regression between coalition values and indicator encodings of included players, with sampling weights derived from combinatorial considerations (Chen et al., 2022).
  • Quasi-Monte Carlo and Paired Sampling: Improved sampling strategies (e.g., antithetic, Sobol sequences) for variance reduction (Bell et al., 2023, Fumagalli et al., 1 Feb 2026).
  • Model-Specific Polynomial-Time Solutions: For linear models (closed form), tree models (TreeSHAP, path enumeration), and RKHS methods (analytic expressions via kernel mean embeddings) (Campbell et al., 2021, Chau et al., 2021).
  • Stochastic Iterative Momentum: Reformulating the kernel-regression problem into a stochastic optimization, balancing variance-regularization, momentum, and sample efficiency (Fan et al., 13 May 2025).
  • Odd Component Regression: Restricting the regression to the odd subspace of the set function via Fourier basis and paired sampling, resulting in provably efficient estimators (OddSHAP) (Fumagalli et al., 1 Feb 2026).
  • Cluster-based Approximations: Reducing computation by clustering semantically similar players (e.g., documents) and attributing credit at the cluster level with explicit error bounds (Ye et al., 28 May 2025).

Algorithmic Guarantees: Under sufficient sampling, efficiency, symmetry, and the null-player conditions can be preserved. For permutation and regression estimators, CLT enables finite-sample risk quantification and stopping criteria (Bell et al., 2023).

3. Extensions to Interactions and Coalitions

Shapley values inherently distribute collective surplus under the assumption of additivity but do not differentiate between joint (interaction) and individual effects. Modern research augments this with:

  • Harsanyi Interaction Index: Decomposing ff into AND/OR interactions (Harsanyi dividends), with the Shapley value viewed as a uniform reallocation of these interactions among participants. Each AND-or OR-type interaction among TT is divided as $1/|T|$ per involved player (Zheng et al., 2023).
  • Coalitional Attribution: The total effect assigned to an entire subset C⊆NC\subseteq N via

ΦC(f)=∑T⊇C∣C∣∣T∣[Iand(T;f)+Ior(T;f)]\Phi_C(f) = \sum_{T \supseteq C} \frac{|C|}{|T|} [I_{and}(T;f) + I_{or}(T;f)]

Individual and coalition attributions differ precisely by the cumulative effect of interactions that partially overlap but do not contain CC. This delineates when sum of individual attributions deviates from the group effect (Zheng et al., 2023).

  • Shapley Sets and Function Decomposition: Identifying non-separable variable groups (NSVG) via recursive decomposition. Attribution is then assigned to groups (sets) rather than individual features, preserving all Shapley axioms and reducing spurious splits in the presence of feature interactions or data dependencies (Sivill et al., 2023).

4. Operationalization and Model-Specific Variants

Shapley value attribution is not unique until the definition of v(S)v(S)—i.e., the nature of "feature removal" or "absence"—is specified. Standard approaches include:

  • Baseline (Interventional) Removal: Filling absent features with fixed or sample-based baselines.
  • Marginal (Interventional) Removal: Sampling absent features independently from their marginal distribution.
  • Conditional (Observational) Removal: Maintaining the joint distribution structure by sampling absent features conditionally.
  • Retraining-Based Utility: Defining v(S)v(S) as model performance or prediction after retraining on SS (Rozemberczki et al., 2022, Chen et al., 2022, Sundararajan et al., 2019).

Model-specific exact solutions exploit structure:

  • LinearSHAP: Direct closed-form for linear predictors.
  • TreeSHAP and Eject Path Algorithm: Polynomial-complexity recursions for tree ensembles, with Eject enforcing strict model-local explanations (φ = 0 for unused features on the prediction path) (Campbell et al., 2021).
  • RKHS-SHAP: Leveraging kernel mean embeddings to compute interventional and observational Shapley values analytically for kernel machines (Chau et al., 2021).
  • Self-Attributing Neural Networks: Models (e.g., SASANet) trained so that their own output decomposition matches the Shapley formula across all feature subsets via internal marginal-contribution distillation (Sun et al., 2023).

5. Applications Across Domains

Shapley value attribution is widely utilized in:

  • Model Explanation: Local or global feature attributions providing insight into complex predictors (e.g., SHAP, DeepSHAP, TreeSHAP, SASANet) (Rozemberczki et al., 2022, Sun et al., 2023, Campbell et al., 2021).
  • Data Valuation: Quantifying the value of individual data points in training or test performance; used in data marketplaces, noise/poisoning detection, and curricula (Liu, 2020, Wang et al., 2024).
  • Portfolio Attribution: Decomposing investment performance metrics into constituent signals under constraints/interactions (Moehle et al., 2021).
  • Document and Context Attribution in LLMs: Fair credit assignment to retrieved documents in RAG pipelines or multi-source summarization, enabled through scalable MaxShapley and Cluster Shapley algorithms (Patel et al., 5 Dec 2025, Ye et al., 28 May 2025).
  • Anomaly Detection and Variance Attribution: Attributing anomaly scores or explained variance (R2R^2) to features using coalitional score minimization or direct Shapley decompositions with statistical guarantees (Takeishi et al., 2020, Fryer et al., 2020, Bell et al., 2023).
  • Online Advertising Attribution: Disentangling channel contributions via simplified Shapley summations or ordered extensions capturing touchpoint sequence (Zhao et al., 2018).

6. Limitations, Robustness, and Future Challenges

  • Computational Scaling: The exponential cost for large player sets motivates ongoing work in stochastic approximation (SIM-Shapley), structure-exploiting algorithms (LS-SPA for least squares), clustering, and paired/antithetic sampling (Fan et al., 13 May 2025, Bell et al., 2023, Ye et al., 28 May 2025, Fumagalli et al., 1 Feb 2026).
  • Fairness and Robustness: Shapley preserves sign consistency and robustness under dataset resampling in contrast to LOO and other heuristics, but practical robustness (especially to interaction misspecification, masking policies, or sample variance) is nontrivial (Wang et al., 2024, Fumagalli et al., 1 Feb 2026).
  • Handling Negative Marginals: Variants such as Absolute Shapley treat large-magnitude (positive or negative) marginal contributions as evidence of importance but forfeit efficiency and additivity, impacting theoretical fairness (Liu, 2020).
  • Interaction, Overlapping and Hierarchical Structures: Standard Shapley theory is limited in capturing overlapping, nested, or structured attribution requirements, motivating extensions such as the Owen and Winter values, and future work on sequential, phrase, or causal graph-aware coalitions (Rozemberczki et al., 2022, Zheng et al., 2023).
  • Dependence on Feature Removal Policies: Attribution outcomes are sensitive to how absent features are replaced; for example, off-manifold masking or reference baselines may produce pathologies—e.g., nonzero attributions to unused features—unless countered by methods like Shapley Sets or Eject (Sundararajan et al., 2019, Campbell et al., 2021, Sivill et al., 2023).
  • Implementation and Practical Trade-offs: Selection of baselines, sample size for estimation, and variance-reduction strategies materially affect accuracy and stability; codebases (e.g., SIM-Shapley, LS-SPA, SASANet) now offer practical tools for scalable attributions (Fan et al., 13 May 2025, Bell et al., 2023, Sun et al., 2023).

7. Perspectives and Ongoing Directions

Contemporary Shapley research emphasizes:

Shapley value attribution remains a core theoretical and practical mechanism for fair, robust, and interpretable allocation of credit or blame in a variety of modern machine learning and data analysis pipelines (Rozemberczki et al., 2022, Zheng et al., 2023, Sun et al., 2023, Fumagalli et al., 1 Feb 2026, Patel et al., 5 Dec 2025, Sivill et al., 2023, Wang et al., 2024, Liu, 2020, Campbell et al., 2021).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (20)
14.

Topic to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Shapley Value Attribution.