# A large deviation perspective on ratio observables in reset processes:
robustness of rate functions

Francesco Coghi<EMAIL_ADDRESS>School of Mathematical Sciences, Queen
Mary University of London, London E1 4NS, UK  Rosemary J. Harris  School of
Mathematical Sciences, Queen Mary University of London, London E1 4NS, UK

###### Abstract

We study large deviations of a ratio observable in discrete-time reset
processes. The ratio takes the form of a current divided by the number of
reset steps and as such it is not extensive in time. A large deviation rate
function can be derived for this observable via contraction from the joint
probability density function of current and number of reset steps. The ratio
rate function is differentiable and we argue that its qualitative shape is
‘robust’, i.e. it is generic for reset processes regardless of whether they
have short- or long-range correlations. We discuss similarities and
differences with the rate function of the efficiency in stochastic
thermodynamics.

Large deviations and Reset processes and Contraction principle

##  I Introduction

Stochastic reset processes have the property of being re-initialised at random
times to a specific initial condition, which can be a particular probability
distribution, or a fixed state. Although their natural framework is the
mathematical language of renewal theory, see grimmett2001probability ;
feller2008introduction , in the last decade reset processes have also been
widely studied in the statistical physics community. They have been used to
model the population dynamics after catastrophic events
brockwell1985extinction ; kyriakidis1994stationary ; di2003m , the dynamics of
queues glynn1994large ; di2003m , the path of a transport protein moving on a
cytoskeleton filament meylahn2015biofilament ; meylahn2015large , and also the
foraging of animals in nature benichou2011intermittent . Clearly, different
observables are of interest in various real world scenarios, for instance,
mean first passage times in search strategies for animal foraging
evans2011diffusion , or additive functionals of time (e.g. position or
current) in cellular transport proteins. Reset applications are not only
restricted to classical environments, but can also be extended to quantum
mechanical systems gherardini2016stochastic ; mukherjee2018quantum ;
rose2018spectral .

In this paper, we focus attention on a different class of observables: ratios
between addictive functionals of time. In finance, for example, one can
calculate the Sharpe ratio, which gives a good estimate of the excess expected
return of an investment given its volatility lo2002statistics . In stochastic
thermodynamics, physicists have recently studied thermodynamic/kinetic
uncertainty relations, which give bounds for a type of ratio observable
harris2019thermodynamic ; di2018kinetic ; barato2018unifying . In the same
field, there are studies of fluctuations of the efficiency, defined as the
ratio between the output work and the input heat, of small-scale engines
working in an energetically unstable environment verley2014unlikely ;
verley2014universal ; gingrich2014efficiency ; proesmans2015stochastic ;
polettini2015efficiency ; vroylandt2019efficiency . The latter is relevant in
biology, where understanding the efficiency of molecular motors
julicher1997modeling , e.g. myosin heads moving on actin filaments
kitamura1999single ; cyranoski2000swimming , is important in medical
applications. Ratios also appear in probability theory, for example
representing maximum likelihood estimators for Ornstein-Uhlenbeck processes
with and without shift bercu2002sharp ; bercu2015large .

Of particular significance for the present work, it is argued in stochastic
thermodynamics verley2014unlikely ; verley2014universal  that the fluctuating
efficiency can be described by a universal large deviation rate function
shape, characterised by having a maximum (as well as the usual minimum) and
tails tending to a horizontal asymptote. These intriguing features have
attracted considerable recent attention with physical explanations proposed
for their appearance verley2014unlikely ; verley2014universal ;
gingrich2014efficiency . Understanding both typical efficiency values,
attained in the long-time limit, and fluctuations, arising in finite time, is
important for predicting the performance of nano-motors, which can now be
realised experimentally martinez2016brownian . Beyond this practical example,
uncovering the general features of ratio quantities contributes to building
the theoretical framework of non-equilibrium statistical mechanics where
dynamical fluctuations, studied by means of large deviation theory, play a
crucial role. In this spirit, we present here a rigorous analysis of ratio
observables associated to a particular class of stochastic processes: although
such ratios are not true efficiencies, they share many features, e.g. the tail
shape, and thus help to elucidate the underlying mathematical structure.

We now outline the concrete details of our approach. In this paper we study
the ratio of the integrated current and the number of resets in a discrete-
time reset process, aiming to understand its probability measure in the
exponential scaling limit by means of large deviation theory. We prove that a
large deviation principle is valid for this quantity by means of a contraction
principle allowing us to transfer, under a continuous mapping, the large
deviation principle that holds for the joint observable $($current, number of
reset steps$)$ to the ratio observable. We then investigate the form of the
obtained large deviation rate function in several situations, and we notice in
all cases that, although tails are always bounded from above by a horizontal
asymptote, the characteristic fluctuating efficiency maximum
verley2014unlikely ; verley2014universal ; gingrich2014efficiency  is not
present. Indeed, while the asymptotic shape is a notable property of ratio
observables, which often present heavy tails and lack of exponential tightness
in their distributions, the maximum can be thought as a geometric consequence
of having both positive and negative fluctuations in the denominator. The main
result we find relates to the ‘robustness’ of the large deviation ratio rate
function. We argue that the qualitative shape of the rate function is generic
for reset processes whether they have short- or long-range correlations. In
particular, we show that the rate function is differentiable. In contrast, we
prove (calculation in the appendix) that when the reset nature of the process
is lost, i.e. the numerator of the ratio observable is independent from the
denominator, a ‘mode-switching’ phase transition in the fluctuations of the
ratio appears, and the rate function is not differentiable.

##  II Models and methods

###  II.1 Model framework

The reset process we consider has the property of being returned at random
times to a certain initial condition represented by a ‘fixed’ internal state.
For our purposes, it suffices to think of a discrete-time random walk with
hopping probabilities that depend on the time since reset. Here, the reset can
be thought as restarting a clock variable which controls the dynamics.

In describing our models we find it useful to split the reset process into two
layers. The bottom layer is a discrete-time stochastic process
$\mathbf{X}_{n}=\left(X_{1},X_{2},...,X_{n}\right)$ composed of $n$ Bernoulli
random variables of parameter $r$, i.e. with probability $r$, $X_{i}=1$
(corresponding to a reset at the $i$-th time step), otherwise $X_{i}=0$ (no
reset). The top layer is a discrete-time (but continuous-space) random walk
$\mathbf{Y}_{n}=\left(Y_{1},Y_{2},...,Y_{n}\right)$, taking a jump, at the
$i$-th time step, $Y_{i}$ according to a certain probability function
depending in general on the time since the last reset. For definiteness, we
think of periodic boundary conditions since we are chiefly interested in the
net movement of the random walker rather than its position. We refer to the
bottom layer as the on-off process, and to the top layer as the random walk.
The reset nature of the process arises from the restarting of the internal
clock (happening when $X_{i}=1$), re-initialising the dynamical rules for the
movement of the random walk in the top layer.

In this framework the observables we study are: the empirical number of reset
steps, the empirical current, and their ratio. They read respectively

$\displaystyle N_{n}$ $\displaystyle=\sum_{i=1}^{n}X_{i},$ (1) $\displaystyle
J_{n}$ $\displaystyle=\sum_{i=1}^{n}Y_{i},$ (2) $\displaystyle\Omega_{n}$
$\displaystyle=\frac{J_{n}}{N_{n}}.$ (3)

We focus on the long-time behaviour of these observables, with the aim of
studying the exponential scaling of the ratio probability density function.
The intensive (rescaled) observables are: $N_{n}/n\coloneqq\eta\in
D\triangleq[0,1]$, $J_{n}/n\coloneqq j\in\mathbb{R}$, and
$\Omega_{n}\coloneqq\omega\in\mathbb{R}$. Note that $N_{n}$, the denominator
of $\Omega_{n}$, can take only positive values with $0$ included. The possible
divergence in the ratio will be important later when considering the validity
of the so-called contraction principle.

The reset character arises from the correlations between $N_{n}$ and $J_{n}$
which come from two sources. Firstly, we typically enforce $Y_{i}=0$ when
$X_{i}=1$ (corresponding to freezing of the current during reset in the spirit
of harris2017phase ). Secondly, we allow the possibility that the distribution
of $Y_{i}$ when $X_{i}=0$ depends on the time elapsed since the last reset
(i.e. the internal clock time). It is the presence of these correlations that
makes our study of reset processes a difficult, and interesting, task. To gain
some initial intuition and to demonstrate the mathematical techniques we first
introduce two minimal models where correlations are minimised. Later we will
consider models with both types of correlations discussed above, as well as
those where the on-off process is itself correlated.

The first minimal model, called $M_{1}$, does not present any of these
correlations, i.e. it is characterised by having completely uncorrelated
layers. To be more specific, regardless of what happens in the bottom layer,
the random walk in the top layer takes a jump at time step $i$ according to a
Gaussian distribution of mean $\mu$ and variance $\sigma^{2}=2$. The second
minimal model, called $M_{2}$, presents the first kind of correlations
introduced above; it is a type of ‘lazy’ random walk as in harris2017phase .
In contrast to $M_{1}$, now the top layer is coupled with the bottom one – the
random walk takes a jump at the $i$-th time step only if a reset does not
happen in the other layer ($X_{i}=0$), according to the Gaussian probability
density function introduced above.

###  II.2 Large deviation principles for the empirical means

A large deviation principle (LDP) holds for a particular (continuous)
observable $A_{n}$ associated to a stochastic process if

$\lim_{n\rightarrow\infty}\frac{1}{n}\ln\mathbb{P}\left(\frac{A_{n}}{n}\in[a,a+da]\right)=I(a),$
(4)

where $I\in[0,\infty)$ is the so-called large deviation rate function. In our
convention $\mathbb{P}$ is a probability measure, whereas $P$ is a probability
density function, i.e. $\mathbb{P}(A_{n}/n\in[a,a+da])=P(a)da$. With a little
abuse of notation, the shorthand
$\mathbb{P}(A_{n}/n=a)\coloneqq\mathbb{P}(A_{n}/n\in[a,a+da])$ is used for
both continuous and discrete random variables throughout the paper. The
dominant exponential behaviour of the probability measure corresponds to
$\mathbb{P}\left(A_{n}/n=a\right)=e^{-nI(a)+o(n)}$ for large $n$. Usually, in
large deviation applications, this is written as:

$\mathbb{P}\left(\frac{A_{n}}{n}=a\right)\asymp e^{-nI(a)},$ (5)

where $\asymp$ represents asymptotic identity at logarithmic scale. The rate
function $I$ is continuous111In general $I$ is lower semi-continuous. This is
equivalent to saying that it has closed level sets $\left\\{a:I(a)\leq
c\right\\}$. See dembo2010large ; den2008large  for details. and its zeros
represent typical values attained by $A_{n}/n$ in the thermodynamic limit
$n\rightarrow\infty$, while its tails characterize how likely fluctuations are
to appear.

