Modeling, simulation, and analysis of interacting agent systems is a broad field of research, with existing approaches reaching from informal descriptions of interaction dynamics to more formal, mathematical models. In this paper, we study agent-based models (ABMs) given as continuous-time stochastic processes and their pathwise approximation by ordinary and stochastic differential equations (SDEs) for medium to large populations. By means of an appropriately adapted transfer operator approach, we study the behavior of the ABM process on long time scales. We show that, under certain conditions, the transfer operator approach allows us to bridge the gap between the pathwise results for large populations on finite timescales, i.e., the SDE limit model, and approaches built to study dynamical behavior on long time scales like large deviation theory. The latter provides a rigorous analysis of rare events including the associated asymptotic rates on timescales that scale exponentially with the population size. We demonstrate that it is possible to reveal metastable structures and timescales of rare events of the ABM process by finite-length trajectories of the SDE process for large enough populations. This approach has the potential to drastically reduce computational effort for the analysis of ABMs.

This article provides a lucid mathematical framework for describing and analyzing social interaction dynamics as described by agent-based models (ABMs) including standard models for opinion formation or spreading of infectious diseases on social networks. For the setting of a moderate population size (i.e., many but not infinitely many agents), an approximative stochastic model is analyzed which, in contrast to the commonly used deterministic mean-field limit, exhibits stochastic effects like metastable behavior and can be used for studying timescales of rare transitions. The theory of large deviations is used to characterize these rare events completely for both the agent-based model and its stochastic approximation. Our results are significant for the field of research because they enable a twofold decrease of computational effort when studying systems of interacting agents, which will considerably expand the possibilities of their analysis.

Social dynamics and collective social phenomena arise in systems of multiple agents that act and interact, often based on incomplete information, within a social network embedded in a common environment, which can be given by geographical conditions, infrastructure, resources, etc., as well as by norms, rules, and narratives. An agent can represent an individual, a household, firm, political or administrative organization, or any type of discrete entity. A wide range of applications, such as innovation spreading (e.g., Ref. 1) or infection kinetics (e.g., Ref. 2) is addressed, using a wide spectrum of methods from data-based micro-simulation of synthetic populations (e.g., Ref. 3) to abstract individual-4 and agent-based models (ABMs) for studying underlying dynamic mechanisms. Comparatively, compact models of social dynamics are present especially in the fields of socio- and econonophysics (see, e.g., the recent special issue “From statistical physics to social sciences”).5 A prime application lies in opinion dynamics, a field that goes back to the introduction of the voter model by Clifford and Sudbury6 in the 1970s, and later on obtained its name by Holley.7 The basic idea is that agents imitate the opinion of neighbors. Various modifications in the representation of opinions, imitation details, and the interaction structures exist (see, e.g., Refs. 8–10 for recent overviews). Throughout the paper, we focus on basic ABMs of this kind.

While the focus on the individuals in social systems and their interactions was proposed as early as 1957 by Orcutt,11 only in the 1990s, motivated by the increasing computing power, computer simulations of the resulting dynamics became a commonly used tool. Also nowadays, many models are implemented with the help of (often object-oriented and discrete-time) software frameworks for agent-based modeling (see, e.g., Ref. 12). Not always the model is precisely specified beforehand. The basics of an ABM are easily communicable, e.g., to stakeholders, as individual (inter)action rules at the microlevel and stepwise simulation of the overall system’s dynamics can be explained without requiring mathematical expertise of the audience. However, the great freedom of the modeler in defining details can make model documentation a challenge.13 One point that often remains ambiguous in ABMs with a discrete time step—which is the overwhelming majority—is scheduling, that is, which agent(s) influence(s) which other agent(s) in which order in each time step. As Weimer et al.14 point out, most textbooks do not deeply reflect upon this topic15 and models commonly use random interaction orders in each step. In this case, the question arises whether agents “see” the changes already made within the same time step by other agents acting earlier. For parallelization of the ABM simulation, this may lead to problems, however. When considering an ABM to be a representation of a real-world social system, time discretization into steps in which each agent acts once is anyhow somewhat artificial. As an alternative to the discrete-time description of ABMs, there is a variety of approaches using continuous-time Markov processes (see, e.g., Refs. 16 and 17) a corresponding software framework is proposed in Ref. 18. In this paper, we will adopt this continuous-time description, not only because it allows us to circumvent the scheduling problem but mainly because it simplifies the mathematical approach taken herein.

Whether we consider simulation-oriented and rather informal ABMs or more precise mathematical modeling approaches for interacting agent dynamics, we always have to face severe practical and theoretical challenges if the number N of agents and/or the timescale T of interest become large. With increasing N and/or T, the computational effort increases drastically (in terms of operations per time step and in terms of the total number of time steps required), which renders simulation-based analysis of the dynamics practically infeasible for ABMs with very large N and/or T.

Since the emergence of ABMs, several approaches have been discussed for meeting this challenge. The most prominent ones consider

  • the large population limit N for not too large, N-independent timescale T by constructing appropriate limit equations that describe the effective dynamics of the ABM but themselves are much less demanding computationally and analytically, or

  • the behavior of the ABM on exponentially long timescales Texp(ζN) via WKB approximations (after Wentzel, Kramers, and Brillouin) or the large deviation principle (LDP).

There are a lot of results and remarks on the relation between (A) and (B), but the picture is far from being complete. This article contributes to making the picture clearer. In particular, it bridges the gap between (A) and (B) by means of the so-called transfer operator approach. For the sake of comprehensibility, the subsequent considerations will be limited to a voter model like network-based form of ABMs without any spatial component.

The main well-known result with regard to (A), the large population limit, is the insight that, for large N, the ABM (described as Markov jump process) can be approximated by a closed system of ordinary differential equations (ODE or mean-field ODE).19,20 As we will see later, this is a pathwise result, i.e., the rescaled trajectory (e.g., given by opinion percentages) of the ABM converges to the trajectory of the ODE system for N for a fixed finite time interval [0,T]. For moderately large N, one will see deviations between the trajectories that are due to the stochastic fluctuations of the ABM dynamics. These fluctuations can be included into the description by an extension of the ODE system to a stochastic differential equation (SDE),20,21 which allows us to reproduce the fluctuations up to second order. Since the ABM process and the SDE process are of stochastic nature, it is often omitted that this is a pathwise result for medium to large N and fixed finite time interval [0,T], too, as we will also discuss in more detail below. In most articles on the subject, the SDE-based description is not discussed directly, but instead in terms of a mean-field approximation leading to the corresponding Fokker–Planck equations (see, e.g., Refs. 8 and 22).

When there is dynamical behavior on timescales that scale exponentially with N, i.e., Texp(ζN), case (B) from above, formal approaches via asymptotic expansions using the well-known WKB method23 or by means of the mathematically more rigorous large deviation principle (LDP)24 allow us to accurately characterize the associated rare events as remote tail events. That is, there are rare events that appear with very small probability pexp(ζN) as large deviations from the expected dynamical behavior of the ABM. As one example, we consider ABM dynamics, which exhibit so-called metastable sets or states to which the process is attracted for long periods of time before the rare event of an exit from the metastable sets and into another one occurs. For social systems, understanding such rare events can be of great interest because they should be avoided (e.g., an outbreak of pandemics or riots) or because, on the contrary, a transition is desirable (e.g., a shift to environmentally friendly technologies or healthy lifestyles). Often, the respective rare events, e.g., switching between metastable sets, cannot be described by the mean-field ODE, which typically exhibits asymptotically stable fixed points instead of metastable sets. Thus, the ODE system often is irrelevant for studying the behavior of the ABM on the longest timescales. As we will see below, the rare events can be understood and characterized by LDP-based analysis, at least in theory. However, for large N, the necessary computations often are infeasible in practice. As has been observed and discussed in the literature,25 in some cases, they can be replaced by LDP-based computations for the associated mean-field SDE, at least under certain precautions that will be discussed below in detail.

The connection between (A) and (B) lies in understanding the behavior of the system on long (but not necessarily exponential) timescales connected to metastability. For this case, several approaches utilizing transfer operators have been developed, e.g., so-called Markov state models (MSMs).26,27 We will show how to adapt and use them for studying ABM dynamics. As the main result, these techniques will allow us to use results from (A) in order to characterize rare events on long timescales for (fixed) medium or large N and to understand how this characterization is related to (B). Similar questions related to metastability have already been discussed in the literature, mainly for (discrete-time) Markov chain approaches,28 and via the Fokker–Planck equation.29 Herein, we will provide new insights illustrated by specific examples. The main point is that MSM building and related techniques like extended dynamic mode decomposition (EDMD)—see Ref. 30 for a recent overview—require many short trajectories of finite length only, allowing, e.g., for parallel computing to determine quantities of interest.

