Global density equations for a population of actively switching particles

There are many processes in cell biology that can be modelled in terms of an actively switching particle. The continuous degrees of freedom of the particle evolve according to a hybrid stochastic differential equation whose drift term depends on a discrete internal or environmental state that switches according to a continuous time Markov chain. Examples include Brownian motion in a randomly switching environment, membrane voltage fluctuations in neurons, protein synthesis in gene networks, bacterial run-and-tumble motion, and motor-driven intracellular transport. In this paper we derive generalized Dean–Kawasaki (DK) equations for a population of actively switching particles, either independently switching or subject to a common randomly switching environment. In the case of a random environment, we show that the global particle density evolves according to a hybrid DK equation. Averaging with respect to the Gaussian noise processes in the absence of particle interactions yields a hybrid partial differential equation for the one-particle density. We use this to show how a randomly switching environment induces statistical correlations between the particles. We also discuss methods for handling the moment closure problem for interacting particles, including dynamical density functional theory and mean field theory. We then develop the analogous constructions for independently switching particles. In order to derive a DK equation, we introduce a discrete set of global densities that are indexed by the single-particle internal states, and take expectations with respect to the switching process. However, the resulting DK equation is no longer closed when particle interactions are included. We conclude by deriving Martin–Siggia–Rose–Janssen–de Dominicis path integrals for the global density equations in the absence of interactions, and relate this to recent field theoretic studies of Brownian gases and run-and-tumble particles.


