Entropy production in systems with unidirectional transitions

The entropy production is one of the most essential features for systems operating out of equilibrium. The formulation for discrete-state systems goes back to the celebrated Schnakenberg's work and hitherto can be carried out when for each transition between two states also the reverse one is allowed. Nevertheless, several physical systems may exhibit a mixture of both unidirectional and bidirectional transitions, and how to properly define the entropy production in this case is still an open question. Here, we present a solution to such a challenging problem. The average entropy production can be consistently defined, employing a mapping that preserves the average fluxes, and its physical interpretation is provided. We describe a class of stochastic systems composed of unidirectional links forming cycles and detailed-balanced bidirectional links, showing that they behave in a pseudo-deterministic fashion. This approach is applied to a system with time-dependent stochastic resetting. Our framework is consistent with thermodynamics and leads to some intriguing observations on the relation between the arrow of time and the average entropy production for resetting events.


I. INTRODUCTION
Almost all natural systems operate out of equilibrium, producing entropy in their surroundings.A general situation for a system to show a non-equilibrium dynamics, and to eventually achieve a non-equilibrium stationary state, is to be in contact with different reservoirs (e.g., of energy, volume, matter) not necessarily in a mutual equilibrium [1].The starting point to model a system in this situation is to perform a coarse-graining procedure on some degrees of freedom, ending up with a set of equations describing the system in terms of probabilities and transition rates.
Given a dynamical description, the most interesting features of a system out of equilibrium arise from the study of its thermodynamic properties.In particular, the fingerprint of a non-equilibrium condition is the entropy production.It has been widely investigated and found to be of paramount importance in estimating the accuracy of relevant observables of natural systems from several perspectives [2][3][4][5][6].Moreover, the entropy production plays a leading role in controlling the linear response to external stimuli [7] and allows determining the nonequilibrium stationary state of the system, in close to equilibrium conditions [8,9].
Consider a discrete-state Markovian system whose dynamics can be described by a Master Equation [1].In formulas: where p i (t) indicates the probability to be in the state * These authors equally contributed to this work i at time t, W i→j the transition rate to pass from the state i to the state j, that can also depend on time, and N the total number of states.The entropy production of such a system can be estimated using the Schnakenberg's formula [1]: where Ṡtot = 0 corresponds to the system in the thermodynamic equilibrium.
The quantity Ṡtot can be further splitted into an environment contribution, Ṡenv , and a system one, Ṡsys , this latter vanishing at the stationary state, as follows: where S sys = − i p i log p i .The usual assumption is that if W i→j = 0, so it is W j→i so that (2) and ( 3) are well defined.Nevertheless, there is a vast class of systems for which this assumption is not satisfied.For example, total asymmetric simple exclusion process (TASEP) involves the transition only in one direction while respecting the exclusion mechanism [10,11].Unidirectional jumps are also used to model biological enzymatic reactions [12].The lack of microscopic reversibility can be seen in uniform sheared granular matter and driven inelastic Lorentz-gas [13].Some other examples include directed percolation [14], spontaneous decay of an excited atom [15], and stochastic resetting [16,17].The onset of this peculiar situation can also be due to the presence of different processes driving the system out of equilibrium.
Once we identify each single process, a transition between i and j can be unidirectional for one of them, but possible along a different pathway.The existence of multiple channels allows for a microscopic interpretation of the local detailed balance [18].However, as one can easily see from (2), the entropy production cannot be defined when there are some unidirectional transitions [11,19].In this direction, several efforts have been made in understanding and describing this vast class of systems.For example, Ben-Avraham et al. [20] tackled the problem employing a coarse-graining of the sampling time and derived the entropy production that diverges as the sampling time approaches zero, i.e., counting each transition.Similar results on the temporal coarse-graining can also be seen in [19].In contrast to these studies, Murashita et al. [21] identified the reasoning behind this divergence at a trajectory level by separating regular and irregular trajectories, and obtaining a correction to the integral fluctuation theorem.In contrast, some fluctuation theorems were derived by Ohkubo [22], using a Bayesian approach and defining a posterior probability to describe the reverse process.Recently, Rahav et al. [15] studied a fluctuating quantity similar (but not equal) to the entropy production in a system with unidirectional transitions, finding that it obeys an integral fluctuation theorem.However, none of these methods can be useful in defining the entropy production without observing a divergence absent in experiments [10,23].Then, we present an argument to evaluate the average entropy production even in presence of unidirectional transitions thus generalizing Schnakenberg's original work.
We apply our derivations to a peculiar situation in which detailed balance is satisfied on bidirectional transitions, leading to a pseudo-deterministic behavior, i.e., on average, a null entropy production emerging from unidirectional cycles.
Further, we consider the well-known problem of resetting.This is a process involving a sudden transition to a single preselected state or region of the system.It has attracted attention in optimization problems [16,25,26], proofreading [27,28], population dynamics [29] and information theory [30].We derive the results presented in [31] in our general framework.
Finally, we extend the study of systems with resetting to cases in which this latter mechanism is periodic in time.On the one hand, the time-periodic driving has been recently studied as a tool to mimic desired nonequilibrium features (e.g.stationary distribution, entropy production, fluxes) of biological systems in which detailed balance does not hold [32][33][34][35][36]. Since some of them may exhibit a resetting mechanism or, more in general, unidirectional transitions, then a way to estimate the entropy production both in steady and time-periodic conditions is of paramount importance to efficiently engineering artificial molecular machines.On the other hand, the paradigm of time-periodic resetting presents a much more wide phenomenology than its stationary counterpart.Indeed, we show that it allows switching between a behavior where information is erased from the system to one where, instead, it is added.Interestingly, a signature of the arrow of time emerges by inspecting the average resetting entropy production.Even if presented on a simple toy model, this could serve as a starting point to elucidate the response of biological systems to timeperiodic stimuli [37][38][39][40].
The plan of this paper is as follows.In Sec.II, we give a general discussion on a system involving both bidirectional and unidirectional transitions, and identify the total entropy production for a general system obeying Eq. (1).Sec.III presents the mapping of unidirectional links to bidirectional ones.Here we show that under suitable limiting procedure of the transition rates of these bidirectional links, one is able to derive the total entropy production identified in Sec.II.An interpretation of this limit is given in Subsec.III A. Using the entropy production along a single trajectory of a non-equilibrium ensemble, the results shown in Sec.III are reobtained in Sec.IV.Moreover, in Subsec.IV A, we consider some examples to better understand the entropy production along a stochastic trajectory when the system has a mixture of both unidirectional and bidirectional links.Entropy production for a system under stochastic resetting mechanism is treated in Sec.V. Using the general theory we study the entropy production using a constant resetting rate (Subsec.V A) and the time-periodic variation of the the resetting rate (Subsec.V B) in a model system.In Sec.VI, we conclude our paper.A detailed derivation for the averaging of entropy on a stochastic trajectory over the path probability is shown in Appendix A. A relation between the rate of total entropy production and the total entropy production along a stochastic trajectory is shown in Appendix B.