One straightforwardly has LDPs for the time-additive observables $N_{n}/n$ and
$J_{n}/n$ such that we can write the large deviation forms $P(\eta)\asymp
e^{-nI(\eta)}$, and $P(j)\asymp e^{-nI(j)}$. The traditional way to prove an
LDP for a general observable $A_{n}$ is to apply the Gärtner-Ellis theorem,
which makes use of a Legendre-Fenchel transform in order to calculate the rate
function

$I(a)=\sup_{s}\left(sa-\lambda(a)\right),$ (6)

from the scaled cumulant generating function (SCGF) defined as

$\lambda(s)=\lim_{n\rightarrow\infty}\frac{1}{n}\ln\mathbb{E}\left[e^{sA_{n}}\right].$
(7)

Note that this theorem requires that the SCGF exists and is
differentiable.222Under such conditions, since the SCGF $\lambda$ is convex
dembo2010large ; touchette2009large , the Gärtner-Ellis theorem ensures that
the rate function $I$ is a good rate function. This means that it has compact
level sets and the probability measure is exponentially tight. See
dembo2010large  for details.

For the models $M_{1}$ and $M_{2}$, introduced in Sect. II.1, the SCGFs
associated to $N_{n}/n$ and $J_{n}/n$ can be calculated straightforwardly. For
the on-off process they are

$\lambda_{M_{1}}(l)=\lambda_{M_{2}}(l)=\ln\left(re^{l}+(1-r)\right),$ (8)

whereas for the current process we have

$\lambda_{M_{1}}(k)=k^{2}+\mu k,$ (9)

and

$\lambda_{M_{2}}(k)=\ln\left(r+(1-r)e^{k^{2}+\mu k}\right).$ (10)

Notice that $\lambda_{M_{1}}(k)$ is the SCGF associated to a random walk with
no resets, and it often appears in the text. Throughout the manuscript we
consistently use $l$ for the conjugate variables to $N_{n}/n$ and $k$ for the
conjugate variable to $J_{n}/n$ to indicate implicitly the corresponding
random variable without complicating the notation. [A similar convention
applies for the arguments of rate functions.] All the functions introduced
above are differentiable in the interior of their domains, thus in principle
one can calculate the corresponding rate functions via the Gärtner-Ellis (6).
Analytically we can show for $M_{1}$ that
$I_{M_{1}}(\eta)=\eta\ln\eta+(1-\eta)\ln\left(1-\eta\right)-\eta\ln
r-\left(1-\eta\right)\ln\left(1-r\right)$, and
$I_{M_{1}}(j)=\left(j-\mu\right)^{2}/4$, whereas for $M_{2}$, although we have
$I_{M_{2}}(\eta)=I_{M_{1}}(\eta)$, $I_{M_{2}}(j)$ can only be calculated
numerically.

Making use of the Gärtner-Ellis theorem once again, it is also possible to
show that an LDP holds for the joint probability density function $P(\eta,j)$.
In order to do so, we need to find the SCGF $\lambda(l,k)$. For the model
$M_{1}$, since $\mathbf{Y}_{n}$ and $\mathbf{X}_{n}$ are independent processes

$\lambda_{M_{1}}(l,k)=\lambda_{M_{1}}(l)+\lambda_{M_{1}}(k)=\ln\left(re^{l}+(1-r)\right)+k^{2}+\mu
k.$ (11)

However, for $M_{2}$ more care is needed. We calculate the moment generating
function $G_{M_{2}}(l,k,n)$ directly using the definition of $G$ and
conditioning the process $\mathbf{Y}_{n}$ on $\mathbf{X}_{n}$,

$\begin{split}G_{M_{2}}(l,k,n)&=\mathbb{E}\left[e^{lN_{n}+kJ_{n}}\right]\\\
&=\sum_{\mathbf{x}_{n}}\int_{\mathbf{y}_{n}\in\mathbb{R}^{n}}d\mathbf{y}_{n}\bigg{(}\mathbb{P}(\mathbf{Y}_{n}=(y_{1},...,y_{n})|\mathbf{X}_{n}=(x_{1},...,x_{n}))\\\
&\;\;\;\;\;\times\mathbb{P}(\mathbf{X}_{n}=(x_{1},...,x_{n}))e^{l\sum_{i}x_{i}+k\sum_{i}y_{i}}\bigg{)}.\end{split}$
(12)

First we exploit the independence in both processes and then the fact that the
$X_{i}$s are identically distributed:

$\begin{split}G_{M_{2}}(l,k,n)&=\int_{\mathbf{y}_{n}\in\mathbb{R}^{n}}d\mathbf{y}_{n}\sum_{x_{i}\in\left\\{0,1\right\\}}\mathbb{P}(X_{i}=x_{i})e^{lx_{i}}\mathbb{P}(Y_{i}=y_{i}|X_{i}=x_{i})e^{ky_{i}}\\\
&=\int_{\mathbf{y}_{n}\in\mathbb{R}^{n}}d\mathbf{y}_{n}\left(re^{l}\delta(y_{i})e^{ky_{i}}+(1-r)\mathbb{P}(Y_{i}=y_{i}|X_{i}=0)e^{ky_{i}}\right)\\\
&=\prod_{i=1}^{n}\left(re^{l}+(1-r)\int_{y_{i}\in\mathbb{R}}dy_{i}\;P(y_{i}|X_{i}=0)e^{ky_{i}}\right)\\\
&=\left(re^{l}+(1-r)e^{\lambda_{M_{1}}(k)}\right)^{n}.\end{split}$ (13)

The rescaled limit of the logarithmic moment generating function is

$\lambda_{M_{2}}(l,k)=\lim_{n\rightarrow\infty}\frac{1}{n}\ln
G_{M_{2}}(l,k,n)=\ln\left(re^{l}+(1-r)e^{\lambda_{M_{1}}(k)}\right).$ (14)

Hence, both $\lambda_{M_{1}}(l,k)$ and $\lambda_{M_{2}}(l,k)$ exist and are
differentiable in the interior of their domains $D\times\mathbb{R}$. This is
sufficient to state that LDPs hold for the joint probability density functions
$P_{M_{1}}(\eta,j)$ and $P_{M_{2}}(\eta,j)$ with the associated rate functions
obtained through Legendre-Fenchel transform

$I(\eta,j)=\sup_{l,k}\left(\eta l+jk-\lambda(l,k)\right).$ (15)

In fact, for $M_{1}$ it suffices to recall that $\mathbf{Y}_{n}$ and
$\mathbf{X}_{n}$ are independent of each other, and this implies that
$I_{M_{1}}(\eta,j)=I_{M_{1}}(\eta)+I_{M_{1}}(j)$. In contrast, for $M_{2}$
correlations between the top and the bottom layers do not allow us to proceed
analytically and $I_{M_{2}}(\eta,j)$ can only be calculated numerically,
either parametrically, exploiting Legendre duality
$I_{M_{2}}(\lambda^{\prime}(l),\lambda^{\prime}(k))=\lambda^{\prime}(l)l+\lambda^{\prime}(k)k-\lambda(l,k)$,
or by direct implementation of the Legendre-Fenchel transform (15).333Since
$\lambda_{M_{2}}$ is differentiable these two methods give the same result.

###  II.3 Large deviation principle for the ratio

We now turn to the main topic of the paper, showing that an LDP holds also for
the extensive observable $n\Omega_{n}$ in the form

$\lim_{n\rightarrow\infty}\frac{1}{n}\ln\mathbb{P}\left(\Omega_{n}\in[\omega,\omega+d\omega]\right)=I(\omega).$
(16)

This follows by the contraction principle touchette2009large ; dembo2010large
from the LDP for the joint probability density function. The contraction
principle is a powerful general technique which shows that an LDP is conserved
under any continuous mapping, and here makes evident how the LDP for the ratio
derives as a restriction on the bigger state space of $(N_{n},J_{n})$. More
concretely the contraction principle emerges as a saddle-point approximation
on the LDP for the probability density function $P(\eta,j)$. As a consequence
an LDP holds also for the ratio with rate function

$I(\omega)=\inf_{\begin{subarray}{c}\eta\\\
j=\omega\eta\end{subarray}}I(\eta,j).$ (17)

A caveat here is that, in fact, our mapping $\omega=j/\eta$ is continuous
everywhere except at $\eta=0$; this has important consequences to which we
will return later.

For the rate functions $I_{M_{1}}(\omega)$ and $I_{M_{2}}(\omega)$ the
‘infimum’ in equation (17) involves transcendental equations, but we report in
Fig. 1 the rate functions calculated numerically.

(a) Model $M_{1}$ (b) Model $M_{2}$

Figure 1: Ratio rate function $I(\omega)$ calculated by contraction for (a)
model $M_{1}$ and (b) model $M_{2}$. Curves for $\mu=-2$ (blue), $\mu=-1$
(orange), $\mu=0$ (green), $\mu=1$ (red), and $\mu=2$ (purple).

Note, as expected, that: (i) there is a unique zero representing the typical
value taken by the ratio observable in the long-time (thermodynamic) limit
$n\rightarrow\infty$, which is easily calculated as
$\hat{\omega}_{M_{1}}=\mu/r$ for the case of completely uncorrelated layers
and $\hat{\omega}_{M_{2}}=(1-r)\mu/r$ for the correlated model, where the
random walk in the top layer only hops on average for a fraction $1-r$ of
steps; (ii) the fluctuations, represented by the non-zero values of the rate
functions, are obviously not symmetric for $\mu\neq 0$; and (iii) the curves
look smooth. [This last point is investigated in detail in Sect. III.]

A more unusual feature of the ratio rate functions is the presence of
horizontal asymptotes and the associated non-convexity.444This means that the
rate function is a weak (not-good) rate function with level sets that are
closed, but not compact dembo2010large ; den2008large . Such a weak rate
function is a necessary and sufficient condition for the probability density
function not being exponentially tight. In fact, the horizontal asymptotes
correspond to the limit $\eta\rightarrow 0^{+}$, where the mapping is not
continuous. Here rare events are realised by heavy tails which mask the linear
exponential scaling of the ratio observable. Furthermore, we can
straightforwardly obtain the position of the asymptotes through the argument
that large deviations are realised in the least unlikely amongst all the
unlikely ways den2008large . In the case $\mu>0$ such analysis shows that
values of the rate function for $\omega\rightarrow\infty$ are given by the
probability of a typical current $J_{n}=\hat{j}$ and $N_{n}\rightarrow 0^{+}$,
rather than $J_{n}\rightarrow\infty$ and $N_{n}$ finite and non-zero.
Similarly, in the case we look at $\omega\rightarrow-\infty$, the rate
function is given by the probability of $J_{n}\rightarrow 0^{-}$ and
$N_{n}\rightarrow 0^{+}$, rather than requiring $J_{n}\rightarrow-\infty$.
Hence, the asymptotes read (in the case $\mu>0$)