Introduction
There are a diverse range of processes in cell biology that can be modelled as an actively switching particle [1].The continuous degrees of freedom of the particle evolve according to a hybrid stochastic differential equation (hSDE), whose drift term depends on a discrete internal or environmental state that switches according to a continuous time Markov chain.Let (X(t), N (t)) denote the state of the system at time t with X(t) ∈ R d and N (t) ∈ Γ, where Γ is a discrete set.If N (t) = n ∈ Γ then X(t) evolves according to the SDE dX = A n (X)dt + √ 2DdW(t), where W(t) is a vector of independent Wiener processes and A n is an n-dependent drift term.(For simplicity, we take the diffusivity to be independent of n.) Finally, N (t) switches between the different discrete states according to a continuous time Markov chain whose matrix generator Q could itself depend on X(t).In the limit D → 0, the dynamics reduces to a so-called piecewise deterministic Markov process [2].One direct application of an hSDE is to overdamped Brownian motion in a randomly switching environment, with X(t) representing the spatial position of the particle at time t and N (t) the current environmental state.In particular, suppose that A n (X) = −γ −1 ∇V n (X), where γ is a friction coefficient with γD = k B T and V n (X) is an external potential.Switching between different environmental states results in the particle being driven by different external potentials.A well-known example of an hSDE with intrinsic rather than environmental switching concerns the membrane voltage of a single neuron.In this case fluctuations in the voltage are driven by the stochastic opening and closing of ion channels [3,4,5,6,7,8,9,10], see Fig. 1(a).The continuous variable X(t) ∈ R is the membrane voltage, whereas the discrete state N (t) specifies the conformational states of the ion channels (and hence the ionic membrane currents).The ion channels evolve according to a continuous-time Markov process with voltage-dependent transition rates.Applying the law of large numbers in the thermodynamic limit recovers deterministic Hodgkin-Huxley type equations.On the other hand, in the case of a finite number of channels, noise-induced spontaneous firing of a neuron can occur due to channel fluctuations.Another example of an hSDE with intrinsic switching is a gene regulatory network, where X(t) is the concentration of a protein product and the discrete variable represents the activation state of the gene [11,12,13,14,15,16], see Fig. 1(b).Stochastically switching between active and inactive gene states can result in translational/transcriptional bursting.Moreover, if switching persists at the phenotypic level then this provides certain advantages to cell populations growing in a changing environment, as exemplified by bacterial persistence in response to antibiotics.Yet another example is active intracellular transport on microtubular networks, where motor-cargo complexes randomly switch between different velocity states according to a special type of hSDE known as a velocity jump process [57,18,19,20,21], see Fig. 1(c).Velocity jump processes have also been used to model the 'run-and-tumble' swimming motion of bacteria such as E. coli [22,23,24].This is characterized by periods of almost constant ballistic motion (runs), interrupted by sudden random changes in the direction of motion (tumbling), see Fig. 1(d).For velocity jump processes, X(t) represents the particle position and N (t) specifies the velocity state.
Although the examples in the previous paragraph involve switching between intrinsic states, they can also be affected by environmental factors.Examples include the following: (i) an external chemical gradient regulating the tumbling rate of a run-and-tumble particle (RTP) during chemotaxis [25,26]; (ii) an external electric field regulating the opening and closing of a neuron's ion channels; (iii) phenotypic switching of bacterial populations in randomly switching environments [1].Conversely, an overdamped Brownian particle can intrinsically switch between different conformational states.This may modify its effective diffusivity (possibly by temporarily binding to some some chemical substrate [27,28,29]) or how it interacts with other particles (as in the case of soft colloids [30,31]).Mathematically speaking, at the single particle level, the analysis of an hSDE holds irrespective of whether N (t) is interpreted as a discrete internal state (intrinsic switching) or an external environmental state (extrinsic switching).However, for a population of actively switching particles, the two scenarios differ significantly, even in the absence of particle-particle interactions.
In this paper, we explore the differences between intrinsic and extrinsic switching by considering a population of particles that either independently switch or are subject to a common randomly switching environment.(For simplicity, we assume throughout that the matrix generator Q is independent of X(t).)In both cases we derive 'hydrodynamic' evolution equations for the global particle density by extending the classical derivation of Dean [32], see also Ref. [33].We begin by briefly reviewing the case of a single actively switching particle, whose state X(t) evolves according to an hSDE with drift term A n (X(t)) that depends on the current discrete state N (t) (section 2).We write down the differential Chapman-Kolomogorov (CK) equation for the corresponding probability density p n (x, t), where p n (x, t)dx = P[X(t) ∈ [x, x + dx, N (t) = n] and discuss the fast switching limit.In section 3, we consider a population of identical, non-interacting particles subject to a common randomly switching environment.We first use Dean's construction to derive a hybrid stochastic partial differential equation (hSPDE) for the global density ρ(x, t) = j δ(X j (t) − x), where X j (t) ∈ R d is the position of the jth particle at time t.We show how averaging with respect to the Gaussian noise processes yields a hybrid partial differential equation (hPDE) for the one-particle density.We use the corresponding functional Chapman-Kolmogorov equation to derive moment equations for the one-particle density, and show how a randomly switching environment induces statistical correlations.We conclude section 3 by discussing how particle-particle interactions generate moment closure problems at both the hSPDE and hPDE levels.The former can be handled using dynamical density functional theory or by taking a mean field limit, but the resulting hPDE is now a nonlinear functional of the oneparticle density.In section 4, we develop the analogous theory for a population of independently switching particles.We now introduce an indexed set of global densities defined according to ρ n (x, t) = j δ(X j (t)−x)E[δ Nj (t)=n ], where N j (t) is the discrete state of the jth particle at time t and expectation is taken with respect to the continuous time Markov chain.We derive a closed non-hybrid SPDE for the densities ρ n (x, t) in the absence of particle interactions, and show how a slow/fast analysis can be used to reduce the SPDE to a scalar stochastic Fokker-Planck equation in the fast switching limit.Deriving an SPDE for the densities ρ n (x, t) is more complicated when particle interactions are included, since taking expectations with respect to the switching process results in a moment closure problem.We consider an application to interacting soft colloids, where a mean field ansatz is used to obtain a closed equation for the one-particle densities.Finally, in section 5 we derive Martin-Siggia-Rose-Janssen-de Dominicis (MSRJD) functional path integrals for the density equations in the case of non-interacting particles.Throughout the paper, we emphasize the relationships between the various levels of modelling, and highlight connections with specific examples in the literature.
Before proceeding further, we note that the derivation of hydrodynamic equations for the one-particle density of actively switching particles occurs in a variety of studies of active matter [34,35,36,37,38].These focus on models of motile particles whose velocity state either randomly switches between different discrete states (run-andtumble motion) or undergoes rotational diffusion (active Brownian motion).In the former case, a coarse-graining procedure is used to approximate the single-particle dynamics by a drift-diffusion process, which is then extended to multiple interacting particles.A major application of these studies is to motility-based phase separation [39].

Single actively switching particle
Consider a particle whose states are described by a pair of stochastic variables (X(t), When the discrete state is N (t) = n, the particle evolves according to the SDE where W is a vector of d independent Wiener processes.The discrete stochastic variable N (t) evolves according to a K-state continuous-time Markov chain with a K × K matrix generator Q that is taken to be independent of X(t).It is related to the corresponding transition matrix W according to We also assume that the generator is irreducible so that there exists a stationary density σ for which m Q nm σ m = 0. Given the initial conditions X(0) = x 0 , N (0) = n 0 , we introduce the probability density p n (x, t|x 0 , n 0 , 0) with P[X(t) ∈ (x, x + dx), N (t) = n|x 0 , n 0 ] = p n (x, t|x 0 , n 0 , 0)dx.It can be shown that p evolves according to the forward differential Chapman-Kolmogorov (CK) equation [1] (For notational convenience we have dropped the explicit dependence on initial conditions.)The first two terms on the right-hand side represent the probability flow associated with the SDE for a given n, whereas the third term represents jumps in the discrete state n.
In many of the applications in cell biology, one finds that the transition rates between the discrete states m ∈ {0, . . ., K − 1} are much faster than the relaxation rates of the piecewise deterministic dynamics for x ∈ R d .Thus, there is a separation of time scales between the discrete and continuous processes, so that if t is the characteristic time-scale of the relaxation dynamics then ϵt is the characteristic timescale of the Markov chain for some small positive parameter ϵ.Assuming that the Markov chain is ergodic, in the limit ϵ → 0 one obtains a deterministic dynamical system in which one averages the piecewise dynamics with respect to the corresponding unique stationary measure.This then raises the important problem of characterizing how the law of the underlying stochastic process approaches this deterministic limit in the case of weak noise, 0 < ϵ ≪ 1. Fast switching can be incorporated into the model by introducing a small positive parameter ϵ and rescaling the transition matrix so that equation (2.3) becomes with A n and Q independent of ϵ (at least to lowest order).The fast switching limit then corresponds to the case ε → 0. Let us now define the averaged vector field Intuitively speaking, one would expect the hSDE (2.1) to reduce to the classical SDE in the fast switching limit ε → 0. This can be made precise in terms of a law of large numbers for stochastic hybrid systems [40,41,42,43].The Fokker-Planck equation corresponding to the SDE (2.6) is obtained by taking ρ n (x, t) = σ n p(x, t) + O(ϵ) in equation (2.4), summing with respect to n, and noting that n Q nm = 0 and n σ n = 1.
In the case of the hSDE (2.1) for the pair (X(t), N (t)), the stochastic dynamics is the same whether N (t) is interpreted as a discrete internal state or an external environmental state.However, for a population of non-interacting actively switching particles, the two scenarios differ significantly.First, suppose that there are N particles with continuous states X j (t), j = 1, . . ., N , and subject to independent white noise processes W j (t).If each particle has its own internal state N j (t), then the population version of equation (2.1) is We can treat the full system as the product of N independent hSDEs (X j (t), N j (t)) (assuming that the initial conditions are also independent).On the other hand, if each particle is subject to the same discrete environmental state N (t) then Since N (t) is a global variable that is experienced by all members of the population, it follows that the particles are statistically correlated, even in the absence of particleparticle interactions.One way to interpret equation (2.8) is as a single hSDE for the high-dimensional system (Z(t), N (t)) with Z(t) = (X 1 (t), . . ., X N (t)).The corresponding CK equation for the probability density P n (Z, t) takes the form where ∇ j = ∇ xj and N (t) = n.The presence of the final term on the right-hand side means that we cannot factorize the solution according to P n (z, t) = N j=1 P n (x j , t), where P n (x, t) satisfies the CK equation (2.3).This reflects the existence of statistical correlations.In the following sections we explore these differences in terms of hydrodynamical equations for the global particle density.

Global density (non-interacting particles)
Consider a population of non-interacting particles in the presence of a randomly switching environment.A typical example would be a population of overdamped Brownian particles subject to a common randomly switching external potential.A more compact description of the population dynamics of equation (2.8) can be obtained by considering a "hydrodynamic" formulation that involves the global density In particular, following along identical lines to Dean [32], we can derive an Ito SPDE for ρ(x, t) that depends on the environmental state via the drift vector A n .For completeness, we sketch the basic steps.Suppose that at time t the environmental state is N (t) = n.Consider an arbitrary smooth function f : R d → R. Using Ito's lemma to Taylor expand f We have formally set dW i (t) = ξ i (t)dt where ξ i is a d-dimensional white noise term such that Integrating by parts the various terms on the second line and using the fact that f is arbitrary yields a PDE for ρ i : for N (t) = n.Summing over the particle index i and using the definition of the global density then gives As it stands, equation (3.5) is not a closed equation for ρ due to the noise terms.Following Ref. [32], we introduce the space-dependent Gaussian noise term with zero mean and the correlation function Finally, we introduce the global density-dependent noise field where η(x, t) is a global white noise field whose components satisfy It can be checked that the Gaussian noises ξ and ξ have the same correlation functions and are thus statistically identical.We thus obtain a closed hSPDE for the global density that couples to the environmental state Note that the n-dependence of the drift vector A n introduces another level of stochasticity due to the randomly switching environment.As we show below, this introduces statistical correlations between the particles.On the other hand, if the drift term is independent of the environmental state, then statistical correlations will only occur if there are particle-particle interactions [32], see also section 3.3.

Statistical correlations and moment equations for the one-body density
In order to investigate statistical correlations induced by the random environment, we average the hSPDE (3.11) with respect to the independent Gaussian noise terms to obtain a closed hPDE for the one-body density u(x, t) = ⟨ρ(x, t)⟩.
(3.12) (If pairwise particle interactions were included then ⟨ρ(x, t)⟩ would couple to the second order moment ⟨ρ(x, t)ρ(y, t)⟩ etc.Hence, moment closure would no longer hold [32], see below.)Between jumps in the environmental state, the density u(x, t) evolves according to the drift-diffusion equation This type of stochastic hybrid model can be analyzed along similar lines to reactiondiffusion equations with randomly switching boundaries [44,45,46].We proceed by spatially discretizing equation (3.13) in terms of a d-dimensional regular lattice with nodes ℓ ∈ Z d and lattice spacing h.Let Γ ℓ denote the set of nearest neighbors of ℓ: where e σ is the unit vector along the σ-axis.Setting u ℓ (t) = u(ℓh, t) and Introducing the infinite-dimensional vector U = (u ℓ , ℓ ∈ Z d ) and the corresponding probability density we can now write down a CK equation for the spatially discretized system: Finally, we take the continuum limit h → 0 of equation (3.18).This yields a functional CK equation for the many-body probability functional P n [u, t] with That is, Equation (3.20) can now be used to derive various moment equations.For example, the first moment is defined as We use E[•] to denote expectation with respect to the switching process, in order to contrast it with ⟨•⟩, which denotes averaging with respect to the Gaussian noise, that is, u(x, t) = ⟨ρ(x, t)⟩ etc. Multiplying both sides of equation (3.20) by u(x 1 ) and functionally integrating with respect to u yields the first moment equation Note that the first moment equation (3.22) is identical to the CK equation (2.3) for the single particle hSDE (2.1) under the mapping On the other hand, the second-order moments evolves according to the moment equation The latter can be derived from equation (3.20) after multiplying both sides by the product u(x, 1)u(x 2 ) and functionally integrating by parts.Clearly , which means that the two-point correlation function is non-zero.A similar comment holds for higher-order moments.Interestingly, the second moment equation (3.24) takes the form of a CK equation for an effective single particle hSDE with 2d continuous coordinates (X(t), ) where (W 1 , W 2 ) ⊤ is a vector of 2d independent Wiener processes.Finally, note that we could extend the above analysis to the full global density ρ(x, t).For example, the corresponding functional CK equation would now take the form The term involving the second-order functional derivative does not contribute to the first-moment equation and generates a spatially local term in the second-order moment equation.That is, setting which averages with respect to the Gaussian noise and the random switching, we find that In Fig. 2 we summarize the various versions of the population model in the case of environmental switching.
Hierarchy of hybrid models for the density function of a population of non-interacting particles in a randomly switching environment.For the sake of illustration, we assume that there are two environmental states labelled n = 0, 1.

Interacting Brownian particles and mean field theory
So far we have ignored the effects of particle interactions.In the case of overdamped Brownian particles, such interactions are typically taken to be pair-wise so that equation (2.8) becomes If the forces are conservative, then A n (x) = −βD∇V n (x) and F(x) = −βD∇K(x), β = 1/k B T , where V n is an environment-dependent potential and K is an interaction potential.The latter could also depend on the environmental state N (t).The derivation of equation (3.11) can be extended to include particle interactions along analogous lines to Ref. [32].The global density now evolves according to the hSPDE When particle interactions are included, averaging equation (3.30) with respect to the Gaussian noise no longer generates a closed equation for u(x, t) = ⟨ρ(x, t)⟩: (We are using the fact that the Gaussian noise is independent of N (t).)That is, u(x, t) couples to the two-point correlation function which, in turn, depends on the three-point correlation function etc.One way to achieve moment closure for the one-body density is to use dynamical density functional theory (DDFT) [47,48,49,50].A crucial assumption of DDFT is that the relaxation of the system is sufficiently slow such that the pair correlation can be equated with that of a corresponding equilibrium system at each point in time [50].This allows one to approximate equation (4.42) by the closed hPDE ∂u(x, t) ∂t where Here and F ex [u] is the equilibrium excess free energy functional with the equilibrium density profiles replaced by non-equilibrium ones.One of the features of DDFT is that F ex [u] is independent of the actual external potential, and is thus independent of the environmental state.
In order to apply DDFT, it is necessary to take account of the fact that there is another time-scale, namely, the rate of environmental switching.How this affects the validity of the adiabatic approximation remains to be determined, and is the subject of future work.Intuitively speaking, in the fast switching limit one could first average with respect to the switching process along analogous lines to an hSDE, see equation (2.6), and then apply DDFT.That is, A n (x) in equation (3.30) would be replaced by A(x) = m σ m A m (x).On the other hand, in the slow switching limit one could apply DDFT for fixed n and then consider switching between the n-dependent 1-particle density equations.However, since the hPDE (3.33) for fixed n takes the form of a nonlinear Fokker-Planck equation, it is no longer possible to obtain closed moment equations using the corresponding functional CK equation for P n [u, t].Even assuming that both limiting cases are well-posed, it is unclear what would happen at intermediate switching rates.
An alternative way of deriving a closed hPDE for an effective one-particle density is to use mean field theory.In the case of non-switching, weakly-interacting Brownian particles, there is an extensive mathematical literature on the mean field limit (or propagation of chaos), see the review [51] and Refs.[52,53].More specifically, suppose that both the external and interaction potentials are independent of the environmental state, and take K = K 0 /N where K 0 is a smooth function.Equation (3.29) then takes the form Introducing the normalized global density (or empirical measure) the Dean-Kawasaki equation becomes Furthermore, suppose that the joint probability density at t = 0 takes the product form with ρ(x, 0) = ρ 0 (x).Recently, this classical result has been extended to the case of weakly-interacting Brownian particles in a common randomly switching environment [55].

Global density (non-interacting particles)
The derivation of an evolution equation for the global density differs significantly for a population of particles that independently switch between a set of internal states along the lines of equation (2.7).Examples include regulatory gene networks, run-andtumble particles, soft colloids, and molecular motors.First, we modify the definition of the global density by setting In order to derive an equation for ρ n , we introduce an arbitrary set of smooth functions We then note that Applying Ito's lemma we have Rearranging this equation, dividing through by ∆t and taking the limit ∆t → 0 gives Substituting for f Ni(t) (X i (t)) on the left-hand side using equation (4.2), we then take expectations with respect to the Markov chain.Setting ρ i (x, n, t) = ρ i (x, t)E[δ n,Ni(t) ] and using the fact that where Q is the matrix generator ‡we find that Integrating by parts various terms on the right-hand side, and exploiting the arbitrariness of the functions f n yields the following hSPDE: Finally, summing over the particle index i and using the definition of the global densities ρ n (x, t) gives Q nm ρ m (x, t).(4.9) ‡ The numerator in equation (4.6) is equal to 1 if N i (t) ̸ = n and N i (t + ∆t) = n, that is, there is a transition m → n for some m ̸ = n in the time interval [t, t + ∆t], which occurs with probability Wnm∆t.Similarly, it is equal to −1 if N i (t) = n and N i (t + ∆t) ̸ = n, that is, there is a transition n → m for some m ̸ = n with probability Wmn∆t.
As in the analysis of environmental switching, see equation (3.5), we do not have a closed equation for ρ n .However, we can generalize the construction of Ref. [32] by explicitly taking into account the discrete index n.More specifically, we introduce the space-dependent Gaussian noise terms with zero mean and the correlation function Since it follows that Finally, we introduce the global density-dependent noise fields where η n (x, t) is a global white noise field whose components satisfy It can be checked that the Gaussian noises ξ n and ξ n have the same correlation functions and are thus statistically identical.We thus obtain a closed SPDE for the global densities:

SPDE for global densities PDE for 1-particle densities white noise averaging particle switching hybrid SDE for population
Note that the only source of noise in equation (4.16) is the spatio-temporal noise.
Averaging with respect to the latter and setting u n (x, t) = ⟨ρ n (x, t)⟩ yields the deterministic PDE

Quasi-steady-state (QSS) approximation in the weak-noise limit
As we mentioned in section 2, many switching processes in cell biology involve a separation of time scales between the discrete and continuous processes.A standard method for reducing the complexity of the single-particle hSDE is to use some form of quasi-steady-state (QSS) approximation that reduces the associated Chapman-Kolmogorov (CK) equation to an effective drift-diffusion equation for the marginal probability density p(x, t) = m p m (x, t) [56,57,23,25,34,19].The basic idea is to work on length-scales and time-scales such that the rate of switching is relatively fast.Here we apply the QSS approximation to the stochastic global density equation (4.16), extending the particular formulation of Ref. [19].For simplicity, we focus on the one-dimensional case.Suppose that we rescale the matrix generator Q and diffusivity D according to Q → Q/ϵ and D → ϵD, respectively, where 0 < ϵ ≪ 1 (after an appropriate non-dimensionalization). Taking ϵ → 0 then corresponds to the weak-noise limit.Decompose the probability densities according to where m ρ m (x, t) = ρ(x, t) and m w m (x, t) = 0. Substituting into equation (4.16) yields Summing both sides with respect to n yields where A(x) = m A m (x)σ m .Using (4.19) and the fact that m Q nm σ m = 0, we find Equations (4.20) and (4.21) form a slow/fast dynamical system, which we rewrite in the more compact form where We have divided equation (4.21) by ϵ and dropped the hidher-order diffusion term.Note that ⟨ m θ ϵ m (x, t)⟩ = 0 and Since the QSS reduction eliminates the variables w n , we do not need to consider correlations between ρ and w n .Therefore, we can replace the noise term on the righthand side of equation (4.22a) by √ 2ϵD∂ x [ ρ(x, t)η(x, t)], where η(x, t) is a scalar spatio-temporal white noise process.It follows from equations (4.22a) and (4.22b) that the dynamics of w n is an order 1/ϵ fast than ρ.The fact that the white noise terms on the right-hand side of equation (4.22b) live on the fast time-scale follows from the observation that ϵ −1/2 η m (•, ϵt)dt is statistically equivalent to η m (•, t)dt.From the dynamical systems perspective, the fast dynamics can be restricted to the (K − 1)-dimensional invariant manifold satisfying the constraint K−1 m=0 w m = 0. We take the coordinates of the invariant manifold to be the components of the vector w = (w 1 , . . ., w K−1 ) with w 0 = − K−1 m=1 w m .It follows that, for fixed x and frozen slow variable ρ(x, t) = Θ, the vector w(x, t) evolves according to an SDE parameterized by Θ.Assuming that there exists a unique (ergodic) stationary density µ ϵ (w; Θ) then a slow/fast analysis implies that in the small ϵ limit, equation (4.22a) can be written as a closed equation for ρ in which the linear terms involving w are averaged with respect to the stationary density µ ϵ [58]: where Finally, averaging the right-hand side of equation ( 4.22b) with respect to µ 0 implies that the steady-state first moment satisfies the linear equation The Fredholm alternative theorem ensures that equation (4.27) has a unique solution on the invariant manifold for fixed x, t.Denoting the pseudo-inverse of the matrix Q by Q † , we have Substituting this result back into equation (4.22a) finally gives a closed SPDE for ρ: Equation (4.29) can be rewritten in the form where and It follows that in the weak-noise limit, the marginal density ρ(x, t) evolves according to a stochastic Fokker-Planck equation.However, it is not equivalent to the Dean-Kawasaki equation for the global density obtained by applying the QSS reduction to the individual particles first.The latter leads to the independent Ito SDEs where W i (t) and W i (t) are independent Wiener processes.The Dean-Kawasaki equation for the global density is The white-noise process η is the diffusion approximation of the fast switching process.

Interacting Brownian particles and mean field theory
Further differences between environmental and particle switching arise when particle interactions are included.Let us return to the example of interacting overdamped Brownian particles considered in Sect.3.3, but now assume that each particle independently switches between different conformational states.Moreover, suppose that the pair-wise interaction between the particles (X j (t), N j (t)) and (X k (t), That is, the interaction potential depends on the internal conformational states of the particle pair.(For simplicity, we assume that the effective external potential V (x) seen by a particle is independent of its internal state.)The hybrid SDE of an individual particle takes the form As before, we introduce the global densities (4.1) and follow the various steps used in the derivation of the density equation (4.8): where and expectation is taken with respect to the discrete Markov process.Summing over the particle index i along identical lines to the non-interacting case then gives In contrast to the non-interacting case, we no longer obtain a closed SPDE for ρ n (x, t) when taking expectations with respect to the discrete stochastic process.Consequently, averaging with respect to the white noise process yields a PDE for the one-particle density that couples to the two-point correlation function This has a completely different structure compared to the corresponding hPDE for and interaction potential K n that depends on the state of a randomly switching environment.In particular, replacing A n (x) and F(x − y) in equation (4.42) by the terms −Dβ∇V (x) and −Dβ∇K n (|x − y|), respectively, we have One recent example of an active binary switching system of interacting particles involves a one-component soft colloidal system in which every particle can individually stochastically switch between two interaction states [30,31].The two states correspond to a 'small' (n = 0) and 'big' (n = 1) conformational state, respectively, such that the interaction potential is given by an indexed Gaussian: It is also assumed that the external potential does not switch.The discrete state N (t) ∈ {0, 1} evolves according to a two-state Markov chain with matrix generator In Refs.[30,31] it is assumed that the mean field limit holds in the case of weakly interacting switching particles, which then leads to a closed system of equations for u n (x, t): ) where Finally, as also shown by these authors, substituting equation (4.46) into the CK equations (4.45a) and (4.45b), and taking the fast switching limit yields a single equation for the scalar density u(x, t) = ρ 0 u 0 (x, t) + ρ 1 u 1 (x, t), where σ 0 = α/(α + γ) and where

Nonequilibrium statistical field theory (non-interacting particles)
The analysis of the stochastic global density equations derived in this paper is nontrivial even in the absence of pair-wise interactions.In the case of a randomly switching environment, the density equation is given by the hSPDE (3.11), whereas for particle switching it takes the form of the SPDE (4.16).One approach is to recast the density equations into a field theory.This provides a framework for performing perturbative series expansions and, in certain cases, yields nonperturbative approximations to various correlation functions.As a first step in this direction, a field theory for a non-interacting, non-switching Brownian gas has recently been constructed for the global density [59].The basic idea is to apply a Martin-Siggia-Rose-Janssen-de Dominicis (MSRJD) path integral construction [60,61,62] to the Dean equation obtained by setting A n (x) = 0 in equation (3.11).(For a complementary approach based on a Doi-Peliti path integral formulation [63,64,65], see Ref. [66].Note, however, that care has to be taken when comparing Doi-Peliti and MSRJD field theories since the actual fields have different physical interpretations.)One of the interesting features of the MSRJD path integral representation is that, even though the particles do not interact, the resulting field theory contains an interaction term.The presence of a 3-vertex reflects the original particle nature of the gas, and ensures that the density field is strictly positive, in contrast to a Gaussian free field.In this final section, we indicate how to extend the MSRJD path integral to the more general global density equations obtained in previous sections for non-interacting particle systems.

MSRJD path integral: particle switching
In order to simplify our derivation, we consider a 1D model with two internal states n = 0, 1. Equation (4.16) reduces to the form with the matrix generator given by equation (4.44).The first step in the MSRJD procedure is to discretize equation (5.1) by dividing the time interval [0, t] into M equal subintervals of size ∆t and setting with fixed initial densities ϕ 0 (x) and ψ 0 (x).Equation (5.1) becomes with ℓ = 0, . . ., M − 1, and L n are the linear operators Moreover ∆W n,ℓ (x) is a Gaussian random variable with zero mean and two-point correlation Consider a particular realization of the spatiotemporal Gaussian noise processes, which we represent by the symbol Ω. Defining the vectors Φ = (ϕ 1 , . . ., ϕ M ) and Ψ = (ψ 1 , . . ., ψ M ), we introduce the conditional probability density functional We have used the compact notation (5.7) Introducing Fourier representations of the Dirac delta functions gives where D[ Φ, Ψ] = M −1 ℓ=0 x d ϕ ℓ (x)d ψ ℓ (x).We have integrated by parts in the final exponential factor.The final steps are to integrate with respect to the Gaussian processes and then to take the continuum limit ∆t → 0 and M → ∞ with M ∆t = t and ϕ(x, ℓ∆t) = ϕ ℓ (x) etc.After performing the Wick rotation ( ϕ, ψ) → (i ϕ, i ψ) we obtain a formal path integral representation of the probability density functional where (5.11) We have incorporated the initial conditions into the path integral by adding the following terms to the action (5.11): (5.12)

Moment generating functional
One typically uses path integrals to calculate expectations of the various fields and their composites.In particular, important quantities such as two-point correlations can be obtained by taking functional derivatives of the moment generating functional where h = (h 0 , h 1 ), h = ( h 0 , h 1 ) and For example, The generating functional (5.13) can then be rewritten as where ) Evaluating the Gaussian integrals (5.19a) and (5.19b) gives where G n (x, t|x 0 , t 0 ) are casual Green's functions.That is, G 0 (x, t|x 0 , t 0 ) = e −γ(t−t0) p 0 (x, t|x 0 , t 0 )H(t − t 0 ), (5.21a) G 1 (x, t|x 0 , t 0 ) = e −α(t−t0) p 1 (x, t|x 0 , t 0 )H(t − t 0 ), (5.21b) with p n (x, t|x 0 , t 0 ) the solution to the Fokker-Planck equation under the initial condition p n (x, t 0 |x 0 , t 0 ) = δ(x − x 0 ).The exponential factors e −γ(t−t0) and e −α(t−t0) appearing in equations (5.21a) and (5.21b) are the probabilities that there are no transitions 0 → 1 and 1 → 0, respectively, over the time interval [t 0 , t].One non-trivial example for which p n can be calculated explicitly is an OU process with random drift.This particular hSDE has been used to model an RTP with diffusion in a harmonic potential [67,68] and protein synthesis in a gene network [12,13].In the former case, X(t) ∈ R represents the position of the RTP at time t whereas N (t) = n ∈ {0, 1} specifies the current velocity state v n of the particle.If v 0 = v and v 1 = −v then the motion becomes unbiased when the mean time spent in each velocity state is the same (α = γ).On the other hand, in the case of the gene network, X(t) represents the current concentration of synthesized protein and N (t) specifies whether the gene is active or inactive.That is, v n is the rate of synthesis with v 0 > v 1 ≥ 0. In both examples, the variable X(t) evolves according to the hSDE where κ 0 represents an effective "spring constant" for an RTP in a harmonic potential, whereas it corresponds to a protein degradation rate in the case of a gene network.
Comparison with equation (2.1) implies that A n (x) = −κ 0 x+v n .One major difference between an RTP and a gene network is that the continuous variable X(t) has to be positive in the latter case.However, one often assumes that the effective "harmonic potential" for v 0 > v 1 ≥ 0 restricts X(t) to positive values with high probability so that the condition X(t) ≥ 0 does not have to be imposed.explicitly.(If D = 0 then X(t) ∈ Σ = [v 0 /κ 0 , v 1 /κ 0 ] and the CK equation can be restricted to the finite interval Σ with reflecting boundary conditions at the ends.In this case, the steady-state CK equation can be solved explicitly [11,12,13].)In the case of an OU process with random drift, one finds that with ).
(5.25) Equation (5.18) is the starting point for performing various diagrammatic expansions by Taylor expanding the functional operator e S I .This has been carried out elsewhere for a non-switching Brownian gas [59,66] whose MSRJD action is of the form The cubic term on the right-hand side generates 3-vertices in any diagrammatic expansion of the path integral, and these play a key role in ensuring positivity of the global density.On the other hand, suppose that we first average the global density equation (5.1) with respect to the spatiotemporal white noise.This yields a deterministic PDE for the first moments u n (x, t) = ⟨ρ n (x, t)⟩ given by the CK equation ∂u 0 ∂t = L 0 u 0 (x, t) − γu 0 (x, t) + αu 1 (x, t), (5.27a) Although this is a deterministic system, it is still possible to carry out the MSRJD construction to obtain the generating functional (5.13) with the action functional (5.16) such that S I = α{ ϕ, ψ} + γ{ ψ, ϕ} + S IC .An expansion of e S I now generates contributions involving a fixed number of switching events.(Note that a Doi-Peliti version of this path integral construction has recently been applied to the particular example of a single RTP with diffusion in a 1D harmonic potential [68].Analogous path integrals have also been developed for RTPs in higher dimensions [69] and active Ornstein-Uhlenbeck (OU) particles [70].)