The paper is structured as follows: the agent-based model and its continuous-time description as a transition jump process are introduced in Sec. II. A guiding example reappears in Secs. IIIV for illustration. We rescale the transition jump process and consider the large population limit processes given by ODE and SDE systems. Next, long timescales and metastability are discussed and illustrated in Sec. III by means of the transfer operator approach. Using MSMs and the projected transfer operator, we characterize mean first exit times. These reappear in Sec. IV, where we analyze rare events on exponentially long timescales using LDP-based approaches. We address the advantages and limitations arising in both approaches. Finally, open questions and future work are discussed in Sec. V.

The starting point in this paper is a continuous-time ABM without spatial resolution where agents are nodes in an interaction network, similarly to the discrete-time model given in Ref. 31. In analogy to the term interacting particle system, which is used in the context of chemical reaction networks, we also refer to the considered model as an interacting agent system. Each agent can switch according to given transition rules between finitely many states (called types). If the type space is {1,,n} and we consider N agents, then the state space of the ABM is {1,,n}N, i.e., its size grows combinatorially like nN, which poses a problem when N becomes very large.

Alternatively, the ABM can be described via the population state, which counts the number of agents for each of the available types. That is, the size of population state space scales asymptotically like Nn in the worst case. For the basic case of homogeneous agents and a complete interaction network, or if agents randomly interact with each other, the population space description is exact, otherwise it already entails an approximation due to aggregation. In the following, we assume completeness of the interaction network for the sake of simplicity. Then, the ABM transition rules between the types imply transition rules between population states. The associated propensities depend on the total population state.

The temporal evolution of the population state is given by the Markov jump process, called transition jump process or ABM process, and can be characterized by a master equation, in direct analogy to the reaction jump process considered in the context of chemical reaction systems. By applying Gillespie’s algorithm32 for the numerical simulation of the transition jump process, the problems of scheduling described above are naturally avoided. However, these simulations become computationally intensive for settings with numerous agents.

The considered system of interacting agents consists of

  • a fixed number NN of agents,

  • a set {Si:i=1,,n} of typesSi available to the agents, i.e., at any point in time each agent owns one of these types,

  • a set {R1,,RK} of transition rulesRk defining possible changes of the agents’ types, i.e., representing actions of and interactions between agents,

  • a set of propensity functions specifying the rates at which transitions randomly occur depending on the population state.

In the agent-based context, transition rules are mostly described from the perspective of a single agent; they may also be referred to as update rules or decisions. To completely specify the dynamics, in this case, also a description of the interaction patterns and update orders (scheduling) is needed. Here, we adopt the formulation used commonly in the chemical context that takes a system level perspective, leading to a simpler and more transparent description: each transition rule Rk is represented by an equation of the form

(1)

with the coefficients alk,blkN0 denoting the numbers of agents of each type involved in the transition as input and output interaction partners (see Example II.1). In order to ensure that the total number of agents is not changed by such a transition, we assume i=1naik=i=1nbik for each k. The associated vector νk=(ν1k,,νnk)Zn is defined by

and describes the net change in the number of agents of each type Si due to transition Rk. Note that different transitions can lead to identical net changes, accounting, e.g., for different social mechanisms inducing a specific change. The population state of the system (i.e., the system state) is given by a vector of the form

where xi refers to the number of agents of type Si. As the total number of agents is assumed to be constant, the population state space33 is given by

Each transition Rk induces an instantaneous change in the population state of the form

which may occur at any point in time t0. The probability for transition Rk to happen in an infinitesimal time step dt is given by αk(x)dt, where αk:X[0,) is the propensity function of this transition. We assume the propensity αk(x) to be proportional to the number of combinations of interacting agents in x, and, moreover, to scale with the total population size N.

(Extended voter model: Imitation and exploration)

Example II.1
(Extended voter model: Imitation and exploration)
Throughout the paper, we consider the extended voter model as a guiding exemplary setting. This model is well-known, e.g., as noisy multi-state voter model, for describing foraging ant colonies, or chemical systems (see Refs. 34–36). Consider two sorts of transition rules. First, imitative transitions Rij, ij, are of the form
which means that, given two agents of different types SiSj, one of the agents adopts the type of the other agent. An example would be the adaption of another agent’s opinion or technological innovation. Second, there are exploratory transitions Rij, ij, also known as mutations, which have the form
and describe the change of an agent’s type independently of other agents. Note that we replaced the general index k by tuples (i,j) because this appears intuitive here and simplifies the notation. For these transitions, the net change vectors are given by νij=ejei, where eiN0n denotes a vector whose elements are all zero except the entry i, which is one. The propensity functions αij of imitative transitions Rij are given by
where γij0 are chosen rate constants. Here, the scaling by N reflects the fact that the probability for two agents to meet within a population of size N is proportional to 1/N. For exploratory transitions Rij, on the other hand, we have
for some rate constants γij0.
Remark II.2

The above description has been limited to the case of a complete interaction graph for the sake of simplicity. Generalizations are possible, e.g., by weighting the edges in the graph or by forming the interaction network out of some weakly connected, complete components or clusters. In these cases, the form of the propensity functions and perhaps the definition of the state space need to be adapted, but the general setting remains the same.

One way to describe the temporal evolution of the system is to formulate a continuous-time stochastic process X(t)|t0,

with Xi(t) denoting the number of agents of type Si at time t0. The process X(t)|t0 is a Markov jump process, i.e., it is piece-wise constant, with jumps of the form

occurring at random jump times. The waiting times between the jumps follow exponential distributions determined by the propensity functions. Let P(x,t):=P(X(t)=xX(0)=x0) denote the probability to find the system in state x at time t given some initial state x0. In order to describe the time-evolution of the system, we consider the Kolmogorov forward equation of the transition jump process X(t)|t0, which is given by

(2)

where we set αk(x):=0 and P(x,t):=0 for xN0n in order to exclude terms in the right-hand side of (2) where the argument xνk contains negative entries. In the context of chemical reaction networks, (2) is called chemical master equation.37 

Alternatively, the evolution of the probability P(x,t) can be described by the transfer operatorPt acting on functions of x as

That is, the transfer operator is the evolution operator Pt=exp(tG) generated by the master equation dP/dt=GP with G denoting the operator on the right-hand side of (2). Generally, the master equation (2) cannot be solved analytically. Instead, the process’ distribution is typically estimated by Monte Carlo simulations of the underlying Markov jump process X(t)|t0, which may be generated using Gillespie’s stochastic simulation algorithm.32 With an increasing population size N, the jumps in the population process X(t)|t0 occur more and more often, while the size of an individual jump relative to the agent numbers xi decreases. In particular, in social systems, it is also obvious that in a larger system, more actions take place and that generally the influence of the single agent diminishes. Stochastic simulations of the jump process using Gillespie’s algorithm become inefficient for large N, since they track each of the individual stochastic jump events, and thus time advance in each iteration becomes extremely small. Thus, simulation of the ABM process may become computationally infeasible for very large values of N.

For large N, an appropriate rescaling of the dynamics may lead to effective approximate dynamics given by stochastic or ordinary differential equations. In what follows, we summarize the corresponding results, which are mainly based on the law of large numbers and the central limit theorem.

Let XN(t)|t0 denote the transition ABM process as defined in Sec. II B given the total number N of agents. Also, for the propensity functions, we now use the notation αkN in order to indicate their dependence on N. We introduce the relative frequencies c=x/N and rewrite the master equation (2) of the interacting agent system in terms of the frequency-based probability distribution

together with the propensities

where ε:=N1 denotes the smallness parameter. Then, with adapted notation, the master equation (the forward Kolmogorov equation) reads

(3)

The transfer operator associated with the rescaled process will be denoted by P~Nt, i.e., P~Nt=exp(tG~N/ε) where G~N/ε denotes the generator of the rescaled master equation (3).

It is well-known that in the limit N and assuming convergence of the scaled propensity functions α~kεε0α~k, the rescaled jump process XN(t)/N|t0 converges to the frequency process C(t)|t0 given by the ODE,

(4)

with initial state C(0)=limNXN(0)/N.38 The order of convergence is given by N1/2,20,38 i.e., we have the pathwise approximation

for every finite T and an a.s. finite constant ζ, both independent of N, where ζ will, in general, depend on T. Here, refers to the Euclidean norm (or any other norm) on Rn.

