A framework of nonequilibrium statistical mechanics. II. Coarse-graining

For a given thermodynamic system, and a given choice of coarse-grained state variables, the knowledge of a force-flux constitutive law is the basis for any nonequilibrium modeling. In the first paper of this series we established how, by a generalization of the classical fluctuation-dissipation theorem (FDT), the structure of a constitutive law is directly related to the distribution of the fluctuations of the state variables. When these fluctuations can be expressed in terms of diffusion processes, one may use Green-Kubo-type coarse-graining schemes to find the constitutive laws. In this paper we propose a coarse-graining method that is valid when the fluctuations are described by means of general Markov processes, which include diffusions as a special case. We prove the success of the method by numerically computing the constitutive law for a simple chemical reaction $A \rightleftarrows B$. Furthermore, we show that one cannot find a consistent constitutive law by any Green-Kubo-like scheme.


I. INTRODUCTION
In nonequilibrium thermodynamics, fluctuations and dissipation are two sides of the same coin: the dissipative structure (i.e., the force-flux constitutive law) of the phenomenological equations is in a one-to-one correspondence with the distribution of their fluctuations, which represent, as an idealization, the effect of more microscopic, neglected, fast degrees of freedom. This is the essence of the 'fluctuation-dissipation theorem of the second kind', according to the classification designed by Kubo and co-authors [1,Sec. 1.6].
The fluctuation-dissipation theorem of the second kind (henceforth shortened as FDT) is the main subject of this series of papers. It has many uses, and we discuss two of these here. First, if we know the dissipative structure of the phenomenological equations, we can construct fluctuations that are compatible with this dissipative structure; this operation is performed, for instance, to augment the equations of hydrodynamics with fluctuating fluxes [2,88], [3,4], and we have called this an enhancement in the first paper of this series (which we refer to as (I)). Secondly, in the opposite direction, if the dissipative structure of the phenomenological equations is not yet known, then we can determine it by analyzing the fluctuations that result from the coarse-graining of a more microscopic model: this is a major task of nonequilibrium statistical mechanics [5,Chapter 6], [6]. This second use of the fluctuation-dissipation is the topic of the current paper.
In (I) we observed how Kubo's classical formulation of the FDT is limited to fluctuations described by diffusion processes and, inspired by [7,8], postulated an extension of the FDT to general Markov processes, and corresponding extended theories of enhancements and dynamic coarse-graining. In this second paper we focus on coarse-graining where, by this expression, we mean (i) the identification of good macroscopic variables for a given problem, and (ii) the determination of the emerging dis-sipative structure at a chosen, more macroscopic level of description, which is our main focus.
Step (i), namely the identification of good macroscopic variables [9], is usually problem-dependent and requires a great deal of experience: it can hardly be framed in a systematic method, as we do here for step (ii).
In the setting of diffusive fluctuations, the method of Green-Kubo relations, based on the classical FDT, has been established as a powerful coarse-graining tool [6], in that it allows us to compute a dissipative structure, expressed in terms of a friction matrix, by relatively short simulations and without the need of imposing a different external force for each irreversible process. The hydrodynamics of Newtonian fluids and Fourier's heat conduction are the prime examples. The method has been used both in the linear-response regime [10,Section 4.4] and in fully nonequilibrium situations [11][12][13]. The diffusive nature of the fluctuations is a feature of state variables that are the sum of short-time correlated interactions of many microscopic particles [14] and evolve continuously in time by infinitesimally small movements in state space.
One of the main messages of (I) was that the framework of Green-Kubo relations is not general enough. Indeed, it does not include macroscopic variables characterized by rare events, for which, in contrast to the diffusive case, it is always possible to find a time scale at which the dynamics appears as constituted of rare and sudden jumps at discrete instants of time. The chief example is a chemical reaction, for which the fluctuating dynamics resembles more a jump process than a diffusion. For such systems, the picture identified by Eyring [15] and Kramers [16] and the corresponding rate formula gave birth to the field of rare-event estimation and simulation [17][18][19][20][21]. However, none of the methods in this field can resolve the dissipative structure of the macroscopic phenomenological equations. Trying to apply the Green-Kubo method to such systems produces incorrect results, as we show in Sec. IV B. Indeed, the theory presented in (I) shows how, for such systems, the correct dissipative structures may be expressed in terms of dissipation potentials instead of friction matrices.
The purpose of this paper is to construct an extended theory of coarse-graining based on the generalized FDT that we proposed in (I). The theory allows us to resolve dissipative structures of the phenomenological equations associated with (diffusive and non-diffusive) Markov processes and thus unifies the two pictures, Green-Kubo relations and Kramers-like rate formulas. We show how this works in practice by numerically computing the dissipation potential for the rate equation of the elementary chemical reaction A B, which arises from the coarse-graining of a dynamics in an double-well energy landscape (the Kramers escape problem).
One reason for determining the dissipative structure of a phenomenological equation has already been mentioned: it allows us to identify the type of noise that gives a consistent stochastic enhancement of the phenomenological equations, as we described in (I). The ultimate decision about the proper dissipative structure and the corresponding noise enhancement can only be reached by analyzing the true fast microscopic dynamics, that is, by statistical mechanics. However, if we have some intuition about the qualitative features of the noise, we can fill in the quantitative details of the idealized Markovian noise from the macroscopic dissipative properties. Conversely, the dissipative structure guides us in making statistical mechanics efficient for extracting all the dissipative properties from microscopic simulations. As the result of a consolidation process we arrive at a consistent multiscale understanding of a given system of interest.
The paper is structured as follows. After recapitulating, in Sec. II, the classical Green-Kubo method for diffusive fluctuations, we propose, in Sec. III, the natural extension to Markov processes on the basis of the generalized FDT. In Sec. IV we use the extended method to numerically compute the dissipation potential associated to the chemical reaction A B, and we present our conclusions in Sec. V.