II. MASTER EQUATION WITH UNIDIRECTIONAL TRANSITIONS
We consider a discrete state Markov system as described by Eq. (1).The system follows a stochastic dynamics and makes transitions from one state to the other.For a selected pair of states (e.g., i, j), either (i) the system jumps from a state i to a state j with a transition rate W i→j ≡ w i→j > 0 and there exists a corresponding reverse transition with a rate W j→i ≡ w j→i > 0 (for example, see black dashed links in Fig. 1) or (ii) the system makes a transition from a state i to a state j with a transition rate W i→j ≡ y i→j > 0 in the absence of a conjugate transition, i.e., W j→i ≡ y j→i = 0, (for example, see the red link in Fig. 1).The former process is referred to as bidirectional process whereas the latter is called unidirectional process.
The dynamics of the system is described by a continuous-time Master Equation: where on the right hand side, the first term describes the situation (i), and the second term corresponds to the situation (ii) in which the summation is performed over all the couple of transition rates for which the reverse transitions are not allowed, i.e., either (y i→j = 0, y j→i = 0) or (y j→i = 0, y i→j = 0).From now on we will not always explicitly write the time dependence in p i and in the transition rates.FIG.1: A three state system in which states are labeled by 1, 2, 3 is shown.Each black dashed link represents the transitions from one state to the other and has a corresponding conjugate link which describes the reverse transition.On the other hand, there is no reverse transition with respect to that of the red solid link.
The average entropy of the system is given by [1] (as it is common in this context we use temperature units so that the Boltzmann constant can be set equal to 1) where p i (t) is the solution of the Master Equation ( 5) subject to the initial condition p i (0).Differentiating the above equation with respect to time t and substituting (5) yields the system entropy production Ṡsys : where the dot represents the derivative with respect to time.Notice that Ṡsys is a finite quantity irrespective of the fact that some of the transitions are not allowed.
The above equation can be rewritten as follows where the first and second term on the right hand side, respectively, are recognized as the total entropy production Ṡ(R) tot and the environment entropy production Ṡ(R) env for the bidirectional processes only.The superscript R refers only to the fact that the corresponding quantities contain only bidirectional transition rates, however, the information regarding both unidirectional and bidirectional links is encoded in p's.
Remark 1: both Ṡ(R) tot and Ṡ(R) env depend on the whole set of transition rates, {w} and {y}, through the p's that satisfy Eq. ( 5).
Remark 2: the contribution of the unidirectional links (i.e., last term on the right hand side) cannot be splitted into a total and an environment entropy production, since both terms will formally lead to divergent (and unphysical) quantities.
We name "unidirectional entropy production", Ṡ(u) , the last term on the r.h.s. in Eq. ( 8) explicitly depending on unidirectional transition rates.This extra contribution has to be investigated case by case to understand its physical origin.When, for example, there is an external process inducing unidirectional transitions whose entropy production is negligible, Ṡ(u) can be understood as an additional contribution to the environment entropy production.In the next section we corroborate the latter physical interpretation with an explicit example.

