· Xiaojing Yang · Explainability and Responsible AI · 4 min read

中文

Coalitions, Marginal Contributions, and Shapley Values

The basic Shapley framework for data attribution: coalition value, marginal contribution, averaging over contexts, and why the result is more stable than one ablation.

Core idea

A Shapley value is the expected marginal contribution of a unit across many possible coalition contexts. It asks not only whether a unit helps alone, but how much it helps when added to different subsets of other data.

This note is part of my series Training Data Attribution for NLP and LLM Research. The series is written as both a research notebook and an interview preparation path: each article should help me explain the idea clearly, connect it to my thesis, and identify what would become future PhD work.

Guiding question: How do Shapley values define fair contribution when data units interact?

Training data attribution map

Intuition

Data rarely works independently. A petroleum glossary may be valuable only when the model also sees enough sentence-level context. A noisy web source may hurt when combined with small clean data, but matter less when the clean dataset is already large. Shapley values make this context dependence explicit.

In NLP and LLM research, this matters because model behaviour is deeply shaped by data mixture. A model may be fluent because of broad web text, domain-accurate because of specialised documents, safer because of curated instruction data, or biased because of repeated patterns in a subset of the corpus. Training-data attribution gives us language for asking these questions systematically instead of only saying “the data matters”.

Formal lens

For units N and utility v(S), the Shapley value of unit i is the weighted average of v(S union {i}) - v(S) over all coalitions S not containing i. The weighting corresponds to all possible insertion orders. Important properties include efficiency, symmetry, dummy, and additivity.

The important discipline is to define the attribution setup before interpreting the score:

Design choiceQuestion to answer
Attribution unitWhat receives credit: source, group, document, example, or token?
Utility functionWhich behaviour is being explained: quality, terminology, style, factuality, or safety?
InterventionAre we adding, deleting, reweighting, correcting, or retraining?
EstimatorIs the score exact, sampled, gradient-based, surrogate-based, or heuristic?
UncertaintyHow stable is the score across seeds, samples, metrics, and evaluation sets?

NLP / LLM example

In a four-group MT experiment, I can train or approximate models on coalitions such as {general}, {domain}, {Bokmål-like}, and {Nynorsk-like}. A group receives high contribution if adding it to many different existing coalitions improves the chosen metric.

This is why I do not want to treat attribution as a generic interpretability topic. For my profile, the natural connection is multilingual and domain-specific NLP: low-resource settings, technical terminology, written-standard variation, and evaluation beyond one headline metric.

Connection to my thesis

In my thesis narrative, training-data attribution is useful because it turns a vague data question into an experimental design:

  1. define interpretable data units;
  2. define the model behaviour to explain;
  3. compare controlled data coalitions or interventions;
  4. estimate contribution;
  5. report uncertainty and limitations;
  6. decide what evidence is strong enough to support a causal-style claim.

That structure helps me avoid overclaiming. A score is not automatically a causal explanation. It is a measurement produced by a specific setup.

What I have done, understand, and would extend

LevelStatus
Already completed / thesis-readyGroup-level attribution, coalition thinking, metric-based utilities, cautious interpretation, random baselines, bootstrap-style reliability checks.
I understand but may not fully implement yetInstance-level gradient attribution, influence functions, TracIn, Monte Carlo Shapley, surrogate/datamodel approximations.
Strong PhD extensionHierarchical attribution, intervention-based validation, factuality/style-specific utilities, scalable attribution for LLM data mixtures.

Interview answer

I would define v(S) as the evaluation score of a model trained with coalition S, then compute or approximate each group’s average marginal contribution. The important point is that Shapley does not treat data contribution as one leave-one-out difference. It averages over coalition contexts, which is valuable when data groups interact.

References and reading path

  • Lloyd Shapley, A Value for n-Person Games.
  • Ghorbani and Zou, Data Shapley: Equitable Valuation of Data for Machine Learning.
  • Koh and Liang, Understanding Black-box Predictions via Influence Functions.
  • Pruthi et al., Estimating Training Data Influence by Tracing Gradient Descent.
  • Ilyas et al., Datamodels: Predicting Predictions from Training Data.
  • Rei et al., COMET: A Neural Framework for MT Evaluation.
Share:
Back to Blog

Related Posts

View All Posts »
Research & ApplicationsExplainability and Responsible AIEN

Data Intervention and Attribution Validation

How to validate data attribution through deletion, correction, reweighting, counterfactual examples, retraining, and random deletion baselines.