A. Inference for diffusion processes
Let us consider the stochastic differential equation (SDE) with unknown drift A(x), noise intensity B(x) with Klimontovich interpretation (cf. the generator (2)) [22], and x ∈ R d . The estimation of A(x) and B(x), or the corresponding diffusion matrix D(x) := B(x)B(x) T , is the general problem of inference for diffusion processes, which in the statistics literature is studied for instance in [23,24].
For our illustrative purposes, working in terms of the infinitesimal generator of the process (1), is particularly transparent. Indeed, applying the generator to the test functions f i (x) = x i and f ij (x) = x i x j , we see that the diffusion matrix may be computed by the formula or, in matrix notation, As a consequence, the drift is computed as [25] A or All formulas inspired by Eq. (4) are referred to as Green-Kubo formulas and assume different forms depending on the application [5,Sec. 8.4]. We consider them as a way to infer the diffusion matrix from a sample of the time correlations of the second moments (cf. [23,Sec. 4.2.3]). Although we have considered only processes in R d , the same conclusions can be drawn, at least formally, for infinite-dimensional systems; see [26] for a theory of measure-valued diffusion processes, and [27] for an application to a field theory.
B. Coarse-graining via the Green-Kubo formula Let a physical system be described by the variables y = y 1 , y 2 , . . . , y n , with a large number n of degrees of freedom, and suppose that its dynamics is characterized by a 'slow' and a 'fast' time scale. The first goal of dynamic coarse-graining, in the sense used in this paper, is to identify a set of more macroscopic state variables X(y) ∈ R d that resolve the slow dynamics, meaning that, in the limit of many degrees of freedom, they evolve only 'slowly'. In addition, we suppose that the dynamics of the macroscopic variables, for large but finite n, can be well approximated by a stochastic process, which we also call X for simplicity: the most probable realizations of the stochastic process are regarded as paths of the slow dynamics, and the noise represents the idealized effect, at the macroscopic level, of the more microscopic, fast degrees of freedom. The identification of the coarse-grained variables (also called "collective variables") is often a very challenging step [9].
In many cases the macroscopic variables X can be assumed to be the sum of short-time correlated interactions of many microscopic particles [14]. The short-time correlation implies that X can be assumed to be Markovian, in the presence of an infinitely large separation of time scales; in practice one has to deal with finite separations, which lead to memory effects. When the interactions are frequent and small, such that the process X can be considered to have continuous sample paths, then the process X is a diffusion and can be described by an SDE [28,Sec. 2.5]. In this case the noise is Gaussian.
We saw in (I) how the classical FDT suggests that the diffusion process X t solves the SDE with 2k B M (x) = D(x); the operator M (x) is called a friction matrix [29,30], and the most probable path solves the gradient-flow equation In contrast to (I), here we are assuming only dissipative components in the slow dynamics. This assumption is related to a condition of detailed balance [31, Sec. II.5] of the stochastic process X t with respect to the distribution e S(x)/k B ; see [32, Sec. 6.3.5] and [7]. The second goal of dynamic coarse-graining, for such systems, is to infer the dissipative structure, encoded by S(x) and M (x), by simulations. In this paper we always assume that the static simulations for the estimation of S(x) have already been performed, and the dynamic simulations for evaluating the friction matrix M (x) are based on the Green-Kubo formula (4).
Two remarks are in order. On the one hand, in the Green-Kubo formula, the limit τ → 0 presupposes a continuous-time sample, while in concrete applications we always consider discrete-time observations. On the other hand, the limit τ → 0 is not even desirable, since the diffusion process X t is only an approximation of the true (in general non-Markovian) macroscopic dynamics, and this approximation is usually valid in a range of time scales that are large with respect to the microscopic, fast time scale t 2 . The limit τ → 0 is thus replaced by τ being in the range where t 1 is the macroscopic, slow time scale. In other words, τ has to be macroscopically small, but microscopically large. Hence, the friction matrix may be estimated as By combining coarse-graining with the fluctuationdissipation theorem, as described above, many systems have successfully been studied. On the side of theory, we refer to [1,Sec. 4.2], [33,Sec. 2.7], [5,Sec. 8.4], [6], [10,Chapter 4]; for numerical results, see e.g. [27,34,35]. The power of the method stems from two important features: (i) short simulations, with respect to the slow time scale t 1 , are sufficient to sample the matrix M (x); (ii) a single numerical experiment provides us with both the evolution equations and their dissipative structure, without the need of resorting to a different experiment for each irreversible process.
However, as we have remarked in (I), some systems have fluctuations that are distinctly non-Gaussian in nature, suggesting that the method just described may not give correct results. Our main example in Section IV below is of this type. In that section we apply and implement the generalized FDT of this paper to this example, but we also investigate to which extent the application of Gaussian-based methods would give incorrect results (see Section IV B).
In Section IV B we study three Gaussian-based methods: 'Green-Kubo', based on the scheme of this section, 'chemical Langevin equation', and 'log-mean equation'. Each of them is defined by a different choice of the pair (S(x), M (x)). It is possible to sample this pair correctly for the Green-Kubo method, but with the result of a wrong macroscopic phenomenological equation; for the other two methods the macroscopic evolution equation is correct, but a simulation would fail in sampling either Apparently, applying Gaussian-based methods to systems with non-Gaussian fluctuations is like forcing a square peg into a round hole: the results will be suboptimal. In order to deduce the dissipative structure of such non-Gaussian systems, in this series of papers, we generalize the FDT and propose an extended theory of coarse-graining.