III. DYNAMICS-PRESERVING IRREVERSIBLE ENTROPY PRODUCTION
Let us consider the discrete-state system in Fig. 2A,  say (A).All the transition rates present in the internal network G are bidirectional.The only unidirectional link is the external one, y N 1 := y N →1 .This system is physically equivalent to the one depicted in Fig. 2B, say (B), as long as the flux flowing through the unidirectional link (A) is equal to the corresponding bidirectional links (B) for all time t.In formulas, this condition is where we have set w b to be time-independent.In the above equation (9), in order to obtain w f (t), we substitute p 1 (t) and p N (t), the solutions obtained from (5) for a given initial condition [p 1 (0), p 2 (0), p 3 (0), . . ., p N (0)] and w b .Notice that w b = 0, since w b = 0 implies w f = y N →1 , corresponding to the original situation depicted in (A).
FIG. 2: A) A Master Equation system with N states, defined by a network of transitions G, with an external unidirectional link yN1.B) A fictitious system with the same dynamics of the one in (A), where the only difference is the presence of bidirectional transitions between the states 1 and N , as indicated, whose strengths are determined through Eq. ( 9) .
With this condition the dynamics of the two systems, (A) and (B), leads to the same average entropy production as in Eq. ( 7).
Let us first evaluate the environment entropy production for the system (B), Ṡ(B) env .By definition, using Eq. ( 2) we have: where the first term is the environment entropy production due to the internal network G. Using Eq. ( 9), we can express w f as a function of y N 1 and w b in Eq. ( 10), obtaining: where p i indicates the probability to be in the state i, due to all the transition rates, both the bidirectional and the unidirectional ones, as obtained from the solution of Eq. ( 5).
In order to eliminate the information about the fictitious transition rate w b , we can take the limit w b → +∞.The physical interpretation of this limit corresponds to the assumption that the external process inducing unidirectional transitions in the system, if any, has a negligible entropy production.In the next subsection we will discuss further this point.We get the following equation: Thus we have obtained a (non-divergent) contribution to the environment entropy production due to the unidirectional links only, which we identify with a part of the environment entropy production of the system of interest (A), Ṡ(A) env .Notice that the environment entropy production Ṡ(A) env explicitly depends on the transition rate of the unidirectional link just through the probability flux The generalization to the case of multiple unidirectional links is straightforward and proceed along the same line.In fact, we can imagine a fictitious system where each unidirectional link y i→j is replaced by a couple of links w f,i→j and w b,j→i , properly tuned according to Eq. ( 9).Then, after the evaluation of the entropy production, we can set all the w b 's to infinity as in the above example.
Rewriting the total entropy production, from Eq. ( 8), we obtain: We stress again that the probabilities p's depend on the whole network through Eq. ( 5), and so also Ṡ(R) tot and Ṡ(R) env .Only the environment entropy production depends explicitly on the unidirectional links y's.Furthermore, Ṡtot does not depend on the choice of w b .
We present the above results for an illustrative simple example.Consider the network consisting of four nodes depicted in Fig. 3A.In Fig. 3B, we show the equivalence between the dynamics of the network with the unidirectional links (solid lines) and the one with the bidirectional links (dots) for all times, as discussed in (9), for a particular choice of transition rates.In Fig. 3C, all the components of the entropy production are studied.In particular, the system entropy production tends to zero as the system approaches the stationary state.The environment entropy productions due to bidirectional and unidirectional links also reach a stationary value for large times.Moreover, the latter contribution (the last term in (11)) is plotted for different values of w b , exhibiting its convergence to a minimum value for all the times as The dynamics of the system in (A) is compared with the dynamics of the equivalent network where each unidirectional link has been mapped into two bidirectional links, as explained in Fig. 2. The equivalence is valid for any choice of the parameters.In the figure we set: w1→2 = w2→3 = w4→3 = w3→1 = 2, w2→4 = 3, all the others equal to unity, and the initial state pi(0) = 0.25 for i = {1, 2, 3, 4}.C) The dashed blue line is the system entropy production as a function of time, which goes to zero as the system approaches stationarity.The green dashed line is the evironment entropy production only due to the bidirectional links ( Ṡ(R) env ).The solid red lines represent the enviornment entropy production associated only to the unidirectional links modified as in (the last term of) Eq. ( 11), introducing equivalent bidirectional links for each unidirectional link, as shown in 2. The color becomes darker as w b increases, up to a limiting curve (red dashed line) corresponding to the last term in Eq. ( 12), generalized to the case of two unidirectional links (see Eq. ( 13)).For sake of simplicity we used just one w b , equal for both the unidirectional links.D) The derivative of the environment entropy production is shown, highlighting that it approaches zero as w b increases.w b goes to infinite.In the Fig. 3D, we show that with an increasing value of w b , the derivative of Ṡenv with respect to w b tends to zero, i.e., Ṡenv becomes independent of it.Thus, the environment entropy production for the modified system, the one with w f 's and w b 's, is bounded from below by the environment entropy production obtained in the limit w b → +∞, i.e., the one that we have identified as the environment entropy production of the original system.
A. Interpretation of the w b → +∞ limit The physical interpretation of this limit, as discussed in [41], can be found in parallel to an electrical circuit made only by conductances, w ij .The injection of a net current J in a node k, and the ejection of the same current from another node l can be introduced into the dynamics as a unidirectional link, y l→k .Analogously, the production of this current can also be seen as the effect of an external battery, producing a difference of potential ∆V = JR eq , where R eq is the equivalent resistance, which can be estimated as a combination of the bidirectional transition rates [41].It can be shown that, if we map this battery into bidirectional links, with transition rates w f (t) and w b , producing the same flux, the entropy production of the system always contains the energy dissipation of the electric circuit, and an additional contribution proportional to 1/w b .Letting w b go to infinity corresponds to a circuit where the current is generated by a perfect battery, i.e., without dissipation, at its stationary state.Hence, in this limit, Ṡtot corresponds to the energy dissipation of the circuit only.
In the context of this work, the limit w b → +∞ has an analogous meaning: if we consider unidirectional transitions into the system as induced by an external process, characterized by the rates w f (t) and w b , letting w b → +∞ will lead to the correct expression for energy dissipation of the original system, when there are no other sources of dissipation due to external processes.
It is important to stress that, within this framework, the total entropy production is not affected by the limit of an infinite w b , since it depends just on bidirectional transition rates and probabilities (see Eq. ( 13)), which are the same in both systems (A) and (B).
We emphasize that the entropy production computed by mapping each unidirectional link into a bidirectional one and letting each fictitious transition rate w b → +∞, is equivalent to the direct computation (without mapping) as shown in the Eq. ( 8), i.e., both of these results are consistent with each other.The aim of introducing such a mapping is to show that the contribution coming only from unidirectional links may have its own physical meaning in some cases.In particular, when there are no external processes dissipating energy, i.e. a perfect battery in the parallel with an electrical circuit, the contribution coming from unidirectional links can be considered as a part of the environment entropy production of the full system.We stress that such a physical identification is crucial to correctly generalize the Schnakenberg's formula.
The correct interpretation of Ṡ(u) , i.e. whether or not being a part of the environment entropy production (without further corrections), is an interesting question that we leave for future investigations.Indeed, in order to provide a full answer, one needs to build a mapping that preserves the correct statistics on each trajectory (i.e., not only on average level), as we also point out in the next section.

