Shapley values are a method from cooperative game theory that fairly distributes the payout of a coalition among its players based on their marginal contributions. In machine learning, they are adapted to decompose a single model prediction by assigning each input feature an importance value, representing its weighted average contribution across all possible feature coalitions.
Glossary
Shapley Values

What are Shapley Values?
A foundational concept from cooperative game theory adapted for machine learning to assign a fair, axiomatic importance score to each feature for a specific prediction.
The calculation satisfies four axioms: efficiency, symmetry, dummy, and additivity, ensuring a unique, fair attribution. The practical implementation, SHAP (SHapley Additive exPlanations), approximates these values to explain black-box model outputs, making them a gold standard for model explainability and algorithmic auditing.
Key Properties of Shapley Values
Shapley values are defined by a unique set of desirable axioms that guarantee a fair and consistent distribution of contributions. These mathematical properties are what make the solution concept both elegant in game theory and reliable for machine learning interpretability.
Efficiency
The sum of the Shapley values for all features equals the difference between the model's prediction for a specific instance and the average prediction over the entire dataset. This property ensures a complete and additive decomposition of the prediction, leaving no contribution unaccounted for. In practical terms, if a model predicts a loan rejection with a score of 0.8 while the baseline is 0.5, the Shapley values for income, debt, and credit history will sum to exactly 0.3.
Symmetry
If two features contribute identically to every possible subset of other features, they must receive identical Shapley values. This guarantees equal treatment for equal contribution, preventing any arbitrary bias in the attribution process. For example, if 'monthly_income' and 'annual_income_divided_by_12' provide the exact same predictive information in all coalitions, they will be assigned precisely the same importance score.
Dummy (Null Player)
A feature that contributes nothing to the prediction—regardless of which other features it is combined with—receives a Shapley value of exactly zero. This axiom ensures that irrelevant features are correctly ignored. If a model has learned to disregard a 'customer_ID' column entirely, its Shapley value will be 0.0, preventing noise features from diluting the explanation.
Linearity (Additivity)
If a prediction is the sum of two separate games (or models), the Shapley value for the combined game is the sum of the Shapley values from each individual game. This property allows for consistent explanations across ensemble methods. When using a Random Forest that averages 100 decision trees, the Shapley value for the ensemble is exactly the average of the Shapley values computed for each individual tree.
Marginalism
The Shapley value is fundamentally a weighted average of marginal contributions. It calculates the importance of a feature by observing how much the prediction changes when the feature is added to every possible subset of the other features. This exhaustive consideration of all possible feature orderings is what distinguishes Shapley values from simpler, order-dependent attribution methods and captures complex interaction effects.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about Shapley values in machine learning, from foundational game theory concepts to practical implementation challenges.
Shapley values are a feature attribution method that assigns each input feature a fair contribution score for a specific model prediction, derived from cooperative game theory. The method treats each feature as a 'player' in a coalition game where the 'payout' is the model's prediction. For a given instance, the Shapley value of a feature is the weighted average of its marginal contribution across all possible subsets of features. Formally, for feature i, the Shapley value φ_i is computed as:
codeφ_i = Σ_{S ⊆ N \ {i}} [|S|! (|N| - |S| - 1)! / |N|!] × [f(S ∪ {i}) - f(S)]
where N is the set of all features, S is a subset not containing i, and f(S) is the model's prediction using only features in S. This formulation satisfies four axioms: efficiency (contributions sum to the prediction difference from the average), symmetry (identical contributions yield equal values), dummy (zero-contribution features get zero value), and additivity (values combine across games). In practice, exact computation is exponential, so methods like KernelSHAP and TreeSHAP provide efficient approximations.
Shapley Values vs. Other Attribution Methods
A technical comparison of Shapley values against other common model explanation techniques across key properties relevant to enterprise governance and auditability.
| Property | Shapley Values | LIME | Integrated Gradients |
|---|---|---|---|
Theoretical Foundation | Cooperative game theory (axiomatic) | Local surrogate modeling (heuristic) | Path integration of gradients (axiomatic) |
Efficiency (sum to prediction) | |||
Model Agnostic | |||
Handles Feature Correlation | Via conditional expectation | Struggles; perturbed samples unrealistic | Requires careful baseline selection |
Computational Cost | High (exponential in features) | Moderate (sampling-based) | Moderate (requires gradients) |
Global Explanations | Yes (via mean absolute value) | No (local only) | Yes (via average attributions) |
Consistency Guarantee |
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
Shapley Values are a foundational concept in model interpretability. The following terms represent the specific implementations, alternatives, and extensions that data scientists and regulators use to audit black-box predictions.

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