A higher order approximation can be obtained by considering the stochastic Langevin process CL(t)|t0 given by the SDE,

(5)

which, in the context of chemical reaction kinetics, is known as the chemical Langevin equation.39 Here, Bk(t), k=1,,K, are independent Brownian motion processes. For the pathwise approximation error, one gets from20,21 that

(6)

for finite T and an a.s. finite constant ζ, both independent of N, again as above. Also, the estimate is a pathwise result again. It is valid if in (5), one uses a realization of the Brownian motion that is adapted to the realization of the rescaled Poisson process used for the jump process, for details visit.20 Note that these approximation results only hold for finite time intervals that are independent of N.

Remark II.3

Another commonly used approach to approximate the ABM process defined by the master equation (2) is the linear noise approximation given by the leading-order term of the corresponding system size expansion. In contrast to the ODE limit model, both the non-linear SDE approach given by (5) and the linear noise approximation allow us to recover not only distributions of the ABM process but also power spectra, which provide a means to detect oscillations as given, e.g., in predator–prey cycles.40,41 As for estimations of the systems first- and second-order moments, however, the non-linear SDE approach turns out to be more accurate than the linear noise approximation.42 

The Fokker–Planck equation associated with the SDE limit process (5) has the form

(7)

with

(8)

(see Ref. 8 for the discrete-time case). The forward transfer operator TNt associated with the SDE limit process again is the evolution operator

generated by the Fokker–Planck equation /tρL=GNρL, that is, by the operator GN on the right-hand side of Eq. (7). Just as the master equation of the Markov jump process, also the Fokker–Planck equation (7) in general cannot be solved analytically. However, trajectories of the Langevin process may be generated using the standard Euler–Maruyama scheme. Here, possible stepsizes are asymptotically independent of the population size N, which makes the model more efficient than the jump process model if the number of agents is large.

Under some technical conditions (e.g., regarding growth of b and Σ at infinity), a unique invariant measure (stationary density) exists, however, perhaps only on the accessible part of the state space. The SDE dynamics is reversible (i.e., satisfies detailed balance with respect to this measure) under some technical conditions (e.g., growth at infinity), if and only if there exists a smooth function V such that43 

with the more explicit form

(9)

If a solution V with sufficient growth at infinity exists, the invariant measure μ^ of the SDE dynamics (more exactly the density associated with it) is given by

where Z is a normalization factor.

In order to motivate the investigations in Sec. III, we now calculate the invariant measure for the guiding example depending on N, observing that its properties cannot fully be explained by large population limits.

(Limit SDE and ODE for two types of agents)

Example II.4
(Limit SDE and ODE for two types of agents)
Let us return to the voter model from Example II.1 and let us restrict our considerations to the case with two types. Then, the SDE solution CL has two components satisfying (CL)1(t)=c and (CL)2(t)=1c with
That is, the accessible state space is just one-dimensional. This one-dimensional SDE process can be shown to be reversible by using condition (9). If γ12=γ21=γ>0, γ12=γ21=γ>0, and κ=γ/γ, the solution V of (9) is given by
such that
This invariant measure is shown in Fig. 1 for different values of N. We see that the invariant measure exhibits maxima around c=0 and c=1 for N=60, while it shows a unique maximum at c=0.5 for N=1000 and N=5000 with sharper concentration around the maximum for larger N. In comparison, the limit ODE for this case is given by
with a unique stable fixed point at c=0.5. That is, for N the SDE as well as the ABM dynamics will fluctuate around this fixed point because the limit ODE will asymptotically converge to it and gets close in finite time. This explains why the invariant measure of the SDE exhibits a unique maximum around c=0.5 but it does not explain why it has maxima elsewhere for N=60. We will see that this is also the case for the ABM dynamics, and that this behavior is explained by the existence of metastable sets (see Fig. 2).
FIG. 1.

Invariant measure of SDE dynamics for γ12=γ21=1, γ12=γ21=0.005, and κ=200. Red/solid: N=60, blue/dashed: N=1000, and green/dotted: N=5000.

FIG. 1.

Invariant measure of SDE dynamics for γ12=γ21=1, γ12=γ21=0.005, and κ=200. Red/solid: N=60, blue/dashed: N=1000, and green/dotted: N=5000.

Close modal
FIG. 2.

Independent simulations of (a) the ABM process and (b) the SDE process for the dynamics of Example III.1 showing agent numbers instead of opinion percentages. Two types S1 and S2, N=60 agents, γ12=γ21=1 and γ12=γ21=0.005. The fixed point of the ODE process is NC=(30,30). Clearly, the ODE process cannot approximate the ABM process, since it is not able to exhibit a metastable behavior; the fixed point is asymptotically stable.

FIG. 2.

Independent simulations of (a) the ABM process and (b) the SDE process for the dynamics of Example III.1 showing agent numbers instead of opinion percentages. Two types S1 and S2, N=60 agents, γ12=γ21=1 and γ12=γ21=0.005. The fixed point of the ODE process is NC=(30,30). Clearly, the ODE process cannot approximate the ABM process, since it is not able to exhibit a metastable behavior; the fixed point is asymptotically stable.

Close modal
Remark II.5

Let us shortly return to Example II.1 with two types. By setting γ21=0, δ=γ21γ12>γ12>0, the limit ODE has one stable fixed point c=1δ/γ12, and one unstable fixed point referring to the trap state Ctrap=(0,1) of the ABM dynamics. For appropriate initial values, the ODE limit dynamics converges asymptotically to the stable fixed point Cstable and will stay there unconditionally. The SDE and ABM dynamics will behave similarly for large N and finite time interval. However, on very large time intervals (scaling exponentially with N), both the ABM process and the SDE process will rarely deviate from the narrow cylinder around the stable fixed point, approach and finally end up in the trapping state.

For appropriately chosen rate constants γij and γij, the ABM process of the guiding example given in Sec. II A can exhibit metastable behavior, where one type predominates the population for a long period of time before another type will take over eventually and then dominates for another long period of time. In many (but not all) cases for moderate to large N, such metastable behavior can be reproduced by the SDE limit process, while the ODE limit process often fails to reproduce it. As finite timescales (i.e., independent of N) may not be sufficient to understand this, we first introduce the transfer operator approach to metastability and then show how it can be applied to the ABM and limit SDE process.

In the following, we will consider the transfer operators P~Nt of the transition jump (ABM) process and TNt of the corresponding limit SDE, where the subindex N indicates for which number of agents the respective dynamics is considered.

For the next step, we assume that both the ABM dynamics and the SDE limit dynamics are (geometrically) ergodic on the respective accessible state space, and there are respective invariant measures μ, respectively μ^. Moreover, we assume that both kinds of dynamics are reversible. This assumption makes most of the following constructions much shorter and easier to comprehend because, for reversible dynamics, the associated transfer operators are self-adjoint in the Hilbert space Lπ2 (with π=μ or π=μ^, respectively) and thus possess real-valued spectral decompositions. The assumption of reversibility is not necessary; without it, one has to replace real-valued spectral decompositions by the more involved complex ones, alternatives like the Schur decomposition44 or the respective singular value decompositions.

a. Predominant eigenvalues

Let λlt be the eigenvalues of P~Nt, sorted by decreasing absolute real value, and ψl the corresponding eigenfunctions, where l=1,2. Under our assumptions, it holds that λ1=1 is independent of t, isolated and the sole eigenvalue with absolute value 1. Furthermore, ψ1=μ. The subsequent eigenvalues satisfy λlt=exp(νlt) for some νl>0, l=2,3,, and thus decrease monotonously to zero both for increasing index and time. That is,

The associated eigenfunctions ψ2,ψ3, can be interpreted as sub-processes of decreasing longevity in the following sense: Given a function u and lag time τ>0 with u=l=0βlψl, βlR, then

since there exists an index dN such that λlt0 for all tτ and all l>d. Hence, the major part of the information about the long-term density propagation of the ABM dynamics is encoded in the d dominant eigenpairs. The timescales associated with the dominant eigenvalues λlt, l=2,,d are called dominant timescales and given by

where Tl is independent of t, since the transfer operator exhibits an infinitesimal generator, and, therefore,

For the SDE transfer operator TNt, we denote the eigenvalues by λ^lt, and the eigenfunctions by ψ^l with ψ^1=μ^. The same relation concerning the dominant timescales T^l holds.

The ABM transfer operator P~Nt acts on functions uLπ2(X/N) on the rescaled population space X/N, while TNt acts on functions uLπ2([0,1]n). In general, the size of these function spaces prohibit efficient computation of the dominant eigenvalues. Therefore, one considers projected transfer operators instead.

