Cooperative games

A cooperative game pays every group of players. Shapley values and axioms splits the payoff; Estimands: Shapley vs Banzhaf compares other splits.

Players, coalitions and payoffs

A game has players \(N = \{1, \dots, n\}\) and a characteristic function \(v : 2^N \to \mathbb{R}\), the worth \(v(S)\) of each coalition \(S \subseteq N\). The empty coalition \(\emptyset\) is the reference; the grand coalition \(N\) is the full input.

In mllm-shap:

  • players are tokens, sentences, messages, image regions or audio segments;

  • a coalition lists the present players; absent ones are removed or replaced (Masking);

  • \(v(S)\) is a value function (Value functions and normalizers) of the model output when only \(S\) is visible.

The running example, “Cancel my old phone plan today”, has 6 word players and \(2^6 = 64\) coalitions, each one model call (Exact estimation).

Marginal contributions

Player \(i\) adds to a coalition \(S \subseteq N \setminus \{i\}\)

\[\Delta_i(S) = v(S \cup \{i\}) - v(S)\]

Attribution methods differ only in how they weight these (Estimands: Shapley vs Banzhaf).

Eight coalitions of players 1, 2 and 3 arranged by size, from the empty set at the bottom to all three at the top, each with its payoff. Four blue edges add player 1, labelled with marginal contributions 0, 1, 1 and 0.

Illustrative. The three-player majority game, \(v(S) = 1\) when \(|S| \ge 2\). Blue edges add player 1: it contributes 1 when joining exactly one other player, else 0.

Game classes

  • Additive, \(v(S) = \sum_{i \in S} a_i\): every linear index returns \(a_i\).

  • Threshold, payoff 1 once \(t\) players are present: Shapley and Banzhaf disagree on the same coalitions (Estimands: Shapley vs Banzhaf).

  • Language models: payoffs depend on syntax, coreference and retrieved context: neither additive nor symmetric. Estimand labels and archived coalitions make runs auditable.

Owen’s (1972) multilinear extension reads \(v\) as an expectation over random coalitions, the view behind the samplers (Approximate estimation).

Types in mllm-shap

Game-theoretic object

mllm-shap type

Player set \(N\)

PlayerSet

Coalition \(S\)

CoalitionMask

Conversation under study

ConversationSnapshot

Game \((N, v)\)

CooperativeGame (+ payoffs)

Aggregated attributions

ExplainResult

ShapleyAggregator and BanzhafAggregator turn masks and payoffs into attributions without running a model.

References

  • von Neumann, J., & Morgenstern, O. (1944). Theory of Games and Economic Behavior. Princeton University Press.

  • Shapley, L. S. (1953). A value for n-person games. In H. W. Kuhn & A. W. Tucker (Eds.), Contributions to the Theory of Games II (Vol. 28, pp. 307–317). Princeton University Press. DOI:10.1515/9781400881970-018

  • Owen, G. (1972). Multilinear extensions of games. Management Science, 18(5 Part 2), 64–79. DOI:10.1287/mnsc.18.5.64

  • Roth, A. E. (Ed.). (1988). The Shapley Value: Essays in Honor of Lloyd S. Shapley. Cambridge University Press.