Weak ergodicity breaking induced by global memory effects

We study the phenomenon of weak ergodicity breaking for a class of globally correlated random walk dynamics defined over a finite set of states. The persistence in a given state or the transition to another one depends on the whole previous temporal history of the system. A set of waiting time distributions, associated to each state, set the random times between consecutive steps. Their mean value is finite for all states. The probability density of time-averaged observables is obtained for different memory mechanisms. This statistical object explicitly shows departures between time and ensemble averages. While the mean residence time in each state may result divergent, we demonstrate that this condition is in general not necessary for breaking ergodicity. Hence, global memory effects are an alternative mechanism able to induce this property. Analytical and numerical calculations support these results.


I. INTRODUCTION
Ergodicity plays a fundamental role in the formulation of statistical physics. This property is usually stated by saying that ensemble average and time average of observables are equals, the last one being taken in the long time (infinite) limit. In contrast with thermodynamical systems, where the lack or ergodicity is induced by a spontaneous symmetry breaking [1], the disparity between ensemble and time averages may also be found as an emergent property of complex systems. Named as weak ergodicity breaking (EB) [2], this feature is induced by the power-law nature of the statistical distributions associated to the observables and their dynamics [2,3].
Time averages in presence of weak EB remain random even in the long time limit. Their statistics, termed as weakly non-ergodic statistical physics [4,5], define a still very active line of research. Continuous time random walk characterized by divergent trapping times is a natural frame where weak EB was studied [4][5][6][7][8][9]. In addition, diverse kinds of complex anomalous diffusion processes are a natural partner of weak EB. Analysis were performed for particles embedded in heterogenous media [10], periodic potentials [11], and in homogeneous disordered media [12]. Geometric [13], escaled [14] and ultraslow [15] Brownian motions, as well as diffusion induced by the combined action of different driven noises [16][17][18], convoluted memory processes [19] and Langevin dynamics [20] also were characterized from a similar perspective.
Weak EB can be studied in systems that have associated a stationary state, such as for example random walks on finite domains, and also in non-stationary systems such as unbounded diffusive ones (see for example Refs. [4] and [28] respectively). Independently of the dimensionality, weak EB is in general associated or related to some underlying self-similiar (effective) mechanism characterized by power-law distributions. The main goal of this paper is to demonstrate that systems whose dynamics involves global memory effects may also develop EB. Furthermore, we establishes that the lack of ergodicity may happens even in absence of statistical properties (residence times) characterized by dominant power-law distributions.
Global memory (or correlation) effects refer to systems whose stochastic dynamics at a given time depends on its whole previous temporal history (trajectory). These kinds of dynamics has been studied previously [37][38][39][40][41][42][43][44][45], mainly as a mechanism that induces superdiffusion. In contrast, here we study random walk processes defined over a finite set of states where the persistence in a given state or the transition to another one depends on the previous system trajectory. The random times between consecutive steps is defined by a set of waiting time distributions with finite average times. In addition, our main results rely on alternative memory mechanisms. They are related to a Pólya urn dynamics [46][47][48][49][50], which is one of the simplest models of contagion process, being of interest in various disciplines [47]. In contrast to other global correlation mechanisms, the urn-like dynamics is able to induce weak EB. Interestingly, the departure from ergodicity arises even when the (average) residence times in each state are finite.
The paper is organized as follows. In Sec. II, we introduce the globally correlated random walk model. The probability density of time-averaged observables is obtained in general. In Sec. III, we study three different global memory mechanisms: the elephant random walk model, a random walk driven by an urn-like dynamics, and an imperfect case of the last one. In Sec. IV, for all models, we obtain the probability density of the residence times. Sec. V is devoted to the Conclusions. Analytical calculations that support the main results are presented in the Appendixes.

II. FINITE RANDOM WALK WITH GLOBAL MEMORY EFFECTS
In this section we introduce the globally correlated random walk model and study its properties. The probability density of time-averaged observables is also obtained.

