HOME

TheInfoList



OR:

The Shapley value is a solution concept in cooperative
game theory Game theory is the study of mathematical models of strategic interactions among rational agents. Myerson, Roger B. (1991). ''Game Theory: Analysis of Conflict,'' Harvard University Press, p.&nbs1 Chapter-preview links, ppvii–xi It has appli ...
. It was named in honor of Lloyd Shapley, who introduced it in 1951 and won the Nobel Memorial Prize in Economic Sciences for it in 2012. To each cooperative game it assigns a unique distribution (among the players) of a total surplus generated by the coalition of all players. The Shapley value is characterized by a collection of desirable properties. Hart (1989) provides a survey of the subject. The setup is as follows: a coalition of players cooperates, and obtains a certain overall gain from that cooperation. Since some players may contribute more to the coalition than others or may possess different bargaining power (for example threatening to destroy the whole surplus), what final distribution of generated surplus among the players should arise in any particular game? Or phrased differently: how important is each player to the overall cooperation, and what payoff can he or she reasonably expect? The Shapley value provides one possible answer to this question. For cost-sharing games with concave cost functions, the optimal cost-sharing rule that optimizes the price of anarchy, followed by the price of stability, is precisely the Shapley value cost-sharing rule. (A symmetrical statement is similarly valid for utility-sharing games with convex utility functions.) In mechanism design, this means that the Shapley value solution concept is optimal for these sets of games.


Formal definition

Formally, a coalitional game is defined as: There is a set ''N'' (of ''n'' players) and a function v that maps subsets of players to the real numbers: v \colon 2^N \to \mathbb , with v ( \emptyset ) = 0 , where \emptyset denotes the empty set. The function v is called a characteristic function. The function v has the following meaning: if ''S'' is a coalition of players, then v(''S''), called the worth of coalition ''S'', describes the total expected sum of payoffs the members of S can obtain by cooperation. The Shapley value is one way to distribute the total gains to the players, assuming that they all collaborate. It is a "fair" distribution in the sense that it is the only distribution with certain desirable properties listed below. According to the Shapley value, the amount that player ''i'' is given in a coalitional game ( v, N) is :\varphi_i(v)=\sum_ \frac(v(S\cup\)-v(S)) : \quad \quad \quad = \sum_ ^ (v(S\cup\)-v(S)) where ''n'' is the total number of players and the sum extends over all subsets ''S'' of ''N'' not containing player ''i''. Also note that is the multinomial coefficient. The formula can be interpreted as follows: imagine the coalition being formed one actor at a time, with each actor demanding their contribution v(''S''∪) − v(''S'') as a fair compensation, and then for each actor take the average of this contribution over the possible different
permutation In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or proc ...
s in which the coalition can be formed. An alternative equivalent formula for the Shapley value is: :\varphi_i(v)= \frac\sum_R\left v(P_i^R \cup \left \) - v(P_i^R) \right /math> where the sum ranges over all n! orders R of the players and P_i^R is the set of players in N which precede i in the order R. Finally, it can also be expressed as : \varphi_i(v) = \frac \sum_ \binom^ (v(S \cup \) - v(S)) which can be interpreted as : \varphi_i(v) = \frac \sum_ \frac


In terms of synergy

From the characteristic function v one can compute the ''synergy'' that each group of players provides. The synergy is the unique function w \colon 2^N \to \mathbb , such that : v(S) = \sum_ w(R) for any subset S \subseteq N of players. In other words, the 'total value' of the coalition S comes from summing up the ''synergies'' of each possible subset of S. Given a characteristic function v, the synergy function w is calculated via : w(S) = \sum_ (-1)^ v(R) using the Inclusion exclusion principle. In other words, the synergy of coalition S is the value v(S) , which is not already accounted for by its subsets. The Shapley values are given in terms of the synergy function by : \varphi_i(v) = \sum_ \frac where the sum is over all subsets S of N that include player i. This can be interpreted as : \varphi_i(v) = \sum_ \frac In other words, the synergy of each coalition is divided equally between all members.


Examples


Business example