b. Projected transfer operators

We make the following considerations for the transfer operator P~Nt of the ABM process; however, analogous statements hold for the transfer operator TNt of the SDE process. The projected transfer operator with respect to a subspace LLπ2(X/N) is the operator QP~NtQ, where Q:Lπ2(X/N)L denotes the orthogonal projection of the original function space of P~Nt to L with respect to the appropriate scalar product ,π. If L is finite-dimensional and spanned by the functions ϕi, i=1,,m, then

The most prominent case is that of subspaces spanned by indicator functions ϕi=1i, where 1i is one on a set Bi and zero outside and the Bi, i=1,,m, form a complete, non-overlapping partition of the respective state space. In this case, called the box discretization of the transfer operator, the projected transfer operator QP~NtQ has a matrix representation denoted Pt=(Pij)i,j=1,,m, with entries

where the subindex π means that initial values are distributed due to the respective invariant measure π=μ, or π=μ^, respectively, and c the respective ABM or SDE process. The matrix Pt representation of the projected transfer operator is stochastic. Its entries can be approximated by starting n0 trajectories of the respective process in each box. Let cik(0), k=1,,n0 be initial values distributed due to π|Bi and cik(t) the final point of a t-long realization of the process started in cik(0), then

(10)

There are a variety of results on how closely the dominant eigenvalues of the projected transfer operator QP~NtQ approximate the eigenvalues of the original transfer operator P~Nt: for example, in Ref. 45, the error is characterized via the projection error induced by Q, while in Ref. 26 (Thm. 4.16), upper and lower bounds to the error, specific for every complete partition of the respective state space into sets, are given. Moreover, in Ref. 46, the long-term error P~Nst(QP~NtQ)s with s1 is analyzed.

c. Metastability

After these preparations, we can point out the key idea of the transfer operator approach to metastability:26 metastable subsets can be detected via the dominant eigenvalues of the respective transfer operator close to its maximal eigenvalue λ=1. Moreover, they can be identified by exploiting the corresponding eigenfunctions ψl, l=1,,d. In doing so, the number of metastable subsets is equal to the number of eigenvalues close to 1, including 1 and counting multiplicity. Weighted with the invariant measure π, the dominant eigenfunctions ψl~=ψl/π exhibit different sign combinations for each set (see Ref. 26). Alternatively, they allow us to decompose state space into metastable sets by their zeros.47 Then, the asymptotic exit rates from these metastable sets are approximately given by the inverse of the dominant timescales.47 

The dominant eigenfunctions also play a major role in the theoretical justification of building so-called Markov state models (MSM).26,27 An MSM is a very low-dimensional reduced model of the full transfer operator P~Nt with almost the same dominant eigenvalues. For d dominant eigenvalues, the Markov states of an MSM are formed by non-negative ansatz functions ϕk, k=1,,d that satisfy P~Ntϕkϕk as closely as possible and thus can be interpreted as macro-states that are almost invariant under the dynamics. More precisely, the ϕk are selected such that they form a partition of unity, i.e., kϕk=1, and the projected transfer operator QP~NtQ (represented by a d×d matrix) satisfies the condition that its eigenvalues are as close as possible to the dominant eigenvalues of P~Nt. There are several algorithms for computing these almost-invariant ansatz functions ϕk based on the dominant eigenfunctions of P~Nt, e.g., set-oriented algorithms like milestoning,48 or algorithms approximating a basis of the dominant eigenspace like PCCA+49 (see Example III.1 for more details).

All the previous considerations can be carried out for both the ABM process and the SDE process (replacing P~Nt by TNt), independently of N. Moreover, for large enough N, the respective results of this MSM analysis are very close for the ABM and SDE cases and converge for N, which we will see in the following two examples.

(Metastable behavior for two agent types, part 1)
Example III.1
(Metastable behavior for two agent types, part 1)

Consider again two types of agents with γ12=γ21=1 and γ12=γ21=0.005.

For N=60, Fig. 2 shows typical long trajectories of the two processes. The ABM process and the SDE process clearly exhibit metastable behavior with at least two metastable areas, one around c=0, the other around c=1. With increasing N and with respect to the same finite window in time, this bistability vanishes and the system remains close to the deterministic solution of the limit ODE while short escapes from a narrow cylinder around it become more and more rare.

In order to explain this behavior, we computed the projected transfer operators for the SDE and the ABM process for different numbers of agents (N=60,100,200,1000) using a box discretization of the one-dimensional state space into m uniform boxes (m=30 for N=60 and m=100 for larger N), and approximating the entries of the respective stochastic discretization matrices via (10) by starting n0=5000 trajectories of length τ=5 of the respective process in each box. The invariant measures of the respective stochastic discretization matrices are very good approximations of the analytical results for the SDE case as of Fig. 1. Next, the subsequent dominant eigenvalues and eigenfunctions of the resulting stochastic matrices PNτ were computed.

For N=60, we find the following leading eigenvalues for the SDE process:
and for the ABM process,
The eigenfunctions for the second and third eigenvalues are given in Fig. 3. We observe that the second eigenfunctions ψ2 (ABM) and ψ^2 (SDE) are qualitatively similar, and that, in both cases, their respective zeros decompose the state space (roughly) into the two metastable sets A=[0,1/2), and B=[1/2,1] with an associated metastable timescale of T2=τ/log(λ2τ)100, which seems to fit to the typical transition behavior displayed in Fig. 2. The third eigenfunctions ψ3 and ψ^3 also are qualitatively similar. Their zeros show that a set [0.2,0.8] around the fixed point c=0.5 of the limit ODE also is metastable with an associated metastable timescale of T314 for N=60.
FIG. 3.

Weighted eigenfunctions for (a) the second eigenvalue [λ2=0.93 for the ABM process (blue), λ^2=0.93 for the SDE process (red)] and (b) the third eigenvalue [λ3=0.72 for the ABM process (blue), λ^3=0.70 for the SDE process (red)]. N=60, γ12=γ21=1 and γ12=γ21=0.005.

FIG. 3.

Weighted eigenfunctions for (a) the second eigenvalue [λ2=0.93 for the ABM process (blue), λ^2=0.93 for the SDE process (red)] and (b) the third eigenvalue [λ3=0.72 for the ABM process (blue), λ^3=0.70 for the SDE process (red)]. N=60, γ12=γ21=1 and γ12=γ21=0.005.

Close modal
The dominant eigenvalues for other values of N are shown in Table I. We observe that for increasing N for both the ABM process and the SDE process, the second eigenvalues (almost) stay the same, i.e., the metastable timescale associated with the respective metastable sets (around c=0 and c=1) does not change much. However, the third eigenvalues increase with N and with it the associated metastable timescale, indicating that the set around the fixed point c=0.5 is increasingly metastable (i.e., the timescale of rare exits from this set increases from T3=14 for N=60 to T3=45 for N=1000). Figure 4 shows that the second and third eigenfunctions for ABM and SDE are now very similar. They still indicate the same metastable sets as for N=60 but the metastable set around the fixed point c=0.5 has become significantly smaller.
FIG. 4.

Weighted eigenfunctions for (a) the second eigenvalue (λ2=0.95 for the ABM process (blue), λ^2=0.95 for the SDE process (red)) and (b) the third eigenvalue [λ3=0.90 for the ABM process (blue), λ^3=0.89 for the SDE process (red)]. N=1000, γ12=γ21=1, and γ12=γ21=0.005.

FIG. 4.

Weighted eigenfunctions for (a) the second eigenvalue (λ2=0.95 for the ABM process (blue), λ^2=0.95 for the SDE process (red)) and (b) the third eigenvalue [λ3=0.90 for the ABM process (blue), λ^3=0.89 for the SDE process (red)]. N=1000, γ12=γ21=1, and γ12=γ21=0.005.

Close modal
TABLE I.

Second and third eigenvalues for different values of N. Error estimates indicate that the error is about ±0.01 in all cases.