B. First law with unidirectional transitions
A thermodynamically consistent choice for the bidirectional transition rates is where k B = 1 for sake of simplicity.From Eq.( 5), multiplying by E i , summing over i, and using Eq.( 14) for the bidirectional transition rates, it is possible to obtain a formulation of the first law of thermodynamics in presence of unidirectional transitions: The first term on the r.h.s. of the previous equation is the heat absorbed by the system from the environment without considering the processes involving unidirectional transitions.The second term, without the minus sign, represents the work extracted from the system, at the expenses of heat absorbed from the thermal bath/environment at temperature T , due to events triggered by unidirectional transitions.They both contributes to the total energy change in the system, Ė .
A simple example, which justifies the latter identification is illustrated in Fig. 4. Notice that the term − i,j y j→i p j (log p j − log p i ) in Eq. ( 13), which we identify as a contribution to the environmental entropy production, has a form similar to the second term in Eq. ( 15) with E j − E i substituted by the entropy change log p j − log p i .This further suggests the correctness of our guess for the environment emtropy production.

IV. TRAJECTORY-BASED APPROACH
In this section, we will compute the average entropy production using the entropy production along a single stochastic trajectory in a non-equilibrium process.So far we have investigated how the average entropy production can be computed when unidirectional transitions are present in a discrete-state system.The average entropy production can also be explicitly derived using a trajectory-based approach.This is the standard procedure to derive the well-known fluctuation theorems [42][43][44][45].Here, for completeness, we present in detail this derivation.However, it is important to stress the fact that our framework only preserves average currents, not their fluctuations.As a consequence, the entropy production on a single trajectory may have different statistics between the real and the fictitious system, and only average quantities can be reliably computed through the proposed mapping.We leave for future investigations the problem of defining an entropy production for unidirectional transitions which exhibits the correct statistics on a single trajectory.
Consider a system which involves only bidirectional links (see Sec. I).Suppose Σ sys (τ |{i(τ )}) be the system entropy along a trajectory {i(τ )} at time τ (where 0 < τ < t), and it is defined as [24,46,47] Σ sys (τ |{i(τ )}) = − log p i(τ ) (τ ) (16) where p i (τ ) is the solution of the Master equation ( 1) given the initial condition p i (0).In the above equation, the trajectory [48] {i(τ )} = (i 0 , i 1 , i 2 , . . ., i M −1 , i M ), in which i k is the state of the system from time τ k to τ k+1 , where τ k < τ k+1 , and τ k ∈ (τ 0 = 0, τ M +1 = t), and the jumps occur at times τ 1 , τ 2 , . . ., τ M .Differentiating the above equation with respect to time, we find the rate of entropy of the system along a single trajectory where the last two terms are equal to zero as 0 = τ 0 < τ < τ M +1 .From the above equation, we can identify the FIG.4: A physical system with unidirectional and bidirectional transitions.A particle of mass m is contained in a cylinder whose walls are in contact with a heat bath at temperature T .A piston of mass M m is placed, and it does not exchange heat with the reservoir.When the particle gets in contact with the wall, it picks a random velocity with energy Ei such that Ei = 3  2 kBT and move ballistically inside the cylinder.Due to its motion, the particle can hit the piston, consequently losing some of its energy, Ej < Ei, and moving the piston of a distance ∆L.This event happens with probability yi→jdt, and it can be described as a unidirectional process since the particle cannot receive energy from the piston.After a certain time, the average energy of the particle is restored to 3  2 kBT , due to collisions with the walls, which are accounted by bidirectional transitions.In this example, the quantity yi→jpi(Ei − Ej) is the work done per unit time on the environment.

