Introduction

When a system is at equilibrium with its environment (i.e., when no energy currents are exchanged) the probability of a given microstate x is given by the Gibbs distribution1,2,3

$${P}_{{{{{{{{\rm{eq}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})={e}^{-\beta {{\Phi }}({{{{{{{\boldsymbol{x}}}}}}}})}/Z,$$
(1)

where \(\beta={({k}_{b}T)}^{-1}\) is the inverse temperature of the environment, Φ(x) is the free energy of microstate x (for states with no internal entropy, Φ(x) is just the energy), and \(Z={\sum }_{{{{{{{{\boldsymbol{x}}}}}}}}}\exp (-\beta {{\Phi }}({{{{{{{\boldsymbol{x}}}}}}}}))\) is the partition function. This central result of equilibrium statistical physics has universal validity and its relevance in most areas of physics cannot be overstated. A natural question is whether or not a similar result also holds for nonequilibrium steady states (NESSs), when the system is maintained out of thermal equilibrium by external drives and subjected to constant flows of energy or matter. In this case, one can always write the steady state distribution over microstates as

$${P}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})={e}^{-{{{{{{{\mathcal{I}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})}$$
(2)

in terms of the self-information \({{{{{{{\mathcal{I}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})\), also known as fluctuating entropy4,5. In order to provide a useful generalization of the Gibbs distribution to NESSs one must relate the self-information \({{{{{{{\mathcal{I}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})\) to measurable physical quantities. This quest has a long history, starting with the seminal contributions of Lebowitz and MacLennan6,7,8 and followed by other works9,10,11,12,13,14,15. However, it still remains an open problem in non-equilibrium statistical physics, since previous formal results are simply not practical in computations, due to the fact that they involve averages over stochastic trajectories.

In this work we prove, for a very general class of open systems displaying a macroscopic limit where a deterministic dynamics emerges, the following fundamental bound on changes of self-information:

$${{{\Sigma }}}_{{{{{{{{\rm{a}}}}}}}}}\equiv {{\Sigma }}+{k}_{b}({{{{{{{\mathcal{I}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})-{{{{{{{\mathcal{I}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{0}))\,\ge \,0,$$
(3)

where \({{\Sigma }}=\int\nolimits_{0}^{t}dt^{\prime} \dot {{{\Sigma }}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t^{\prime} })/T\) is the entropy production along a deterministic trajectory from microstate x0 to microstate xt. For example, let us consider the case of chemical reaction networks. The concentrations x = (x1, x2, ⋯  ) of different chemical species reacting in a solution are stochastic quantities, and their evolution is therefore described by a probability distribution Pt(x) at time t. As the volume V of the solution is increased, the distribution Pt(x) becomes strongly localised around the most probable values xt for the concentrations at time t, and these values follow a deterministic dynamics that is in general nonlinear (given in this case by the chemical rate equations). An analogous situation is encountered in electronic circuits, where the state variables x are now the voltages at the nodes of a circuit, and the macroscopic limit corresponds to increasing the typical capacitance C of the nodes (as well as the conductivity of the conduction channels connecting pairs of nodes). The remarkable feature of the result in Eq. (3) is that it provides a link between the deterministic dynamics that emerges in the macroscopic limit and the fluctuations observed at steady state. For example, in an electronic circuit powered by voltage sources and working at temperature T, the entropy production rate is \(\dot{{{\Sigma }}}=-\!\dot{Q}/T\), where \(-\dot{Q}\) is the rate of heat dissipation by the conductive elements of the circuit, that can be easily evaluated at the deterministic level. Then, by Eq. (3), the quantity \(-{{\Sigma }}/{k}_{b}=\int\nolimits_{0}^{t}dt^{\prime} \dot {Q}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t^{\prime} })/({k}_{b}T)\) provides a lower bound to the change of steady state self-information \({{{{{{{\mathcal{I}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})-{{{{{{{\mathcal{I}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{0})\) along a trajectory. To arrive at our main result in Eq. (3) we consider stochastic systems with a well defined macroscopic limit in which the self-information \({{{{{{{\mathcal{I}}}}}}}}(x)\) can be shown to be extensive, and Eq. (3) is strictly valid in that limit. However, as we also show, our results can be applied to micro or mesoscopic systems whenever sub-extensive contributions to \({{{{{{{\mathcal{I}}}}}}}}(x)\) can be neglected. We interpret our result as an emergent second law of thermodynamics, that is stronger than the usual second law Σ ≥ 0. This last inequality is recovered from Eq. (3) by considering the fact that \({{\Delta }}{{{{{{{\mathcal{I}}}}}}}}={{{{{{{\mathcal{I}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})-{{{{{{{\mathcal{I}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{0})\le 0\) (to dominant order in the macroscopic limit, the steady state self-information is a Lyapunov function of the deterministic dynamics16). In addition to its conceptual value, our result offers a practical tool to approximate or bound non-equilibrium distributions, that can typically only be accessed via stochastic numerical methods (for example the Gillespie algorithm). In contrast, Eq. (3) only requires to know the deterministic dynamics of the system, which is directly given by the well known network analysis techniques commonly applied in electronic circuits and chemical reaction networks. Furthermore, the inequality in Eq. (3) is saturated close to equilibrium, leading to a powerful linear response theory17. As an example, we apply our results to a realistic model of non-equilibrium electronic memory: the normal implementation of SRAM (static random access memory) cells in CMOS (complementary metal-oxide-semiconductor) technology. These memories have a non-equilibrium phase transition from a monostable phase to a bistable phase that allows the storage of a bit of information. As we will see, the transition is well captured by Eq. (3), which also allows to bound the probability of fluctuations around the deterministic fixed points. Finally, we show that a general coarse-graining procedure generates equivalent models with minimal entropy production, and that in this way the bound in Eq. (3) becomes tighter. When applied to the CMOS memory, this improved bound enables the full reconstruction of the steady state distribution arbitrarily away from equilibrium.

Results

To obtain Eq. (3) we consider stochastic systems described by autonomous Markov jump processes. Thus, let \(\{{{{{{{{\boldsymbol{n}}}}}}}}\in {{\mathbb{N}}}^{k}\}\) be the set of possible states of the system, and λρ(n) be the rates at which jumps n → n + Δρ occur, for ρ = ± 1, ± 2, ⋯   and Δρ = −Δρ (ρ indexes a possible jump and Δρ is the corresponding change in the state). Each state has energy E(n) and internal entropy S(n). Thermodynamic consistency is introduced by the local detailed balance (LDB) condition18,19. It relates the forward and backward jump rates of a given transition with the associated entropy production:

$${\sigma }_{\rho }=\log \frac{{\lambda }_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})}{{\lambda }_{-\rho }({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho })}\,=-\beta \left[{{\Phi }}({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho })\,-\,{{\Phi }}({{{{{{{\boldsymbol{n}}}}}}}})\,-\,{W}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})\right].$$
(4)

In the previous equation, Φ(n) = E(n) − TS(n) is the free energy of state n, and Wρ(n) is the non-conservative work provided by external sources during the transition. For simplicity, we have considered isothermal conditions at inverse temperature \(\beta={({k}_{b}T)}^{-1}\), and therefore the system is taken away from equilibrium by the external work sources alone. More general situations in which a system interacts with several reservoirs at different temperatures can be treated in the same way, this time in terms of a Massieu potential taking the place of βΦ(n)18. Important classes of systems accepting the previous description are chemical reaction networks and electronic circuits, which are powered by chemical or electrostatic potential differences, respectively. Note that, by energy conservation, the heat provided by the environment during transition n → n + Δρ is Qρ(n) = E(n + Δρ) − E(n) − Wρ(n), and therefore kbσρ = − Qρ(n)/T + S(n + Δρ) − S(n).

The probability distribution Pt(n) over the states of the system at time t evolves according to the master equation

$${\partial }_{t}{P}_{t}({{{{{{{\boldsymbol{n}}}}}}}})=\mathop{\sum}\limits_{\rho }\left[{\lambda }_{\rho }({{{{{{{\boldsymbol{n}}}}}}}}\,-\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }){P}_{t}({{{{{{{\boldsymbol{n}}}}}}}}\,-\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho })-{\lambda }_{\rho }({{{{{{{\boldsymbol{n}}}}}}}}){P}_{t}({{{{{{{\boldsymbol{n}}}}}}}})\right].$$
(5)

From the master equation and the LDB conditions one can derive the energy balance

$${d}_{t}\left\langle E\right\rangle=\langle \dot{W}\rangle+\langle \dot{Q}\rangle,$$
(6)

and the usual version of the second law:

$$\dot{{{\Sigma }}} ={\dot{{{\Sigma }}}}_{e}+{d}_{t}\left\langle S\right\rangle \\ =\frac{{k}_{b}}{2}\mathop{\sum}\limits_{\rho,{{{{{{{\boldsymbol{n}}}}}}}}}({j}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})-{j}_{-\rho }({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }))\log \frac{{j}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})}{{j}_{-\rho }({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho })}\,\ge \,0,$$
(7)

where jρ(n) = λρ(n)Pt(n) is the current associated to transition ρ. In the previous equations, \(\langle S \rangle={\sum }_{{{{{{{{\boldsymbol{n}}}}}}}}}{P}_{t}({{{{{{{\boldsymbol{n}}}}}}}})\left(S({{{{{{{\boldsymbol{n}}}}}}}})-{k}_{b}\right.\log ({P}_{t}({{{{{{{\boldsymbol{n}}}}}}}}))\) is the entropy of the system, \(\langle E \rangle={\sum }_{{{{{{{{\boldsymbol{n}}}}}}}}}E({{{{{{{\boldsymbol{n}}}}}}}}){P}_{t}({{{{{{{\boldsymbol{n}}}}}}}})\) is the average energy, and \({\dot{{{\Sigma }}}}_{e}\) is the entropy flow rate, given by

$$T{\dot{{{\Sigma }}}}_{e}=- \!\langle \dot{Q}\rangle=- \!\mathop{\sum}\limits_{\rho,{{{{{{{\boldsymbol{n}}}}}}}}}{Q}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}}){j}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})$$
(8)

where we also defined the heat rate \(\langle \dot{Q}\rangle\) (the work rate \(\langle \dot{W}\rangle\) is analogously defined as \(\langle \dot{W}\rangle={\sum}_{\rho,{{{{{{{\boldsymbol{n}}}}}}}}}{W}_{\rho}({{{{{{{\boldsymbol{n}}}}}}}})\,{j}_{\rho}({{{{{{{\boldsymbol{n}}}}}}}})\)). Finally, Eq. (7) can be also expressed as:

$$T \dot{{{\Sigma }}}=- \!{d}_{t}\langle F \rangle+\langle \dot{W}\rangle \,\ge \,0$$
(9)

where \(\left\langle F\right\rangle=\left\langle E\right\rangle - T\left\langle S\right\rangle\) is the non-equilibrium free energy.

Adiabatic/nonadiabtic decomposition

If the support of Pt(n) can be restricted to a finite subspace of the state space, the Perron-Frobenius theorem states that the master equation in Eq. (5) has a unique steady state Pss(n). Once the steady state is attained, the entropy production rate \(\dot{{{\Sigma }}}\) matches the entropy flow rate \({\dot{{{\Sigma }}}}_{e}\). An interesting decomposition of the entropy production rate can be obtained by considering the relative entropy \(D={\sum }_{{{{{{{{\boldsymbol{n}}}}}}}}}{P}_{t}({{{{{{{\boldsymbol{n}}}}}}}})\log ({P}_{t}({{{{{{{\boldsymbol{n}}}}}}}})/{P}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}}))\) between the instantaneous distribution Pt(n) and the steady state distribution Pss(n). Then, it is possible to show that \(\dot{{{\Sigma }}}={\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}+{\dot{{{\Sigma }}}}_{{{{{{{{\rm{na}}}}}}}}},\) where

$${\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}=\frac{{k}_{b}}{2}\mathop{\sum}\limits_{\rho,{{{{{{{\boldsymbol{n}}}}}}}}}(\,\,{j}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})-{j}_{-\rho }({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }))\log \frac{{j}_{\rho }^{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}})}{{j}_{-\rho }^{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho })},$$
(10)

and

$${\dot{{{\Sigma}}}}_{{{{{{{{\rm{na}}}}}}}}} =\frac{{k}_{b}}{2}\mathop{\sum}\limits_{\rho,{{{{{{{\boldsymbol{n}}}}}}}}}({j}_{\rho}({{{{{{{\boldsymbol{n}}}}}}}})-{j}_{-\rho }({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }))\log \frac{{P}_{t}({{{{{{{\boldsymbol{n}}}}}}}}){P}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho })}{{P}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}}){P}_{t}({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho })}\\ =- \!{k}_{b}{d}_{t}D$$
(11)

are the adiabatic and non-adiabatic contributions to the entropy production rate \(\dot{{{\Sigma }}}\), respectively. In Eq. (10) we have introduced the steady state probability currents \({j}_{\rho }^{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}})={\lambda }_{\rho }({{{{{{{\boldsymbol{n}}}}}}}}){P}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}})\). The non-adiabatic contribution \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{na}}}}}}}}}\) is related to the relaxation of the system towards the steady state, since it vanishes when the steady state is reached. This is further evidenced by the identity in the second line of Eq. (11): a reduction in the relative entropy between Pt(n) and Pss(n) leads to a positive non-adiabatic entropy production. The adiabatic contribution \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}\) corresponds to the dissipation of ‘housekeeping heat’20,21, and at steady state matches the entropy flow rate \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{e}}}}}}}}}\). An important property of the previous decomposition is that both contributions are individually positive: \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}\,\ge \,0\) and \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{na}}}}}}}}}\,\ge \,0\)22,23,24,25. Thus, the last inequality and the second line in Eq. (11) imply that the relative entropy D decreases monotonically, and since D is positive by definition, it is a Lyapunov function for the stochastic dynamics.

