The Shapley Value is a solution concept from cooperative game theory that assigns a unique distribution of a total surplus generated by a coalition of players. It calculates each player's payoff based on their average marginal contribution across all possible orderings in which the coalition could form. This ensures a distribution is efficient (the total is allocated), symmetric (identical players receive equal shares), and accounts for dummy players (those who add no value receive nothing). Its axiomatic foundation provides a rigorous standard for fairness in collaborative systems.
Glossary
Shapley Value

What is Shapley Value?
The Shapley Value is a foundational concept from cooperative game theory that provides a mathematically fair method for distributing a coalition's total payoff among its members, based on each member's marginal contribution.
In multi-agent systems and machine learning, the Shapley Value is applied to problems of credit assignment and feature importance. For example, in SHAP (SHapley Additive exPlanations), it quantifies the contribution of each input feature to a model's individual prediction. Within agent coalitions, it provides a principled mechanism for distributing rewards from a joint task, incentivizing cooperation and stable team formation. Its computational complexity, which grows exponentially with the number of agents, is addressed through approximation algorithms like Monte Carlo sampling for practical use.
Core Axioms of the Shapley Value
The Shapley Value's definition as a fair payoff distribution is derived from four fundamental axioms. These axioms are not arbitrary but are necessary and sufficient conditions that uniquely define the value, providing a rigorous mathematical justification for its use in cooperative game theory and machine learning interpretability.
Efficiency (or Pareto Optimality)
The Efficiency Axiom states that the entire value generated by the grand coalition (the coalition of all players) is fully distributed among its members. No value is lost or created in the allocation.
- Mathematical Form: Σ φᵢ(v) = v(N), where φᵢ(v) is the Shapley Value for player i, and v(N) is the value of the grand coalition.
- Implication: This ensures the solution is budget-balanced. In machine learning feature attribution, it means the sum of the Shapley values for all features equals the model's prediction for a specific instance minus the average model prediction (the baseline).
Symmetry
The Symmetry Axiom states that if two players contribute identically to every possible coalition, they must receive the same payoff. Fairness is based solely on marginal contribution, not on labels or identities.
- Formal Condition: If v(S ∪ {i}) = v(S ∪ {j}) for every coalition S not containing i or j, then φᵢ(v) = φⱼ(v).
- Practical Role: This prevents bias in allocation. In explainable AI, if two features have identical effects on the model's output across all combinations, they are assigned identical importance scores, ensuring the explanation is invariant to feature renaming.
Dummy (or Null Player)
The Dummy Axiom specifies that a player who adds no marginal value to any coalition should receive a payoff of zero. Their presence or absence does not affect the coalition's outcome.
- Formal Condition: If v(S ∪ {i}) = v(S) for every coalition S not containing i, then φᵢ(v) = 0.
- Key Insight: This axiom enforces a direct link between causal contribution and reward. In feature attribution, a feature that never changes the model's prediction, regardless of what other features are present, correctly receives an attribution of zero, filtering out irrelevant inputs.
Additivity (or Linearity)
The Additivity Axiom states that if a game can be decomposed into two independent sub-games, a player's value in the combined game is the sum of their values in each sub-game. This is crucial for analyzing complex, composite interactions.
- Mathematical Form: For any two games v and w, φᵢ(v + w) = φᵢ(v) + φᵢ(w).
- Critical Application: This axiom enables the practical computation of Shapley values for machine learning models. A complex model's prediction function can be seen as a combination of simpler functions. This linearity property allows for efficient approximation algorithms and is foundational to implementations like SHAP (SHapley Additive exPlanations).
Uniqueness Theorem
Lloyd Shapley proved that the four axioms—Efficiency, Symmetry, Dummy, and Additivity—uniquely define the Shapley Value formula. No other solution concept satisfies all four simultaneously.
- The Formula: φᵢ(v) = Σ_{S ⊆ N \ {i}} [ |S|! (|N| - |S| - 1)! / |N|! ] * ( v(S ∪ {i}) - v(S) )
- Significance: This theorem provides the mathematical guarantee that the Shapley Value is the only fair allocation method under these universally accepted principles. It transitions the concept from a heuristic to a theoretically grounded standard for fairness in cooperative games and model interpretability.
Axiomatic Justification in Machine Learning
The translation of these game theory axioms to feature attribution in machine learning provides a robust framework for explainability that alternatives like LIME or simple gradients lack.
- Efficiency ensures local accuracy: the explanation matches the model's output.
- Symmetry & Dummy guarantee consistency and eliminate artifacts.
- Additivity enables the use of Shapley values with model ensembles and complex, non-linear functions.
This axiomatic foundation is why the Shapley Value is considered the gold standard for feature attribution, providing the only method that satisfies all desirable properties for a faithful explanation.
Calculation, Formula, and AI Applications
The Shapley Value is a foundational concept from cooperative game theory that provides a mathematically fair method for distributing a total payoff among contributing participants. In artificial intelligence, it has become the gold standard for model explainability, attributing a model's prediction to its individual input features.
The Shapley Value is calculated by considering every possible order in which participants (or features) can join a coalition. For each possible ordering, the marginal contribution of a participant is the difference in payoff when they join versus before they join. The Shapley Value for a participant is the average of their marginal contributions across all possible orderings. This computationally intensive formula ensures the solution satisfies key fairness axioms: efficiency, symmetry, dummy, and additivity.
In machine learning explainability, particularly with tools like SHAP (SHapley Additive exPlanations), the 'game' is the prediction task, 'players' are the input features, and the 'payoff' is the model's output. By calculating the Shapley Value for each feature, one can decompose any prediction into the sum of contributions from each feature, providing a locally faithful explanation. This is crucial for model interpretability, debugging, and ensuring compliance in regulated industries by answering why a specific prediction was made.
Frequently Asked Questions
The Shapley Value is a foundational concept from cooperative game theory that provides a mathematically fair method for distributing credit or payoff among participants in a coalition. In the context of multi-agent systems and machine learning, it is a critical tool for attribution, reward distribution, and understanding agent contributions.
The Shapley Value is a solution concept from cooperative game theory that assigns a unique distribution of a total surplus generated by a coalition of players, based on the marginal contribution of each player to every possible sub-coalition. It is defined mathematically for a player (i) as the average of their marginal contributions across all possible orders in which the coalition can be formed. Formally, for a cooperative game ((N, v)) where (N) is the set of players and (v) is the characteristic function, the Shapley Value (\phi_i(v)) is:
[\phi_i(v) = \sum_{S \subseteq N \setminus {i}} \frac{|S|! (|N| - |S| - 1)!}{|N|!} [v(S \cup {i}) - v(S)]]
This formula ensures the distribution satisfies key axioms of efficiency (the total surplus is fully distributed), symmetry (identical players receive equal shares), dummy player (a player who adds no marginal value receives nothing), and additivity (the value for a sum of games is the sum of the values).
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The Shapley Value is a cornerstone concept from cooperative game theory. Understanding it requires familiarity with the formal frameworks for modeling group interactions and the related methods for evaluating contributions.
Cooperative Game Theory
The branch of game theory that studies scenarios where groups of players (coalitions) can form binding agreements to cooperate and achieve outcomes superior to acting alone. It focuses on:
- Characteristic Function: A function
v(S)that defines the total payoff a coalitionScan guarantee itself, independent of outsiders. - Core Solution: The set of payoff distributions where no subgroup has an incentive to break away and form its own coalition.
- Solution Concepts: Methods, like the Shapley Value, for proposing a "fair" distribution of the coalition's total gains among its members. The Shapley Value is one of the most prominent and axiomatically justified solution concepts within this framework.
Marginal Contribution
The fundamental building block for calculating the Shapley Value. An agent's marginal contribution to a coalition S is the increase in value that agent creates by joining:
MC_i(S) = v(S ∪ {i}) - v(S)
- Key Insight: The Shapley Value is essentially a weighted average of an agent's marginal contribution across all possible orders in which the coalition could be formed.
- Example: In a data science team (Data Engineer
D, ML EngineerM, Domain ExpertE),M's marginal contribution to the coalition{D}is the additional valueMbrings when joiningDalone, compared toD's solo value.
Axiomatic Characterization
The Shapley Value is uniquely defined by four desirable properties (axioms) that a fair payoff distribution should satisfy:
- Efficiency: The sum of all agents' Shapley Values equals the total value of the grand coalition:
Σ φ_i(v) = v(N). - Symmetry: If two agents contribute identically to every coalition, they receive the same payoff.
- Dummy Player: An agent who contributes zero marginal value to every coalition receives a payoff of zero.
- Additivity: For two combined games, the Shapley Value of the sum game is the sum of the Shapley Values from each individual game. This axiomatic foundation is what gives the Shapley Value its mathematical rigor and justification as a "fair" method.
Banzhaf Power Index
An alternative power index from cooperative game theory, often compared to the Shapley Value. While the Shapley Value averages marginal contributions over all orderings, the Banzhaf Index averages over all coalitions.
- Calculation: It counts the number of coalitions for which an agent is a swing player (i.e., their inclusion changes the coalition from losing to winning), then normalizes.
- Key Difference: The Banzhaf Index does not satisfy the Efficiency axiom; the indices sum to a value that is not necessarily the total value of the grand coalition. It is often used in voting theory to measure raw voting power, whereas Shapley is used for fair economic distribution.
Core (of a Game)
The set of all possible payoff distributions to the players such that no coalition has an incentive to defect. Formally, a payoff vector x is in the core if:
- It is efficient:
Σ x_i = v(N). - It is coalitionally rational: For every possible coalition
S,Σ_{i in S} x_i ≥ v(S).
- Relation to Shapley: The Shapley Value is not always in the core; for some games, it can propose a distribution that some coalition would find unfair. A key research area is determining for which classes of games (e.g., convex games) the Shapley Value is guaranteed to lie within the core, ensuring its stability against coalitional deviations.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us