FSV: Learning to Factorize Soft Value Function for Cooperative Multi-Agent Reinforcement Learning

1 INTRODUCTION . Cooperative multi-agent reinforcement learning ( MARL ) aims to instill in agents policies that maximize the team reward accumulated over time ( Panait & Luke ( 2005 ) ; Busoniu et al . ( 2008 ) ; Tuyls & Weiss ( 2012 ) ) , which has great potential to address complex real-world problems , such as coordinating autonomous cars ( Cao et al . ( 2013 ) ) . Considering the measurement and communication limitations in practical problems , cooperative MARL faces the partial observability challenge . That is , each agent chooses actions just based on its local observations . Centralized training with decentralized execution ( CTDE ) ( Oliehoek et al . ( 2011 ) ) is a common paradigm to address the partial observability , where agents ’ policies are trained with access to global information in a centralized way and executed only based on local observations in a decentralized way , such as the MADDPG ( Lowe ( 2017 ) ) and COMA ( Foerster et al . ( 2017 ) ) . However , the size of the joint state-action space of the centralized value function grows exponentially as the number of agents increases , which is known as the scalibility challenge . Value function factorization methods have been an increasingly popular paradigm for solving the scalability in CTDE by satisfying the Individual-Global-Max ( IGM ) where the optimal joint action selection should be consistent with the optimal individual action selections . Three representative examples of value function factorization methods include VDN ( Sunehag et al . ( 2017 ) ) , QMIX ( Rashid et al . ( 2018 ) ) , and QTRAN ( Son et al . ( 2019 ) ) . All these methods are -greedy policies , where VDN and QMIX give sufficient but unnecessary conditions for IGM by additivity and monotonicity structures respectively , and the QTRAN formulates the IGM as an optimization problem with linear constraints . Although these methods have witnessed some success in some tasks , they all face relative overgeneralization , where agents may stick into a suboptimal Nash Equilibrium . In fact , relative overgeneralization is a grave pathology arising which occurs when a suboptimal Nash Equilibrium in the joint space of action priors to an optimal Nash Equilibrium since each agent ’ s action in the suboptimal equilibrium is a better choice ( Wei & Luke ( 2016 ) ) . The non-monotonic matrix game is a simple discrete example . Both VDN and QMIX fail to learn the optimal policy in the non-monotonic matrix due to their structure limitation . Although QTRAN expresses the complete value function representation ability in the non-monotonic matrix , its full expressive ability decreases in the complex tasks due to the computationally intractable constraints relaxing with tractable L2 penalties . Besides , QTRAN sacrifices the tractability in continuous action space . Therefore , in discrete and continuous tasks , achieving effective scalability while avoiding relative overgeneralization remains an open problem for cooperative MARL . To address this challenge , this paper presents a new definition of factorizable tasks called IGO ( Individual-Global-Optimal ) which introduces the consistency of joint optimal stochastic policies and individual optimal stochastic policies . Theoretical analysis shows that IGO degenerates into IGM if the policy is greedy , which represents the generality of IGO . Under the IGO , this paper proposes a novel factorization solution for MARL , named FSV , which learns to factorize soft value function into individual ones for decentralized execution enabling efficient learning and exploration through maximum entropy reinforcement learning . To our best knowledge , FSV is the first multiagent algorithm with stochastic policies using the idea of factorization , and theoretical analysis shows that FSV solves a rich class of tasks . We evaluate the performance of FSV in both discrete and continuous problems proposed by Son et al . ( 2019 ) ; Wei et al . ( 2018 ) and a range of unit micromanagement benchmark tasks in StarCraft II . The Non-Monotonic Matrix game shows that FSV has full expression ability in the discrete task , and the Max of Two Quadratics game shows that FSV is the first factorization algorithm that avoids the relative overgeneralization to converge to optima in the continuous task . On more challenging StarCraft II tasks , due to the high representation ability and exploration efficiency of FSV , it significantly outperforms other baselines , SMAC ( Samvelyan et al . ( 2019 ) ) . 2 PRELIMINARIES . 2.1 DEC-POMDP AND CTDE . A fully cooperative multi-agent task can be described as a Dec-POMDP defined by a tuple G = 〈S , U , P , r , Z , O , N , γ〉 , where s ∈ S is the global state of the environment . Each agent i ∈ N choose an action ui ∈ U at each time step , forming a joint action u ∈ UN . This causes a transition to the next state according to the state transition function P ( s′|s , u ) : S×UN ×S → [ 0 , 1 ] and reward function r ( s , u ) : S × UN → R shared by all agents . γ ∈ [ 0 , 1 ] is a discount factor . Each agent has individual , partial observation z ∈ Z according to observation function O ( s , i ) : S × N → Z . Each agent also has an action-observation history τi ∈ T : ( Z × U ) ∗ , on which it conditions a stochastic policy πi ( ui|τi ) : T × U → [ 0 , 1 ] . The joint policy π has a joint action-value function Qπ ( st , ut ) = Est+1 : ∞ , ut+1 : ∞ [ ∑∞ k=0 γ krt+k|st , ut ] . Centralized Training with Decentralized Execution ( CTDE ) is a common paradigm of cooperative MARL tasks . Through centralized training , the action-observation histories of all agents and the full state can be made accessible to all agents . This allows agents to learn and construct individual action-value functions correctly while selecting actions based on its own local action-observation history at execution time . 2.2 VDN , QMIX AND QTRAN . An important concept for factorizable tasks is IGM which asserts that the joint action-value function Qtot : T N × UN → R and individual action-value functions [ Qi : T × U → R ] Ni=1 satisfies arg max u Qtot ( τ , u ) = ( arg max u1 Q1 ( τ1 , u1 ) , ... , arg max uN QN ( τN , uN ) ) ( 1 ) To this end , VDN and QMIX give sufficient conditions for the IGM by additivity and monotonicity structures , respectively , as following : Qtot ( τ , u ) = N∑ i=1 Qi ( τi , ui ) and ∂Qtot ( τ , u ) ∂Qi ( τi , ui ) > 0 , ∀i ∈ N ( 2 ) However , there exist tasks whose joint action-value functions do not meet the said conditions , where VDN and QMIX fail to construct individual action-value function correctly . QTRAN uses a linear constraint between individual and joint action values to guarantee the optimal decentralisation . To avoid the intractability , QTRAN relax these constraints using two L2 penalties . However , this relaxation may violate the IGM and it has poor performance on multiple multi-agent cooperative benchmarks as reported recently . 2.3 THE RELATIVE OVERGENERALIZATION PROBLEM . Relative overgeneralization occurs when a sub-optimal Nash Equilibrium ( e.g . N in Fig . 1 ) in joint action space is preferred over an optimal Nash Equilibrium ( e.g . M in Fig . 1 ) because each agent ’ s action in the suboptimal equilibrium is a better choice when matched with arbitrary actions from the collaborating agents . Specifically , as shown in Figure 1 , where two agents with one-dimensional bounded action ( or three actions in discrete action space ) try to cooperate and find the optimal joint action , the action B ( or C ) is often preferred by most algorithms as mentioned in ( Son et al . ( 2019 ) and Wei et al . ( 2018 ) ) due to their structure limitation and lack of exploration . 3 METHOD . In this section , we will first introduce the IGO ( Individual-Global-Optimal ) , a new definition of factorizable MARL tasks with stochastic policies . Theoretical analysis shows that IGO degenerates into IGM if the policy is greedy . With the energy-based policy , the structure between joint and individual action values of IGO can be explicitly constructed , which is a novel factorization stochastic-based policy solution we proposed , named FSV . Specifically , FSV realizes IGO using an efficient linear structure and learns stochastic policies through maximum entropy reinforcement learning . 3.1 INDIVIDUAL GLOBAL OPTIMAL . In the CTDE paradigm , each agent i ∈ N chooses an action based on a stochastic policy πi ( ui|τi ) at the same time step . The joint policy πtot ( u|τ ) = ∏N i=1 πi ( ui|τi ) describes the probability of taking joint actions u on joint observation history τ . If each agent adopts its optimal policy while the joint policy is exactly the optimum , the task itself can achieve global optimum through local optimum , which naturally motivates us to consider the factorizable tasks with stochastic policy as following : Definition 1 For a joint optimal policy π∗tot ( u|τ ) : T N × UN → [ 0 , 1 ] , if there exists individual optimal policies [ π∗i ( ui|τi ) : T × U → [ 0 , 1 ] ] Ni=1 , such that the following holds π∗tot ( u|τ ) = N∏ i=1 π∗i ( ui|τi ) ( 3 ) then , we say that [ πi ] satisfy IGO for πtot As specified above , IGO requires the consistency of joint optimal policy and individual optimal policies rather than the actions in IGM , but it degenerates into IGM if policies are greedy . That is to say , IGO is more generality than IGM . 3.2 FSV . In this work , we take the energy-based policies as joint and individual optimal policy respectively , π∗tot ( u|τ ) = exp ( 1 α ( Qtot ( τ , u ) − Vtot ( τ ) ) ) ( 4 ) π∗i ( ui|τi ) = exp ( 1 αi ( Qi ( τi , ui ) − Vi ( τi ) ) ) ( 5 ) where α , αi are temperature parameters , Vtot ( τ ) = α log ∫ UN exp ( 1αQtot ( τ , u ) ) du and Vi ( τi ) = αi log ∫ U exp ( 1αiQi ( τi , u ) ) du are partition functions . The benefit of using energy-based policy is that it is a very general class of distributions that can represent complex , multi-modal behaviors Haarnoja et al . ( 2017 ) . Moreover , energy-based policies can easily degenerate into greedy policies as α , αi anneals . To learn this decentralized energy-based policy , we extend the maximum entropy reinforcement learning framework for the multi-agent setting , which we ’ ll describe in the next . Another benefit of considering the stochastic policy with explicit function class for factorizable tasks through IGO is that the architecture between joint and individual action values can be easily constructed through its constrains on policies with specific meanings as follows . Theorem 1 If the task satisfies IGO , with energy-based optimal policy , the joint action value Qtot can be factorized by individual action values [ Qi ] Ni=1 as following : Qtot ( τ , u ) = N∑ i=1 λ∗i [ Qi ( τi , ui ) − Vi ( τi ) ] + Vtot ( τ ) ( 6 ) where λ∗i = α/αi . Theorem 1 gives the decomposition structure like VDN—the joint value is a linear combination of individual values weighted by λ∗i > 0 . However , the function class defined by Eq ( 6 ) , which should only concern the task itself , is related to and limited by the distributions of policy . Although energybased distribution is very general which has the representation ability of most tasks , to establish the correct architecture between joint and individual Q-values and enable stable learning , we need to extend the function class into any distributions . The key idea is that we approximate the weight vector λi directly as α , αi is zero instead of annealing αi during training process . This extends the function class and will at least guarantee IGM constraint when α , αi is zero . Theorem 2 When α , αi → 0 , the function class defined by IGM is equivalent to the following Qtot ( τ , u ) = N∑ i=1 λi ( τ , u ) [ Qi ( τi , ui ) − Vi ( τi ) ] + Vtot ( τ ) ( 7 ) where λi ( τ , u ) = lim α , αi→0 λ∗i . Note that λi is now a function of observations and actions due to the relaxation . Eq ( 7 ) allows us to use a simple linear structure to train joint and individual action values efficiently and guarantee the correct estimation of optimal Q-values . We ’ ll describe it in experiment . Then , we introduce the maximum entropy reinforcement learning in CTDE setting which is an directly extension of soft actor-critic ( q-learning ) . The standard reinforcement learning tries to maximum the expected return ∑ tEπ [ rt ] , while the maximum entropy objective generalizes the standard objective by augmenting it with an entropy term , such that the optimal policy additionally aims to maximize its entropy at each visited state πMaxEnt = arg max π ∑ t Eπ [ rt + αH ( π ( ·|st ) ) ] ( 8 ) where α is the temperature parameter that determines the relative importance of the entropy term versus the reward , and thus controls the stochasticity of the optimal policy ( Haarnoja et al . ( 2017 ) ) . We can extend it into cooperative multi-agent tasks by directly considering the joint policy πtot ( u|τ ) and defining the soft joint action-value function as following : Qtot ( τt , ut ) = r ( τt , ut ) + Eτt+1 , ... [ ∞∑ k=1 γk ( rt+k + αH ( π ∗ tot ( ·|τt+k ) ) ] ( 9 ) then the joint optimal policy for Eq ( 8 ) is given by Eq ( 4 ) ( Haarnoja et al . ( 2017 ) ) . Note that we don ’ t start considering decentralized policies , the joint Q-function should satisfy the soft Bellman equation : Q∗tot ( τt , ut ) = rt + Eτt+1 [ V ∗ tot ( τt+1 ) ] ( 10 ) And we can update the joint Q functions in centralized training through soft Q-iteration : Qtot ( τt , ut ) ← rt + Eτt+1 [ Vtot ( τt+1 ) ] ( 11 ) It ’ s natural to take the similar energy-based distribution as individual optimal policies π∗i in Eq ( 5 ) which allows us to update the individual policies through soft policy-iteration : πnewi = arg min π′∈ ∏ DKL ( π′ ( ·|τ ) ||π∗i ( ·|τ ) ) ( 12 )

Summary: The paper proposes a Q-factorization method by assuming an energy-based policies model. Q-functions are formulated as soft value functions with the energy parameters, and this adoption renders the function factorization more flexible compared to existing ones. The proposed solution applies to continuous-action tasks, a feat left unconquered by some of the existing methods. Authors exhibit that FSV outperforms others in various environments characterized by local optima.