Macroscopic limit

In the following we will assume the existence of a scale parameter Ω controlling the size of the system in question. For example, Ω can be taken to be the volume V of the solution in well-mixed chemical reaction networks, or the typical value C of capacitance in the case of electronic circuits (see the example below). In addition, we will assume that for large Ω i) that the typical values of the density x ≡ n/Ω are intensive, ii) that the internal energy and entropy functions Ex) and Sx) are extensive, and iii) that the transition rates λρx) are also extensive. Under those conditions, the probability distribution Pt(x) satisfies a large deviations (LD) principle17,26,27:

$${P}_{t}({{{{{{{\boldsymbol{x}}}}}}}})\asymp {e}^{-{{\Omega }}{I}_{t}({{{{{{{\boldsymbol{x}}}}}}}})},$$
(12)

which just means that the limit \({I}_{t}({{{{{{{\boldsymbol{x}}}}}}}})\equiv \mathop{\lim }\limits_{{{\Omega }}\to \infty }-\log ({P}_{t}({{{{{{{\boldsymbol{x}}}}}}}}))/{{\Omega }}\) is well defined. Then, It(x) is a positive, time-dependent ‘rate function’, since it gives the rate at which the probability of fluctuation x decays with the scale. Note that, by Eq. (12), the steady state self-information introduced in Eq. (2) satisfies \({{{{{{{\mathcal{I}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})={{\Omega }}{I}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})\) to dominant order in the macroscopic limit. In other words, the large deviations principle states that the instantaneous self-information \({{{{{{{{\mathcal{I}}}}}}}}}_{t}({{{{{{{\boldsymbol{x}}}}}}}})\equiv -\!\log ({P}_{t}({{{{{{{\boldsymbol{x}}}}}}}}))\) is an extensive quantity26, and we can think of the rate function as the self-information density. Thus, in the following we will consider the ansatz \({P}_{t}({{{{{{{\boldsymbol{x}}}}}}}})={e}^{-{{\Omega }}{I}_{t}({{{{{{{\boldsymbol{x}}}}}}}})}/{Z}_{t}\), with \({Z}_{t}\equiv {\sum }_{{{{{{{{\boldsymbol{x}}}}}}}}}{e}^{-{{\Omega }}{I}_{t}({{{{{{{\boldsymbol{x}}}}}}}})}\), as an approximation to the actual time-dependent distribution. This amounts to neglecting sub-extensive contributions to the instantaneous self-information. As explained below, It(x) takes its minimum value It(xt) = 0 at the deterministic trajectory xt, which is equivalent to Pt(x) = δ(x − xt) for Ω → . Plugging the previous ansatz in the master equation of Eq. (5) we note that \({\lambda }_{\rho }({{{{{{{\boldsymbol{x}}}}}}}}-{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }/{{\Omega }}){P}_{t}({{{{{{{\boldsymbol{x}}}}}}}}-{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }/{{\Omega }})\simeq {\lambda }_{\rho }({{{{{{{\boldsymbol{x}}}}}}}}){P}_{t}({{{{{{{\boldsymbol{x}}}}}}}}){e}^{{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }\cdot \nabla {I}_{t}({{{{{{{\boldsymbol{x}}}}}}}})}\) to dominant order in Ω → . Noting also that \(\log ({Z}_{t})\) is sub-extensive, it is possible to see that It(x) evolves according to

$${\partial }_{t}{I}_{t}({{{{{{{\boldsymbol{x}}}}}}}})=\mathop{\sum}\limits_{\rho }{\omega }_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\left[1-{e}^{{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }\cdot \nabla {I}_{t}({{{{{{{\boldsymbol{x}}}}}}}})}\right],$$
(13)

where \({\omega }_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\equiv \mathop{\lim }\nolimits_{{{\Omega }}\to \infty }{\lambda }_{\rho }({{\Omega }}{{{{{{{\boldsymbol{x}}}}}}}})/{{\Omega }}\) are the scaled jump rates17,28. In a similar way, in the macroscopic limit the LDB conditions in Eq. (4) take the form

$$\log \frac{{\omega }_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})}{{\omega }_{-\rho }({{{{{{{\boldsymbol{x}}}}}}}})}=-\!\beta \left[{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }\cdot \nabla \phi ({{{{{{{\boldsymbol{x}}}}}}}})-{W}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\right],$$
(14)

in terms of the free energy density \(\phi ({{{{{{{\boldsymbol{x}}}}}}}})\equiv \mathop{\lim }\limits_{{{\Omega }}\to \infty }{{\Phi }}({{\Omega }}{{{{{{{\boldsymbol{x}}}}}}}})/{{\Omega }}\) (internal energy and entropy densities ϵ(x) and s(x) satisfying ϕ(x) = ϵ(x) − Ts(x) can be defined in the same way). For the work contributions in Eq. (14) we are abusing notation by writing \({W}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})=\mathop{\lim }\limits_{{{\Omega }}\to \infty }{W}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}}={{\Omega }}{{{{{{{\boldsymbol{x}}}}}}}})\). Note that we assume that work contributions are intensive. This is justified since they are given by the product of two intensive quantities: a thermodynamic force (for example a potential difference), and the change in a conserved quantity (mass, charge, etc) during a single jump29. However, note also that the work rate \(\langle \dot{W}\rangle\) will be extensive in general due to the extensivity of the transition rates.