Nλ2 (ABM)λ^2 (SDE)λ3 (ABM)λ^3 (SDE)
60 0.93 0.93 0.71 0.70 
100 0.94 0.95 0.81 0.79 
200 0.95 0.95 0.86 0.86 
1000 0.95 0.95 0.90 0.89 
Nλ2 (ABM)λ^2 (SDE)λ3 (ABM)λ^3 (SDE)
60 0.93 0.93 0.71 0.70 
100 0.94 0.95 0.81 0.79 
200 0.95 0.95 0.86 0.86 
1000 0.95 0.95 0.90 0.89 
Using PCCA+,49 we can now build MSMs for the ABM process. For N=1000 and three dominant eigenvalues, we get a 3×3 projected transfer operator whose matrix representation is stochastic,
and has eigenvalues λ=(1,0.95,0.89) that are identical to the dominant eigenvalues up to two leading digits. The resulting almost-invariant ansatz functions ϕk, k=1,2,3 are shown in Fig. 5. We observe that the non-negative ϕk forms a partition of unity and thus can be interpreted as almost quasi-stationary distributions that are almost invariant under the dynamics. These quasi-stationary distributions ϕk are not close to indicator functions of any set (which is the case in many other scenarios; see Ref. 26). This shows that the state space cannot be decomposed fully into the three dominant metastable sets. The two core metastable sets around c=0 and c=1 and the one around the fixed point at c=0.5 are too small (respectively, weak). For better resolution of the underlying rare events we have to apply additional techniques (see the following paragraph and Example III.2).
FIG. 5.

Illustration of the three c-dependent quasi-stationary ansatz functions ϕk, k=1,2,3, used for building the MSM for the ABM process for N=1000. See Example III.1 for further details.

FIG. 5.

Illustration of the three c-dependent quasi-stationary ansatz functions ϕk, k=1,2,3, used for building the MSM for the ABM process for N=1000. See Example III.1 for further details.

Close modal
d. Mean first exit times

In order to get additional information, we are interested in the expected mean first exit time ηN(i) of the two processes for starting in some box Bi, iI with I={i=1,,m:BiA=} and going into some set A. Note that A and Bi do not need to be metastable sets. The vector ηN=(ηN(i))iI of these mean first exit times can be computed by solving

(11)

where PIτ denotes the submatrix of the m×m discretization matrix Pτ of the projected transfer operator QP~NτQ (respectively, QTNτQ) for indices iI, and 1I the vector of length |I| with all entries having value one. Again, Eq. (11) results from the Galerkin discretization of the respective equation of the full transfer operator.

Given the mean first exit time ηN, we can also compute the vector ΦN=(ΦN(i))iI of associated rates via

(12)

We will calculate and compare the mean first exit times in the following example.

(Metastable behavior for two agent types, part 2)
Example III.2
(Metastable behavior for two agent types, part 2)

Consider again two types of agents, this time with asymmetric coefficients γ12=1, γ21=1.1, γ12=0.03, and γ21=0.005.

In this case, the limit ODE has one stable fixed point c0.72 in [0,1], and for large N the ABM as well the SDE dynamics will stay in a narrow cylinder around the ODE trajectory on finite time intervals, while this trajectory will converge towards the fixed point.

We can again compute the projected transfer operators for different values of N for the ABM and the SDE process using a box discretization of the one-dimensional state space into m=100 uniform boxes (m=30 for N=60 and m=100 for larger N), and starting n0=5000 trajectories of length τ=5 of the respective process in each box. Figure 6 shows the resulting first and second eigenfunctions. We observe that the invariant measure is concentrated on the region around the fixed point for both, the ABM and the SDE process. Moreover, for both processes, the first eigenfunctions indicate that the sets left and right of the fixed point are the main metastable sets.
FIG. 6.

(a) Invariant measures and (b) weighted second eigenfunctions for the ABM process (blue), and the SDE process (red). N=1000, γ12=1, γ21=1.1, γ12=0.03, and γ21=0.005.

FIG. 6.

(a) Invariant measures and (b) weighted second eigenfunctions for the ABM process (blue), and the SDE process (red). N=1000, γ12=1, γ21=1.1, γ12=0.03, and γ21=0.005.

Close modal

We are now interested in the expected mean first exit time ηN(i) for starting in some box Bi, iI with I={i=1,,m:BiA=} and going into set A=[0.9,1]. This also gives the mean first exit times ηN from [0,0.1] to [0.9,1]. Using ηN, we compute the associated rates ΦN via (12), which are given in Table II for different values of N. We observe impressive similarity between the mean first exit times ηN computed via the ABM and the SDE dynamics. Moreover, we observe that the ηN increase exponentially with N and become rather large for large N. We will see in Sec. IV how these two observations (the agreement between ABM and SDE and the exponential growth of timescales) can be explained by large deviation theory.

TABLE II.

Rates ΦN of the mean first exit times from [0, 0.1] to [0.9, 1] for different values of N. See also Fig. 8.

NηN (ABM)ΦN (ABM)η^N (SDE)Φ^N (SDE)
60 458 0.10 440 0.09 
100 540 0.06 530 0.06 
200 874 0.03 885 0.03 
1000 22 000 0.01 22 100 0.01 
NηN (ABM)ΦN (ABM)η^N (SDE)Φ^N (SDE)
60 458 0.10 440 0.09 
100 540 0.06 530 0.06 
200 874 0.03 885 0.03 
1000 22 000 0.01 22 100 0.01 

The closeness between the discretization matrices PSDEt=QTNtQ and PABMt=QP~NtQ of the transfer operators of the SDE and ABM processes for large N is due to the pathwise closeness (6) of the SDE and ABM process, which implies

entrywise20,26 for all times t in [0,τ] for not too large τ. If the ansatz space used for the discretization is of dimension m, then this means that there is a constant ζ0< such that

as an asymptotic result, i.e., there is an N0N such that the statement holds for all N>N0. This result requires only trajectories of length τ, with the additional computational advantage that they can be computed in parallel for all boxes. This implies that for large enough N, we may characterize the long-term behavior of the ABM process via the discretized SDE transfer operator.

However, the discretizations PSDEt and PABMt have to be computed by means of trajectories via (10) (denoted by PSDE,n0t), which introduces an additional sampling error of order 1/n0 in the number n0 of trajectories. Moreover, the discretizations differ from the true transfer operators by the discretization errorerrdiscr resulting from using a finite-dimensional ansatz space (see Ref. 45,46) such that in total

(13)

where P~Nt denotes the true ABM transfer operator. Note that this estimate does not require any assumption of a gap in the spectrum of P~Nt (as often is assumed inappropriately) (see Ref. 50 and, in particular, the discussion in Ref. 46).

Therefore, even for large N, metastable structures of the underlying ABM process can be identified by studying PSDEt only up to the resolution given by the underlying discretization, which may be limited according to computational resources. In particular, if the metastable structures became finer and finer for increasing N, one would have to increase resolution by increasing the dimension m of the ansatz space with N in order to yield sufficient accuracy which, in turn, would mean that we might not be able to reduce the first error term in Eq. (13) sufficiently.

(Potential failure of the SDE approximation)

Remark III.3
(Potential failure of the SDE approximation)

The above result (13) and its consequences depend on our assumption that all types of agents are there in sufficient numbers. There are cases where the continuous approximation by the SDE process was documented to fail to capture the noise-induced multistability of the discrete ABM process, namely, when the multistability directly stems from the discreteness of the system.51,52 An example from the biochemical context is given by gene expression dynamics with stochastic switches between the gene’s activity and inactivity. For such dynamics, hybrid modeling approaches are demanded, which approximate only part of the process components by an SDE.53 In such cases, at least one species is present in (very) small numbers only; thus, they are not covered by the considerations herein.

The approximation results of Sec. II C concern the pathwise behavior of the stochastic ABM process on finite time intervals (that do not scale with N). In Sec. III, we went beyond finite timescales but saw that some rare events associated with metastability happen on timescales that grow exponentially with N. In this case, i.e., when Texp(ζN), the transfer operator approach reaches its limitations due to the increase of dimension m of the ansatz space (see Sec. III B). We now investigate these unlikely tail events of the dynamics and their approximation by the SDE process via the LDP.

As for the guiding Example II.1, we will see that (under specific conditions outlined below) there is an approximate agreement of the tail probabilities when comparing the ABM process to the corresponding SDE process. The literature contains results that show that this is not always the case (see, e.g., Ref. 23). We will shed some light on the reasons behind success and failure too. The analysis is done in terms of the rescaled ABM process Cε(t):=1NXN(t) for ε=1/N, with the corresponding master equation given in (3). Again, ε=1/N denotes the smallness parameter for the sake of keeping the notation that is most prominent in large deviation theory, for which we will now give a brief introduction.

Let Cε()=Cε(t)|t[0,T] be an (arbitrary, random) path from an appropriate path space C [e.g., C=H1([0,T],Rn)] starting in Cε(0)=c0, and let P denote the probability distribution generated by the master equation (3), respectively, by the Markov jump process associated with it, or by the SDE limit Eq. (5). Furthermore, let c()=c(t)|t[0,T], c(0)=c0, denote a specific path from the selected path space C [for example, the solution trajectory of the ODE limit system (4)]. Then, we call I:C[0,] the large deviation rate function associated with the law P if