MSRJD path integral: environmental switching
Developing a corresponding MSRJD field theory for environmental switching is more involved.For the sake of illustration, consider a 1D, 2-state version of the hSPDE (3.11).As a further.simplification, we average with respect to the white noise to obtain the hPDE ∂u with N (t) switching according to a 2-state Markov chain with matrix generator (4.44).Following along analogous lines to the construction of section 5.1, we discretize equation (5.28) by dividing the time interval [0, t] into M equal subintervals of size ∆t and setting u ℓ (x) = u(x, ℓ∆t) with a fixed initial density u 0 (x) that is twice differentiable.Equation (5.28) becomes with ℓ = 0, . . ., M − 1, and L n defined in equation (5.4).Consider a particular realization of the discrete stochastic process N (ℓ∆t) = n ℓ and set n = (n 0 , . . ., n M −1 ).Defining U = (u 1 , . . ., u M ), we introduce the conditional probability density functional Inserting the Fourier representation of the Dirac delta function gives If we now average over the intermediate discrete states n ℓ , ℓ = 1, M − 1 then we have (5.43) In the limit M → ∞ and ∆t → 0 with M ∆t = t fixed, we can make the approximation with H defined in equation (5.41).In addition, equation (5.38) and the restriction to continuous paths in the continuum limit implies that Hence, We can now take the continuum limit.After Wick ordering, integrating by parts the term involving dϕ/dt, and performing the change of coordinates z = (1 + cos θ)/2, we obtain the following functional path integral: where (5.48)