Many classes of systems satisfy the previous scaling assumptions besides the examples already mentioned. Additional examples include non-equilibrium many-body problems like the driven Potts model30,31, reaction-diffusion models32,33, and asymmetric exclusion processes32,34.

From Eq. (12) we see that as Ω is increased, Pt(x) is increasingly localised around the minimum of the rate function It(x), which is the most probable value. Also, deviations from that typical state are exponentially suppressed in Ω. Thus, the limit Ω →  is a macroscopic low-noise limit where a deterministic dynamic emerges. In fact, from Eq. (13) one can show that the evolution of the minima xt of It(x) is ruled by the closed non-linear differential equations

$${d}_{t}{{{{{{{{\boldsymbol{x}}}}}}}}}_{t}={{{{{{{\boldsymbol{u}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t}){{{{{{{\rm{,\,with}}}}}}}}\,\,{{{{{{{\boldsymbol{u}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}}) \equiv\mathop{\sum}\limits_{\rho > 0}{i}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}}){{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho },$$
(15)

where iρ(x) ≡ ωρ(x) − ωρ(x) are the scaled deterministic currents17. The vector field u(x) corresponds to the deterministic drift in state space. For chemical reaction networks the dynamical equations in Eq. (15) are the chemical rate equations, while for electronic circuits they are provided by regular circuit analysis.

In the following section we obtain bounds for the steady state rate function Iss(x), that according to Eq. (13) satisfies:

$$0=\mathop{\sum}\limits_{\rho }{\omega }_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\left[1-{e}^{{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }\cdot \nabla {I}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})}\right].$$
(16)

Emergent second law

The positivity of the adiabatic and non-adiabatic contributions to the entropy production, \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}\,\ge \,0\) and \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{na}}}}}}}}}\,\ge \,0\), in addition to the usual second law \(\dot{{{\Sigma }}}\,\ge \,0\), have been called the ‘three faces of the second law’23. In28, the inequality \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{na}}}}}}}}}=-\!{k}_{b}{d}_{t}D\,\ge \,0\) was put forward as an ‘emergent’ second law. There, \({{{{{{{\mathcal{F}}}}}}}}={k}_{b}D\) was interpreted as an alternative non-equilibrium free energy, with a balance equation \({d}_{t}{{{{{{{\mathcal{F}}}}}}}}={\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}-\dot{{{\Sigma }}}\le 0\) (note the analogy with Eq. (9)). Then, the adiabatic contribution \({\dot{{{\Sigma }}}}_{a}\) was interpreted as an energy input, which at steady state balances the dissipation \(\dot{{{\Sigma }}}\). Although this point of view is compelling, it is hindered by the fact that there is no clear interpretation of \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}\) away from the steady state, that would allow to compute this quantity in terms of actual physical currents. In this work we take the other possible road, and investigate the interpretation and consequences of \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}\,\ge \,0\). We begin by rewriting Eq. (10) using the LDB conditions of Eq. (4) and the definition of \({{{{{{{\mathcal{I}}}}}}}}\) in Eq. (2), obtaining:

