Gradient and GENERIC Systems in the Space of Fluxes, Applied to Reacting Particle Systems

In a previous work we devised a framework to derive generalised gradient systems for an evolution equation from the large deviations of an underlying microscopic system, in the spirit of the Onsager–Machlup relations. Of particular interest is the case where the microscopic system consists of random particles, and the macroscopic quantity is the empirical measure or concentration. In this work we take the particle flux as the macroscopic quantity, which is related to the concentration via a continuity equation. By a similar argument the large deviations can induce a generalised gradient or GENERIC system in the space of fluxes. In a general setting we study how flux gradient or GENERIC systems are related to gradient systems of concentrations. This shows that many gradient or GENERIC systems arise from an underlying gradient or GENERIC system where fluxes rather than densities are being driven by (free) energies. The arguments are explained by the example of reacting particle systems, which is later expanded to include spatial diffusion as well.


Introduction
By the Boltzmann-Einstein relation, the free energy of a system is inherently related to the fluctuations of an underlying microscopic particle system.In this sense, two systems with the same macroscopic behaviour can be driven by completely different free energies, if their corresponding microscopic systems are different.Therefore, one of the main objectives of (equilibrium) statistical mechanics is to derive the 'physically correct' macroscopic free energy from fluctuations in microscopic systems.A similar principle can be applied to systems that evolve over time, where dynamic fluctuations may lead to a gradient flow, driven by the free energy.For stochastically reversible systems and close to equilibrium this is the classic Onsager-Machlup theory [Ons31,OM53].Such relations are known to hold for many reversible dynamics, not necessarily close to equilibrium [BDSG + 04].More recently, it was shown that microscopic reversibility always implies the emergence of a macroscopic gradient flow [MPR14], but in this generality one needs to allow for so-called generalised gradient flows.
In brief, a generalised gradient structure (GGS) is defined by a possibly nonlinear relation between velocities and affinities.Although there are exist some non-reversible models that lead to macroscopic gradient flows [Die15], these are considered non-typical; so in order to understand systems with non-reversible microscopic fluctuations, one needs to look for even further (thermodynamically consistent) generalisations of a gradient flow.
One such generalisation could be Generic [ Ött05], which couples a gradient flow to a Hamiltonian system in such a way that the Hamiltonian energy is conserved and the free energy decays over time.Clearly, in order to derive Generic structures from dynamical large deviations in a general setting, one again needs to allow for non-linear relations, just like generalised gradient flows.One is thus lead to study generalised Generic structures (GGEN) [Mie11].A recent work shows a set of necessary and sufficient conditions of which microscopic fluctuations induce such a generalised Generic structure [KLMP18a,KLMP18b].
Another generalisation worth considering is to study, in addition to the macroscopic state variables, the corresponding fluxes.These fluxes hold more information than the state variables due to the possible occurrence of 'divergencefree' fluxes that do not alter the states.The study of flux large deviations and corresponding thermodynamic properties is a key concept in Macroscopic Fluctuation Theory [BDSG + 15].With the fluctuations on the fluxes one could for example extract a generalisation of a gradient structure: (what we call) a force structure [MN08,KJZ17,Mae17,Ren17], where the affinity/driving force may no longer be the gradient of some free energy.
In this paper we pursue another flux-based point of view, based on the observation that a GGS and GGEN can be interpreted as a free energy balance.If there would be work done that results in a divergence-free flux, than one might expect a gap the energy balance, so that the such systems can not induce a GGS or GGEN.Could one then still have GGS/GGEN structure in the space of fluxes?The main point of this paper is that this is generally impossible.We will see that if the fluctuations induce a GGS or GGEN in the space of fluxes, this is, up to some conditions, equivalent to the fluctuations inducing a GGS or GGEN in the state space.
Our leading example and main application will be that of an isothermal chemical reaction network, as studied in [MPPR17].In Section 2 we recall the main arguments from that paper, applied to concentrations undergoing reactions.In Section 3 we expand these ideas and show how they can be applied to reaction fluxes.Based on this example, we then develop an abstract theory about induced GGSs and GGENs in flux space, in Section 4. To show the generality of these principles, we then show in Sections 5 how the theory applies to transport fluxes in a diffusing particles model, and in Section 6 we combine the arguments from Sections 3 and 6 to derive results for a transport and reaction fluxes in a simple reaction-diffusion model.

