A PRINCIPLED PERMUTATION INVARIANT APPROACH
Year: 2021

Abstract:
Multi-agent reinforcement learning (MARL) becomes more challenging in the presence of more agents, as the capacity of the joint state and action spaces grows exponentially in the number of agents. To address such a challenge of scale, we identify a class of cooperative MARL problems with permutation invariance, and formulate it as mean-field Markov decision processes (MDP). To exploit the permutation invariance therein, we propose the mean-field proximal policy optimization (MF-PPO) algorithm, at the core of which is a permutationinvariant actor-critic neural architecture. We prove that MF-PPO attains the globally optimal policy at a sublinear rate of convergence. Moreover, its sample complexity is independent of the number of agents. We validate the theoretical advantages of MF-PPO with numerical experiments in the multi-agent particle environment (MPE). In particular, we show that the inductive bias introduced by the permutationinvariant neural architecture enables MF-PPO to outperform existing competitors with a smaller number of model parameters, which is the key to its generalization performance.

heading: 1 INTRODUCTION
text: Multi-Agent Reinforcement Learning (Littman, 1994; Zhang et al., 2019) generalizes Reinforcement Learning (Sutton and Barto, 2018) to address the sequential decision-making problem of multiple agents maximizing their individual long term rewards while interacting with each other in a common environment. With breakthroughs in deep learning, MARL algorithms equipped with deep neural networks have seen significant empirical successes in various domains, including simulated autonomous driving (Shalev-Shwartz et al., 2016), multi-agent robotic control (Matarić, 1997; Kober et al., 2013), and E-sports (Vinyals et al., 2019).
Despite tremendous successes, MARL is notoriously hard to scale to the many-agent setting, as the size of the state-action space grows exponentially with respect to the number of agents. This phenomenon is recently described as the curse of many agents (Menda et al., 2018). To tackle this challenge, we focus on cooperative MARL, where agents work together to maximize their team reward (Panait and Luke, 2005). We identify and exploit a key property of cooperative MARL with homogeneous agents, namely the invariance with respect to the permutation of agents. Such permutation invariance can be found in many real-world scenarios with homogeneous agents, such as distributed control of multiple autonomous vehicles and team sports (Cao et al., 2013; Kalyanakrishnan et al., 2006), but also in scenarios with heterogeneous agent groups, where invariance holds within each group (Liu et al., 2019b). More importantly, we find that permutation invariance has significant practical implications, as the optimal value functions remain invariant when permuting the joint state-action pairs. Such an observation strongly advocates a permutation invariant design for learning, which helps reduce the effective search space of the policy/value functions from exponential dependence on the number of agents to polynomial dependence.
Several empirical methods have been proposed to incorporate permutation invariance into solving MARL problems. Liu et al. (2019b) implement a permutation invariant critic based on Graph Convolutional Network (GCN) (Kipf and Welling, 2017). Sunehag et al. (2017) propose value decomposition, which together with parameter sharing, leads to a joint critic network that is permutation invariant over agents. While these methods are based on heuristics, we are the first to provide theoretical principles for introducing permutation invariance as an inductive bias for learning value functions and policies in homogeneous systems. In addition, we adopt the DeepSet (Zaheer et al., 2017)
architecture, which is well suited for handling homogeneity of agents, with much simpler operations to induce permutation invariance and greater parameter efficiency.
To scale MARL algorithms in the presence of a large number, even infinitely many, agents, mean-field approximation has been explored to directly model the population behavior of the agents. Mean-field game considers large populations of rational agents that play a noncooperative game. Yang et al. (2017) consider a mean-field game with deterministic linear state transitions, and show that it can be reformulated as a mean-field MDP, where the mean-field state lies in finite-dimensional probability simplex. Yang et al. (2018) take a mean-field approximation over actions, such that the interaction for any given agent and the population is approximated by the interaction between the agent’s action and the averaged actions of its neighboring agents. However, the motivation for averaging over local actions remains unclear, and it generally requires a sparse graph over agents. In practice, properly identifying such structure also demands extensive prior knowledge. Mean-field control instead considers a central controller who aims to compute strategy to optimize the average payoff across the population. Carmona et al. (2019) motivate a mean-field MDP from the perspective of mean-field control. The mean-field state therein lies in a probability simplex and is thus continuous in nature. To enable the ensuing Q-learning algorithm, discretization of the joint state-action space is necessary. In addition, the dynamic programming principles of such mean-field control problem has been studied in (Gu et al., 2019). Gu et al. (2020) also propose a Q-learning type algorithm, where the state-action space is first discretized into an epsilon-net. The kernel regression operator is used to construct an estimate of the unknown Q-function from samples. Gu et al. (2021) propose a localized training, decentralized execution framework by locally grouping homogenous agents using their states. Wang et al. (2020) motivate a mean-field MDP from permutation invariance, but assume a central controller coordinating the actions of all the agents, and hence is restricted to handling the curse of many agents from the exponential blowup of the joint state space. Our formulation of mean-field approximation allows agents to make their own local actions without resorting to a centralized controller.
We propose a mean-field Markov decision process motivated from the permutation invariance structure of cooperative MARL, which can be viewed as a natural limit of finite-agent MDP by taking the number of agents to infinity. Such a mean-field MDP generalizes traditional MDP, with each state representing a distribution over the state space of a single agent. The mean-field MDP provides us a tractable formulation to model MDP with many agents, including an infinite number of agents. We further propose the Mean-Field Proximal Policy Optimization (MF-PPO) algorithm, at the core of which is a pair of permutation invariant actor and critic neural networks. These networks are implemented based on DeepSet (Zaheer et al., 2017), which uses convolutional type operations to induce permutation invariance over the set of inputs. We show that with sufficiently many agents, MF-PPO converges to the optimal policy of the mean-field MDP with a sublinear sample complexity independent of the number of agents. To support our theory, we conduct numerical experiments on the benchmark multi-agent particle environment (MPE) and show that our proposed method requires a smaller number of model parameters and attains better performance than multiple baselines. Notations. W denote P(X) as the set of distribution on set X . δx denotes the Dirac measure supported at x. For s = (s1, . . . , sN ), we use s
i.i.d.∼ p to denote that each si is independently sampled from distribution p. For f : X → R and a distribution π ∈ P(X), we write 〈f, π〉 = Ea∼πf(a). We write [m] in short for {1, . . . ,m}, and ∆d for the standard probability simplex in Rd.

