Thermal Attribution: Differentiable Shapley Values, Latent Bottlenecks, and the Tropical Limit of Cooperative Game Theory: An Accessible Guide

Plain-language explainer for doi:10.5281/zenodo.20236870 (#293)

The central idea in one sentence

The Shapley value — economics’ gold standard for fair attribution of credit in cooperative settings — is a discrete average over all orderings; this paper replaces it with a differentiable Gibbs-weighted average that reveals which players become critical bottlenecks at intermediate rationality, a feature invisible to the standard formula.

What Shapley values are for

Lloyd Shapley (1953) asked: in a cooperative game where players form coalitions to produce joint value, how should that value be fairly divided among the players? His answer — the Shapley value — is the unique division satisfying four axioms: efficiency (all value is distributed), symmetry (identical players receive equal shares), null player (a player contributing nothing receives nothing), and additivity (independent games can be analysed separately and summed).

The formula is:

\[\phi_i = \frac{1}{N!} \sum_{\sigma \in S_N} \left[ v(S_\sigma^{(i)} \cup \{i\}) - v(S_\sigma^{(i)}) \right],\]

where $S_N$ is the set of all $N!$ orderings of the players, $S_\sigma^{(i)}$ is the set of players before $i$ in ordering $\sigma$, and $v(S)$ is the value generated by coalition $S$. The Shapley value $\phi_i$ is the average marginal contribution of player $i$ over all possible orderings.

Modern applications include: attributing a machine learning model’s prediction to its input features (SHAP, Lundberg-Lee 2017), assigning voting power to legislators in weighted voting systems, and allocating costs in regulated industries.

The problem: the sum over $N!$ orderings is computationally intractable for $N > 20$. And the formula treats all $N!$ orderings equally, with no notion of which orderings are more likely or more important.

The thermal Shapley value

The thermal Shapley value $\phi_i(\beta)$ replaces the uniform average over $N!$ orderings with a Gibbs-weighted average:

\[\phi_i(\beta) = \frac{1}{Z(\beta)} \sum_{\sigma \in S_N} e^{\beta \cdot \Delta_i(\sigma)} \cdot \left[ v(S_\sigma^{(i)} \cup \{i\}) - v(S_\sigma^{(i)}) \right],\]

where $\Delta_i(\sigma) = v(S_\sigma^{(i)} \cup {i}) - v(S_\sigma^{(i)})$ is the marginal contribution of player $i$ in ordering $\sigma$, and $Z(\beta) = \sum_\sigma e^{\beta \cdot \Delta_i(\sigma)}$ is the partition function.

At $\beta = 0$, this reduces to the standard Shapley value: all orderings are weighted equally. At $\beta \to \infty$, the distribution concentrates on the ordering where player $i$’s marginal contribution is maximal — the ordering in which $i$ is the bottleneck, the player whose arrival turns a losing coalition into a winning one.

The thermal Shapley value is differentiable in $\beta$. Its derivative $\partial \phi_i / \partial \beta$ at $\beta = 0$ measures the response of $i$’s attribution to a small departure from uniform ordering — a first-order correction that captures whether $i$ is more or less important in the orderings that produce the highest total value.

The latent bottleneck index

The latent bottleneck index $\Lambda_i$ is defined as:

\[\Lambda_i = \left|\frac{\partial \phi_i(\beta)}{\partial \beta}\right|_{\beta = 0}.\]

This measures how sensitive player $i$’s attribution is to temperature. A high $\Lambda_i$ means that $i$’s share changes dramatically as $\beta$ increases: $i$ is much more (or less) important in high-value orderings than in low-value ones. A low $\Lambda_i$ means $i$’s contribution is similar across all orderings.

The latent bottleneck index reveals players who are critical conditional on being in the right position — players who are transformative when the coalition is structured correctly, but contribute little on average because they are rarely in the right position. These players are invisible to the standard Shapley value but highly visible to $\Lambda_i$.

The tropical limit: Laplace’s method

At $\beta \to \infty$, the sum over orderings is dominated by the single ordering $\sigma^*$ that maximises $\Delta_i(\sigma)$ — the ordering where $i$ contributes most. By Laplace’s method:

\[\phi_i(\beta) \xrightarrow{\beta \to \infty} v(S_{\sigma^*}^{(i)} \cup \{i\}) - v(S_{\sigma^*}^{(i)}) = \max_\sigma \Delta_i(\sigma).\]

This is the tropical limit: the Gibbs sum concentrates on the maximum, recovering the tropical (min-plus or max-plus) semiring. The tropical Shapley value is the maximum marginal contribution of player $i$ — the best case for $i$, if all orderings were optimised to showcase $i$’s contribution.

The tropical limit is computationally tractable (no sum over $N!$ orderings, just a maximum), and provides an upper bound on the standard Shapley value. The gap between the tropical Shapley value and the standard Shapley value measures how “peaky” the distribution of marginal contributions is — a large gap means $i$ is highly important in a small number of orderings and relatively unimportant in most.

Worked example: three-sector Cobb-Douglas economy

Consider an economy with three sectors: Capital ($K$), Labour ($L$), and Energy ($E$). Output is

\[Y(S) = K^{\alpha_K} L^{\alpha_L} E^{\alpha_E}\]

for coalition $S \subseteq {K, L, E}$, with $\alpha_K = 0.4, \alpha_L = 0.4, \alpha_E = 0.2$.

The standard Shapley values are approximately: $\phi_K \approx 0.4$, $\phi_L \approx 0.4$, $\phi_E \approx 0.2$ — proportional to the exponents, as expected. Energy’s share is the smallest.

Now compute the latent bottleneck indices. The ordering $K \to E \to L$ — where Energy joins last, just before Labour — produces a large marginal contribution for $E$ (because the Energy-Capital sub-economy has very low output, so adding Energy to a Capital coalition produces a large jump). In this ordering, $\Delta_E$ is much larger than in the ordering $K \to L \to E$ (where Labour has already largely filled the Energy niche).

The latent bottleneck index $\Lambda_E$ is the largest of the three. Energy has the smallest standard Shapley value but the largest latent bottleneck index. This means: in the current ordering of development (capital accumulates first, labour develops, energy is the last constraint to bind), Energy’s standard attribution underestimates its potential criticality.

A policy that removes Energy as a bottleneck (massive renewable energy capacity investment) would, in the thermal Shapley framework, produce the largest welfare gain of any single-sector intervention — even though the standard Shapley value would recommend prioritising Capital or Labour.

Computational tractability

The sum over $N!$ orderings is avoided by one of three methods:

  1. Stratified sampling: Sample orderings with probability proportional to $e^{\beta \Delta_i(\sigma)}$ using MCMC. Converges in polynomial time.
  2. Tropical approximation: Use the tropical ($\beta \to \infty$) value as an approximation, which requires only a single maximum search.
  3. Owen-Shapley decomposition: For specific functional forms (Cobb-Douglas, linear, polynomial), the sum can be computed analytically.

For machine learning attribution (SHAP), the thermal extension provides a principled way to weight more-important feature orderings more heavily, correcting a known limitation of SHAP: that it treats permutations with low overall model output as equally informative as those with high output.

For the full technical treatment, see doi:10.5281/zenodo.20236870