Leading example 1: chemical reactions
In this section we explain the main concepts, mostly by reiterating the arguments of [MPR14] and [MPPR17].In particular, we argue that large deviations/fluctuations provide a 'physically correct' GGS for the evolution of concentrations undergoing chemical reactions.
We denote the set of species by Y (in this example {Na, Cl 2 , NaCl}) and the set of reactions by R; for each reaction r we consider a forward and backward reaction (so that here R consists of one element).The stoichiometric coefficients are denoted by (α r,y ) y∈Y for the forward reactants (here (2, 1, 0)) and (β r,y ) y∈Y for the forward products (here (0, 0, 2)), which yields the state change matrix Γ := (γ r,y ) := (β r,y − α r,y ).The evolution of the concentrations ρ t ∈ R Y is then described by the Reaction Rate Equation, with concentration-dependent reaction rates kr := k r,fw − k r,bw .Typically (and often in this paper), the reaction rates will be of the form k r,fw (ρ) := κ r,fw ρ αr and k r,bw (ρ) := κ r,bw ρ βr (2) for some constants κ r,fw , κ r,bw , using the notation ρ αr = y∈Y ρ αr,y y . In that case the network is said to be of mass-action kinetics.For more background on chemical reaction networks we refer to the survey [AK11].More details about the fluctuations and induced GGSs for chemical reaction networks can be found in [MPPR17]; for completeness we shall recall these results in this section.
To notationally stress the similarity and differences between different concepts throughout this paper, we shall always net quantities by a bar ( ¯), and we distinguish functionals on state space from functionals on flux space by a hat ( ˆ).In this section we study concentrations only, which we consider to be states.

Reacting particle system
A classical microscopic particle system underlying the evolution (1) is the following [Kur72].Let V be a large, well-mixed volume that contains, at time t, a total number N (V ) t of particles of species Y (V )  t,i , i = 1, . . ., N (V ) t .A reaction r occurs randomly with some propensities (jump rates) λ (V )  r,fw (ρ), λ (V ) r,bw (ρ).Whenever a forward reaction r occurs, α r particles are removed and β r particles are created, and vice versa for a backward reaction.Hence each reaction requires a cumbersome relabelling of particles Y t,i .It is therefore more practical to work directly with the (particles per volume) concentration ρ (V )  t,y := 1 V #{Y t,i = y, i = 1, . . .N (V )  t }.This quantity will also play the role of the macroscopic state variable.Whenever a forward or backward reaction r takes place, the concentration can now be simply updated by a jump ρ t is a Markov jump process, which satisfies the master equation r,bw (ρ) P (V ) t (ρ).
It will be beneficial to work with the corresponding generator, which is the adjoint of the right-hand side of the master equation, with respect to the dual pairing P (V ) t , f = ρ f (ρ) P (V ) t (ρ) with an arbitrary test function: The propensities that are usually used in the so-called chemical master equation are derived from combinatoric considerations, and yield the mass-action kinetics in the limit [Kur72, AK11, MPPR17]: using the notation α r,tot := y∈Y α r,y and α r !:= y∈Y α r,y !.

Equilibrium: limit, large deviations and free energy
We will from now on (throughout this section) assume that the reaction network is of mass-action kinetics (2), and chemically detailed balanced, i.e. there exists a ρ * ∈ R Y + for which κ r,fw ρ * αr = κ r,bw ρ * βr for all r ∈ R.
Naturally, ρ * is an equilibrium under the deterministic evolution (1) 1 .Under this assumption, the invariant distribution of the stochastic model is known to be [AK11]: Letting V → ∞, this invariant distribution concentrates on the equilibrium state: One can then extract the free energy by considering the corresponding large deviations, i.e. the exponential rate which with P (V ) ∞ converges to zero.Indeed, by Stirling's formula, 1 It should be stressed that, given an initial concentration ρ 0 , both the deterministic evolution and the stochastic model is confined to the 'stoichiometric compatibility class' ρ 0 + Ran Γ = {ρ 0 + Γw : w ∈ R R + }.Therefore, it is not clear whether this equilibrium ρ * lies within the compatibility class that corresponds to the initial concentration.However, if there exists a detailed balanced concentration ρ * , then there exists a unique detailed balanced concentration within each such class, see [AK11] and the references therein.Without loss of generality, we can therefore implicitly assume that the detailed balanced equilibrium is unique, and lies within the correct compatibility class.
Such limit is known as a large-deviation principle; the function on the right characterises the stochastic cost of microscopic fluctuations.If the reaction rates are related to an internal energy via Arrhenius' law, than the expression h(ρ|ρ * ) is really the Helmholtz free energy, apart from a normalisation term and a constant scaling, as explained in more detail in [MPPR17, Sec.2.2&2.3].

Dynamics: limit and large deviations
Observe that in the microscopic model, the process speeds up as V increases with order V while the jump sizes are of size 1/V .Therefore by (4), as V → ∞ the generator Q(V ) converges to the limit generator Since this generator depends on the test function f through ∇f (ρ) only, we can make the ansatz that the limit process is deterministic P (∞) t (ρ) = δ ρt (ρ), for some curve ρ (•) .Plugging this into the definition of the generator yields: As this relation holds for any test function f , we see that the ansatz was justified if the postulated curve ρ t satisfies the Reaction Rate Equation (1).Hence the stochastic process ρ (V ) t converges (pathwise in probability) to the deterministic solution ρ t of the Reaction Rate Equation.
Similar to the calculation of the fluctuations of the equilibrium (6), we can study the large deviations of the path probabilities P (V ) ; this is known as a dynamic large-deviation principle.These dynamical fluctuations can be formally calculated with the framework of [FK06].To this aim we study the non-linear generator: As before, the limit depends on the test function through ∇f (ρ) only, which is consistent with the fact that the limit is deterministic.We then define, by a slight abuse of notation, The dynamic large-deviation principle now states that 2 Remark 2.1.The function (8) is implicitly defined as a supremum; although the supremum can be calculated explicitly, this leads to very cumbersome expressions.However, it does have a dual formulation in terms of a minimisation problem: where h(j|k) := r∈R j r log(j r /k r ) − j r + k r , similar to (6).Although the relative entropy h appears in both expressions, they should not be confused: h(ρ|ρ * ) is an equilibrium rate whereas h(j|k(ρ)) is a dynamic quantity.We shall see later on that the latter can be directly (without the infimum) be interpreted as a large-deviation rate, where the variable j is a reaction flux.

