Detailed Fluctuation Theorems: A Unifying Perspective

We present a general method to identify an arbitrary number of fluctuating quantities which satisfy a detailed fluctuation theorem for all times within the framework of time-inhomogeneous Markovian jump processes. In doing so, we provide a unified perspective on many fluctuation theorems derived in the literature. By complementing the stochastic dynamics with a thermodynamic structure (i.e., using stochastic thermodynamics), we also express these fluctuating quantities in terms of physical observables.


Introduction
The discovery of different fluctuation theorems (FTs) over the last two decades constitutes a major progress in nonequilibrium physics [1][2][3][4][5][6]. These relations are exact constraints that some fluctuating quantities satisfy arbitrarily far from equilibrium. They have been verified experimentally in many different contexts, ranging from biophysics to electronic circuits [7]. However, they come in different forms: detailed fluctuation theorems (DFTs) or integral fluctuation theorems (IFTs), and concern various types of quantities. Understanding how they are related and to what extent they involve mathematical quantities or interesting physical observables can be challenging.
The aim of this paper is to provide a simple yet elegant method to identify a class of finite-time DFTs for time-inhomogeneous Markovian jump processes. The method is based on splitting the entropy production (EP) in three contributions by introducing a reference probability mass function (PMF). The latter is parametrized by the time-dependent driving protocol, which renders the dynamics time-inhomogeneous. The first contribution quantifies the EP as if the system were in the reference PMF, the second the extent to which the reference PMF changes with the driving protocol, and the last the mismatch between the actual and the reference PMF. We show that when the system is initially prepared in the reference PMF, the joint probability distribution for the first two terms always satisfies a DFT. We then show that various known DFTs can be immediately recovered as special cases. We emphasize at which level our results make contact with physics and also clarify the nontrivial connection between DFTs and EP fluctuations. Our EP splitting is also shown to be connected to information theory. Indeed, it can be used to derive a generalized Landauer principle identifying the minimal cost needed to move the actual PMF away from the reference PMF. While unifying, we emphasize that our approach by no means encompasses all previously derived FTs and that other FT generalizations have been made (e.g., [5,[8][9][10][11]). The plan of this paper is as follows. Time-inhomogeneous Markov jump processes are introduced in Section 2. Our main results are presented in Section 3: We first introduce the EP as a quantifier of detailed balance breaking, and we then show that by choosing a reference PMF, a splitting of the EP ensues. This enables us to identify the fluctuating quantities satisfying a DFT and an IFT when the system is initially prepared in the reference PMF. While IFTs hold for arbitrary reference PMFs, DFTs require reference PMFs to be solely determined by the driving protocol encoding the time dependence of the rates. The EP decomposition is also shown to lead to a generalized Landauer principle. The remaining sections are devoted to selecting specific reference PMFs and showing that they give rise to interesting mathematics or physics: In Section 4 the steady-state PMF of the Markov jump process is chosen, giving rise to the adiabatic-nonadiabatic split of the EP [12]. In Section 5 the equilibrium PMF of a spanning tree of the graph defined by the Markov jump process is chosen, and gives rise to a cycle-cocycle decomposition of the EP [13]. Physics is introduced in Section 6, and the properties that the Markov jump process must satisfy to describe the thermodynamics of an open system are described. In Section 7 the microcanonical distribution is chosen as the reference PMF, leading to the splitting of the EP into system and reservoir entropy change. Finally, in Section 8, the generalized Gibbs equilibrium PMF is chosen as a reference and leads to a conservative-nonconservative splitting of the EP [14]. Conclusions are finally drawn, and some technical proofs are discussed in the appendices.

Markov Jump Process
We introduce time-inhomogeneous Markovian jump processes and set the notation. We consider an externally driven open system described by a finite number of states, which we label by n. Allowed transitions between pairs of states are identified by directed edges, where the label ν indexes different transitions between the same pair of states (e.g., transitions due to different reservoirs). The evolution in time of the probability of finding the system in the state n, p n ≡ p n (t), is ruled by the master equation (ME): where the elements of the rate matrix are represented as W nm = ∑ e w e δ n,t(e) δ m,o(e) − δ n,m δ m,o(e) .
The latter is written in terms of stochastic transition rates, { w e }, and the functions o(e) := m , and t(e) := n , for e = (nm, ν), which map each transition to the state from which it originates (origin) and to which it leads (target), respectively. The off-diagonal entries of the rate matrix (the first term in brackets) give the probability per unit time to transition from m to n. The diagonal ones (second term in brackets) are the escape rates denoting the probability per unit time of leaving the state m. For thermodynamic consistency, we assume that each transition e ≡ (nm, ν) is reversible, namely if w e is finite, the corresponding backward transition −e ≡ (mn, ν) is allowed and additionally has a finite rate w −e . For simplicity, we also assume that the rate matrix is irreducible at all times, so that the stochastic dynamics is ensured to be ergodic. The Markov jump process is said to be time-inhomogeneous when the transition rates depend on time. The driving protocol value π t determines the values of all rates at time t, { w e ≡ w e (π t ) }.
The ME (2) can be rewritten as a continuity equation: where we introduced the averaged transition probability fluxes, and the incidence matrix D, which couples each transition to the pair of states that it connects, and hence encodes the network topology. On the graph identified by the vertices { n } and the edges { e }, it can be viewed as a (negative) divergence operator when acting on edge-space vectors-as in the ME (5)-or as a gradient operator when acting on vertex-space vectors. It satisfies the symmetry D n −e = −D n e .

Example
Let us consider the Markov jump process on the network in Figure 1, in which only the six forward transitions are depicted. It is characterized by four states, { 00, 01, 10, 11 }, connected by transitions as described by the incidence matrix: Backward transitions are obtained from D n −e = −D n e . Notation From now on, upper-lower indices and Einstein summation notation will be used: repeated upper-lower indices implies the summation over all the allowed values for those indices. Time derivatives are denoted by "d t " or "∂ t ", whereas the overdot "˙" is reserved for rates of change of quantities that are not exact time derivatives of state functions. We also take the Boltzmann constant k B equal to 1.

General Results
This section constitutes the core of the paper. The main results are presented in their most general form.

EP Decomposition at the Ensemble Average Level
After defining the ensemble-averaged EP, we will show how to generically decompose it in terms of a reference PMF.
A PMF p n satisfies the detailed-balance property if and only if w e p o(e) = w −e p o(−e) , for all transitions e.
This implies that all net transition probability currents vanish: j e − j −e = 0. The central quantity that we will consider is the EP rate: where the affinities are given by It is a measure of the amount by which the system breaks detailed balance or, equivalently, time-reversal symmetry. Indeed, its form ensures that it is always non-negative and vanishes if and only if Equation (9) holds. Notice that A −e = −A e . As we will see in Section 7, in physical systems the EP quantifies the total entropy change in the system plus environment [15].
We now decompose the EP rate into two contributions using a generic PMF p ref We make no assumption about the properties of p ref n at this stage, and define the reference potential and the reference affinities as and respectively. The former can be thought of as the entropy associated to p ref n -i.e., its self-information-, whereas the latter measures the extent by which p ref n breaks detailed balance. By merely adding and subtracting ψ ref n D n e from the EP rate, the latter can be formally decomposed as where the reference nonconservative contribution is an EP with affinities replaced by reference affinities: and the reference conservative contribution is Using the ME (5), it can be further decomposed as where the first term quantifies the change in time of the dissimilarity between p n and p ref is a relative entropy, whereas the second term, accounts for possible time-dependent changes of the reference state, and we name it the driving contribution. The reason for this name will become clear later, as we will request p ref n to depend parametrically on time only via the driving protocol (i.e., p ref ). Using these equations, one can easily rearrange Equation (14) into When p ref , one can interpret this equation as follows. The lhs describes the EP contribution due to the time-dependent protocol, Σ d , and to the break of detailed balance required to sustain the reference PMF, Σ nc . When positive, the rhs thus represents the minimal cost (ideally achieved at vanishing EP) to move the PMF further away from the reference PMF. When negative, its absolute value becomes the maximal amount by which the two EP contributions can decrease, as the PMF approaches the reference PMF. This result can be seen as a mathematical generalization of the Landauer principle, as it provides a connection between an information-theoretical measure of the dissimilarity between two PMFs and the driving and break of detailed balance needed to achieve it. Its precise physical formulation, discussed in detail in [14], is obtain when expressing Equation (20) in terms of the reference PMF used in Section 8.

EP Decomposition at the Trajectory Level
We now perform the analogue of the EP decomposition (14) at the level of single stochastic trajectories.
A stochastic trajectory of duration t, n t , is defined as a set of transitions {e i } sequentially occurring at times {t i } starting from n 0 at time 0. If not stated otherwise, the transitions index i runs from i = 1 to the last transition prior to time t, N t , whereas the state at time τ ∈ [0, t] is denoted by n τ . The whole trajectory is encoded in the instantaneous fluxes, j e (τ) := ∑ i δ e,e i δ(τ − t i ), (21) as they encode the transitions that occur and their timing. Its corresponding trajectory probability measure is given by where the first term accounts for the probability of transitioning along the edges, while the second accounts for the probability that the system spends { t i+1 − t i } time in the state { n t i }. When averaging Equation (21) over all stochastic trajectories, we obtain the averaged fluxes, Equation (6), where Dn t denotes the integration over all stochastic trajectories. The change along n t of a state function like ψ ref n can be expressed as The first term on the rhs accounts for the instantaneous changes of p ref n , while the second accounts for its finite changes due to stochastic transitions. Analogously, the trajectory EP-which is not a state function-can be written as Adding and subtracting the terms of Equation (24) from the EP, we readily obtain the fluctuating expressions of the nonconservative and conservative contributions of the EP, The former reads while for the latter where and We emphasize that Equation (26) holds for any reference PMF p ref n exactly as it was for its ensemble-averaged rate counterpart, Equation (14).

Fluctuation Theorems
We proceed to show that a class of FTs ensue from the decomposition (14)- (26). To do so, we now need to assume that the reference PMF depends instantaneously solely on the protocol value p ref n (τ) = p ref n (π τ ). In other words, p ref n at time τ is completely determined by { w e (π τ ) }. This justifies a posteriori the name driving contribution for Equation (19). Various instances of such PMFs will be provided in the following sections. We define a forward process where the system is initially prepared in p n (0) = p ref n (π 0 ) at a value of the protocol π 0 and then evolves under the Markov jump process driven by a protocol π τ , for τ ∈ [0, t]. The corresponding backward process, denoted with " † ", is defined as follows: the system is initially prepared in the reference PMF corresponding to the final value of the forward process, p † n (0) = p ref n (π t ), and then evolves under the Markov jump process driven by the forward protocol reversed in time, see Figure 2.
noneq. forward protocol: π τ backward protocol: Our main result is that the forward and backward process are related by the following finite-time DFT: Here P t (Σ d , Σ nc ) is the probability of observing a driving contribution to the EP Σ d and a nonconservative one Σ nc along the forward process. Instead, P † t (−Σ d , −Σ nc ) is the probability of observing a driving contribution equal to −Σ d , and a nonconservative one −Σ nc along the backward process.
We now mention two direct implications of our DFT. First, by marginalizing the joint probability, one easily verifies that the sum of nonconservative and driving EP contributions also satisfies a DFT: Second, when averaging Equation (32) over all possible values of Σ d and Σ nc , an IFT ensues: The proofs of Equations (32)-(34) are given in Appendix A, and use the generating function techniques developed in References [12,14].
We note that the IFT holds for any reference PMF regardless of the requirement that p ref . In contrast, this requirement must hold for the DFT, else the probability P † t (Σ d , Σ nc ) would no longer describe a physical backward process in which solely the protocol function is time reversed. Indeed, if one considers an arbitrary p ref n , the backward process corresponds to not only reversing the protocol, but also the stochastic dynamics itself (see Equation (A23)).
Another noteworthy observation is that the fluctuating quantity Σ d + Σ nc can be seen as the ratio between the probabilities to observe a trajectory n t along the forward process, Equation (22), and the probability to observe the time-reversed trajectory along the backward process: The latter trajectory is denoted by n † t . It starts from n t , and it is defined by: This result follows using Equation (22) and the observation that the contribution due to the waiting times vanish in the ratio on the rhs. It can also be used to prove the DFT in two alternative ways, the first inspired by Reference [16] and the second using trajectory probabilities (see Appendix B). These proofs rely on the fact that both the driving and the nonconservative EP contributions satisfy the involution property: viz. the change of Σ d and Σ nc for the backward trajectory along the backward process is minus the change along the forward trajectory of the forward process. This result follows from direct calculation on Equations (27) and (30) (see Appendix B). Finally, let us get back to the generalized Landauer principle for systems initially prepared in the reference state, as we did in this subsection for the FTs to hold. Using Equation (20), we see that the arguments of the FTs (33) and (34) (i.e., the driving and the nonconservative contribution to the EP) can be interpreted, on average, as the cost to generate a dissimilarity (or a lag) between the actual and the reference PMF at the end of the forward protocol. A special case of this result is discussed in Reference [17].

EP Fluctuations
We now discuss the properties of the fluctuating EP and its relation to the previously derived FTs. An IFT for the EP always holds regardless of the initial condition [18]. In our framework, this can be seen as the result of choosing the actual p n (τ) as the reference for the IFT (34).
In contrast, a general DFT for the EP does not hold. This can be easily understood at the level of trajectory probabilities. Indeed, the fluctuating EP can be written as the ratio of forward and backward probabilities as in (35), but the initial condition of the forward process is arbitrary and that of the backward process is the final PMF of the forward process, As a result, the involution property is generally lost, , and hence the DFT is also lost [18].
However, in special cases the fluctuating quantity Σ d + Σ nc which satisfies a DFT can be interpreted as an EP. This happens if at the end of the forward (respectively backward) process, the protocol stops changing in time in such a way that the system relaxes from p n t to an equilibrium p ref n t (respectively from p † n (t) to an equilibrium p ref n (π 0 )) and thus without contributing to either Σ d or to Σ nc (even at the trajectory level). In such cases, Σ d + Σ nc can be seen as the EP of the extended process including the relaxation. On average, it is greater or equal than the EP of the same process without the relaxation, since the non-negative EP during the relaxation is given by D(p(t) p ref (π t )) ≥ 0.

A Gauge Theory Perspective
We now show that the decomposition in Equation (14) can be interpreted as the consequence of the gauge freedom discussed by Polettini in Reference [19]. Indeed, in this reference he shows that the following gauge transformation leaves the stochastic dynamics (5) and the EP rate (10) unchanged: D n e → D n e exp ψ n , and ∑ n → ∑ n exp −ψ n .
When considering a gauge term ψ n changing in time, one needs also to shift the time derivative as: where ∂ t behaves as a normal time derivative but it acts only on ψ n . Let us now consider the EP rate rewritten as One readily sees that the transformation(40)-(41) changes the first term into the nonconservative term, Equation (15), whereas the second into the conservative one, Equation (16). We finally note that connections between gauge transformations and FTs were also discussed in References [8,20].
This concludes the presentation of our main results. In the following, we will consider various specific choices for p ref n which solely depend on the driving protocol and thus give rise to DFTs. Each of them will provide a specific meaning to Σ nc and Σ c . Table 1 summarizes the reference potential, affinity, and conservative contribution for these different choices.

Adiabatic-Nonadiabatic Decomposition
We now provide a first instance of reference PMF based on the fixed point of the Markov jump process.
The Perron-Frobenius theorem ensures that the ME (5) has, at all times, a unique instantaneous steady-state PMF ∑ m W nm (π t )p ss m (π t ) = 0 , for all n and t.
When using this PMF as the reference, p ref n = p ss n , we recover the adiabatic-nonadiabatic EP rate decomposition [12,16,[21][22][23][24]. More specifically, the nonconservative term gives the adiabatic contribution which is zero only if the steady state satisfies detailed balance, and the conservative term gives the nonadiabatic contribution which characterizes transient and driving effects. A specific feature of this decomposition is that both terms are non-negative, as proved in Appendix C: Σ nc ≥ 0 and Σ c ≥ 0. In turn, the nonadiabatic contribution decomposes into a relative entropy term and a driving one.
Provided that the forward and backward processes start in the steady state corresponding to the initial value of the respective protocol, the general DFT and IFT derived in Equation (32) and Equation (34) hold for the adiabatic and driving contributions of the adiabatic-nonadiabatic EP decomposition [12,21].
In detailed-balanced systems, the adiabatic contribution is vanishing, Σ a = 0, and we obtain a FT for the sole driving contribution: The celebrated Crooks' DFT [25][26][27] and Jarzynski's IFT [28] are of this type.

Additional FTs
Due to the particular mathematical properties of the steady-state PMF, additional FTs for the adiabatic and driving terms ensue. These are not covered by our main DFT, Equation (32), and their proofs are discussed in Appendix D.
For the former, the forward process is produced by the original dynamics initially prepared in an arbitrary PMF. The backward process instead has the same initial PMF and the same driving protocol as the forward process, but the dynamics is governed by the rateŝ At any time, the following DFT relates the two processes, whereP (−Σ a ) is the probability of observing −Σ a adiabatic EP during the backward process. The Speck-Seifert IFT for the housekeeping heat is the IFT version of this DFT [29]. For the driving term, the forward process is again produced by the original dynamics, but now initially prepared in a steady state. The backward process is instead produced by the rates (45) with time-reversed driving protocol and the system must initially be prepared in a steady state. Under these conditions, one has whereP † (−Σ d ) is the probability of observing −Σ d driving EP during the backward process. The Hatano-Sasa IFT [30] is the IFT version of this DFT.

Cycle-Cocycle Decomposition
We proceed by providing a second instance of reference PMF based on the equilibrium PMF for a spanning tree of the graph defined by the incidence matrix of the Markov jump process.
We partition the edges of the graph into two disjoint subsets: T and T * . The former identifies a spanning tree, namely a minimal subset of paired edges, (e, −e), that connects all states. These edges are called cochords. All the other edges form T * , and are called chords. Equivalently, T is a maximal subset of edges that does not enclose any cycle-the trivial loops composed by forward and backward transitions, (e, −e), are not regarded as cycles. The graph obtained by combining T and e ∈ T * identifies one and only one cycle, denoted by C e , for e ∈ T * . Algebraically, cycles are characterized as: where { C e e }, for e ∈ T * , represent the vectors in the edge space whose entries are all zero except for those corresponding to the edges of the cycle, which are equal to one.
We now note that if T were the sole allowed transitions, the PMF defined as follows would be an equilibrium steady state [15]: where Z = ∑ m ∏ e∈T m w e is a normalization factor, and T n denotes the spanning tree rooted in n, namely the set of edges of T that are oriented towards the state n. Indeed, p st n would satisfy the property of detailed balance, Equation (9): We now pick this equilibrium PMF as a reference for our EP decomposition, p ref n = p st n . However, in order to derive the specific expressions for Σ nc and Σ c , the following result is necessary: the edge probability fluxes can be decomposed as where { E e } denotes the canonical basis of the edge vector space: E e e = δ e e [31]. Algebraically, this decomposition hinges on the fact that the set { C e } e∈T * ∪ { E e } e∈T is a basis of the edge vector space [13]. Note that for e ∈ T * , the only nonvanishing contribution in Equation (51) comes from the cycle identified by e, and hence j e = J e . The coefficients { J e } are called cocycle fluxes for the cochords, e ∈ T , and cycle fluxes for the chords, e ∈ T * . They can be understood as follows [13]: removing a pair of edges, e and −e, from the spanning tree (e, −e ∈ T ) disconnects two blocks of states. The cocycle flux { J e } of that edge is the probability flowing from the block identified by the origin of e, o(e), to that identified by the target of e, t(e). Instead, the cycle flux { J e } of an edge, e ∈ T * , quantifies the probability flowing along the cycle formed by adding that edge to the spanning tree. Graphical illustrations of cocycle and cycle currents, J e − J −e , can be found in Reference [13].
We can now proceed with our main task. Using Equations (48) and (49), we verify that where A e = ∑ e C e e ln {w e /w −e } , for e ∈ T * (53) is the cycle affinity related to C e . It follows that from which the nonconservative contribution readily follows: In the last equality, we used the property of cycle fluxes discussed after Equation (51). Hence, the nonconservative contribution accounts for the dissipation along network cycles. In turn, combining Equation (16) with Equations (51) and (52), one obtains the conservative contribution which accounts for the dissipation along cocycles. Using these last two results, the EP decomposition (14) becomes the cycle-cocycle decomposition found in Reference [13]: As for all decompositions, the conservative contribution-here the cocycle one-vanishes at steady state in the absence of driving. The cycle contribution instead disappears in detailed-balanced systems, when all the cycle affinities vanish. This statement is indeed the Kolmogorov criterion for detailed balance [32,33].
The fluxes decomposition Equation (51) is also valid at the trajectory level, where the cycle and cocycle fluxes become fluctuating instantaneous fluxes, { J e }. Obviously, the same holds true for the cycle-cocycle EP decomposition. Therefore, if the system is in an equilibrium PMF of type (49) at the beginning of the forward and the backward process, a DFT and an IFT hold by applying Equations (32) and (34). Note that the fluctuating quantity appearing in the DFT, Σ d + Σ nc , can be interpreted as the EP of the extended process in which, at time t, the driving is stopped, all transitions in T * are shut down, and the system is allowed to relax to equilibrium-which is the initial PMF of the backward process.
It is worth mentioning that one can easily extend the formulation of our DFT by considering the joint probability distribution for each subcontribution of Σ d and Σ na antisymmetrical under time reversal. This can be shown using either the proof in Appendix B [16], or that in Appendix A [14]. In the case of the cycle-cocycle decomposition, it would lead to which is a generalization of the DFT derived in Reference [34] to time-inhomogeneous systems. In turn, the latter is a generalization of the steady-state DFT derived by Andrieux and Gaspard in Reference [35] to finite times.
Example A spanning tree for the network in Figure 1 is depicted in Figure 3a. The cycles defined by the corresponding chords are depicted in Figure 3b. Algebraically, these cycles are represented as where the negative entries must be regarded as transitions performed in the backward direction. The corresponding affinities, which determine the nonconservative contribution (55), hence read: The affinities corresponding to the cycles taken in the backward direction follow from A −e = −A e . Regarding the expression of the cocycle fluxes, it can be checked that they are equal to by expanding Equation (57) into Equation (10).

Stochastic Thermodynamics
The results obtained until this point are mathematical and have a priori no connection to physics. We now specify the conditions under which a Markov jump process describes the dynamics of an open physical system in contact with multiple reservoirs. This will enable us to introduce physically motivated decompositions and derive DFTs with a clear thermodynamic interpretation.
Each system state, n, is now characterized by given values of some system quantities, { X κ n }, for κ = 1, . . . , N κ , which include the internal energy, E n , and possibly additional ones (see Table 2 for some examples). These must be regarded as globally conserved quantities, as their change in the system is always balanced by an opposite change in the reservoirs. When labeling the reservoirs with { r }, for r = 1, . . . , N r , the balance equation for X κ along the transition e can be written as: (62) β r := 1/T r denotes the inverse temperature of the reservoir. Since charges are carried by particles, the conjugated pair (Q n , −β r V r ) is usually embedded in (N n , −β r µ r ).
System Quantity X κ Intensive Field f (κ,r) energy, E n inverse temperature, β r particles number, N n chemical potential, −β r µ r charge, Q n electric potential, −β r V r displacement, X n generic force, −β r k r angle, θ n torque, −β r τ r The lhs is the overall change in the system, whereas δ i X κ e denotes the changes due to internal transformations (e.g., chemical reactions [36,37]), and δX (κ,r) e quantifies the amount of X κ supplied by the reservoir r to the system along the transition e. For the purposes of our discussion, we introduce the index y = (κ, r)-i.e., the conserved quantity X κ exchanged with the reservoir r-and define the matrix δX whose entries are { δX y e ≡ δX (κ,r) e }. All indices used in the following discussion are summarized in Table 3. Microscopic reversibility requires that δX y e = −δX y −e . Note that more than one reservoir may be involved in each transition (see Figure 4).  Figure 4. Pictorial representation of a system coupled to several reservoirs. Transitions may involve more than one reservoir and exchange between reservoirs. Work reservoirs are also taken into account. Table 3. Summary of the indices used throughout the paper and the object they label.

Index Label for Number
conserved quantity X κ from reservoir r N y λ conservation law and conserved quantity N λ y p "potential" y N λ y f "force" y N y − N λ In addition to the trivial set of conserved quantities { X κ }, the system may be characterized by some additional ones, which are specific for each system. We now sketch the systematic procedure to identify these quantities and the corresponding conservation laws [14,38]. Algebraically, conservation laws can be identified as a maximal set of independent vectors in the y-space, { λ }, for λ = 1, . . . , N λ , such that This equation can be regarded as the balance equation for the conserved quantities. In the absence of internal transformations, δ i X κ e , trivial conservation laws correspond to κ y ≡ κ (κ ,r) = δ κ κ , so that the balance Equations (62) are recovered. Notice that each L λ is defined up to a reference value.
Each reservoir r is characterized by a set of entropic intensive fields conjugated to the exchange of the system quantities { X κ }, { f (κ,r) } for κ = 1, . . . , N κ (e.g., [39] § 2-3). A short list of X κf (κ,r) conjugated pairs is reported in Table 2. The thermodynamic consistency of the stochastic dynamics is ensured by the local detailed balance, ln w e w −e = − f y δX y e + S n D n e .
It relates the log ratio of the forward and backward transition rates to the entropy change in the reservoirs resulting from the transfer of system quantities during that transition. This entropy change is evaluated using equilibrium thermodynamics (in the reservoirs), and reads { δS r e = − f y δX y e }. The second term on the rhs is the internal entropy change occurring during the transition, as S n quantifies the internal entropy of the state n. This term can be seen as the outcome of a coarse-graining procedure over a finer description in which multiple states with the same system quantities are collected in one single n [40]. Using Equation (65), the affinities, Equation (11), can be rewritten as: This relation shows that the affinity is the entropy change in all reservoirs plus the system entropy change. In other words, while Equation (64) characterizes the balance of the conserved quantities along the transitions, Equation (66) characterizes the corresponding lack of balance for entropy, namely the second law.
As for the transition rates, the changes in time of the internal entropy S, the conserved quantities { X κ } (hence { δX y e }), and their conjugated fields { f y }, are all encoded in the protocol function π t . Physically, this modeling describes the two possible ways of controlling a system: either through { X κ } or S which characterize the system states, or through { f y } which characterize the properties of the reservoirs.

Example
We illustrate the role of system-specific conservation laws by considering the double quantum dot (QD) depicted in Figure 5a [41][42][43], whose network of transition and energy landscape are drawn in Figures 1 and 5b, respectively. Electrons can enter empty dots from the reservoirs, but cannot jump from one dot to the other. When the two dots are occupied, an interaction energy, u, arises. Energy, E n , and total number of electrons, N n , characterize each state of the system: where the first entry in n refers to the occupancy of the upper dot, and the second to the lower. The entries of the matrix δX for the forward transitions are: (see Figure 1), whereas the entries related to backward transition follow from δX y −e = −δX y e . For instance, along the first transition the system gains u energy and 1 electron from the reservoir 1. The vector of entropic intensive fields is given by The first vector identifies the energy state variable, E n : The other two instead give the occupancy of the upper and lower dots, N u n and N d n : A posteriori, we see that these conservation laws arise from the fact that no electron transfer from one dot to the other is allowed. The total occupancy of the system, N n , is recovered from the sum of the last two vectors. Now that a nonequilibrium thermodynamics has been built on top of the Markov jump process, we can proceed by considering two physical relevant p ref n .

System-Reservoirs Decomposition
We start by considering a microcanonical PMF as reference: is the Boltzmann's equilibrium entropy. With this choice, the reference affinities become sums of entropy changes in the reservoirs and hence the nonconservative contribution becomes the rate of entropy change in all reservoirs For the conservative contribution, one instead obtains: Using Equation (17), it can be rewritten in terms of the Gibbs-Shannon entropy, and the Boltzmann entropy. Indeed, and so that The conservative contribution thus contains changes in the system entropy caused by the dynamics and the external drive.
The EP decomposition (14) with Equations (76) and (81) is thus the well-known system-reservoir decomposition (i.e., the traditional entropy balance). Since the same decomposition holds at the trajectory level, if the initial PMF of the forward and backward processes are microcanonical, the DFT and IFT hold by applying Equations (32) and (34). When the driving does not affect the internal entropy of the system states { S n }, the DFT and IFT hold for the reservoir entropy alone. Finally, the fluctuating quantity appearing in the DFT, Σ d + Σ nc , can be interpreted as the EP of the extended process in which, at time t, the driving is stopped, all temperatures are raised to infinity, β r → 0, and the system is allowed to relax to equilibrium-the initial PMF of the backward process.

Conservative-Nonconservative Decomposition
We now turn to a reference PMF which accounts for conservation laws: the generalized Gibbs PMF. To characterize this PMFs, we observe that since { λ } are linearly independent (otherwise we would have linearly dependent conserved quantities), one can always identify a set of y's, denoted by { y p }, such that the matrix whose rows are { λ y p }, for λ = 1, . . . , N λ , is nonsingular. We denote by { y p λ } for λ = 1, . . . , N λ , the columns of the inverse matrix. All other y's are denoted by { y f }. Using the splitting { y p }-{ y f } and the properties of { λ y p }, in combination with the balance equation for conserved quantities, Equation (64), the local detailed balance (65) can be decomposed as where are the system-specific intensive fields conjugated to the conserved quantities, and are differences of intensive fields called nonconservative fundamental forces. Indeed, these nonconservative forces are responsible for breaking detailed balance. When they all vanish, F y f = 0 for all y f , the system is indeed detailed balanced and the PMF with Φ gg := ln ∑ n exp S n − F λ L λ n , satisfies the detailed balance property (9). The potential corresponding to Equation (85), ψ gg n , is minus the Massieu potential which is constructed by using all conservation laws (e.g. [39] § § 5-4 and 19-1, [44] § 3.13). Choosing the PMF (85) as a reference, p ref n = p gg n , the reference affinity straightforwardly ensues from Equation (82), Hence, where are the fundamental currents conjugated to the forces. For the conservative contribution, one obtains When written as in Equation (17), its two contributions are: which relates the equilibrium Massieu potential to its averaged nonequilibrium counterpart; and which quantifies the dissipation due to external manipulations of { S n }, the fields { F λ }, and the conserved quantities { L λ }. We emphasize that since ψ gg n encompasses all conserved quantities, Σ c captures all dissipative contributions due to conservative forces. Hence, Σ nc consists of a minimal number, N y − N λ , of purely nonconservative contributions. The EP decomposition Equation (14) with Equations (87) and (89) is the conservative-nonconservative decomposition of the EP obtained in Reference [14].
The conservative-nonconservative splitting of the EP can also be made at the trajectory level. Hence, if the initial condition of the forward and backward process is of the form (85), the DFT and IFT given by Equations (32) and (34) hold.
Here too, the fluctuating quantity appearing in the DFT, Σ d + Σ nc , can be interpreted as the EP of an extended process including relaxation, but for nonisothermal processes the procedure can be significantly more involved. The details of this discussion can be found in Reference [14].

Example
We now provide the expressions of ψ ref n and A ref e for the double QD discussed in the previous example ( Figure 5). Therefore, we split the set 3), (N, 3) }, which is valid since the matrix whose entries are { λ y p } is an identity matrix (see Equation (70)). The fields conjugated with the complete set of conservation laws, Equation (83), are: from which the reference potential of the state n, Equation (85), follows Instead, the fundamental forces, Equation (84), are given by from which the reference affinities follow (Equation (86)). The first two forces drive the energy flowing into the first reservoir from the second and third ones, respectively, whereas the third force drives the electrons flowing from the third to the second reservoir.