heading: 2 PROBLEM SETUP
text: We focus on studying multi-agent systems with cooperative, homogeneous agents, where the agents within the system are of similar nature and hence cannot be distinguished from each other. Specifically, we consider a discrete time control problem with N agents, formulated as a Markov decision process (SN ,AN ,P, r). We define the joint state space SN to be the Cartesian product of the finite state space S for each agent, and similarly define the joint action space AN . The homogeneous nature of the system is reflected in the transition kernel P and the shared reward r, which satisfies: r(st,at) = r (κ(st), κ(at)) , P(st+1|st,at) = P (κ(st+1)|κ(st), κ(at)) (2.1) for all (st,at) ∈ SN × AN and the permutation mapping κ(·) ∈ SN , where SN is the set of all one-to-one mapping from [N ] to itself. In other words, it is the configuration, rather than individual identities, that affects the team reward, and the transition to the next configuration solely depends on the current configuration. See Figure 1 for detailed illustration. Such permutation invariance finds applications in many real-world scenarios, including distributed control of autonomous vehicles, and social economic systems (Zheng et al., 2020; Cao et al., 2013; Kalyanakrishnan et al., 2006).
Our goal is to find the optimal policy ν, where ν(s) ∈ ∆|AN | for all s ∈ SN , and maximize the expected discounted reward V ν(s) = (1 − γ)E {∑∞t=0 γtr(st,at)|s0 =s,at∼ν(st),∀t≥0} . Our first result shows that learning with permutation invariance advocates invariant network design. Proposition 2.1. For cooperative MARL satisfying (2.1), there exists an optimal policy ν∗ that is permutation invariant, i.e., ν∗(s,a) = ν∗ (κ(s), κ(a)) for any permutation mapping κ(·). In addition, for any permutation invariant policy ν, the value function V (·) and the state-action value function Q(·) is also permutation invariant, i.e., V ν(s) = V ν (κ(s)) , Qν(s,a) = Qν (κ(s), κ(a)) , where Qν(s,a) = Es′ {r(s,a) + γV ν(s′)}.
Proposition 2.1 has an important implication for architecture design, as it states that it suffices to search within the permutation invariant policy and value function classes. To the best of our knowledge, this is the first theoretical justification of permutation invariant network design for learning with homogeneous agents.
We focus on the factorized policy class with a parameter sharing scheme, where each agent makes its own decision without consolidating with others. Specifically, the joint policy ν can be factorized as ν(a|s) =∏N i=1 µ(ai|oi), where µ(·) denotes the shared local mapping and oi denotes the local observation. Such a policy class is widely adopted in the celebrated centralized training – decentralized execution paradigm (Lowe et al., 2017), due to its light overhead in the deployment phase and favorable performances. However, directly learning such factorized policy remains challenging, as each agent needs to estimate its state-action value function, denoted as Qν(s,a). The search space during learning is (|S| × |A|)N , scaling exponentially with respect to the number of agents. The large search space poses as a significant roadblock for efficient learning, and is coined as the curse of many agents.
To address the curse of many agents, we exploit the homogeneity of the system and take the mean-field approximation. We begin by taking the perspective of agent i, which is arbitrarily chosen from the N agents. We denote its state as s and the states of the rest of the agents by sr. One can verify that when permuting the state of all the other agents, the value function remains unchanged; additionally, we can further characterize the value function as a function of the local state and the empirical state distribution over the rest of agents. Proposition 2.2. For any permutation mapping κ(·), the value function satisfies V ν(s, sr) = V ν(s, κ(sr)). Additionally, there exists gν such that: V ν(s, sr) = gν(s, p̂sr ), where p̂sr = 1 N ∑ s∈sr δs is the empirical distribution over the states of rest of the agents sr.
For a system with a large number of agents (e.g., financial markets, social networks), the empirical state distribution can be seen as the concrete realization of the underlying population distribution of the agents. Motivated from this observation and Proposition 2.2, we formulate the following mean-field MDP that can be seen as the limit of finite-agent MDP in the presence of infinitely many homogeneous agents. Definition 2.1 (mean-field MDP). The mean-field MDP consists of elements of the following: state (s,dS) ∈ S × P(S); action a ∈ A ⊆ AS ; reward r(s,dS , a); transition kernel P(s′,d′S |s,dS , a).
The mean-field MDP has an intimate connection with our previously discussed finite-agent MDP. Since the the agents are homogeneous, the system is the same from any agent’s perspective. We choose any agent (referred to as representative agent), the state information of such an agent includes the local state s, and the mean-field state dS . With state information, the agent selects a meta action a ∈ A ∈ AS , and uses such a meta action to make local decision a = a(s) ∈ A. We remark that such a modeling of decision process allows the agent to make decision on both its local information (local state s) and the global information (mean-field state dS ). From homogeneity we assume all the rest of the agents uses the same meta action a to make their local actions. Note that different agents can still make different local actions due to their different local states, i.e., a(z) 6= a(z′) in general for
z 6= z′ ∈ S . The joint state at the next timestep (s′, d′S) naturally depends on the current global state (s, dS) and the meta action a (since all the other agents use a to generate their local actions), and is specified by the transition kernel P (s′, d′S |s, dS , a). In addition, the representative agents receives a reward r(s, dS , a), which depends on the local state and mean-field sate, and the meta action a.
Our goal is to learn efficiently a policy π, where π(·|s, dS) ∈ ∆|A| for all (s, dS) ∈ S × P(S), for maximized expected discounted reward. To facilitate discussions, we define the value function V π(s,dS) = (1−γ)E { ∑∞ t=0 γ
tr(st,dS,t, at)} ,where (s0,dS,0) = (s,dS), at ∼ π(st,dS,t),∀t ≥ 0; and Q-function Qπ(s,dS , a) = (1 − γ)E { ∑∞ t=0 γ
tr(st,dS,t, at)} , where (s0,dS,0) = (s,dS), a0 = a, at ∼ π(st,dS,t). The optimal policy is denoted by π∗ ∈ argmaxV π(s,dS). Despite the intuitive analogy to finite-agent MDP, solving the mean-field MDP poses some unique challenges. In addition to having an unknown transition kernel and reward, the mean-field MDP takes a distribution as its state, which we do not have complete information of during training. In the following section, we propose our mean-field Neural Proximal Policy Optimization (MF-PPO) algorithm that, with a careful architecture design, can solve such mean-field MDP in a model-free fashion efficiently.

