Inferensys

Glossary

Shapley Value

The Shapley value is a concept from cooperative game theory used in federated learning to quantify the marginal contribution of each client's data to the performance of the global model.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
COOPERATIVE GAME THEORY

What is the Shapley Value?

The Shapley value is a foundational concept from cooperative game theory that provides a mathematically fair method for distributing a collective payoff among contributing players. In federated learning, it is adapted to quantify the marginal contribution of each client's data to the performance of the global model.

The Shapley value is a solution concept from cooperative game theory that assigns a unique distribution of a total surplus to each player based on their marginal contribution to every possible coalition. Formally, it is the average marginal contribution of a player across all permutations of the player set. This axiomatic approach satisfies properties of efficiency, symmetry, dummy player, and additivity, making it a theoretically grounded measure of fair attribution. In machine learning, it underpins popular model explainability tools like SHAP (SHapley Additive exPlanations).

In federated learning, the Shapley value is repurposed for contribution valuation and client selection. It quantifies how much each client's local dataset improves the global model's accuracy compared to models trained without it. Calculating the exact value is computationally prohibitive, requiring retraining on all possible subsets of clients. Therefore, practical implementations use approximations, such as Monte Carlo sampling or gradient-based heuristics, to efficiently estimate contributions for incentive design or to prioritize high-value clients in resource-aware selection strategies.

AXIOMATIC FOUNDATIONS

Key Properties of the Shapley Value

The Shapley value is defined by four axioms from cooperative game theory. These properties ensure a unique, fair, and mathematically rigorous valuation of each player's contribution.

01

Efficiency (Budget Balance)

The Efficiency axiom states that the sum of all assigned Shapley values equals the total value generated by the grand coalition of all players. This ensures the entire surplus from cooperation is fully distributed, with no value created or destroyed.

  • Mathematically: Σ φ_i(v) = v(N), where N is the set of all players.
  • In FL Context: The total 'value' (e.g., global model accuracy improvement) is precisely allocated among the participating clients. This property is foundational for creating a closed economic system in contribution-based incentive mechanisms.
02

Symmetry (Equal Treatment)

The Symmetry axiom states that if two players make identical marginal contributions to every possible coalition, they must receive the same Shapley value. Fairness is based solely on contribution, not on arbitrary labels or identities.

  • Formal Definition: If v(S ∪ {i}) = v(S ∪ {j}) for all coalitions S not containing i or j, then φ_i(v) = φ_j(v).
  • In FL Context: Two clients with statistically identical data distributions and local dataset sizes that provide the same utility to any subset of other clients will be valued equally, preventing bias from non-contributory factors.
03

Dummy Player (Null Player)

The Dummy Player axiom states that a player who adds no marginal value to any coalition receives a Shapley value of zero. Value is assigned only for actual contribution.

  • Formal Definition: If v(S ∪ {i}) = v(S) for all coalitions S, then φ_i(v) = 0.
  • In FL Context: A client whose local data provides no improvement to any possible combination of other clients' models (e.g., its data is pure noise or already perfectly represented by others) is correctly assigned zero contribution. This property is critical for filtering out non-beneficial participants.
04

Additivity (Linearity)

The Additivity axiom states that the Shapley value of a sum of games is the sum of the Shapley values from each individual game. This allows complex valuation problems to be decomposed.

  • Mathematically: For any two characteristic functions v and w, φ_i(v + w) = φ_i(v) + φ_i(w).
  • In FL Context: If the overall model utility (v) can be expressed as a sum of utilities from different tasks or data modalities (v1 + v2), a client's total contribution is the sum of its contributions to each sub-task. This supports multi-objective or multi-task federated learning scenarios.
05

Marginalism

While not one of the original four axioms, Marginalism is a fundamental consequence: a player's Shapley value depends only on its marginal contributions to various coalitions. The valuation is completely defined by the incremental value the player brings.

  • Core Principle: φ_i(v) is a weighted average of i's marginal contributions, v(S ∪ {i}) - v(S), over all possible subsets S.
  • In FL Context: A client's valuation is not based on its data in isolation but on how its data improves models trained on every possible combination of other clients' data. This captures complex, non-linear interactions in data utility.
06

Uniqueness Theorem

The Uniqueness Theorem (Shapley, 1953) is the seminal result proving that the Shapley value is the only solution concept satisfying the four axioms of Efficiency, Symmetry, Dummy Player, and Additivity. This provides a rigorous, non-arbitrary foundation for contribution valuation.

  • Significance: It guarantees there is no other fair distribution scheme that satisfies all four intuitive fairness principles. Any alternative method (e.g., simpler heuristics) must violate at least one axiom.
  • In FL Context: For system architects designing incentive or client selection mechanisms, this theorem justifies the computational cost of Shapley value approximation, as it is the unique theoretically fair solution.
CLIENT CONTRIBUTION VALUATION

Shapley Value vs. Other Contribution Metrics

A comparison of methods used in federated learning to quantify the value or contribution of individual clients to the global model's performance.

Metric / FeatureShapley ValueGradient NormData QuantityRandom Baseline

Theoretical Foundation

Cooperative Game Theory (axiomatic)

Optimization (first-order approximation)

Heuristic / Assumption

Statistical (no foundation)

Fairness Guarantees

Computational Cost

Exponential (exact)

Linear

Negligible

Negligible

Handles Non-IID Data

Requires Model Retraining

Exponential (exact) / Linear (approximate)

Interpretability

High (exact marginal contribution)

Medium (update magnitude)

Low (proxy only)

None

Primary Use Case

Contribution valuation, incentive design, fair selection

Stratified or importance sampling

Resource-aware weighting

Control group, simple baselines

Robust to Byzantine Clients

SHAPLEY VALUE

Frequently Asked Questions

The Shapley value is a concept from cooperative game theory that has been adapted to quantify the contribution of individual participants in federated learning. These questions address its core mechanics, applications, and practical considerations for system architects and CTOs.

In federated learning, the Shapley value is a mathematical framework from cooperative game theory used to fairly attribute the marginal contribution of each client's local dataset to the overall performance of the trained global model. It provides a principled way to value client participation, which can be used for incentive design, client selection, or understanding data source importance. The core idea is to evaluate a client's contribution by measuring the change in a predefined utility function (e.g., model accuracy on a validation set) when that client's data is added to various possible coalitions of other clients.

Prasad Kumkar

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.