A study of Nash equilibrium in contribution games for peer-to-peer networks

We consider a stylized model of content contribution in a peer-to-peer network. The model is appealing because it allows for linear-quadratic payoff functions and for very general interaction patterns among agents. Furthermore, when the model has a unique Nash equilibrium (NE) we find that it is defined by a network centrality measure (Bonacich 1987), with L1 and L2 norms of the Bonacich index vector providing aggregate contribution and social welfare. Furthermore, we find that NE are always (even when they are non-unique) computable by solving a linear complementarity problem. We study the network designer's problem of engineering the most efficient equilibrium outcome, proving that maximizing aggregate contribution can be reconciled with maximizing aggregate welfare. We also provide a partial characterization of optimal NE graphs and suggest different approaches for how a network designer can promote more efficient graph structures.


Introduction
Peer effects, or the dependence of individual outcomes on group behaviour, is a characterizing feature of peer-to-peer systems (Antoniadis et al. 2005).File-sharing systems, for example, rely on participants to provision the network with bandwidth.A player experiences a marginal increase in utility from a better download rate as a result of another player's providing upload bandwidth.In such settings, the degree to which one player can benefit from another player depends on the relative location of the players in a network.A person can benefit more from another's high upload rate if the latter is closely connected.This may be either because of the congestion and resulting latency along multi-hop connections or because persons have only a partial view of the network (as in Kazaa).
Following Ballester et al. (2005), we adopt a simple model for a contribution game in this paper.The model allows for positive bilateral influences, meaning two players can positively affect each other's payoffs.
A player is modeled with a linear-quadratic utility function, that allows for utility-dependence on the contribution by other players.The utility structure provides for an individualized component, refelecting decreasing marginal-returns for a player's own contribution, in addition to a term that reflects local interaction that varies across pairs of players, meaning pairs of players can affect each other differently.
The population wide pattern of these local complementarities is well-captured by a network.In the case of a peer-to-peer file sharing system, this network closely resembles the underlying network of connectivity between peers and the local complementarities reflect the payoff interdependencies rooted in this network structure of player links.In such a setting, equilibrium strategies naturally reflect players' network embeddedness.
The model is appealing because a unique Nash equilibrium (NE) of the contribution game can be readily computed as a metric of network centrality.This facilitates a rich empirical analysis of the contribution game.First proposed by Bonacich (1987) nearly two decades ago, the Bonacich network centrality measure counts the number of all paths emanating from a given node weighted by a decay factor that decreases with the length of these paths. 1 As demonstrated by Ballester et al. (2005) this turns out to be intimately related to equilibrium behavior in our setting, since the paths capture all possible feedbacks from others' play.The decay factor represents the extent to which others' actions enter into a player's own action's payoff.We also find that NE are always (even when they are non-unique) computable by solving a linear complementarity problem.We exploit both relationships to compute NE and to characterize optimal NE in our game.
As a designer, one goal might be to maximize the aggregate contribution by players to a system, while another goal might be to maximize the total social welfare of players.
We consider a network design setting, in which the planner's ability to control a system is limited by constraints that can be placed on the characteristics of allowable networks.Ideally, these characteristics will be local so that they can be implemented and verified through simple decentralized protocols.There is no ability to implement side payments in our work.We stress the difference between such network design and the implementation of a centralized mechanism: the designer's intervention is indirect and not predicated on direct interaction with participants.As such, network topology design is a more realistic way of encouraging desirable equilibrium play in many peer-to-peer settings.
Fixing the number of nodes and the number of edges in a network, we use a simulated annealing search to find contributionand social welfare-maxmizing networks where a network design is evaluated in the equilibrium of the contribution game that is induced.We solve for the induced equilibrium by solving the associated linear complementarity problem.Our first result is that the optimal networks for both objective functions very closely coincide, and that they are exactly equivalent for large externalities and correspond to networks with maximal largest eigenvalues, otherwise known as maximal index graphs.These graphs exhibit a hub-like structure.Yet the threshold on the level of local externalities under which these graphs produce a unique, interior equilibrium is low, i.e. lower than for more regular graphs.That said, as local complementarities grow equilibria become non-unique and partially-corner, in that some agents contribute nothing at equilibrium.Under such conditions, we find that graphs with large index are again optimal for both network design problems.
We investigate how well a network designer can improve the equilibrium by manipulating a graph's edges.We show that the optimal graphs yield equilibrium outcomes that scale as well as O( √ e) with respect to completely random graphs, and decreases as graphs become larger and denser.
Finally, we briefly discuss how the network structure can be steered to optimality either by the exclusion of some number of players (or player types) or by partitioning the graph into multiple components.