$${\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}=\dot{{{\Sigma }}}+{k}_{b}\,{d}_{t}\left\langle {{{{{{{\mathcal{I}}}}}}}}\right\rangle - {d}_{t}\left\langle {S}_{{{{{{{{\rm{sh}}}}}}}}}\right\rangle \,\ge \,0,$$
(17)

where we have defined \(\left\langle {{{{{{{\mathcal{I}}}}}}}}\right\rangle={\sum }_{{{{{{{{\boldsymbol{n}}}}}}}}}{{{{{{{\mathcal{I}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}}){P}_{t}({{{{{{{\boldsymbol{n}}}}}}}})\) as the average of the steady state self-information \({{{{{{{\mathcal{I}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}})=-\!\log ({P}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}}))\) and \(\left\langle {S}_{{{{{{{{\rm{sh}}}}}}}}}\right\rangle=-{k}_{b}{\sum }_{{{{{{{{\boldsymbol{n}}}}}}}}}{P}_{t}({{{{{{{\boldsymbol{n}}}}}}}})\log ({P}_{t}({{{{{{{\boldsymbol{n}}}}}}}}))\) as the Shannon contribution to the system entropy, computed over the instantaneous distribution. Eq. (17) has been already obtained in22,23,24, although it was not explicitly written in terms of the self-information \({{{{{{{\mathcal{I}}}}}}}}\). It is important to note that \(\left\langle {S}_{{{{{{{{\rm{sh}}}}}}}}}\right\rangle\) is sub-extensive in Ω (according to Eq. (12), it grows as \(\log ({{\Omega }})\)), and therefore can be neglected in the macroscopic limit. Thus, changes in average self-information can be bounded by the entropy production, that can in turn be computed or measured in terms of actual energy and entropy flows (see Eqs. (7) and (8)). However, the result in Eq. (17) is not yet in a useful form, since the average \(\left\langle {{{{{{{\mathcal{I}}}}}}}}\right\rangle\) does not depend only on \({{{{{{{\mathcal{I}}}}}}}}({{{{{{{\boldsymbol{n}}}}}}}})\), the unknown quantity we are interested in, but also on the instantaneous distribution Pt(n), that is also typically unknown. This issue is circumvented in the macroscopic limit, since in that case Pt(x) is strongly localised around the deterministic values xt, and therefore \(\left\langle {{{{{{{\mathcal{I}}}}}}}}\right\rangle \simeq {{\Omega }}{I}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{{x}}}}}}}_{t}}})\) to dominant order in Ω → . Thus, in the same limit, Eq. (17) for the adiabatic entropy production rate \({\dot{{{\Sigma }}}}_{{{{{{{{\rm{a}}}}}}}}}\) reduces to