Discussion
In this paper we derived global density equations for a population of actively switching particles by generalizing the classical formulation of Dean [32].In the case of a randomly switching environment (extrinsic switching), we showed that the global density ρ(x, t) = j δ(X j (t) − x) evolves according to an hSPDE.Averaging with respect to the spatiotemporal white noise process (and using mean-field theory or DDFT in the case of pair-wise interactions), resulted in a hybrid PDE for the 1-particle density u(x, t) = ⟨ρ(x, t)⟩.We then derived moment equations from the corresponding functional CK equation (3.20), and used this to highlight how statistical correlations are induced by the randomly switching environment, even in the absence of particle-particle interactions.Such correlations are absent when the individual particles independently switch (intrinsic switching).In the latter case we derived a non-hybrid SPDE equation for the indexed set of global densities ρ n (x, t) = j δ(X j (t) − x)E[δ Nj (t)=n ].However, the inclusion of particle interactions resulted in a moment closure problem for the global densities with respect to the switching process.Finally, we constructed MSRJD field theoretic formulations of the global density equations in the case of non-interacting particles.
In this paper, we focused on the derivation and general mathematical structure of global density equations for actively switching systems.In future specific applications, a number of issues could be explored further.
[A] Mean field theory for actively switching particles.There has been significant progress in the rigorous mathematical analysis of mean-field limits and McKean-Vlasov equations for weakly-interacting particle systems without switching [51,52,53].An extension to a randomly switching environment has also been developed [55].However, as far as we are aware, analogous results for the mean-field limit in the case of intrinsically switching particles has not been considered.As we showed in section 4.2, the inclusion of particle interactions leads to a moment closure problem at the level of the generalized Dean-Kawasaki equation for the global densities, see for example equation (4.38).The effects of environmental switching on the validity of the adiabatic approximation for DDFT also needs to be investigated.In the fast switching limit one could average with respect to switching and then apply DDFT, and vice versa in the slow switching limit.The difficulty arises at switching rates comparable to the rate of relaxation to thermodynamic equilibrium.
[B] Coupling between the white noise and switching processes.In the case of particle switching, we assumed that the diffusivity D of the jth particle is independent of its discrete internal state N j (t).However, advances in single-particle tracking (SPT) and statistical methods suggest that particles within the plasma membrane, for example, can switch between different discrete conformational states with different diffusivities [27,28,29].Such switching could be due to interactions between proteins and the actin cytoskeleton or due to protein-lipid interactions.Interestingly, the switching rates between the different conformational states could also depend on the spatial location of a particle.For example, an experimental and computational study of C. elegans zygotes showed that protein concentration formation during cell polarization relies on a space-dependent switching mechanism [77].This was independently predicted in a general theoretical study of protein gradient formation in switching systems [78,79].For space-dependent switching we have to modify the definition (4.1) according to Q nm (x)ρ m (x, t).(6.1) [C] X-dependent switching in regulatory gene networks.Another important example of an actively switching system with a state-dependent matrix generator Q is a gene network with regulatory feedback [11].The simplest type of a feedback circuit involves a gene that is regulated by its own protein product (auroregulation), as shown in Fig. 4. Suppose that the promoter has a single operator site OS 1 for binding protein X.The gene is assumed to be OFF when X is bound to the promoter and ON otherwise.where x is the concentration of X.The concentration evolves according to the piecewise deterministic equation dx dt = A n (x), for N (t) = n, ( where A 0 (x) = γ 0 − κ 0 x, A 1 (x) = −κ 0 x and discrete state transitions are generated by the matrix [D] Weak noise limit.Another important application of field theory is to the derivation of least action principles in the weak noise limit.the given population model, there are two distinct sources of noise at the single particle level: (i) the stochastic switching between different internal states; (ii) external white noise with diffusivity D. The weak noise limit involves taking D → 0 and W nm → ∞.A typical feature of a stochastic path integral is that the sum-over-paths has support over the set of paths that are continuous but non-differentiable with respect to τ .In particular, any time derivative in the action functional is a formal symbol for the appropriate difference term in the time-discretized path integral.Nevertheless, in the weak noise limit, the path integral is dominated by paths that are arbitrarily close to the classical least action paths, which are differentiable.

Figure 3 .
Figure 3. Corresponding hierarchy of models for the global density functions of a population of non-interacting particles that independently switch between different internal states.

If O 0 Figure 4 .
Figure 4.An autoregulatory gene network with single operator site OS 1 .A gene is repressed (or activated) by its own protein product X.