Consider a simplified description of a business. An owner, ''o'', provides crucial capital in the sense that, without him/her, no gains can be obtained. There are ''m'' workers ''w''1,...,''w''''m'', each of whom contributes an amount ''p'' to the total profit. Let :N = \. The value function for this coalitional game is : v(S) = \begin mp, & \texto \in S\\ 0, & \text\\ \end where ''m'' is the cardinality of S \setminus \. Computing the Shapley value for this coalition game leads to a value of for the owner and for each one of the ''m'' workers. This can be understood from the perspective of synergy. The synergy function w is : w(S) = \begin p, & \text S = \ \\ 0, & \text\\ \end so the only coalitions that generate synergy are one-to-one between the owner and any individual worker. Using the above formula for the Shapley value in terms of w we compute : \varphi_ = \frac = \frac and : \varphi_o = \sum_^m \frac = \frac


Glove game

The glove game is a coalitional game where the players have left- and right-hand gloves and the goal is to form pairs. Let :N = \, where players 1 and 2 have right-hand gloves and player 3 has a left-hand glove. The value function for this coalitional game is : v(S) = \begin 1 & \textS \in \left\;\\ 0 & \text.\\ \end The formula for calculating the Shapley value is :\varphi_i(v)= \frac\sum_R\left v(P_i^R \cup \left \) - v(P_i^R) \right where is an ordering of the players and P_i^R is the set of players in which precede in the order . The following table displays the marginal contributions of Player 1. : \begin \textR\,\! & MC_1 \\ \hline &v(\) - v(\varnothing) = 0 - 0 = 0 \\ &v(\) - v(\varnothing) = 0 - 0 = 0 \\ &v(\) - v(\) = 0 - 0 = 0 \\ &v(\) - v(\) = 1 - 1 = 0 \\ &v(\) - v(\) = 1 - 0 =1 \\ &v(\) - v(\) = 1 - 1 = 0 \end Observe :\varphi_1(v)= \!\left(\frac\right)(1)=\frac. By a symmetry argument it can be shown that :\varphi_2(v)=\varphi_1(v)=\frac. Due to the efficiency axiom, the sum of all the Shapley values is equal to 1, which means that :\varphi_3(v) = \frac = \frac.


Properties

The Shapley value has many desirable properties.


Efficiency

The sum of the Shapley values of all agents equals the value of the grand coalition, so that all the gain is distributed among the agents: :\sum_\varphi_i(v) = v(N) ''Proof'': \sum_ \varphi_i(v) = \frac \sum_R \sum_ v(P_i^R \cup \left \) - v(P_i^R) = \frac \sum_R v(N) = \frac , N, !\cdot v(N) = v(N) since \sum_ v(P_i^R \cup \left \) - v(P_i^R) is a telescoping sum and there are '', N, !'' different orderings ''R''.


Symmetry

If i and j are two actors who are equivalent in the sense that :v(S\cup\) = v(S\cup\) for every subset S of N which contains neither i nor j, then \varphi_i(v) = \varphi_j(v). This property is also called ''equal treatment of equals''.


Linearity

If two coalition games described by gain functions v and w are combined, then the distributed gains should correspond to the gains derived from v and the gains derived from w: :\varphi_i(v+w) = \varphi_i(v) + \varphi_i(w) for every i in N. Also, for any real number a, :\varphi_i(a v) = a \varphi_i(v) for every i in N.


Null player

The Shapley value \varphi_i(v) of a null player i in a game v is zero. A player i is ''null'' in v if v(S\cup \) = v(S) for all coalitions S that do not contain i. Given a player set N, the Shapley value is the only map from the set of all games to payoff vectors that satisfies ''all four'' properties: Efficiency, Symmetry, Linearity, Null player.


Stand-alone test

If v is a
subadditive set function In mathematics, a subadditive set function is a set function whose value, informally, has the property that the value of function on the union of two sets is at most the sum of values of the function on each of the sets. This is thematically related ...
, i.e., v(S\sqcup T) \leq v(S) + v(T), then for each agent i: \varphi_i(v) \leq v(\). Similarly, if v is a
superadditive set function In mathematics, a superadditive set function is a set function whose value when applied to the union of two disjoint sets is greater than or equal to the sum of values of the function applied to each of the sets separately. This definition is analog ...
, i.e., v(S\sqcup T) \geq v(S) + v(T), then for each agent i: \varphi_i(v) \geq v(\). So, if the cooperation has positive externalities, all agents (weakly) gain, and if it has negative externalities, all agents (weakly) lose.


Anonymity

If i and j are two agents, and w is a gain function that is identical to v except that the roles of i and j have been exchanged, then \varphi_i(v) = \varphi_j(w). This means that the labeling of the agents doesn't play a role in the assignment of their gains.


Marginalism

The Shapley value can be defined as a function which uses only the marginal contributions of player i as the arguments.


Characterization

The Shapley value not only has desirable properties, it is also the ''only'' payment rule satisfying some subset of these properties. For example, it is the only payment rule satisfying the four properties of Efficiency, Symmetry, Linearity and Null player. See for more characterizations.


Aumann–Shapley value

In their 1974 book, Lloyd Shapley and Robert Aumann extended the concept of the Shapley value to infinite games (defined with respect to a non-atomic
measure Measure may refer to: * Measurement, the assignment of a number to a characteristic of an object or event Law * Ballot measure, proposed legislation in the United States * Church of England Measure, legislation of the Church of England * Mea ...
), creating the diagonal formula. This was later extended by Jean-François Mertens and Abraham Neyman. As seen above, the value of an n-person game associates to each player the expectation of his contribution to the worth or the coalition or players before him in a random ordering of all the players. When there are many players and each individual plays only a minor role, the set of all players preceding a given one is heuristically thought as a good sample of the players so that the value of a given infinitesimal player around as "his" contribution to the worth of a "perfect" sample of the population of all players. Symbolically, if is the coalitional worth function associating to each coalition measured subset of a measurable set that can be thought as I= ,1/math> without loss of generality. : (Sv)(ds) = \int_0^1 (\, v(tI + ds)- v(tI)\,)\,dt. where (Sv)(ds)denotes the Shapley value of the infinitesimal player in the game, is a perfect sample of the all-player set containing a proportion of all the players, and tI+ ds is the coalition obtained after joins . This is the heuristic form of the diagonal formula. Assuming some regularity of the worth function, for example assuming can be represented as differentiable function of a non-atomic measure on , , v(c)=f(\mu(c)) with density function \varphi, with \mu(c)=\int 1_c(u)\varphi(u)\,du, ( 1_c() the characteristic function of ). Under such conditions : \mu(tI)=t\mu(I) , as can be shown by approximating the density by a step function and keeping the proportion for each level of the density function, and : v(tI + ds)=f(t\mu(I))+f'(t\mu(I))\mu(ds) . The diagonal formula has then the form developed by Aumann and Shapley (1974) : (Sv)(ds) = \int_0^1 f'_(\mu(ds)) \, dt Above can be vector valued (as long as the function is defined and differentiable on the range of , the above formula makes sense). In the argument above if the measure contains atoms \mu(tI)=t\mu(I) is no longer true—this is why the diagonal formula mostly applies to non-atomic games. Two approaches were deployed to extend this diagonal formula when the function is no longer differentiable. Mertens goes back to the original formula and takes the derivative after the integral thereby benefiting from the smoothing effect. Neyman took a different approach. Going back to an elementary application of Mertens's approach from Mertens (1980): : (Sv)(ds) = \lim_ \frac\int_0^ (f(t+\varepsilon \mu(ds))-f(t)) \, dt This works for example for majority games—while the original diagonal formula cannot be used directly. How Mertens further extends this by identifying symmetries that the Shapley value should be invariant upon, and averaging over such symmetries to create further smoothing effect commuting averages with the derivative operation as above. A survey for non atomic value is found in Neyman (2002)


Generalization to coalitions

The Shapley value only assigns values to the individual agents. It has been generalized to apply to a group of agents ''C'' as, : \varphi_C(v) = \sum_ \frac \sum_ (-1)^ v( S \cup T ) \; . In terms of the synergy function w above, this reads : \varphi_C(v) = \sum_ \frac where the sum goes over all subsets T of N that contain C. This formula suggests the interpretation that the Shapley value of a coalition is to be thought of as the standard Shapley value of a single player, if the coalition C is treated like a single player.


Value of a player to another player

The Shapley value \varphi_i(v) was decomposed in into a matrix of values : \varphi_(v) = \sum_ \frac (v(S) - v(S \setminus \) - v(S \setminus \) + v(S \setminus \)) \sum_^n \frac Each value \varphi_(v) represents the value of player i to player j. This matrix satisfies : \varphi_i(v) = \sum_ \varphi_(v) i.e. the value of player i to the whole game is the sum of their value to all individual players. In terms of the synergy w defined above, this reads : \varphi_(v) = \sum_ \frac where the sum goes over all subsets S of N that contain i and j. This can be interpreted as sum over all subsets that contain players i and j, where for each subset S you * take the synergy w(S) of that subset * divide it by the number of players in the subset , S, . Interpret that as the surplus value player i gains from this coalition * further divide this by , S, to get the part of player i's value that's attributed to player j In other words, the synergy value of each coalition is evenly divided among all , S, ^2 pairs (i, j) of players in that coalition, where i generates surplus for j.


In machine learning

The Shapley value provides a principled way to explain the predictions of nonlinear models common in the field of machine learning. By interpreting a model trained on a set of features as a value function on a coalition of players, Shapley values provide a natural way to compute which features contribute to a prediction. This unifies several other methods including Locally Interpretable Model-Agnostic Explanations (LIME), DeepLIFT, and Layer-Wise Relevance Propagation.


See also

* Airport problem * Banzhaf power index *
Shapley–Shubik power index The Shapley–Shubik power index was formulated by Lloyd Shapley and Martin Shubik in 1954 to measure the powers of players in a voting game. The index often reveals surprising power distribution that is not obvious on the surface. The constituent ...


References


Further reading

*


External links

*
Shapley Value Calculator

Calculating a Taxi Fare using the Shapley Value
{{game theory Game theory Cooperative games Fair division Lloyd Shapley