$${\dot{\sigma }}_{{{{{{{{\rm{a}}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})=\dot{\sigma }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})+{k}_{b}\,{d}_{t}{I}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})\,\ge \,0,$$
(18)

where we have defined \(\dot{\sigma }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})=\mathop{\lim }\limits_{{{\Omega }}\to \infty }\dot{{{\Sigma }}}/{{\Omega }}\) as the scaled macroscopic limit of the entropy production rate (\({\dot{\sigma }}_{{{{{{{{\rm{a}}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})\) is defined in a similar way). Eq. (18) is a more rigorous version of our central result in Eq. (3), which is obtained by integrating Eq. (18) along deterministic trajectories (satisfying Eq. (15)) and multiplying by the scale factor. It is also useful to write down the first and second laws in the macroscopic limit. The energy balance in Eq. (6) reduces to

$${d}_{t}\epsilon ({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})={{{{{{{\boldsymbol{u}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})\cdot \nabla \epsilon ({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})=\dot{w}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})+\dot{q}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t}),$$
(19)

where the scaled heat and work rates for state x are defined as \(\dot{q}({{{{{{{\boldsymbol{x}}}}}}}})={\sum }_{\rho \,{ > }\,0}{i}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}}){Q}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\) and \(\dot{w}({{{{{{{\boldsymbol{x}}}}}}}})={\sum }_{\rho \,{ > }\,0}{i}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}}){W}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\), respectively. Finally, again neglecting the sub-extensive Shannon contribution \(\left\langle {S}_{{{{{{{{\rm{sh}}}}}}}}}\right\rangle\), the second law in Eq. (7) reduces to

$$\dot{\sigma }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})= -\!\dot{q}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})/T+{d}_{t}s({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})\\= {k}_{b}\mathop{\sum}\limits_{\rho > 0}({\omega }_{\rho }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})-{\omega }_{-\rho }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t}))\log \frac{{\omega }_{\rho }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})}{{\omega }_{-\rho }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})}\,\ge \,0.$$
(20)

Linear response regime

We will now show that to first order in the work contributions Wρ(x) the inequality in Eq. (18) is saturated. In first place we rewrite Eq. (18) using the macroscopic first and second laws in Eqs. (19) and (20):

$${\dot{\sigma }}_{{{{{{{{\rm{a}}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})/{k}_{b}={{{{{{{\boldsymbol{u}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})\cdot \nabla ({I}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})-\beta \phi ({{{{{{{\boldsymbol{x}}}}}}}}))\,{|}_{{{{{{{{\boldsymbol{x}}}}}}}}={{{{{{{{\boldsymbol{x}}}}}}}}}_{t}}+\beta \dot{w}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t}),$$
(21)

where we also used ϕ(x) = ϵ(x) − Ts(x) and that dtF(xt) = u(xt) ⋅ ∇ F(xt) for any function F(x). Secondly, we note that in detailed-balanced settings (i.e., if Wρ(x) = 0 ∀ ρ, x) the steady state rate function is just Iss(x) = βϕ(x) (up to a constant), in accordance to the Gibbs distribution (this follows from Eqs. (14) and (16)). Thus, the difference g(x) ≡ Iss(x) − βϕ(x) appearing in Eq. (18) quantifies the deviations from thermal equilibrium. Expanding Eq. (16) to first order in Wρ(x) and g(x), it can be shown that

$${{{{{{{{\boldsymbol{u}}}}}}}}}^{(0)}({{{{{{{\boldsymbol{x}}}}}}}})\cdot \nabla g({{{{{{{\boldsymbol{x}}}}}}}})=-\!\beta {\dot{w}}^{(0)}({{{{{{{\boldsymbol{x}}}}}}}})+{{{{{{{\mathcal{O}}}}}}}}\left({W}_{\rho }^{2}\right),$$
(22)

where \({{{{{{{{\boldsymbol{u}}}}}}}}}^{(0)}({{{{{{{\boldsymbol{x}}}}}}}})={\sum }_{\rho \,{ > }\,0}{i}_{\rho }^{(0)}({{{{{{{\boldsymbol{x}}}}}}}}){{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }\) and \({\dot{w}}^{(0)}({{{{{{{\boldsymbol{x}}}}}}}})={\sum }_{\rho \,{ > }\,0}{i}_{\rho }^{(0)}({{{{{{{\boldsymbol{x}}}}}}}}){W}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\) are the lowest-order deterministic drift and work rate, respectively17. These are defined in terms of the detailed-balanced deterministic currents \({i}_{\rho }^{(0)}({{{{{{{\boldsymbol{x}}}}}}}})={\omega }_{\rho }^{(0)}({{{{{{{\boldsymbol{x}}}}}}}})-{\omega }_{-\rho }^{(0)}({{{{{{{\boldsymbol{x}}}}}}}})\) constructed from the scaled transition rates evaluated at Wρ(x) = 0 that, according to the LDB conditions of Eq. (14), satisfy \(\log ({\omega }_{\rho }^{(0)}({{{{{{{\boldsymbol{x}}}}}}}})/{\omega }_{-\rho }^{(0)}({{{{{{{\boldsymbol{x}}}}}}}}))=-\beta {{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }\cdot \nabla \phi ({{{{{{{\boldsymbol{x}}}}}}}})\). Comparing the result of Eq. (22) with Eq. (21), we see that \({\dot{{{\Sigma }}}}_{a}=0\) to linear order in Wρ(x). Then, in the linear response regime we can write:

$${I}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})-{I}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{{\boldsymbol{x}}}}}}}}}_{0}) \simeq - \int\nolimits_{0}^{t}dt^{\prime} {\dot{\sigma }}^{(0)}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t^{\prime} })/{k}_{b}\\= \beta \left[\phi ({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})-\phi ({{{{{{{{\boldsymbol{x}}}}}}}}}_{0})-\int\nolimits_{0}^{t}dt^{\prime} {\dot{w}}^{(0)}({{{{{{{{\boldsymbol{x}}}}}}}}}_{t^{\prime} })\right].$$
(23)