rate of environment and total entropy as
In the following, we take the average on ( 17), (18), and (19) over trajectories, as defined in Appendix A. Notice that averaging the first term on the right hand side in (17), and (19) over p i (τ ) yields zero due to the normalization i p i (τ ) = 1.Therefore, the rates of average entropy productions are (see Appendix A for more details) where W 's are the non-zero transitions.
In the case of environment and total entropy productions, when we consider all the transitions are bidirectional, there is no problem with these quantities.However, as already said before, when some transitions are allowed and the reversed ones are not, the above Ṡtot and Ṡenv diverge.Nevertheless, this problem does not arise in the case of system entropy production where one can split W and rewrite the system entropy production as (see Sec. II) where, as already said above, the first term involves w's indicating bidirectional transitions whereas the second term involves y's refers to unidirectional transitions.In order to deal with this divergence and to give it the right physical interpretation, when some transitions are unidirectional, one can separate those links and replace them by the bidirectional links (w f and w b for each unidirectional link) as explained above.Now the system is made by bidirectional links only, then Eqs. ( 20), ( 21) and ( 22) can be obtained.In the end, after the average over many trajectories, one can take the limit w b → +∞ as shown in Sec.III.
The results obtained following this way, by averaging the trajectory entropy, are consistent with ones derived in the previous sections.In other words, when the limit w b → ∞ is physically meaningful (in the terms discussed above), the extra (non-divergent) contribution in Ṡsys , Eq. ( 17), due to the unidirectional transitions, appears to be equal to (minus) the extra term in the environment entropy production depending just on y i→j .Again, Eq. ( 13) holds.
An important observation is that in our framework there is no need of splitting the trajectories into regular and irregular ones [21].One can first consider the system as completely bidirectional, and then the limit is taken just as a final step.Thus, the average entropy production can also be achieved from each single trajectory and averaging over them using the procedure explicitly shown in the Appendix A.
In the next subsection, we obtain the average entropy production for an example where some of the transitions are unidirectional.

A. Partial detailed balance and pseudo-deterministic behaviour
Our framework can be employed to study a particular situation, which we name partial detailed balance.
Consider a system in which the detailed balance holds for all the bidirectional links w i→j , i.e., w i→j π i = w j→i π j , where π i is the probability to be in the state i at stationarity.This condition differs from global detailed balance, since unidirectional links do not have to satisfy it.We call it partial detailed balance.
Let us start with a simple system, as the one depicted in Fig. 1.In this case, imposing the detailed balance conditions on all the bidirectional (black) links, the probability of the system to be in the state 3 will evolve according to: ṗ3 (t) = −y 3→1 p 3 (t) (24) converges to zero as time progresses.The detailed balance condition then implies that all the probabilities have to be zero at stationarity, which is impossible.Therefore, the detailed balance is never reached on the bidirectional links, since it is inconsistent with the dynamical evolution of the whole system.In other words, the detailed balance is not maintained in such systems in contrast to those systems with only bidirectional links.We emphasize that this argument can be generalized as follows: the partial detailed balance cannot be satisfied for networks where the nodes connected by unidirectional links do not form cycles.
We then need to analyze networks in which cycles of unidirectional links do appear.Also for this setting, let us start with the simple example sketched in Fig. 5. Here, when detailed balance holds on bidirectional links, the dynamics still admits a feasible stationary solution for the whole system.
We study this system when the the entropy produced by unidirectional transitions cannot be ascribed to any external process, so that Ṡ(u) can be identified with an extra contribution to the environment entropy production.As a consequence, the total entropy production is equal to Ṡ(R) , which is the one evaluated taking into account only bidirectional transitions, Eq. ( 13).
According to this, the total entropy production is equal to zero at stationarity for this particular system, because of the partial detailed balance condition.In other words, in the presence of cycles of unidirectional links, there can be in principle situations in which the system experiences some transitions without producing entropy, even if global detailed balance does not hold.
In order to unveil the apparent paradox of a null average total entropy production, here we detail how to estimate it starting from trajectory-dependent quantities.Given a trajectory{i(τ )}, the total entropy change associated to it is where P({i(τ )}) is the probability of observing a given trajectory {i(τ )} and P † ({i(τ )} † ) is the probability of observing the time reversed trajectory {i(τ )} † .The explicit structure of P({i(τ )}) is given in Eq.A3.A proof of the last equality in Eq. ( 25) is given in Appendix B.
As highlighted in [15], since we cannot identify a time reversed trajectory for the unidirectional links, we cannot strightforwardly apply Eq. ( 25) to identify ∆Σ tot .Instead of proposing a different auxiliary dynamics, generating an auxiliary trajectory {i(τ )}, which does not correpond to the time-reversed one [15], and would not also lead to the total entropy production on a single trajectory, we start modeling our system with all the transitions as bidirectional links, as explained in Sec.III.
The equivalent network is shown in Fig. 5B, where each unidirectional links is replaced by the bidirectional links with the transition rates w f 's and w b using the procedure presented in Sec.III.For convenience, we assume w b to be equal for each reverse transition.Generalization to different w b is straightforward.In this equivalent network, consider a trajectory {i(τ )}, so that: where N i k →i k±1 is the number of times the transition happened from nodes i k to i k±1 in the trajectory {i(τ )}.9).Moreover, the nodes 1, 2, and 3 are connected to systems whose transition rates satisfy detailed balance (DB).
In the above equation, p start (p end ) is the probability of the system to be in the initial (final) node from (to) where (which) the trajectory {i(τ )} starts (ends).In Eq. ( 26), we have focused only on the cycle formed by unidirectional links.If also the contribution from other nodes connected by bidirectional links, then obeying detailed balance, and belonging to the trajectory {i(τ )}, were considered in Eq. ( 26), it would yield 1 in the argument of the logarithm by definition.Upon averaging Eq. ( 26) over trajectories (which is equivalent to average Eq.( 19) and apply ( 25)), then using ( 9) and the limit w b → +∞, we finally get that the system does not produce entropy on average at stationarity.An intuitive explanation of this result relies on noting that an intrinsic unidirectional cycle (not caused by some external process performing work) exhibits a nonstochastic behaviour.The stochasticity lingers only in the presence of persistence times, which, however, does not contribute to the entropy difference for each trajectory (see Eq. ( 26)), showing what we name a pseudodeterministic behaviour.Thus, we can conclude that, in the framework here discussed, unidirectional cycle exhibit null total average entropy production at stationarity.This is a direct consequence of the equivalence derived in Eq. ( 13).In fact, at an average level, bidirectional links are the only ones contributing to the entropy production, even if the p's still depend on the whole network of transitions.