GGS, energy balance, and relation with fluctuations
The (naive) aim is to rewrite the macroscopic equation as a gradient flow of some free energy F : where K(ρ) is some linear symmetric, positive definite (linear response) operator that maps thermodynamic forces to velocities.Mathematically, this operator can be interpreted as the inverse of the metric tensor of some manifold, so that the right-hand side is the gradient on this manifold.Clearly, (10) is equivalent to requiring The last two terms describe the free energy loss (or entropy production), and the first two terms describe the dissipation 3 ; as such this equation represents a free energy balance.
2 The rigorous definition of the large-deviation principle, the heuristics behind this method, and the rigorous proof of this statement is all beyond the scope of this paper.For the precise details we refer to [FK06], and for the rigorous proof for this particular system (by more classical methods) to [DRW16,ADE17,PR18].For the sake of brevity, we assume that the randomness in the initial condition is sufficiently small (e.g.deterministic) so that we do not obtain initial fluctuations.
Observe that this expression is always non-negative, and 0 exactly on the gradient flow (10).Moreover, we see that this expression has the same dimension as F, the free energy; it is indeed the free energy cost to deviate from the macroscopic dynamics.This interpretation shows that this cost should be equal to the cost ´T 0 L(ρ t , ρt ) dt of microscopic fluctuations (9).This is in many cases, and particularly in this case of chemical reactions, impossible.Since the large-deviation function ( 8) is non-quadratic, one should allow for non-quadratic dissipation terms.We therefore replace the two squared norms by a pair of dual dissipation potentials: where, as in the quadratic case, the potentials are convex duals of each other, i.e.Ψ(ρ, s) = sup ξ ξ • s − Ψ * (ρ, ξ).Moreover, we assume that Ψ and Ψ * are both non-negative; from (11) we then see that the free energy F is non-increasing on the flow.Due to the convex duality, the right-hand side of ( 11) is again always nonnegative, and 0 exactly when We call such equation a generalised gradient flow, and the underlying structure (R Y , Ψ, F ) a generalised gradient structure (GGS).Note that the generalisation with respect to (10) lies in the fact that we allow for a non-linear relation between forces and velocities.We moreover say that a gradient structure is induced by a cost function L whenever L(ρ, In Section 4 we will recall the relation between fluctuation costs and GGSs, as described in [MPR14].Applied to the current setting of chemical reactions, we reiterate the following result from [MPPR17].If we again assume massaction kinetics (2) and chemical detailed balance (5), then there exists a unique GGS (R Y , Ψ, F ) induced by the large-deviation cost L from (8), where with σr (ρ) := 2 k r,fw (ρ)k r,bw (ρ).Since Ψ * appears as a sum, the expression for Ψ becomes a so-called inf-convolution where all reactions are strongly intertwined.For more details on these inf-convolutions and the factor 1/2 in front of the free energy, we again refer to [MPPR17, Sec.3.4].

Leading example 2: fast-slow reaction fluxes
As mentioned in the introduction, the motivation behind the current paper is to search for thermodynamically consistent structures for systems that are not detailed balanced.The idea is that we increase the space by taking fluxes into account.However, in order to see the connection between structures in flux space and structures in state space, we dedicate this section to an example that is 'almost' detailed balanced.More general systems will be dealt with when discussing the general theory in Section 4.

Reacting particle system and macroscopic equation
We consider a system of fast and slow chemical reactions, R = R slow ∪ R fast , where the slow reactions are assumed to be of mass-action kinetics and detailed balanced, as in the previous section.By contrast, we will not assume anything of the like for the fast reactions, neither shall we assume that each reaction consist of a forward and a backward reaction.However, in the microscopic model, we shall assume that the fast reactions happen on a faster time-scale, i.e.
but their effect on the concentrations is smaller, i.e.
V 2 γ r whenever a reaction r ∈ R fast occurs at time t.To notationally distinguish the two time scales we use a tilde (˜) to denote one-way fast quantities.Let us briefly mention that the additional fast reactions are not essential to see the relation between structures in flux and state space; they just lead to a richer example that is interesting in its own right.
The main idea is now to increase the state space by bookkeeping the events in the microscopic system, in this case, by counting the number of reactions that have occurred up to a given time.With the right scaling, this defines the following integrated reaction fluxes4 : and to shorten notation we sometimes write We shall always assume that the initial condition is known (deterministically) a priori, so that the concentrations can be retrieved from the integrated fluxes via the continuity equation: In this sense the integrated fluxes encode more information than the concentrations.
The integrated fluxes are again a Markov process, with generator (cf.(3)):

Limit and large deviations
We now mimic the arguments of Subsection 2.3, but now in the space of fluxes.Let ρ (V ) 0 → ρ 0 , and so φ (V ) [w] → φ[w] := ρ 0 + Γw.Then by the same argument as in Subsection 2.3, using the scalings (4) and ( 13), one finds that as V → ∞, the random process W (V ) t converges (pathwise in probability) to the solution of the macroscopic equations: again using the notation (14).Indeed, combining these equations leads to the macroscopic equation ρt = Γk(ρ t ) for the concentrations.
Similarly, we study the fluctuations through the non-linear generator: As in Section 2.3, this limit depends on the gradient ∇f (w) only, which is consistent with the deterministic limit (15).Again we set, by a slight abuse of notation, ) and ∞ otherwise.Then, the dynamic large-deviation principle for the integrated fluxes W (V ) (t) state that (see [PR18] for a rigorous proof): Comparing this dynamic large-deviations principle with (9), we see -not coincidentally -strong similarities.Let us assume that the limit fast fluxes do not influence the concentration, i.e.
Naturally, this macroscopic condition entails a sort of decoupling between the slow and fast dynamics, e.g. when the species involved in the slow dynamics act as a catalyst for the fast dynamics.In that case ρ (V ) t ] is exactly the process with generator (3).The contraction principle of large deviations theory [DZ87, Th. 4.2.1] then states that the two large-deviation costs are related via: In this setting, this infimum is only with respect to the second variable, because L(w, j) depends on w through φ[w] only, which in turn arises naturally from the fact that the jump rates depend on the state and not on the integrated flux.Therefore the relation above simplifies further to: which is consistent with Remark 2.1.These relations will be the starting point of the general theory that we develop in Section 4. Let us only mention here that as a consequence we also have the relation Ĥ φ[w], ξ = H(w, Γ T ξ) for all w, ξ, cf. ( 7) and (17).