Related Work
Our contribution game is based on work that investigates how individuals provision public goods in the face of the externalities from other individuals' play.Our model is based on a model by Ballester et al. (2005) but where players only face positive bilateral complementarities and marginally decreasing returns in their own contribution.This stylized model captures many natural settings; specifically, it is a good model of bandwidth provisioning in peer-to-peer file sharing systems.
Endogenous network formation models feature prominently in economic modeling.One of the main points of concern is the tension between stability and efficiency in network games.See Jackson (2005) for a survey of the area.We provide a partial characterization of equilibria in our game and relate a network's efficiency to its geometric properties.
This paper situates itself in a growing body of literature interested in endogenous network design.Anshelevich et al. (2004) study the ratio of the best Nash equilibrium with the centralized optimum (price of stability) in a setting where independent agents wish to connect certain nodes in a graph under a fair cost allocation mechanism.Corbo et al. (2005) study how the ratio of the worst equilibrium with the centralized optimum (price of anarchy) changes when agents who want to form a graph can establish links bilaterally versus unilaterally.Recently Kempe et al. (2003) investigate how the topology of a social network affects the propagation of ideas and formulate the problem of how best to maximize the spread of influence for a given network.Taking the view that social networks are endogenously optimizing some feature, Liben-Nowell and Kleinberg (2003) concern themselves with how to predict which links will form as the network evolves.We study a setting where agents freely interact and study how the pattern of interactions affects the optimality of observed outcomes.We provide a partial characterization of optimizing graphs, show the equivalence of the unique equilibria of our game and a social network centrality measure, show how all equilibria can be solved by solving an associated linear complemntarity problem, and finally discuss the viability of different mechanisms to achieve better equilibria.

The game
Players are connected by a network g with adjacency matrix G = [g ij ].This is a zero diagonal and non-negative square matrix, with g ij ∈ {0, 1} for all i = j.We let g ij = g ji , for all i, j.The matrix G is a symmetric (0,1)-matrix and the network g is undirected and unweighted, that can be represented by a graph without loops nor multiple links.
Each player i = 1, ..., n selects a contribution x i ≥ 0, and gets a payoff u i (x 1 , . . ., x n ).We focus on bilinear utility functions of the form: where Note that this utility is marginal-decreasing in an agent's own contribution, with The external effect of another agent on the utility of agent i is captured by the cross-derivatives ∂ 2 ui ∂xixj = ag ij , for i = j.We set a > 0 so that the effect on agent i of agent j's contribution is marginal-increasing if and only if i and j are connected in g.The network g reflects the pattern of existing payoff (relative) complementarities across all pairs of players.
Where convenient, we use Σ to refer to the n-player game with payoffs given by Equation 1 and strategy space, the positive real line.

The Linear Complementarity Problem
We analyze the set of pure strategy Nash equilibria of the game introduced above.We note that an equilibrium exists if and only if the following holds: In matrix notation, the above Nash equilibrium necessary and sufficient conditions in Equations 2 become : The problem of finding a vector x * such that the above conditions hold is known as the linear complementarity problem LCP (−α, −Σ) in the literature.We can therefore state the following: Theorem 1 The set of pure strategy Nash equilibria of the contribution game with parameters α and Σ are given by the set of solutions to LCP (−α, −Σ).
The linear complementarity problem is a well-studied problem and we borrow from this literature to address existence of the Nash equilibrium in our game, as well as in our empirical studies to characterize optimally-designed networks.