(see Ref. 54). This is often written in the following, more intuitive form:

(14)

where denotes δ-closeness of the paths Cε() and c(), and asymptotic equality or exponential equivalence, that is,

where the notation xε=x+o(1) means that (xεx)/ε0 for ε0. The statement says that the probability to find a solution path Cε() that is close to the specific path c() is exponentially small in ε with an asymptotic rate given by the rate function I. In an alternative way of presenting this, I is the path space measure introduced by the dynamics for small ε: Following Ref. 55, we can write the probability pε(t0,c0,t1,c1) to go from c0 at time t0 to c1 at time t1 using the path integral formalism:

where Dc() denotes integration over all paths c()=c(t)|t[t0,t1] with c(t0)=c0 and c(t1)=c1. That is, for small ε, the exponential factor exp(1εI(c())) works as a probability density in the space of paths.

In many cases, expressions for the rate function can be found by constructing its point-wise form I:Rn×[0,T][0,], such that the intuitive Eq. (14) becomes

(15)

meaning εlogP(Cε(t)c)=I(c,t)+o(1) for all t. While I characterizes the asymptotic behavior of the probability distribution P induced by the dynamics in the state space Rn, I characterizes the associated probability distribution in the path space C. In what follows, we will see how I can be computed for the ABM process (3) and for the SDE (5). We will present just the essential results; there are rigorous construction techniques for the rate functions like the Feng–Kurtz54 or the Gärtner–Ellis56 methods (see Ref. 24). Furthermore, there are several other asymptotic techniques for studying exponentially small probabilities for master and Fokker–Planck equations in the sense of Eq. (15), e.g., WKB theory or eikonal approximations (cf. Ref. 23,25).

1. Large deviation rate function of the jump process

The solution of the master equation (3) satisfies23 

with a rate function for which one can derive a Hamilton–Jacobi equation of the form

with the Hamiltonian function

(16)

for ξRn (see Ref. 24 for a review over the underlying theory). In terms of the Lagrangian,

the rate function can be characterized by

for c(0)=c0. Unfortunately, in general, L does not have an explicit form.

The generator of the Markov jump process Cε(t)|t0 underlying the master equation (3) is the infinitesimal generator of the backward Kolmogorov equation and given by

If τc0ε denotes the exit time of the Markov jump process from a bounded domain DRn with boundary D starting in a state c0D, the mean first exit time or mean first passage timeηε(c0)=E(τc0ε) satisfies

with boundary conditions ηε=0 on D. When interested in large deviations of the mean first exit time ηε(c0) from a bounded domain D after starting in c0D, we set

for another rate function Φ:Rn[0,], meaning

Large deviation theory results in the following expression for this rate function:24 

which can again be expressed via the Hamiltonian defined in (16),

That is, the curves H=0 in the phase portrait of the Hamiltonian system associated with the master equation determine the rate function Φ:Rn[0,] for the mean first exit time. These results show that the Hamiltonian H is key to characterize both the large deviation rate function and the (exponentially large) mean first exit time. We will see how to utilize this insight for computing Φ explicitly for a specific case in Sec. IV B.

2. Large deviation rate function of the SDE process

For the SDE process (5) with the density ρLε(c,t), we consider a rate function IL such that

Again, there is a Hamiltonian function HL23,24 such that

Both rate functions I (for the master equation of the ABM process) and IL (for the SDE limit process) have the same minimum curve, given by the solution of the ODE limit system. Moreover, for small ξ, we have

(17)

i.e., the associated Hamiltonian of the SDE limit process is the second-order accurate approximation of the Hamiltonian of the jump process around the ODE limit curve.

This time, the associated Lagrangian can be directly computed if the matrix Σ defined in (8) is invertible,55,57 and the large deviation rate function IL on path space of the SDE system takes the form

for paths c(t)|t[0,T] from H1([0,t],Rd) that start in the initial frequency state c0, where we set IL(c0,0)=0.

The mean first exit time

of the SDE process from a bounded domain D after starting in c0D fulfills GLεηε=1, where the generator is given by

In this case, one obtains55 

which can again be expressed in terms of the Hamiltonian function by

We now derive the explicit rate functions for the guiding Example II.1. Consider again two types of agents and a total propensity function

and vectors ν given by

a. ABM process

The Hamiltonian (16) associated with the master equation reads

and the Lagrangian is defined as

In this case, we have the conservation property c1+c2=1 for all solutions of the master equation. This implies for the Lagrangian that

where the reduced Lagrangian is given by (Δξ:=ξ1ξ2)

with c and v now one-dimensional and aij(c)=aij((c,1c)). It can be computed explicitly, resulting in

We find, as to be expected, that L1=0 along the ODE limit trajectory, the solution of the reduced ODE

(18)

The rate function for all 1-dimensional paths c(t)|t[0,T] is

The reduced Hamiltonian reads

Its curves H1(c,Δξ)=0 are given by

(19)

The phase portrait of H1 and these two curves are shown in Fig. 7(a).

FIG. 7.

Phase portraits of the reduced Hamiltonian H1 (blue) with curves H1=0 (red, green) and of the reduced Hamiltonian HL,1 with curves HL,1=0 for (a) the ABM process and (b) the SDE model, respectively. The arrows indicate the direction of the temporal evolution.

FIG. 7.

Phase portraits of the reduced Hamiltonian H1 (blue) with curves H1=0 (red, green) and of the reduced Hamiltonian HL,1 with curves HL,1=0 for (a) the ABM process and (b) the SDE model, respectively. The arrows indicate the direction of the temporal evolution.

Close modal
b. SDE process

When we turn to the SDE large deviation rate function for this specific case, we find that

is not positive (it has an eigenvalue 0). Again, this is a consequence of the conservation property c1+c2=1, and we have to work with a reduced Lagrangian given by

Moreover, we again observe that LL,1=0 along the trajectory of the reduced ODE limit Eq. (18). The associated reduced Hamiltonian reads

so that HL,1=H1+O(Δξ3) in accordance with (17). The curves for HL,1(c,Δξ)=0 are given by

(20)

The phase portrait of HL,1 and these two curves are shown in Fig. 7(b).

When comparing Figs. 7(a) and 7(b), we observe that the phase portraits and the curves for H=0 of the ABM process and the SDE limit process are almost identical. This means that the respective large deviation rates for the mean first exit time are almost identical.

(Calculation of the rate function)
Example IV.1
(Calculation of the rate function)
Consider again two types of agents with rate constants γ12=1, γ21=1.1 and γ12=0.03, γ21=0.005 as in Example III.2. In this simple (one-dimensional) case, the large deviation rate function can be computed explicitly. If we are interested in the rate of the mean first exit time for passing from c0=0.1 (meaning 10% of the agents are of type S1) to c1=0.9 (meaning 90% of the agents are of type S1), we have to do the following: from c0=0.1 to the fixed point at c=0.72, we can follow the green curve Δξ=0 (which corresponds to the trajectory of the ODE limit system), while from c to c1, we will have to act against the limit dynamics and follow the red curve in Fig. 7(a). Since the system is one-dimensional, the rate function reads
which results from Φ=Δξ (see Ref. 55). The value is the same for the (rescaled) ABM process and the SDE process, using (19) and (20), respectively. This result has to be compared to the empirical rate εlog(ηε(c0c1)) that can be calculated from many realizations of the ABM and the SDE process, respectively, as well as for the rates obtained by the transfer operator approach in Sec. III. Figure 8 shows how the empirical rate converges to the large deviation rate Φ(c0c1) for ε0, that is, N. In addition, it shows that the empirical rate of the ABM and the SDE process are almost identical even far from the limit. Comparing these results to the ones of Example III.2 (indicated by red markers) shows that we also find quantitative agreement with the rates of the mean first exit times computed via discretization of the associated transfer operator (see also Table II).
FIG. 8.

Mean time ηε(c0c1) to pass from c0=0.1 to c1=0.9 [more specifically the Monte Carlo estimate of the corresponding rate εlog(ηε(c0c1)) by 103 simulations of the respective process] for (a) the ABM process (master equation) and (b) the SDE limit process considered in Sec. IV B in comparison to the value Φ(c0c1)=0.0102 of the rate function. Dashed lines: confidence interval for confidence level 0.999. The results are in agreement with the results of Example III.2, where identical parameters γ12=1, γ21=1.1, and γ12=0.03, γ21=0.005 were considered. The rates of Table II are indicated by the red markers.