V. APPLICATION: STOCHASTIC RESETTING
Stochastic resetting is a mechanism in which the system undergoes a stochastic dynamics in the state space as well as stochastically resets to a prescribed location with a given transition rate (i.e., a unidirectional process) [16,25,26,[49][50][51][52][53][54][55][56][57][58][59][60][61][62][63][64].These resetting transitions involve jumps of the system into given locations and can be called the controlled transitions (i.e., these can be tuned from external sources).Notice that correspond-ing to each controlled transition, there is no reverse transition.Therefore, the whole dynamics has two classes of transition rates: (i) internal or uncontrolled, and (ii) controlled and unidirectional.
Then we can write the entropy production of the system as follows.Suppose that a given system resets to a state i 0 from a state j with a resetting rate r j .Therefore, using Eq. ( 8), the system entropy production is where w i→j is the transition rate belonging to the uncontrolled process, which we have considered constituted by bidirectional transitions only, and r j := y j→i0 is the resetting rate (where y j→i0 y i0→j = 0, i.e., controlled process) from the jth state.
In the steady state, Ṡsys = 0, using Eq. ( 13) we are led to: ) Hence, using our general framework, it is possible to obtain the same result as presented in [31].
In what follows, we identify Ṡ(u) as Ṡreset , without further speculating on its physical meaning, since in this case it is univocally determined by the system under investigation.