Induced Generic structure
We now investigate whether the large deviations (18) induces some structure in the space of fluxes.It turns out that this is indeed the case.As was found in [Ren17, Cor.4.8], under the detailed balance assumption (5) the slow fluxes induce the GGS (R R slow + , Ψ, F ), where and accordingly, the macroscopic evolution (15) as: Due to (21) and the decoupling condition (19), the fast fluxes are orthogonal to the driving force, i.e.
It was shown in those works that non-interaction condition (24) is a necessary and sufficient condition for the existence of an underlying Generalised Generic (GGEN) structure (R R + , Ψ, F , L, E)5 .This means that the fast flux term is Hamiltonian k(φ[w]) = L(w) ∇E(w) for some Poisson structure L satisfying the Jacobi identity (see Section 4), E is some Hamiltonian energy, and the following two non-interaction conditions are satisfied: for all w ∈ R R + , ζ ∈ R R and z ∈ R.These two conditions guarantee that along solutions the free energy is non-increasing and the Hamiltonian energy is conserved: One main message of this section is that the flux large-deviation cost L induces a unique pGGEN system (R R + , Ψ, F , k • φ).Although this implies the existence of a GGEN system induced by L, one can not uniquely decide on the basis of L what the 'correct' Hamiltonian structure (R R + , L, E) should be.Additional physical or mathematical arguments needed to uniquely fix the Hamiltonian structure are beyond the scope of this paper; for possible constructions of Poisson structures L and energies E, we refer the reader to [KLMP18b, Sec.4]).
It should be noted that the pGGEN system (R R + , Ψ, F , k •φ) is rather special in that (24) holds for any F , since the drift k • φ is 'divergence-free'.We will see that such systems play a special role in connecting systems in flux and state space.
Another main message is that the GGS part (21) on flux space is strongly related to the GGS (12) on state space, just like both cost functions are related by (20).These observations will be the basis of the general theory of the next section.

General theory
Following the examples of Sections 2 and 3, we now develop a more abstract framework to study to the relation between energy-driven structures in flux and in state space.

