Surprise Minimizing Multi-Agent Learning with Energy-based Models
Abstract
Multi-Agent Reinforcement Learning (MARL) has demonstrated signiﬁcant success by virtue of collaboration across agents.
Recent work, on the other hand, introduces surprise which quantiﬁes the degree of change in an agent’s environment.
Surprise-based learning has received signiﬁcant attention in the case of single-agent entropic settings but remains an open problem for fast-paced dynamics in multi-agent scenarios.
A potential alternative to address surprise may be realized through the lens of free-energy minimization.
We explore surprise minimization in multi-agent learning by utilizing the free energy across all agents in a multi-agent system.
A temporal Energy-Based Model (EBM) represents an estimate of surprise which is minimized over the joint agent distribution.
Our formulation of the EBM is theoretically akin to the minimum conjugate entropy objective and highlights suitable convergence towards minimum surprising states.
We further validate our theoretical claims in an empirical study of multi-agent tasks demanding collaboration in the presence of fast-paced dynamics.
Our implementation and agent videos are available at the Project Webpage .
Introduction
The rise of RL has led to an increasing interest in the study of multi-agent systems [34, 58], commonly known as Multi-Agent Reinforcement Learning (MARL).
In the case of partially observable settings,
MARL enables the learning of policies with centralised training and decentralised control [26].
This has proven to be useful for exploiting value-based methods which motivate collaboration across large number of agents.
But how do agents behave in the presence of sudden environmental changes?
Consider the problem of autonomous driving wherein a driver (agent) autonomously operates a vehicle in real-time.
The driver learns to optimize the reward function by maintaining constant speed and covering more distance in different trafﬁc conditions.
Whenever the vehicle approaches an obstacle, the driver acts to avoid it by utilizing the brake and directional steering commands.
However, due to the fast-paced dynamics of the environment, say fast-moving trafﬁc, the agent may abruptly encounter an obstacle ( a person running across the street ) which may result in a collision.
Irrespective of the optimal action ( pushing of brakes ) executed by the agent, the vehicle may fail to evade the collision as a result of the abrupt temporal change.
The above arises as a consequence of surprise , which is deﬁned as a statistical measure of uncertainty.
Surprise minimization [3] is a recent phenomenon observed in the case of single-agent RL methods which deals with environments consisting of rapidly changing states.
In the case of model-based
RL [24], surprise minimization is used as an effective planning tool in the agent’s model [3].
In the case of model-free RL, surprise minimization is witnessed as an intrinsic motivation [1, 36] or generalization problem [9].
On the other hand, MARL does not account for surprise across agents as a result of which agents remain unaware of drastic changes in the environment [35].
Thus, surprise minimization in the case of multi-agent settings requires attention from a critical standpoint.
A potential pathway to treat surprising states may be realized in light of free-energy minimization.
The free-energy principle depicts convergence to local niches and provides a general recipe for stability among agents.
Through this lens, we unify surprise with free-energy in the multi-agent setting.
We construct a temporal EBM which represents an estimate of surprise agents may face in the environment.
All agents jointly minimize this estimate utilizing temporal difference learning upon their value functions and the EBM.
Our formulation of free-energy minimization is theoretically akin to minimizing the entropy in conjugate gradient space.
This insight provides a suitable convergence result towards minimum surprising states (or niches) of the agent state distributions.
In an empirical study of multi-agent tasks which present signiﬁcant collaboration bottlenecks and fast-paced dynamics, we validate our theoretical claims and motivate the practical usage of EBMs in MARL.
Related Work
Surprise Minimization:
Despite the recent success of value-based methods [39, 22] RL agents suffer from spurious state spaces and encounter sudden changes in trajectories.
Quantitatively, surprise has been studied as a measure of deviation [3, 9] among states encountered by the agent during its interaction with the environment.
While exploring [7, 56] the environment, agents tend to have higher deviation among states which is gradually reduced by gaining a signiﬁcant understanding of state-action transitions.
In the case of model-based RL, agents can leverage spurious experiences [3] and plan effectively for future steps.
On the other hand, in the case of model-free RL, surprise results in sample-inefﬁcient learning [1].
This is primarily addressed by making use of rigorous exploration strategies [52, 31].
High-dimensional exploration further requires extrinsic feature engineering [27] and meta models [16].
A suitable way to tackle high-dimensional dynamics is by utilizing surprise as a penalty on the reward [9].
This leads to improved generalization for single-agent interactions [45].
Our proposed approach is parallel to the aforesaid methods.
Energy-based Models: EBMs have been successfully implemented in single-agent RL methods [42, 19].
These typically make use of Boltzmann distributions to approximate policies [32].
Such a formulation results in the minimization of free energy within the agent.
While policy approximation depicts promise in the case of unknown dynamics, inference methods [57] play a key role in optimizing goal-oriented behavior.
A second type of usage of EBMs follows the maximization of entropy [65].
The maximum entropy framework [20] highlighted in Soft Q-Learning (SQL) [19] allows the agent to obey a policy which maximizes its reward and entropy concurrently.
Maximization of agent’s entropy results in diverse and adaptive behaviors [64] which may be difﬁcult to accomplish using standard exploration techniques [7, 56].
The maximum entropy framework is akin to approximate inference in the case of policy gradient methods [49].
Such a connection between likelihood ratio gradient techniques and energybased formulations leads to diverse and robust policies [17].
Furthermore, their hierarchical extensions [18] preserve the lower levels of hierarchies.
In the case of MARL, EBMs have witnessed limited applicability as a result of the increasing number of agents and complexity within each agent [8].
While the framework is readily transferable to opponent-aware multi-agent systems [63], cooperative settings consisting of coordination between agents require a ﬁrm formulation of energy.
This formulation must be scalable in the number of agents [15] and account for environments consisting of spurious states [62].
Our theoretical formulation is motivated by these methods in literature.
Preliminaries
Multi-Agent Learning: We review the cooperative MARL setup.
The problem is modeled as a
Decentralized Partially Observable Markov Decision Process (Dec-POMDP)
[43] deﬁned by the tuple ( S , A , r, N, P, Z, O, γ ) where the state space S and action space
A are discrete, r : S ×
A → [ r min , r max ] presents the reward observed by agents a ∈ N where N is the set of all agents,
P : S ×S ×A → [0 , 1] presents the unknown transition model consisting of the transition probability to the next state s (cid:48)
∈ S given the current state s ∈ S and joint action u ∈ A (a combination of each agent’s action u a ∈
A
a ) at time step t and γ is the discount factor.
Our setting consists of the ﬁnite-horizon discounted problem case where episodes terminate at timestep T with the terminal state being s T .
As a result, task returns remain bounded for each episode.
We consider a partially observable setting in which each agent n draws individual observations z ∈ Z according to the observation function O ( s, u ) : S ×
A → Z .
We consider a joint policy π θ ( u | s ) as a function of model parameters θ .
Standard RL deﬁnes the agent’s objective to maximize the expected discounted reward E π θ [ (cid:80) Tt =
γ t r ( s t , u t )] as a function of the parameters θ .
The joint action-value function for agents is represented as Q ( u, s ; θ ) =
E π θ [ (cid:80) Tt =1 γ t r ( s, u ) | s = s t , u = u t ] which is the expected sum of payoffs obtained in state s upon performing action u by following the policy π θ .
We denote the optimal policy π θ ∗ ( shorthand π ∗ ) such that Q ( u, s ; θ ∗ ) ≥ Q ( u, s ; θ ) ∀ s ∈ S, u ∈ A .
In the case of multiple agents, the joint optimal policy can be expressed as the Nash Equilibrium [40] of the
Stochastic Markov Game as π ∗ =
( π 1 , ∗ , π 2 , ∗ , ...
π N, ∗ ) such that Q ( u a , s ; θ ∗ ) ≥ Q ( u a , s ; θ ) ∀ s ∈
S, u ∈ A, a ∈ N .
Q-Learning is an off-policy, model-free algorithm suitable for continuous and episodic tasks.
The algorithm uses semi-gradient descent to minimize the Temporal Difference (TD) error in Equation 1.
[Equation]
where y = r + γ max u (cid:48) ∈
A Q ( u (cid:48) , s (cid:48) ; θ − ) is the TD target consisting of θ − as the target parameters and R denotes the replay buffer.
Energy-based Models: EBMs [29, 30]
have been successfully applied in the ﬁeld of machine learning [55] and probabilistic inference [37].
A typical EBM E formulates the equilibrium probabilities [47] P ( v, h ) =
[Equation]
ˆ v, ˆ h
[exp( −E (ˆ v, ˆ h ))] via a Boltzmann distribution [32] where v and h are the values of the visible and hidden variables and ˆ v
and ˆ h are all the possible conﬁgurations of the visible and hidden variables respectively.
The probability distribution over all the visible variables can be obtained by summing over all possible conﬁgurations of the hidden variables.
This is mathematically expressed in Equation 2.
[Equation]
Here, E ( v, h ) is called the equilibrium free energy which is the minimum of the variational free energy and (cid:80) ˆ v, ˆ h exp ( −E (ˆ v, ˆ h )) is the partition function.
Energy-based Surprise Minimization
We begin by constructing surprise minimization as an energy-based problem in the temporal setting.
The motivation behind an energy-based formulation stems from rapidly changing states as an undesired niche among agents in the case of partially-observed settings.
To steer agents away from this niche, we further construct a method which incorporates the theoretical aspect of the study.
4.1 The Surprise Minimization Objective
To make analysis tractable towards valid function spaces and surprising states, we take into account two assumptions which form the central basis of surprise minimization among multiple agents.
Assumption 1.
(Completeness of value function space)
The space Π : S ×
A of all Q value functions Q ( s, u ) ∈ Π , ∀ s ∈ S , ∀ u ∈
A is a nonempty complete metric space.
Assumption 1 restricts the formulation of individual agent value functions Q a to the nonempty complete metric space.
A nonempty space conﬁrms the presence of candidate functions Q a upper bounded by the optimal function Q ∗ , i.e.- Q a ≤ Q ∗ , ∀ a ∈ N [5].
The completeness counterpart, on the other hand, provisions a ﬁxed interior int Π for optimization [6].
Assumption 2.
(Constant surprise at Equilibrium)
In the limit of convergence lim π a → π ∗ to an optimal policy π ∗ , all agents a ∈ N incur a ﬁnite surprise ζ > 0 between consecutive states s and s (cid:48) until termination state s T .
Assumption 2 is directly based on the constant and continuous temporal aspect of surprise minimization [50, 12].
Corresponding to the lifetime of each agent a ∈ N , a desired minima bakes in the optimal distribution of actions which correspond to minimum but ﬁnite instantaneous surprise.
We formulate the energy-based objective consisting of surprise as a function of states s , joint actions u and standard deviation σ of observations for each agent a .
In the case of high-dimensional state spaces (such as multiple opponents), σ informs agents of the abrupt statistical change that would take place upon executing action u .
We formulate surprise as T V a surp ( s, u, σ ) which serves as an uncertainty quantiﬁer Unc(s,a) of the state-action distribution.
Here V a surp ( s, u, σ ) denotes the surprise value function which serves as a mapping from agent and environment dynamics to surprise.
Deﬁne an operator presented in Equation 3 which sums surprising conﬁgurations across all agents.
[Equation]
Remark 1.
T V a surp ( s, u, σ ) intuitively provides a global estimate of surprise.
If all agents are equally likely to face a surprising state, then T V a surp ( s, u, σ ) captures their individual contributions.
The formulation makes use of the soft-maximum operator [2].
The operator T V a surp ( s, u, σ ) is similar to prior energy formulations [19] where the energy across different actions is evaluated.
In our case, inference is carried out across all agents with actions as prior variables.
However, in the special case of using an EBM as a Q -function, our approach suitably generalizes to the above methods (details in
Appendix B).
Our choice of T V a surp ( s, u, σ ) is based on its unique mathematical properties which result in better convergence.
Of these properties, the most useful result is that T forms a contraction on the surprise value function V a surp ( s, u, σ ) indicating a guaranteed minimization of surprise within agents.
This is formally stated in Theorem 1 while utilizing the completeness criterion of Assumption 1 which provides a tractable value function space.
All proofs are deferred to Appendix A.
Theorem 1.
Given a surprise value function V a surp ( s, u, σ ) ∀ a ∈ N , the energy operator
T V a surp ( s, u, σ )
= log (cid:80)
Na =1 exp ( V a surp ( s, u, σ )) forms a contraction on V a surp ( s, u, σ ) .
Theorem 1 provides a suitable guarantee of T V a surp ( s, u, σ ) converging to a ﬁxed point niche.
The contraction result is directly based on Banach’s ﬁxed point property and suggests the generalization of convergence in any nonempty complete metric space ( X, d ) [5].
We now consider a weighted combination of Q ( s, u ) with T V a surp ( s, u, σ ) wherein we denote β as a temperature parameter,
[Equation]
Remark 2.
Equation 4 is an instance of value function regularization wherein the Q values are subject to a joint penalty while observing surprising states.
Interestingly, upon considering the Legendre transform f ∗ ( x ) [6, 14] (convex conjugate function corresponding to the conjugate space X of a differentiable function f (z) ) of T V a surp ( s, u, σ ) , we obtain the following,
[Equation]
Remark 3.
The Legendre Transform of T V a surp ( s, u, σ ) given by f ∗ ( x ) =
(cid:80) x x log( x ) when utilized as value function regularization ˆ Q = Q − f ∗ ( x ) corresponds to the minimum entropy formulation in conjugate space E π θ (cid:104) (cid:80) T t =
γ t ( r ( s t , u t ) − λ H ( x )) (cid:105) for x = ∇ z f (z) ∈ X .
Based on the above insight, minimizing entropy to express ∇ z f ( z ) in conjugate space is akin to minimizing uncertainty among all agents in the value function space Π .
Intuitively, H ( x ) denotes the uncertainty for each agent a ∈ N in the multi-agent population which is directly related to its ability of accurately interpreting the environment.
Minimizing H ( x ) leads to an increase in the expressiveness of value function.
This in turn, induces an expressive state visitation distribution which steers the agent away from sudden changes in its environment.
Note that the setting does not minimize entropy in value function space which would stand contrary to the maximum entropy formulation [20] (see Appendix B).
Figure 1 presents an illustration of the intuition behind surprise minimization using the energy-based scheme.
Agents collaborate in partially-observed worlds to attain a joint niche.
Interpreting the space of all surprising states as an energy landscape, MARL agents move from high energy states to low energy states which consist of minimum surprise.
During training, agents train to ﬁnd policies which not only provide rewarding actions, but also avoid risky states by minimizing
T V a surp ( s, u, σ ) .
Seeking these states leads to ﬁnding the minima on the energy landscape.
Thus, it is by virtue of regularized value estimates ˆ Q that the minimization scheme informs agents of joint surprise.
4.2 Surprise Minimization with Function Approximation
We utilize the above insights as surprise-based regularization in the TD learning setting.
Upon replacing Q ( u, s ; θ ) with ˆ Q ( u, s, ; θ ) in the RL construction of Equation 1 one obtains the following,
[Equation]
where ˆ y is given by the following expression,
[Equation]
Collecting the log terms yields the following,
[Equation]
Here, E is deﬁned as the surprise ratio .
The surprise value function V a surp ( s (cid:48) , u (cid:48) , σ (cid:48) ) is expressed as the negative free energy and (cid:80) Na =1 exp
( V a surp ( s, u, σ )) as the partition function of a conventional
EBM described in Equation 2.
Alternatively, V a surp ( s, u, σ ) can be formulated as the negative free energy with (cid:80) Na =1 exp ( V a surp ( s (cid:48) , u (cid:48) , σ (cid:48) )) as the partition function.
The TD objective incorporates the minimization of surprise across all agents as minimizing the energy in rapidly changing states.
Remark 4.
The above formulation of βE can be realized as intrinsic motivation steering the agent towards subgoals with reduced surprise.
The energy formulation E provides a tractable distribution over all surprising conﬁgurations in the state space S .
This guarantees convergence to minimum surprise at optimal policy π ∗ and is formally expressed in Theorem 2 (see Appendix C for a detailed convergence analysis).
Theorem 2.
Upon agent’s convergence to an optimal policy π ∗ , total energy of π ∗ , expressed by E ∗ will reach a thermal equilibrium consisting of minimum surprise among consecutive states s and s (cid:48) .
Theorem 2 demonstrates an intuitive convergence result of agent populations collaborating to reside in a mutual ecological niche [12].
The multi-agent population with minimum surprise exhibits the optimal policy π ∗ which results in minimum energy corresponding to each surprising state in the state distribution S .
Orthogonally, agents may continue to experience ﬁnite and constant surprise in the long-horizon while acting optimally to visit non-surprising and rewarding states.
This presents surprise minimization as a secondary surrogate objective in MARL.
4.3 Energy-based MIXer (EMIX)
Based on our theoretical analysis, we incorporate learning of surprise as global intrinsic motivation across all agents in the multi-agent system.
A global estimate of surprise, following the energy operator T V a surp ( s, u, σ ) , is beﬁtting from a computational perspective as well.
An individual estimate of surprise for each agent may be intractable to obtain due to the non-stationarity of the environment.
Instead, we seek to minimize surprise jointly across all agents using an expressive
Energy-based MIXer (EMIX) architecture which is compatible with any multi-agent RL algorithm.
Figure 2 illustrates our learning scheme.
Learning of surprise in the high-dimensional value function space is cumbersome with the number of actions scaling linearly in the number of agents.
This imposes an inherent restriction to learn global surprise efﬁcaciously across all agents at a given timestep.
Towards this goal, EMIX encodes individual value functions Q 1 , Q 2 , ...
Q n corresponding to each agent using local value encoders.
These encoders capture the local change in value functions arising over subsequent TD learning iterations [60].
A global state encoder maps environment states s 1 , s 2 , ...
s T to a low dimensional representation.
Further, a state deviation encoder encodes deviations across all states s 1 , s 2 , ...
s T within the given batch.
Akin to a model-based method [23], the state deviation encoder accounts for uncertainty in an agent’s state visitation distribution.
Note that the encoder does not construct an explicit model of states, but only represents their variation in the agent’s environment.
This insight is essential to account for abrupt dynamics encountered by agents.
Representations obtained from state and value function encoders are concatenated and compressed using a ﬁnal surprise encoder which estimates a distribution of surprise values.
The distribution implicitly represents the density of states wherein an agent may encounter most surprise.
A value estimate V a surp ( s, u, σ ) sampled from the surprise distribution depicts the variational free energy conﬁguration upon application of T which serves as global intrinsic motivation.
Practical training of EMIX proceeds with backpropagation [46] using gradient descent and the reparameterization trick [25] for sampling of V a surp ( s, u, σ ) .
4.4 Practical Implementation
Algorithm 1 presents the EMIX framework (in green ) combined with QMIX [44], an off-the-shelf
MARL algorithm.
The total Q -value Q θtot is computed by the mixer network with its inputs as the Q -values of all the agents conditioned on s via the hypernetworks.
Similarly, the target mixers approximate Q θ − i conditioned on s (cid:48) .
In order to evaluate surprise within agents, we compute the standard deviations σ and σ (cid:48) across all observations z and z (cid:48) for each agent using s and s (cid:48) respectively.
The surprise value function, called the Surprise-Mixer, estimates surprise V a surp ( s, u, σ ) conditioned on s , u and σ .
The same computation is repeated using the Target-Surprise-Mixer for estimating surprise V a surp ( s (cid:48) , u (cid:48) , σ (cid:48) ) within next-states in the batch.
Application of the energy operator along the non-singleton agent dimension for V a surp ( s, u, σ ) and V a surp ( s (cid:48) , u (cid:48) , σ (cid:48) ) yields the energy ratio E which is used in Equation 8 to evaluate L ( θ ) .
We then use batch gradient descent to update parameters of the mixer θ .
Target parameters θ − i are updated every update − interval steps.
do
, s (cid:48) ), ∀ i = 1 , 2 .., m 10:
Calculate σ and σ (cid:48) using s and s (cid:48) 11:
V a surp ( s, u, σ ) ←− Surprise-Mixer( s, u, σ ) 12:
V a surp ( s (cid:48) , u (cid:48) , σ (cid:48) )
←− Target-Mixer( s (cid:48) , u (cid:48) , σ (cid:48) ) 13:
E ←− log (cid:18) (cid:80) Na =1 exp( V a surp ( s (cid:48) ,u (cid:48) ,σ (cid:48) ))
(cid:80)
Na =1 exp( V a surp ( s,u,σ ))
(cid:19) 14:
Calculate L ( θ ) using E in Equation15:
θ ←− θ − α ∇ θ L ( θ ) 16: end for 17: end if 18: if update-interval steps have passed then 19: θ − i ←− θ, ∀ i = 1 , 2 .., m 20: end if 21: end for
Experiments
Our experiments aim to evaluate the theoretical claims presented by EMIX along with its performance to prior MARL methods.
Speciﬁcally, we aim to answer the following questions;
(1) How does the provision of an EBM for surprise minimization compare to current MARL methods?
(2) Does the algorithm validate the theoretical claims corresponding to its components?
5.1 Energy-based Surprise Minimization
We assess the validity of EMIX, when combined with QMIX, on multi-agent StarCraft II micromanagement scenarios [48] as these consist of a larger number of agents with different action spaces.
This in turn motivates a greater deal of coordination.
Additionally, micromanagement scenarios in StarCraft II consist of multiple opponents which introduce a greater degree of surprise within consecutive states.
We compare our method to prior methods namely; (1) QMIX [44], constituting of nonlinear value function factorization with monotonicity constraints; (
[Table] [Table]
[53], consisting of linear additive factorization of Q function; (3) Counterfactual Multi-Agent Policy
Gradients (COMA) [11], which consist of counterfactual actor-critic updates in a centralized critic; and (4) Independent Q Learning (IQL) [54], wherein each agent acts independent of other agents.
In order to compare our surprise minimization scheme against pre-existing mechanisms, we compare
EMIX additionally to a model-free implementation of SMiRL [3] in QMIX.
We use the generalized version of SMiRL as it demonstrates reduced variance across batches [9].
This implementation is denoted as SMiRL-QMIX for comparisons.
Details related to the implementation of EMIX are presented in Appendix D.
Table 5 presents the comparison of success rate percentages between EMIX and prior MARL algorithms on 6 StarCraft II micromanagement scenarios.
Corresponding to each scenario, algorithms demonstrating higher success rate values in comparison to other methods have their entries highlighted in bold (see Appendix E.1 for a statistical analysis).
Out of the 6 scenarios considered, EMIX presents higher success rates on 5 of these scenarios depicting the suitability of the proposed approach.
In cases of so_many_baneling and 5m_vs _6m having large number of opponents and a greater level of surprise, EMIX aptly improves over prior methods.
When compared to QMIX, EMIX depicts improved success rates on all of the 6 scenarios.
On comparing EMIX with SMiRL-QMIX, EMIX demonstrates higher average success rates indicating surprise robust policies.
5.2 Ablation Study
We now present the ablation study for the various components of EMIX.
Our experiments aim to determine the effectiveness of the energy-based surprise minimization method.
Additionally, we also aim to evaluate the utility of dual approximators for surprise estimation in accordance with the precept from RL literature [21, 13, 20].
EMIX Objective: To weigh the effectiveness of energy-based scheme, we ablate the energy operator
T and only utilize V a surp .
Since this implementation employs dual approximators V a surp , ( i ) i ∈ { 1 , 2 } for stability, we call this implementation as TwinQMIX.
Thus, we compare between QMIX, TwinQMIX and
EMIX to assess the contributions of each of the proposed methods.
Figure 3 presents the comparison of average success rates for QMIX, TwinQMIX and EMIX on 3 different scenarios.
In comparison to QMIX, TwinQMIX adds stability to the original objective by incorporating surprising estimates.
On comparing TwinQMIX to
EMIX we note that dual approximators play little role in improving convergence.
Thus, the energybased surprise minimization scheme is the main facet for signiﬁcant performance improvement.
This is demonstrated in the 5m_vs_6m scenario wherein the EMIX implementation improves the performance of TwinQMIX in comparison to QMIX by utilizing a surprise-robust policy.
In the case of so_many _baneling scenario which consists of a large number of opponents (27 banelings), EMIX tackles surprise effectively by preventing a signiﬁcant drop in performance which is observed in cases of QMIX and TwinQMIX.
Surprise Minimization with Temperature: The importance of β can be validated by assessing its usage in surprise minimization.
We observe the variation of
E as it is a collection of surprise-based sample estimates across the batch.
Additionally, E consists of prior samples V a surp ( s, u, σ ) for V a surp ( s (cid:48) , u (cid:48) , σ (cid:48) ) which makes inference tractable.
Figure 4 presents the variation of Energy ratio E with the temperature parameter β during learning.
We compare two stable variations of E at β = 0 .
001 and β = 0 .
The objective minimizes E over the course of learning and attains thermal equilibrium with minimum energy.
Intuitively, equilibrium corresponds to convergence to optimal policy π ∗ which validates the claim in Theorem 2.
With β = 0 .
01 , EMIX presents improved convergence and surprise minimization for 5 out of theconsidered scenarios, hence validating the suitable choice of β .
The choice of β is further validated in Figure 5 wherein β = 0 .
01 provides consistent stable improvements over other values.
Lower values of β , such as β = 0 .
001 , do little to minimize surprise or improve performance.
Qualitative Analysis
We visualize and compare behaviors learned by surprise minimizing agents to the prior method of
QMIX.
Fig.
6 presents the comparison of EMIX and QMIX agent trajectories (in yellow arrows) on the challenging so_many_baneling task.
The task consists of 27 baneling opponents which rapidly attack the agent team on a bridge.
QMIX agents naively move to the central alley of the bridge and start attacking enemies early on.
While QMIX agents naively maximize returns, EMIX agents learn a different strategy.
EMIX agents rearrange themselves ﬁrst at the corners of the bridge.
Note that these corners provide cover from enemy’s ﬁre.
Thus, EMIX agents learn to take cover before approaching the enemy head-on.
This indicates that the surprise-robust policy is aware of the incoming fast-paced assault.
As another example, Fig.
7 presents behaviors on the 2s_vs_1sc task wherein two agents must collaborate together to defeat a SpineCrawler enemy.
The enemy, having a long tentacle pointing to the front, chooses to attack any one of the agents randomly in front of it.
Additionally, the tentacle has a ﬁxed length and cannot extend beyond this range.
Random intermittent attacks indicate that the agents face a greater degree of surprise with no prior knowledge of the enemy’s movement.
We observe that QMIX agents take turns to attack the enemy by moving back and forth to minimize damage.
EMIX agents, on the other hand, learn a different strategy.
One of the EMIX agents stands at a distance to attack th enemy while the other agent goes around to attack from behind.
This indicates that the policy is aware of enemy’s limited movement.
6.1 Predator-Prey Benchmark
We extend our comparison of EMIX on the Predator-Prey (particle world) tasks.
In addition to the difﬁculty of task, we vary the number of opponents.
This helps quantify the variation in performance against increasing level of surprise under ﬁxed dynamics.
Table 2 presents average returns.
While all agents present comparable performance on the easier tasks, EMIX improves over QMIX and
TwinQMIX on the more challenging punish and hard tasks.
In the case of punish , EMIX is the only method to achieve greater than 20 returns.
Additional results can be found in Appendix E.3.
[Table]
Discussion
Conclusion:
In this paper, we presented an energy-based perspective towards surprise minimization in multi-agent RL.
Towards this goal we introduce EMIX, an energy-based intrinsic motivation framework for surprise minimization in MARL algorithms.
EMIX utilizes a temporal EBM to estimate and minimize surprise jointly across all agents.
Our theoretical claims on the formulation of minimization of temporal energy with surprise are corroborated upon utilizing EMIX on a suite of challenging MARL tasks requiring signiﬁcant collaboration under fast-paced dynamics.
Future Work: While EMIX serves as a practical example of EBMs in cooperative MARL, it presents several new avenues for future work.
We shed light on 2 such aspects, (1) Provision of an energy-based model naturally raises the question of how can we efﬁciently sample from the surprise distribution?
Advances in sampling methods depict promise towards this aspect.
(2) Although suitable for lower dimensions, the scalability of EBMs towards high dimensional action spaces remains an open question.
We conjecture that the utility of density-based methods and generative models can address the scalability gap.
These directions are left for future work.
[-N (cid:88) a = exp ( V 2 ( s, u, σ )) ≤ || V 1 − V 
-]