Conclusions
In this paper, we presented a general method to construct DFTs for Markov jump processes. The strategy to identify the fluctuating quantities which satisfy the DFT consists of splitting the EP in two by making use of a reference PMF. The choice of the reference PMF is arbitrary for IFTs, but must solely depend on the driving protocol for DFTs. Out of the infinite number of FTs that can be considered, we tried to select those that have interesting mathematical properties or that can be expressed in terms of physical quantities when the Markov jump process is complemented with a thermodynamic structure. Table 1 summarizes the terms of to the EP for each of our choices. We also emphasized that the EP always satisfies an IFT but generically not a DFT. Connections to information theory were also made by formulating a generalized Landauer principle.
We do not claim to have been exhaustive, and many other reference PMFs may be interesting. We can mention at least two more interesting cases. By considering the steady-state PMF which is obtained when removing some edges from the graph (but not all chords as in Section 5), the marginal thermodynamic theory presented in References [45,46] emerges. One can also consider a reference PMF in between the microcanonical PMF, which takes no conserved quantity into account, and the generalized Gibbs one, which takes them all into account. This happens for instance when only the obvious conserved quantities are accounted for, { X κ }, as discussed in Reference [47]. In this case, one uses the fields of a given reservoir to define the reference equilibrium potential where Φ is determined by the normalization. The number of nonconservative forces appearing in Σ nc will be N y − N κ . However, in case additional conservation laws are present (N λ > N κ ), some of these forces are dependent on others and their number will be larger than the minimal, N y − N λ .
Author Contributions: All Authors prepared the manuscript and contributed to the concepts and theoretical results exposed in this article. All Authors have read and approved the final manuscript.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: DFT detailed fluctuation theorem IFT integral fluctuation theorem PMF probability mass function EP entropy production ME master equation MGF moment generating function From Equations (A7), (A8), and (A9), we deduce that Appendix A.2. Proof of the DFT To prove the DFT (32), we briefly recall its two assumptions: (i) the reference PMF depends on time solely via the protocol function; (ii) for both the forward and backward processes, the system is initially prepared in a reference PMF. Let P t (n, Σ d , Σ nc ) be the joint probability of observing a trajectory ending in the state n along which the driving contribution is Σ d , while the nonconservative one is Σ nc . The above probabilities, one for each n, are stacked in the ket |P t (Σ d , Σ nc ) . The time evolution of the related MGF, is ruled by the biased stochastic dynamics, Equation (A4), where the entries of the biased generator are given by Using the definition of reference affinity, Equation (13), one can see that the rate matrix satisfies the following symmetry: where the entries of P t are given by P nm,t := exp −ψ ref m (π t ) δ n,m , and " T " denotes the transposition. Additionally, the initial condition is given by the reference PMF: |Λ 0 (q d , q nc ) = |p ref |1 denotes the vector in the state space whose entries are all equal to one.
Using the formal solution of Equation (A12), the MGF of P t (Σ d , Σ nc ) can be written as: where U t (q d , q nc ) is the related time-evolution operator. Using the relation in Equation (A10), the last term can be recast into Since d τ P −1 τ P τ = diag d τ ψ ref n , the first term in square brackets can be added to the diagonal entries of the second term, thus giving Λ t (q d , q nc ) = p ref t |T + exp t 0 dτ P −1 τ W τ (q d − 1, q nc ) P τ |1 .
The symmetry (A14) allows us to recast the latter into from which it readily follows that viz. p ref n is the solution of the biased dynamics (A12) for q d = q nc = 1. The normalization condition thus demands that which is the IFT in Equation (34). Note that we do not assume any specific property for p ref n in this context.
Hence, changing and renaming the integration variable, n t → n † t , and using the fact that the Jacobian determinant of this transformation is one, we finally get Λ t (q d , q nc ) = Dn t P[n t ; π † t ] p ref which proves Equation (A27). With respect to the previous proof, this one is based on Equation (35) and on the property of involution, which follow from the specifications of forward and backward processes.
It satisfies the following symmetry: whereŴ (q a ) is the biased generator of the fictitious dynamics ruled by the rates in Equation (45). Crucially, p ss n is also the steady state of this dynamics: We can now proceed to prove the FT (46): In the last equality, we made use of the symmetry in Equation (A45). Following the same mathematical steps backward, we readily get from which the DFT in Equation (46) ensues.