A. Constant resetting
In the following, we consider an example of a network of three nodes labelled by 1, 2, and 3 as shown in Fig. 6A.The transition rates from the node 1 to 2 and from 2 to FIG. 6: A) Three-state system with resetting from each state to 1 at a constant rate r.B) The coloured curves Ṡreset ≡ Ṡ(R) env − Ṡenv = 0, which corresponds to the second term on right hand side in Eq. ( 28), separate the eraser-like behaviour Ṡreset <0 (above the curve) from the writer-like behaviour Ṡreset > 0 [31].We show how this so-called operative diagram changes as the system approaches stationarity from two different initial conditions: π1 = (0.15, 0.15, 0.7) and π2 = (0.7, 0.15, 0.15).In general, as a function of time, a resetting system may change its operative behaviour.C) The coloured line, in the same color code of (B), indicates the point for which Ṡ(R) env (t) = 0, as the system approaches stationarity from two different initial conditions.Ṡ(R) env < 0 from the vertical grey line to the coloured one (coloured region for two times only).The vertical grey line is present for all times and at stationarity divides the region of parameter in which the heat is extracted from the environment ( Ṡ(R) env < 0 (on the left) from the one in which it is dissipated (on the right) [31].
3 are k f while the reverse ones are k b .Moreover, we consider that the system stochastically resets from nodes 2 and 3 to node 1 with a rate r > 0. For this system, we plot the contours for Ṡreset = 0 (see Fig. 6B) and Ṡ(R) env = 0 (see Fig. 6C) for two different initial condition π 1 = (0.15, 0.15, 0.7) and π 2 = (0.7, 0.15, 0.15) at different times in (k f /k b , r/k b ) plane.We observe that as the time increases the system approches the stationary state and the contours Ṡreset = 0 approaches their stationary value.
Within our framework, we can go beyond the stationary operative diagram, derived in [31].In fact, it is possible to obtain how the region of parameters in which the system exhibits a writer(eraser)-like behaviour changes as time increases.However, this latter is a transient effect, since the system evolves toward a non-equilibrium steady state.It is then worth investigating whether persistent complex phenomena can emerge by introducing a time dependence in the transition rates.

B. Time-periodic resetting
Time-periodic driving is a non-equilibrium paradigm which can efficiently mimic non-equilibrium features of molecular machines operating at steady state [32][33][34][35][36].Moreover, several biological systems constantly integrate and produce time-periodic stimuli, to cope with environmental perturbations [37][38][39][40].It is then instructive to study what happens when time-dependent unidirectional transitions come into play.Here, we focus on cases where they implement a time-periodic resetting mechanism.
Consider a system analogous to the one depicted in Fig. 6A, where now the resetting rate depends on time through the following rule (as sketched in Fig. 7A): such that r(t) T = r 0 , where • T indicates the temporal average over one period T = (2ω) −1 .Both k f and k b do not depend on time, so that the periodicity is introduced through the resetting mechanism only.After a transient, the system will relax to a time-periodic state, exhibiting time-periodic environment and resetting entropy production.
For sake of simplicity, we set k b = 1, k f = k + , and r equal to its average value r 0 , such that if the system relaxed to a non-equilibrium steady state, the resetting entropy production would be equal to zero, i.e., The above equation gives the relation between r 0 and k + corresponding to one point on the magenta curve depicted in Fig. 6B.Since we have different rates acting at the same time on the system, we define a reference timescale τ = 1/k min , where k min = min{1, k + , r 0 }.When the period of the resetting T = τ , the corresponding frequency will be denoted as ω c , that is, We then investigate the system for various ω, i.e., ω << ω c , ω >> ω c and ω = ω c To this aim, we define ω/ω c = α, where α > 0 is a dimensionless parameter.In Fig. 7 and 8, we present numerical results.Notice that from now on we study the system for time t such as it has already reached its time-periodic state.Moreover, for sake of simplicity, the time t is considered inizialized to 0 after the transient dynamics.
First of all, the system exhibits a time-periodic switching between writer-like and eraser-like behavior, even if the resetting entropy produced in the two phases is not The between writer-like and eraser-like behaviour (the faster is ω, the faster is the switching).As α increases, the minimum of Ṡ(R) env increases and the profile of the curve becomes flatter, until being constant for very fast driving.On the other hand, in Ṡreset, an increase in the frequency corresponds to an higher asymmetry between the two positive maxima.The small one is indicated by a blue dot and a blue line, while large maximum by a red dot and a red line, on the curve corresponding to α = 1.Note that the small minimum appears before the large in each period, i.e., TS < TL.Further increasing α such an asymmetry starts decreasing, and eventually Ṡreset approaches zero at all times for very fast drivings, since r(t) can be approximated to its average r0.
FIG. 8: Several measures of the system in Fig. 7A are reported.All x-axes are in log-scale.A) Temporal average of resetting entropy production over one period.The system, on average, tends to erase information, while Ṡreset T → 0 for very fast drivings, according to Eq. ( 30), since r(t) can be approximated with its average r0.B) Temporal average of environment entropy production.Our framework leads to the thermodynamically consistent result that adiabatic drivings, i.e., α << 1, produce less entropy in the surroundings, while the higher is α, the higher will be Ṡ(R) env T , up to a threshold (constant in time) value.C) Minimum of environment entropy production during one period.Again, in accordance to the law of thermodynamics, the faster is the driving, the larger will be the minimum possible dissipation rate that the system can experience.D) Difference in height of the two positive maxima of Ṡreset, i.e., Ṡreset(TL) − Ṡreset(TS).Both for adiabatic and very fast drivings it tends to zero, while presenting a maximum for an intermediate frequency higher than ωc, the reference frequency of the system.E) Putting together all panels, and normalizing the quantities so to use the same scale on y-axis, we sketch, qualitatively, the window of α in which the system is highly sensitive to frequency variations.This region contains mostly frequencies higher than ωc = kmin/2.the same.Moreover, there are two bumps in the positive region and just one minima in the negative region, in a period T .In Fig. 7B, solid curves represent Ṡreset for three different values of α (corresponding to ω above, below and equal to ω c ).Clearly, as the frequency increases, the speed of the switching increases as well, even if it cannot be seen from the picture, since we are plotting the entropy production against a rescaled time T = t/T .Unexpectedly, going toward higher values of α, an asymmetry appears in Ṡreset .In particular, we observe a difference in the heights of the two maxima evidenced by a blue and a red dot at fixed α in the picture.The smaller maximum takes place before the larger one in each period, at (rescaled) time T S < T L , where T L is the (rescaled) time at which the larger maximum appears.As α is further increased, such an asymmetry disappers again, and eventually the resetting entropy production vanishes at all times.This behavior is a consequence of the fact that, for very fast drivings, r(t) can be approximated with its average r 0 , for which Ṡreset is zero by construction, Eq. ( 30).
Remarkably, this observation can be rephrased in a more fashonable way: time-periodic resetting introduces a signature of the arrow of time.It is known that entropy production is a time-antisymmetric quantity whose average over many dissipative trajectories can help in discriminating if a process is proceeding forward or backward, i.e., to identify the arrow of time [65].Here we discuss how time-dependent unidirectional links (performing a resetting to a given state) can lead, in principle, to an error-free discrimination between forward and backward processes.In fact, just by looking at the order in which the maxima appear in Ṡreset , during a period, we can conclude: if the smaller maximum comes first, then time is proceeding, viceversa, time is regressing.However, the bottleneck is represented by the long-standing problem about how to measure entropy production [6].Moreover, we are reporting a simple example rather than a general theory, and we leave for future works a more in-depth analysis of this preliminary -and peculiar -observation.
Dashed lines in Fig. 7B represent the environment entropy production due to the internal transitions.It can be seen that both its average and its minimum value increase when α increases at fixed T .Eventually it approaches the stationary value at all times for very fast drivings.A thermodynamic argument can justify this result, since adiabatic (slow ) protocols, in general, can attain lower level of dissipation in the surroundings.However, such a consistency between thermodynamics and our results serves as a further endorsement of the framework here introduced.
We introduce four measures to quantify this phenomenology, and to study the system as a function of frequency of r(t): Eq. ( 31) quantifies the temporal average of the entropy production due to the resetting mechanism over one period T .In Fig. 8A we show that it is always negative, and approaches zero for large α.This means that on average the system erases information.
Eq. ( 32) is the temporal average of the entropy production in the environment over one period, and, as reported in Fig. 8B, it increases with α, consistently with thermodynamics and our previous qualitative observation.An analogous behaviour is displayed by the minimum amount of dissipation in the surroundings, defined in Eq. ( 33), and shown in Fig. 8C.
As noticed above, the asymmetry between the positive maxima of Ṡreset increases with α up to a maximum value, and then goes back to 0 for very fast drivings (see Fig. 8D).
Putting together all these informations, we produce a qualitative graph in Fig. 8E.Here all the quantities have been normalized so to be seen on the same scale.It appears natural to identify a finite window of α in which the system exhibits high sensitivity to the variation of the resetting frequency.In fact, the slope of Ṡreset (t) T , Ṡ(R) env (t) T and Ṡ(R) env min is maximized in the this region, and it is also (roughly) centered around the maximum of ∆ Ṡreset T L ,T S .It is worth noting that this high sensitivity window contains mostly frequencies higher than the reference time-scale of the system, associated to the minimum average rate k min .However, we stress the fact that this study provides just a qualitative analysis of an example, and it does not aim at being exhaustive about the effect of time-periodic unidirectional links.It is true that a rich and complex phenomenology arises even for the simple system analyzed, and we believe that this topic deserves much attention and leaves several questions for future studies.