heading: 3 MEAN-FIELD PROXIMAL POLICY OPTIMIZATION
text: Our algorithm falls into the category of the actor-critic learning paradigm, consisting of alternating iterations of policy evaluation and improvement. The unique features of MF-PPO lie in the facts: (1) it exploits permutation invariance of the system, reducing search space of the actor/critic networks drastically and enables much more efficient learning; (2) it can handle a varying number of agents. For simplicity of exposition, we consider a fixed number of agents here.
Throughout the rest of the section, we assume that for any joint state (s,dS) ∈ S × P(S), the agent has access to N i.i.d. samples {si}Ni=1 from dS . We denote concatenation of such samples as s ∈ SN and write s i.i.d.∼ dS . MF-PPO maintains a pair of actor (denoted by FA) and critic networks (denoted by FQ), and uses the actor network to induce an energy-based policy π(a|s,dS). Specifically, given state (s,dS), the actor network induces a distribution on set A according to π(a|s,dS) ∝ exp { τ−1FA(s,dS , a) } , where τ denotes the temperature parameter. We use π ∝
exp { FA } to denote the dependency of the policy on the energy function.
• Permutation-invariant Actor and Critic. We adopt a permutation invariant design of the actor and critic network. Specifically, given individual state s ∈ S and sampled states s ∈ SN , the actor (resp. critic) network FA (resp. FQ) satisfies FA(s, s, a) = FA(s, κ(s), a) for any permutation mapping κ. With permutation invariance, the search space of the actor/critic network polynomially depends on the number of agents N . Proposition 3.1. The search space of a permutation invariance actor (critic) network is at the order of (∑min{|S|,N}
k=1
( N−1 k−1 )(|S| k )) |S||A|; Additionally, if |S| < N , then the search space depends on N
at the order of N |S|. Compared to architectures without permutation invariance, whose search space depends on N at the order of (|S||A|)N , we can clearly see the search space of MF-PPO is exponentially smaller.
Motivated by the characterization of the permutation invariant set function in Zaheer et al. (2017), the actor/critic network in MF-PPO takes the form of Deep Sets architecture, i.e., FA(s, s, a) = h (∑
s′∈s φ(s, s ′, a)/N
) . Both networks first aggregate
local information by averaging over the output of a shared sub-network among agents, before feeding the aggregated information into a subsequent network h(·). See Figure 2 for detailed illustration. Effectively, by the average pooling layer and the preceding parameter
sharing scheme, the network can keep its output unchanged when permuting the ordering of agents. Compared to a Graph Convolutional Neural Network (Kipf and Welling, 2017), which uses two sets of weights for the linear transformation layer, one for the the agent itself and one for the aggregation state coming from the rest of the agents. The averaging operation is well suited for homogeneous agents and more parameter-efficient. It also naturally allows us to handle varying number of agents during training and evaluation, which is not readily achievable by GCN network.
Naturally, the actor network when given the joint state-action pair (s,dS , a) is given by FA(s,dS , a) = h (Es′∼dSφ(s, s′, a)) . We assume FA is parameterized by a neural network with parameters α ∈ RD, which is to be learned during training. We let the function class of all possible actor networks be denoted by FA. This same architecture design applies to the critic network, with learnable parameters denoted by θ ∈ RD and the function class denoted by FQ. MF-PPO then consists of successive iterations of policy evaluation and policy improvement described below.
• Policy Evaluation. At the k-th iteration of MF-PPO, we first update the critic network FQ by minimizing the mean squared Bellman error while holding the actor network FA,k fixed. We denote the policy induced by the actor network as πk, the stationary state distribution of policy πk as νk, and the stationary state-action distribution as σk(s, dS , a) := νk(s, dS)πk(a|s, dS). Thus, we follow the update
θk = argminθ∈B(θ0,Rθ) Eσk { FQθ (s,dS , a)− [ T πkFQθ ] (s,dS , a) }2 , (3.1)
where B(θ0, Rθ) denotes the Euclidean ball with radius Rθ centered at the initialized parameter θ0, and the Bellman evaluation operator T π is given by T πFQθ (s,dS , a) = E { (1− γ)r(s,dS , a) + γFQθ (s′,d′S , a′) }
, where (s′,d′S) ∼ P(·|s,dS , a), a′ ∼ π(·|s′,d′S). We solve (3.1) by T-step temporal-difference (TD) update and output θk = θ(T ). At the t-th iteration of the TD update,
θ(t+ 1/2) = θ(t)− η { FQθ(t)(s, s, a)− (1− γ)r(s,dS , a)− γF Q θ(t)(s ′, s′, a′) } ∇θFQθ(t)(s, s, a),
θ(t+ 1) = ΠB(θ0,Rθ) (θ(t+ 1/2)) ,
where we sample (s,dS , a) ∼ σk, (s′,d′S) ∼ P(·|s,dS , a), a′ ∼ πk(·|s′,d′S), s i.i.d.∼ dS , s′ i.i.d.∼ d′S . We use ΠX(·) to denote the orthogonal projection onto set X, and η to denote the step size. Note that here for the simplicity of analyses, we sample the state-action pair (s,dS , a) independently from the stationary distribution. We remark that trajectory samples can also be used, which essentially requires bounding the bias of the gradient at each iteration due to the dependencies between trajectory samples, and we can readily apply the fast-mixing property of Markov chains to control such a bias (Bhandari et al., 2018). The details of policy evaluation are summarized in Algorithm 2, Appendix A.
• Policy Improvement. Following the policy evaluation step, MF-PPO updates its policy by updating the policy network FA, which is the energy function associated with the policy. We update the policy network by
πk+1 = argmax π∝exp{FA,k+1}, FA,k+1∈FA
Eνk {〈 FQθk(s,dS , ·), π(·|s,dS) 〉 − υkKL ( π(·|s,dS) ∥∥πk(·|s,dS) ) } .
The update rule intuitively reads as increasing the probability for choosing action a if it yields a higher value for critic network FQ(s,dS , a), which can be viewed as a softened version of policy iteration (Bertsekas, 2011). Additionally, by controlling the proximity parameter υk, we can control the softness of the update, with υ → 0 yielding the vanilla policy iteration. Moreover, without constraint of FA,k+1 ∈ FA, such an update would have a nice closed form expression, and πk+1 itself is another energy-based policy. Proposition 3.2. Let πk ∝ exp ( τ−1k F A αk ) denote the energy-based policy, then the update
πk+1 = argmaxπ Eνk {〈 FQθk(s,dS , ·), π(·|s,dS) 〉 − υkKL ( π(·|s,dS) ∥∥πk(·|s,dS) ) }
yields πk+1 ∝ exp{υ−1k F Q θk + τ−1k F A αk }.
To take into account that the representable function of actor network resides in FA, we update the policy by projecting the energy function of πk+1 back to FA. Specifically, by denoting πk+1 ∝ exp{τ−1k+1FAαk+1}, we recover the next actor network FAαk+1 (i.e., energy) by performing the following regression task
α∗k+1 = argmin α∈B(Rα,α0)
Eσ̃k { FAα (s,dS , a)− τk+1 [ υ−1k F Q θk (s,dS , a) + τ −1 k F A αk (s,dS , a) ] }2 , (3.2)
where σ̃k = νkπ0. We approximately solve (3.2) via T-step stochastic gradient descent (SGD), and output αk+1 = α(T ) ≈ α∗k+1. At the t-th iteration of SGD, α(t+ 1/2) = α(t)− η∇αFAα(t)(s, s, a) { FAα(t)(s, s, a)− τk+1 ( υ−1k F Q θk (s, s, a) + τ−1k F A αk (s, s, a) )} ,
α(t+ 1) = ΠB(Rα,α0) (α(t+ 1/2)) ,
where we sample (s,dS , a) ∼ σ̃k, and s i.i.d.∼ dS , and η is the step size. The details are summarized in Algorithm 3 of Appendix A. Finally, we present the complete MF-PPO in Algorithm 1.
Algorithm 1 Mean-Field Neural Proximal Policy Optimization
Require: Mean-field MDP (S×,P(S),A,P, r), discount factor γ; number of outer iterations K, number of inner updates T ; policy update parameter υ, step size η, projection radius Rα, Rθ. Initialize: τ0 ← 1, FA,0 ← 0, π0 ∝ exp{τ−10 FA,0} (uniform policy). for k = 0, . . . ,K − 1 do
Set temperature parameter τk+1 ← υ √ K/(k + 1), and proximity parameter υk ← υ √ K Solve (3.1) to update the critic network FQθk , using TD update (Algorithm 2) Solve (3.2) to update the actor network for FAαk+1 , using SGD update (Algorithm 3) Update policy: πk+1 ∝ exp{τ−1k+1FAαk+1}
end for