III. COARSE-GRAINING ASSOCIATED WITH MARKOVIAN SYSTEMS
This section addresses the main contribution of this paper: how we can construct a coarse-graining procedure that gives us the dissipative structure of phenomenological equations associated with both Gaussian and non-Gaussian noise. We present the arguments in two subsections. In the first one we briefly define the classical problem of inference for Markov jump processes, and sketch the setup where a dynamics in an energy landscape with metastable states is coarse-grained to a jump process, with unknown, to-be-computed, transition rates; the macroscopic trajectories, namely the solutions of the phenomenological equations, are the most probable paths. In the second subsection we show how the generalized FDT is essential to resolve the dissipative structure of the phenomenological equations.

A. Inference for Markov jump processes
Markov jump processes are completely defined by the transition rates between all of their states, and this information is encoded in the transition-rate matrix, fully equivalent to the infinitesimal generator. Very often, a Markov jump process is observed during an experiment or a numerical simulation, and one wishes to determine the transition rates from the observations. This is the task of the statistical inference for Markov jump processes, which was studied for instance in [36] and reviewed in [37].
In the case of continuous-time observations, it is easy to check [36] that the best estimator for an element of the transition-rate matrix is where N ij is the number of transitions from the state i to j, and R i is the time spent in i.
The observations, however, are never continuous, but are made at discrete times. The main issue of this situation is the famous embedding problem [36,38]: to the same discrete-time Markov chain, the transition rates of which are estimated in practice, there may correspond zero, one, or many continuous-time Markov processes that have the same finite-time transition rates. We will not focus on this issue in this paper, although we believe it to be important for future developments.
The typical physical setup where jump processes arise naturally is the dynamics of many particles in an energy landscape characterized by metastable states. By a metastable state one indicates the region of attraction of a local energy minimum such that the time scale for the system to equilibrate is much shorter than the time scale to escape from it [39,40]. Since the system spends most of its time in these special states, the escape events are 'rare', and the study of these phenomena has given rise to the field of rare-event estimation and simulation [17][18][19][20][21].
The most famous, preliminary toy model in this class of systems was studied by Eyring [15] and Kramers [16], who gave the statistical-mechanical derivation of an explicit formula for the transition rates between the two minima of a double-well potential. We will study this system again from the standpoint of our generalized FDT in Sec. IV.
In particular, our goal is not to compute the transition rates between metastable states, but to resolve the dissipative structure of the macroscopic phenomenological equations, as we explore in the next subsection.
B. Coarse-graining via the generalized FDT By analogy with the Gaussian picture of Sec. II B, let us consider again a setup described by microscopic variables y, and with a separation of time scales. A set of more macroscopic variables X(y) is introduced to separate the time scales effectively. We now assume that X is not necessarily a diffusion process, but may be represented as a general Markov process, and the most probable paths are the solutions of the deterministic equation We then aim to estimate the structure of this phenomenological equation by analyzing the noise that results, at the macroscopic level, from the neglected degrees of freedom. Among these two steps, identification of the macroscopic variables and estimation of the force-flux constitutive law, which together define what we call a coarse-graining procedure, this paper focuses entirely on the second one.
In contrast to paper (I), here we restrict the form of the phenomenological equations to the generalized gradient flow which corresponds to a purely dissipative dynamics governed by an entropy function S and a dissipation potential Ψ * . As elaborated in (I), following [7], the dissipation potential Ψ * may be found by studying the stochastic process X t . In particular, we need to compute the following cumulant generating function (cf. Eq. 28 in (I) and [41, In this expression, the expectation is taken over all possible realizations of the stochastic process X t starting from x and with time duration τ , and τ is far from the fast time scale t 2 and the slow time scale t 1 : The generalized FDT implies that This correspondence between the left-hand side (a property of the stochastic process) and the right-hand side (the structure of the most probable evolution) has its origin in the connection between large deviations for Markov processes and the generalized gradient flows that was proven in [7], where it is explained how the connection, in the purely dissipative case, is based on a detailed-balance property of the stochastic process with respect to the distribution e S(x)/k B . In this paper we suppose that the distribution e S(x)/k B has already been sampled to find the function S(x), so that the static properties of the system are fully known. The main focus, instead, rests upon the computation of the dissipation potential Ψ * by the formula (14), which completely characterizes the dynamics.
From the practical standpoint, it is convenient to evaluate the expression (14), for fixed x, at the values Indeed, for ξ = 0, we get the second term on the lefthand side of Eq. (14) because Ψ * (x, 0) = 0; with the other values of ξ we explore the dissipation potential in ξ-space.
It is not the purpose of this paper to construct efficient simulations, nor to pursue any statistical rigor, which we reserve for future work. For instance, in the same spirit of the inference of the infinitesimal generator of a continuous-time Markov process, a theory of inference for the nonlinear generator, the limit of the cumulant generating function (12) as τ → 0, should be developed.
We have seen that the computation of the cumulant generating function for the stochastic process X t , the lefthand side of Eq. (14), together with the information on the static distribution, provides us with the dissipative structure, expressed in terms of an entropy function S and a dissipation potential Ψ * , for the macroscopic phenomenological equation. Note, in particular, that we do not need to assume the nature of the process X t , except that it is Markovian and it satisfies detailed balance: the Gaussian case gives rise to a quadratic dissipation potential, thus to a friction matrix. The procedure based on the generalized FDT, thus, gives a unified way of dealing with both Gaussian and non-Gaussian Markovian fluctuations, and with both the Green-Kubo and the Kramers pictures.

IV. EXAMPLE: A SIMPLE CHEMICAL REACTION
To test the method just proposed, we have chosen the simplest example where a jump process arises from coarse-graining: the Kramers escape problem over an energy barrier [16], which is a model for the unimolecular chemical reaction A B. The dynamics of chemical reactions are described by phenomenological rate laws [42]. A famous example is the reaction rate equation (RRE) [43], which we consider here in the very simple version of the unimolecular reaction A B. Our aim is to determine the dissipation potential of the rate law from the corresponding microscopic model, the overdamped Langevin dynamics of n independent particles in a double-well potential.
We present the argument in three subsections. In Sec. IV A we introduce the multiscale setup and compute the dissipation potential analytically. Since the macroscopic, reactive, system is not of the diffusive type, as we show in Sec. IV B, it is clear that, in the framework of this series of papers, only the generalized FDT can provide the correct dissipation potential. In Sec. IV C we describe the algorithm by which we compute the dissipation potential numerically. We consider a large number n of reactive particles in a mixture. The constituents of the mixture do not directly enter our description of the system, which is based only on the state of the reactive particles. We assume that the reactive particles are independent, and the state of each particle is described by its position on the real line, which can be interpreted as a reaction coordinate [42, p. 1158] or collective variable or coordinate [44,45]. We gather all positions in the array y 1 , y 2 , . . . , y n ∈ R n .
Each particle follows an overdamped Langevin dynamics in the energy landscape of Figure 1; in this dynamics, the noise represents the effective interaction of each particle with all constituents in the mixture, which is physically described as a heat bath at temperature T . The two wells of the energy landscape correspond to the two chemical states A and B, and the motion is described by the SDEs where γ is a friction coefficient with dimensions of [mass]/[time], V is the derivative of the energy, and the W i are independent Wiener processes. Although Eq. (1) and Eq. (16) are formally equivalent, their physical roles should be clearly distinguished: Eq. (1) represents the evolution equation of a macroscopic state variable with noise enhancement in the statistical-mechanical setting of this paper; Eq. (16), instead, is an effective microscopic dynamics.

The macroscopic system
Denoting by 1 J the indicator function of the set J, we introduce the macroscopic variable which keeps track of the concentration of the particles that, at each time t, are in the well B := (0, ∞); namely, it is a rational number x in the set The concentration of A is 1 − X, of course. From the symmetry of the problem-the states A and B are interchangeable-it is clear that the static distribution is a (scaled) binomial one with parameters n and 1/2, By using Stirling's approximation, in the limit n → ∞, one may verify that the distribution is in the form We now turn to the dynamics. As one can infer from Figure 1, when the thermal energy k B T is sufficiently small with respect to the height of the energy barrier ∆V , each particle spends most of its time in the minima of the potential, and the motion between the two wells happens through rapid transitions due to rare occurrences of multiple Brownian kicks in the same direction. In this regime, the system is characterized by two neatly separated time scales: the equilibration time t 2 of the particles in the wells, and the escape time t 1 from the wells [40], with t 1 t 2 . During the equilibration time t 2 , a particle equilibrates locally and forgets where it was before the last jump event. The escape time t 1 defines the reaction constant by the relation k := t −1 1 . The stochastic process (17) in the low-temperature limit is the unimolecular version of the chemical master equation (CME), a continuous-time Markov jump process that, in general, describes the evolution of the concentrations of multiple chemical species in a mixture [46]. However, since the ratio between the temperature and the energy barrier is fixed by the physics of the system and should be considered as finite, the separation of time scales is also finite, and we must think of the CME only as a Markovian approximation of the true, non-Markovian dynamics. The approximation is valid at time scales that are larger than the microscopic equilibration time scale t 2 : as a consequence, only correlation functions with time differences τ t 2 have a true macroscopic meaning.
The infinitesimal generator of the CME for our twostate system reads The CME is in detailed balance [47] with respect to the distribution (18). To find the dissipation potential, we compute the cumulant generating function Then, a short computation shows that the function satisfies the defining relation (14).
In the approximations ( * ) and ( * * ) we have used a short-time assumption nkτ 1, which corresponds to the fact that, during the time scale τ , much less then one reaction event occurs, on average. By a slightly different argument one finds the same result but under the weaker condition kτ 1, as follows. When kτ 1, the stochastic process (17) may also be approximated by a discrete-time Markov jump process with transitions of the type [48] where L + x,τ and L − x,τ are independent Poisson random variables with parameters λ + x,τ = k n(1 − x) τ and λ − x,τ = k nx τ , and corresponding probability mass functions then produces the same dissipation potential (22). Note that, under the stronger assumption nkτ 1, the occurrences l + , l − > 1 carry only negligible weight in (24).

The most probable evolution: the reaction rate equation
As one may infer from the generator (20), when n → ∞, the CME converges to the macroscopic phenomenological equation where x ∈ X = [0, 1]. With the entropy function (19) and the dissipation potential (22), one may verify that the reaction-rate equation (RRE) (25) can be written as the generalized gradient flow The generalized gradient flow given by the pair (19), (22) was proposed in [49] (see also [50]) independently from any consideration about an underlying stochastic process, which is remarkable in view of the fact that the number of candidate dissipation potentials, given the same entropy (19), is infinite (cf. [51,Example 4.3]). For instance, a quadratic dissipation potential was proposed in [30,52] and was supported in [53] by thermodynamic and geometric arguments. The corresponding friction matrix reads with the logarithmic mean We elaborate further on the dissipation potential (22) in Sec. IV C, where we show that the same can be obtained by numerical simulations of the microscopic system, with the only assumptions that the macroscopic stochastic process is Markovian and in detailed balance. In the next section, instead, we see what would happen if we restricted the class of stochastic processes to diffusions.

B. Green-Kubo formula and the shortcomings of diffusion approximations
The generalized FDT provides us with the dissipation potential and the entropy function of the RRE from the properties of the associated stochastic process. Specifically, it gives us (i) an entropy function that can be sampled from the static distribution and (ii) a dissipation potential that can be sampled from the cumulant generating function; moreover, (iii) the generalized gradient flow constructed from the entropy and the dissipation potential produces the correct form of the RRE. Can these three features be reproduced by assuming the stochastic process X t to be a diffusion process? In this section we find an answer.
Note that the assumption of a diffusion process is not just an academic exercise since, in practical situations, we do not know the nature of the macroscopic process X t , but only have access to the dynamics of a more microscopic model. Assuming a diffusion process means restricting ourselves to the classical scheme of Green-Kubo relations.
Let us assume that the 'Green-Kubo' diffusion process is an accurate dynamics for the macroscopic variables. Since it is a diffusion, the corresponding dissipation potential is quadratic, and the friction matrix may be computed by the Green-Kubo formula Note that, in practice, the actual sampling is made with simulations at a more microscopic level and, since in this case we know that the CME is the correct dynamics for the macroscopic variables, from Eq. (3) we expect the result where f (x) = x 2 , g(x) = x, and Q is the generator (20) of the CME. We remark that M GK is, in general, a function of x, and it would be so if there were two distinct rate constants k − = k + for the backward and forward reactions. With the entropy (19), we get which has (i) the correct stationary distribution, that is, the correct entropy (by construction), (ii) a Green-Kubo expression for the friction matrix that can be computed by simulations, but (iii) the wrong drift and, therefore, the wrong most probable evolution (cf. Figure 2). (Note that while 'spurious' drift terms sometimes appear as the result of the different possible interpretations of the noise in an SDE, in this case the noise is additive, and no such terms arise.) Other possibilities of constructing a diffusion process for chemical reactions have been proposed: their goal is to approximate the CME for a large number of particles. One of them is called the chemical Langevin equation [54], which can also be interpreted as the diffusion approximation [55] of the CME, and reads with the entropy and the friction matrix (30). This process has (iii) the correct most probable evolution, (ii) a Green-Kubo expression for the friction matrix, but (i) the wrong entropy, viz., the wrong stationary distribution (cf. Figure 3). A third choice is the log-mean equation [56] with the entropy (19) and the friction matrix (27). It has (iii) the correct most probable evolution, (i) the correct stationary distribution, but (ii) the friction matrix cannot be sampled by the Green-Kubo formula (cf. later Figure 5). A common feature of all three diffusion processes is that the macroscopic variable X has a positive probability of exiting the domain [0, 1], and this phenomenon may  be seen both in the stationary distribution (cf. Figure 3) and in the dynamics (in the simulation behind In conclusion, there is no way for a diffusion process to satisfy the requirements (i)-(iii) simultaneously (cf. Table I). In order to satisfy all three requirements, one should move to more general Markov processes and to non-quadratic dissipation potentials.

C. Numerical experiments
The goal of the coarse-graining scheme proposed here is to infer the structure of a more macroscopic level of description from a more microscopic one, which in this case is represented by the overdamped Langevin dynamics of many independent particles in a double-well potential. In such a simple situation, the macroscopic variable is easily chosen as the concentration of particles in one well. The dynamics of the concentration, when the thermal energy k B T is small with respect to the energy barrier ∆V , is well approximated by a Markov process. However, we stress the fact that, in general, the system over which we have full control is the microscopic one; even if, in this simple case, we know the form of the macroscopic Markov process and the dissipation potential (up to the param-eter k that completely characterizes them), in the numerical calculations we pretend to have no macroscopic information.
Before describing our numerical method, and to highlight the free parameters of the system, let us make Eq. (16) dimensionless through the friction coefficient γ, the energy barrier ∆V , and L, the distance between the maximum and the minimum points in the energy landscape. Defining byã the dimensionless quantity relative to a, we find From the numerical calculations and the values of the dimensional parameters γ, ∆V , and L, one may find the physically meaningful results. To simplify the notation, from here on we drop the tildes. The method advanced in this paper aims at computing the dissipation potential numerically. When, like in this case, we know its functional form, we could also determine the value of its unknown parameter k and compare it with the reference one given by Kramers' formula [16,39] In accordance with the approach of this paper, we suppose that the entropy function S, or its derivative ∂S/∂x [12], has already been found, and we concentrate on the dynamics by computing the cumulant generating function (12). The evaluation of the cumulant generating function depends on the energy landscape, which we choose as and on five parameters: • The ratio r := ∆V /(k B T ), which controls the separation of time scales. Kramers mentions in his seminal paper [16] that r = 2.5 is sufficient: the process becomes approximately Markov. We actually work with r = 4, which impliesk ≈ 4 · 10 −5 . In real applications, however, this is not a parameter, but a model datum.
• The time-step size ∆t → 0 of the numerical scheme used to simulate the SDE (16), which should resolve the microscopic dynamics, guarantee stability of the scheme, and be smaller than the local equilibration time t 2 [57]. We consider the numerical value ∆t = 0.01.
• The time interval τ . This time constant should be "macroscopically small", i.e., much smaller than the typical jump time t 1 = k −1 , but also larger than the equilibration time t 2 , in such a way that we retain only the macroscopic features of the process X t . We take τ =k −1 /50 ≈ 5 · 10 2 , wherek is given by formula (34). In more general contexts, we may not know the values of the characteristic times in advance and should perform an appropriate estimation of them.
• The number of particles n → ∞. Since the particles are independent, the cumulant generating function factorizes into cumulant generating functions for the single particles. Its computation would then require the simulation of just one particle. However, since n controls the discretization of the space X n , and to keep the generality of our framework, which should work for interacting particle systems as well, we choose n = 10.
• The sample size N → ∞ over which we calculate the empirical expectation. To obtain good statistics, sufficiently many jumps should occur in the total observation time. Since the average jump time is t 1 , we need N τ t 1 . With the choice N = 10 5 , the total average number of jumps is N τ /t 1 ≈ 2 · 10 3 .
We have thus built the chain of inequalities The numerical setup is the following.
1. For every x ∈ X n , we select a series of values α j = (ξ j − ∂S/∂x)/(2k B ), with the ξ j logarithmically spaced [58] in the interval [−ξ max , ξ max ] with ξ max = 8. The logarithmic spacing has the aim of resolving the region around ξ = 0 in a sufficiently accurate way.

2.
For every x, we run N simulations, of length τ , of the n independent SDEs (16). We use an Euler-Mayurama scheme with step size ∆t. The starting point for nx particles is 1 and for the others is −1, that is, the initial microscopic state is  .
We need not care about equilibration in the wells because τ t 2 .
3. We index the simulations by and say that the random variable X τ has x τ as its realization. After the -th simulation started from x, we compute the quantities There is one such quantity for each x, j and .
4. To estimate the expectation in Eq. (12), we calculate From the cumulant generating function we obtain an estimate of the dissipation potential Ψ * (x, ξ) by using the central equation (14).
The results of the algorithm are displayed in Figure 4, where the solid surface is the reference dissipation potential (22) with k =k, and the red dots are its estimated values, which show good agreement. If we assume the functional form of the dissipation potential given by Eq. (22), we may determine the reaction constant by fitting the simulation points with the function (22). We do so with the values of Ψ * (x, ξ) at the points x = 0.5, 0.1. In Figure 5, we compare this fitting procedure to the reference dissipation potential with k =k. We observe a small discrepancy, which we do not fully understand, but we do not know a simple alternative to compute the dissipation potential numerically. We only mention that the Kramers formula overestimates the reaction constant k for any finite r; see [40] for a more sophisticated method to compute k.
In addition, we show how the diffusion setting does not work in this example. In the previous subsection we have seen how two diffusion approaches, 'Green-Kubo' and 'Chemical Langevin equation', may be constructed from a friction matrix that can be computed by the Green-Kubo formula, but do not reproduce either the correct most probable evolution or the static distribution of the process X t . We now demonstrate numerically how also the third diffusion process, the 'log-mean equation', is inconsistent, namely the corresponding friction matrix (27) cannot be sampled by the Green-Kubo formula (30). The friction matrix (27) would give rise to the dissipation potential  22)) and compared with (c) the reference dissipation potential with k =k. The confidence intervals are at level 99%. In addition, we compare (d) the dissipation potential (38) derived from the friction matrix (30), which can be computed by the Green-Kubo formula, with (e) the dissipation potential (37) derived from the friction matrix (27) with k =k. The two agree only near the equilibrium point x = 0.5.
whereas the Green-Kubo formula would suggest The two agree in the region around the equilibrium point x = 0.5, but differ significantly for more extreme values of x, as one observes in the second frame of Figure 5. From the expressions (22), (37), and (38), we also note that, in the same region around x = 0.5, all dissipation potentials agree for values of ξ close to 0: in particular, at x = 0.5 and close to ξ = 0, the dissipation potentials (37) and (38) are the second-order Taylor approximations of the dissipation potential (22). We emphasize that our aim has been to directly resolve the dissipative structure of the macroscopic equations: this is not the aim of standard approaches [18][19][20]. We also expect that our viewpoint will constitute an advantageous tool for less simple systems, such as problems of homogenization [59] or systems where the structure of the macroscopic dynamics is not known in advance [60].
If we consider more general reaction networks, characteristic problems of standard approaches will remain: for instance, high local minima of the potential landscape are rarely explored and boundaries between macroscopic states are not easy to set [20]. The method proposed here presents the additional complication of being "stiff" because of the strong nonlinearity in Eq. (35).
To tackle the issues of numerical efficiency, importance sampling has been established as the basis of many known numerical methods in statistical mechanics [61]: the probability distribution of a random variable is changed, often by "exponential tilting", in such a way that rare events become less rare and can more easily be observed. Physically, this corresponds to biasing the system by an external force. Following the ideas in [19], we would like to improve our numerical algorithm by importance-sampling techniques.

V. CONCLUSIONS
The main subject of this series of papers is a generalization of the fluctuation-dissipation theorem of the second kind (FDT). In paper (I), inspired by [7], we postulated this generalization on the basis of physical principles. In this second paper we have used the generalized FDT to develop a new method of coarse-graining. By this method, the dissipative structure (force-flux constitutive law) of a given phenomenological equation is expressed in terms of a dissipation potential and an entropy function, and can be computed by numerical simulations on a more microscopic level of description. We have illustrated the success of the method with the example of the simple chemical reaction A B by computing the dissipation potential explicitly (cf. Figure 4 and 5). It was not our aim to address the choice of good macroscopic variables, which usually constitutes a problem-dependent challenge. Here we assume them to be given. In contrast to (I), here the theory has been restricted to purely dissipative systems.
We now recapitulate our findings in more detail. First, to realize why we need the generalization at all, we have studied the classical FDT for diffusion processes, its power and its limitations. The classical FDT suggests two facts: first, that the most probable paths of a diffusion process, the macroscopic phenomenological equations, are solutions of the gradient flow and secondly, that the friction matrix M above coincides with the diffusion matrix of the process. Once we have computed the function S by studying a static problem, we can compute the friction matrix M by estimating the infinitesimal covariance matrix of the process. This is the essence of the Green-Kubo formula.
We have then remarked that some thermodynamic variables have fluctuations that are not well described by diffusion processes, and the typical example is a chemical reaction, which is better represented as a jump process. In Sec. sIV B and IV C (Figure 2, 3, and 5), with the example of the chemical reaction A B, we have shown how applying the Green-Kubo picture to these systems leads to incorrect results: there is no way of determining a consistent dissipative structure by restricting the fluctuations to the class of diffusion processes. Indeed, these systems have always been studied under the 'Kramers picture', where jump transition rates are the central quantities to be computed. But this picture does not identify any force-flux constitutive law.
The generalized FDT allows us to solve this problem by using the setting of general Markov processes. Like the classical FDT, the generalized FDT suggests two facts: first, the most probable paths of a Markov process with detailed balance are solutions of the generalized gradient flow and secondly, the fluctuations of the process are characterized by the dissipation potential Ψ * -the same dissipation potential that appears in (40). In this way the generalized FDT recognizes the dissipation potential Ψ * as the fundamental object that characterizes fluctuations. The classical, diffusive, case corresponds to a dissipation potential Ψ * that is quadratic, and therefore characterized as Ψ * (x, ξ) = 1 2 ξ T M (x)ξ; one then readily recognizes the matrix M in (39) as the second derivative ∂ 2 Ψ * /∂ξ 2 , and the quadratic functional Ψ * as the small-noise-limit dissipation potential for a diffusion process with diffusion matrix M . This also explains why the Green-Kubo relations allow the characterization of the full potential Ψ * by only estimating the second derivative ∂ 2 Ψ * /∂ξ 2 at zero.
In general, however, the dissipation potential Ψ * is not quadratic, and a full characterization of the fluctuations requires determining the full potential Ψ * . We have shown that this can be done by estimating a cumulant generating function of the process, and we have proposed a numerical method to do this. By this method we do not need to assume anything about the macroscopic stochastic process beyond Markovianity and detailed balance, and thus we can deal with diffusion and jump processes in a common framework, which unifies quadratic and nonquadratic dissipation potentials and the Green-Kubo and the Kramers pictures.
The example of a simple chemical reaction A B has shown both the power of the method and the failure of the Green-Kubo schemes when applied to a jump process: the computed dissipation potential agrees well with the theoretical one ( Figure 4 and 5), and by neither the Green-Kubo nor any diffusion-based method it is possible to obtain a friction matrix that, combined with the correct entropy, reproduces the correct macroscopic phenomenological equation (Figure 2, 3, and 5). The small discrepancy in the dissipation potential, visible in Figure 5, requires to be investigated further and highlights the need of a deeper understanding and, consequently, of better algorithms.
Although this elementary illustration has been proven successful, it certainly requires refinement from both the standpoints of the statistical solidity and of the efficiency of the algorithm, especially because we intend to apply the method to more complex systems, such as plasticity, the dynamics of glasses, nucleation theory, or the Boltzmann equation.