The Bonacich network centrality measure
Before turning to the equilibrium analysis, we define a network centrality measure due to Philip Bonacich (1987) that proves useful for this analysis.
Let G(v, e) denote the set of undirected and unweighted connected graphs without loops with v vertices and e edges.Connectedness requires that e ≥ v − 1, which we assume from now on.
Let g ∈ G(v, e) and let G denote its adjacency matrix.This is a v−square, symmetric, and zero diagonal (0, 1)−matrix.We set g ij = 1 if i and j are directly connected in g, and g ij = 0, otherwise.Denote by µ 1 (g) its largest eigenvalue, also called the index of g.Note that this index is well-defined and µ 1 (g) > 0.

Lemma 1 The matrix B(g, a) = [I−aG]
−1 is well-defined and non-negative if and only if aµ 1 (G) < 1.Then, B(g, a) = +∞ k=0 a k G k , and its coefficients b ij (g, a) count the number of paths in g starting at i and ending at j, where paths of length k are weighted by a k .Proof: From Theorem III * , page 601 in Debreu and Herstein (1953).
, and counts the total number of weighted paths in g starting from i.
Theorem 2 For aµ 1 (G) < 1, the game Σ has a unique Nash equilibrium x * (Σ), which is interior and given by Proof: From Theorem I in Ballester et al. (2005).

Corollary 1
The utility of player i at equilibrium is i for all i.By the first order conditions ∂u i (x * , g)/∂x i = 0 that yield the Nash equilibrium2 we have: Replacing above gives: Then the total equilibrium welfare u(x * , g) • 1 is

Comparative Statics
The previous results relate individual equilibrium outcomes to the Bonacich centrality in the network g of local complementarities.The next result establishes a positive relationship between the aggregate equilibrium outcome and the pattern of local complementarities.First we remark that the cross effects for the payoff function given in Equation 1 is captured by the matrix Σ = −I + aG. 3 For any two matrices Σ and Σ , we write , for all i,j, with at least one strict inequality.
Proof: Σ = Σ + aD, with d ij ≥ 0 with at least one strict inequality.Theorem . By symmetry of Σ , we have: Each individual outcome increases with a and with G. Indeed, we are either increasing the weight to each path, or increasing the number of such paths.Hence, both individual equilibrium outcomes, aggregate equilibrium outcome and welfare increase with a and with G.

Network Design
A number of edges e and vertices v are given.The problem of optimal network design consists on arranging the v vertices with the e edges in such a way that some objective function is maximized.We identify two different network design problems.With later analysis in mind, we formally state these problems when the equilibrium is interior and unique.
Here, the social planner wants to maximize aggregate activity (read contribution) at equilibrium.
Here, the social planner wants to maximize aggregate equilibrium welfare.
That problems 1 and 2, which correspond to maximizing the L1 and L2 norms of the Bonacich index vector, are equivalent to maximizing aggregate welfare and aggregate contribution stems from the convenient relationship between utility and contribution quantities and the Bonacich indices in our game, when the equilibrium is unique.The relation between Bonacich centrality and the unique NE of our game lends a geometric interpretation to problem 1: namely, the social welfare-maximizing graph is the graph with maximal weighted paths.For both problems, the relation suggests a way to characterize optimal equilibria using spectral graph theory, even when equilibria are not unique.
We stress the difference between the two problems.In the peer-to-peer file-sharing example, the system planner may want to ensure that download bandwidth is maximized, even at the expense of social utility.Or the planner may be more concerned with the aggregate utility of the system to users, even at the expense of poorer performance.
Theorem 2 establishes that a necessary and sufficient condition for there to be a single equilibrium in the game Σ is that aµ 1 (G) < 1.This is also a necessary and sufficient condition for players' contributions to be strictly positive, i.e. for the equilibrium to be interior.We first show that the two network design problems can be reconciled in our game when the equilibrium is interior and unique.Specifically, we show that as network externalities grow, the two problems become asymptotically the same.
Proof: For a given network g, b(g, λ) is only well-defined when λ < 1/µ 1 (G).Therefore, the strict upper bound for λ in G(v, e) is 1/µ 1 (g * ), where g * is the solution.Then, This drives the equivalence of Problems 1 and 2.
In words, when a is high enough, the networks that maximize aggregate outcome and welfare coincide, and are given by the graph with maximal index.
We use results on graphs with largest maximal eigenvalues to solve the network design problem in this case.
Proposition 1 Suppose that a is high enough.Then,