heading: 4 GLOBAL CONVERGENCE OF MF-PPO
text: We present the global convergence of MF-PPO algorithm for the two-layer permutation-invariant parameterization of the actor and critic networks. We remark that our analysis can be extended to multi-layer permutation-invariant networks, and we present the two-layer case here for simplicity of exposition. Specifically, the actor and critic networks take the form
FAα (s, s, a) = 1√ mN
mA∑
j=1
∑ s′∈s ujσ ( α>j (s, s ′, a) ) , FQθ (s, s, a) = 1√ mN mQ∑ j=1 ∑ s′∈s vjσ ( θ>j (s, s ′, a) ) ,
where mA (resp. mQ) is the width of the actor (resp. critic) network, and σ(x) = max{x.0} denotes the ReLU activation. We randomly initialize uj (resp. vj) and first layer weights α0 = [α>0,1, . . . , α > 0,mA ]
> ∈ Rd·mA (resp. θ0 ∈ Rd·mQ ) by uj ∼ Unif {−1,+1} , α0,j ∼ N (0, Id/d), ∀j ∈ [m].
For ease of analysis, we take m = mA = mQ and share the initialization of α0 and θ0 (resp. u0 and v0). Additionally, we keep uj’s fixed during training, and α (resp. θ) within ball B(α0, RA) (resp. B(θ0, RQ)) throughout training. We define the following function class which approximates the class of previously defined actor/critic network for large network width. Definition 4.1. Given Rβ > 0, define the function class over domain S × S ×A by
Fβ,m= { fβ(·) ∣∣ fβ(s, s′, a)= 1√ m m∑
j=1
vj1{β>0,j(s, s′, a)>0}β>j (s, s′, a), ‖β − β0‖2 ≤ Rβ } ,
where vj , β0,j are random weights sampled according to vj ∼ Unif {−1,+1} , β0,j ∼ N (0, Id/d), ∀j ∈ [m].
Fβ,m also induces the function class over S × P(S)×A given by FPβ,m= { F (·) ∣∣ F (s,dS , a)=Es′∼dSfβ(s, s′, a), fβ∈Fβ,m } .
It is well known that functions within Fβ,m approximate functions within the reproducing kernel Hilbert space associated with kernel K(x, y) = Ez∼N (0,Id/d) { 1(z>x > 0, z>y > 0) } for a large network width m (Jacot et al., 2018; Chizat and Bach, 2018; Cai et al., 2019; Arora et al., 2019) and whose RKHS norm is bounded by Rβ . For large Rβ and m, Fβ,m represents a rich class of functions. Additionally, functions within FPβ,m can be viewed as the mean-embedding of the joint state-action pair onto the RKHS space (Muandet et al., 2016; Song et al., 2009; Smola et al., 2007). Below, we make one important assumption, which assumes that FPβ,m is rich enough to represent the Q-function of all the policies within our policy class.
Assumption 1. For any policy π induced by FA ∈ FA, we have Qπ ∈ FPθ,mQ . We remark that Assumption 1 can be relaxed into requiring that FPβ,m has approximation error when parameterizing the set of Q-functions, with an additional term appearing in the convergence bound developed in Theorem 4.1 (Lan, 2021).
We define mild conditions stating boundedness of reward, and regularity of stationary distributions. Assumption 2. Reward function r(·) ≤ r for some r > 0. Additionally, there exists c > 0 such that E { 1 ( |z>(s, s′, a)| ≤ t
)} ≤ c · t‖z‖2 for any z ∈ R d and t > 0.
We measure the progress of MF-PPO in Algorithm 1 using the expected total reward L(π) = Eν∗ [V π(s,dS)] = Eν∗ {〈Qπ(·|s,dS), π(·|s,dS)〉} , (4.1) where ν∗ is the stationary state distribution of the optimal policy π∗. We also denote σ∗ as the stationary state-action distribution induced by π∗. Note that we have: L(π∗) = Eν∗ [ V π ∗ (s,dS) ] ≥ Eν∗ [V π(s,dS)] = L(π), for any policy π. Our main results are presented in the following theorem, showing that L(πk) converges to L(π∗) at a sub-linear rate. Theorem 4.1 (Global Convergence of MF-PPO). Under Assumptions 1 and 2, the policies {πk}Kk=1 generated by Algorithm 1 satisify
min0≤k≤K{L(π∗)− L(πk)} ≤ υ(log |A|+
∑K−1 k=1 (εk+ε ′ k))
(1−γ) √ K
+ M (1−γ)υ √ K ,
where M = Eν∗ {
maxa∈A(F Q θ0
(s, s′, a))2 }
+ 2R2A, εk and ε ′ k are defined in Lemma 4.3. Inparticular, suppose at each iteration of MF-PPO, we observe N = Ω ( K3R4A +KR 4 Q ) agents,
and the actor/critic network satisfies mA = Ω ( K6R10A +K 4R10A |A|2 ) ,mQ = Ω ( K2R10Q ) , and
T = Ω ( K3R4A +KR 4 Q ) , then we have
min0≤k≤K{L(π∗)− L(πk)} ≤ υ2(log |A|+O(1))+M
(1−γ)υ √ K
.
Theorem 4.1 states that, given sufficiently many agents and a large enough actor/critic network, MF-PPO attains global optimality at a sublinear rate. Our result shows that when solving the mean-field MDP, having more agents serves as a blessing instead of a curse. In addition, as will be demonstrated in our proof sketch, there exists an inherent phase transition, where the final optimality gap is dominated by statistical error for a small number of agents (first phase); and by optimization error for a large number of agents (second phase).
The complete proof of Theorem 4.1 takes careful analysis on the error from policy evaluation (3.1) and the improvement step (3.2). The analysis on the outer iterations of MF-PPO can be overviewed as approximate mirror descent, which needs to take into account how the evaluation and improvement error interacts. Intuitively, the tuple (εk, ε′k) describes the the effect of policy update when using approximate policy evaluation and policy improvement, and will be further clarified in the ensuing discussion. We present here the skeleton of our proof, and defer the technical detail to the appendix.
Proof Sketch. We first establish the convergence of the policy evaluation and improvement step. Lemma 4.1 (Policy Evaluation). Under the same assumptions in Theorem 4.1, let Qπk denote the Q-function of policy πk, let k = Einit,σk ( FQ θ(T ) (·)−Qπk(·) )2 denote policy evaluation error,
where θ(T ) is the output of Algorithm 2, we have k = O ( R2Q T 1/2 + R 5/2 Q
m 1/4 Q
+ R2Q N1/2 + R3Q
m 1/2 Q
) .
Lemma 4.2 (Policy Improvement). Under the same assumptions in Theorem 4.1, let ′k+1 = Einit,σ̃k { FAα(T )(·)−τk+1 ( υ−1k F Q θk (·)+τ−1k FAαk(·) )}2 denote policy optimization error, where α(T ) is the output of Algorithm 3, we have ′k+1 = O ( R2A T 1/2 + R 5/2 A
m 1/4 A
+ R2A N1/2 + R3A m
1/2 A
) .
Lemma 4.1 and 4.2 show that despite non-convexity, both policy evaluation and policy improvement steps converge approximately to the global optimal solution. In particular, for both policy evaluation steps and improvement steps, given networks with large width, for a small number of iterations T , the optimization error O ( T−1/2 ) dominates the optimality gap; for a large number of iterations T , the statistical error O ( N−1/2 ) dominates the optimality gap.
With Lemma 4.1 and 4.2, we illustrate the main argument for the proof of Theorem 4.1. Let us assume the ideal case when k = ′k+1 = 0. Note that for k = 0, we obtain the exact Q-function of policy πk. For ′k+1 = 0, we obtain the ideal energy-based updated policy define in Proposition 3.2. That is,
πk+1 = argmaxπ Eνk { 〈Qπk(s,dS , ·), π(·|s,dS)〉 υkKL (π(·|s,dS)‖πk(·|s,dS)) } . (4.2)
Without function approximation, problem (4.2) can be solved by treating each joint state (s,dS) independently, hence one can apply the well known three-point lemma in mirror descent (Chen and Teboulle, 1993) and obtain that, for all (s,dS) ∈ S × P(S): 〈Qπk(s,dS , ·), π∗(·|s,dS)− πk(·|s,dS)〉 ≤υk { KL (π∗(·|s,dS)‖πk(·|s,dS))−KL (π∗(·|s,dS)‖πk+1(·|s,dS))−KL (πk+1(·|s,dS)‖πk(·|s,dS)) }
+ 〈Qπk(s,dS , ·), πk+1(·|s,dS)− πk(·|s,dS)〉 . From Lemma 6.1 in Kakade and Langford (2002), the expectation of the left hand side yields exactly (1− γ) {L(π∗)− L(πk)}. Hence we have
(1− γ) {L(π∗)− L(πk)} ≤υkEν∗ { KL (π∗(·|s,dS)‖πk(·|s,dS))−KL (π∗(·|s,dS)‖πk+1(·|s,dS))
−KL (πk+1(·|s,dS)‖πk(·|s,dS)) }
+ Eν∗ 〈Qπk(s,dS , ·), πk+1(·|s,dS)− πk(·|s,dS)〉 . Pinsker’s Inequality KL (πk+1(·|s,dS)‖πk(·|s,dS)) ≥ 12‖πk+1 − πk‖21, combined with observation ‖Qπk(s,dS , ·)‖∞ ≤ r/(1− γ), and basic inequality −ax2 + bx ≤ b2/(4a) for a > 0 gives us
(1− γ) {L(π∗)− L(πk)}
≤υkEν∗ { KL (π∗(·|s,dS)‖πk(·|s,dS))−KL (π∗(·|s,dS)‖πk+1(·|s,dS)) } + r2
2υk(1− γ)2 .
By setting υk = O( √ K), and telescoping the above inequality from k = 0 to K − 1, we obtain:
min0≤k≤K−1{L(π∗)− L(πk)} = O(1/ √ K). Note that the key element in the global convergence of MF-PPO is the recursion defined in the previous inequality, which holds whenever we have an exact Q-function of the current policy and no function approximation is used when updating the next policy. Now MF-PPO conducts approximate policy evaluation k > 0, and after obtaining the approximate Q-function, conducts approximate policy improvement step ′k+1 > 0 with function approximation. In addition, the error of approximating the Q-function introduced in the evaluation step can be further compounded in the improvement step. Nevertheless, the previous inequality still holds approximately, with additional terms representing the policy evaluation/improvement errors. Lemma 4.3 (Liu et al. (2019a)). Let k (evaluation error) and ′k+1 (improvement error) be defined as in Lemma 4.1 and Lemma 4.2, respectively. We have: (1− γ) (L(π∗)− L(πk)) ≤ υkEν∗ { KL (π∗(·|s,dS)‖πk(·|s,dS))−KL (π∗(·|s,dS)‖πk+1(·|s,dS)) }
+ υk (εk + ε ′ k) + υ −1 k M. (4.3)
where
εk = τ −1 k+1 ′ k+1φ ∗ k+1 + υ −1 k kψ ∗ k, ε ′ k = |A|τ−2k+1( ′k+1)2, M = Eν∗ { max a∈A [ FQθ0(s,dS , a) ]2} + 2R2A. In addition, φ∗k and ψ ∗ k are defined by:
φ∗k = Eσ̃k [ |dπ∗/dπ0 − dπk/dπ0|2 ]1/2 , ψ∗k = Eσk [ |dσ∗/dσk − d(ν∗ × πk)/dσk|2 ]1/2 .
Finally, by telescoping inequality (4.3) from k = 0 to K − 1, we complete the proof of Theorem 4.1.