FIG. 8.

Mean time ηε(c0c1) to pass from c0=0.1 to c1=0.9 [more specifically the Monte Carlo estimate of the corresponding rate εlog(ηε(c0c1)) by 103 simulations of the respective process] for (a) the ABM process (master equation) and (b) the SDE limit process considered in Sec. IV B in comparison to the value Φ(c0c1)=0.0102 of the rate function. Dashed lines: confidence interval for confidence level 0.999. The results are in agreement with the results of Example III.2, where identical parameters γ12=1, γ21=1.1, and γ12=0.03, γ21=0.005 were considered. The rates of Table II are indicated by the red markers.

Close modal
Remark IV.2

Along the green curves in Fig. 7, where Δξ=0, the temporal derivative ddtc=HΔξ is positive on the left-hand side of c=0.72 and negative on the right-hand side, while the temporal derivative ddtΔξ=Hc is constant 0. Thus, with the ODE solution, we always end up in the fixed point c no matter from which side we are approaching. Along the red curve, for Δξ0, say positive, the derivatives ddtΔξ and ddtc are positive and we follow the red line upwards to c1. The direction of the temporal evolution is indicated by arrows in Fig. 7.

In the example analyzed in Sec. IV B, Hamiltonian’s phase portraits of the ABM process and of the SDE process are almost indistinguishable (see Fig. 7) so that the resulting mean first exit times are almost identical. In general, however, the Hamiltonians of the two processes only agree to second order in Δξ=ξ1ξ2, such that, for large Δξ, there can be deviations (that lead to exponential deviations in the exit times). In such a case, the SDE fails to quantitatively capture the dynamics of the ABM process. Therefore, the characterization of metastable behavior via the SDE process will in general not be enough to understand the metastability of the ABM process quantitatively.

In this work, we have studied an agent-based model given as a continuous-time Markov jump process and its pathwise approximation by ordinary and stochastic differential equations for medium to large population sizes. The two main insights are: first, the transfer operator approach allows us to uncover metastable structures and long timescales associated with rare events for either the ABM or the SDE processes by means of (many) finite-length trajectories of the corresponding process. Second, for large enough numbers N of agents, the metastable structures detected by the transfer operator approach of the ABM and SDE process are very close, such that the characteristics of the long-term behavior of the ABM process can be determined by simulating (many) short trajectories of the SDE process instead (for which the pathwise closeness of the SDE and ABM processes is well-established). This is of major importance for increasing N, since simulations of the ABM process may become infeasible due to exploding computational effort, which is not the case for the respective SDE process. However, this approach has important theoretical limitations if metastable structures become finer with increasing N (see Sec. III B). In this case, when considering exponentially rare events, large deviation theory allows us to derive equations that characterize the asymptotic rate functions of both the ABM process and the SDE process, which were demonstrated to be close under certain conditions. While the results of Sec. IV require exponentially long timescales (i.e., the results concern only the asymptotic behavior of the processes) and the approximation results summarized in Sec. II hold only for short timescales (i.e., independent of N), the transfer operator approach of Sec. III allows us to consider time scales “in between.” This approach uses the finite time approximation results to derive statements for large times which can—but do not necessarily need to—scale exponentially with N (see Sec. III B). In this sense, the transfer operator approach is the bridge between the two concepts (A) and (B) stated in Sec. I.

These theoretical insights are complemented by computational considerations. If aiming at understanding rare events of realistically complex ABM processes on long timescales and for large N, large deviation theory might not be helpful for several potential reasons: (a) the associated Hamilton–Jacobi equations cannot be solved efficiently, (b) it is not clear whether we may replace the ABM by the SDE process in large deviation analysis, or (c) it may be difficult to find metastable structures in advance of computing the associated exit or transition rates. In these cases, metastability analysis based on transfer operators provides a useful and practical tool for identifying metastable structures, quasi-stationary distributions, and for approximately computing mean first exit times or transition rates.

Our analysis is restricted to the setting of complete (possibly weighted) communication networks with homogeneous transition rates. The considered model approaches do not distinguish between individual agents, but count the number of agents of each available type (or their concentrations, respectively), assuming that every agent may at any time interact with all other agents. In times of Internet communication and around-the-clock information availability, this assumption is not unrealistic for some interaction systems of interest. However, for many applications, there clearly arise limitations to the interaction opportunities of agents, as, for example, for disease spreading dynamics where the transfer of the disease by infection requires physical contact of agents. Here, more detailed models are required, which take the agents’ environment into account or define (time-homogeneous or time-dependent) incomplete interaction networks. Further investigations will show how the transfer operator approach can be applied to such incomplete or inhomogeneous interaction systems and more complex agent-based models.

This research was funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy MATH+: the Berlin Mathematics Research Center (EXC-2046/1, Project No. 390685689) and through the DFG (Grant No. CRC 1114).

The data that support the findings of this study are available from the corresponding author upon reasonable request.