where the integration is performed along trajectories solving the detailed-balanced deterministic dynamics dtxt = u(0)(xt).

Example: an electronic memory

In order to illustrate our results we will consider the model of a low-power CMOS memory cell developed in35,36, that we review in the Supplementary Note 1. This model involves two CMOS inverters connected in a loop, and each inverter is composed of two MOS transistors. There are two degrees of freedom: voltages v1 and v2, that can take values spaced by the elementary voltage ve = qe/C, where qe is the positive electron charge and C is a value of capacitance that increases with the scale of the MOS transistors. Thus, in this context the scale parameter can be taken to be Ω = VT/ve, where VT = kbT/qe is the thermal voltage. In the following all voltages will be expressed in units of VT. Figure 1 shows a typical steady state distribution in the bistable phase, and three different deterministic trajectories. The logical state of the memory is codified in the sign of the variable x = v1 − v2. The rate function Iss(x) along the x axis in Fig. 1 can be computed exactly36:

$${I}_{{{{{{{{\rm{ss}}}}}}}}}(x)={x}^{2}\,+\, x{V}_{{{{{{{{\rm{dd}}}}}}}}}+\frac{2{{{{{{{\rm{n}}}}}}}}}{{{{{{{{\rm{n}}}}}}}}+2}\left[L(x,\;{V}_{{{{{{{{\rm{dd}}}}}}}}})\,-\,L(x,-{V}_{{{{{{{{\rm{dd}}}}}}}}})\right],$$
(24)

where Vdd is the powering voltage that takes the memory out of thermal equilibrium, \(L(x,{V}_{{{{{{{{\rm{dd}}}}}}}}})={{{{{{{{\rm{Li}}}}}}}}}_{2}\left(-\exp ({V}_{{{{{{{{\rm{dd}}}}}}}}}+x(1+2/{{{{{{{\rm{n}}}}}}}}))\right)\), and Li2( ⋅ ) is the polylogarithm function of second order. Also, n ≥ 1 is a parameter that characterizes the transistors (the slope factor), and that will be fixed to n = 1 in the following. In the Supplementary Note 1 we show that the rate function in Eq. (24) provides an essentially exact description of the steady state distribution for scale parameters as low as Ω = 10 (i.e., states with at most tens of electrons are appreciably populated). Thus, sub-extensive contributions to the self-information can be safely neglected in this case, even away from the strict macroscopic limit.

Fig. 1: Steady state and deterministic trajectories for the CMOS memory.
figure 1

Exact steady state distribution for Vdd = 1.4 and ve = 0.1. The orange, cyan and grey lines show three deterministic trajectories for the same parameters and different initial conditions, with the arrows indicating the direction of motion.

In Fig. 2a we show that there is a non-equilibrium transition from a monostable phase into the bistable phase that allows the storage of a bit of information, occurring at the critical powering voltage \({V}_{{{{{{{{\rm{dd}}}}}}}}}^{*}=\ln (2)\). We also compare the exact rate function in Eq. (24) with the linear response approximation obtained from Eq. (23) for different powering voltages. Remarkably, despite it is only expected to be valid close to equilibrium, the linear response approximation captures the transition to bistability and continues to be a reasonable approximation well into the bistable phase. The reason is that in this case the second order non-equilibrium correction vanishes (as can be checked by expanding Eq. (24) in Vdd), and therefore the linear response approximation is actually valid up to order \({V}_{{{{{{{{\rm{dd}}}}}}}}}^{3}\).

Fig. 2: Rate function of the CMOS memory.
figure 2

a Rate function Iss(x) for different values of the powering voltage Vdd. We also compare Iss(x) with the linear response approximation obtained from Eq. (23) for Vdd = 1.2. b Illustration of the bound to I(xt) in Eq. (18) for two different deterministic trajectories starting at x0 = 2 and x0 = 4 (Vdd = 3). c Bound to Iss(x0) for a fixed xt according to Eq. (18), for xt = x* ± 2δ (\(\delta=1/\sqrt{2{{\Omega }}}\), Ω = 10, and Vdd = 3).

In Fig. 2b the exact rate function Iss(xt) along a deterministic trajectory xt is compared with the lower bound \({I}_{{{{{{{{\rm{ss}}}}}}}}}({x}_{0})-\int\nolimits_{0}^{t}dt^{\prime} \dot{\sigma }({x}_{t^{\prime} })/{k}_{b}\), for two different trajectories starting at x0 = 2 and x0 = 4, with y0 = 0 in both cases (as shown in Fig. 1, deterministic trajectories initialized in the x axis remain in it). In both cases the trajectory xt approaches the fixed point x* ≃ Vdd = 3. We see that \({I}_{{{{{{{{\rm{ss}}}}}}}}}({x}_{0})-\int\nolimits_{0}^{t}dt^{\prime} \dot{\sigma }({x}_{t^{\prime} })/{k}_{b}\) is indeed a lower bound to Iss(xt), in accordance with Eq. (18). Note that this bound diverges when the trajectory approaches the fixed point x*. The reason is that once xt ≃ x*, the entropy production \(\int\nolimits_{0}^{t}dt^{\prime} \dot{\sigma }({x}_{t^{\prime} })\) just continuously integrates the steady state heat dissipation rate \(-\dot{q}({x}^{*})\) (see Eq. (20)). The linear response approximation avoids this issue since the lowest-order work rate \({\dot{w}}^{(0)}(x)\) vanishes at the equilibrium fixed point (see Eq. (23)). The divergence can be also avoided by the coarse-graining procedure discussed in the next section. Alternatively, Eq. (18) can be considered an upper bound to I(x0) for a fixed final point xt. This is shown in Fig. 2c, for final points xt = x* ± 2δ, where \(\delta=1/\sqrt{2{{\Omega }}}\) estimates the variance of the fluctuations around the fixed point.