$\begin{split}I(\omega\rightarrow+\infty)&=I(\eta\rightarrow 0^{+}),\\\
I(\omega\rightarrow-\infty)&=I(\eta\rightarrow 0^{+})+I(j\rightarrow
0^{-}).\end{split}$ (18)

Evidently $I(\omega\rightarrow-\infty)>I(\omega\rightarrow+\infty)$,
corresponding to asymmetric fluctuations for $\mu>0$. A reflected argument
holds for $\mu<0$, whereas for $\mu=0$, due to the symmetry of the random
walk, asymptotes are equivalent and fluctuations are symmetric. Note also that
the non-convexity of the rate function is a feature that could not have been
obtained by means of the Gärtner-Ellis theorem and Legendre-Fenchel
transformation.

In closing this subsection, we remark that similar features have been observed
in other ratio observables in the field of stochastic thermodynamics. In the
work of Verley et al. verley2014unlikely , and following papers
verley2014universal ; gingrich2014efficiency ; proesmans2015stochastic ;
polettini2015efficiency , the object of study is the ratio between the output
work produced and the input heat absorbed in different systems representing
nano-machines operating in the presence of highly fluctuating energy fluxes.
In that case too the tails of the ratio rate function were found to tend to an
asymptotic value. Indeed, we can understand this asymptotic behaviour in the
rate function as a universal property of ratio observables when the
denominator can, in principle, approach $0$. For instance, one can simply
think of the ratio of two arbitrary Gaussian distributions marsaglia1965ratios
; hinkley1969ratio ; hinkley1970correction ; marsaglia2006ratios , which can
be proven to be always composed of a mixture of two terms: a Cauchy unimodal
distribution, and a bimodal distribution with heavy tails. Note that in this
example, and the thermodynamic efficiency associated with nano-engines, the
denominator in the ratio can have both positive _and negative_ fluctuations
which generically lead to the presence of a _maximum_ in the rate function. In
particular, this maximum marks a transition between a phase where fluctuations
are generated by atypical values in the numerator, and a phase where they are
generated by atypical values in the denominator. In contrast, in our case, the
denominator can have only positive fluctuations so no such maximum appears.

##  III Results

In this section we apply the previously-introduced methods to analyse how the
ratio observable behaves in some stochastic reset models.

###  III.1 Robustness and differentiability of ratio rate functions

So far we have seen that in toy models, e.g. $M_{1}$ and $M_{2}$, the ratio
rate function appears smooth (everywhere differentiable). We are interested in
understanding whether this is always the case even for genuine reset models
with correlations.

It is known that, at equilibrium, non-differentiable points in rate functions
are connected to phase transitions. For instance, the microcanonical entropy
of non-additive systems with long-range interactions, under mean-field-like
approximations, can present non-differentiable points chavanis2002phase ;
bouchet2005classification ; gross2004microcanonical ; hovhannisyan2017complete
, signalling microcanonical first-order transitions. Furthermore, the
appearance of cusps in SCGFs or in large deviation rate functions is also an
important topic in nonequilibrium physics and can be understood as the
appearance of dynamical phase transitions in the fluctuations. As one recent
example, a non-differentiable point in the Freidlin-Wentzell (low-noise limit)
large deviation rate function for the current of a driven diffusing particle
on a ring has been identified nyawo2016large ; proesmans2019large ;
mehl2008large . In a similar spirit, in the next sub-sections, we will examine
the smoothness of the ratio rate function for stochastic reset processes with
dynamical phase transitions in the fluctuations of observables $J_{n}$ and
$N_{n}$.

In order to check if a ratio rate function $I(\omega)$ is differentiable we
seek to find necessary and sufficient conditions for the appearance of non-
differentiable points. So far, many results are known regarding the regularity
of functions coming from a variational calculation such as that of equation
(17). In danskin1966theory , and later in hogan1973directional ;
danskin2012theory , sufficient conditions have been found such that
$I(\omega)=\inf_{\eta}\tilde{I}(\eta,\omega)$ is $C^{1}(\mathbb{R})$, where
$\tilde{I}(\eta,\omega)\coloneqq I(\eta,j=\omega\eta)$ is $C^{1}(O)$, with
$O\triangleq D\setminus\left\\{0\right\\}\times\mathbb{R}$.555Note that in the
original formulation of danskin1966theory  $\eta$ must be in a closed bounded
Euclidean space. To satisfy this condition we can always consider compact
subsets of $D\setminus\left\\{0\right\\}$. The conditions to meet are: first,
$\eta$ has to be minimized over a set that does not depend on $\omega$, and
second, related to the implicit function theorem, the minimizer function
$\eta(\omega)$, satisfying equation (17), has to be continuous and bijective.
In our case, the first condition always holds so negation of the second one,
meaning that the solution set of minimizers $\eta$ (for a particular $\omega$)
is not singleton, is necessary for the function $I(\omega)$ to present jumps
in its first derivative. We believe that for well-behaved $I(\eta,j)$ this
necessary condition becomes also sufficient; one exception is the case where
$I(\eta,0)$ itself has a non-singleton set of minima.

In practice, this means that determining whether $I(\omega)$ is differentiable
boils down to analysing

$\frac{\partial\tilde{I}(\eta,\omega)}{\partial\eta}=0.$ (19)

If for a particular $\omega^{*}$ this equation is verified for more than a
single value of $\eta\in\left(0,1\right]$, then a non-differentiable point
should appear at $I(\omega^{*})$. We will see in Appendix B an example where
this can be checked analytically. However, often an analytical form of
$\tilde{I}(\eta,\omega)$ is not available and in such cases we conduct a
numerical analysis, discretizing the domain of $\omega$ and plotting the locus
of minimizing points $(\eta,\eta\omega)$ of equation (17) on the joint rate
function $I(\eta,j)$. In general, if the set of minimizers $\eta$ is not
always singleton, the locus $(\eta,\eta\omega)$ on $I(\eta,j)$ presents a
linear section of values $\eta$ satisfying the minimization condition, and
therefore $I(\omega)\notin C^{1}(\mathbb{R})$. Such a feature is seen in the
analytical example of Appendix B and is related to the appearance of a ‘mode-
switching’ dynamical phase transition in the generation of fluctuations; it is
useful to compare Fig. 7b showing the phase transition with Figs. 2b and 5b of
the main text where no such transition is present.

As well as smoothness of the ratio rate function we are interested in whether
it retains its general shape under the addition of interactions in genuine
reset processes. Loosely speaking, we will use the term ‘robust’ for the case
where the qualitative shape retains the salient features discussed in Sect.
II.3. This is reminiscent of the concept of ‘universality’ in other areas of
statistical physics.

###  III.2 Finite-time correlations

Our analysis begins with the model of harris2017phase . In this model, the
combination of reset and finite-time correlations in the random walk generates
dynamical phase transitions (DPTs) in the observable $J_{n}$. These are
distinguished by the analyticity of the SCGF: for first-order DPTs the SCGF is
not differentiable, whereas for continuous DPTs it is. Here, DPTs are
interpreted as transitions between fluctuations that involve resets and
fluctuations that do not. The Legendre-Fenchel transform can be applied to the
differentiable branches of the SCGF, and, as a consequence, the rate function
so obtained will present a gap for the set of values for which the derivative
of the SCGF does not exist. It is customary in statistical mechanics to extend
the region over which the Legendre-Fenchel transform is defined by a Maxwell
construction, i.e. by drawing a linear section connecting the two branches of
the rate function. In general, the function so derived is the convex-hull of
the true rate function, but for finite-time correlations, because of
subadditivity, it is known to be exactly the true rate function. In
harris2017phase  the linear sections appearing in the current rate functions
correspond to mixed regimes where typical trajectories switch between periods
with resets and periods with no resets. In the following, we want to
understand how these DPTs influence the ratio observable $\Omega_{n}$.

####  III.2.1 Model $M_{a}$

As in $M_{1}$ and $M_{2}$ the bottom layer is a discrete-time stochastic
process $\mathbf{X}_{n}=\left(X_{1},X_{2},...,X_{n}\right)$ composed of $n$
Bernoulli random variables of parameter $r$, and the top layer is a discrete-
time (but continuous-space) random walk
$\mathbf{Y}_{n}=\left(Y_{1},Y_{2},...,Y_{n}\right)$. At time step $l$ after a
reset, the random walk takes a jump according to an $l$-dependent Gaussian
density function with mean $\mu$ and variance $\sigma^{2}=2(1-B/(l+d))$, a
function of parameters $d$ and $0<B\leq d+1$. If time goes on, and reset
events do not happen, the variance of the Gaussian distribution increases
monotonically towards the asymptote $\sigma^{2}=2$ as $l\rightarrow\infty$. In
this model we focus on the long-time behaviour of the observables introduced
in Sect. II.1: $N_{n}$, $J_{n}$, and the ratio $\Omega_{n}$. As $J_{n}$ is
correlated with $N_{n}$, this leads naturally to short range correlations, and
although DPTs are not present in $N_{n}$, they are in $J_{n}$.

####  III.2.2 Joint scaled cumulant generating function

In order to derive the function $I_{M_{a}}(\omega)$, characterising the
exponential scaling of $\Omega_{n}$, we first need to derive the joint rate
function $I_{M_{a}}(\eta,j)$, which can be done by applying the standard
procedure of Sect. II for LDPs of empirical means. It is difficult to
calculate the SCGF $\lambda_{M_{a}}(l,k)$ directly from the definition
$\lim_{n\rightarrow\infty}(1/n)\ln\mathbb{E}\left[e^{lN_{n}+kJ_{n}}\right]$,
as there is no factorization property. For this reason we rely on a different
technique originally applied to study the free-energy of long linear chain
molecules lifson1964partition , such as DNA poland1966occurrence , and more
recently used in the context of continuous-time meylahn2015large  and
discrete-time reset processes harris2017phase . The strategy is to rewrite the
moment generating function $G_{M_{a}}^{r}(l,k,n)$ as a convolution of
independent ‘microscopic’ contributions and then to take its discrete Laplace
transform (or $z$-transform) $\tilde{G}_{M_{a}}^{r}(l,k,z)$. This method is
tantamount to working in the grand-canonical ensemble in time, where $z$
represents the fugacity, and allows us to relax the constraint we would have
on summing over paths of a certain length when calculating the moment
generating function directly. The SCGF $\lambda_{M_{a}}(l,k)$ is then obtained
as the natural logarithm of the radius of convergence $z^{*}(l,k)$ of
$\tilde{G}_{M_{a}}^{r}(l,k,z)$.