VI. CONCLUSIONS
In this work we have proposed a theoretical (and physically meaningful) argument to generalize the Schnakenberg's entropy production to cases in which unidirectional transitions are allowed.This kind of situation emerges when several different processes are in play to drive the system out of equilibrium, and it is also relevant for various physical and biological applications.
The solution we have adopted has the advantage of preserving the dynamics of the system at all times, and it can also be derived from a trajectory-based approach.Moreover, it provides a direct procedure to deal with the presence of unidirectional transitions.
We have studied the peculiar case in which unidirectional cycles are present, deriving that, from a thermodynamic perspective, they behave like pseudo-deterministic systems.
Within our framework, we have studied the resetting problem, which is one of the most prominent applications in which unidirectional transitions are involved.We have shown that previous results in this context can thus be recovered in a broader perspective.Moreover, we have generalized the analysis to time-periodic resetting, finding that the system can switch between an eraser-like and a writer-like behaviour.Moreover, our framework is consistent with the fact that the faster is the driving, the higher is the entropy production in the environment.On top of this, fast drivings lead to a signature of the arrow of time in the resetting entropy production, an observation which can be a starting point for future investigations.
The presented framework can be nevertheless applied to several different situations, from population dynamics to biological modelizations, leaving a wide panorama of possibilities for further applications.

4 A
FIG.3: A) A simple network with four nodes and two unidirectional transitions (shown in red) is considered as an example.B) The dynamics of the system in (A) is compared with the dynamics of the equivalent network where each unidirectional link has been mapped into two bidirectional links, as explained in Fig.2.The equivalence is valid for any choice of the parameters.In the figure we set: w1→2 = w2→3 = w4→3 = w3→1 = 2, w2→4 = 3, all the others equal to unity, and the initial state pi(0) = 0.25 for i = {1, 2, 3, 4}.C) The dashed blue line is the system entropy production as a function of time, which goes to zero as the system approaches stationarity.The green dashed line is the evironment entropy production only due to the bidirectional links ( Ṡ(R) env ).The solid red lines represent the enviornment entropy production associated only to the unidirectional links modified as in (the last term of) Eq. (11), introducing equivalent bidirectional links for each unidirectional link, as shown in 2. The color becomes darker as w b increases, up to a limiting curve (red dashed line) corresponding to the last term in Eq. (12), generalized to the case of two unidirectional links (see Eq. (13)).For sake of simplicity we used just one w b , equal for both the unidirectional links.D) The derivative of the environment entropy production is shown, highlighting that it approaches zero as w b increases.

FIG. 5 :
FIG.5: A) Three nodes labelled by 1, 2, and 3 are connected by unidirectional links.B) A system equivalent to A is shown where the unidirectional links are replaced by bidirectional links with the transition rates w f 's and w b as discussed in Eq. (9).Moreover, the nodes 1, 2, and 3 are connected to systems whose transition rates satisfy detailed balance (DB).

FIG. 7 :
FIG.7: A) Three-state system with resetting from each state to 1 at a time dependent rate r(t) = 2r0 cos 2 (2πωt).We set k + = 40, so that r0 = 20.579 . . .from the solution of Eq. (30).Here, ωc = kmin/2 ≡ 1/2.B) Solid curves indicate the resetting entropy production as a function of the rescaled time T = t/T , where t is inizialized to 0 when the system reaches its time-periodic state.Dashed curves represent the environment entropy production.Different colors indicate different values of α = as reported.The between writer-like and eraser-like behaviour (the faster is ω, the faster is the switching).As α increases, the minimum of Ṡ(R) env increases and the profile of the curve becomes flatter, until being constant for very fast driving.On the other hand, in Ṡreset, an increase in the frequency corresponds to an higher asymmetry between the two positive maxima.The small one is indicated by a blue dot and a blue line, while large maximum by a red dot and a red line, on the curve corresponding to α = 1.Note that the small minimum appears before the large in each period, i.e., TS < TL.Further increasing α such an asymmetry starts decreasing, and eventually Ṡreset approaches zero at all times for very fast drivings, since r(t) can be approximated to its average r0.