Fluctuation Theorems and Thermodynamic Inequalities for Nonequilibrium Processes Stopped at Stochastic Times
Abstract
We investigate thermodynamics of general nonequilibrium processes stopped at stochastic times. We propose a systematic strategy for constructing fluctuation-theorem-like martingales for each thermodynamic functional, yielding a family of stopping-time fluctuation theorems. We derive second-law-like thermodynamic inequalities for the mean thermodynamic functional at stochastic stopping times, the bounds of which are stronger than the thermodynamic inequalities resulting from the traditional fluctuation theorems when the stopping time is reduced to a deterministic one. Numerical verification is carried out for three well-known thermodynamic functionals, namely, entropy production, free energy dissipation and dissipative work. These universal equalities and inequalities are valid for arbitrary stopping strategies, and thus provide a comprehensive framework with new insights into the fundamental principles governing nonequilibrium systems.
Stochastic thermodynamics extends classical thermodynamics to individual trajectories of non-equilibrium processes, encompassing stationary or transient systems with or without external driving forces [1, 2, 3, 4]. A first-law-like energy balance equality and various second-law-like thermodynamic inequalities can be derived from fluctuating trajectories. Fluctuation theorems emerging from stochastic thermodynamics, as equality versions of the second law, impose constraints on probability distributions of thermodynamic functionals along single stochastic trajectories [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19].
Recently, a gambling demon, which stops the processes at random times, has been proposed for non-stationary stochastic processes without external driving force and feedback of control under an arbitrary deterministic protocol [20, 21]. The demon employs martingales, a concept that has been proposed in probability theory for more than years. The authors constructed a martingale for dissipative work, and obtained a stopping-time fluctuation theorem by applying the well-known optional stopping theorem (or Doob’s optional sampling theorem), which states that the average of a martingale at a stopping time is equal to the average of its initial value [22].
On the other hand, we already know that there are three faces in stochastic thermodynamics [23, 10, 24, 25], namely, (total) entropy production, housekeeping heat (non-adiabatic entropy production) and free energy dissipation (adiabatic entropy production). In a system with no external driving force, the housekeeping heat vanishes and the entropy production is equal to the free energy dissipation. However, in general non-stationary stochastic processes with an external driving force as well as an time-dependent protocol, we are curious about whether different martingales can be constructed for entropy production and free energy dissipation separately, while the martingale for housekeeping heat is straightforward to construct without any compensated term [26]. Both entropy production and free energy dissipation belong to a class of functionals along a single stochastic trajectory, i.e. general backward thermodynamic functionals, which has been rigorously defined in [27]. Housekeeping heat belongs to another class, called forward thermodynamic functionals [27].
Therefore, in this paper, we propose a systematic strategy for constructing martingales applicable to general backward thermodynamic functionals, with a focus on entropy production, free energy dissipation, and dissipative work as illustrative examples. Notably, the construction of martingales for forward thermodynamic functionals has been previously established in [27]. By leveraging our constructed martingales, we derive stopping-time fluctuation theorems that hold for general backward thermodynamic functionals, followed by second-law-like thermodynamic inequalities for arbitrary stopping times. When the stochastic stopping time reduces to a deterministic one, we exploit the additional degree of freedom present in our constructed martingales, enabling us to obtain a sharper nonnegative bound for the mean thermodynamic functional. In particular, we obtain a stronger inequality for the dissipative work than that obtained through classic Jarzynski equality.
Stopping-time fluctuation theorems and thermodynamic inequalities First, we will give an even more general definition of the backward thermodynamic functional than [27]. We consider a stochastic thermodynamic system with temperature . We denote the state (discrete or continuous) of the system at time by , whose stochastic dynamics is governed by a prescribed deterministic protocol . For a given duration , the trajectories are traced by the coordinates in phase space, denoted by . We further denote the probability of observing a given trajectory by , and the probability density of by at any given time . The general backward thermodynamic functional in the duration is defined by and another stochastic process with protocol (can be either the same as or different from ). The only condition is that the processes and are absolutely continuous with each other, i.e. the probability if and only if for any given trajectory . We define a third process driven by the time-reversed protocol of up to time . The probability density of is denoted by for any given time . Note that there is also an additional degree of freedom, i.e. the arbitrary choice of the initial distribution of for any , because for different , only the protocols inherited from are closely related to each other, not the initial distributions.
The probability of observing a given trajectory in is denoted by . We define a general backward thermodynamic functional by
where denotes the time reversal of in the duration .
It is straightforward to derive the fluctuation theorem for :
However, is generally not a martingale [27].
For any given time interval , we would like to add a compensated term as a function of and , to , so that be a martingale, i.e.
for any .
Then we propose
(1) |
in which is the distribution of with any arbitrary initial distribution , which is not necessarily the same as and contributes another extra degree of freedom.
We apply the optional stopping theorem in martingale theory to derive the general stopping-time fluctuation theorem
(2) |
where is a stopping time, defined by any stopping mechanism to decide whether to stop a process based on the current position and past events.
By Jensen’s inequality,
(3) |
The left-hand-side is independent of . Hence we can improve the above inequality into
(4) |
A special situation is when with probability , followed by
and
(5) |
in which is the relative entropy of with respect to . The inequality (5) is stronger than the traditional inequality derived from the well-known fluctuation theorem , as long as is different from .
As a corollary, we can derive certain bound for the infimum of following the strategy in [28], which holds for both equilibrium processes and general nonequilibrium processes. According to Doob’s maximal inequality, we find the following bound for the cumulative distribution of the supremum of ,
for any . It is equivalent to a lower bound on the cumulative distribution of the infimum of in the given duration , i.e.
for . It implies the random variable dominates stochastically over an exponential random variable with the mean of . Thus, we find the following universal bound for the mean infimum of , i.e.
Applications The thermodynamic functional becomes the (total) entropy production up to time if the process is driven by exactly the same protocol as , and the initial distribution of is taken to be the distribution of [29, 8], i.e. . Then
(6) |
and is a martingale. It is followed by
(7) |
for any stopping time , and .
The thermodynamic functional becomes the free energy dissipation (adiabatic entropy production) if the process is taken to be the adjoint process of , and also the initial distribution of is set as the distribution of , i.e. [10, 24, 25, 23]. Then
(8) |
and is a martingale. It is followed by
(9) |
for any stopping time , and .
Let be the pseudo-stationary distribution of corresponding to the protocol , i.e. the stationary distribution of if the protocol is fixed at . The thermodynamic functional becomes the dissipative work up to time , if the initial distribution of is , the process is taken to be the adjoint process of , and the initial distribution of is taken as the pseudo-stationary distribution of , i.e. [30, 20]. Then
(10) |
and is a martingale. It is followed by
(11) |
for any stopping time , and .
For the mean up to any fixed time , we can obtain a stronger inequality than . Applying (5), we have
(12) |
Actually, this inequality can be derived from the equality with the inequality from [23], in which is exactly . In [20], the thermodynamic functional under investigation is but the they defined is the same as . The mathematical derivation here implies that we should use different for different thermodynamic functionals.
Numerical verifications Many mesoscopic biochemical processes such as the kinetics of enzyme or motor molecules, can be modeled in terms of transition rates between discrete states. We apply our theory to a simple stochastic process with only three states. The time-dependent transition rates between different discrete states are set as follows
in which the chemical driven energy
For the three thermodynamic functionals , and , the stopping strategy for is set as follows: the process is stopped at only when the functional reaches a given threshold value before ; while the process is stopped at the final time if the threshold value is never reached during the duration .
Fig. 1(a-c) shows the numerical results of versus , versus , and versus , as functions of the threshold value. The initial distribution is set to be uniform among the three states in Fig. 1(a-b), and concentrated on the second state in Fig. 1(c). Fig. 1(d-f) test the stopping-time fluctuation relations (7), (9) and (11), with and without the compensated term .
In the special situation that with probability , Fig. 1(g) shows that the inequality (12) for is not only stronger than the inequality , but also the traditional Jarzynski inequality .







