Neural Payoff Machines: Predicting Fair and Stable Payoff Allocations Among Team Members
Anonymous Author(s)
AffiliationAddress email
Abstract
In many multi-agent settings, participants can form teams to achieve collectiveoutcomes that may far surpass their individual capabilities.
Measuring the relative contributions of agents and allocating them shares of the reward that promotelong-lasting cooperation are difficult tasks.
Cooperative game theory offers solution concepts identifying distribution schemes, such as the Shapley value, thatfairly reflect the contribution of individuals to the performance of the team or the
Core, which reduces the incentive of agents to abandon their team.
Applications ofsuch methods include identifying influential features and sharing the costs of jointventures or team formation.
Unfortunately, using these solutions requires tacklinga computational barrier as they are hard to compute, even in restricted settings.
In this work, we show how cooperative game-theoretic solutions can be distilledinto a learned model by training neural networks to propose fair and stable payoff allocations.
We show that our approach creates models that can generalize togames far from the training distribution and can predict solutions for more playersthan observed during training.
An important application of our framework is Explainable AI: our approach can be used to speed-up Shapley value computationson many instances.
Introduction
The ability of individuals to form teams and collaborate is crucial to their performance in many environments.
The success of humans as a species hinges on our capability to cooperate at scale [27].
Similarly, cooperation between learning agents is necessary to achieve high performance in manyenvironments [32, 7, 51, 28] and is a fundamental problem in artificial intelligence [47, 13].
Individual agents are often not incentivized by the joint reward achieved by a team but rather by theirshare of the spoils.
Hence, teams are only likely to be formed when the overall gains obtained bythe team are appropriately distributed between its members.
However, understanding how collectiveoutcomes arise from subsets of locally interacting parts, or measuring the impact of individuals onthe team’s performance, remain open problems.
Direct applications exist in multiple domains.
One example is identifying the most influential features that drive a model to make a certain prediction [15, 33, 6, 49]; one of the cornerstones ofexplainable AI [2].
Another example is sharing the costs of data acquisition or a joint venture ina fair way between participants [8, 1], or sharing gains between cooperating agents [24, 46].
Inmany legislative bodies individual participants have different weights, and passing a decision requires support from a set of participants holding the majority of the weight; different states in the
US electoral college have different numbers of electors, and different countries in the EU Councilof Ministers vary in their voting weight.
Here, would like to quantify the true political power heldby each participant, or allocate a common budget between them [36, 10].
Cooperative game theory can provide strong theoretical foundations underpinning such applications. The field provides solution concepts that measure the relative impact of individuals on team performance, or the individual rewards agents are entitled to.
Power indices such as the Shapley value [45]or Banzhaf index [9] attempt to divide the joint reward in a way that is fair , and have recently beenused to compute feature importance [33].
In contrast, other solutions such as the Core [26] attemptto offer a stable allocation of payoffs, where individual agents are incentivised to continue workingwith their team, rather than attempting to break away from their team in favor of working with otheragents.
Despite their theoretical appeal, these solution concepts are difficult to apply in practicedue to computational constraints.
Computing them is typically a hard problem, even in restrictedenvironments [21, 12, 17].
Our contribution: We construct models that predict fair or stable payoff allocations among teammembers, combining solution concepts from cooperative game theory with the predictive power ofneural networks.
These neural “payoff machines” take in a representation of the performance orreward achievable by different subsets of agents, and output a suggested payoff vector allocatingthe total reward between the agents.
By training the neural networks based on different cooperativesolution concepts, the model can be tuned to aim for a fair distribution of the payoffs (the Shapleyvalue or Banzhaf index) or to minimize the incentives of agents to abandon the team (the LeastCore [26, 37, 17]).
Figure 1 depicts the two well-studied classes of games on which we evaluateour approach: weighted voting games [36, 10, 12] and feature importance games in explainable
AI [15, 33].
Weighted voting games (WVGs) are arguably the most well-studied class of cooperative games.
Each agent is endowed with a weight and a team achieves its goal if the sum of the weights ofthe team members exceeds a certain threshold (quota).
We train the neural networks by generatinglarge sets of such games and computing their respective game theoretic solutions.
Our empiricalevaluation shows that the predictions for the various solutions (the Shapley value, Banzhaf index and Least-Core) accurately reflect the true game theoretic solutions on previously unobserved games.
Furthermore, the resulting model can generalize even to games that are very far from the trainingdistribution or with more players than the games in the training set.
Feature importance games are a model for quantifying the relative influence of features on theoutcome of a machine learning model [15, 33].
Solving these games for the Shapley value (or othergame theoretic measure) provides a way to reverse-engineer the key factors that drove a model toreach a specific decision.
This approach is model-agnostic, thus can be applied to make any “blackbox” model more interpretable [2].
One drawback of this approach is the computational complexityof calculating the Shapley value, making such analysis slow even when using approximation algorithms.
Our approach provides a way to significantly speedup Explainable AI analyses, particularlyfor datasets with a large number of instances.
Preliminaries
We provide a brief overview of cooperative game theory (examined in details in various books [42,12]) and discuss how solution concepts in cooperative game theory have been applied in Explainable
AI [15, 33, 34, 14, 53].
2.1 Cooperative Game Theory
A (transferable utility) cooperative game consists of a set N = { 1 , 2 , . . . , n } of agents, or players,and a characteristic function v : 2 n → R which maps each team of players, or coalition C ⊆ N ,to a real number.
This number indicates the joint reward the players obtained as a team.
Games vwhere v : 2 n → { 0 , 1 } (binary range) are simple games.
Weighted voting games (WVGs) are a restricted class of simple cooperative games [12], whereeach agent i has a weight w i and a team of agents C ⊆ N wins if the sum of the weights of itsparticipants (cid:80) ni
=1 w i exceeds a quota q .
Formally, a WVG is defined as the triple ( w , q, v ) withweights w = ( w 1 , w 2 , . . .
, w n ) ∈ R n ≥ 0 and quota (threshold) q ∈ R ≥ 0 where for any C ⊆ N wehave v ( C )
= 1 if (cid:80)
ni
=1 w i ≥ q and otherwise v ( C ) = 0 .
If v ( C ) =
we say C is a losing coalition,and if v ( C ) =
we say it is a winning coalitions.
WVGs have been thoroughly investigated as amodel of voting bodies, such the US Electoral College or the EU Council of Ministers [36, 10].
The characteristic function defines the joint value of a coalition, but it does not specify how thevalue should be distributed among the agents.
Solution concepts attempt to determine an allocationp =
( p 1 , . . .
, p n ) of the utility v ( N ) achieved by the grand coalition of all the agents; an allocationp is called an imputation if for any player
i we have p i ≥
and (cid:80) ni =1 p i = v ( N ) .
This allocationis meant to achieve some desiderata, such as fairly reflecting the contributions of individual agents,or achieving stability in the sense that no subset of agents is incentivized to abandon the team andform a new team.
We describe three prominent solution concepts that we use in our analysis.
The Core.
Rational players may abandon the grand coalition of all the agents if they can increasetheir individual utility by doing so.
The Core is defined as the set of all payoff vectors where nosubset of agents can generate more utility, as measured by the characteristic function, than the totalpayoff they are currently awarded by the payoff vector.
As such, the Core is viewed as the set ofstable payoff allocations.
Formally, the core [26] is defined as the set of all imputations p such that 100 (cid:80) ni
=1 p i = v ( N ) and that (cid:80) i ∈
C p
i ≥ v ( C ) for any coalition C ⊆ N .
The ε -Core and Least-Core
Some games have empty cores, meaning that no payoffallocations achieves full stability (i.e. for any imputation p there exists at least one coalition C suchthat v ( C ) > (cid:80) i ∈
C p i ).
In such cases, researchers have proposed minimizing the instability.
Arelaxation of the core is the ε -core , consisting of imputations p where for any value coalition C wehave p ( C ) ≥ v ( C ) − ε .
Given an imputation p the difference v ( C ) − (cid:80) i ∈
C p i is called the excessof the coalition, and represents the total improvement in utility the members of C can achieve byabandoning the grand coalition and working on their own.
For an imputation in the ε -core, no agentsubset C can achieve an addition of ε in utility over the current total payoff offered to the team (i.e.no coalition has an excess of more than ε ).
The minimal ε for which the ε -core is non-empty iscalled the Least-Core Value (LCV).
The Least-Core minimizes the incentive of any agent subset toabandon the grand coalition, and the LCV thus represents the degree of instability (excess) under theimputation that best minimizes this instability.
We find the set of payoffs associated with the LVCthrough linear programming (full details in Appendix C).
We now discuss two power indices , payoff distributions reflecting the true influence a player has onthe performance of the team, that fairly allocate the total gains of the teams among the agents in it.
The Shapley Value
[45] measures the average marginal contribution of each player across allpermutations of the players.
The Shapley value is the unique solution concept that fulfills severalnatural fairness axioms [19], and has thus found many applications from estimating feature importance [15, 33] to pruning neural networks [52, 23, 25].
Formally, we denote a permutation of theplayers by π , where π is a bijective mapping of N to itself, and the set of all such permutationsby Π .
By C π ( i ) we denote all players appearing before i in the permutation π .
The Shapley value ϕ i ( v ) of player i is defined as:
[Equation]
Intuitively, one can consider starting with an empty coalition and adding the players’ weights in theorder of the permutation; the first player whose addition meets or exceeds the quota is considered thepivotal player in the permutation.
The Shapley value then measures the proportion of permutationswhere a player is the pivotal player.
The Banzhaf index [9] is another method for distributing payoffs according to a players’ ability tochange the outcome of the game, but it reflects slightly different fairness axioms [48].
The Banzhafindex β i of a player i is defined as the marginal contribution of a player across all subsets notcontaining that player:
[Equation]
In practice, we first compute the set of winning coalitions C win ⊆ C and count, for each player, thenumber of times it is critical or pivotal , that is, v ( { C }\ i )
= 0 .
2.2 Speeding Up Explainable AI In Large Datasets
An important goal of our work is to speedup Shapley/Core computations of many data instances. In machine learning, we train a model f θ to learn a mapping from some set of input features to anoutcome.
This could we can train a model to predict the price of a house based on a number offeatures, such as the number of rooms, the year it was built, and so on (Figure 1).
In such settings, itis desirable, but challenging, to explain the model outputs in terms of the input features. Explainable
AI addresses this issue, and recent years showed several applications of game theoretic metrics formeasuring feature importance in the machine learning community [49, 2].
The fastest method to approximate Shapley values (also used in the SHAP package) is a MonteCarlo approach [33]. A number of other methods exist whose runtime and accuracy depend on thenumber of samples used, usually on the order of several thousands [30, 15, 35, 5].
In a model setting,the characteristic function takes the value of the trained model output for a given instance: f θ ∗ ( x ) .
The Shapley value of a feature i in a data instance x , ϕ x,i is the effect that feature has on the modeloutcome.
Sampling based-methods compute the contributions with respect to a base value, whichis the average model output across all instances: f θ ∗ ( x ) =
E [ f θ ∗ ( x )] + (cid:80) i = 1 N ϕ x,i .
Samplingbased methods are not ideal for large datasets because they require a large number of re-evaluationsamples per computation. We show how our approach can be employed to speedup Shapley or Corecomputations of many instances by training models to learn representations of feature attributionschemes.
Methods
Our approach uses machine learning to create game-theoretic estimators. We generate syntheticdatasets of games to train our models, spending compute up-front to allow for instant solutionsafterwards.
Our first domain concerns weighted voting games (WVGs) as they provide a genericframework for studying cooperation in multi-agent settings.
Afterwards, we apply our approach to the Shapley-based feature importance setting.
The main ideais that we can speed-up the computations of the relative impact of features on the predictions of amachine learning model.
We do this by training models to approximate Shapley values of features,and examine their performance on previously unobserved instances.
3.1 Weighted Voting Games
We consider two types of models: fixed-size models that always predict a fixed number of outputsfor games with a fixed number of players, and variable-size ones that predict a variable number ofoutcomes and can handle variable numbers of players.
We now describe our data generation process,models, training procedure, and evaluation metrics used in weighted voting games.
3.1.1 Data and Models: Fixed-Size
For each n player game, we generate G independent and identically distributed games.
The trainingdataset is given by D n fixed = (cid:8) X ∈ R G × n , P ∈ R G × K (cid:9) where K denotes the number of outputs ofinterest.
The features are obtained in two steps.
First, we sample a weight vector w ∼ Beta ( α =1 , β = 1) on the interval from 1 to 2 n , and a quota q ∼ N ( µ = 14 (2 n + 1) n, σ 2 = 2 n ) .
To creategames where players are dependent on each other to achieve the task at hand, the quota distributionis parameterized such that the average drawn quota is half of the sum of the players’ weights.
Wethen normalize the weights by the quota to get the feature vector x = 1 q · w .
In other words, wehave n features which are the weights normalized as the respective proportion of the quota.
Thus, avalue x i > 1 indicates that player i is a winning coalition by itself, and needs other players to meetthe quota otherwise (Figure E.2).
We train models to predict the three solutions: the Least-Core, the Shapley values, and the Banzhafindices.
For the Shapey values and the Banzhaf indices, the model predicts the payoff allocation( p 1 , . .
p n ) so K ≡ n .
For the Least-Core solution, we train the model to not only predict thepayoff allocation p 1 , . . .
, p n , but also to predict the Least Core Value ε min (so in this case the modelhas K = n + 1 outputs).
For each n player game, we produce a model f θ : R n → R K , where θ arethe model parameters.
We use deep feedforward networks for f θ .
Appendix D.1 contains the fulldetails about the experimental setup.
3.1.2 Data and Models: Variable-size
For the variable-size case, we consider a maximal number of possible players M and pad theinputs with zeros for games with less than M players.
Hence, we generate a single dataset
D var = (cid:8) X ∈ R G × M , P ∈ R G × K (cid:9) .
Similarly to the fixed-size dataset, the feature matrix X contains the normalized weights and P the corresponding solutions with either K
= M +1 or K = M ,with the ground truth output vector again padded with zeros when there are fewer than M players.
Hence, we allow for the prediction of up to M players, and we shuffle the data so that players are located at random positions.
The Least Core Value (LCV) is not shuffled but stored at the last elementof each row (Figure E.1).
We produce a single model g η : R n → R K that can be used for different number of players n ,where η are the model parameters.
The model learns to allocate the joint payoff among at most Mplayers.
During prediction time we pad the input with zeros when there are fewer than M players,and we redistribute the payoffs allocated to non-player entries among the players according to theiroriginal share of the joint payoff.
3.1.3 Training and Evaluation
During training we minimize the Mean Square Error (MSE) between the true and predicted solutions.
For the variable-size models we also include the M − n padded locations so that the modellearns not to allocate value to non-player entries.
Evaluation metrics.
Given a predicted payoff vector ˆ p
= (ˆ p 1 , ˆ p 2 , . . .
, ˆ p n ) , we consider multiplemetrics for assessing the models’ performance.
First, we quantify the models’ predictive performance via the Mean Absolute Error (MAE), defined for each game as MAE = 1 n (cid:80) n i =1 | p i − ˆ p i | ,where n is the number of players.
For the Least-Core there is another natural game theoretic metric.
The goal of the Least-Core is to minimize the incentives of any subset to abandon the current teamand form its own sub-team.
Given a suggested payoff vector ˆ p , the maximal excess v ( C ) − (cid:80) i ∈
C ˆ p iover all possible coalitions C measures the incentive to abandon the team, and serves as a good measure for the quality of the model.
Test data.
We sample weights w ∼ Beta ( α, β ) with varying parameters for α and β to assess ourmodels’ ability to generalize to previously unobserved instances their ability generalize to games faroutside of the training distribution (full details in Table 2, Figure D.1).
3.2 Feature Importance Games
We perform an experiment to show that neural networks can provide a faster alternative for measuring feature importance at scale.
We select a dataset (details in Appendix D), train a model, and usethose to construct a dataset from features to Shapley values using the SHAP KernelExplainer [33]
Following, we partition our dataset into a train and test, and incrementally change the proportionsbetween the two.
For each increment, we train a model for 100 epochs and test it on the remainderof the unseen instances.
Results
We present experimental results that allow us to assess how well neural models are able to learna representation of the various solution concepts.
We first describe the predictive performance ofneural networks in the WVG setting, and consider properties of these solutions that make themhard to learn.
We then consider the explainable AI domain, and study the performance and samplecomplexity of Shapley feature importance prediction.
4.1 Weighted Voting Games: Evaluation
For our WVG analysis we train a selection of fixed-size neural networks f N θ ∗ for each number ofplayers n ∈ { 4 , 5 , . .
. , 19 , 20 } 2 on G = 5 , 000 games each.
We also train a single variable-sizemodel g η ∗ that is trained on one dataset containing G = 17 , 500 games in total, consisting of 2 , 500games for each number of players n ∈ { 4 , 5 , . . .
, 9 , 10 } games.
The data is padded with zeros toallow for payoff allocation up to M = 20 players (see details in Section 3.1).
4.1.1 Predictive performance
Table 1 shows that the ability to handle games of variable numbers of players comes at the costof having a lower accuracy.
However, even for variable-size models, and even under a significantdistribution shift, the errors in predicting all solution concepts are low.
We further note that theerror in predicting Least-Core based payoffs are generally larger than for the Shapley and Banzhafpower indices.
One possible reason is that for these solutions, there are many cases where a smallperturbation in the weights or quota results in a large perturbation of the Least-Core solution [20, 55].
[Table]
We now highlight several conclusions from our analysis of the results.
Fixed-size models display stable performance across solution concepts.
Our first observationis that the fixed-size neural networks are adept at estimating solutions across the three consideredconcepts.
The average error per player ranges from 0 .
005 to 0 .
087 (Least Core), 0 .
to 0 .
069(Shapley values) and 0 .
012 to 0 .
067 (Banzhaf indices).
Table 5 provides a complete summary ofour models’ in-sample performance.
Fixed-size models are robust to shifts in the weight distribution.
As shown in Figure 2, thepredictive performance (Mean MAE) of the fixed-size models is consistent across test datasets.
Toaccount for the natural decrease in the MAE as N increases, we also display the average payoff perplayer ( 1 /n ).
As expected, the error scales approximately with the average payoff per player.
Variable-size models are robust to shifts in the weight distribution.
Figure 3 shows that thevariable-size models are also able to generalize outside the training distribution.
Across test sets, weobserve a stable performance that decays with the number of players, as is expected.
For the Least
Core, we see that there is an abrupt decrease in performance for the excess beyond 8 players.
Variable-size models generalize to a larger number of players.
Our main objective is to investigate how to leverage machine learning to perform scalable value estimation in large multi-agentsettings.
To test this, we train the variable-size models on games up N = 10 players, and evaluateon N + 1 , N + 2 , . . . , N + 10 players (full details in section 3.1.2). Figure 3 demonstrates that [Figure]
[Figure]
Fixed-size models outperform variable-size models.
Table 1 contains the Mean MAEs acrosssolution concepts and test sets.
Corresponding error distributions are showed in Figure 4.
Fromthese, we conclude that in almost all settings the fixed-size networks outperform the variable-sizenetworks.
Variable-sized networks tend to have larger errors for all predicted variables and displaymore variance in their predictions.
[Figure]
4.1.2 Discontinuities in the Solution Space
The function mapping from game parameters to solutions contains discontinuities. Discontinuousjumps emerge from the players’ interdependence and the effect of the quota and are difficult fora model to learn.
We analyze two examples that demonstrate how our models respond to suchtransitions.
Solution concepts are step-wise constant functions which are difficult to capture.
Considertaking a WVG and changing the weight of a player.
This only changes the game theoretic solutionswhen it restructures the subset of winning coalitions.
Thus, the function outputs the same value untilthe weight reaches a certain threshold where the structures of winning coalitions change, at whichpoint the solution can change drastically.
Learning these kind of functions is difficult, as the erroraround the discontinuity point is often large.
Our analysis examines an n player game with a fixed weight vector w = ( w 1 , w 2 , . . .
, w n ) andconsiders an array of quotas q = ( q 1 , q 2 , . . .
, q K ) =
( min ( w ) , min ( w ) + ϵ, . . .
, (cid:80) ni
=1 w i ) , whereϵ = 0 .
We solve the game for each combination of the fixed weights and the changing quota in qto obtain a matrix P .
Figure 5 shows the fixed-size model predictions for two selected WVGs.
Themodels capture the overall effect of the changes to the quota, but do poorly close to the discontinuitypoint (where the ground truth solution incurs a large change).
4.2 Speeding Up Feature Importance Calculations By Predicting Shapley Values
We examine the sample efficiency and performance of neural networks trained to predict Shapleyvalues on sets of features.
We consider two well-known datasets: the classical UCI Bank Marketingdataset [39] (17 features, 11,162 observations) and the Melbourne Housing dataset [44] (21 feature,34,857 observations). Full details in Appendix D.2).
Overall, we find that neural networks achievehigh performance on the test set with very few training samples.
Figure F.1 displays the models’performance (in RMSE) as a function of samples available for training.
We observe that the errordecays approximately exponentially with the proportion of data used for training on both the Banking and Melbourne datasets.
A model trained on just 1 percent of the Melbourne dataset has an RMSE of 19.72 on the resultant test set.
Increasing the number of training samples to 3 percentresults in a RMSE of less than 0.07, a 99.6 percent decrease in error.
We observe a similar trend forthe Banking dataset: the RMSE decreases with 93.8 percent (from 4.10 to 0.25) when the availabletraining data increases from 0.5 to 4 percent.
These results highlight the strength of this approach:the computational cost of training the Shapley prediction network is very small as compared to thespeedup obtained on the vast majority of the data (and any subsequent instances analyzed later).
Discussion and Conclusion
We considered “neural payoff machines”, models that take in a representation of a cooperative gameand solve it to produce a distribution of the joint gains of a team amongst its members.
Our analysis focused on two concise representations of a characteristic function:
Weighted voting games,and feature importance games for explainable AI.
Our analysis shows that neural models capturecooperative game solutions well, and can generalize well outside the training distribution, even extrapolating to more players than in the training set.
We saw that the Least core is a harder solution concept to learn than the Shapley value and Banzhafindex.
Potentially, the fact that the Least core is complex and can only be computed by solvingmultiple Linear Programs makes a hard concept to grasp from examples.
The methods we discussed can drive better analysis of decision making bodies and for approximatingfeature importance, but such methods can also be applied to other classes of cooperative games, solong as one can generate data consisting of game samples and their solutions.
For instance, the sameapproach can be used for other cooperative representations, such as graph-based games [17, 3, 4] orset-based representations [41].
The direct applications that we have considered in this paper are alsointrinsically valuable on their own, as we allow speeding up explainable AI analysis and politicalinfluence estimation.
Some questions remain open for future work.
Can similar techniques be usedfor non-cooperative games or for other types of cooperative games?
Can this approach be appliedto other solutions such as the Kernel or Nucleolous [12]?
Finally, are there better neural networkdesigns, such as graph neural networks or transformers, that can exploit invariances or equivariancesin the game’s representation or be better equipped to deal with sharp discontinuities in the solutions?
Checklist
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s
contributions and scope?
[Yes] The abstract and introduction provide representative
summaries of our work.
(b) Did you describe the limitations of your work?
[Yes] See section 4.1.2 and the Discussion.
(c) Did you discuss any potential negative societal impacts of your work?
[No](d) Have you read the ethics review guidelines and ensured that your paper conforms to
them?
[Yes]2.
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[N/A](b)
Did you include complete proofs of all theoretical results?
[N/A]
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[Yes]
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how theywere chosen)?
[Yes] See methods and Appendix D.
(c) Did you report error bars (e.g., with respect to the random seed after running experi-
ments multiple times)?
[No]
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] See section G.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[N/A]
(b) Did you mention the license of the assets?
[Yes] See Appendix H.
(c) Did you include any new assets either in the supplemental material or as a URL?
[Yes]
(d) Did you discuss whether and how consent was obtained from people whose data
you’re using/curating?
[N/A]
(e) Did you discuss whether the data you are using/curating contains personally identifi-
able information or offensive content?
[N/A]
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if
applicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable?
[N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A]
Appendix
A Notation
The following notation is used throughout this paper:
• n the number of players in the game
• G the number of games
• M the maximum sequence length in variable feedforward networks• q the quota, threshold that determines when a coalition can complete the goal or task• w i the weight of a player i• x i =
w i /q , the normalized weight of a player i• N the grand coalition• C a coalition (subset of players)• C min the minimal set of winning coalitions: the coalitions where each player is pivotal• X feature matrix• P solution matrix • p i the allocated reward or payoff to a player i• ε the least core value (LCV), i.e. joint payoff to sacrifice such that there exists a feasible payoffvector in the least core
B Motivating The Use Of The Shapley Value To Analyze Influence InWeighted Voting Games
We provide an intuitive example motivating the use of Shapley values for measuring the true influence of participants, in weighted voting games or political power in decision making bodies.
Consider a parliament with 100 seats, and imagine that following the elections we have two largeparties of 49 seats each, and one tiny party who has only managed to get 2 seats.
However, note thathaving a majority means controlling a majority of the seats, i.e. more than 50 seats.
This means thatneither of the two big parties has a majority on its own (and of course the small party hasn’t got amajority on its own).
Hence, to achieve a required majority and form a government or pass a bill, the parties have to workin teams.
Clearly, a coalition consisting of the two big parties has a majority, as together they have49+49=98 seats out of the total of 100.
However, a coalition consisting of any of the two big partiesand the one small party also has 49+2=51 seats, which is also a majority.
Hence, in the setting discussed above, any two parties form a winning coalition that has a majorityand is able to form a government or pass a bill.
This can be modelled as a weighted voting game,where the weights are ( w 1 = 49 , w 2 = 49 , w 3 = 2) and the quota is q = 50 .
Intuitively, as any two parties or more are a winning team and as any single party is a losing team,we might say that the weights are irrelevant.
Although the big parties each have almost 25 times theseats as the small party, they all are symmetric in their opportunities to form a winning coalition,and one could claim they actually have equal political power.
Clearly, the small party is in a verystrong negotiation position, and could demand for instance to control a significant proportion of thejoint budget.
In the above weighted voting game, the Shapley value of all agents would be equal (each getting avalue of 13 ), as it considers the marginal contributions of the parties over all permutations of players.
Due to the symmetry between the parties, they have identical marginal contributions.
The above specific example illustrates some of the principles behind the fairness axioms that
the
Shapley value exhibits, and illustrates its importance for measuring influence in decision makingbodies.
C Algorithm For Generating Least Core Solutions
The least core solutions can be generated by considering all possible coalitions.
A simple improvement, however, is to use the minimal set of winning coalitions [16] instead.
In this section, wedescribe the idea behind this approach and the algorithm used in this paper.
Let N ≡ { 1 , 2 , . .
. , n } denote the set of all N ∈ Z ≥ 0 players, let q ∈ R ≥ 0 denote the quota andlet w i ∈ R ≥ 0 denote the weights for player i , for all
i ∈ N .
The characteristic function is given byv ( C ) ∈ [0 , 1] , for coalitions C ⊆ N .
The naive approach to find the least core solutions is by considering all winning coalitions C windefined as
[Figure]
[Equation]
[Figure] [Equation] [Figure] [Equation]
[Figure]
[Figure] [Figure] and to find a least core solution by solving LP-problem C.1a.
In the LP-problem (C.1a), all winning
[Figure]
539 coalitions are considered, Inside those winning coalitions there exists a subset, that could branch outand form a smaller coalition.
This yields a higher payoff for the players in the sub-coalition and ishence a Pareto improvement for the ”decision-makers”.
Therefore, we can instead only consider thesubset of minimal winning coalitions, given by
[Equation]
, (cid:88) i ∈
S w i ≥ q, and, for all j ∈ C, (cid:88) i ∈
C \{ j } w i <
q   (C.2) and solve the more efficient LP-problem C.1b.
D Experimental details
In this section, we elaborate on the experimental procedures, model architectures and hyperparameters used in our experiments.
Code and notebook.
Following the guidelines, we provide python code to reproduce our results,a pedagogical notebook (called CooperativeGameTheoryPrimer.ipynb) that introduces the most important game theory formalisms and the necessary data in the accompanied zip file.
D.1 Weighted Voting Games
Optimization procedure fixed-size feedforward networks.
For each N -player dataset D N fixed weperform R =
independent runs with a maximum of E = 6000 epochs and an early-stoppingcriteria which breaks a run if, after a baseline of 500 epochs, the validation loss does not improvefor 75 consecutive epochs.
For each run, 70 percent is allocated for training and 30 percent forvalidation.
After training, we select the model with the best validation loss.
The selected modelsare stored and used for evaluation.
In all experiments we use the Adam [29] optimizer, ReLU [40]activation functions for the hidden layers, Softmax functions for output layer of the payoffs and a
Sigmoid for the output layer of epsilon.
Optimization procedure var-size feedforward network.
We perform R = 100 independent runsfor one variable dataset D var with a maximum of E = 15000 number of epochs and an early-stoppingcriteria which breaks a run if, after a baseline of 500 epochs, the validation loss does not improvefor 75 consecutive epochs.
For each run, 70 percent is allocated for training and 30 percent forvalidation.
After training, we select the model with the best validation loss, which is stored and used for evaluation.
In all experiments we use the Adam [29] optimizer, ReLU [40] activation functionsfor the hidden layers, Softmax functions for output layer of the payoffs and a Sigmoid for the outputlayer of epsilon.
Hyperparameters.
All results are generated with multi-layer perceptrons (feedforward networks)of varying hidden-layer size and width.
Further hyperparameters are the dropout rate, weight decayin the Adam optimizer, and the learning rate.
Our standard model architectures are depicted in
Figure E.1 Right.
Approximated ground-truth Shapley values.
To obtain the ground-truth solutions for Shapleyvalues above nine players, we perform Monte-Carlo sampling to obtain a subset of all possible permutations.
For each of the R = 10 resamples we randomly sample P = 1000 permutations andaverage across the resamples to obtain approximations of the ground-truth.
To validate that the approximated labels are representative we compute the Mean MAE between the true and approximated
Shapley values for n = 5 up to n = 10 players with 1000 games per n -player game.
Across alln -player games the mean MAE between the true and approximated Shapley values was 0 .
0011 andnever exceeded 0 . 0014 .
Figure D.2 shows the distributions per player together with the true label(red dot) for 8 and 9 player games.
Parameterizations for test datasets.
Figure D.1 shows the five standardized test distributions thatare generated with the parameters in Table 2. [Table] In
[Table]
Out-of-sample
[Table]
Slightly out-of-distribution
[Table]
Moderately out-of-distribution
[Table]
[Table] [Table] Considerably
[Figure]
3N D.2 Explainable AI
We provide a step-wise explanation of how we performed the experiment in our explainable AIsection, that is, train a neural network to predict the Shapley values for a dataset of features:
Select a dataset.
The first step is to select a dataset of choice.
In our example, we end upwith a feature matrix X N × F where each row is an observation and each column a feature,and a target vector y ∈ R N or y ∈ [0 , 1] depending on the task.
Feature to target.
Following, we estimate a model f θ : R F
→ R that predicts one output for each set of features.
Compute Shapley values through sampling.
We use the trained model from step 2 toobtain Shapley values with the SHAP package KernelExplainer[33], which is based onLIME [33]. This yiels a matrix of Shapley values, one for each feature in every datainstance: Φ ∈ R N × F .
Feature to Shapley.
Finally, we create an array of T = 999 linearly spaced train-test splits t = (0 . Each element t i in t indicates the ratio of samplesthat are used for training the neural network, with the remaining (1 − t i ) N samples used forevaluation. For each train-test partition in t then, we train a feed forward neural network
on t i N samples by minimizing the MSE between the predicted and actual Shapley values
(full details in Table 3) for 100 epochs, and evaluate on the 1 − t i N remainder
(unseen)samples.
Datasets and preprocessing.
Table 4 summarizes the considered datasets.
The UCI Bankingdataset contains 15 features and a binary target (whether the client has subscribed a term deposit),whereas the Melbourne housing dataset contains 21 features and a regression target (the price ofa house).
We exclude the “duration” feature in the Banking dataset to prevent data leakage, as isrecommended in the documentation.
Moreover, we exclude the “Rooms” feature as there is a lotof overlap in this and the “Bedroom2” feature.
The numerical values in both datasets are z-scored,and categorical features are encoded as numbers.
Missing values are encoded as zeros, so that thecomplete dataset can be used for our experiment.
Feature to target.
We partition the dataset into train and test and train a Random Forest Classification model on the UCI Banking set, obtaining a final test accuracy of 72 %.
Moreover, we train adecision tree regression model to predict the price given the set of house features and obtain a final
MSE of 1.21 on the test dataset.
Compute Shapley values.
We use the trained models to obtain Shapley values for each instancein the feature dataset X using the SHAP kernel explainer object [33].
Feature to Shapley: procedure.
Finally, we can train a neural network using the datasets X , Φ .
To investigate the sample complexity required to learn a representative mapping from features to
Shapley values, we conduct the following experiment.
First, we create an array of T = 999 linearlyspaced training splits t
= (0 . 001 , 0 .
Each element in t i in t indicates theratio of samples that are used for training the neural network, leaving the remaining (1 − t i ) Nsamples for evaluation.
For each train/test partition in t then, train a feed forward neural networkon t i N samples through minimizing the MSE between the predicted and actual Shapley values(architecture and hyperparameters specified in Table 3) for 100 epochs, and evaluate on the 1 − t i Nsamples.
Figure F.1 depicts the resulting RMSE for both datasets as a function of the trainingfraction.
[Table] [Table] [Figure]
F Additional Results
In-sample predictive performance.
For completeness [Table] we provide the MAEs for each solutionconcepts on the in sample dataset up to n = 15 players in Table 5.
[Table]
Capturing step-wise jumps: full description.
We provide a more detailed description to Figure5.
In the Figure on the left , each player is a winning coalition by itself when q = 1 .
Up to q = 3 ,player 3 is more critical than players 1 and 2 and receives a larger share of the joint payoffs.
Allplayers obtain equal payoffs when the only winning coalition is the grand coalition.
On the rightside: each player is a winning coalition by itself when q = 1 , which results in an equal payoff of0 .
2 for each player.
Increasing the quota continuously alters the set of winning coalitions, therebythe relative importance of each player.
At q = 3 players 1, 2 and 3 have become less critical andobtain a payoff of 0 .
18 each compared to 0 .
22 for player 4 and 5.
Finally, when q = (cid:80) Ni =
1 w i = 7 ,the only winning coalition that can be formed is the grand coalition: each player is required and thejoint payoff is divided equally.
G Hardware details
[Figure] We trained our neural networks on an internal compute cluster with 10 Quadro RTX 6000 GPUs andtwo Intel(R)
Xeon(R)
Gold 5218 CPUs, each of which has 16 physical cores (32 logical processors).
H Asset licensing
Two main assets were used in this work:
• The UCI Banking dataset
• The Melbourne Housing dataset
The Melbourne Housing dataset was released under the license CC BY-NC-SA 4.0.
The UCI Banking dataset is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license. I Evaluating the Speedup Achieved by Our Approach, Depending on the Size of the Dataset
Many domains involve datasets with a large number of features, sometimes with over thousandsor millions of data instances.
A prominent example is language modelling, where large bodies oftext are generated, translated or processed in different manners [43].
In such cases, computing the
Shapley value for each data instance using sampling-based methods takes an extremely long time.
Our approach is targeted at speeding up feature importance computations of many instances.
Weperform a simple experiment to demonstrate the effectiveness of a model-based approach for explaining model decisions.
We take the Melbourne Housing dataset and obtain 9000 instances by 13features after preprocessing steps (encoding the categorical features and standardization).
First, wegenerate a ground-truth dataset by setting the number of samples in the SHAP package (KernelExplainer) to 5000 samples.
The number of samples in the KernelExplainer determines the number oftimes a model is re-evaluated for every prediction.
A higher number of samples will result in moreaccurate (and lower variance in the) Shapley values, but require a longer compute time.
Computingthe Shapley values on our 9000 samples takes 4.13 hours.
Figure I.1 (left) shows that the inferencetime scales approximately linearly with the number of re-evaluation samples.
To contrast the difference in computation time, we compute Shapley values on 10 % of the data(computation time is 29 minutes) train the neural network in 30 seconds, and predict Shapley valueson the remaining 90% of the data (less than a second).
{+All together, this procedure takes roughly 
+}
% of the time of it took to compute Shapley values for the entire dataset.
This speeds-up the wholeprocedure by 8x while keeping a reasonable prediction quality on the remaining unseen data (Figure
I.1 right).
Next, we use SHAP again to compute Shapley values for 90% of the data, 8100 instances, this timewith the default number of model re-evaluations samples, yielding slightly accurate Shapley values(the default is 2 × number of features + 2048 ).
We quantify the trade-off in prediction quality as theby comparing the model predicted Shapley values to the Shapley values obtained with the defaultnumber of samples.
Concretely, we measure the Mean Mean Absolute Error (MMSE) of our model predictions and the
SHAP package to the ground-truth dataset.
We note that speedup does come at a slightly reducedempirical performance: the model MSE on the test set is, MSE = 1 .
15 × 10 − 3 , compared to the
MSE with SHAP: MSE = 7 . 4 × 10 − 5 .
However, we expect that hyperparameter tuning and betterpreprocessing will improve the quality of the model predictions.
All together, it is easy to see how this win in computation time translates to larger datasets.
Considera similar dataset with 100,000 or a million entries.
Computing Shapley values on the entire datasetwith SHAP will take weeks (40 or 400 hours), while the time for our procedure remains relativelythe same: building the train set and training the neural network only takes a fraction of the timerequired by the sampling-based approach: the analysis using our method would take a few hours.
[Figure]
J Heuristics and Simpler Models
We now consider a common heuristic for payoff allocation in weighted voting games, the weightproportional payoff allocation.
We use this as a benchmark to evaluate our models’ performanceagainst.
We find that our fixed models outperform this benchmark heuristic across solution conceptsand test sets.
WeightProportional baseline.
The WeightProportional (WP) heuristic divides the payoffs in away that is directly proportional to the players’ weights, that is, the payoff of a player
j is:
[Equation]
for any n − player game.
WP provides meaningful benchmark as it is the most naive method for allocating payoffs.
The resulting payoffs (and thus errors) do not take into account the quota, which mayhave a major impact on the correct solutions by means of the emergent set of winning coalitions.
Assuch, any improvement on this benchmark thus suggests a better understanding of the collaborativestructures in the game at hand.
We also compare the predictive performance of our models against the predictive performance ofmultinomial regression models.
These models have just one layer with n inputs and n outputs foreach n − player game and a softmax nonlinearity at the end.
Across all game sizes, our modelsoutperform the linear models by 45 % to 95 % percent.
Results are found in Table 6.
[Table]
K Hard cases
Across solution concepts (Shapley, Banzhaf and Least core), discontinuous jumps in the solutionspace yield large errors (see Section 4.1.2 and Figures 5, L.4).
In this section, we highlight failurecases for the Least core.
In contrast to the power indices, a solution in the least core is obtained bysolving a Linear Program under several hard constraints.
Thus, a solution to a weighted voting gameis only feasible when, for each winning coalition C ∈ C win , we have that
[Equation]
where p i is the payoff of player i in coalition C .
In words, each winning coalition must obtain jointreward that is at least as good as what they would have obtained on their own.
If this criteria isnot met, the solution is infeasible: some players will have an incentive to deviate from the grandcoalition.
Majority of the model predictions fail to meet hard constraints .
Figure K.1 depicts the percentage of feasible solutions over the game sizes.
For small player games ( n < 8 ), between 50 and5.5 % of the model predictions are feasible).
The larger the number of players, the fewer modelpredictions satisfy the hard constraints.
From eight player games and above, the number of feasiblepredictions ranges between 0.2 and 10 %.
A preliminary analysis shows no relationship betweeninfeasible solutions and larger errors in the payoffs nor the LCV.
The fact that the model is not able to predict many feasible solutions in these large games is unsurprising.
The set of winning coalitions increases approximately exponentially in n .
As such, themore players in a game, the more hard constraints need to be satisfied in order for a solution to befeasible per game.
All hard constraints need to be met in order for a solution to be feasible.
Weexpect that including a penalty term for infeasible predictions during training will help to improvethis metric and hope to address this in future work.
When the least core is a set, simplex based methods tend to find corner solutions, which leadsto ambiguity in the solutions.
Further analysis of individual weighted voting games reveals thatthe most problematic games are cases where the least core contains multiple correct solutions, butthe full joint payoff is allocated to a single player.
In other words, payoffs are divided such that oneplayer receives one, and all the others zero.
To illustrate what is happening here, consider a simplefour player game that produced the largest error (Figure K.2).
We focus our analysis on the gameon the left, but our insights apply to a wide range of n -player games in the dataset.
This particular
[Figure]
game has the following weights and quota (rounded to one decimal place for simplicity)
[Equation]
where we can see that no player is a winning coalition by itself (all w i ’s ¡ q).
In fact, the onlywinning coalition in this game is the grand coalition, that is,
[Equation]
The solution to this weighted voting game is:
[Equation]
where player one receives the full joint payoff, even while its’ weight is smaller than the weight ofplayer three ( 2 . 8 < 6 . 6 ).
The reason why we obtain this solution comes down to two facts.
First ofall, the least core is a set, and can therefore contain multiple correct solutions.
Secondly, simplexbased methods return corner solutions.
Thus, in cases where several players are required to form awinning coalition, the solver will allocate the joint payoff to an arbitrary player that belongs to thiscritical subset.
Figure K.3 depicts this visually for a simple two player game.
Here, we have the
WVG w = (1 , 1) with q = 2 , so the only winning coalition is the grand coalition.
Solving thisgame results in either of the corner solutions: the payoff vector p
= (1 , 0) or p = (0 , 1) with a LCV= 0 .
However, if we define α as the solution of a player one, any combination p =
( α, 1 − α ) is afeasible solution in the least core.
Obtaining the full set of solutions for this game can be done empirically.
In principle, we can takethe payoff vector and LCV above, generate the set of permutations of length two (player pairs) andcheck whether the solution is still feasible if we give a small value δ from one player (whose payoffis not zero) to any other player.
However, this approach does not scale to larger games.
It would bemore efficient to derive rules for acquiring the full least core set from a single solution.
We limited our analysis above to four-player games.
However, we observe the above behaviorirrespective of the number of players in the game.
Therefore, addressing this issue is critical forimproving the predictive performance of our models.
L Applying Our Models to Voting In The European Council
In this section we apply our trained models to predict voting power of member states in the EU
Council.
First, we take the weights from four countries in the EU voting council [31], see Table 7,and define the quota as the majority vote (50 % of the total weights + 1).
Our (weighted) voting
[Figure]
P a y o ff p l a y e r i
Sum of abs error: 2.
4 Player
P a y o ff p l a y e r i
Sum of abs error: 2.
4 Player
P a y o ff p l a y e r i
Sum of abs error: 1.
Payoff allocation method Actual
WeightProportional
Model Pred
[Figure]
Following, we divide the weights by the quota and feed the normalized weights (see Section 3.1).
Wecontrast the model predictions against the ground-truth solutions and find that the Mean Mean Absolute Error (MMAE) between our model predictions and actual solutions per member state is 0.003(Banzhaf), 0.002 (Shapley), 0.017 and 0.007 for the Least core payoffs and excess respectively.
Figure L.1 compared the payoff allocations for the Shapley, Banzhaf and Core solution concepts.
Weobserve that the contribution measured by the Power indices (Shapley and Banzhaf) is less than theweight, while the Core attributes a larger share of the joint payoff to this member state.
Next, we perform a sensitivity analysis.
In such an analysis, we are interested in the interdependenceof member states’ voting power.
Holding all other game parameters constant, we increment theweight of Hungary ( w Hungary = 7 ) with values of one, until it exceeds the quota of 30,5.
Figure
L.2 depicts how the member states’ voting power (in Shapley value) changes as Hungary gainsabsolute power (as we increase the weight).
The predicted payoff for Hungary is depicted by thered triangles, the model predictions for the other states in blue, and the actual solutions by thegreen dots.
We observe that there are two transition points in the solution space.
One transitionpoint occurs when w Hungary = 17 . 5 / 18 . 5 .
Hungary can now form a winning coalition both with the
Netherlands ( w Netherlands = 12 ) and with Poland ( w Poland = 13 ), which raises its power in the voting
[Table]
and accordingly its’ share of the joint payoff.
We notice that our model is able to predict accuratepayoffs overall, with a spike in absolute error per player at this transition point.
The second transition point occurs when w Hungary = 30 .
5 = q .
Hungary is now also a winningcoalition by itself, thereby obtaining a larger share of the joint payoff.
We observe that its’ Shapleyvalue increases to approximately 0.6, obtaining the more than half of the total reward.
Our model isable to capture this transition almost perfectly (MMAE < 0 . 01 ).
We perform a similar analysis, this time perturbing the quota.
Figure L.3 depicts the same gamewith the original weights fixed, increasing the value of the quota from small to the sum of theweights (notice that this is the same experiment we performed in Section 4.1.2).
The value of thequota determines the set of winning coalitions, thereby dictating the payoff of each player.
As such,perturbing in this game yields a large number of discontinuous jumps in the member states solutionscompared to our previous analysis perturbing the weight of Hungary.
Our model is able to capturethe overall changes in the solutions but has difficulty with capturing large jumps in payoffs for smallquota increments.
Our variable models models have been trained on games up to ten players and can be applied toinstantly predict the payoffs of member states in larger councils.
To illustrate this, we take allmember states in Table 7 and use our variable models to predict the payoffs for each, again settingthe quota as the majority vote.
We report the prediction quality of our models with respect tothe ground truth (in Mean Mean Absolute Error), which is 0.013 for Shapley, 0.004 for Banzhaf,and 0.05 for the least core.
Figure L.4 compares the solutions across member states and solutionconcepts.
While there is room for improvement in terms of prediction quality, our approach provides a usefultool for obtaining quick estimates of the voting power in medium size games ( 10 ≤ n < 50 ).
[Figure]
[Figure]
Furthermore, while approximation methods exist for Shapley and Banzhaf, there are currently noeffective methods for estimating payoffs in the least core.
This solution concept is more challengingas the solutions are obtained by solving a Linear Program with a hard constraints.
Thus, solving agame with 15 or even 20 players contains on the order of 2 15 or 2 20 constraints, which slow downthe solvers dramatically.
Here, we can apply the same technique, solve for the small/medium sizegames, then leverage our neural network approach to tackle a higher numbers of players.
In otherwords, provided a solver that can handle up to M players, we can train a neural network on thisnumber of players, allowing us to extend the number of players even beyond M , possibly up to 2 M .
[Figure]
b s o l u t e e rr o r p l a y e r i
[Figure]
quota
[Figure]
WVG
[Figure]
w =(12,13,27,
[Figure]
[Figure]
M Real World Applications of Weighted Voting Games
Weighted voting games, and cooperative game theory in general, provide valuable tools for reasoning about the allocation of collective outcomes to individual agents.
As such, their applicability spannumerous domains.
In this section, we highlight several real-world applications of our work.
In allexamples, our framework can be applied to both speed up and enhance the scalability.
Dinar et al.[18] utilize solution concepts from cooperative game theory – including the Core, the Shapley Value,the Nucleolus and Nash – to allocate water resources to competing parties in the presence of scarcity.
More recently, Mirzaei-Nodoushan et al.
[38] also performed an extensive evaluation of both cooperative and non-cooperative game theoretic approach for water management in trans-boundary riverbasins.
Moreover, cooperative game theory has proven useful in analyzing the costs of joint activities [54].
V´azquez-Brage et al.
[50] combine a model of airport games with the Shapley value to fairly distribute the aircraft landing fees among airlines.
When an airport is build, the size of the runwayis chosen to match the largest designed airplaine.
The authors address how to fairly divide costsbetween airlines provided the different designs and sizes of their planes.
Bistaffa et al.
[11] applied cooperative game theory to analyze the social ridesharing problem.
Mobility platforms such as Lyft allow their users to share their trip with nearby users in real-time,providing a more environmentally friendly and cost effective alternative to commuting alone.
Theystudy how the costs of the ride should be divided among passengers.
Another application is in supply chain management, where Fiestras-Janeiro et al.
[22] study how to coordinate actions betweensuppliers, manufactorers, retailers and customers.