Proof: See Theorem 3.3.2, page 68 in Cvetković et al. (1997).
These asymptotic results reveal a great deal about how the optimal networks (for both objective functions) change with the level of externalities.As explained earlier, it is the particular payoff complementarities that fix a and induce the network linking players.Consider now the situation reversed: the payoff complementarity between two players i and j is set by two factors: the parameter a and the cumulative distance along all paths in number of node hops between i and j in some graph g.By this view, we can now understand that the relative network externalities are driving the system to have multiple equilibria and that these increase either by increasing a or by increasing the largest eigenvalue in g.Moreover, the above results suggest that both objective functions increase without bound as a ↑ 1/µ 1 (G).We still treat a as an exogenous parameter that arises from the payoff decomposition seen earlier.So for all a, the optimal network g * is the graph on v and e with largest eigenvalue.
So far, we have discussed the network design problem when NE are unique and interior.Beyond the eigenvalue bound of Theorem 2, NE are no longer unique or interior, i.e. a subset of agents in the game contribute 0 at equilbrium.We call these equilbria partially-corner.Yet the introduction of partiallycorner equilibria does not change the network designer's problem much.Indeed, Figure 2 shows that contribution-maximizing graphs beyond the maximum eigenvalue bound are topologically very similar,their maximum eigenvalue not decreasing much as edges are rearranged at optimum.The rationale is the following: As the payoff complementarity a grows, the welfaremaximizing graph(s) are first the maxiumum eigenvalue graphs while interiority holds, then those graphs with highest eigenvalue such that interiority still holds, and then, as partiallycorner equilibria are all that remain (given a and for all g(v, e)), these are still graphs with high eigenvalue (but now with some agents not contributing).As a still grows, a growing number of agents do not contribute.
In our computational experiments, the optimization process is performed using adaptive simulated annealing as described by Allen (1995) and Tsallis et al. (1994).Starting from a given initial network configuration, random rewiring of individual links is performed, the objective function is evaluated-the equilibrium being solved by solving the associated LCP-and the change is accepted with a certain probability that depends on a temperature coefficient that allows the system to escape local minima in the search space and vanishes to zero as the search results become more certain.
Figure 1 illustrates that L1-maximizing graphs share the same largest eigenvalue as L2-maximizing graphs.With v and e fixed, the largest eigenvalue of a graph is a measure of its regularity.A higher eigenvalue corresponds to an irregular hub-like structure, whereas a lower eigenvalue (still for the same number of vertics and edges) refers to a more regular network.So Figure 1 shows that L1 and L2-maximizing graphs share the same topology.In fact, while we have highlighted here the fact of the coincidence between the two network design problems when in- The graph illustrates that the maximum eigenvalue of L1 and L2-maximizing graphs (corresponding to optimal equilibrium graphs) are roughly the same.The particular plot shows the trend for a varied number of edges and a values, on 10 nodes.The number of nodes is held fixed for reasons of computational expediency.
teriority holds for the sake of illustrating the reason for the result, we find that this is true even for partially-corner equilibria.
Figure 2 shows how the maximum eigenvalue of the welfaremaximizing graph 4 on 10 vertices with differing number of edges changes as a function of a.In particular, we find that even as we move from interior to increasingly partially-corner equilibria as complementarities grow, there is little transition in the topology of optimal equilibrium graphs from hub-like types.For low values of a, all graphs yield a unique equilibrium and so the optimal equilibrium graphs are those with the largest possible first eigenvalue, as suggested by asymptotic results above.As a increases beyond the value of the highest first eigenvalue, the optimal graphs become the graphs that remain with highest eigenvalue, some links now being rearranged in view of some agents no longer contributing.