A. Model
The system is characterized by a finite set of states µ = 1, · · · L. To each state µ we assign a waiting time distribution w µ (t), which gives the statistics of times between consecutive steps of the stochastic dynamics. We assume that all average times The stochastic dynamics is as follows. At the beginning (initial time), each state is selected in agreement with a set of probabilities {p µ } L µ=1 , 0 ≤ p µ ≤ 1, normalized as L µ=1 p µ = 1. Given that a state µ is selected, the system remains in it during a random time selected in agreement with the waiting time distribution w µ (t). After this step, the system may remain in the same state or jump to another one. Hence, it may persists in the same state, remaining an extra time interval chosen in agreement with the same waiting time distribution, or jump to a different state with a different waiting time distribution. This dynamic repeats itself in time after each step, where step refers to the process of selecting the next state.
The state corresponding to the next step is chosen in agreement with a conditional probability T n ({n 1 , n 2 · · · n L }|µ) [denoted as T n ({n ν }|µ)]. Here, n indicates the number of steps performed up to the present time, while n ν gives the number of times that each state ν was chosen previously. Then, n = L ν=1 n ν . The dependence of the process on the whole previous trajectory (global correlation) is given by the dependence of T n ({n ν }|µ) on the set {n ν } L ν=1 . The previous definitions completely characterize the stochastic dynamics in terms of the initial probabilities {p µ } L µ=1 , the waiting time distributions {w µ (t)} L µ=1 and the conditional (or transition) probabilities T n ({n ν }|µ).
For the studied models [see Eqs. (15), (16), and (21)], as a consequence of the memory effects, the following property is observed. In the long time limit (t → ∞), which also correspond to a divergent number of steps (n → ∞), the fractions L µ=1 f µ = 1, may become random variables whose values depend on each particular realization. Their probability density is denoted by P({f µ }), which satisfies the normalization condition Λ df 1 · · · df L−1 P({f µ }) = 1. Here, Λ is the region defined by the condition L ν=1 f µ = 1. The average of f µ over an ensemble realizations, denoted by · · · , is At a given time t, with P µ (t) we denote the (ensemble) probability [ L µ=1 P µ (t) = 1] that the system is in the (arbitrary) state µ. This object is characterized in Appendix A from the dynamics defined previously. The stationary probability reads P st µ ≡ lim t→∞ P µ (t). It can be written in terms of P({f ν }) as where τ µ is defined by Eq. (1). In Appendix A we also derive this result. Basically it say us that in each realization the system reaches a (random) stationary state defined by the weights (f µ τ µ )/ L µ ′ =1 f µ ′ τ µ ′ . In consequence, P st µ depends on which memory mechanism drives the stochastic dynamics.

B. Time-averaged observables
To each state µ, we assign an observable with value O µ . Hence, each realization of the random walk defines a corresponding trajectory O(t). In the stationary regime, its ensemble average where the weights follows from Eq. (4). On the other hand, its time average is defined as Here, t u is the total residence time in the state µ in the interval (0, t). Hence, L µ=1 t u = t. Even when a long time limit is present in the previous definition, the observable O may be a random object that depends on each particular realization. Its probability density can be written as where, as before, · · · denotes average over an ensemble of realizations and δ(x) is the Dirac delta function. Now, our goal is to calculate this object for the dynamics defined previously. Given that the waiting time distributions are characterized by a finite average time τ µ , Eq. (1), after invoking the law of large numbers, in the long time limit the total residence time t u in each state can be approximated as t u ≃ n µ τ µ . Consistently, the present time is t ≃ L µ=1 n µ τ µ . Hence, we can write where the last relation follows from Eq. (2). Taking into account that the fractions {f µ } L µ=1 are characterized by the distribution P({f µ }), Eq. (7) becomes Therefore, P (O) can be completely characterized after knowing the distribution P({f µ }). Notice that the specific structure of the waiting time distributions {w µ (t)} L µ=1 only appears through the average times {τ µ } L µ=1 , Eq. (1).

