II · THE IDEA · ARTIFICIAL INTELLIGENCE
Data Valuation with Shapley Values
▶ Listen · narrated
Not every training point pulls its weight. A principled way to measure each example’s contribution is to average what it adds across all coalitions of the other points.
At a glance
- What it is
- A value for each training example equal to its average marginal effect on a performance metric
- Origin
- Cooperative game theory, with examples as players and model score as payoff
- Equity aims
- Symmetry, dummy players at zero, and values that sum to total performance gain
- Main obstacle
- Exact scores need exponentially many subset trainings; practice uses approximations
- Typical use
- Find high-value points to keep and low-value points to inspect or drop
Think of a group project graded as a whole, where you want to know how much each person contributed. You cannot only watch the final team: you also check smaller sub-teams, add the person to each, and see how the grade moves. Their credit is the average of those moves.
Data Shapley does the same for training examples. The “grade” is a model performance score such as accuracy on held-out data. Each example’s value is how much that score rises or falls, on average, when the example is added to every possible subset of the other examples. Points that never help get zero; points that help the same amount get the same value; and all the values add up to the gain from using the full training set.
In real projects nobody trains on every subset. People sample many subsets and approximate the average. The result is a ranking you can use to spot weak or strong data, not a full explanation of why each row scored as it did.
Data Shapley treats supervised training as a cooperative game. Players are training examples i ∈ N; the characteristic function v(S) is the performance of a model trained on S ⊆ N and evaluated with a fixed metric on a held-out set (or another agreed payoff). The Shapley value is
φ_i(v) = Σ_{S ⊆ N\{i}} [|S|!(|N|−|S|−1)! / |N|!] · (v(S ∪ {i}) − v(S)).
This is the unique allocation satisfying symmetry, dummy (null marginals ⇒ φ_i = 0), and efficiency (Σ_i φ_i = v(N) − v(∅)). Leave-one-out is only the term for S = N\{i}; it is not a substitute.
Exact evaluation is O(2^|N|) trainings. Practical estimators sample permutations or coalitions, often with early truncation when marginals become negligible, and reuse models where the learner and metric allow. Variance depends on sample count and on instability of training. Values are conditional on v: change the architecture, regularisation, or metric and φ can reorder. Negative values are possible when an example tends to hurt the metric. Use the ranking for triage (debug labels, deduplicate, prioritise collection); do not treat φ_i as a causal feature attribution or as transferable across different v.
Look closer
Contribution is defined only through coalitions
For one training example the procedure is conceptually simple: take every subset of the other examples, train once without it and once with it added, and record the change in a chosen performance measure. The Data Shapley value is a weighted average of those changes. No single leave-one-out difference is enough, because a point may look useless beside a near-duplicate and indispensable when that duplicate is absent.
The arithmetic is meant to be equitable
Three properties anchor the construction. Points that always add the same increment receive the same value. A point that never changes performance in any coalition is valued at zero. And the values of all points together recover the performance of the full training set relative to training on nothing. Those requirements leave little freedom in how the average is weighted.
What you actually see in a ranking
After approximation, the output is usually an ordered list or a scatter of scores, not a causal story. High-scoring examples are those that, on average, improve the metric under the learning algorithm you used. Low-scoring ones may be noisy, redundant, or simply unhelpful for that metric. The ranking does not by itself explain which of those reasons applies.
The story
Supervised models are trained on tables of examples, and it is easy to treat every row as equally entitled to a place in the set. Performance, however, is not built that evenly. Some points carry signal that the learner cannot get elsewhere; some are near-duplicates; some are mislabelled or drawn from a region the test distribution barely touches. Data valuation tries to turn that unevenness into a number per example.
The Data Shapley approach borrows the Shapley value from cooperative game theory. There the problem is how to share a team’s payoff among members so that each is credited for what they add. Here the “members” are training examples and the “payoff” is a scalar performance measure of a model trained on a given subset — held-out accuracy, for instance, or another metric the practitioner cares about. The empty set corresponds to a baseline with no training data; the full set corresponds to the model one would normally ship.
Formally, the value of an example is its average marginal contribution across coalitions. One considers every subset of the remaining training data, measures how much performance rises or falls when the example is added to that subset, and averages those differences with weights that enforce equity: identical contributors match, never-helpful points score zero, and the sum of all values equals the total gain from the full set over the baseline. The construction is therefore not an arbitrary importance score; under those equity conditions it is the unique allocation that fits.
Exact computation is rarely feasible. The number of subsets grows exponentially with the size of the training set, and each subset evaluation means training a model. Practical work therefore relies on Monte Carlo sampling of coalitions, truncated enumeration, or other approximations that trade precision for cost. The quality of the estimate depends on how many coalitions one can afford and on how stable the underlying learner is across those subsets.
What the method does not claim is a story about why a point scored as it did. A low value might mean label noise, redundancy with stronger neighbours, or simply that the chosen metric and model class do not need that region of the feature space. A high value might mean rarity, clean labelling, or leverage on a decision boundary the test set cares about. Valuation ranks contribution; diagnosis is a separate step.
Used carefully, the ranking still helps. Practitioners can inspect the bottom of the list for errors, down-weight or remove points that never help, and protect or acquire more data like the points at the top. The editorial point is modest and practical: credit assigned by average marginal contribution is one disciplined way to decide which training examples are earning their keep.
Why it mattered then
As machine learning systems began to depend on large, heterogeneous training collections — including data gathered from many sources and contributors — the question of which examples actually improved a model stopped being academic. Fixed per-example fees and uniform trust in every row both looked increasingly blunt. Equitable valuation offered a way to tie credit to measured contribution rather than to volume alone, at a moment when data markets, crowdsourcing, and shared benchmarks made that distinction commercially and scientifically salient.
Why it matters now
Training sets still dominate cost and behaviour. Cleaning, active acquisition, machine-unlearning requests, and negotiations over data partnerships all need a defensible notion of which rows matter. Shapley-style scores are not the only tool, and they remain expensive to estimate well, but the underlying demand has not faded: practitioners still need principled rankings when deciding what to keep, fix, price, or discard under a stated performance metric.
The surprising detail
A point that looks harmful in a leave-one-out test can still receive a solid positive Shapley value, and the reverse can happen too. Leave-one-out only measures the marginal effect on the full set; Shapley averages that effect over every smaller coalition as well. An example that is redundant once its near-duplicates are present may be highly valuable in coalitions where those duplicates are missing — and that history is counted.
What is disputed
Published Data Shapley results depend on the chosen performance metric, the learning algorithm, and the approximation scheme. Different metrics or unstable learners can reorder the ranking. Exact values are generally unavailable for large sets; reported scores should be read as estimates under those choices, not as intrinsic properties of the examples alone.
Remember this
Data Shapley scores each training example by its average marginal contribution to a chosen performance metric across coalitions — unique under simple equity axioms, and almost always approximated in practice.
Test yourself
Two training examples always change the performance metric by the same amount whenever either is added to any coalition. One of them is later found to be a near-duplicate of several other points in the full set. How should their Data Shapley values compare, and what does that illustrate about redundancy?
They receive the same Shapley value, by the symmetry property: equal marginal contributions imply equal values. Redundancy is already folded into those marginals — once near-duplicates are present in a coalition, each adds little — so the average already reflects that. Symmetry does not mean both points are irreplaceable in the full set; it means the method never separates them if their incremental behaviour is identical everywhere it is measured.
Go deeper
- [1904.02868] Data Shapley: Equitable Valuation of Data for Machine Learning · arxiv.org
- [2012.08375] Practical Auto-Calibration for Spatial Scene-Understanding from Crowdsourced Dashcamera Videos · arxiv.org
Image: Original diagram, The Daily Triptych. Licence: Original work. Source.