Global Convergence of Multi-Agent Policy Gradient in Markov Potential Games
Stefanos Leonardos, Will Overman, Ioannis Panageas, Georgios Piliouras
Introduction
Reinforcement learning (RL) has been a fundamental driver of numerous recent advances in Artificial Intelligence (AI) that range from super-human performance in competitive game-playing and strategic decision-making in multiple tasks to robotics, autonomous-driving and cyber-physical systems . A core ingredient for the success of single-agent RL systems, which are typically modelled as Markov Decision Processes (MDPs), is the existence of stationary deterministic optimal policies . This allows the design of efficient algorithms that provably converge towards such policies . However, in practice, a majority of the above systems involve multi-agent interactions. In such cases, despite the notable empirical advancements, there is a lack of understanding of the theoretical convergence guarantees of existing multi-agent reinforcement learning (MARL) algorithms.
The main challenge when transitioning from single to multi-agent RL settings is the computation of Nash policies. A Nash policy for agents is defined to be a profile of policies so that by fixing the stationary policies of all agents but , is an optimal policy for the resulting single-agent MDP and this is true for all Analogue of Nash equilibrium notion. (see Definition 1). Note that in multi-agent settings, Nash policies may not be unique in principle.
A common approach for computing Nash policies in MDPs is the use of policy gradient methods. There has been significant progress in the analysis of policy gradient methods during the last couple of years, notably including the works of (and references therein), but it has mainly concerned the single-agent case: the convergence properties of policy gradient in MARL remain poorly understood. Existing steps towards a theory for multi-agent settings involve the papers of who show convergence of independent policy gradient to the optimal policy for two-agent zero-sum stochastic games, of who improve the result of using optimistic policy gradient and of who study extensions of Natural Policy Gradient using function approximation. It is worth noting that the positive results of and depend on the fact that two-agent stochastic zero-sum games satisfy the “min-max equals max-min” property (even though the value-function landscape may not be convex-concave, which implies that Von Neumann’s celebrated minimax theorem may not be applicable).
While the previous works enhance our understanding in competitive interactions, i.e., interactions in which gains can only come at the expense of others, MARL in cooperative settings remains largely under-explored and constitutes one of the current frontiers in AI research . Based on the above, our work is motivated by the following natural question:
Can we get (provable) convergence guarantees for multi-agent RL settings in which cooperation is desirable?
To address this question, we define and study a class of -agent MDPs that naturally generalize normal form potential games , called Markov Potential Games (MPGs). In words, a multi-agent MDP is a MPG as long as there exists a (state-dependent) real-valued potential function so that if an agent changes their policy (and the rest of the agents keep their policy unchanged), the difference in agent ’s value/utility, , is captured by the difference in the value of (see Definition 2). Weighted and ordinal MPGs are defined similar to their normal form counterparts (see Remark 1).
Under our definition, we answer the above motivating question in the affirmative. In particular, we show that if every agent independently runs (with simultaneous updates) policy gradient on his utility/value , then, after iterations, the system will reach an -approximate Nash policy (see informal Theorem 1.1 and formal Theorem 4.5). Moreover, for the finite sample analogue, i.e., if every agent independently runs (with simultaneous updates) stochastic policy gradient, we show that the system will reach an -approximate Nash policy after iterations.
Along the way, we prove several properties about the structure of MPGs and their Nash policies (see Theorem 1.2 and Section 3). In sum, our results can be summarized in the following two Theorems.
Consider a MPG with agents and let . Suppose that each agent runs independent policy gradient using direct parameterization on their policy and that the updates are simultaneous. Then, the learning dynamics reach an -Nash policy after iterations. If instead, each agent runs stochastic policy gradient using greedy parameterization (see (4)) on his policy and that the updates are simultaneous, then the learning dynamics reach an -Nash policy after iterations.
This result holds trivially for weighted MPGs and asymptotically also for ordinal MPGs, see Remark 5.
The following facts are true for MPGs with -agents:
There always exists a Nash policy profile so that is deterministic for each agent (see Theorem 3.1).
We can construct MDPs for which each state is a (normal-form) potential game but which are not MPGs. This can be true regardless of whether the whole MDP is competitive or cooperative in nature (see Examples 1 and 2, respectively). On the opposite side, we can construct MDPs that are MPGs but which include states that are purely competitive (i.e., zero-sum games), see Example 3.
We provide sufficient conditions so that a MDP is a MPG. These include cases where each state is a (normal-form) potential game and the transition probabilities are not affected by agents actions or the reward functions satisfy certain regularity conditions between different states (see conditions C1 and C2 in Proposition 3.2).
Technical Overview.
The first challenge in the proof of Theorem 1.1 is that multi-agent settings (MPGs) do not satisfy the gradient dominance property, which is an important part in the proof of convergence of policy gradient in single-agent settings . In particular, different Nash policies may yield different value to each agent and as a result, there is not a properly defined notion of value in MPGs (in contrast to zero-sum stochastic games ). On the positive side, we show that agent-wise (i.e., after fixing the policy of all agents but ), the value function, , satisfies the gradient dominance property along the direction of (policy of agent ). This can be leveraged to show that every (approximate) stationary point (Definition 4) of the potential function is an (approximate) Nash policy (Lemma 4.2). As a result, convergence to an approximate Nash policy is established by first showing that is smooth and then by applying Projected Gradient Ascent (PGA) on . This step uses the rather well-known fact that (PGA) converges to -stationary points in iterations for smooth functions. As a result, by applying PGA on the potential , one gets an approximate Nash policy. Our convergence result then follows by showing that PGA on the potential function, , generates the same dynamics as if each agent runs independent PGA on their value function, .
In the case that agents do not have access to exact gradients, we derive a similar result for finite samples. In this case, we apply Projected Stochastic Gradient Ascent (PSGA) on which (as was the case for PGA) can be shown to be the same as when agents apply PSGA independently on their individual value functions. The key is to get an unbiased sample for the gradient of the value functions and prove that it has bounded variance (in terms of the parameters of the MPG). This comes from the discount factor, ; in this case, can be interpreted as the probability to terminate the MDP at a particular state (and to continue). This can be used to show that a trajectory of the MDP is an unbiased sample for the gradient of the value functions. To guarantee that the estimate has bounded variance, we apply the approach of which requires that agents perform PSGA with -greedy exploration (see (4)). The main idea is that this parameterization stays away from the boundary of the simplex throughout its trajectory.
Concerning our structural results, the main technical challenge is the dependence of state-transitions (in addition to agents’ rewards) on agents’ actions. Our work in this part is mainly concerned with showing that the class of MPGs can be significantly larger than state based potential games but also that even simple coordination games may fail to satisfy the (exact) MPG property. Finally, concerning the existence of a deterministic Nash policies, the main challenge is (as in Theorem 1.1) the lack of a (unique) value in general multi-agent settings. As we show in the proof of Theorem 3.1, this issue can be still handled within the class of MPGs by constructing single-agent deviations (to deterministic optimal policies) which keep the value of the potential constant (at its global maximum). This process (which leads to a deterministic Nash policy profile) depends critically on the MPG property and does not generalize to arbitrary MARL settings.
Other works on MPGs.
There are only a few papers in the recent literature that define and analyze MARL settings under the term Markov Potential Games using slight different definitions (see ). These papers mainly focus on state-based potential MDPs (i.e., MDPs in which every state is a potential game) and require rather restrictive additional conditions, such as equality or monotonicity of the state-based potential functions, to address the computational challenge of finding Nash policies.The relation of these conditions to the current work is discussed in more detail in Proposition 3.2 and Remark 2. Our current results demonstrate the efficiency of simultaneous policy gradient as a to powerful method to find Nash policies even without additional restrictive assumptions on the state-based potential functions. Moreover, as mentioned in Theorem 1.2, the current definition also encompasses MDPs that are not necessarily potential at each state. To the best of our knowledge, the only (cooperative) MPGs that have been successfully addressed prior to this work, are the ones in which all agents receive the same value/utility and which constitute a subclass of the MPG setting considered in this paper.
Preliminaries
The following notation is standard and largely follows and . We consider a setting with agents who repeatedly select actions in a shared Markov Decision Process (MDP). The goal of each agent is to maximize their respective value function. Formally, a MDP is defined as a tuple , where
is a finite state space of size . We will write to denote the set of all probability distributions over the set .
is the set of the agents in the game.
is a finite action space for agent with generic element . Using common conventions, we will write and to denote the joint action spaces of all agents and of all agents other than with generic elements and , respectively. According to this notation, we have that . We will write and to denote the size of any set and the space of all probability distributions over , respectively.
is the individual reward function of agent , i.e., is the instantaneous reward of agent when agent takes action and all other agents take actions at state .
is the transition probability function, for which is the probability of transitioning from to when is the action profile chosen by the agents.
is a discount factor for future rewards of the MDP, shared by all agents.
is the distribution for the initial state at time .
Whenever time is relevant, we will index the above terms with . In particular, at each time step , all agents observe the state , select actions , receive rewards and transition to the next state . We will write to denote the trajectories of the system, where .
Policies and Value Functions.
Nash Policies.
The solution concept that will be focusing on is the Nash Policy. Formally:
A joint policy, , is a Nash policy if for each agent it holds that
i.e., if the policy, , of each agent maximizes agent ’s value function for each starting state given the policies, , of all other agents . Similarly, a joint policy is an -Nash policy if there exists an so that for each agent
We note that the definition of Nash policy is the same if (random starting state).
Markov Potential Games.
We are ready to define the class of MDPs that we will focus on for the rest of the paper, i.e., Markov Potential Games.
Similar to normal-form games, one may also define more general notions of MPGs, such as ordinal or weighted Markov Potential Games. Specifically, if for all agents , all states and all policies , the function satisfies
then the MDP, , is called an Ordinal Markov Potential Game (OMPG). If there exist positive constants so that
then is called a Weighted Markov Potential Game (WMPG).
Similarly to normal-form games, such classes are naturally motivated also in the setting of multi-agent MDPs. As Example 2 in Section B.1 shows, even simple potential-like settings, i.e., settings in which coordination is desirable for all agents, may fail to be exact MPGs (but may still be ordinal or weighted MPGs) due to the dependence of both the rewards and the transitions on agents’ decisions. From our current perspective, ordinal and weighted MPGs (as defined in Remark 1) remain relevant, since as we argue, policy gradient still converges to Nash policies in these classes of games (see Remark 5).
Independent Policy Gradient and Direct Parameterization
We assume that all agents update their policies independently according to the projected gradient ascent (PGA) or policy gradient algorithm on their policies. Independence here refers to the fact that (PGA) requires only local information (each agent’s own rewards, actions and view of the environment) to form the updates, i.e., to estimate that agent’s policy gradients. Such protocols are naturally motivated and particularly suitable for distributed AI settings in which all information about the interacting agents, the type of interaction and the agent’s actions (policies) is encoded in the environment of each agent.In practice, even though every agent treats their environment as fixed, the environment changes as other agents update their policies. This is what makes the analysis of such protocols particularly challenging in full generality. It also highlights the importance of studying classes of games (MDPs) in which convergence of independent learning protocols can be obtained such as zero-sum stochastic games or MPGs as we do in this paper.
for each agent , where is the projection onto in the Euclidean norm. We also assume that all players use direct policy parameterizations, i.e.,
with for all and for all . This parameterization is complete in the sense that any stochastic policy can be represented in this class .
In practice, agents use projected stochastic gradient ascent (PSGA), according to which, the actual gradient, , is replaced by an estimate thereof that is calculated from a randomly selected (yet finite) sample of trajectories of the MDP. This estimate, may be derived from a single or a batch of observations which in expectation behave as the actual gradient. We choose the estimate of the gradient of to be
where , and is the sum of rewards of agent for a batch of time horizon along the trajectory generated by the stochastic gradient ascent algorithm at its -th iterate (recall that the discount factor, , functions as the probability to continue at each step, so is sampled from a geometric distribution).
The direct parameterization is not sufficient to ensure that the variance of the gradient estimator is bounded (as policies approach the boundary). In this case, we will require that each agent uses instead direct parameterization with -greedy exploration as follows
where is the exploration parameter for all agents. Under -greedy exploration, it can be shown that (3) is unbiased and has bounded variance (see Lemma 4.6). The form of PSGA is
Structural Properties of Markov Potential Games
The first question that we examine, is whether MPGs possess a deterministic Nash policy profile, as is the case in normal-form potential games . In Theorem 3.1, we show that this important property indeed carries over (which settles part (a) of informal Theorem 1.2).
Let be a Markov Potential Game (MPG). Then, there exists a Nash policy which is deterministic, i.e., for each agent and each state , there exists an action so that .
The proof of Theorem 3.1 (which is deferred to Appendix B) exploits the fact that we can iteratively reduce the non-deterministic components of an arbitrary Nash policy profile that corresponds to a global maximizer of the potential and still retain the Nash profile property at all times. At each iteration, we isolate an agent , and find a deterministic (optimal) policy for that agent in the (single-agent) MDP in which the policies of all other agents but remain fixed. The important observation is that the resulting profile is again a global maximizer of the potential and hence, a Nash policy profile. This argument critically relies on the MPG structure and does not seem directly generalizable to MDPs that do not satisfy Definition 2.
Sufficient Conditions for MPGs.
We next turn to the question of which types of games are captured by Definition 2. It is tempting to think that MDPs which are potential at every state (meaning that the immediate rewards at every state are captured by a (normal-form) potential game at that state) are trivially MPGs. As we show in Examples 1 and 2, this intuition fails in the most straightforward way: we can construct simple MDPs that are potential at every state but which are purely competitive (do not possess a deterministic Nash policy) overall (Example 1) or which are cooperative in nature overall but which do not possess an exact potential function (Example 2).
Consider the two-agent, two-state, and two actions per state MDP, in Figure 2. At state (), agent A always receives () and agent B always receives () regardless of the actions they choose. That is, the reward functions for both states are constant, which implies that both states are potential games. The transitions are determinstic and are given by
where denotes the xor operator or equivalently, addition modulo , i.e., . The MDP is illustrated in Figure 2.
To show that is not a MPG, it suffices to show that it cannot have a deterministic Nash policy as should be the case according to Theorem 3.1. To obtain a contradiction, assume that agent is using a deterministic action at state . Then, agent , who prefers to move to state , will optimize their utility by choosing the action that yields . In other words, given any deterministic action of agent at state , agent can choose an action that always moves the sequence of play to state . Thus, such an action cannot be optimal for agent which implies that the MDP does not have a deterministic Nash policy profile as claimed.
Intuitively, the two agents in Example 1 play a game of matching pennies in terms of the actions that they choose (since they prefer playing in opposing states). Thus, competition arises due to the opposing preferences of the agents over states even though the immediate rewards at each states are determined by normal form potential games.
Example 2 shows that a state-based potential game may fail to be a MPG even if agents have similar preferences over states. In that case, the reason is that one cannot find an exact potential function due to the dependence of the transitions on agents’ actions. However, in the case of Example 2, it is straightforward to show that the game is an ordinal potential game, cf. Remark 2.
Consider the two-agent, two-state MDP, in Figure 2. At state , each agent has two actions, , whereas at state , each agent has a single action. The transitions and instantaneous rewards, of this MDP are shown in Figure 2. If the action profile is selected at state , then the play remains there, otherwise the play transitions to state and remains there forever.
where are the probabilities with which agents and respectively select their action at state . This expression clearly indicates the complexity that emerges in MPGs versus static games. Namely, the first term of the value function is a common term (same for both agents) that can conveniently become part of a potential function. However, the second term is a mixture of a common term (denominator) and a term that is different for each agent (numerator). The reason is that the policy of each agent determines the time that the agents spend at each state and thus, it does not (generally) allow for an agent independent term (as required by the definition of a potential game). However, this game is clearly a potential-like game in which agents have common interests. This motivates to look at the notion of ordinal or weighted MPGs. Note that (by a straightforward calculation) this game is an ordinal MPG for the potential function for .
Based on the intuition from the previous Examples, we formulate the following sufficient conditions in Proposition 3.2 which ensure that a state based potential game (i.e., a game that is potential at every state) is also a MPG according to Definition 2 (cf. Theorem 1.2 part (c)).
Consider a MDP in which every state is a potential game, i.e., the immediate rewards for each state are captured by the utilities of a (normal-form) potential game with potential function . Additionally, assume that one of the following conditions holds
Agent-Independent Transitions: does not depend on , that is, is just a function of the present state for all states .
If either C1 or C2 are true, then is a MPG.
As the rest of the proofs of Section 3, the proof of Proposition 3.2 is provided in Appendix B. The following remarks are due.
Condition C1 can also be viewed as a special case of condition C2. However, due to its simplicity, it is more instructive to state C1 separately. Condition C2 (or variations of it) are already present in existing studies of potential-like MDPs . Example 2 shows that such conditions are restrictive, in the sense that they do not capture very simple MDPs that intuitively have a potential-like (cooperative) structure. This motivates the study of ordinal or weighted potential games as natural models to capture such cases. As we show, our convergence results about independent policy gradient naturally extend to these classes as well (see Remark 5).
The previous discussion focuses on games that are potential at every state as natural candidates to generalize the notion of normal-form games to state games. This leaves an important question unanswered: are there games which are not potential at every state but which are captured by the our current definition of MPGs? Example 3 answers this question in the affirmative. Together with Example 1, this settles the claim in Theorem 1.2, part (b).
At state , agents’ rewards, form a constant sum (equivalent to zero-sum) game. The agents’ actions at induce a deterministic transition to a state with in which the only available actions are precisely the chosen actions at . Each agent’s instantaneous reward at this state is the reward of the other agent at (scaled by ). The MDP then transitions deterministically to state which is a potential game with rewards . After the agents select their actions at , there is an exogenous given probability, , according to which the play transitions to state . Otherwise it remains at .
While the game at state is not a potential game, the combined states in the dotted rectangle of Figure 3 do form a potential game, with potential function equal to the sum of the agent’s payoffs at (the rewards of both agents are equal for every pass of the play through the states in the dotted rectangle). Thus, it is not hard to see that both value functions are of the form
for and , where are appropriate constants that depend only the state and not on the agents. Since the game at is a potential game, with potential function given by a matrix , it is immediate to see that
is a potential function so that satisfies the definition of an MPG.
Convergence of Policy Gradient in Markov Potential Games
The current section presents the proof of convergence of (projected) policy gradient to approximate Nash policies in Markov Potential Games (MPGs). We analyze the cases of both infinite and finite samples using direct and -greedy parameterizations, respectively.
Before we proceed with the formal statements and proofs of this section, we provide the commonly used definition of distribution mismatch coefficient applied to our setting.
Let be any distribution in and let be the set of policies . We call
the distribution mismatch coefficient, where is the discounted state distribution (17).
The first auxiliary Lemma has to do with the projection operator that is used on top of the independent policy gradient, so that the policy vector remains a probability distribution for all agents (see (PGA)). It is not hard to show (due to separability) that the projection operator being applied independently for each agent on is the same as jointly applying projection on . This is the statement of Lemma 4.1.
Let be the policy profile for all agents and let
be a gradient step on the potential function for a step-size . Then, it holds that
The main implication of Lemma 4.1 along with the equality of the derivatives between value functions and the potential function in MPGs, i.e., for all (see property P2 in Proposition B.1), is that running independent (PGA) on each agent’s value function is equivalent to running (PGA) on the potential function . In turn, Lemma 4.2 suggests that as long as policy gradient reaches a point with small gradient along the directions in , it must be the case that is an approximate Nash policy. Together with Lemma 4.1, this will be sufficient to prove convergence of (PGA).
To proceed, we need the formal definition of a stationary point for the potential function which is given below.
A policy profile is called -stationary for w.r.t distribution as long as
In words, the function cannot increase in value by more than along every possible local direction that is feasible (namely is also a policy profile).
Let , and let be an -stationary point of (see Definition 4). Then, it holds that is a -Nash policy.
To prove Lemma 4.2, we will need the Gradient Domination property that has been shown to hold in single-agent MDPs . This is presented in Lemma 4.3.
Let be a MPG with potential function , fix any agent , and let be a policy. Let be an optimal policy for agent in the single agent MDP in which the rest of the agents are fixed to choose Then, for the policy that differs from only in the policy component of agent , it holds that
for any distributions .
Intuitively, Lemma 4.3 implies that there is a best response structure in the agents’ updates that we can exploit to show convergence of (projected) policy gradient to a Nash policy profile. In particular, given a fixed policy profile of all agents other than , the decision of agent is equivalent to the decision of that agent in a single MDP. Thus, the following inequality (which stems directly from the gradient domination property in the single MDP)
implies that any stationary point of (w.r.t the variables of agent’s policy with the rest of the variables being fixed) is an optimal policy for , i.e., a best response given the policies of all other agents.
Lemma 4.3 also suggests that there is an important difference in the Gradient Domination Property between (multi-agent) MPGs and single agent MDPs (cf. Lemma 4.1 in ). Specifically, for MPGs, the value (of each agent) at different Nash policies may not be uniqueThis is in contrast to single-agent MDPs for which the agent has a unique optimal value even though their optimal policy may not necessarily be unique. which implies that the gradient domination property, as stated in Lemma 4.3, will only be enough to guarantee convergence to one of the optimal (stationary) points of (and not necessarily to the absolute maximum of ). Having all these in mind, we can now prove Lemma 4.2.
Fix agent and suppose that deviates to an optimal policy (w.r.t the corresponding single agent MDP). Since is -stationary it holds that (Definition 4)
Thus, with , Lemma 4.3 implies that
Thus, using the definition of the potential function (cf. Definition 2), we obtain that
Since the choice of was arbitrary, we conclude that is an -approximate Nash policy. ∎
The last critical step before we proceed to the formal statement and proof of Theorem 1.1 is that the potential function is smooth. This fact is used in the analysis of both (PGA) and its stochastic counterpart (PSGA).
Let (the maximum number of actions for some agent). Then, for any initial state (and hence for every distribution on states) it holds that
i.e., is -smooth.
Importantly, , i.e., the maximum number of actions for some agent, scales linearly in the number of agents.
Exact gradients case.
We are now ready to prove Theorem 1.1 (restated formally), following standard arguments about (PGA). Recall that the global maximum among all values/utilities of agents must be at most one.
Let be a MPG and consider an arbitrary initial state. Let also , and set the number of iterations to be and the learning rate (step-size) to be . If the agents run independent projected policy gradient (PGA) starting from arbitrarily initialized policies, then there exists a such that is an -approximate Nash policy.
The first step is to show that is a -smooth function, in particular, that is -Lipschitz with as established in Lemma 4.4. Then, a standard ascent lemma for Gradient Ascent (see Lemma D.1 from ) implies that for any -smooth function it holds that where is the next iterate of (PGA). Applied to our setting, this gives
Thus, if the number of iterates, , is , then there must exist a so that . Using a standard approximation property (see Lemma D.2), we then conclude that will be a -stationary point for the potential function . Hence, by Lemma 4.2, it follows that is an -Nash policy and the proof is complete. ∎
Finite sample case.
In the case of finite samples, we analyze (PSGA) on the value of each agent which (as was the case for PGA) can be shown to be the same as applying projected gradient ascent on . The key is to get an estimate of the gradient of (3) at every iterate. Note that now captures the probability for the MDP to terminate after each round (and it does not play the role of a discounted factor since we consider finite length trajectories). Lemma 4.6 argues that the estimator of equation (3) is both unbiased and bounded.
It holds that is an unbiased estimator of for all , that is
Moreover, for all agents , it holds that
It is straightforward from Lemma D.4 and the equality of the partial derivatives between the value functions and the potential, i.e., for all (see property P2 in Proposition B.1). ∎
We now state and prove part (b) of Theorem 1.1.
Let be a MPG and consider an arbitrary initial state. Let , and set the number of iterations to be and the learning rate (step-size) to be . If the agents run projected stochastic policy gradient (PSGA) starting from arbitrarily initialized policies and using -greedy parametrization with , then there exists a such that in expectation, is an -approximate Nash policy.
Let and set (the inverse of the smooth parameter in 4.4). Moreover, we set ( captures the next iterate of the projected (deterministic) gradient ascent).
We follow the analysis of Projected Stochastic Gradient Ascent for non-convex smooth-functions (see , Theorem 2.1) that makes use of the Moreau envelope. Let
(definition of Moreau envelope for our objective ). From the definition of and a standard property of projection we get
Using the definition of Moreau envelope and the fact that is -smooth (Lemma 4.4, after the parametrization, the smoothness parameter does not increase) we conclude that
Adding telescopically (11), dividing by and because w.l.o.g , we get that
Let be the time index that minimizes the above. We show the following inequality (which provides a lower bound on the RHS of (12):
Observe that by -smoothness of we get that is -strong convex and moreover is the minimizer of . Therefore we get that
By taking expectation of terms above, (13) follows. Combining (12) with (13) we conclude that
To get an -Nash policy, we have to bound and choose in the greedy parametrization. This is true because of Lemma D.3 Lemma 4.2. Hence, we need to choose so that
We conclude that can be chosen to be and to be ∎
Using Markov’s inequality, it is immediate to show that the statement of Theorem 4.7 holds with high probability. Namely, if we set the number of iterations to be and the learning rate (step-size) to be , where , then with probability there exists a such that is an -approximate Nash policy. However, this is a weaker than desired statement, since, optimally, the running time should be logarithmic in , (and not polynomial as above) . Proving such a statement though requires bounds on the higher moments of the gradient estimator (to apply martingale arguments and concentration inequalities with exponential bounds) which we could not derive using current techniques (cf. Lemma 2 in ). Such a bound would be possible if we sample multiple trajectories and take the average (per iteration).
We conclude this section by giving a remark on Weighted and Ordinal MPGs (cf. Definition in 1). It is rather straightforward to see that our results carry over for weighted MPGs. The only difference in the running time of (PGA) is to account for the weights (which are just multiplicative constants).
In contrast, the extension to ordinal MPGs is not immediate and the reason is that we cannot prove any bound on the smoothness of in that case (i.e., we cannot generalize Lemma 4.4). Therefore, we cannot have rates of convergence of policy gradient. Nevertheless, it is quite straightforward that (PGA) converges asymptotically to critical points (in bounded domains) for differentiable functions. Therefore as long as is differentiable, it is guaranteed that asymptotically (PGA) will converge to a critical point of . By Lemma 4.2, this point will be a Nash policy.
Experiments: Congestion Games
We next study the performance of the policy gradient algorithm in a general class of MDPs that are congestion games at every state, .
We consider a MDP in which every state is a congestion game (cf. ). In the current experiment, there are agents, facilities (resources or locations) that the agents can select from and states: a safe state and a distancing state. In both states, all agents prefer to be in the same facility with as many other agents as possible (follow the crowd) . In particular, the reward of each agent for being at facility is equal to a predefined positive weight times the number of agents at . The weights satisfy , i.e., facility is the most preferable by all agents. However, if more than agents find themselves in the same facility, then the game transitions to the distancing state. At the distancing state, the reward structure is the same for all agents, but reward of each agent is reduced by a constant amount, , where is a (considerably large) constant. (We also treat the case in which is different for each facility in Appendix E). To return to the safe state, the agents need to achieve maximum distribution over the facilities, i.e., no more than agents may be in the same facility. We consider deterministic transitions, however, the results are quantitatively equivalent also when these transitions occur with some probability (see Appendix E). The MDP is illustrated in the upper left panel of Figure 4.
Paremeters:
We perform episodic updates with steps. At each iteration, we estimate the Q-functions, the value function, the discounted visitation distributions and, hence, the policy gradients using the average of mini-batches of size . We use . For the presented plots, we use a common learning rate (upper panels) or randomly generated learning rates (different for each agent) in (lower panels) in Figure 4. Note that these learning rates are (several orders of magnitude) larger than the theoretical guarantee, , of Theorem 4.5. Experiments (not presented here) with even larger learning rates (e.g., ) did not lead (consistently) to convergence.
Results:
The lower left panel of Figure 4 shows that the agents learn the expected Nash profile in both states in all runs (this is common for both the fixed and the random learning rates). At the safe state, the agents distribute themselves equally among the two most preferable facilities (C and D). This leads to a maximum utility and avoids a transition to the distancing (bad) state. At the distancing state, the agents learn the unique distribution (2 agents per facility) that leads them back to the safe state. Importantly, this (Nash) policy profile to which policy gradient converges to is deterministic in line with Theorem 4.5. The panels in the middle and right columns depict the L1-accuracy in the policy space at each iteration which is defined as the average distance between the current policy and the final policy of all agents, i.e., The results are qualitatively equivalent in both cases (common and non-common learning rates). However, due to the larger step-sizes used by some agents, the algorithm becomes more responsive and exhibits faster convergence in the non-common case.
Further Discussion and Conclusions
In this paper, we have presented a number of positive results (both structural and algorithmic) about the performance of independent policy gradient ascent in Markov potential games. Specifically, deterministic Nash policies always exist and independent policy gradient is guaranteed to converge (polynomially fast in the approximation error) to a Nash policy profile even in the case of finite samples. Given these positive results, a number of interesting open questions emerge.
Price of (Markov) Anarchy. Price of Anarchy (PoA) is a classic notion in normal form games that captures the inefficiency due to the lack of a central authority that would coordinate all agents to implement the social optimum outcome. Formally, it is defined as the ratio of the social cost of the worst Nash equilibrium divided by the cost of the social optimum. PoA has been studied extensively in many classes of games including several classes of potential games for which tight PoA bounds exist (e.g. congestion games ). It would be interesting to explore to what extent this type of analysis can be generalized to Markov Potential Games as well as more general classes of Markov Games.
Stability of Deterministic Policies. When it comes to online learning in normal form potential games, it is sometimes possible to prove that the dynamics do not converge to an arbitrary Nash equilibrium, but, in fact, that most initial conditions converge to a deterministic (sometimes referred to also as pure) Nash equilibrium . To produce such equilibrium selection results, standard Lyapunov arguments do not suffice and one needs to apply more advanced techniques such as the Center-Stable-Manifold theorem which would be a fascinating direction for future work in MPGs.
Other Algorithmic Approaches: Softmax Parametrization & Natural Policy Gradient. In , the authors show asymptotic convergence to the global optimum to single-agent MDP in the tabular setting with exact gradients for the softmax policy parameterization. Moreover, polynomial convergence rate is shown when additional KL-based entropy regularizer is used, as well as dimension-free convergence to optimum when Natural Policy Gradient is applied. Extending such algorithmic techniques to the case of multi-agent MPGs is a natural direction for future work.
Global Convergence in other Multi-Agent Markov Games. Recently, there has been intense interest in understanding convergence to Nash policies for different classes of learning dynamics in Markov zero-sum games . Our approach moves in orthogonal direction focusing on MPGs and establishing strong convergence results in these games. A natural open question is whether and under what conditions can we prove strong convergence guarantees in more general classes of Markov games, possibly by combining tools and techniques from both lines of work.
Regularities beyond Equilibration in Multi-Agent Markov Games. Given the complexities of such multi-agent settings, it is highly unlikely to expect practical algorithms which can always guarantee convergence to equilibrium. This is already the case even for the more restricted setting of normal-form games . Nevertheless, strong guarantees can be shown via, e.g., existence of cyclic/recurrent orbits, invariant functions or strong social welfare guarantees . Whether such results can be extended to Multi-Agent Markov Games is a stimulating direction for future work.
Acknowledgements
This project is supported in part by NRF2019-NRF-ANR095 ALIAS grant, grant PIE-SGP-AI-2018-01, NRF 2018 Fellowship NRF-NRFF2018-07, AME Programmatic Fund (Grant No. A20H6b0151) from the Agency for Science, Technology and Research (A*STAR) and the National Research Foundation, Singapore under its AI Singapore Program (AISG Award No: AISG2-RP-2020-016).
References
Appendix A Additional Notation and Definitions: Section 2
We first provide some additional notation and definitions that will be used in the proofs.
Discounted State Distribution.
It will be useful to define the discounted state visitation distribution for that is induced by a (joint) policy as
Appendix B Omitted Materials: Section 3
Let be a Markov Potential Game (MPG) with potential , for . Then, for the value function of each agent , the following hold
Equality of Derivatives: the partial derivatives of agent ’s value function coincide with the partial derivatives of the potential that correspond to agent ’s parameters, i.e.,
To obtain P1, consider any 3 arbitrary policies for agent , notated by . Then, by the definition of MPGs, we have that
for every starting state . This implies that we can write as both
Thus, we have that for any arbitrary pair of policies and for agent , implying that agent ’s policy has no impact on these terms. Accordingly, we can express them as
where is a function that does not depend on the policy of agent . Thus, we can express the utility function of any agent in a MPG as
as claimed. To obtain P2, we use P1 for a vector parameterizing , and obtain that
for any coordinate with of , from which we can see that our claim is true. ∎
Note that P1 serves as a characterization of MPGs. Namely, a multi-agent MDP is a MPG if and only if the value function of each agent can be decomposed in a term that is common for all players (potential function) and in a term that may be different for each agent but which depends only on the actions of all agents other than . This property carries over from normal form (single state) potential games. Also note that both properties, P1 and P2, hold for any (differentiable for P2) policy parameterization and not only for the direct one that we use here.
Let be the potential function of . Since the space is compact and is continuous, has a global maximum . Let denote a global maximizer, i.e., a joint policy profile at which is attained. By the Definitions of MPGs and Nash policies, this implies, in particular, that is a Nash policy, since
The proof is constructive and proceeds by finding the potential function, in both cases, C1-C2. Since the individual rewards of the agents at each state are captured by a potential function , then for the reward, of each agent at the action profile , it holds that
If the transitions do not depend on the action of the players, we have that , where is an exogenously given distribution function (state-wise). In this case, we have that
Under the assumptions of condition C2, we will show that again
is a potential function for and that the same decomposition as in condition C1 of the value function of agent in a common and a dummy term applies. To see this, let be two policies of agent and let where is the fixed policy of all agents other than . Then, using (B), we have that
Using the intermediate value theorem, there exists a policy which is a convex combination of such that
Since correspond to probability distributions at every state , their difference is equal to (state-wise). In turn, the displayed condition in C2 implies that
which is enough to ensure that the dot product in the previous equation is equal to and the claim follows.
Summing up, in both cases, C1-C2, is an MPG as claimed. ∎
Note that the proof of the (trivial) case in which the instantaneous rewards of all agents are equal at each state (cf. Remark 2) is similar. In this case, it is immediate to see that the instantaneous rewards are precisely given by the potential function at that state, i.e., it holds that for all and all . In this case, it holds that for all and all and hence,
is a potential function for , and the dummy terms are all equal to , i.e., .
At each state, , the agents’ payoffs, , form a potential game (at that state), and are given as follows
In this MDP, agents need only to select an action at state . Thus, we will denote a policy, , of agent by where is the probability with which agent selects action at state . Similarly, we will denote a policy, , of agent by where is the probability with which agent selects action at state . Moreover, we will slightly abuse notation and write
We also assume that the horizon is infinite and there is a discount factor . Accordingly, we can calculate the value functions of agents starting from state as follows,
Next, we use the Performance Difference Lemma (Lemma 3.2 by ) to determine the difference in the value between two different policies. We will do this for agent (the calculation is similar for agent : we use here for agent 1 and 2 for agent ). For a policy , we have at state that
At state , there is only one available action for each agent which yields a payoff of . Thus,
Moreover, concerning the discounted visitation distribution, we have that
and . Thus, using all the above, we have that
which shows that our initial calculations conform with the outcome specified by the Performance Difference Lemma.
Finally, a direct calculation shows that for is a valid potential function for which the MDP is an ordinal MPG.
At state , we consider the game with action sets and (instantaneous) payoffs
where denotes the action of agent and the action of agent (agent selects rows and agent selects columns in both matrices). This is a constant sum game (equivalent to zero-sum) and hence, it is not an (ordinal) potential game. Apart from the instantaneous rewards, agents’ actions at induce a deterministic transition to a state in which the only available actions to the agents are precisely the actions that they chose at state and their instantaneous rewards at this state are the rewards of the other agent at . In particular, there are four possible transitions to states with , with action sets and instantaneous rewards given by
for agents 1 and 2, respectively. Note that the visitation probability of this states is equal to the visitation probability of state . After visiting one of these states, the MDP transitions to state which is a potential game, with potential function given by
As mentioned above, the game in state does not admit a potential function. However, the joined rewards of agents and which result from selecting an action profile at and then traversing both and the ensuing (part included in the dotted rectangle in Figure 3), do admit a potential function. The potential function in this case is the sum of agents’ rewards and is given by
Let denote a policy of agent . Here , where is the probability with which agent chooses action at state . Similarly, where is the probability with which agent chooses action at state . At states , agents only have one action to choose from, so this choice is eliminated from their policy representation. Similarly, we represent a policy of agent by with . Let also
In the general case, , i.e., the transition probability from to , may depend on the actions of the agents or it may be completely exogenous (i.e., constant with respect to agents’ actions). If we write
to denote the probability of transitioning from state to state given that the agents chose actions at state , then we can write as
Using this notation, we can now proceed to compute the value function of each state of the MDP in Figure 3. Since the value of states is equal to a constant reward plus the value of state (discounted by ), it suffices to calculate the value for states and . We have that
This is a system of equations in the unknown quantities, and . Solving for these two quantities, yields the unique solution
In the case that is a constant with respect to , then both value functions are of the form
where are appropriate constants that depend only the state and on agents . Since the game at is a potential game, with potential function given by a matrix , it is immediate to infer that
However, if depends on the actual policies of agents and , cf. equation (19), then it is not immediate to determine a potential (or even to decide whether a (exact) potential exists or not).
Several elements of Example 3 have been selected in the sake of simplicity and are not necessary for the main takeaway, i.e., that there are MDP that are not potential at some states but which are MPGs. First, the transitions from to the states need not be deterministic. To see this, let and assume that if the agents select actions is , then the process transitions with probability to a state with rewards and with probability to a state with rewards . The rest remains the same. Accordingly, the expected reward for agent after has been selected in is the same as in the current format.
Second, the construction with states and is not the only one that leads to such an example. Another very common instance occurs in the case of aliasing between and states , i.e., when the agents cannot tell these states apart. The intuition which carries over from the currently presented example is that the roles of the agents are essentially reversed between the two states but the agents do not know (from the observable features) in which state they are. Thus, any valid policy, selects the same action in both states leading to the same situation as in the presented example.
Finally, if the horizon is finite, then the instantaneous rewards in states still work if we eliminate the scaling factor (here ). Thus, the construction works in both episodic and continuing settings.
Appendix C Omitted Materials: Section 4
To prove Lemma 4.3, we will use a multi-agent version of the Performance Difference Lemma (cf. for a single agent and for two agents).
Consider an n-agent MDP and fix an agent . Then, for any policies and any distribution , it holds that
where denotes the action profile of all agents other than that is drawn from the product distribution induced by their policies .
For any initial state and joint policies , it holds that
Taking expectation over the states with respect to the distribution yields the result. ∎
Fix an agent and let . By the definition of MPGs (cf. Definition 2), it holds that
Thus, using the multi-agent version of the Performance Difference Lemma (cf. Lemma C.1), we have for any distribution that
Thus, for any and any state , it holds that
since does not depend on . Substituting back in the last inequality of the previous calculations, we obtain that
where we used the policy gradient theorem () under the assumption of direct policy parameterization (cf. equation (2)). We can further upper bound the last expression by using that which follows immediately from the definition of the discounted visitation distribution for any initial state distribution . Finally, property P2 of Proposition B.1, implies that (making crucial use of the MPG structure). Putting these together, we have that
It suffices to show that the maximum eigenvalue in absolute value of the Hessian of is at most , i.e., that
We first prove the following intermediate claim.
Consider the symmetric block matrix with matrices so that . Then, it holds that , i.e., if all block submatrices have spectral norm at most , then has spectral norm at most .
We will prove the claim by induction on . For we need to show that
if Define matrix to be
where is the identity matrix (of appropriate size). If we show that is positive semi-definite, then it follows that has only non-negative eigenvalues, which, in turn, implies that the spectral norm of is at most . To see this, set
is positive semi-definite as a block diagonal matrix with diagonal blocks positive semi-definite matrices. Moreover, by Schur complement we get that is positive semi-definite as long as is positive semi-definite and is positive semidefinite. By assumption, we have that
which implies that has non-negative eigenvalues. Thus, is positive semi-definite. We conclude that is positive semi-definite (sum of positive semi-definite matrices is positive semi-definite) and the claim follows.
For the induction step, suppose that the claim holds for an . To establish that it also holds for , we need to show that
as long as for all . Let . To show that is positive semi-definite consider
By induction, it follows that is positive semi-definite. We need to show that the same holds for . By Schur complement we obain that is positive semi-definite if and only if is positive semi-definite. It follows that
Hence is positive semi-definite and the induction is complete. ∎
Returning to the statement of Lemma 4.4, we will show that
for all with chosen to be . Assuming we have shown (21), we conclude from Claim C.2 that
and hence will be -smooth (the proof of Lemma 4.4 will follow).
To prove (21), we follow the same proof steps as in the proof of , Lemma D.3. We will need to prove an upper bound on the largest eigenvalue (in absolute value) of the matrix
along the direction where only agent is allowed to change policy.
Fix policy , agents , scalars , state and be unit vectors such that and . Moreover, let and It suffices to show that
It holds that (note that since it is a distribution), hence taking the second derivative we have
For the remaining of the first part of the proof, we shall show
To bound the derivative of the -function, observe that , where is the expected reward of agent (w.r.t the randomness of the remaining agents) if he chooses action at state and is state-action transition matrix of w.r.t the joint distribution of all agents but , i.e., and the environment.
It is clear that (linear with respect to because of direct parametrization) and moreover Using the fact that we get
Since is arbitrary, the first part of (22) is proved.
For the second part, we focus on which is equal to
We consider the derivative of (26) and we get
The first term of the sum in absolute value is at most (assuming rewards lie in $\frac{\gamma\sqrt{|\mathcal{A}_{i}|}\sqrt{|\mathcal{A}_{i}|}}{(1-\gamma)^{2}}\frac{\gamma\sqrt{|\mathcal{A}_{j}|}\sqrt{|\mathcal{A}_{i}|}}{(1-\gamma)^{2}}.\frac{d^{2}Q^{i}_{s_{0}}(\pi,\mathbf{a})}{dtds}P(t,s)r(s_{0},a,b)ii,jiajbs_{0}.$
Appendix D Auxiliary Lemmas
Recall that denotes the projection onto some set .
Let be a -smooth functionDifferentiable with to be -Lipschitz. with convex domain . Let , and . Then the following holds true:
Let be a -smooth function in . Define the gradient mapping
and the update rule for the projected gradient is . If , then
Let be the potential function (which is -smooth) and assume uses -greedy parametrization. Define the gradient mapping
and the update rule for the projected gradient is . If , then
It is a direct application of Lemma D.2 and the fact that is Lipschitz with parameter (this is Proposition 3 in page 23 of ). ∎
It holds that is unbiased estimator of for all , that is
Moreover for all agents we get that (this is what the authors actually prove)
Appendix E Additional Experiments
In this part, we provide a systematic analysis of variations of the experimental setting in Section 5.
As mentioned in Remark 5, we know that policy gradient converges also in other cooperative settings which may fail to be exact MPGs. To study this case, we modify our experiment from Section 5. The setting remains mostly the same, except now in the distancing state the rewards are reduced by a differing (yet still sufficiently large) amount, , for each facility .
Despite the introduced asymmetry, it is still natural that cooperation is desirable in this setting. In particular, if the ’s for all are taken to be greater than the of the MDP from Section 5, then the agents can be said to have even “stronger” incentive to cooperate. The results of running independent policy gradient on this variant are shown in Figure 5. Independent policy gradient requires more iterations to converge compared to the symmetric setting, but still arrives at the same Nash policy.
Coordination with more agents and facilities
We next test the performance of the independent policy gradient algorithm in a larger setting with agents and facilities, with (i.e., is the most preferable by all agents). We use a learning rate for all agents (which is again much larger than the theoretical guarantee of Theorem 4.5). All runs lead to convergence to an (optimal) Nash policy as shown in the middle and rightmost panels. The leftmost panel shows the distribution of the agents among facilities in both states, which is the same (and the optimal one) in all Nash policies that are reached by the algorithm. The results are shown in Figure 6.
Coordination with random transitions
Next, we study the effect of adding randomness to the transitions on the performance of the individual policy gradient algorithm. In this case, we experiment with the same setting as in Section 5 (i.e., agents and facilities that each agent can choose from), but use the following stochastic transition rule instead: in addition to the existing transition rules, the sequence of play may transition from the safe to the distancing state with probability regardless of the distribution of the agents and may remain at the distancing state with probability again regardless of the distribution of the agents there.
Two sets of results are presented in Figure 7. In the first (upper panels), we use and in the second . In both cases, we use a learning rate (several orders of magnitude higher than what is required by Theorem 4.7). Independent policy gradient converges in both cases to deterministic Nash policies despite the randomness in the transitions. However, for higher levels of randomness (lower panels), the algorithm remains at an -Nash policy for a high number of iterations. This is in line with the theoretical predictions of Theorem 4.7.