heading: 5 EXPERIMENTS
text: We perform experiments on the benchmark multi-agent particle environment (MPE) used in prior work (Lowe et al., 2017; Mordatch and Abbeel, 2018; Liu et al., 2019b). In the cooperative navigation task, N agents each with position xi ∈ R2 must move to cover N fixed landmarks at positions yi ∈ R2. They receive a team reward R = −∑Ni=1 minj∈[N ]‖yi − xj‖2; In the cooperative push task, N agents with position xi ∈ R2 work together to push a ball x ∈ R2 to a fixed landmark y ∈ R2. They receive a team reward R = −minj∈[N ]‖xj − x‖2 − ‖x − y‖2. Both tasks involve homogeneous
agents, and all the agents share the same team reward. Note that MPE environment also models interaction between agents, including collision, and the collided agents receive negative rewards.
We instantiate our method MF, by parameterizing the centralized critic function using a DeepSet (Zaheer et al., 2017) network, with two hidden layers. We use a standard two-layer multi-layer perception (MLP) for the centralized actor network in all algorithms. The actor network outputs the mean and diagonal covariance of a Gaussian distribution over the joint action space. We refer interested readers to Appendix B for detailed configurations of hyperparameters.
We compare with two other critic representations: one that uses MLP for the centralized critic, labeled MLP, and another that uses a graph convolutional network for the critic (Liu et al., 2019b), labeled GCN. Note that the GCN representation is permutation invariant if one imposes a fullyconnected graph for the agents in the MPE, but this invariance property does not hold for all graphs in general. We also compare with an extension of (Yang et al., 2018) to the case of continuous action spaces, labeled MF-A, in which each independent
DDPG agent i has a decentralized criticQ(si, ai, āi) that takes in the mean of all other agents’ actions āi := 1 N−1 ∑ j 6=i aj . Finally, we include comparison with VDN (Sunehag et al., 2017), where the centralized critic network is the direct summation of local critic networks and thus being permutation invariant. Empirically, as we find that off-policy RL learns faster than on-policy RL in the MPE with higher agent number, regardless of the critic representation, we make all comparisons on top of MADDPG (Lowe et al., 2017). For a fair comparison of all critic representations, we ensure that all neural network architectures contain approximately the same number of trainable weights.
For the cooperative navigation task, Figure 3 shows that the permutation invariant critic representation based on DeepSet enables MF to learn faster or reach a higher performance than all other representations and methods in the MPE with 15, 200, and 500 agents. For the cooperative push task, Figure 4a demonstrates a similar performance improvement provided by MF. In addition, we also demonstrate the superior parameter efficiency of MF compared to GCN. Figure 4b shows that MF consistently and significantly outperforms GCN as the number of parameters in their critic network varies over a range, with all other settings fixed. In particular, MF requires much fewer critic parameters to achieve higher performance than GCN.
Computational Improvements. Theorem 4.1 states that to obtain a small optimality gap in MFPPO, one needs to compute the update on a large number of agents. We remark that with the dual embedding techniques developed in Dai et al. (2017), one can avoid computation on all the agents by sampling a small number of agents to compute the update. This technique could be readily incorporated into MF-PPO to improve its computational efficiency.
Conclusion. We propose a principled approach to exploit agent homogeneity and permutation invariance through the mean-field approximation in MARL. Our results are also the first to show the global convergence of MARL algorithms with neural networks as function approximators. This is in sharp contrast to current practices, which are mostly heuristic methods without convergence guarantees.