In our set-up the microscopic moment generating function for a sequence of
$n-1$ non-reset steps (along with $n-1$ random walk jumps) followed by one
reset step is 666One can also define two different microscopic generating
functions for sequences characterised by only non-reset steps and only reset
steps. As in harris2017phase , this approach is particularly useful when the
probability of reset does not depend on the time elapsed since last reset.
However, our generating function (20), built on the more general framework of
renewal theory, allows the consideration of different scenarios in the on-off
process harris2019thermodynamic .

$W(l,k,n)=\mathbb{E}\left[e^{lN_{n}+kJ_{n}}\right]=re^{l}(1-r)^{n-1}e^{(n-1)\left(k^{2}+\mu
k\right)-Bk^{2}\left(H_{n-1+d}-H_{d}\right)},$ (20)

where $n\geq 1$ and $H_{n}=\sum_{k=1}^{n}1/k$ is the truncated harmonic
series. Note that we exclude microscopic sequences of zero length by enforcing
$W(l,k,0)=0$. The convolution of the microscopic moment generating functions
returns the generating function of the whole process. Notice that this
procedure assumes that the process always finishes with a reset step; this
assumption is expected to make no difference in the infinite-time limit, at
least in the case of finite moments in the distribution of inter-reset times.

We can now calculate the $z$-transform $\tilde{G}_{M_{a}}^{r}(l,k,z)$. First
we distribute the $n$ factors of $z^{-n}$ among the microscopic sequences and
then we change the order of summation over $n$ and $s$ as follows:

$\begin{split}\tilde{G}_{M_{a}}^{r}(l,k,z)&=\sum_{n=1}^{\infty}z^{-n}\sum_{s=1}^{n}\sum_{\left\\{i_{\sigma}\right\\}}\prod_{\sigma=1}^{s}W(l,k,i_{\sigma})\\\
&=\sum_{s=1}^{\infty}\sum_{n=s}^{\infty}\sum_{\left\\{i_{\sigma}\right\\}}\prod_{\sigma=1}^{s}W(l,k,i_{\sigma})z^{-i_{\sigma}}.\end{split}$
(21)

The $\sum_{\left\\{i_{\sigma}\right\\}}$ is interpreted as a sum over all
possible configurations of $s$ sequences of length
$\left\\{i_{1},i_{2},...,i_{s}\right\\}$ with the constraint that
$\sum_{\sigma}i_{\sigma}=n$. This restriction can be dropped when first
summing over all possible values of $s$, allowing us to carry out each sum
over $i_{\sigma}$ independently

$\begin{split}\tilde{G}_{M_{a}}^{r}(l,k,z)&=\sum_{s=1}^{\infty}\prod_{\sigma=1}^{s}\sum_{i_{\sigma}=1}^{\infty}W(l,k,i_{\sigma})z^{-i_{\sigma}}\\\
&=\frac{\tilde{W}(l,k,z)}{1-\tilde{W}(l,k,z)}.\end{split}$ (22)

In the last step a geometric series appears and
$\tilde{W}(l,k,z)\coloneqq\sum_{n=1}^{\infty}W(l,k,n)z^{-n}$ denotes the
$z$-transform of $W(l,k,n)$. Notice again that our choice of indexing excludes
zero-length trajectories; this affects only the ‘boundary’ term in the
numerator. We remark that $\tilde{W}(l,k,z)$ converges only if $z\geq
z_{c}(k)\coloneqq(1-r)e^{k^{2}+\mu k}$, where $\ln z_{c}$ corresponds to the
SCGF of an i.i.d. random walk in the non-reset limit.

As mentioned, the SCGF $\lambda_{M_{a}}(l,k)$ corresponds to the natural
logarithm of the largest real value $z^{*}(l,k)$ at which
$\tilde{G}_{M_{a}}^{r}(l,k,z)$ diverges. This can be identified with
$\hat{z}$, the largest real solution of the equation $\tilde{W}(l,k,z)=1$,
when $\hat{z}\geq z_{c}$; otherwise we have directly $z^{*}=z_{c}$. The change
from convergent to divergent $\tilde{W}(l,k,z)$ corresponds to a phase
transition in the reset process, between a regime where current fluctuations
are optimally realised in the presence of reset events, and a regime where
current fluctuations are realised by trajectories with no reset events at all
harris2017phase ; richard2004poland . As discussed in the previous section, if
the obtained SCGF $\lambda_{M_{a}}(l,k)$ is differentiable, the joint large
deviation rate function $I_{M_{a}}(\eta,j)$ can be derived by Legendre-Fenchel
transform (15). 777It may turn out that $\lambda_{M_{a}}(l,k)$ has non-
differentiable points which mark first-order phase transitions; in this case
the Legendre duality does not hold everywhere in the domain
$D\times\mathbb{R}$ touchette2005legendre  restricting the validity of LDPs to
differentiable regions.

####  III.2.3 Ratio observable

By the contraction principle (17) on $I_{M_{a}}(\eta,j)$ we derive
$I_{M_{a}}(\omega)$, focusing on the asymmetric case $\mu\neq 0$. In Fig. 2a
we plot the ratio rate functions for a random walk with $\mu=-1$, and varying
$B$. Notice that the left tails all coincide, indeed such fluctuations are
obtained taking $\eta\rightarrow 0^{+}$, regardless of the current, which
stays in its typical state $\hat{j}=(1-r)\mu$ for any
$\omega\leq\hat{\omega}_{M_{a}}=(1-r)\mu/r$. For any value of the parameters
$\mu$ and $B$, the rate functions $I_{M_{a}}(\omega)$ in Fig. 2a look robust,
i.e. the qualitative features are unchanged under the appearance of DPTs in
the fluctuations of the current $J_{n}$, generated by finite-time
correlations.

(a) Ratio rate functions $I_{M_{a}}(\omega)$

(b) Locus of minimizers from contraction

Figure 2: (a) Ratio rate function $I_{M_{a}}(\omega)$ for $B=0.5,1.0,2.5,4.0$
(from bottom to top). (b) Locus of minimizers $(\eta,\omega\eta)$ satisfying
the contraction principle (17) for $\omega\in[-20,20]$ and $B=2.5$ depicted on
the surface of the joint rate function $I(\eta,j)$. Numerics for $\mu=-1$,
$r=0.25$, and $d=10$.

$I_{M_{a}}(\omega)$ also looks differentiable. As argued in Sect. III.1, this
can be investigated looking at the locus of minimizers $(\eta,\eta\omega)$,
satisfying equation (17), on the joint rate function. We note that only the
presence of first-order DPTs in the process is translated into the appearance
of linear regions in $I_{M_{a}}(\eta,j)$, and only these could in principle
influence the fluctuations of the observable $\Omega_{n}$. On increasing the
parameter $B$ these linear regions extend and get closer to the bottom of the
joint rate function, where contraction minimizers $(\eta,\eta\omega)$ lie.
However, this does not affect the variational calculation much. We report in
Fig. 2b example minimizers $(\eta,\eta\omega)$ for the case $B=2.5$. It is
evident that the locus of minimizing points is a curve which stays close to
the minimum of $I_{M_{a}}(\eta,j)$ where linear sections from first-order DPTs
extend only in pathological cases (e.g. $r\rightarrow 1$, $d\rightarrow\infty$
and $B=O(d)$).

In order to gain more general understanding about the robustness and
differentiability of the ratio rate function when finite-time correlations
generate DPTs, we also investigated a rather unphysical model (denoted by
$M_{a1}$) characterised by having a first-order DPT in the on-off process in
the bottom layer uncoupled from the random walk in the top layer. The joint
SCGF in this case is artificially constructed and is
$\lambda_{M_{a1}}(l,k)=\lambda_{M_{a1}}(l)+\lambda_{M_{a1}}(k)$, with

$\begin{split}\lambda_{M_{a1}}(l)&=\begin{cases}-\frac{1}{16}&\text{if}\;\;l\leq-\frac{1}{4}\\\
l^{2}+\frac{l}{2}&\text{if}\;\;l\in[-\frac{1}{4},b]\\\
l+b^{2}-\frac{b}{2}&\text{if}\;\;l\geq b,\end{cases}\\\
\lambda_{M_{a1}}(k)&=k^{2}+\mu k.\end{split}$ (23)

Here $0\leq b\leq 1/4$ is a parameter which allows us to move the first-order
DPT. Calculating analytically the rate function $I_{M_{a1}}(\eta)$ we see that
for small but finite $b$ the linear section extends close to the minimum
without actually reaching it. We see that in this case the ratio rate function
$I_{M_{a1}}(\omega)$ is robust and presents a unique typical state. The
limiting case $b=0$ is pathological in the sense that $I_{M_{a1}}(\eta)$ has a
flat section at zero leading to a corresponding flat section in
$I_{M_{a1}}(\omega)$. However, even here the ratio rate function is
differentiable.

####  III.2.4 Numerical checks

In deriving the SCGF as the natural logarithm of the convergence radius
$z^{*}(l,k)$, we assume that any non-analyticities in pre-factors in the
moment generating function $G_{M_{a}}^{r}(l,k,n)$ do not affect its
exponential behaviour in the limit $n\rightarrow\infty$. 888As shown in
gupta2017stochastic , when calculating a joint probability density function by
means of a Bromwich integral, non-analyticities in the characteristic function
can create a singularity contour that is crossed by the saddle-point path. In
such a case one should consider both contributions (saddle and branch-cut) in
the calculation of the Bromwich integral. To show that such pre-factors do not
play a role here, we make use of an inverse numerical $z$-transform of
$\tilde{G}_{M_{a}}^{r}(l,k,z)$ to check that the directly calculated moment
generating function $G_{M_{a}}^{r}(l,k,n)$ approaches $z^{*}(l,k)$ smoothly in
the limit $n\rightarrow\infty$.

The inverse $z$-transform of $\tilde{G}_{M_{a}}^{r}(l,k,z)$ is defined as

$G_{M_{a}}^{r}(l,k,n)\coloneqq\frac{1}{2\pi
i}\oint_{\mathcal{C}}\tilde{G}_{M_{a}}^{r}(l,k,z)z^{n-1}dz.$ (24)

However, numerical integration may lead to inaccurate results and hence we
make use of two other techniques as explained in merrikh2014two : the first
method is algebraic, based on truncating the $z$-transform, the second method
relies instead on a discrete Fourier transform. We refer to Appendix A for
further details on the methods.