Another example is the stochastic dynamics of a colloidal particle with diffusion coefficient in a time-dependent potential . The dynamics obeys the Langevin equation
where is a Gaussian white noise with zero mean and autocorrelation .
In such a stochastic system, the housekeeping heat equals to zero and thus the entropy production coincides with the free energy dissipation . We follow the same stopping strategy as in the discrete model of Fig. 1, and show the numerical results of versus in Fig. 2(a) and versus in Fig. 2(b) with . Fig. 2(c-d) test the stopping-time fluctuation relations (7) and (11), with and without the compensated term .
In the special situation that with probability , Fig. 2(e) shows that the conclusion (12) for is stronger than the inequality and the Jarzynski inequality .
In Fig. 1 and 2, the averaged thermodynamic functionals may be negative under certain stopping strategy, but the general stopping-time fluctuation relations and related thermodynamic inequalities always hold.





Derivation First, we notice that
(13) |
is a martingale, where denotes the time reversal of in the duration , and denotes the probability of observing a given trajectory in . The distribution of is .
Since
we have
For , let be the part of the trajectory in the duration , then and are exactly the time reversal of each other. Thus
in which the last equality comes from the definition of . So
which is exactly the definition of martingale for (13).
Second, we show that is exactly the martingale (13). By the definition of , we have
(14) |
Since
and notice that and are driven by the same protocol , we have
which implies
(15) |
Combining (14) and (15) shows that is exactly the martingale (13), then the general stopping-time fluctuation theorem (2) follows from the optional stopping theorem.
When with probability , we decompose
By Jensen’s inequality, we know
Furthermore, for any given , we can choose such that , which leads to
Conclusion In summary, our study contributes a general framework for understanding martingales constructed upon thermodynamic functionals. We have successfully derived and proven the stopping-time fluctuation theorems, accompanied by second-law-like inequalities for mean thermodynamic functionals stopped at stochastic times. Our results generalize the recent gambling strategy and stopping-time fluctuation theorems [20] to a very general setting. Our framework encompasses the general definition of thermodynamic functionals, accommodates various types of stochastic dynamics, and allows for arbitrary stopping strategies. The validity and applicability of our framework are supported by numerical verifications conducted in stochastic dynamics with both discrete and continuous states.
Furthermore, we highlight the significance of the additional degree of freedom introduced through the compensated term , which leads to a strengthening of the inequality for dissipative work compared to the well-known Jarzynski inequality when the stopping time is reduced to a deterministic one. Overall, our results provide novel insights, new interpretations, and improved bounds for the fundamental principles underlying the Second Law of Thermodynamics in the context of stochastic processes.
H. Ge is supported by NSFC 11971037 and T2225001.
References
- Sekimoto [1998] K. Sekimoto, Langevin equation and thermodynamics, Progress of Theoretical Physics Supplement 130, 17 (1998).
- Seifert [2012] U. Seifert, Stochastic thermodynamics, fluctuation theorems and molecular machines, Rep. Prog. Phys. 75, 126001 (2012).
- Peliti and Pigolotti [2017] L. Peliti and S. Pigolotti, Stochastic Thermodynamics: An Introduction (Princeton University Press, 2017).
- Seifert [2008] U. Seifert, Stochastic thermodynamics: principles and perspectives, The European Physical Journal B 64, 423 (2008).
- Jarzynski [1997] C. Jarzynski, Nonequilibrium equality for free energy differences, Phys. Rev. Lett. 78, 2690 (1997).
- Jarzynski [2011] C. Jarzynski, Equalities and inequalities: Irreversibility and the second law of thermodynamics at the nanoscale, Annual Review of Condensed Matter Physics 2, 329 (2011).
- Crooks [1999] G. E. Crooks, Entropy production fluctuation theorem and the nonequilibrium work relation for free energy differences, Phys. Rev. E 60, 2721 (1999).
- Seifert [2005] U. Seifert, Entropy production along a stochastic trajectory and an integral fluctuation theorem, Phys. Rev. Lett. 95, 040602 (2005).
- Collin et al. [2005] D. Collin, F. Ritort, C. Jarzynski, S. B. Smith, I. Tinoco Jr, and C. Bustamante, Verification of the crooks fluctuation theorem and recovery of rna folding free energies, Nature 437, 231 (2005).
- Esposito and Van den Broeck [2010a] M. Esposito and C. Van den Broeck, Three detailed fluctuation theorems, Phys. Rev. Lett. 104, 090601 (2010a).
- Yang and Qian [2020] Y.-J. Yang and H. Qian, Unified formalism for entropy production and fluctuation relations, Phys. Rev. E 101, 022129 (2020).
- Manzano et al. [2015] G. Manzano, J. M. Horowitz, and J. M. R. Parrondo, Nonequilibrium potential and fluctuation theorems for quantum maps, Phys. Rev. E 92, 032129 (2015).
- Lahiri and Jayannavar [2014] S. Lahiri and A. M. Jayannavar, Fluctuation theorems for excess and housekeeping heat for underdamped langevin systems, Eur. Phys. J. B 87, 195 (2014).
- Chetrite and Gupta [2011] R. Chetrite and S. Gupta, Two refreshing views of fluctuation theorems through kinematics elements and exponential martingale, Journal of Statistical Physics 143, 42 (2011).
- Crooks [2000] G. E. Crooks, Path-ensemble averages in systems driven far from equilibrium, Phys. Rev. E 61, 2361 (2000).
- Chernyak et al. [2006] V. Y. Chernyak, M. Chertkov, and C. Jarzynski, Path-integral analysis of fluctuation theorems for general langevin processes, Journal of Statistical Mechanics: Theory and Experiment 2006, P08001 (2006).
- [17] T. Speck and U. Seifert, Integral fluctuation theorem for the housekeeping heat, Journal of Physics A: Mathematical and General .
- [18] R. J. Harris and G. M. Schütz, Fluctuation theorems for stochastic dynamics, Journal of Statistical Mechanics: Theory and Experiment .
- Evans and Searles [2002] D. J. Evans and D. J. Searles, The fluctuation theorem, Advances in Physics 51, 1529 (2002).
- Manzano et al. [2021] G. Manzano, D. Subero, O. Maillet, R. Fazio, J. P. Pekola, and É . Roldán, Thermodynamics of gambling demons, Physical Review Letters 126, 10.1103/physrevlett.126.080603 (2021).
- Roldán et al. [2023] É. Roldán, I. Neri, R. Chetrite, S. Gupta, S. Pigolotti, F. Jlicher, and K. Sekimoto, Martingales for physicists, (2023), arXiv:2210.09983 [cond-mat.stat-mech] .
- Williams [1991] D. Williams, Probability with martingales (Cambridge university press, 1991).
- Ge and Qian [2010] H. Ge and H. Qian, Physical origins of entropy production, free energy dissipation, and their mathematical representations, Phys. Rev. E 81, 051133 (2010).
- Esposito and Van den Broeck [2010b] M. Esposito and C. Van den Broeck, Three faces of the second law. i. master equation formulation, Phys. Rev. E 82, 011143 (2010b).
- Ge [2009] H. Ge, Extended forms of the second law for general time-dependent stochastic processes, Physical review. E, Statistical, nonlinear, and soft matter physics 80, 021137 (2009).
- Chetrite et al. [2019] R. Chetrite, S. Gupta, I. Neri, and É. Roldán, Martingale theory for housekeeping heat, Europhys. Lett. 124, 60006 (2019).
- Ge et al. [2021] H. Ge, C. Jia, and X. Jin, Martingale structure for general thermodynamic functionals of diffusion processes under second-order averaging, Journal of Statistical Physics 184, 10.1007/s10955-021-02798-y (2021).
- Neri et al. [2017] I. Neri, É. Roldán, and F. Jülicher, Statistics of infima and stopping times of entropy production and applications to active molecular processes, Phys. Rev. X 7, 011019 (2017).
- Jiang et al. [2004] D.-Q. Jiang, M. Qian, and M.-P. Qian, Mathematical Theory of Nonequilibrium Steady States: On the Frontier of Probability and Dynamical Systems (Springer, Berlin, 2004).
- Ge and Jiang [2008] H. Ge and D.-Q. Jiang, Generalized jarzynski’s equality of inhomogeneous multidimensional diffusion processes, Journal of Statistical Physics 131, 675 (2008).