C. Ergodicity and localization
For an ergodic dynamics the fractions f µ [Eq.
(2)] must be characterized by their ensemble average, Eq. (3). Hence, Inserting this expression into Eq. (9), it follows the distribution where O st is given by Eq. (5) with the weights From Eqs. (4) and (10), we note that these weights correspond to the stationary probabilities of each state µ in the ergodic case. Hence, time averages and ensemble averages do in fact coincide.
The maximal departure with respect to ergodicity happens when the dynamics localize, that is, the system remains in the initial condition. This case corresponds to Hence, Eq. (9) becomes These limits are reached by the following memory mechanisms.

III. EXAMPLES
In the examples worked below, the stochastic dynamics may reach both the ergodic and localized regimes Eqs. (11) and (14) respectively. The distribution P({f µ }) can be explicitly calculated and then the non-ergodic properties characterized through Eq. (9).

A. Elephant random walk model
This correlation model has been studied extensively in the recent literature as a mechanism for inducing superdiffusion [37][38][39]. In the present context, it is defined by the transition probability The positive weights 0 < q µ < 1 are extra parameters normalized as L µ=1 q µ = 1. The parameter ε assumes values in the interval [0, 1]. The stochastic dynamics can be read as follows. With probability ε, and independently of the previous history, the new state is chosen in agreement with the probabilities {q µ } L µ=1 . On the other hand, with probability (1 − ε) each state is chosen in agreement with the weights {n µ /n} L µ=1 , which in fact depend on the whole previous history of the process.
For ε = 1, the selection of the new state is completely random and independent of the previous history. Therefore, the system is ergodic in this case, Eq. (11). On the other hand, for ε = 0 the dynamics localize, that is, the system remains in the initial condition, Eq. (14).
Even when the dynamics reaches the ergodic and localized regime, for intermediates values 0 < ε < 1 the dynamics is ergodic. This property is demonstrated in Appendix B. In fact, the distribution P({f µ }) is delta distributed, Eq. (10), with f µ = q µ .

B. Random walk driven by an urn-like dynamics
In the Pólya urn dynamics [46,47] (initially) an urn contains many balls that, for example, are characterized by L different possible colors. At each step, one determine the color of one ball taken at random and put into the urn one extra ball of the same color. A similar process can be defined by starting the urn with only one ball [48][49][50] (Blackwell-MacQueen urn). Its dynamics is defined by the following conditional probability, which is taken as the driving memory mechanism.
As before, the set of parameters {q µ } L µ=1 is normalized to one. Instead, λ is a positive free parameter. For λ → ∞ the dynamics loses any dependence on the previous history achieving in consequence an ergodic regime, Eq. (11). On the other hand, for λ = 0, a localized regime is achieved, Eq. (14). Hence, the intermediate values of λ avoid this regime and in consequence one can define a nontrivial dynamics starting from n = 1.
We notice that P({f µ }) [Eq. (17)] depends on the initial conditions {p µ } L µ=1 . This property arises from the strong memory effects that drive the underlying stochastic dynamics. Nevertheless, this dependence is not able to cancel any of the stationary fractions. In consequence, the initial conditions are not relevant for breaking or not ergodicity. In fact, given that P({f µ }) departs from Eq. (10), this model leads to EB. The distribution P (O) [Eq. (9)] can be evaluated from Eq. (17).
As an example, we consider a two-level system, where the observable is defined by where for shortening the expression we introduced the parameters λ 1 ≡ λq 1 , λ 2 ≡ λq 2 , and the weights Here, τ 1 and τ 2 are the average times corresponding to the two waiting time distributions w 1 (t) and w 2 (t) respectively [Eq.
(1)]. The normalization constant reads . For simplicity, in the previous expressions we assumed the initial condition p µ = q u . The case p µ = q u can be recovered from these expressions [see Eqs. (17) and (18)]. The model (16) demonstrates that global memory effects may lead to EB. This result has a close relation with the breakdown of the standard central limit theorem for globally correlated random variables [50]. On the other hand, as shown in Sec. IV, depending on the values of λ, here EB arises because the residence times in each state may be divergent, that is, their probability density is characterized by power-law tails. The next modified dynamics also develops EB, but does not involve power-law statistics.