Designing the Equilibrium
Armed with an understanding of the network pattern of externalities that lead to the most efficient equilibrium outcomes, the system planner can now prescribe changes to the given graph that maximize its largest eigenvalue.
One possible mechanism might be to induce a rearrangement of the network edges, keeping the number of nodes fixed.We explore the limits of this approach.
Theorem 4 Starting from a sparse random graph g(v, p), where p is the probability of an edge between any two players i and j, i = j, the largest eigenvalue can be increased as much as O( √ e).
Proof: We omit the full proof for reasons of space.Briefly, consider a connected simple graph g and let µ 1 be its largest eigenvalue.Let d i , i ∈ V , denote the degree of a vertex i and let ∆ = max i∈V d i .(If g is regular then d i = ∆ for each i ∈ V , then µ 1 = ∆.)If g is not regular, the there is no graph such that 4 Again, the same relation holds for contribution-maximizing graphs.The plot shows how the largest eigenvalue of aggregate welfare-optimal equilibrium graphs always remains a maximum subject to the constraint that a graph yields a single equilibrium, and changes only so slightly as equilibria become partially-corner.The different (horizontal) lines correspond to different edge numbers in the graph, always keeping the number of vertices set at 10, while the vertical lines indicate the threshold of a beyond which interiority of the maximal index graph (among all graphs for fixed v and e) does not hold.Stevanovic (2004) for the proof of this upper bound.In either case, however, µ 1 = O(e).
Fixing the number of vertices, it is clear that the greatest difference in first eigenvalue lies in a graph with fewer edges.Consider a sparse random graph, where g(v, p) and e = pv(v−1)

2
. It can be shown that the maximum eigenvalue of this graph µ 1 is almost surely the following: The interpretation of Theorem 4 is that the network designer's task of manipulating the graph will induce a change in first eigenvalue of size at most O( √ e) and that this difference reduces as the network becomes more dense, i.e. edges are added.
As to the gains from such manipulation (Corollary 2), consider the example of a small enough so that the optimal graph is the one with largest eigenvalue.At a first order in a, the Bonacich index of i is b i = 1 + ad i , and so aggregate equilibrium is v + 2ae.The square of i's Bonacich index is 1 + 2ad i , and social welfare is v + 4ae.The largest eigenvalue increase is of the order of √ e.The optimal graph is such that the inverse of the largest eigenvalue equals a.Therefore, both the aggregate equilibrium and the social welfare increase for the optimal graph are roughly of the order of √ e.In other words, the gains from random to optimally designed network are marginally decreasing as O( √ e).Symmetrically, welfare losses in random versus optimal networks are sizeable, and the smaller the larger the network.That the greatest gains from manipulating the network coincide with smaller networks (where such an approach may be easier to implement), preliminarily suggests the viability of the network designer's task.On the other hand, it also shows that a network designer is very limited in his capacity to affect the outcome on a large graph in this way, i.e. keeping e and v fixed.

Future Work
We are currently pursuing the idea of network design in our game in a number of ways: • Network Design: Following the approach taken by Ballester et al. (2005) where key players are excluded in order to optimally affect the designer's objective function, our rules would largely operate by the exclusion of players and edges from the initial given graph of externalities, The implementability of this approach is readily seen in peerto-peer file sharing systems where the application system has some control over membership and on connectivity between players (embedded on the underlying IP-level graph of connectivities).Moreover, in simulation, the gains from such an approach in maximizing aggregate welfare or contribution look to be much greater than the rearrangement of edges approach discussed earlier.
• Distributed Network Design: We are also investigating the use of simple rules on players' connectivities to alter the pattern of network externalities.Keeping the number of players and links fixed, this would effectively provide a mechanism to both increase and decrease a network's largest eigenvalue.In a peer-to-peer application environment, the pattern of externalities can fluctuate greatly.
In such a setting and because the communication requirements of conveying global state information would be prohibitive, these rules would have to be local in nature.
• A Complete Characterization of Optimal Equilibria: We provide a partial characterization of optimal equilibrium graphs.We are currently working on using the Nash-LCP equivalence to extend this characterization.
• The Price of Stability: Anshelevich et al. ( 2004) coin the term price of stability to mean the competitive ratio between the (objective function) values of the best NE and the socially optimal (objective function-maximizing) solution.
We would like to study this in our game, and particularly how the socially optimal networks differ from the optimal equilibrium networks.

First
Figure 1: The graph illustrates that the maximum eigenvalue of L1 and

Figure 2 :
Figure 2: The plot shows how the largest eigenvalue of aggregate