<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Learning Deep Mean Field Games for Modeling Large Population Behavior</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2018 Spring</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10112528</idno>
					<idno type="doi"></idno>
					<title level='j'>International Conference on Learning Representations (ICLR)</title>
<idno></idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Jiachen Yang</author><author>Xiaojing Ye</author><author>Rakshit Trivedi</author><author>Huan Xu</author><author>Hongyuan Zha</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We consider the problem of representing collective behavior of large popula- tions and predicting the evolution of a population distribution over a discrete state space. A discrete time mean field game (MFG) is motivated as an interpretable model founded on game theory for understanding the aggregate effect of individ- ual actions and predicting the temporal evolution of population distributions. We achieve a synthesis of MFG and Markov decision processes (MDP) by showing that a special MFG is reducible to an MDP. This enables us to broaden the scope of mean field game theory and infer MFG models of large real-world systems via deep inverse reinforcement learning. Our method learns both the reward function and forward dynamics of an MFG from real data, and we report the first empirical test of a mean field game model of a real-world social media population.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">INTRODUCTION</head><p>Nothing takes place in the world whose meaning is not that of some maximum or minimum.</p><p>(Leonhard Euler)</p><p>Major global events shaped by large populations in social media, such as the Arab Spring, the Black Lives Matter movement, and the fake news controversy during the 2016 U.S. presidential election, provide significant impetus for devising new models that account for macroscopic population behavior resulting from the aggregate decisions and actions taken by all individuals <ref type="bibr">(Howard et al., 2011;</ref><ref type="bibr">Anderson &amp; Hitlin, 2016;</ref><ref type="bibr">Silverman, 2016)</ref>. Just as physical systems behave according to the principle of least action, to which Euler's statement alludes, population behavior consists of individual actions that may be optimal with respect to some objective. The increasing usage of social media in modern societies lends plausibility to this hypothesis <ref type="bibr">(Perrin, 2015)</ref>, since the availability of information enables individuals to plan and act based on their observations of the global population state. For example, a population's behavior directly affects the ranking of a set of trending topics on social media, represented by the global population distribution over topics, while each user's observation of this global state influences their choice of the next topic in which to participate, thereby contributing to future population behavior <ref type="bibr">(Twitter, 2017)</ref>. In general, this feedback may be present in any system where the distribution of a large population over a state space is observable (or partially observable) by each individual, whose behavior policy generates actions given such observations. This motivates multiple criteria for a model of population behavior that is learnable from real data:</p><p>1. The model captures the dependency between population distribution and their actions. 2. It represents observed individual behavior as optimal for some implicit reward.</p><p>3. It enables prediction of future population distribution given measurements at previous times.</p><p>We present a mean field game (MFG) approach to address the modeling and prediction criteria. Mean field games originated as a branch of game theory that provides tractable models of large agent populations, by considering the limit of N -player games as N tends to infinity <ref type="bibr">(Lasry &amp; Lions, 2007)</ref>. In this limit, an agent population is represented via their distribution over a state space, and each agent's optimal strategy is informed by a reward that is a function of the population distribution and their aggregate actions. The stochastic differential equations that characterize MFG can be specialized to many settings: optimal production rate of exhaustible resources such as oil among many producers <ref type="bibr">(Gu&#233;ant et al., 2011)</ref>; optimizing between conformity to popular opinion and consistency with one's initial position in opinion networks <ref type="bibr">(Bauso et al., 2016)</ref>; and the transition between competing technologies with economy of scale <ref type="bibr">(Lachapelle et al., 2010)</ref>. Representing agents as a distribution means that MFG is scalable to arbitrary population sizes, enabling it to simulate real-world phenomenon such as the Mexican wave in stadiums <ref type="bibr">(Gu&#233;ant et al., 2011)</ref>.</p><p>As the model detailed in Section 3 will show, MFG naturally addresses the modeling criteria in our problem context while overcoming limitations of alternative predictive methods. For example, time series analysis builds predictive models from data, but these models are incapable of representing any motivation (i.e. reward) that may produce a population's behavior policy. Alternatively, methods that employ the underlying population network structure have assumed that nodes are only influenced by a local neighborhood, do not account for a global state, and may face difficulty in explaining events as the result of any implicit optimization. <ref type="bibr">(Farajtabar et al., 2015;</ref><ref type="bibr">De et al., 2016)</ref>.</p><p>MFG is unique as a descriptive model whose solution tells us how a system naturally behaves according to its underlying optimal control policy. This observation enables us to draw a connection with the framework of Markov decision processes (MDP) and reinforcement learning (RL) <ref type="bibr">(Sutton &amp; Barto, 1998)</ref>. The crucial difference from a traditional MDP viewpoint is that we frame the problem as MFG model inference via MDP policy optimization: we use the MFG model to describe natural system behavior by solving an associated MDP, without imposing any control on the system. MFG offers a computationally tractable framework for adapting inverse reinforcement learning (IRL) methods <ref type="bibr">(Ng &amp; Russell, 2000;</ref><ref type="bibr">Ziebart et al., 2008;</ref><ref type="bibr">Finn et al., 2016)</ref>, with flexible neural networks as function approximators, to learn complex reward functions that may explain behavior of arbitrarily large populations. In the other direction, RL enables us to devise a data-driven method for solving an MFG model of a real-world system for temporal prediction. While research on the theory of MFG has progressed rapidly in recent years, with some examples of numerical simulation of synthetic toy problems, there is a conspicuous absence of scalable methods for empirical validation <ref type="bibr">(Lachapelle et al., 2010;</ref><ref type="bibr">Achdou et al., 2012;</ref><ref type="bibr">Bauso et al., 2016)</ref>. Therefore, while we show how MFG is well-suited for the specific problem of modeling population behavior, we also demonstrate a general data-driven approach to MFG inference via a synthesis of MFG and MDP.</p><p>Our main contributions are the following. We propose a data-driven approach to learn an MFG model along with its reward function, showing that research in MFG need not be confined to toy problems with artificial reward functions. Specifically, we derive a discrete time graph-state MFG from general MFG and provide detailed interpretation in a real-world setting (Section 3). Then we prove that a special case can be reduced to an MDP and show that finding an optimal policy and reward function in the MDP is equivalent to inference of the MFG model (Section 4). Using our approach, we empirically validate an MFG model of a population's activity distribution on social media, achieving significantly better predictive performance compared to baselines (Section 5). Our synthesis of MFG with MDP has potential to open new research directions for both fields.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">RELATED WORK</head><p>Mean field games originated in the work of <ref type="bibr">Lasry &amp; Lions (2007)</ref>, and independently as stochastic dynamic games in <ref type="bibr">Huang et al. (2006)</ref>, both of which proposed mean field problems in the form of differential equations for modeling problems in economics and analyzed the existence and uniqueness of solutions. <ref type="bibr">Gu&#233;ant et al. (2011)</ref> provided a survey of MFG models and discussed various applications in continuous time and space, such as a model of population distribution that informed the choice of application in our work. Even though the MFG framework is agnostic towards the choice of cost function (i.e. negative reward), prior work make strong assumptions on the cost in order to attain analytic solutions. We take a view that the dynamics of any game is heavily impacted by the reward function, and hence we propose methods to learn the MFG reward function from data.</p><p>Discretization of MFGs in time and space have been proposed <ref type="bibr">(Gomes et al., 2010;</ref><ref type="bibr">Achdou et al., 2012;</ref><ref type="bibr">Gu&#233;ant, 2015)</ref>, serving as the starting point for our model of population distribution over discrete topics; while these early work analyze solution properties and lack empirical verification, we focus on algorithms for attaining solutions in real-world settings. Related to our application case, prior work by <ref type="bibr">Bauso et al. (2016)</ref> analyzed the evolution of opinion dynamics in multi-population environments, but they imposed a Gaussian density assumption on the initial population distribution and restrictions on agent actions, both of which limit the generality of the model and are not assumed in our work. There is a collection of work on numerical finite-difference methods for solving continuous mean field games <ref type="bibr">(Achdou et al., 2012;</ref><ref type="bibr">Lachapelle et al., 2010;</ref><ref type="bibr">Carlini &amp; Silva, 2014)</ref>. These methods involve forward-backward or Newton iterations that are sensitive to initialization and have inherent computational challenges for large real-valued state and action spaces, which limit these methods to toy problems and cannot be scaled to real-world problems. We overcome these limitations by showing how the MFG framework enables adaptation of RL algorithms that have been successful for problems involving unknown reward functions in large real-world domains.</p><p>In reinforcement learning, there are numerous value-and policy-based algorithms employing deep neural networks as function approximators for solving MDPs with large state and action spaces <ref type="bibr">(Mnih et al., 2013;</ref><ref type="bibr">Silver et al., 2014;</ref><ref type="bibr">Lillicrap et al., 2015)</ref>. Even though there are generalizations to multi-agent settings <ref type="bibr">(Hu et al., 1998;</ref><ref type="bibr">Littman, 2001;</ref><ref type="bibr">Lowe et al., 2017)</ref>, the MDP and Markov game frameworks do not easily suggest how to represent systems involving thousands of interacting agents whose actions induce an optimal trajectory through time. In our work, mean field game theory is the key to framing the modeling problem such that RL can be applied.</p><p>Methods in unknown MDP estimation and inverse reinforcement learning aim to learn an optimal policy while estimating an unknown quantity of the MDP, such as the transition law <ref type="bibr">(Burnetas &amp; Katehakis, 1997)</ref>, secondary parameters <ref type="bibr">(Budhiraja et al., 2012)</ref>, and the reward function <ref type="bibr">(Ng &amp; Russell, 2000)</ref>. The maximum entropy IRL framework has proved successful at learning reward functions from expert demonstrations <ref type="bibr">(Ziebart et al., 2008;</ref><ref type="bibr">Boularias et al., 2011;</ref><ref type="bibr">Kalakrishnan et al., 2013)</ref>. This probabilistic framework can be augmented with deep neural networks for learning complex reward functions from demonstration samples <ref type="bibr">(Wulfmeier et al., 2015;</ref><ref type="bibr">Finn et al., 2016)</ref>.</p><p>Our MFG model enables us to extend the sample-based IRL algorithm in <ref type="bibr">Finn et al. (2016)</ref> to the problem of learning a reward function under which a large population's behavior is optimal, and we employ a neural network to process MFG states and actions efficiently.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">MEAN FIELD GAMES</head><p>We begin with an overview of a continuous-time mean field games over graphs, and derive a general discrete-time graph-state MFG <ref type="bibr">(Gu&#233;ant, 2015)</ref>. Then we give a detailed presentation of a discretetime MFG over a complete graph, which will be the focus for the rest of this paper.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">MEAN FIELD GAMES ON GRAPHS</head><p>Let G = (V, E) be a directed graph, where the vertex set V = {1, . . . , d} represents d possible states of each agent, and E &#8838; V &#215;V is the edge set consisting of all possible direct transition between states (i.e., a agent can hop from i to j only if (i, j) &#8712; E). For each node i &#8712; V, define</p><p>be the density (proportion) of agent population in state i at time t, and &#960;(t) := (&#960; 1 (t), . . . , &#960; d (t)). Population dynamics are generated by right stochastic matrices</p><p>Moreover, we have a value function V i (t) of state i at time t, and a reward function r i (&#960;(t), P i (t))<ref type="foot">foot_0</ref> , quantifying the instantaneous reward for agents in state i taking transitions with probability P i (t) when the current distribution is &#960;(t). We are mainly interested in a discrete time graph state MFG, which is derived from a continuous time MFG by the following proposition. Appendix A provides a derivation from the continuous time MFG.</p><p>Proposition 1. Under a semi-implicit discretization scheme with unit time step labeled by n, the backward Hamilton-Jacobi-Bellman (HJB) equation and the forward Fokker-Planck equation for each i &#8712; {1, . . . , d} and n = 0, . . . , N -1 in a discrete time graph state MFG are given by: (HJB) </p><p>)). We focus on the complete graph in this paper, as the methodology can be readily applied to general directed graphs. While Section 4 will show a connection between MFG and MDP, we note here that a "state" in the MFG sense is a node in V and not an MDP state. <ref type="foot">2</ref> We now interpret the model using the example of evolution of user activity distribution over topics on social media, to provide intuition and set the context for our real-world experiments in Section 5. Independent of any particular interpretation, the MFG approach is generally applicable to any problem where population size vastly outnumbers a set of discrete states.</p><p>&#8226; Population distribution &#960; n &#8712; &#8710; d-1 for n = 0, . . . , N . Each &#960; n is a discrete probability distribution over d topics, where &#960; n i is the fraction of people who posted on topic i at time n. Although a person may participate in more than one topic within a time interval, normalization can be enforced by a small time discretization or by using a notion of "effective population size", defined as population size multiplied by the max participation count of any person during any time interval. &#960; 0 is a given initial distribution.</p><p>&#8226; Transition matrix P n &#8712; S(G). P n ij is the probability of people in topic i switching to topic j at time n, so we refer to P n i as the action of people in topic i. P n generates the forward equation</p><p>. . , d}. This is the reward received by people in topic i who choose action P n i at time n, when the distribution is &#960; n . In contrast to previous work, we learn the reward function from data (Section 4.1). We make a locality assumption: reward for i depends only on P n i , not on the entire P n , which means that actions by people in j = i have no instantaneous effect on the reward for people in topic i.</p><p>i is the expected maximum total reward of being in topic i at time n. A terminal value V N is given, which we set to zero to avoid making any assumption on the problem structure beyond what is contained in the learned reward function.</p><p>&#8226; Average reward e i (&#960;, P, V ), for i &#8712; {1, . . . , d} and V &#8712; R d and P &#8712; S(G). This is the average reward received by agents at topic i when the current distribution is &#960;, action P is chosen, and the subsequent expected maximum total reward is V . For a general r ij (&#960;, P ), it is defined as:</p><p>Intuitively, agents want to act optimally in order to maximize their expected total average reward. For P &#8712; S(G) and a vector q &#8712; S i (G), define P(P, i, q) to be the matrix equal to P , except with the i-th row replaced by q. Then a Nash maximizer is defined as follows: Definition 1. A right stochastic matrix P &#8712; S(G) is a Nash maximizer of e(&#960;, P, V ) if, given a fixed &#960; &#8712; &#8710; d-1 and a fixed V &#8712; R d , there is e i (&#960;, P, V ) &#8805; e i (&#960;, P(P, i, q), V ) (5) for any i &#8712; {1, . . . , d} and any q &#8712; S i (G).</p><p>The rows of P form a Nash equilibrium set of actions, since for any topic i, the people in topic i cannot increase their reward by unilaterally switching their action from P i to any q. Under Definition 1, the value function of each topic i at each time n satisfies the optimality criteria:</p><p>A solution of the MFG is a sequence of pairs {(&#960; n , V n )} n=0,...,N satisfying optimality criteria (6) and forward equation (3).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">INFERENCE OF MFG VIA MDP OPTIMIZATION</head><p>A Markov decision process is a well-known framework for optimization problems. We focus on the discrete time MFG in Section 3.2 and prove a reduction to a finite-horizon deterministic MDP, whose state trajectory under an optimal policy coincides with the forward evolution of the MFG. This leads to the essential insight that solving the optimization problem of an MDP is equivalent to solving an MFG that describes population behavior. This connection will enable us to apply efficient inverse RL methods, using measured population trajectories, to learn an MFG model along with its reward function in Section 4.1. The MDP is constructed as follows: Definition 2. A finite-horizon deterministic MDP for a discrete time MFG over a complete graph is defined as:</p><p>, the population distribution at time n.</p><p>&#8226; Actions: P n &#8712; S(G), the transition probability matrix at time n.</p><p>&#8226; Reward: R(&#960; n , P n ) :=</p><p>&#8226; Finite-horizon state transition, given by Eq (3): &#8704;n &#8712; {0, . . . , N -1} :</p><p>The value function of a solution to the discrete time MFG over a complete graph defined by optimality criteria (6) and forward equation (3) is a solution to the Bellman optimality equation of the MDP in Definition 2.</p><p>Proof. Since r ij depends on P n only through row P n i , optimality criteria 6 can be written as</p><p>We now define V * (&#960; n ) as follows and show that it is the value function of the constructed MDP in Definition 2 by verifying that it satisfies the Bellman optimality equation:</p><p>which is the Bellman optimality equation for the MDP in Definition 2.</p><p>Corollary 1. Given a start state &#960; 0 , the state trajectory under the optimal policy of the MDP in Definition 2 is equivalent to the forward evolution part of the solution to the MFG.</p><p>Proof. Under the optimal policy, equations 11 and 8 are satisfied, which means the matrix P generated by the optimal policy at any state &#960; n is the Nash maximizer matrix. Therefore, the state trajectory {&#960; n } n=0,...,N is the forward part of the MFG solution.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">REINFORCEMENT LEARNING SOLUTION FOR MFG</head><p>MFG provides a general framework for addressing the problem of modeling population dynamics, while the new connection between MFG and MDP enables us to apply inverse RL algorithms to solve the MDP in Definition 2 with unknown reward. In contrast to previous MFG research, most of which impose reward functions that are quadratic in actions and logarithmic in the state distribution <ref type="bibr">(Gu&#233;ant, 2009;</ref><ref type="bibr">Lachapelle et al., 2010;</ref><ref type="bibr">Bauso et al., 2016)</ref>, we learn a reward function using demonstration trajectories measured from actual population behavior, to ground the MFG representation of population dynamics on real data.</p><p>We leverage the MFG forward dynamics (Eq 3) in a sample-based IRL method based on the maximum entropy IRL framework <ref type="bibr">(Ziebart et al., 2008)</ref>. From this probabilistic viewpoint, we minimize the relative entropy between a probability distribution p(&#964; ) over a space of trajectories T := {&#964; i } i and a distribution q(&#964; ) from which demonstrated expert trajectories are generated <ref type="bibr">(Boularias et al., 2011)</ref>. This is related to a path integral IRL formulation, where the likelihood of measured optimal trajectories is evaluated only using trajectories generated from their local neighborhood, rather than uniformly over the whole trajectory space <ref type="bibr">(Kalakrishnan et al., 2013)</ref>. Specifically, making no assumption on the true distribution of optimal demonstration other than matching of reward expectation, we posit that demonstration trajectories &#964; i = (&#960; 0 , P 1 , . . . , &#960; N -1 , P N -1 ) i are sampled from the maximum entropy distribution (Jaynes, 1957):</p><p>where R W (&#964; ) = n R W (&#960; n , P n ) is the sum of reward of single state-action pairs over a trajectory &#964; , and W are the parameters of the reward function approximator (derivation in Appendix E).</p><p>Intuitively, this means that trajectories with higher reward are exponentially more likely to be sampled. Given M sample trajectories &#964; j &#8712; D samp from k distributions F 1 (&#964; ), . . . , F k (&#964; ), an unbiased estimator of the partition function Z = exp(R W (&#964; ))d&#964; using multiple importance sampling is &#7824; := 1 M &#964;j z j exp(R W (&#964; j )) <ref type="bibr">(Owen &amp; Zhou, 2000)</ref>, where importance weights are</p><p>-1 (derivation in Appendix F). Each action matrix P is sampled from a stochastic policy F k (P ; &#960;, &#952;) (overloading notation with F (&#964; )), where &#960; is the current state and &#952; the policy parameter. The negative log likelihood of L demonstration trajectories &#964; i &#8712; D demo is:</p><p>We build on Guided Cost Learning (GCL) in <ref type="bibr">Finn et al. (2016)</ref> (Alg 1) to learn a deep neural network approximation of R W (&#960;, P ) via stochastic gradient descent on L(W ), and learn a policy F (P ; &#960;, &#952;) using a simple actor-critic algorithm <ref type="bibr">(Sutton &amp; Barto, 1998)</ref>. In contrast to GCL, we employ a combination of convolutional neural nets and fully-connected layers to process both the action matrix P and state vector &#960; efficiently in a single architecture (Appendix C), analogous to how <ref type="bibr">Lillicrap et al. (2015)</ref> handle image states in Atari games. Due to our choice of policy parameterization (described below), we also set importance weights to unity for numerical stability. These implementation choices result in successful learning of a reward representation (Fig <ref type="figure">1</ref>).</p><p>Our forward MDP solver (Alg 2) performs gradient ascent on the policy's expected start value E[v(&#960; 0 )|F (P ; &#960;, &#952;)] w.r.t. &#952;, to find successively better policies F k (P ; &#960;, &#952;). We construct the joint distribution F (P ; &#960;, &#952;) informed by domain knowledge about human population behavior on social media, but this does not reduce the generality of the MFG framework since it is straightforward to employ flexible policy and value networks in a DDPG algorithm when intuition is not available <ref type="bibr">(Silver et al., 2014;</ref><ref type="bibr">Lillicrap et al., 2015)</ref>. Our joint distribution is d instances of a d-dimensional Dirichlet distribution, each parameterized by an &#945; i &#8712; R d + . Each row P i is sampled from</p><p>where B(&#8226;) is the Beta function and &#945; i j is defined using the softplus function &#945; i j (&#960;, &#952;) := ln(1 + exp{&#952;(&#960; j -&#960; i )}), which is a monotonically increasing function of the population density difference &#960; j -&#960; i . In practice, a constant scaling factor c &#8712; R can be applied to &#945; for variance reduction. Finally, we let F (P n ; &#960; n , &#952;) = d i=1 f (P n i ; &#945; i (&#960; n , &#952;)) denote the parameterized policy, from which P n is sampled based on &#960; n , and whose logarithmic gradient &#8711; &#952; ln(F ) can be used in a policy gradient algorithm. We learned an approximate value function V (&#960;; w) as a baseline for variance reduction, approximated as a linear combination of all polynomial features of &#960; up to second order, with parameter w <ref type="bibr">(Sutton et al., 2000)</ref>. in reinforcement learning. Our method is scalable to arbitrarily large populations, because the MFG framework represents population density rather than individual agents, while the representations are linear in the number of MFG states and quadratic in the transition matrix. Our experiments on real data show that MFG is a powerful framework for learning a reward and policy that can predict trajectories of a real world population more accurately than alternatives. Even with a simple policy parameterization designed via some domain knowledge, our method attained superior performance on test data. It motivates exploration of flexible neural networks for more complex applications.</p><p>An interesting extension is to develop an efficient method for solving the discrete time MFG in a more general setting, where the reward at each state i is coupled to the full population transition matrix. Our work also opens the path to a variety of real-world applications, such as a synthesis of MFG with models of social networks at the level of individual connections to construct a more complete model of social dynamics, and mean field models of interdependent systems that may display complex interactions via coupling through global states and reward functions.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A PROOF OF PROPOSTION 1</head><p>Given the definitions in Section 3.1, a mean field game is defined by a Hamilton-Jacobi-Bellman (HJB) equation evolving backwards in time and a Fokker-Planck equation evolving forward in time. The continuous-time Hamilton-Jacobi-Bellman (HJB) equation on G is</p><p>where r i (&#960;, P i ) is the reward function, and V i (t) is the value function of state i at time t. Note that the reward function r i (&#960;(t), P i (t)) is often presented as -c i (&#960;(t), P i (t)) for some cost function c i (&#960;(t), P i (t)) in the MFG context, and similarly for V i (t). In addition, we set r i (&#960;(t),</p><p>e. P (t) must be a valid transition matrix). For any fixed &#960;(t), let H i (&#960;(t), &#8226;) be the Legendre transform of c i (&#960;(t), &#8226;) defined by</p><p>Then the HJB equation ( <ref type="formula">15</ref>) is an analogue to the backward equation in mean field games</p><p>where</p><p>is the dual variable of P i . We can discretize (15) using a semi-implicit scheme with unit time step labeled by n to obtain</p><p>Rearranging ( <ref type="formula">18</ref>) yields the discrete time HJB equation over a graph (19)</p><p>The forward evolving Fokker-Planck equation for the continuous-time graph-state MFG is given by</p><p>where</p><p>where &#8706; ui H j (&#960;, u) is the partial derivative w.r.t. the coordinate corresponding to the i-th index of the argument u &#8712; R | V- j | . We can set Q ji (t) = 0 for all (j, i) / &#8712; E, so that Q(t) := [Q ji (t)] can be regarded as the d-by-d infinitesimal generator matrix of states &#960;(t), and hence (20) can be written as &#960; &#8242; (t) = &#960;(t)Q(t), where &#960;(t) &#8712; R d is a row vector. Then an Euler discretization of (20) with unit time step reduces to &#960; n+1 -&#960; n = &#960; n Q n , which can be written as</p><p>where</p><p>If the graph G is complete, meaning E = {(i, j) : 1 &#8804; i, j &#8804; d}, then the summation is taken over j = 1, . . . , d. For ease of presentation, we only consider the complete graph in this paper, as all derivations can be carried out similarly for general directed graphs. A solution of a mean field game defined by ( <ref type="formula">19</ref>) and ( <ref type="formula">22</ref>) is a collection of V n i and &#960; n i for i = 1, . . . , d and n = 0, . . . , N .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B ALGORITHMS</head><p>We learn a reward function and policy using an adaptation of GCL <ref type="bibr">(Finn et al., 2016)</ref> in Alg 1 and a simple actor-critic Alg 2 <ref type="bibr">(Sutton &amp; Barto, 1998)</ref> as a forward RL solver.</p><p>Algorithm 1 Guided cost learning 1: procedure GUIDED COST LEARNING 2:</p><p>Initialize F 0 (P ; &#960;, &#952;) as random policy and reward network weights W 0 while Avg &#960;i,Pi&#8764;Ddemo (R W t (&#960; i , P i ) -R W t-1 (&#960; i , P i )) &gt; dR do for episodes s = 1, . . . , S do 4:</p><p>Sample initial distribution &#960; 0 from {&#960; 0 } M days 5:</p><p>for time step n = 0, . . . , N -1 do 6:</p><p>Sample action P n &#8764; F (P ; &#960; n , &#952;)</p><p>7:</p><p>Generate &#960; n+1 using Eq 3 8:</p><p>Receive reward R W (&#960; n , P n ) 9:</p><p>&#948; &#8592; R + V (&#960; n+1 ; w) -V (&#960; n ; w) 10:</p><p>w &#8592; w + &#958;&#948;&#8711; w V (&#960; n ; w)</p><p>11:</p><p>&#952; &#8592; &#952; + &#946;&#948;&#8711; &#952; log(F (P ; &#960; n , &#952;))</p><p>12:</p><p>end for 13:</p><p>end for 14: end procedure C REWARD NETWORK Our reward network uses two convolutional layers to process the 15 &#215; 15 action matrix P , which is then flattened and concatenated with the state vector &#960; and processed by two fully-connected layers regularized with L1 and L2 penalties and dropout (probability 0.6). The first convolutional layer zero-pads the input into a 19 &#215; 19 matrix and convolves one filter of kernel size 5 &#215; 5 with stride 1 and applies a rectifier nonlinearity. The second convolutional layer zero-pads its input into a 17 &#215; 17 matrix and convolves 2 filters of kernel size 3 &#215; 3 with stride 1 and applies a rectifier nonlinearity. The fully connected layers have 8 and 4 hidden rectifier units respectively, and the output is a single fully connected tanh unit. All layers were initialized using the Xavier normal initializer in Tensorflow.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D EXPERIMENT DETAILS</head><p>By default, Twitter users in a certain geographical region primarily see the trending topics specific to that region <ref type="bibr">(Twitter, 2017)</ref>. This experiment focused on the population and trending topics in the city of Atlanta in the U.S. state of Georgia. First, a set of 406 active users were collected to form the fixed population. This was done by collecting a set of high-visibility accounts in Atlanta (e.g. the Atlanta Falcons team), gathering all Twitter users who follow these accounts, filtering for those whose location was set to Atlanta, and filtering for those who responded to least two trending topics within four days.</p><p>Data collection proceeded as follows for 27 days: at 9am of each day, a list of the top 14 trending topics on Twitter in Atlanta was recorded; for each hour until midnight, for each topic, the number of users who responded to the topic and the transition counts among topics within the past hour was recorded. Whether or not a user responded to a topic was determined by checking for posts by the user containing unique words for that topic; the "hashtag" convention of trending topics on Twitter reduces the likelihood of false positives. The hourly count of people who did not respond to any topic was recorded as the count for a "null topic". Although some users may respond to more than one topic within each hour, the data shows that this is negligible, and a shorter time interval can be used to reduce this effect. The result of data collection is a set of trajectories, one trajectory per day, where each trajectory consists of hourly measurements of the population distribution over d = 15 topics and their transition matrix over N = 16 hours.</p><p>The training set consists of trajectories {&#960; 0,m , P 0,m , . . . , P N -2,m , &#960; N -1,m } m=1,...,M over the first M = 21 days. MFG uses the initial distribution &#960; 0 of each day, along with the transition equation of the constructed MDP and the policy F (P ; &#960; n , &#952;), to produce complete trajectories for training (Alg 2 lines 4,6,7). In contrast, VAR and RNN are supervised learning methods and they use all measured distributions. RNN employs a simple recurrent unit with ReLU as nonlinear activation and weight matrix of dimension d &#215; d. VAR was implemented using the Statsmodels module in Python, with order 18 selected via random sub-sampling validation with validation set size 5 <ref type="bibr">(Seabold &amp; Perktold, 2010)</ref>. For prediction accuracy, all three methods were evaluated against data from 6 held-out test days. Table <ref type="table">1</ref> shows parameters of Alg 2 and 1. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E MAXIMUM ENTROPY DISTRIBUTION</head><p>Given a finite set of trajectories {&#964; i } i , where each trajectory is a sequence of state-action pairs &#964; i = (s i1 , a i1 , . . . , ). Suppose each trajectory &#964; i has an unknown probability p i . The entropy of the probability distribution is H =i p i ln(p i ). In the continuous case, we write the differential entropy: The first constraint says: the expected reward over all trajectories is equal to an empirical measurement &#181; r . We write the Lagrangian L: where Z := e -&#955;2r(&#964; ) d&#964; . Then the constant &#955; 2 is determined by: &#181; r = p(&#964; )r(&#964; )d&#964; = 1 Z(&#955; 2 ) e -&#955;2r(&#964; ) r(&#964; )d&#964; = -&#8706; &#8706;&#955; 2 ln(Z(&#955; 2 ))</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F MULTIPLE IMPORTANCE SAMPLING</head><p>We show how multiple importance sampling <ref type="bibr">(Owen &amp; Zhou, 2000)</ref> can be used to estimate the partition function in the maximum entropy IRL framework. The problem is to estimate Z := f (x)dx.</p><p>Let p 1 , . . . , p m be m proposal distributions, with n j samples from the j-th proposal distribution, so that samples can be denoted X ij for i = 1, . . . , n j and j = 1, . . . , m. Let w j (x) for j = 1, . . . , m satisfy 0 &#8804; w j (x) &#8804; m j=1 w j (x) = 1</p><p>Then define the estimator</p><p>Let S(p j ) = {x | p j (x) &gt; 0} be the support of p j and S(w j ) = {x | w j (x) &gt; 0} be the support of w j , and let them satisfy S(w j ) &#8834; S(p j ). Under these assumptions:</p><p>In particular, choose where n = m j=1 n j is the total count of samples. Further assuming that samples are drawn uniformly from all proposal distributions, so that n j = n k = n/m for all j, k &#8712; {1, . . . , m}, the expression for &#7824; reduces to the form used in Eq 13:</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>We here consider a rather special formulation where the reward function ri only depends on the overall population distribution &#960;(t) and the choice Pi the players in state i made.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>Section 4 explains that the population distribution &#960; is the appropriate definition of an MDP state.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2"><p>If this assumption is removed, there is a resemblance between the discrete time MFG and a Markov game in a continuous state and continuous action space<ref type="bibr">(Littman, 2001;</ref><ref type="bibr">Hu et al., 1998)</ref>. However, it turns out that the general MFG is a strict generalization of a multi-agent MDP (Appendix G).</p></note>
		</body>
		</text>
</TEI>