C. Imperfect urn-like Model
Here, we consider a model that can be seen as an imperfect case of the previous one. We consider the possibility of having random state selections that do not depend on the previous system history. The transition probability reads The set {q µ } L µ=1 is normalized as before, 0 ≤ ε ≤ 1, and λ ≥ 0. Hence, with probability ε each state µ, independently of the previous trajectory, is chosen with weight q µ . Complementarily, with probability (1 − ε) the state is chosen in agreement with the urn mechanism Eq. (16). In fact, here M µ is the number of times that the state µ was chosen with the urn dynamics. Furthermore, M is the number of times that the urn mechanism was applied, M = L µ=1 M µ . In contrast with the elephant model [Eq. (15)], here the contribution proportional to ε can be think as an error in the application of the urn dynamics.
In order to clarify the stochastic dynamics induced by Eq. (21), in Fig. 1 we plot two realizations (upper panels) for a two-level system with O 2 = 1 and O 1 = −1. Hence, the observable realizations switch between these two values. The waiting time distributions are exponential ones with µ = 1, 2. In the lower panels we plotted the conditional probability T n ({n ν }|µ) as a function of n. For clarity, each value is continued in the real interval (i − 1, i).
(2)]. Nevertheless, in the case ε = 0.1 at random values of n the conditional probability collapses to the value q µ . This effect gives the error or imperfection with respect to the case ε = 0.
The probability distribution of the asymptotic fractions [Eq. (2)] associated to Eq. (21) is given by where D({f µ }|{λ µ }) is the Dirichlet distribution Eq. (18). Furthermore, each fraction is restricted to the domain In this case, the average fraction reads Eq. (23) is related to Eq. (17) by the change of variables f µ → εq µ + (1 − ε)f µ . This relation follows by considering the asymptotic limits of Eqs. (21) and (16), and by using that the law of large numbers applies to the error mechanism. For ε = 0 the previous expressions recover the previous case, Eq. (17). Interestingly, the effect of introducing the imperfect mechanism is to reduce the domain of each fraction f µ , Eq. (24).
From Eqs. (9) and (23) we can calculate the distribution of the time-averaged observable. Below we consider a two-level system with O 1 < O < O 2 and initial condition p µ = q u . This case straightforwardly allows us to reconstruct the case p µ = q u . We get Furthermore, we introduced the parameters while the normalization constant is Consistently, for ε = 0, Eq. (26) recovers the previous case, Eq. (19). From the previous expression it become clear that the error mechanism introduced in Eq. (21) lead to a shrinking of the probability density of the time-averaged observable.
In order to check these results, in Fig. 2, we plot the distribution (26) for a two-level system where as before we take O 2 = 1, O 1 = −1, and the exponential waiting time distributions (22). For each value of λ, we plot the cases ε = 0.5 [Eqs. (21) and (26)] and ε = 0 [Eqs. (16) and (19)]. Consistently, a higher ε leads to a shrinking of the density P (O), which confirms that for ε → 1 an ergodic regime is achieved, P (O) = δ(O). The same happen for increasing λ. On the other hand, the plots show that P (O) may develops different forms such as U and bell shapes, or even uniform ones. Similar dependences arise when studying renewal random walks with divergent average trapping times [4].
In all cases, the numerical simulations (circles and squares) follows from a time average performed on a time interval with n = 10 3 steps and 10 5 realizations. The theoretical results fit very well the numerical ones.