The fact that in Fig. 2b, c the bounds are much tighter to one side of the fixed point than the other can be traced back to the different speeds at which the fixed point is approached. To show this, in Fig. 3 we have plotted the entropy production rate \(\dot{\sigma }\) and the speed ∣dx/dt∣ as a function of x for Vdd = 3. In Fig. 3a we see that \(\dot{\sigma }\) is minimized close to the deterministic fixed points (this is a design feature of CMOS devices, in order to minimize the static power consumption, which is however not zero). Also, we see that \(\dot{\sigma }\) is actually lower to the left of the fixed point at x ≃ 3 than to the right. However, in Fig. 3b we see that the speed dx/dt at which the fixed point is approached is also lower to the left side, resulting in a larger total entropy production \(\int\nolimits_{0}^{t}dt^{\prime} \dot{\sigma }({x}_{t^{\prime} })=\int\nolimits_{{x}_{0}}^{{x}_{t}}dx \dot{\sigma }(x)/(dx/dt)\), and a looser bound in Fig. 2b, c.

Fig. 3: Entropy production rate and speed along deterministic trajectories.
figure 3

a Deterministic entropy production rate \(\dot{\sigma }\), and (b) deterministic speed ∣dx/dt∣ as a function of x for Vdd = 3 (see the Supplementary Note 1 for the definition of the timescale τ).

Tightening the bound

Our main result in Eq. (18) allows to obtain information about the steady state fluctuations by just measuring the physical entropy production along deterministic trajectories. However, if we consider the mathematical problem of bounding the steady state fluctuations given the transition rates λρ(n), then the full power of our result is achieved by considering a ‘coarse-grained’ entropy production that is in general a lower bound to the actual physical one, as we now explain. In first place we notice that different sets of transition rates {λρ(n)} might lead to the same master equation (Eq. (5)) and consequently the same steady state and emerging deterministic dynamics (Eq. (15)), while giving rise to different entropy production rates (Eq. (7)). This is due to the fact that the entropy production depends on how a given stochastic dynamics is split into thermodynamically distinct processes, each of them satisfying a different LDB condition. In particular, the entropy production is not invariant under coarse-graining of the transition rates23,37. Specifically, consider that we lump together all transitions going from state n to state \({{{{{{{\boldsymbol{n}}}}}}}}+{\tilde{{{{{{{{\boldsymbol{\Delta }}}}}}}}}}_{\rho }\) into a single transition with rate

$${\tilde{\lambda }}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})\equiv \mathop{\sum}\limits_{\rho /{{{{{{{{\boldsymbol{\Delta }}}}}}}}}_{\rho }={\tilde{{{{{{{{\boldsymbol{\Delta }}}}}}}}}}_{\rho }}{\lambda }_{\rho }({{{{{{{\boldsymbol{n}}}}}}}}).$$
(25)

In this way, the jump vectors \(\{{\tilde{{{{{{{{\boldsymbol{\Delta }}}}}}}}}}_{\rho }\}\) associated to the coarse-grained rates \({\tilde{\lambda }}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})\) are all distinct (\({\tilde{{{{{{{{\boldsymbol{\Delta }}}}}}}}}}_{\rho }\,\ne\, {\tilde{{{{{{{{\boldsymbol{\Delta }}}}}}}}}}_{\rho ^{\prime} }\) if \(\rho \,\ne\, \rho ^{\prime}\)). It is easy to check that rates \(\{\tilde{{\lambda }_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})}\}\) and {λρ(n)} lead to the same master equation. However, the entropy production rate \(\dot{{{\Pi }}}\) corresponding to the rates \(\{\tilde{{\lambda }_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})}\}\) is always a lower bound of the original one23:

$$\dot{{{\Pi }}}=\frac{{k}_{b}}{2}\mathop{\sum}\limits_{\rho,{{{{{{{\boldsymbol{n}}}}}}}}}({\tilde{j}}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})-{\tilde{j}}_{-\rho }({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{\tilde{{{{{{{{\boldsymbol{\Delta }}}}}}}}}}_{\rho }))\log \frac{\tilde{{j}_{\rho }({{{{{{{\boldsymbol{n}}}}}}}})}}{\tilde{{j}_{-\rho }}({{{{{{{\boldsymbol{n}}}}}}}}\,+\,{\tilde{{{{{{{{\boldsymbol{\Delta }}}}}}}}}}_{\rho })}\le \dot{{{\Sigma }}}$$
(26)

An important property of \(\dot{{{\Pi }}}\) is that, whenever the emerging deterministic dynamics has fixed point attractors, its macroscopic version \(\dot{\pi }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})\equiv \mathop{\lim }\nolimits_{{{\Omega }}\to \infty }\dot{{{\Pi }}}/{{\Omega }}={\sum }_{\rho \,{ > }\,0}({\tilde{\omega }}_{\rho }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})-{\tilde{\omega }}_{-\rho }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t}))\log ({\tilde{\omega }}_{\rho }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t})/{\tilde{\omega }}_{-\rho }({{{{{{{{\boldsymbol{x}}}}}}}}}_{t}))\) vanishes at the fixed points (see the Supplementary Note 2 for a detailed discussion). Thus, the bound obtained using the entropy production rate \(\dot{\pi }\) is free from the divergence as the fixed point is approached. In the case of the CMOS memory, this is shown in Fig. 4 for the two trajectories along the x axis of Fig. 1. We see that not only the divergence is avoided, but that the bound matches the exact rate function (see below).

Fig. 4: Coarse-grained bound for the CMOS memory.
figure 4

Illustration of the bound to I(xt) from Eq. (18) in terms of the entropy production rate \(\dot{\pi }\) for the cyan and orange trajectories in Fig. 1, starting respectively at x0 = 0.2 and x0 = 2.6 (Vdd = 1.4).