heading: MENDA, K., CHEN, Y.-C., GRANA, J., BONO, J. W., TRACEY, B. D., KOCHENDERFER, M. J.
text: and WOLPERT, D. (2018). Deep reinforcement learning for event-driven multi-agent decision processes. IEEE Transactions on Intelligent Transportation Systems 20 1259–1268.
MORDATCH, I. and ABBEEL, P. (2018). Emergence of grounded compositional language in multiagent populations. In Thirty-Second AAAI Conference on Artificial Intelligence.
MUANDET, K., FUKUMIZU, K., SRIPERUMBUDUR, B. and SCHÖLKOPF, B. (2016). Kernel mean embedding of distributions: A review and beyond. arXiv preprint arXiv:1605.09522 .
PANAIT, L. and LUKE, S. (2005). Cooperative multi-agent learning: The state of the art. Autonomous agents and multi-agent systems 11 387–434.
SCHULMAN, J., WOLSKI, F., DHARIWAL, P., RADFORD, A. and KLIMOV, O. (2017). Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347 .
SHALEV-SHWARTZ, S., SHAMMAH, S. and SHASHUA, A. (2016). Safe, multi-agent, reinforcement learning for autonomous driving. arXiv preprint arXiv:1610.03295 .
SMOLA, A., GRETTON, A., SONG, L. and SCHÖLKOPF, B. (2007). A hilbert space embedding for distributions. In International Conference on Algorithmic Learning Theory. Springer.
SONG, L., HUANG, J., SMOLA, A. and FUKUMIZU, K. (2009). Hilbert space embeddings of conditional distributions with applications to dynamical systems. In Proceedings of the 26th Annual International Conference on Machine Learning.