In Fig. 3 we compare the SCGF $\lambda_{M_{a}}^{r}(l,k)$ calculated as the
natural logarithm of the convergence radius of $\tilde{G}_{M_{a}}^{r}(l,k,z)$
with the rescaled natural logarithm of the approximated moment generating
function $G_{r}(l,k,n)$ obtained using the methods explained above, for cases
and with and without a first-order DPT. As computation becomes daunting quite
fast, we report the comparison only for a subset of the domain of
$\lambda_{M_{a}}(l,k)$. In both cases there is a very good matching between
curves, suggesting that pre-factors in the moment generating function
$G_{M_{a}}^{r}(l,k,n)$ do not influence our study, and the obtained LDPs for
the joint observable $(N_{n},J_{n})$ are correct.

(a) $\mu=-1$, $r=0.25$, $B=0.5$, $d=10$ (b) $\mu=-1$, $r=0.25$, $B=2.5$,
$d=10$

Figure 3: Comparison of SCGFs obtained as $\ln z^{*}(l,k)$ and through inverse
$z$-transforms using the algebraic method (Alg), and the inverse Fourier
transform (Inv. Fourier); (a) differentiable SCGF, (b) SCGF non-differentiable
at $k\simeq 1.25$. Curves are not distinguishable by eye.

###  III.3 Infinite-time correlations

In our models so far we have seen that short-range correlations, although they
may generate DPTs in fluctuations of the current or number of resets, do not
have much influence on the asymptotic fluctuations of the observable
$\Omega_{n}$, whose rate function is robust and stays differentiable. Now we
extend the analysis to long-range correlations. We present here a model where
infinite-time correlations appear in the bottom layer, representing the on-off
process, and extend to the coupled random walk in the top one. In Appendix B
we consider a similar artificial model where we remove the coupling between
the two layers, allowing us to carry out some analytical calculations and make
an illuminating comparison.

####  III.3.1 Model $M_{b}$

Differently from the models $M_{1}$ and $M_{2}$ of Sect. II.1 and model
$M_{a}$ of Sect. III.2, here the bottom layer is composed of two discrete-time
stochastic processes glued together: $n$ Bernoulli random variables of
parameter $r$, $\mathbf{X}_{n}=\left(X_{1},X_{2},...,X_{n}\right)$, and a
‘stiff’ block of another $n$ variables
$\mathbf{X}_{n}^{\prime}=\left(X_{n+1},X_{n+2},...,X_{2n}\right)$ either all
$0$, or all $1$ with equal probability. Note that both the blocks are
extensive in time. In the top layer a discrete-time and continuous-space
random walk composed of $\mathbf{Y}_{n}=\left(Y_{1},Y_{2},...,Y_{n}\right)$
followed by $\mathbf{Y}_{n}^{\prime}=\left(Y_{n+1},...,Y_{2n}\right)$ is
coupled with the bottom process. If $X_{i}=0$ the random walk takes a jump of
non-zero length according to a Gaussian density function of mean $\mu$ and
variance $\sigma^{2}=2$; on the other hand when reset occurs $X_{i}=1$ and
$Y_{i}=0$. Besides the label $M_{b}$, we propose the name of two-block reset
model to refer to this stochastic reset process. Indeed, the bottom on-off
process is similar in spirit to the so-called two-block spin model introduced
in touchette2008simple ; the first block of steps $\mathbf{X}_{n}$ plays the
role of a classical paramagnet, whereas the second half
$\mathbf{X}_{n}^{\prime}$ is analogous to a ferromagnet and brings infinite-
time correlations both in the bottom layer and, as a consequence of the
coupling, in the top one.

If the Bernoulli parameter is $r=1/2$, our model is directly equivalent to the
two-block spin model in touchette2008simple , where reset steps correspond to
up spins and non-reset steps correspond to down spins. In this case, we can
obtain the large deviation rate function
$I_{M_{b}}^{1/2}(\eta)=-\lim_{n\rightarrow\infty}1/(2n)\mathbb{P}(N_{2n}/(2n)=\eta)$
by following the derivation in touchette2008simple . Specifically, we map the
energy per spin $u$ into the mean number of reset steps $\eta$ according to
$\eta=1+u/2$ and, as in touchette2009large , reflect and translate the
microcanonical entropy $s(u)$ by $(1/2)\ln|\Lambda|$, where $|\Lambda|=2$ is
the state-space cardinality of the Bernoulli random variables. This leads to

$\begin{split}I_{M_{b}}^{1/2}(\eta)&=\frac{\ln 2}{2}-s(\eta)\\\
&=\begin{cases}\frac{\ln 2}{2}&\eta=0\\\ \frac{\ln
2}{2}-\frac{2\eta-1}{2}\ln\left(1-2\eta\right)+\eta\ln
2\eta&\eta\in(0,\frac{1}{2}]\\\ \frac{\ln
2}{2}-(\eta-1)\ln\left(2-2\eta\right)+\frac{2\eta-1}{2}\ln\left(2\eta-1\right)&\eta\in(\frac{1}{2},1],\\\
\end{cases}\end{split}$ (25)

which we plot in Fig. 4a along with its convex envelope. Notice that
$I_{M_{b}}^{1/2}(\eta)$ has two minima $\hat{\eta}_{1}=r/2$ and
$\hat{\eta}_{2}=(1+r)/2$, corresponding to the boundaries of the flat region
of zeros in its convex envelope. Although in the general case $r\neq 1/2$, the
microcanonical description breaks down, as microstates are no longer equally
likely, it is still possible to calculate the rate function $I_{M_{b}}(\eta)$
from a probabilistic point of view. The derivation begins with conditioning
$\mathbb{P}(N_{2n}=2n\eta)$ on the appearance of a block
$\left(X_{n+1},X_{n+2},...,X_{2n}\right)$ of either all reset steps or all
non-reset steps. This breaks the ergodicity, now either $\eta\in[0,1/2]$ or
$\eta\in(1/2,1]$, and everything boils down to calculating the probability
that in the first block $\left(X_{1},X_{2},...,X_{n}\right)$ there are either
$n(2\eta-1)$ or $2n\eta$ reset steps. The number of reset steps follows a
binomial distribution, thus making use of Stirling’s approximation we get

$I_{M_{b}}(\eta)=\begin{cases}-\frac{\ln(1-r)}{2}&\eta=0\\\
\frac{1-2\eta}{2}\left[\ln\left(1-2\eta\right)-\ln(1-r)\right]+\eta\left[\ln
2\eta-\ln r\right]&\eta\in(0,\frac{1}{2}]\\\
(1-\eta)\left[\ln\left(2-2\eta\right)-\ln(1-r)\right]+\frac{2\eta-1}{2}\left[\ln\left(2\eta-1\right)-\ln
r\right]&\eta\in(\frac{1}{2},1].\end{cases}$ (26)

Obviously, this recovers (25) in the case $r=1/2$. Furthermore, as expected,
$I_{M_{b}}(\eta)$ is a non-convex function, which is a consequence of long-
range correlations in the model. Indeed, similarly to touchette2008simple ,
adding an extensive block of steps which are either all reset or all non-
reset, makes the model a ‘switch’ between two different phases. Naturally,
since the top layer is coupled with the bottom one, the phase transition
appearing in the on-off process is inherited also by the random walk and this
is reflected in the joint large deviation structure. From the joint SCGF
$\lambda_{M_{b}}(l,k)$, calculated below, one obtains the current SCGF
$\lambda_{M_{b}}(k)=\lim_{n\rightarrow\infty}1/(2n)\ln\mathbb{E}\left[e^{2nkj}\right]$,
which reads

$\lambda_{M_{b}}(k)=\begin{cases}\frac{k^{2}+\mu
k}{2}+\frac{1}{2}\ln\left(r+(1-r)e^{k^{2}+\mu k}\right)&k^{2}+\mu k>0\\\
\frac{1}{2}\ln\left(r+(1-r)e^{k^{2}+\mu k}\right)&k^{2}+\mu k\leq
0.\end{cases}$ (27)

Since $\lambda_{M_{b}}(k)$ has non-differentiable points, the Legendre-Fenchel
transform only recovers the convex hull of the true current large deviation
rate function. In fact, here the transform can only be done numerically; we
show the result in Fig. 4b for two different values of the parameter $\mu$ and
$r=1/2$. It is easy to prove that, provided $\mu\neq 0$, there are two jump
discontinuities in the derivative of $\lambda_{M_{b}}(k)$. They arise at
$k^{*}_{1}=0$, and at $k^{*}_{2}=-\mu$, and are also evident in Fig. 4b where
$I_{M_{b}}(j)$ possesses linear sections with slope $k^{*}_{1}$ and
$k^{*}_{2}$. In particular we note that the flat section of zeros is bounded
by the typical values for the current $\hat{j}_{1}=(1-r)\mu/2$ and
$\hat{j}_{2}=(2-r)\mu/2$.

(a) Reset rate function

(b) Current rate functions $I_{M_{b}}(j)$

Figure 4: (a) Rate function $I_{M_{b}}^{1/2}(\eta)$ for the empirical mean
number of reset steps plotted with its convex envelope
$\text{Conv}(I_{M_{b}}^{1/2}(\eta))$. (b) Rate functions $I_{M_{b}}(j)$ for
the empirical mean current plotted for different values of $\mu$. DPTs are
marked with straight lines delimited by coloured dots. Plots obtained for
$r=0.5$.

Summing up, the main property of this model is the appearance of a DPT in the
bottom layer, where long-range correlations break the ergodicity causing the
system trajectories to be characterised by having either $\eta\in[0,1/2]$ or
$\eta\in(1/2,1]$. In our reset process, since the random walk in the top layer
is coupled with the on-off layer, the phase transition is inherited by the
random walk, provided that $\mu\neq 0$. [If the random walk is symmetric, it
will keep taking jumps of mean length $0$, and these do not bring any
extensive contribution to the observable $J_{2n}$, regardless of the phase
manifest in the bottom layer.] Below we consider how this behaviour is
reflected in the observable $\Omega_{2n}$.

####  III.3.2 Joint scaled cumulant generating function

We first calculate the moment generating function $G_{M_{b}}^{r}(l,k,2n)$ by
using its definition and introducing the auxiliary random variable
$S\sim\text{Bernoulli}(1/2)$ characterising the nature of the block
$\left(X_{n+1},X_{n+2},...,X_{2n}\right)$. This allows us to write the two
observables of interest as $N_{2n}=\sum_{i=1}^{n}X_{i}+nS$ and
$J_{2n}=\sum_{i=1}^{n}Y_{i}+(1-S)\sum_{i=1}^{n}Y_{n+i}$. The calculation
follows by recognising that we can split the whole expectation value into two
independent factors: one related to the process composed of Bernoulli random
variables $\mathbf{X}_{n}$ in the bottom layer, and one related to the ‘stiff’
bit $\mathbf{X}_{n}^{\prime}$. This yields