IV. PROBABILITY DENSITY OF RESIDENCE TIMES
In contrast to the elephant random walk model, the previous urn models develop weak EB. Here, we explore if this property is induced, or not, by a power-law statistics. In fact, for continuous-time random walks with renewal events, EB is induced by the divergence of the average residence time in each state [4]. The residence times are the random times that the system stays or remains in a given state before jumping to another one (see Fig. 1).
Here, for the models introduced previously, we calculate their probability density. The calculations are valid for arbitrary number of states L.
We consider a single trajectory in the long time limit, such that the fractions {f µ } L µ=1 [Eq.
(2)] can be described by their associated probability density P({f µ }) [see Eqs. (17) and (23)]. At the beginning of the residence in a given state µ the first time interval is chosen in agreement with its waiting time distribution w µ (t). In each step, the system remains in the same state with probability f µ , which add a new random time interval also defined from w µ (t). The residence time ends when a different state ν = µ is chosen. This change occurs with probability (1 − f µ ). Therefore, the probability W µ ({f }|τ )dτ of leaving the state µ after a residence time τ can be written in the Laplace domain [g(s) = ∞ 0 dτ g(τ )e −sτ ] as Here, w µ (s) is the Laplace transform of the waiting time distribution w µ (t) associated to the state µ. The previous expression takes into account all possible way of leaving the state µ after a given number of steps. It can be rewritten as The density W µ ({f }|τ ) is a conditional object. In fact, it is defined for a particular realization with random values of the fraction f µ . Therefore, the probability density of the residence time W µ (t) is obtained after averaging over realizations, W µ (t) = W µ ({f }|t) , which is equivalent to an average over the distribution P({f ν }) of the set of fractions {f ν } L ν=1 . Therefore, we get where W µ ({f }|τ ) follows from Eq. (30) after Laplace inversion. The average persistence time T µ is defined by The previous two expressions can be evaluated for arbitrary waiting time distributions and memory models. For an exponential waiting time distribution w µ (t) = γ µ exp[−γ µ t] [Eq. (22)] with mean value τ µ = 1/γ µ [Eq.
The numerical probability densities of Fig. 3 were ob-tained from a set of equally sampled realizations. This means that the same number of data for the random residence times are taken from each realization. We took 5 × 10 3 realizations with a total length of n = 5 × 10 5 steps. Furthermore, after running the dynamics during 10 3 steps (long time limit), 5 × 10 3 random residence times were taken from each realization.

V. SUMMARY AND CONCLUSIONS
We have introduced a random walk dynamics characterized by global memory mechanisms. Given a finite set of states, in each step the system may remain in the same state of jump to another one. These alternative events are chosen from a conditional probability that depends on the whole previous history of the system. The time between consecutive steps is determinate by a set of waiting time distributions, all of them characterized by a finite average time.
We focused the analysis on the ergodic properties of the stochastic dynamics. Hence, we characterized the probability density of time-averaged observables, [Eq. (9)]. By analyzing different memory mechanisms, we conclude that global correlations are not a sufficient condition for breaking ergodicity, such as for example in the elephant random walk model [Eq. (15)]. On the other hand, alternative urn-like memory mechanisms [Eqs. (16) and (21)] do in fact break ergodicity. In these cases, considering a two-level dynamics, the distribution of time-averaged observables can be found in an explicit analytical way [Eqs. (19) and (26)].
For random walks dynamics over a finite set of states, EB may be induced by a divergent average residence time in each state. In order to cheek this possibility for the present models, we calculated the probability density of the residence times [Eq. (31)], and the corresponding average residence time [Eq. (32)]. In general, the distributions do not develop asymptotic power-law behaviors consistent with a divergent average residence time. Hence, we conclude that global memory effects are in fact an alternative mechanism that leads to EB. This main conclusion was explicitly checked for two-level dynamics [Eqs. (35 ) and (38)]. Only for a particular set of values, the residence times have a divergent average. All previous results were confirmed by numerical simulations [see Figs. (2) and (3)].
In conclusion, we established that weak EB may arise in systems characterized by global memory effects. This property may emerge even when the relevant variables are not characterized by power-law statistical behaviors.
For the urn dynamics defined by Eq. (16), here we obtain the probability density of the stationary fractions Eq. (2).