In analogy with Eq. (14), whenever the log-ratio \({\tilde{\sigma }}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\equiv \log ({\tilde{\omega }}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})/{\tilde{\omega }}_{-\rho }({{{{{{{\boldsymbol{x}}}}}}}}))\) of the scaled coarse-grained rates can be expressed as the gradient of a state function \(-\tilde{\phi }({{{{{{{\boldsymbol{x}}}}}}}})\) along the direction \({\tilde{{{{{{{{\boldsymbol{\Delta }}}}}}}}}}_{\rho }\), the steady state rate function will be just \({I}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})=\tilde{\phi }({{{{{{{\boldsymbol{x}}}}}}}})\) (up to a constant). In that case, the system can be considered to be at equilibrium at the coarse-grained level. Under some conditions, one can easily test if \({\tilde{\sigma }}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\) derives from a gradient by just checking if the generalized curl \({f}_{\rho,\rho ^{\prime} }({{{{{{{\boldsymbol{x}}}}}}}})\equiv {\partial }_{{x}_{\rho }}{\tilde{\sigma }}_{\rho ^{\prime} }({{{{{{{\boldsymbol{x}}}}}}}})-{\partial }_{{x}_{\rho ^{\prime} }}{\tilde{\sigma }}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\) vanishes for all ρ, \(\rho ^{\prime}\), and x (see the Supplementary Note 2). If that is the case, then the bound in Eq. (18) in terms of the entropy production rate \(\dot{\pi }\) is saturated, and one can fully reconstruct the steady-state rate function in terms of the deterministic dynamics.

In the CMOS memory the state space is two dimensional and therefore there is a single curl component f(x), or vorticity. In Fig. 5 we show the vorticity f(x) for the same parameters as in Fig. 1. We see that the model is genuinely non-equilibrium even at the coarse-grained level. However, we also see that the vorticity vanishes at the x and y axes, which explains why the bound in Fig. 4 matches the exact rate function. Finally, we study how the bound in terms of the coarse-grained entropy production rate \(\dot{\pi }\) performs for the gray trajectory in Figs. 1 and 5, that starts in and goes through areas of non-vanishing vorticity, and thus genuinely out of equilibrium. Since in this case we do not have the exact rate function to compare with, we compare the bound with the estimation of the rate function \({I}_{{{{{{{{\rm{est}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})=-\!\log ({P}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}}))/{{\Omega }}\) obtained from the exact steady state distribution. Iest(x) is only defined for the discrete set of voltages v1 and v2 that are a multiple of the elementary voltage ve, and in the comparison we choose the closest values of v1 and v2 to the continuous deterministic trajectory xt, obtaining a stepwise function. The results are shown in Fig. 6. We see that even in this case our bound provides an accurate approximation of the probability distribution. This shows that the emergent second law in terms of the coarse-grained entropy production has the potential to offer a deterministic alternative to Gillespie simulations and spectral methods. As an example, we provide in the Supplementary Note 3 a full reconstruction of the steady state distribution of the CMOS memory.

Fig. 5: Vorticity and deterministic trajectories.
figure 5

Vorticity f(x) of the vector field with components \({\tilde{\sigma }}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})\equiv \log ({\tilde{\omega }}_{\rho }({{{{{{{\boldsymbol{x}}}}}}}})/{\tilde{\omega }}_{-\rho }({{{{{{{\boldsymbol{x}}}}}}}}))\), ρ = 1, 2, for the CMOS memory model (Vdd = 1.4 and ve = 0.1, as in Fig. 1). The orange, cyan and grey lines correspond to the same deterministic trajectories of deterministic trajectories of Fig. 1.

Fig. 6: Coarse-grained bound for non-zero vorticity.
figure 6

Comparison of the upper bound to Iss(x0) in terms of the coarse-grained entropy production rate \(\dot{\pi }\) for the points in the gray trajectory in Figs. 1 and 5 with the function \({I}_{{{{{{{{\rm{est}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}})=-\log ({P}_{{{{{{{{\rm{ss}}}}}}}}}({{{{{{{\boldsymbol{x}}}}}}}}))/{{\Omega }}\) obtained from the exact steady state distribution.

It is important to note that the bound given by the emergent second law in terms of the mathematical entropy production in Eq. (26) can be applied to any Markov jump process displaying a macroscopic limit, irrespective of whether it represents a thermodynamically consistent stochastic dynamics or not (the only restriction is that for each jump the reverse jump should also be possible). For example, our results can be relevant in stochastic population38,39 or gene expression40,41 models.

Discussion

For systems accepting a description in terms of Markov jump processes, our results unveil a fundamental connection between the deterministic dynamics that emerges in a macroscopic limit and the non-equilibrium fluctuations at steady state. This is given by an inequality that can be interpreted as an emergent second law. In fact, it is a tighter version of the usual second law, that is saturated in the linear response regime. As shown in the Supplementary Note 4, the emergent second law can be alternatively understood as a generalized fluctuation-dissipation relation. The practical value of our result lies in the fact that the probability of non-equilibrium fluctuations is hard to evaluate, while the deterministic dynamics is directly given by standard methods. The corresponding linear response theory, working at the level of the rate function, was shown in17 to be highly accurate in some model systems, with a regime of validity beyond that of usual linear response theories. Our result can also be employed in combination with numerical or experimental approaches: once normal or moderately rare fluctuations have been sampled and characterized, Eq. (3) can be used to bound the probability of very rare fluctuations, that otherwise would require extremely long simulation times. In addition, the refinement of our result by a coarse-graining procedure leads to novel numerical techniques to compute non-equilibrium distributions, that only rely on the deterministic dynamics and thus offer an alternative to stochastic simulations or spectral methods.

As a final comment, we note that the extensivity assumptions defining the macroscopic limit we have considered are a very natural extension of the usual notion of extensivity in equilibrium thermodynamics. The only additional requirements, besides the extensivity of the free energy associated to each state, are the extensivity of the jump rates between different states, and the intensivity of the work contributions. These natural requirements lead to an extensive non-equilibrium self-information, whose dominant contribution is constrained by our emergent second law, and that at equilibrium reduces to the regular extensive free energy.

Methods

As explained in the main text, the emergent second law can be obtained from the fact that the adiabatic contribution to the entropy production rate is positive. The proof of this fact can be found in the mentioned references. The details of the model in the example are given in the Supplementary Note 1. The properties of the coarse grained entropy production are discussed in the Supplementary Note 2. In the Supplementary Note 3 we show how the emergent second law can provide an alternative to stochastic simulations or spectral methods. Finally, in the Supplementary Note 4 we make explicit the connection between the emergent second law derived here and fluctuation-dissipation relations.