1.
E.
Kiesling
,
M.
Günther
,
C.
Stummer
, and
L. M.
Wakolbinger
, “
Agent-based simulation of innovation diffusion: A review
,”
Cent. Eur. J. Oper. Res.
20
,
183
230
(
2012
).
2.
S.
Eubank
,
H.
Guclu
,
V. S. A.
Kumar
,
M. V.
Marathe
,
A.
Srinivasan
,
Z.
Toroczkai
, and
N.
Wang
, “
Modelling disease outbreaks in realistic urban social networks
,”
Nature
429
,
180
184
(
2004
).
3.
S.
Venkatramanan
,
B.
Lewis
,
J.
Chen
,
D.
Higdon
,
A.
Vullikanti
, and
M. V.
Marathe
, “
Using data-driven agent-based models for forecasting emerging infectious diseases
,”
Epidemics
22
,
43
49
(
2018
).
4.
The term individual-based models is predominantly used in ecology, whereas social sciences rather refer to agent-based models.
5.
J.-P.
Bouchaud
and
J.-P.
Nadal
, “
Foreword
,”
C. R. Phys.
20
,
241
243
(
2019
).
6.
P.
Clifford
and
A.
Sudbury
, “
A model for spatial conflict
,”
Biometrika
60
,
581
588
(
1973
), http://oup.prod.sis.lan/biomet/article-pdf/60/3/581/57.
7.
R. A.
Holley
and
T. M.
Liggett
, “
Ergodic theorems for weakly interacting infinite systems and the voter model
,”
Ann. Probab.
3
,
643
663
(
1975
).
8.
A.
Jȩdrzejewski
and
K.
Sznajd-Weron
, “
Statistical physics of opinion formation: Is it a spoof?
,”
C. R. Phys.
20
,
244
261
(
2019
).
9.
S.
Redner
, “
Reality-inspired voter models: A mini-review
,”
C. R. Phys.
20
,
0
(
2019
).
10.
A.
Sîrbu
,
V.
Loreto
,
V. D. P.
Servedio
, and
F.
Tria
, “Opinion dynamics: Models, extensions and external effects,” in Participatory Sensing, Opinions and Collective Awareness (Springer, 2017), pp. 363–401.
11.
G. H.
Orcutt
, “
A new type of socio-economic system
,”
Rev. Econ. Stat.
39
,
116
123
(
1957
).
12.
S.
Abar
,
G. K.
Theodoropoulos
,
P.
Lemarinier
, and
G. M. P.
O’Hare
, “
Agent based modelling and simulation tools: A review of the state-of-art software
,”
Comput. Sci. Rev.
24
,
13
33
(
2017
).
13.
V.
Grimm
,
U.
Berger
,
D. L.
DeAngelis
,
J. G.
Polhill
,
J.
Giske
, and
S. F.
Railsback
, “
The ODD protocol: A review and first update
,”
Ecol. Model.
221
,
2760
2768
(
2010
).
14.
C.
Weimer
,
J. O.
Miller
,
R.
Hill
, and
D.
Hodson
, “
Agent scheduling in opinion dynamics: A taxonomy and comparison using generalized models
,”
J. Artif. Soc. Soc. Simul.
22
,
5
(
2019
).
15.
Weimer et al. propose the SAS (Synchrony, Actor type, Scale) classification to simplify and generalize discussions and comparisons between schedules, allowing standardization and reproduction of ABMs.
16.
D.
Aldous
, “
Interacting particle systems as stochastic social dynamics
,”
Bernoulli
19
,
1122
1149
(
2013
).
17.
N.
Djurdjevac Conrad
,
L.
Helfmann
,
J.
Zonker
,
S.
Winkelmann
, and
C.
Schütte
, “
Human mobility and innovation spreading in ancient times: A stochastic agent-based simulation approach
,”
EPJ Data Sci.
7
,
24
(
2018
).
18.
T.
Warnke
,
O.
Reinhardt
,
A.
Klabunde
,
F.
Willekens
, and
A. M.
Uhrmacher
, “
Modelling and simulating decision processes of linked lives: An approach-based on concurrent processes and stochastic race
,”
Popul. Stud.
71
(
sup1
),
69
83
(
2017
).
19.
T. G.
Kurtz
, “
Solutions of ordinary differential equations as limits of pure jump Markov processes
,”
J. Appl. Probab.
7
,
49
58
(
1970
).
20.
S. N.
Ethier
and
T. G.
Kurtz
,
Markov Processes: Characterization and Convergence
(
John Wiley & Sons
,
2009
), Vol. 282.
21.
T. G.
Kurtz
, “Limit theorems and diffusion approximations for density dependent Markov chains,” in Stochastic Systems: Modeling, Identification and Optimization, I (Springer, 1976), pp. 67–78.
22.
A. J.
McKane
and
T. J.
Newman
, “
Stochastic models in population biology and their deterministic analogs
,”
Phys. Rev. E
70
,
041902
(
2004
).
23.
M.
Assaf
and
B.
Meerson
, “
WKB theory of large deviations in stochastic populations
,”
J. Phys. A: Math. Theor.
50
,
263001
(
2017
).
24.
A.
Montefusco
, “Dynamic coarse-graining via large-deviation theory,” Ph.D. thesis (ETH Zürich, 2019).
25.
V.
Elgart
and
A.
Kamenev
, “
Rare event statistics in reaction-diffusion systems
,”
Phys. Rev. E
70
,
041106
(
2004
).
26.
C.
Schütte
and
M.
Sarich
, Metastability and Markov State Models in Molecular Dynamics: Modeling, Analysis, Algorithmic Approaches, Courant Lecture Notes Vol. 32 (American Mathematical Society, 2014).
27.
An Introduction to Markov State Models and Their Application to Long Timescale Molecular Simulation, Advances in Experimental Medicine and Biology Vol. 797, edited by G. R. Bowman, V. S. Pande, and F. Noé (Springer, 2014).
28.
M.
Hallier
, “Formalization and metastability analysis of agent-based evolutionary models,” Ph.D. thesis (Freie Universität Berlin, 2014).
29.
B.
Gaveau
,
M.
Moreau
, and
J.
Toth
, “
Decay of the metastable state in a chemical system: Different predictions between discrete and continuous models
,”
Lett. Math. Phys.
37
,
285
292
(
1996
).
30.
S.
Klus
,
F.
Nüske
,
P.
Koltai
,
H.
Wu
,
I.
Kevrekidis
,
C.
Schütte
, and
F.
Noé
, “
Data-driven model reduction and transfer operator approximation
,”
J. Nonlinear Sci.
28
,
985
1010
(
2018
).
31.
S.
Banisch
,
R.
Lima
, and
T.
Araújo
, “
Agent based models and opinion dynamics as Markov chains
,”
Soc. Netw.
34
,
549
561
(
2012
).
32.
D. T.
Gillespie
, “
A general method for numerically simulating the stochastic time evolution of coupled chemical reactions
,”
J. Comput. Phys.
22
,
403
434
(
1976
).
33.
This system description corresponds to the partition of the space of all possible configurations on which Banisch et al. then define the macrodynamics of their general opinion model; see Sec. 4.3 in Ref. 31.
34.
F.
Herreriás-Azcué
and
T.
Galla
, “
Consensus and diversity in multistate noisy voter models
,”
Phys. Rev. E
100
,
022304
(
2019
), arXiv:1903.09198.
35.
T.
Biancalani
,
L.
Dyson
, and
A. J.
McKane
, “
Noise-induced bistable states and their mean switching time in foraging colonies
,”
Phys. Rev. Lett.
112
,
1
5
(
2014
).
36.
J.
Ohkubo
,
N.
Shnerb
, and
D. A.
Kessler
, “
Transition phenomena induced by internal noise and quasi-absorbing state
,”
J. Phys. Soc. Jpn.
77
,
044002
(
2008
).
37.
D. T.
Gillespie
, “
A rigorous derivation of the chemical master equation
,”
Physica A
188
,
404
425
(
1992
).
38.
T. G.
Kurtz
, “
Strong approximation theorems for density dependent Markov chains
,”
Stochast. Process. Appl.
6
,
223
240
(
1978
).
39.
D. T.
Gillespie
, “
The chemical Langevin equation
,”
J. Chem. Phys.
113
,
297
306
(
2000
).
40.
A. J.
McKane
and
T. J.
Newman
, “
Predator–prey cycles from resonant amplification of demographic stochasticity
,”
Phys. Rev. Lett.
94
,
218102
(
2005
).
41.
P.
Thomas
,
A. V.
Straube
,
J.
Timmer
,
C.
Fleck
, and
R.
Grima
, “
Signatures of nonlinearity in single cell noise-induced oscillations
,”
J. Theor. Biol.
335
,
222
234
(
2013
).
42.
R.
Grima
,
P.
Thomas
, and
A. V.
Straube
, “
How accurate are the nonlinear chemical Fokker–Planck and chemical Langevin equations?
,”
J. Chem. Phys.
135
,
084103
(
2011
).
43.
W.
Zhang
,
C.
Hartmann
, and
C.
Schütte
, “
Effective dynamics along given reaction coordinates, and reaction rate theory
,”
Faraday Discuss.
195
,
365
394
(
2016
).
44.
N.
Djurdjevac Conrad
,
M.
Weber
, and
C.
Schütte
, “
Finding dominant structures of nonreversible Markov processes
,”
Multiscale Model. Simul.
14
,
1319
1340
(
2016
).
45.
N.
Djurdjevac
,
M.
Sarich
, and
C.
Schütte
, “
Estimating the eigenvalue error of Markov state models
,”
SIAM J. Multiscale Model. Simul.
10
(
1
),
61
81
(
2012
).
46.
M.
Sarich
,
F.
Noé
, and
C.
Schütte
, “
On the approximation quality of Markov state models
,”
SIAM J. Multiscale Model. Simul.
8
(
4
),
1154
1177
(
2010
).
47.
W.
Huisinga
,
S.
Meyn
, and
C.
Schütte
, “
Phase transitions and metastability in Markovian and molecular systems
,”
Ann. Appl. Probab.
14
,
419
458
(
2004
).
48.
C.
Schütte
,
F.
Noé
,
J.
Lu
,
M.
Sarich
, and
E.
Vanden-Eijnden
, “
Markov state models based on milestoning
,”
J. Chem. Phys.
134
,
204105
(
2011
).
49.
S.
Röblitz
and
M.
Weber
, “
Fuzzy spectral clustering by PCCA+: Application to Markov state models and data classification
,”
Adv. Data Anal. Classif.
7
,
147
179
(
2013
).
50.
M.
Sarich
and
C.
Schütte
, “
Approximating selected non-dominant timescales by Markov state models
,”
Comm. Math. Sci.
10
,
1001
1013
(
2012
).
51.
A.
Duncan
,
S.
Liao
,
T.
Vejchodskỳ
,
R.
Erban
, and
R.
Grima
, “
Noise-induced multistability in chemical systems: Discrete versus continuum modeling
,”
Phys. Rev. E
91
,
042111
(
2015
).
52.
P.
Hanggi
,
H.
Grabert
,
P.
Talkner
, and
H.
Thomas
, “
Bistable systems: Master equation versus Fokker–Planck modeling
,”
Phys. Rev. A
29
,
371
(
1984
).
53.
S.
Winkelmann
and
C.
Schütte
, “
Hybrid models for chemical reaction networks: Multiscale theory and application to gene regulatory systems
,”
J. Chem. Phys.
147
,
114115
(
2017
).
54.
J.
Feng
and
T. G.
Kurtz
,
Large Deviations for Stochastic Processes
(
AMS
,
2006
).
55.
F.
Bouchet
,
K.
Gawedzki
, and
C.
Nardini
, “
Perturbative calculation of quasi-potential in non-equilibrium diffusions: A mean-field example
,”
J. Stat. Phys.
163
,
1157
1210
(
2016
).
56.
R. S.
Ellis
, “
Large deviations for a general class of random vectors
,”
Ann. Probab.
12
(
1
),
1
12
(
1984
).
57.
M.
Freidlin
and
A.
Wentzell
, Random Perturbations of Dynamical Systems, Grundlehren der mathematischen Wissenschaften (Springer, 1986).