$\begin{split}G_{M_{b}}^{r}(l,k,2n)&=\mathbb{E}\left[e^{2n(lN_{2n}+kJ_{2n})}\right]\\\
&=\sum_{\mathbf{x}_{n}}\int_{\mathbf{y}_{n}\in\mathbb{R}^{n}}d\mathbf{y}_{n}\bigg{(}\mathbb{P}(\mathbf{Y}_{n}=\left(y_{1},...,y_{n}\right)|\mathbf{X}_{n}=\left(x_{1},...,x_{n}\right))\\\
&\;\;\;\;\;\times\mathbb{P}(\mathbf{X}_{n}=\left(x_{1},...,x_{n}\right))e^{l\sum_{i=1}^{n}x_{i}}e^{k\sum_{i=1}^{n}y_{i}}\bigg{)}\\\
&\;\;\;\;\;\times\sum_{s\in\left\\{0,1\right\\}}\int_{\mathbf{y}_{n}^{\prime}\in\mathbb{R}^{n}}d\mathbf{y}_{n}^{\prime}\bigg{(}\mathbb{P}(\mathbf{Y}_{n}^{\prime}=\left(y_{n+1},...,y_{2n}\right)|S=s)\\\
&\;\;\;\;\;\times\mathbb{P}(S=s)e^{nls}e^{(1-s)k\sum_{i=1}^{n}y_{n+i}}\bigg{)}\\\
&=\left(re^{l}+(1-r)e^{k^{2}+\mu
k}\right)^{n}\left(\frac{e^{ln}}{2}+\frac{1}{2}e^{n(k^{2}+\mu
k)}\right),\end{split}$ (28)

where in the last line we recall that the first integral has already been
calculated in Sect. II.2, whereas the second one can easily be done
recognising the i.i.d. property of the conditioned process
$\mathbf{Y}_{n}^{\prime}|\left\\{S=0\right\\}$.

The SCGF is obtained as follows:

$\begin{split}\lambda_{M_{b}}(l,k)&=\lim_{n\rightarrow\infty}\frac{1}{2n}\ln
G_{M_{b}}^{r}(l,k,2n)\\\ &=\frac{1}{2}\ln\left(re^{l}+(1-r)e^{k^{2}+\mu
k}\right)+\lim_{n\rightarrow\infty}\frac{1}{2n}\ln\left(e^{nl}(1+e^{n(k^{2}+\mu
k-l)})\right)\\\ &=\begin{cases*}\frac{k^{2}+\mu
k}{2}+\frac{1}{2}\ln\left(re^{l}+(1-r)e^{k^{2}+\mu k}\right)&if $k^{2}+\mu
k-l>0$\\\ \frac{l}{2}+\frac{1}{2}\ln\left(re^{l}+(1-r)e^{k^{2}+\mu
k}\right)&if $k^{2}+\mu k-l\leq 0$ .\end{cases*}\end{split}$ (29)

It is analytical everywhere except on the locus of points $k^{2}+\mu k-l=0$ in
$\mathbb{R}^{2}$. The Gärtner-Ellis theorem can be applied on the
differentiable regions, and the convex hull of the large deviation rate
function $I_{M_{b}}(\eta,j)$ can thus be obtained numerically through
Legendre-Fenchel transform. Notice here that the function $I_{M_{b}}(\eta,j)$,
as a consequence of Legendre-transforming, presents a flat region of zeros.

####  III.3.3 Ratio observable

Once again, the large deviation rate function $I_{M_{b}}(\omega)$ is obtained
contracting the joint rate function $I_{M_{b}}(\eta,j)$ using equation (17).
Consistent with the presence of a phase transition in the typical states of
the observables $N_{n}$ and $J_{n}$, we expect that the observable
$\Omega_{n}$ (for $\mu\neq 0$) has two typical states, also featuring an
ergodicity breaking. This is indeed the case, as we can see from Fig. 5a,
where for any curve obtained with $\mu\neq 0$ there is a flat region marking a
non-singleton set of zeros. The boundaries of this set are highlighted by
coloured dots which mark the two typical states
$\hat{\omega}_{1}=\hat{j}_{1}/\hat{\eta}_{2}=(1-r)\mu/(1+r)$ and
$\hat{\omega}_{2}=\hat{j}_{2}/\hat{\eta}_{1}=(2-r)\mu/r$ arising from the
ergodicity breaking in the on-off process in the bottom layer.

(a) Ratio rate functions $I_{M_{b}}(\omega)$

(b) Locus of minimizers from contraction ($\mu=-1$)

Figure 5: (a) Ratio rate function $I_{M_{b}}(\omega)$ plotted for $\mu=-1$
(blue), $\mu=-0.5$ (orange), $\mu=0$ (green), $\mu=0.5$ (red), and $\mu=1.0$
(purple). (b) Locus of minimizers $(\eta,\omega\eta)$ satisfying the
contraction principle in equation (17) for $\omega\in[-20,20]$ depicted on the
surface of the joint rate function $I(\eta,j)$. Numerics obtained for $r=0.5$.

As evident in Fig. 5b), the flat region in the ratio rate function corresponds
to a set of zeros appearing in the joint rate function $I_{M_{b}}(\eta,j)$
minimizing the variational equation (17) for
$\omega\in\left[\hat{\omega}_{1},\hat{\omega}_{2}\right]$. Notice that this
flat region of zeros does not represent a phase coexistence region where
fluctuations have a different scaling, as seen for instance in systems like
the 2D Ising model touchette2009large ; ellis1995overview , models of growing
clusters jack2019large , and critical constrained pinning models
zamparo2019large1 ; zamparo2019large2 ; it is just a consequence of
calculating the joint rate function $I_{M_{b}}(\eta,j)$ through Legendre-
Fenchel transform, which gives as output the convex hull of the real joint
rate function. To support this argument we compare the ratio rate function
$I_{M_{b}}(\mu)$ obtained for $\mu=-1$ with Monte Carlo simulations in Fig. 6.
Here we see that the simulations, which presumably converge to the true ratio
rate function as the trajectory length is increased, do not match with the
theoretical curve in the flat region. Instead, they highlight the two typical
states and suggests the same scaling of large deviations throughout the
domain, indicating once again that the flat part does not constitute a phase
coexistence region, but is just the convex hull of the true rate function in
that interval.

Figure 6: Ratio rate function $I(\omega)$ from theory (solid line) compared
with Monte Carlo simulations (symbols) for duration $n=125,500,1000,2000$
(from top to bottom). Samples of $2\times 10^{7}$ trajectories for each
simulation.

Although the ratio $\Omega_{n}$ has an ergodicity-breaking phase transition by
construction of the process, tails of the rate functions still seem to be
robust. Numerics suggest that the rate function is differentiable, which we
believe is a consequence of correlations between the on-off process in the
bottom layer and the random walk in the top layer. Indeed, the presence of
such correlations gives a curved shape to the joint rate function, and for
this reason the locus of minimizers satisfying equation (17) draws a curve
without linear sections on $I_{M_{b}}(\eta,j)$ (see Fig. 5b). In contrast,
model $M_{b1}$ in Appendix B has no correlations between the layers, and shows
the appearance of a non-differentiable point at $\omega^{*}=0$. A pre-cursor
of this non-differentiability can be seen in Fig. 5a where a rapid change of
slope happens close to $\omega=0$.

Finally, we argue that a flat region in the ratio rate function is manifest
generically when a phase transition generates a flat region of zeros (not
coincident with the $\eta$ axes) in the joint rate function. The phase
transition can be in the bottom layer, as seen here, or directly in the random
walk layer, or in both. We also investigated a reset process based on the
number of red balls extracted from a Eggenberg-Pólya urn model with two
initial balls: a red one, and a blue one mahmoud2008polya ;
feller2008introduction . In this process the resets are power-law correlated
but the ratio rate function is found to be qualitatively equivalent to that
shown here, and is not explicitly reported.

##  IV Conclusion

We have studied large deviation properties of a ratio observable in stochastic
reset processes. We focused on a class of discrete-time processes in which an
internal clock (controlled by an on-off process in the bottom layer) restarts
with some probability at each step, while a random walk (in the top layer of
the model) takes jumps according to a probability density function dependent
on the time since reset. In particular, we have shown via contraction, how to
derive a large deviation rate function for the ratio observable: current
divided by the number of reset steps. Significantly, the large deviation rate
function so obtained is non-convex and has tails bounded by horizontal
asymptotes, which can be derived analytically from fluctuation properties of
the empirical mean current and the empirical mean number of reset steps. We
regard the presence of these tails as a universal feature characterising
ratios of observables in cases where the denominator can be arbitrary close to
$0$. Technically this corresponds to the ratio rate function being weak, which
is a signature of the well-known fact that often ratio observables have heavy-
tailed distributions. In contrast to the large deviation rate function of the
efficiency studied in stochastic thermodynamics, our ratio rate function does
not have a maximum. Such a maximum corresponds to a phase transition in the
fluctuations of the efficiency and we assert that this is a consequence of
having a denominator that can take both positive and negative values, which
cannot happen in our case as the number of reset steps must be positive.

We argue that whenever the reset nature of the process is conserved, meaning
that the random walk in the top layer is coupled to the bottom on-off process,
the ratio large deviation rate function has the general properties described
above and is differentiable. We demonstrated this for two particular models
with dynamical phase transitions in the current and/or on-off processes. The
ratio rate function was found to be robust in the presence of such dynamical
phase transitions although, when long-range correlations are present, the
convex hull of the rate function has a flat region of zeros instead of a
single minimum. The boundaries of this interval represent the two typical
states of the ratio surviving in the thermodynamic limit and correspond to an
ergodicity breaking. Physically there is no phase coexistence here; the flat
section of the rate function is merely an artifact of the Legendre-Fenchel
transform.

Understanding general features of the ratio observable is potentially
important for many interdisciplinary applications, e.g. molecular and nano-
motors, where correlations may make it difficult to calculate the rate
function analytically. In the particular context of our work here, we note
that reset dynamics appear in run-and-tumble models (as used to describe
bacterial motility) and such processes can manifest a change of scaling
gradenigo2019first . It would be interesting to see if the ratio observable is
affected by this scaling change and similar kinds of phase transition
nickelsen2018anomalous  and, more generally, if one can obtain probabilistic
bounds on the rate function. Mathematically, there are also questions related
to the existence of a weak large deviation principle dembo2010large  when one
allows the number of reset steps to be zero. There is much scope for future
work, both theoretical and applied.

###### Acknowledgements.