Geometry and notation
Throughout this section we assume to be given: • A differentiable manifold W ("flux space"), where tangents are denoted by (w, j) ∈ T W and cotangents by (w, ζ) ∈ T * W .Note that we distinguish between tangents and cotangents; we write the dual pairing between them as T * w ζ, j Tw or simply ζ, j ; • A differentiable manifold X ("state space"), where tangents are denoted by (ρ, s) ∈ T X and cotangents by (ρ, ξ) ∈ T * X ; • A surjective differentiable operator φ : W → X with bounded linear differential dφ w : T w → T Γ(w) and adjoint differential dφ T w : T * φ[w] → T * w .This defines an abstract continuity equation φ[w] = ρ, or in differentiated form dφ w j = s, see Figure 1.Contrary to Sections 2 and 3, the second continuity equation may now also depend on w.In practice, the continuity mapping φ[w] depends on the initial state ρ 0 , which we assume to be fixed.
• An L-function L : T W → R + on flux space (see below for the definition of L-functions).This function could be a dynamic large-deviation cost function corresponding to random fluxes in some microscopic system, but throughout this section it could also be a more general expression.
• An L-function L : T X → R + on state space, related to the flux space L-function via L(ρ, s) := inf This relation is again inspired by large-deviation theory, where such relation holds due to the contraction principle [DZ87, Th. 4.2.1].
• Corresponding to the L-functions are their convex duals with respect to their second variable, i.We express assumptions in terms of these duals, since in practice they are often more explicitly given than their corresponding L-functions.
Recall that in the previous section we saw that L(w, j) depends on w through ρ = φ[w] only.This condition becomes slightly more complicated in non-flat spaces, for a number of reasons.Firstly, the flux j can not be kept fixed while changing w, unless one has a path-independent notion of parallel transport, i.e. the space is flat.Secondly, even if L(w, j) would not depend on w, this dependence could re-enter through the continuity equation in the infimum inf j:dφwj=s L(w, j).Therefore, the condition that we need is that L(φ[w], s) = inf j∈Tw : dφwj=s L(w, j) for all w ∈ W, s ∈ T φ[w] .It is easily seen that this condition is equivalent to the following flux invariance: for fixed (ρ, ξ) ∈ T * X , the function φ −1 [ρ] ∋ w → H(w, dφ T w ξ) does not depend on w. ( All manifolds and functionals are assumed to be sufficiently differentiable wherever needed.For a (differentiable) functional F : W → R (and similarly on flux space) we write dF (w) ∈ T * w for the derivative, in the sense that on a curve

Definitions
We now define the notions of L-functions, dissipation potentials, GGS, pGGEN, Poisson operators and GGEN on flux space; the same concepts on state space are defined analogously.Naturally all notions are compatible with the exposition from Section 2 and 3.
Definition 4.1.We say L : T W → R + is an L-function whenever for all w ∈ W: (ii) L(w, j) = 0 ⇐⇒ j = A L (w) for some unique vector field A L .
Due to the convexity, L is also the convex dual of H. Central to GGS, pGGEN and GGEN is the notion of dissipation potentials: Definition 4.2.A function Ψ : T W → R + is called a dissipation potential whenever for all w ∈ W: If these conditions hold, then the same conditions hold for the (pre-)dual dissipation potential We also say that (Ψ, Ψ * ) is a dissipation potential pair whenever Ψ is a dissipation potential.
As explained in Subsection 3.3, by extending a GGS with an orthogonal drift one arrives at Definition 4.4 ([KLMP18b]).A Generalised pre-Generic system (pGGEN) is a quadruple (W, Ψ, F , b), where W is a differentiable manifold, Ψ is a dissipation potential, F : W → R, and b(w) ∈ T w is a vector field such that: for all w ∈ W.
We say that an L-function induces a pGGEN (W, Ψ, F , b) whenever for all (w, j) ∈ T W: Finally, if the drift has the form of an Hamiltonian system that behaves more or less independently of the GGS part we arrive at a Generalised Generic system.In order to define this we first define: Definition 4.5.A linear operator L : T * W → T W is called a Poisson structure if it satisfies the Jacobi identity We say that an L-function induces a GGEN (W, Ψ, F , L, E) whenever for all (w, j) ∈ T W: Remark 4.7.If a GGS, pGGEN or GGEN is given on a manifold W, and the dissipation potentials are quadratic (as explained in Section 2.4), then one can use the positive definite operator K(w)ξ := d ζ Ψ * (w, ζ) to define a new manifold, and redefine everything on this manifold.This allows to study the structures from a more geometric point of view.

From L-functions to GGS, pGGEN and GGEN
We now recall some of the main results from [MPR14] and [KLMP18b], that give necessary and sufficient conditions for an L-function to induce a GGS or pGGEN.A similar result for GGEN does not exist, since an L-function does not uniquely determine a Poisson operator and Hamiltonian energy.However, from a pGGEN one can always construct a GGEN (in a non-unique way); for that result we refer the reader to [KLMP18b,Sec. 4].Again, the following results are described, but not restricted to flux space.
In that case Ψ * (and indirectly Ψ) is uniquely determined by From condition (34) we see that F , if it exists, is uniquely given up to constants.Note in particular that conditions (33) and (34) do not involve Ψ. Theorem 4.9 ([KLMP18b, Th. 3.6]).Let L : T W → R + be an L-function with convex dual H, and let F : W → R and a vector field b(w) ∈ T w be given for which d w F (w), b(w) = 0. Then the following statements are equivalent: In that case Ψ * is uniquely determined by From condition (36) we see that H must consist of a convex part and a linear part ζ, b(w) , so that the drift b is a priori and uniquely fixed by H. Therefore F is again uniquely fixed by condition (37).This is different from the Generic setting; LdE uniquely defines dF and vice versa, but the whole quintuple may not be unique.However, one can still state a Generic analogue of Theorems 4.8 and 4.9 as follows: In that case Ψ * is uniquely determined by Proof.By Lemma 4.11 (see below), we can apply Theorem 4.8 to the shifted L-function L(w, j) := L w, j + L(w)d w E(w) and back.This yields the three equivalences, apart from the other non-interaction condition (30).From the explicit formula (42) one finds that the missing non-interaction condition is equivalent to (39) and to (41).
The previous proof made use of the following lemma: Proof.Because of the non-interaction condition (31), the shift transforms relation (32) into (29), and analogously for the other direction.

Relation between structures in flux and state space
We now consider L-functions L and L on flux and state space, and study how their induced structures are related.
In the above proposition, F also on w through φ[w] only, which is a very physical assumption.It does imply however, that the equilibria of the flux gradient system can only be unique up to the kernel of φ; this kernel can be interpreted as a generalisation of divergence-free vector fields.
A natural question is now whether we can turn the statement of Proposition 4.12 around.Indeed, if the invariance condition ( 27) holds and we restrict to pGGEN with 'divergence-free drifts', then the statement becomes an equivalence, and we have an explicit relation between the flux and state dissipation potentials.This is a stronger version of the statement in [Ren17,Prop. 4.7], where we related GGS to so-called 'force structures'.
Theorem 4.13.Assume that an L-function L : T W → R + with corresponding dual H satisfies the invariance condition (27), and let the L-function L : X → R + be given by (26).Then L induces a pGGEN (W, Ψ, F , b) with dφ w b(w) = 0 and F • φ for some F : X → R if and only if L induces a GGS (X , Ψ * , F ).In that case the dissipation potentials Ψ and Ψ * are related to Ψ and Ψ * through Proof.Assume that L induces a pGGEN (W, Ψ, F , b) with dφ w b(w) = 0 and F • φ.Since by assumption H(w, dφ T w ξ) does not depend on w ∈ φ −1 [ρ], by (35) the expression Ψ * (w, dφ T w ξ) is also invariant under this choice.Therefore we can define Ψ * (ρ, ξ) by (43b); it is easily checked that it its convex dual is given by (43a).We can write: and hence L induces the GGS (X , Ψ, F ), which is unique by Theorem (4.8).
For the other direction, assume that L induces a GGS (X , Ψ * , F). Define b(w) := d ζ H w, d w F (w) .Then by the invariance condition H(w, dφ T w ξ) = Ĥ(ρ, ξ) and by (33): Due to the non-uniqueness of induced GGEN systems, there is no similar 'if and only if' statement for the Generic setting.Nevertheless, in one direction, the GGEN analogue of Theorem 4.13 is: Proposition 4.14.Assume that an L-function L : T W → R induces a GGEN (W, Ψ, F , L, E) where for some F , Ê : X → R, and that Then the L-function L(ρ, s) given by (26) induces a GGEN (X , Ψ, F , L, Ê) for some dissipation potential Ψ.
Proof.We again apply Lemma 4.11 to transform the problem into a problem of GGSs.Indeed, the L-function L(w, j) := L w, j + L(w)d w E(w) induces the GGS (W, Ψ, F ). Hence by Proposition 4.12, a GGS (X , Ψ, F ) (for some Ψ) is induced by the L-function If we can now validate that L is a Poisson structure, and that the non-interaction conditions are satisfied for (X , Ψ, F , L, Ê), then Lemma 4.11 concludes the proof.
For the Poisson structure, note that, for any smooth F1 , F2 : X → R, the Lie bracket remains unaltered: The non-interaction condition (31) is clearly satisfied as for any w ∈ W we have To check the other non-interaction condition (30) we use the equivalent formulation (41).Indeed, for any (ρ, ξ) ∈ T * X and λ ∈ R, Finally, if H satisfies the invariance property (27), then Proposition 4.12 yields relation (43a) and (43b).

Diffusion
In this section we apply the ideas of the previous section to a model for diffusion.The flux structure related to diffusion is interesting in its own right, and as far as the author is aware, previously unknown.In the next section we show how this model can be coupled with the results of Section 3 to obtain flux and state GGSs/pGGENs for reaction-diffusion systems.
Typical microscopic models of diffusion consist of Brownian particles, or discretised versions thereof, like random walkers or an exclusion process.Since empirical fluxes are a bit easier to define on a lattice, we focus on independent random walkers6 .

Diffusing particle system
This microscopic actually has two scaling parameters: the number of particles, which we denote by V for consistency with the rest of this paper, and the lattice spacing ǫ V .The speed with which ǫ V → 0 as V → ∞ is irrelevant.For fixed V , let X t,i V i=1 be independent random walkers on the lattice (ǫ V Z) d with jump rate ǫ −2 .Define the random concentration and (integrated, net) flux by: As usual dx denotes a spatial area, possibly a small box surrounding one lattice site, and ρ (V ) t and W (V ) t,l are measures.Now ρ (V ) t (dx) measures the number of particles present in (lattice points in) an area dx, while W (V ) t,l (dx) measures the net number of particles that have jumped through all midpoints in dx, in direction 1 l , for l = 1, . . ., d, see Figure 2. Note that both ρ (V ) and W (V ) are defined as measures on the lattice with shrinking distance ǫ V between lattice points; this measure-valued formulation is needed to pass to a continuum limit later on.
The concentrations and fluxes are related by the V -dependent continuity equation: Using that ( Here, the factor V /ǫ 2 V comes from the time scaling ǫ 2 V , together with the fact that we have V ρ(dx) independent particles to choose from.

Limit and large deviations
For a test function f ∈ C 1 b M(R d ) , we set: The continuity equation (46) converges to the limit continuity equation (with the usual divergence operator): With this notation, as V → ∞ the generator (47) converges to (if φ[ w](dx) = φ[ w](x) dx): As in Subsection 2.3, the limit generator depends on derivatives of the test function only, and so the process W (V ) t converges (pathwise in probability) to the deterministic path satisfying Fick's Law: Naturally, combining this equation with the continuity equation (48) yields the diffusion equation for the empirical measure: Similarly, we derive the dynamic large deviations by studying the non-linear generator: which follows from expanding the exponentials (with order-ǫ V exponents) up to second order.Then the following large-deviation principle on flux space holds: Note that dφ w = − div x is independent of w, and by (50), the invariance condition (27) is satisfied.Hence by the contraction principle [DZ87, Th. 4.2.1], one obtains the large-deviation principle corresponding to the states (empirical measures):

Induced GGSs in flux and state space
We can now apply Theorem 4.8 to extract a GGS from the L-function L. We first choose the 'naive' flat manifold of non-negative vector measures W := M + (R d ; R d ) (equipped with the flat total variation metric).It is easily checked that condition (33) holds for the free energy given by7 : where we identify φ[ w](dx) = φ[ w](x) dx, and we implicitly set F (w) = ∞ whenever the measure is not absolutely continuous.The dissipation potentials are obtained from ( 35) and (28), which yields and Ψ( w, ) :=

A new geometry
The form of the dissipation potential Ψ and Ψ suggests that it is more natural to use different manifolds in the spirit of Remark 4.7.For the state space this points to the space W := P 2 (R d ) = {ρ ∈ P(R d ) : ´x2 ρ(dx) < ∞} of probability measures of finite second moment space, equipped with the Monge-Kantorovich-Wasserstein metric: with tangent and cotangent space T ρ = H−1 (ρ) and T * ρ = H1 (ρ).For this setting, the inverse metric tensor K P2 (ρ) : T * ρ → T ρ is known by the Benamou-Brenier formula [Vil09,Th. 8.1] to be K P2 (ρ)ξ := −2 div x ρ ∇ x ξ, so that the GGS is indeed the entropy-Wasserstein gradient flow [JKO98]: Motivated by this observation we can take for the flux manifold the space of signed vector measures of finite first moment M ´|x| | w|(dx) < ∞}.This choice guarantees that the corresponding states have finite second moment (once ρ 0 ∈ P 2 (R d )): Moreover, we can now use the dissipation potential to construct a natural metric on Y: d M1 ( w0 , w1 ) 2 := inf w:(0,1)→W: w0= w0, w1= w1 where the infimum runs over paths of fluxes for which ρ 0 − div wt remains nonnegative.The corresponding tangent and cotangent spaces (in the interior of the domain) are simply T w = L 2 (1/(ρ 0 − div x w)) and T * w = L 2 (ρ 0 − div x w) and the inverse metric tensor K M1 ( w) : ).This yields an interesting geometry in flux space, which, as far as the author is aware, is still unknown in the literature.