heading: SUNEHAG, P., LEVER, G., GRUSLYS, A., CZARNECKI, W. M., ZAMBALDI, V., JADERBERG, M.,
text: LANCTOT, M., SONNERAT, N., LEIBO, J. Z., TUYLS, K. ET AL. (2017). Value-decomposition networks for cooperative multi-agent learning. arXiv preprint arXiv:1706.05296 .
SUTTON, R. S. and BARTO, A. G. (2018). Reinforcement learning: An introduction. MIT press.

heading: VINYALS, O., BABUSCHKIN, I., CZARNECKI, W. M., MATHIEU, M., DUDZIK, A., CHUNG, J.,
text: CHOI, D. H., POWELL, R., EWALDS, T., GEORGIEV, P. ET AL. (2019). Grandmaster level in starcraft ii using multi-agent reinforcement learning. Nature 575 350–354.
WANG, L., YANG, Z. and WANG, Z. (2020). Breaking the curse of many agents: Provable mean embedding q-iteration for mean-field reinforcement learning. In International Conference on Machine Learning. PMLR.
YANG, J., YE, X., TRIVEDI, R., XU, H. and ZHA, H. (2017). Learning deep mean field games for modeling large population behavior. arXiv preprint arXiv:1711.03156 .
YANG, Y., LUO, R., LI, M., ZHOU, M., ZHANG, W. and WANG, J. (2018). Mean field multi-agent reinforcement learning. arXiv preprint arXiv:1802.05438 .
ZAHEER, M., KOTTUR, S., RAVANBAKHSH, S., POCZOS, B., SALAKHUTDINOV, R. R. and SMOLA, A. J. (2017). Deep sets. In Advances in neural information processing systems.
ZHANG, K., YANG, Z. and BAŞAR, T. (2019). Multi-agent reinforcement learning: A selective overview of theories and algorithms. arXiv preprint arXiv:1911.10635 .
ZHENG, S., TROTT, A., SRINIVASA, S., NAIK, N., GRUESBECK, M., PARKES, D. C. and SOCHER, R. (2020). The ai economist: Improving equality and productivity with ai-driven tax policies. arXiv preprint arXiv:2004.13332 .

Review summaries:
This paper deals with a class of cooperative MARL problems with permutation invariance. It first shows that, for such problems, there exists an optimal policy that is permutation invariant, and the value function can be characterized as a function of the local state of one agent and the empirical state distribution over the rest of agents. Based on these observations, the authors introduce the mean-field MDP as the limit of the MARL problem with infinitely many homogeneous agents and design a mean-field proximal policy optimization (MF-PPO) algorithm to solve it. It shows with permutation invariance, the search space of the actor/critic network polynomially depends on the number of agents $N$ and establishes the global convergence of MF-PPO. Some numerical results show better performance compared with some existing algorithms.