The authors thank Hugo Touchette for carefully reading the manuscript. F.C. is
grateful to Giorgio Carugno and Jan Meibohm for interesting discussions, and
to Raphaël Chetrite for hospitality at Laboratoire J.A. Dieudonné during the
last stages of the work. F.C. also thanks the Institute of Mathematics and its
Applications for a small grant, while R.J.H. acknowledges an External
Fellowship from the London Mathematical Laboratory. Part of this research
utilised Queen Mary’s Apocrita HPC facility, supported by QMUL Research-IT.
[http://doi.org/10.5281/zenodo.438045.]

##  Appendix A Inverse $z$-transform

Here we present two methods, one algebraic and one analytic, to numerically
calculate the inverse $z$-transform of the function
$\tilde{G}^{r}_{M_{a}}(l,k,z)$ of Sect. III.2. Both these methods rely on the
fact that $G_{M_{a}}^{r}(l,k,n)$ is absolutely summable (all poles of
$\tilde{G}_{M_{a}}^{r}(l,k,z)$ are in the unit circle), or can be rescaled to
be such by appropriately remapping all the poles of
$\tilde{G}_{M_{a}}^{r}(l,k,z)$. In the algebraic method we truncate the
$z$-transform at the $N$-th term:
$\tilde{G}_{M_{a}}^{r}(l,k,z_{1})\approx\sum_{n=1}^{N}G_{M_{a}}^{r}(l,k,n)z_{1}^{-n}$.
If $N$ is sufficiently large, this is a good approximation for
$\tilde{G}_{M_{a}}^{r}(l,k,z_{1})$, since $z_{1}^{-n}$ rapidly tends to $0$ as
$n$ increases. In order to invert the approximate transform we need to know
the value of $\tilde{G}_{M_{a}}^{r}(l,k,z_{1})$ at, at least, $N$ different
points. Considering $m$ different points in the region of convergence of
$\tilde{G}_{M_{a}}^{r}(l,k,z)$ leads to the approximate system of equations:

$\begin{bmatrix}\tilde{G}_{M_{a}}^{r}(l,k,z_{1})\\\
\tilde{G}_{M_{a}}^{r}(l,k,z_{2})\\\ \vdots\\\
\tilde{G}_{M_{a}}^{r}(l,k,z_{m})\end{bmatrix}\approx\begin{bmatrix}1&z_{1}^{-1}&z_{1}^{-2}\dots&z_{1}^{-N}\\\
1&z_{2}^{-1}&z_{2}^{-2}\dots&z_{2}^{-N}\\\ \vdots&&\ddots&\vdots\\\
1&z_{m}^{-1}&z_{m}^{-2}\dots&z_{m}^{-N}\end{bmatrix}\begin{bmatrix}G_{M_{a}}^{r}(l,k,0)\\\
G_{M_{a}}^{r}(l,k,1)\\\ \vdots\\\ G_{M_{a}}^{r}(l,k,N)\end{bmatrix}.$

This can be rewritten as $\mathbf{\tilde{G}}\approx\mathbf{A}\mathbf{G}$.
Assuming $m=N$ this system has a unique solution provided that $\mathbf{A}$ is
full rank. For our purposes, following merrikh2014two , we consider $m$ bigger
than $N$, and the solution to $\mathbf{\tilde{G}}\approx\mathbf{A}\mathbf{G}$
is obtained by finding the $\mathbf{G}$ which minimizes
$\lVert\mathbf{\tilde{G}}-\mathbf{A}\mathbf{G}\rVert_{2}$.

The analytic method is based on transforming the $z$-transform into a discrete
Fourier transform and then applying well-known routines for calculating its
inverse. The first step is to substitute $z=e^{i\omega}$ in
$\tilde{G}_{M_{a}}^{r}(l,k,z)$, making the latter periodic in $\omega$. Then
we obtain a finite sample by taking $\omega=2\pi k/M$ for integer
$k\in[0,M-1]$, and finally calculate the inverse discrete Fourier transform.
Just like the previous method, this works provided that $G_{M_{a}}^{r}(l,k,n)$
is absolutely summable, or rescaled to be such, and gives a better
approximation for bigger values of $M$.

The plots in Fig. 3 are obtained using $m=430$, and $M=N=400$.

##  Appendix B Infinite-time correlations: $M_{b_{1}}$

We study here a modified version of the model $M_{b}$ in Sect. III.3. Here the
random walk in the top layer is uncoupled from the bottom on-off process,
eliminating the reset nature. Due to this change there is no need to
distinguish $\mathbf{Y}_{n}$ from $\mathbf{Y}_{n}^{\prime}$, and we will write
the full top-layer process as $\mathbf{Y}_{2n}$. Specifically, regardless of
what happens in the bottom layer, the random walk takes a jump according to a
Gaussian distribution of mean $\mu$ and variance $\sigma^{2}=2$. The
observable $N_{2n}$ in the bottom layer behaves as already seen in Sect.
III.3, whereas the observable $J_{2n}$, being independent from the resets,
does not present any DPT. Its rate function is that of a Gaussian random walk
characterised by symmetric fluctuations around a single typical value $\mu$.
Even though the random walk steps are i.i.d., we still expect that the rate
function for the observable $\Omega_{2n}$ behaves similarly to that in Sect.
III.3.3. This is because the ergodicity is broken in the bottom layer, and the
presence of two typical states for the observable $N_{2n}$ influences the
ratio $J_{2n}/N_{2n}$. In particular, the observable $\Omega_{2n}$ should also
have two typical states: $\hat{\omega}_{1}=2\mu/r$ and
$\hat{\omega}_{2}=2\mu/(1+r)$.

Since the bottom on-off process and the random walk are two independent
processes, the joint SCGF can be written as a sum of the SCGFs for the
independent observables $N_{2n}$ and $J_{2n}$, i.e.
$\lambda_{M_{b_{1}}}(l,k)=\lambda_{M_{b_{1}}}(l)+\lambda_{M_{b_{1}}}(k)$. From
the logarithmic moment generating functions, we find

$\begin{split}\lambda_{M_{b_{1}}}(l)&=\begin{cases*}\frac{\ln\left(re^{l}+(1-r)\right)+l}{2}&if
$l>0$\\\ \frac{\ln\left(re^{l}+(1-r)\right)}{2}&if $l\leq 0$ ,\end{cases*}\\\
\lambda_{M_{b_{1}}}(k)&=k^{2}+\mu k.\end{split}$ (30)

The joint SCGF obtained is analytic everywhere in $\mathbb{R}^{2}$ except at
$l=0$. The joint large deviation rate function $I_{M_{b_{1}}}(\eta,j)$ can be
numerically retrieved through Legendre-Fenchel transform, and from there by
contraction we can get $I_{M_{b_{1}}}(\omega)$.

As expected, $I_{M_{b_{1}}}(\omega)$ is robust in the tails and presents a
flat region of zeros bounded by the typical values $\hat{\omega}_{1}$ and
$\hat{\omega}_{2}$, see Fig. 7a.

(a) Ratio rate function $I_{M_{b1}}(\omega)$

(b) Locus of minimizers from contraction ($\mu=-1$)

Figure 7: (a) Ratio rate function $I_{M_{b1}}(\omega)$ plotted for $\mu=-1$
(blue), $\mu=-0.5$ (orange), $\mu=0$ (green), $\mu=0.5$ (red), and $\mu=1.0$
(purple). (b) Locus of minimizers $(\eta,\omega\eta)$ satisfying the
contraction principle in equation (17) for $\omega\in[-20,20]$ depicted on the
surface of the joint rate function $I_{M_{b1}}(\eta,j)$. Numerics obtained for
$r=0.5$.

Just like for model $M_{b}$, we should not confuse this flat region, arising
as a natural consequence of Legendre-Fenchel transforming the non-
differentiable joint SCGF $\lambda_{M_{b_{1}}}(l,k)$, with a coexistence phase
region. Indeed, fluctuations between the two typical states marked by coloured
dots in Fig. 7a still scale exponentially linearly in $n$, as indicated by
Monte Carlo simulations in Fig. 8.

Figure 8: Ratio rate function $I_{M_{b1}}(\omega)$ from theory (solid line)
compared with Monte Carlo simulations (symbols) for duration
$n=125,500,1000,2000$ (from top to bottom). Samples of $2\times 10^{7}$
trajectories for each simulation.

Although Fig. 7a closely resembles Fig. 5a, one particular feature of the
former does not appear in the latter. Uncoupling the random walk in the top
layer from the bottom on-off process leads to a genuine ‘kink’ appearing at
$\omega^{*}=0$ for any $I_{M_{b_{1}}}(\omega)$ with $\mu\neq 0$. This kink
consists of a jump in the first derivative of the function
$I_{M_{b_{1}}}(\omega)$, as evident from Fig. 9 where, for each curve, the
left-hand and right-hand limits of the derivative are marked with two dots of
the same colour. Following Sect. III.1, it is easy here to prove that
$I_{M_{b_{1}}}(\omega)$ is not differentiable at $0$. We simply need to study
$\partial\tilde{I}_{M_{b_{1}}}(\eta,\omega)/\partial\eta=0$ and see whether
the equation, for $\omega^{*}=0$, is verified for more than a single value of
$\eta$. The partial derivative reads

$\frac{\partial\tilde{I}_{M_{b_{1}}}(\eta,\omega)}{\partial\eta}=\begin{cases*}\ln\frac{-2(1-r)\eta}{r(2\eta-1)}+\frac{\omega}{2}(\eta\omega-\mu)&if
$\eta\in\left(0,\frac{r}{2}\right)$\\\ \omega\frac{\eta\omega-\mu}{2}&if
$\eta\in\left[\frac{r}{2},\frac{1+r}{2}\right]$\\\
\ln\frac{(1-r)(1-2\eta)}{2r(\eta-1)}+\frac{\omega}{2}(\eta\omega-\mu)&if
$\eta\in\left(\frac{1+r}{2},1\right)$ .\end{cases*}$ (31)

It is clear that for $\omega^{*}=0$, the equation is verified for any
$\eta\in\left[r/2,(1+r)/2\right]$, meaning the solution set of minimizers of
(17) for $\omega^{*}$ is not singleton.

Figure 9: Derivative of ratio rate function $I_{M_{b1}}^{\prime}(\omega)$
plotted for $\mu=-1$ (blue), $\mu=-0.5$ (orange), $\mu=0$ (green), $\mu=0.5$
(red), and $\mu=1.0$ (purple). Jumps in the derivative are marked with
coloured dots.

Physically this discontinuity can be considered as a ‘mode-switching’ phase
transition in the generation of fluctuations. Moving towards $\omega^{*}$ from
the left we have that fluctuations of the ratio are realized in trajectories
with few reset steps, while moving towards $\omega^{*}$ from the right, they
are realized in trajectories having many reset steps. This can also be seen in
Fig. 7b where the locus of minimizers $(\eta,\eta\omega)$ shows a numerical
jump (independently of the discretization used for $\omega$). This corresponds
to the linear section $\eta\in\left[\frac{r}{2},\frac{1+r}{2}\right]$. In
contrast, in model $M_{b}$ of Sect. III.3, correlations between the bottom
process and the random walk in the top layer prevent this sudden switch and no
transition of this kind happens.

## References

  * (1) Barato, A., Chetrite, R., Faggionato, A., Gabrielli, D.: A unifying picture of generalized thermodynamic uncertainty relations.  Journal of Statistical Mechanics: Theory and Experiment 2019(8), 084017 (2019)
  * (2) Bénichou, O., Loverdo, C., Moreau, M., Voituriez, R.: Intermittent search strategies.  Reviews of Modern Physics 83(1), 81 (2011)
  * (3) Bercu, B., Richou, A.: Large deviations for the Ornstein-Uhlenbeck process with shift.  Advances in Applied Probability 47(3), 880–901 (2015)
  * (4) Bercu, B., Rouault, A.: Sharp large deviations for the Ornstein–Uhlenbeck process.  Theory of Probability & Its Applications 46(1), 1–19 (2002)
  * (5) Bouchet, F., Barre, J.: Classification of phase transitions and ensemble inequivalence, in systems with long range interactions.  Journal of Statistical Physics 118(5-6), 1073–1105 (2005)
  * (6) Brockwell, P.J.: The extinction time of a birth, death and catastrophe process and of a related diffusion model.  Advances in Applied Probability 17(1), 42–52 (1985)
  * (7) Chavanis, P.H.: Phase transitions in self-gravitating systems: self-gravitating fermions and hard-sphere models.  Physical Review E 65(5), 056123 (2002)
  * (8) Cyranoski, D.: Swimming against the tide.  Nature 408(6814), 764–6 (2000)
  * (9) Danskin, J.M.: The theory of max-min, with applications.  SIAM Journal on Applied Mathematics 14(4), 641–664 (1966)
  * (10) Danskin, J.M.: The theory of max-min and its application to weapons allocation problems, vol. 5.  Springer Science & Business Media (2012)
  * (11) Dembo, A., Zeitouni, O.: Large deviations techniques and applications. (2010)
  * (12) Den Hollander, F.: Large deviations, vol. 14.  American Mathematical Sociecty (2008)
  * (13) Di Crescenzo, A., Giorno, V., Nobile, A.G., Ricciardi, L.M.: On the M/M/1 queue with catastrophes and its continuous approximation.  Queueing Systems 43(4), 329–347 (2003)
  * (14) Di Terlizzi, I., Baiesi, M.: Kinetic uncertainty relation.  Journal of Physics A: Mathematical and Theoretical 52(2), 02LT03 (2018)
  * (15) Ellis, R.S.: An overview of the theory of large deviations and applications to statistical mechanics.  Scandinavian Actuarial Journal 1995(1), 97–142 (1995)
  * (16) Evans, M.R., Majumdar, S.N.: Diffusion with stochastic resetting.  Physical Review Letters 106(16), 160601 (2011)
  * (17) Feller, W.: An introduction to probability theory and its applications, vol. 1.  John Wiley & Sons (2008)
  * (18) Gherardini, S., Gupta, S., Cataliotti, F.S., Smerzi, A., Caruso, F., Ruffo, S.: Stochastic quantum Zeno by large deviation theory.  New Journal of Physics 18(1), 013048 (2016)
  * (19) Gingrich, T.R., Rotskoff, G.M., Vaikuntanathan, S., Geissler, P.L.: Efficiency and large deviations in time-asymmetric stochastic heat engines.  New Journal of Physics 16(10), 102003 (2014)
  * (20) Glynn, P.W., Whitt, W.: Large deviations behavior of counting processes and their inverses.  Queueing Systems 17(1-2), 107–128 (1994)
  * (21) Gradenigo, G., Majumdar, S.N.: A first-order dynamical transition in the displacement distribution of a driven run-and-tumble particle.  Journal of Statistical Mechanics: Theory and Experiment 2019(5), 053206 (2019)
  * (22) Grimmett, G., Stirzaker, D., et al.: Probability and random processes.  Oxford University Press (2001)
  * (23) Gross, D.: The microcanonical entropy is multiply differentiable. No dinosaurs in microcanonical gravitation: No specia ‘microcanonical phase transitions’.  ArXiv:0403582 (2004)
  * (24) Gupta, D., Sabhapandit, S.: Stochastic efficiency of an isothermal work-to-work converter engine.  Physical Review E 96(4), 042130 (2017)
  * (25) Harris, R.J., Touchette, H.: Phase transitions in large deviations of reset processes.  Journal of Physics A: Mathematical and Theoretical 50(10), 10LT01 (2017)
  * (26) Hinkley, D.V.: On the ratio of two correlated normal random variables.  Biometrika 56(3), 635–639 (1969)
  * (27) Hinkley, D.V.: Correction: on the ratio of two correlated normal random variables.  Biometrika 57, 683 (1970)
  * (28) Hogan, W.: Directional derivatives for extremal-value functions with applications to the completely convex case.  Operations Research 21(1), 188–209 (1973)
  * (29) Hovhannisyan, V., Ananikian, N., Campa, A., Ruffo, S.: Complete analysis of ensemble inequivalence in the Blume-Emery-Griffiths model.  Physical Review E 96(6), 062103 (2017)
  * (30) Jack, R.L.: Large deviations in models of growing clusters with symmetry-breaking transitions.  Physical Review E 100(1), 012140 (2019)
  * (31) Jülicher, F., Ajdari, A., Prost, J.: Modeling molecular motors.  Reviews of Modern Physics 69(4), 1269 (1997)
  * (32) Kitamura, K., Tokunaga, M., Iwane, A.H., Yanagida, T.: A single myosin head moves along an actin filament with regular steps of 5.3 nanometres.  Nature 397(6715), 129 (1999)
  * (33) Kyriakidis, E.: Stationary probabilities for a simple immigration-birth-death process under the influence of total catastrophes.  Statistics & Probability Letters 20(3), 239–240 (1994)
  * (34) Lifson, S.: Partition functions of linear-chain molecules.  The Journal of Chemical Physics 40(12), 3705–3710 (1964)
  * (35) Lo, A.W.: The statistics of Sharpe ratios.  Financial Analysts Journal 58(4), 36–52 (2002)
  * (36) Mahmoud, H.: Pólya urn models.  Chapman and Hall/CRC (2008)
  * (37) Marsaglia, G.: Ratios of normal variables and ratios of sums of uniform variables.  Journal of the American Statistical Association 60(309), 193–204 (1965)
  * (38) Marsaglia, G.: Ratios of normal variables.  Journal of Statistical Software 16(4), 1–10 (2006)
  * (39) Martínez, I.A., Roldán, É., Dinis, L., Petrov, D., Parrondo, J.M., Rica, R.A.: Brownian Carnot engine.  Nature physics 12(1), 67–70 (2016)
  * (40) Mehl, J., Speck, T., Seifert, U.: Large deviation function for entropy production in driven one-dimensional systems.  Physical Review E 78(1), 011123 (2008)
  * (41) Merrikh-Bayat, F.: Two methods for numerical inversion of the $z$-transform.  ArXiv:1409.1727 (2014)
  * (42) Meylahn, J.M.: Biofilament interacting with molecular motors.  Ph.D. thesis, Stellenbosch University (2015)
  * (43) Meylahn, J.M., Sabhapandit, S., Touchette, H.: Large deviations for Markov processes with resetting.  Physical Review E 92(6), 062148 (2015)
  * (44) Mukherjee, B., Sengupta, K., Majumdar, S.N.: Quantum dynamics with stochastic reset.  Physical Review B 98(10), 104309 (2018)
  * (45) Nickelsen, D., Touchette, H.: Anomalous scaling of dynamical large deviations.  Physical Review Letters 121(9), 090602 (2018)
  * (46) Nyawo, P.T., Touchette, H.: Large deviations of the current for driven periodic diffusions.  Physical Review E 94(3), 032101 (2016)
  * (47) Poland, D., Scheraga, H.A.: Occurrence of a phase transition in nucleic acid models.  The Journal of Chemical Physics 45(5), 1464–1469 (1966)
  * (48) Polettini, M., Verley, G., Esposito, M.: Efficiency statistics at all times: Carnot limit at finite power.  Physical Review Letters 114(5), 050601 (2015)
  * (49) Proesmans, K., Cleuren, B., Van den Broeck, C.: Stochastic efficiency for effusion as a thermal engine.  Europhysics Letters 109(2), 20004 (2015)
  * (50) Proesmans, K., Derrida, B.: Large-deviation theory for a Brownian particle on a ring: a WKB approach.  Journal of Statistical Mechanics: Theory and Experiment 2019(2), 023201 (2019)
  * (51) Richard, C., Guttmann, A.J.: Poland–Scheraga models and the DNA denaturation transition.  Journal of Statistical Physics 115(3-4), 925–947 (2004)
  * (52) Rose, D.C., Touchette, H., Lesanovsky, I., Garrahan, J.P.: Spectral properties of simple classical and quantum reset processes.  Physical Review E 98(2), 022129 (2018)
  * (53) Shreshtha, M., Harris, R.J.: Thermodynamic uncertainty for run-and-tumble–type processes.  Europhysics Letters 126(4), 40007 (2019)
  * (54) Touchette, H.: Legendre-Fenchel transforms in a nutshell.  URL http://www. maths. qmul. ac. uk/~ ht/archive/lfth2. pdf (2005)
  * (55) Touchette, H.: Simple spin models with non-concave entropies.  American Journal of Physics 76(1), 26–30 (2008)
  * (56) Touchette, H.: The large deviation approach to statistical mechanics.  Physics Reports 478(1-3), 1–69 (2009)
  * (57) Verley, G., Esposito, M., Willaert, T., Van den Broeck, C.: The unlikely Carnot efficiency.  Nature Communications 5, 4721 (2014)
  * (58) Verley, G., Willaert, T., Van den Broeck, C., Esposito, M.: Universal theory of efficiency fluctuations.  Physical Review E 90(5), 052145 (2014)
  * (59) Vroylandt, H., Esposito, M., Verley, G.: Efficiency fluctuations of stochastic machines undergoing a phase transition.  ArXiv:1912.06528 (2019)
  * (60) Zamparo, M.: Large deviations in discrete-time renewal theory.  ArXiv:1903.03527 (2019)
  * (61) Zamparo, M.: Large deviations in renewal models of statistical mechanics.  ArXiv:1904.04602 (2019)