A simple reaction-diffusion model
We now combine the models from Section 3 and 5 to study reaction-diffusion models in flux and state space.The stochastic particle system will now consist of 'reacting random walkers'.It is known that, if the reaction networks include reactions of different orders (unimolecular, bimolecular, etc.) and we only allow particles to react if the required number of particles are present within the same site/compartment, then the model may not converge to the expected reactiondiffusion equation [PP15].The reason behind this is that for a multimolecular reaction, it becomes very unlikely that the required amount of reactants are all within one site/compartment; different order reactions would require different scalings.This is beyond the scope of the current paper.However we can already illustrate the combination of reaction and transport fluxes for a simple system of unimolecular equations of the type: In this section we consider GGSs only, hence we shall always consider net rather than one-way fluxes.

Reacting and diffusing particle system
Since we consider unimolecular reactions only, we can take independent reacting random walkers on the scaled lattice (ǫ V Z) d , where each reaction occurs locally at each lattice site with rate κ fw or κ bw respectively, so that bw (ρ(dx)) ≡ κ bw ρ B (dx).For the transport mechanism, we assume that the two species A, B hop to neighbouring lattice sites with rates D A and D B respectively.
As before we consider the random concentrations, as well as the integrated (net) fluxes, where we now distinguish between transport fluxes and reaction fluxes.L re ( w, re ) := inf using the usual the relative entropy between two measures, i.e: h(j|k As before, the calculation above formally shows that the flux large-deviation principle holds (see for example [BL12] for a similar but rigorous result): The L-function (58) splits into two parts because the only interaction between the two mechanisms occurs through the state φ[ w].By contrast, the corresponding state space large-deviation are much more complicated.Observe that the continuity equation ( 56) is an affine function of w, and so dφ wj is independent of w, and the invariance condition (27) holds.As explained in the beginning of Section 4, this means that one can apply a straightforward contraction principle on the tangents to yield the large deviation cost function for the states/concentrations: L(φ[ w], s) := inf =(tr,re): s=− div tr+Γre L( w, ). (59) This infimum reintroduces a strong interrelation between the two driving mechanisms.Indeed, for a given tangent (ρ, s), the fluxes in this infimum correspond to an optimal splitting between the two mechanisms, which can be seen as an inf-convolution.Similar interactions also arise when considering multiple reaction pairs, see [MPPR17, Sect.3.4].

GGSs in flux and state space
We now apply Theorem 4.8 to the reaction-diffusion setting.The symmetry condition (33) holds for the function (57) if we choose the free energy functional Naturally, this functional can be seen as a combination of ( 21) and (52), where just like (52), it has the form of a relative entropy with respect to a locally finite invariant measure, namely (π y (dx)) y=A,B ≡ (1/κ fw , 1/κ bw ) dx.We find the corresponding dissipation potentials from (42), which is again a combination of the non-quadratic potentials ( 22 ) + 1 dx, with σ( w)(x) := 2 κ fw κ bw φ[ w] A (x)φ[ w] B (x).Let the flux space be given by , where the first two spaces, corresponding to the transport fluxes, are equipped with the metric (54) introduced in the previous section.By Theorem 4.8 the flux cost function L induces the GGS (W, Ψ, F ).We stress that the dissipation potential Ψ splits into two potentials for the transport and reaction mechanisms respectively, but the free energy is one and the same for both mechanisms.
Since a GGS is a special case of a pGGEN, by Theorem 4.13, the state cost function L also induces a GGS (X , Ψ, F), in this case in the space X = P 2 (R d × {A, B}).The same result yields We stress that, analogous to the L-function (59), the dissipation potential Ψ on state space no longer splits into two parts.

Discussion
We studied gradient and (pre-) Generic structures induced by flux large deviations, and the relationship between structures induced by state large deviations.At a first glance, the resulting gradient or generic structures in flux may appear non-physical.However, in practice many induced flux structures have a free energy and dissipation potential that only depends on the integrated flux through the state of the system.Hence the main difference with energy-driven structures in state space is that the fluxes rather than velocities are being driven, which seems a very physical assumption.It turns out that if the fluxes follow a gradient or generic flow, then so do the corresponding states.The same principle also holds in the other direction, but the flow in flux space could have an additional Hamiltonian term that is not observed when considering states only.
On a mathematical level, it can also be worthwhile to work with fluxes rather than states.As we saw in the examples, and Section 6 in particular, if a microscopic system consists of multiple driving mechanisms, then the corresponding Markov generator as well as the non-linear generator is a sum over these mechanisms.By considering separate fluxes for each of these mechanisms, the large-deviation L-function and its induced dissipation potential also splits into different terms for each mechanism.This decomposition can be beneficial for analytic and numerical purposes, e.g. using operator splitting techniques.

Figure 1 :
Figure 1: The 'continuity' mapping between the flux and state manifolds.
Theorem 4.8 ([MPR14, Prop.2.1 & Th.2.1]).Let L : T W → R + be an Lfunction with convex dual H, and let F : W → R be given.Then the following statements are equivalent: (i) L induces a GGS (W, Ψ, F ) for some dissipation potential Ψ, (ii) H(w, ζ) = Ψ * w, ζ − d w F (w) − Ψ * w, −dF (w) for some diss.pot.Ψ * , (iii) d ζ H w, d w F (w) = 0. ( Proposition 4.10.Let L : T W → R + be an L-function with convex dual H, and let a Poisson structure L : T * W → T W and energies E, F : W → R be given such that the non-interaction condition LdF = 0 holds.Then the following statements are equivalent: (i) L induces a GGEN (W, Ψ, F , L, E) for some dissipation potential Ψ, (ii) d s L w, L(w)d w E(w) = d w F (w) and L(w, j) = ∞ for all j ∈ T w for which dE, j = 0, (39) (iii) d ζ H w, d w F (w) = L(w)d w E(w) and (40) H w, ζ + λdE(w) = H(w, ζ) for all (w, ζ) ∈ T * W and λ ∈ R. (41) Lemma 4.11.Let L : T * W → T W be a Poisson operator, E, F : W → R be energies and Ψ be a dissipation potential such that the non-interaction conditions (30) and (31) hold.An L-function L induces an GGEN (W, Ψ, F , L, E) if and only if the shifted L-function L(w, j) := L w, j + L(w)d w E(w) induces the GGS (W, Ψ, F ).

Figure 2 :
Figure 2: A jump through midpoint x in the direction with unit vector 1 l .

)
Theorem 4.8 states that L induces the GGS (M + (R d ), Ψ, F ) on flux space.For the state space, it is well-known that the state L-function (51) induces the entropy-Wasserstein gradient flow of the entropy functional [ADPZ11, DLR13, EMR15, MPR14].By the theory developed in Section 4, we can now see how this gradient structure is related to the flux gradient structure.Indeed, the flux free energy F depends on state only, i.e.F ( w) = F(φ[ w])), where F(ρ) = 1 2 ´ρ(dx) log ρ(x) − ρ(dx), and so by Proposition 4.12 the state L-function L induces a GGS driven by F .Moreover, since the invariance condition (27) holds, the dissipation potentials are related by (43):