arXiv:1512.01495v3 [cond-mat.stat-mech] 27 Sep 2017
Discreteness Effects in Population Dynamics Esteban Guevara Hidalgo1,2 , Vivien Lecomte2 1
Institut Jacques Monod, CNRS UMR 7592, Universit´e Paris Diderot, Paris Cit´e Sorbonne, F-750205, Paris, France 2 Laboratoire Probabilit´e et Mod`eles Al´eatoires, CNRS UMR 7599, Universit´e Paris Diderot, Paris Cit´e Sorbonne, Bˆatiment Sophie Germain, Avenue de France, 75013 Paris, France E-mail: esteban
[email protected]
Abstract. We analyse numerically the effects of small population size in the initial transient regime of a simple example population dynamics. These effects play an important role for the numerical determination of large deviation functions of additive observables for stochastic processes. A method commonly used in order to determine such functions is the so-called cloning algorithm which in its non-constant population version essentially reduces to the determination of the growth rate of a population, averaged over many realizations of the dynamics. However, the averaging of populations is highly dependent not only on the number of realizations of the population dynamics, and on the initial population size but also on the cut-off time (or population) considered to stop their numerical evolution. This may result in an over-influence of discreteness effects at initial times, caused by small population size. We overcome these effects by introducing a (realization-dependent) time delay in the evolution of populations, additional to the discarding of the initial transient regime of the population growth where these discreteness effects are strong. We show that the improvement in the estimation of the large deviation function comes precisely from these two main contributions.
Keywords: Cloning Algorithm, Large Deviation Function, Population Dynamics, BirthDeath Process, Biased Dynamics, Numerical Approaches
1. Introduction The occurrence of rare events can vastly contribute to the evolution of physical systems because of their potential dramatic effects. Their understanding has gathered a strong interest and, focusing on stochastic dynamics, a large variety of numerical methods have been developed to study their properties. They range from transition path sampling [1, 2, 3] to “go with the winner” algorithms [4, 5] and discrete-time [6] or continuous-time [7] population dynamics (see [8] for a review), and they have been generalized to many contexts [9, 10, 11, 12, 13]. In Physics, those are being increasingly used in the study of complex systems, for instance in the study of current fluctuations
Discreteness Effects in Population Dynamics
2
in models of transport [14, 15, 16], glasses [2], protein folding [17] and signalling networks [18, 19]. Mathematically, the procedure amounts to determining a large deviation function (ldf) associated to the distribution of a given trajectory-dependent observable, which in turns can be reformulated in finding the ground state of a linear operator (see [20] for a recent review of many aspects of this correspondence). In fact, this question is common to both statistical and quantum physics, and the very origin of population dynamics methods lies in the quantum Monte-Carlo algorithm [21]. The idea of population dynamics is to translate the study of a class of rare trajectories (with respect to a determined global constraint) into the evolution of several copies of the original dynamics, with a local-in-time selection process rendering the occurrence of the rare trajectories typical in the evolved population. The decay or growth of the population is in general exponential, at a rate which is directly related to the distribution of the class of rare trajectories in the original dynamics. Two versions of such algorithms exist: the non-constant total population and the constant total population, for which a uniform pruning/cloning is applied on top of the cloning dynamics so as to avoid the exponential explosion or disappearance of the population. While the later version is obviously more computer-friendly, the former version presents interesting features: First, it is directly related to the evolution of biological systems (stochastic jumps representing mutations, selection rules being interpreted as Darwinian pressure); Second, the uniform pruning/cloning of the population, although unbiased, induces correlations in the dynamics that one might want to avoid; Last, in some situations where the selection rates are very fluctuating, the constant-population algorithm cannot be used in practice because of finite-population effects (population being wiped out by a single clone), and one has to resort to the non-constant one. In this article, we focus on the non-constant population algorithm, that we study numerically in a simple model where its implementation and its properties can be examined in great details. In Section 2, we recall for completeness the relation between large deviations and the precise population dynamics. In Section 3 we describe issues related to the averaging of distinct runs, that we quantify in Section 4. In Section 5 we propose a new method to increase the efficiency of the population dynamics algorithm by applying a realization-dependent time delay, and we present the results of its application in Section 6. We characterize numerically the distribution of these time delays in Section 7. Our conclusions and perspectives are gathered in Section 8. 2. The Cloning Algorithm and Large Deviation Functions A method commonly used in order to determine the large deviation function is the so-called “cloning algorithm” [7, 8, 22]. This method has its origin in the study of continuous-time Markov chains and their dynamics. In this section we make a review of the theoretical background behind the algorithm, of how populations are generated and of how the ldf is evaluated.
Discreteness Effects in Population Dynamics
3
2.1. Continuous-time Markov Chains and the s-modified Dynamics Let {C} be the set of possible configurations of a system which evolves continuously in time with jumps from C to C 0 occurring at transition rate W (C → C 0 ). The probability P (C, t) to find the system at time t in configuration C evolves in time following the master equation X ∂t P (C, t) = W (C 0 → C)P (C 0 , t) − r(C)P (C, t) (1) C 0 6=C
P
where r(C) =
W (C → C 0 ) is the escape rate from configuration C. If we define
C 0 6=C
an additive observable A over trajectories of the system (extensive in time, such as the number of configuration changes along the trajectory), which increases by an amount α(C, C 0 ) each time the system changes from C to C 0 , the probability P (C, t) can be detailed into P (C, A, t). This probability is defined as the probability of finding the system at time t in the configuration C and with a value A of the observable. In this case X W (C 0 → C)P (C 0 , A − α(C 0 , C), t) − r(C)P (C, A, t)(2) ∂t P (C, A, t) = C 0 6=C
We can bias the statistical weight of histories by introducing a parameter s which fixes the average value of A, such that s 6= 0 favors its non-typical values (s = 0 characterizes P the non-biased case) and for Pˆ (C, s, t) = e−sA P (C, A, t), A
∂t Pˆ (C, s, t) =
X
Ws (C 0 → C)Pˆ (C 0 , s, t) − r(C)Pˆ (C, s, t)
(3)
C 0 6=C 0
where Ws (C 0 → C) = e−sα(C ,C) W (C 0 → C) are the “s-modified” rates. This new stochastic process is called “s-modified dynamics” and can be conveniently rewritten as X ∂t Pˆ (C, s, t) = (Ws )CC 0 Pˆ (C 0 , s, t) + [rs (C) − r(C)] Pˆ (C, s, t) (4) C 0 6=C
where (Ws )CC 0 = Ws (C 0 → C) − rs (C)δCC 0 P and rs (C) = Ws (C → C 0 ).
(5)
C0
Equation (4) can be seen as the evolution equation of the (non-conserved) probability Pˆ (C, s, t) with rates Ws (C 0 → C), supplemented with a population dynamics where configurations are multiplied at a rate [rs (C) − r(C)]. The conjunction of these “mutation” and “selection” processes constitutes the cloning algorithm. The first term of the rhs conserves the probability while the second term represents the creation or destruction of clones of the system. The non-probability preserving “selection” process allows to render typical in the s 6= 0 biased dynamics an atypical class of histories of the original s = 0 process. A detailed description of the corresponding cloning algorithm is given below.
Discreteness Effects in Population Dynamics
4
2.2. Populations and the Large Deviation Function The Cloning Algorithm Consider N0 clones of the system (i.e., N0 copies of the system initially in the same configuration C). The dynamics is continuous in time and described by the times of configuration changes. We denote by t = {t(i) }i=1,...,N0 the times at which each of the clones c = {ci }i=1,...,N0 will evolve. 1. The first clone to evolve corresponds to the clone cj such that t(j) = min t. 2. cj changes its configuration from C to C 0 with probability Ws (C → C 0 )/rs (C) 3. cj is replaced by y = bY (C) + c copies, where Y (C) = e∆t(C)(rs (C)−r(C)) is the cloning factor and is a random number uniformly distributed on [0, 1]. 4. The next evolution of each copy cj will occur at t(j) +∆t(C 0 ) where ∆t(C 0 ) is chosen from a exponential law of parameter rs (C 0 ), and is drawn independently for every copy. 5. If y = 0, cj is erased. If y > 1, we make y − 1 copies of cj . The repetition of this procedure will result (after an enough time) in an exponential growth (or decay) of the number of clones. We restrict for simplicity our study to situations were the ldf is positive and the population thus increases in time. We can keep track of the different changes in the number of clones and of the times where these changes occur and we will denote by N (s, t) the time-dependent population. Once we have generated N (s, t), we can compute the ldf from the slope in time of the logˆ (s, t) = log N (s, t), which constitutes an evaluation of the population population N ˆ (s, t) by growth rate. This can be done in different ways, for example by fitting N y = mt + b and taking the ldf as Ψ(s) = m or also by computing Ψ(s) from Nmax 1 log (6) Ψ(s) = Tmax − Tmin Nmin where Nmax and Nmin are the maximum and minimum values for N (s, t) and Tmax and Tmin their respective times. We will refer later to this procedure as the “bulk” slope estimator of the ldf. Note that in some situations one can extend the previously described algorithm to keep population constant, by uniformly pruning or cloning the copies at each step so as to effectively preserve the total population size without biasing its evolution. However, we are interested in situations where such approach cannot be applied in practice, for instance when the cloning rate is highly fluctuating. 2.3. The Birth and Death Process Throughout this article we focus our attention on a toy system where population discreteness can be studied simply: the birth and death process in one site. The
Discreteness Effects in Population Dynamics
5
system presents two states 0 and 1 and the transition rates read W (0 → 1) = c and W (1 → 0) = 1 − c so that equation (1) for this process becomes ! ! ! P (0, t) −c 1 − c P (0, t) ∂t (7) P (1, t) c −1 + c P (1, t) Additionally, for our purposes, we will consider as additive observable A the activity K for which α(C, C 0 ) = 1: K represents the total number of configuration changes up to final time t. An advantage of considering this process for our analysis is that the large deviation function for the activity can be determined analytically. The largetime cumulant generating function ΨK (s) = limt→∞ 1t loghe−sK i, also corresponds to the maximum eigenvalue of following matrix (see equation (5)) ! −c (1 − c)e−s (8) Ws = ce−s −1 + c which it is found to be 1 1p ΨK (s) = − + 1 − 4c(1 − c)(1 − e−2s ) (9) 2 2 Equation (9) will allow us to assess the quality of our numerical results. The inverse of the difference between the eigenvalues of Ws 1 (10) tgap = p 1 − 4c(1 − c)(1 − e−2s ) allows us to define the typical convergence time tgap to the large time behaviour for equation (7). 3. Average Population and the LDF As we mentioned before, the cloning algorithm results (as time goes to infinity) in an exponential growth (for s < 0) or decay (for s > 0) of the number of clones. As we will see later, the “discreteness effects” in the evolution of our populations are strong at initial times. That is why the determination of the ldf using this algorithm is constrained not only to the parameters (c, s), the initial number of clones N0 and the number of realizations R but also to the final time (or the maximum population) until which the process evolves in the numerical procedure. In order to obtain an accurate estimation of Ψ(s), we should average several realizations of the procedure described in section 2.2. To perform this average, we will define below a procedure that we have called “merging” which will allow us to determine in a systematic way the average population from which we can obtain an estimation of the ldf Ψ(s). Noteworthy, this erroneously could be seen as obtaining Ψ(s) from the growth rate of the average (or equivalently the sum) of several runs of the population dynamics. This procedure would be incorrect since it amounts to performing a single run of the total population of the different runs, with a dynamics that would partition the total population into non-interacting sub-populations, while, as described in section 2.2,
Discreteness Effects in Population Dynamics
6
the population dynamics induces effective interactions among the whole set of copies inside the population. In fact, the right way of performing this numerical estimate comes from computing Ψ(s) from the average growth rate of several runs of the population i.e., from taking the average hlog N (s, t)i of the slopes of several log N (s, t) instead of the slope of loghN (s, t)i. The two results differ in general since hlog N (s, t)i = 6 loghN (s, t)i. One can expect that the two results become equivalent in the large N0 limit as the distribution of growth rate should become sharply concentrated around its average value; however, they are different in the finite N0 regime that we are interested in. 3.1. Populations Merging Let’s consider J populations N = {N1 (s, t), N2 (s, t), ..., NJ (s, t)}. The average population is defined as hN i = hNj (s, t)iJj=1 . In order to compute hN i, we introduce a procedure that we have called “merging” of populations which is described below. Given Ni (s, t) and Nj (s, t) the result of merging these two populations M(Ni , Nj ) is another population Nij = Ni + Nj which represents the total number of clones for each time where a change in population for Ni and Nj has occurred. If hNij i is the average population for Ni and Nj , the merged population and the average N population are related through hNij i = 2ij . If we add, for example, to our previous result another population Nk , the result M(Nij , Nk ) is related to the average by M(Nij , Nk ) = Nij + Nk = Ni + Nj + Nk = Nijk = 3hNijk i. These “merging” procedure can be done for each of the populations in N so that M[N ] = M(M(M(...(M(M(N1 , N2 ), N3 ), N4 ), ...), NJ−1 ), NJ )
(11)
is the result of systematically merging all the populations in N . The average population hN i can be recovered from M[N ] as hN i = (1/J)M[N ]. Similarly, in the case of logˆ i = hN ˆj (s, t)iJj=1 (where N ˆj (s, t) = log Nj (s, t)) is obtained from merging populations, hN ˆ = {N ˆ1 (s, t), N ˆ2 (s, t), ..., N ˆJ (s, t)}. Ψ(s) is then computed from all the populations in N ˆ i with hN ˆ i = (1/J)M[N ˆ ]. the slope of hN 3.2. Discreteness Effects at Initial Times Issues can emerge in the determination of Ψ(s) which are not only related to the dependence of the method in N0 (the initial number of clones) and J (the number of populations). At initial times there is a wide distribution of times at which the first series of jumps occurs. This means that fluctuations at initial times induce that some populations remain in their initial states longer than others, producing an effective delay compared to other populations that evolve faster in their initial regime. From a practical point of view, this can induce that the numerical determination of Ψ(s) becomes a slow and inefficient task. One way of dealing with this issue comes from restricting the evolution of N up to a maximum time Tmax or a maximum population Nmax . However, this implies that if Tmax or Nmax are not long enough, the determination of Ψ(s) will be strongly affected by the behaviour of N at initial times. We now discuss two issues
Discreteness Effects in Population Dynamics
7
7
7
6
6
5
5
Log−Populations
Log−Populations
that are encountered in the numerical evaluation of the ldf: (i) the influence of how the dynamics is halted; and (ii) the role of initial population in the initial regime. F F Let’s call TF = {tF 1 , ..., tJ } the set of final times of N , with tj ≤ Tmax , ∀j ∈ {1, ..., J}. Note that tF j depends on j whenever the simulation is stopped at Nmax (as in figure 1) or at Tmax . This due to the fact the algorithm is continuous in time and the last ∆t(C) does not exactly lead to Tmax . We say that the average population hN i represents N only if the average is made in the interval [0, min TF ] where all the populations are defined. In other words, the average population in this interval takes into consideration all the populations while for times t ≥ min TF some populations have stopped evolving. This phenomenon is especially evident when considering a maximum population limit Nmax for the evolution of the populations (Figure 1(a)). As a consequence, hN i depends on the distribution of final times of N which are not necessarily equal to Tmax .
4 3
3 2
2 1 0
4
20
40
60
Time
80
ˆ i[0,min T ] (a) hN F
100
120
140
1 0
20
40
60
Time
80
100
120
140
ˆ i[max T ,min T ] (b) hN C F
Figure 1. Log-populations as function of time (blue). Their evolution has been restricted up to a maximum (log) population value. (a) The average log-population ˆ i (black) is made in the interval [0, min TF ] where all the populations are defined. (b) hN After a cut in populations CN (in order to eliminate the initial discreteness effects), the ˆ is defined only in the interval average log-population (red) that represents the new N [max TC , min TF ].
An alternative that can be considered in order to overcome the influence of initial discreteness effects in the determination of Ψ(s) is to get rid of the initial transient regime where these effects are present. In other words, to cut the initial time regime of our populations. Let’s call CN ≥ log N0 the initial cut in log-populations and equivalently Ct ≥ 0 the initial cut in times. TC = {tC1 , ..., tCJ } is the distribution of times at Ct,N . In that case, similarly as we analysed before, the average population hN i represents N only if the average is made in the interval [max TC , min TF ] which can be in fact very small and could result in a bad approximation of Ψ(s) (Figure 1(b)).
Discreteness Effects in Population Dynamics
8
As we will see in the next section, log-populations after a long enough time become parallel i.e., once the populations have overcome the discreteness effects regime, the distance between them is constant. We will use this fact in order to propose a method which allows us to overcome the problems we have described in this section. Throughout this article, we consider for our simulations c = 0.3, N0 = 22 , Nmax = 103 , J = 28 and s ∈ [−0.3, 0]. 4. Parallel Behaviour in Log-Populations 4.1. Distance between Populations Given Ni (s, t) and Nj (s, t), we define the distance between these populations at N ∗ (with N ∗ ∈ Ni and N ∗ ∈ Nj ), as ∆ti (N ∗ ) ∆tj (N ∗ ) ∗ ∗ ∗ − ti (N ) + D(Ni , Nj )(N ) = tj (N ) + (12) 2 2 where ∆tk (N ∗ ) is the time interval Nk (s, t) spent at N ∗ and tk (N ∗ ) is the time where Nk (s, t) changes to N ∗ . Evidently there are cases where N ∗ ∈ / Ni but N ∗ ∈ Nj , N ∗ ∈ Ni but N ∗ ∈ / Nj and N ∗ ∈ / Ni and N ∗ ∈ / Nj , however D(Ni , Nj )(N ∗ ) for these cases can also be computed. The last analysis (and definitions) is also valid for log-populations. ˆi , N ˆj )(N ∗ ) enjoy interesting properties that we discuss below. D(Ni , Nj )(N ∗ ) and D(N 40
7
35
6
Distance
Log−Populations
30 5 4 3
25 20 15 10
2 1 0
5 20
40
60 80 Time
100
120
140
ˆi (s, t), N ˆj (s, t) (a) Log-Populations: N
0
0
200
400
600
800
1000
ˆi , N ˆj ) (b) D(N
ˆi , N ˆj as function of time and the distance Figure 2. Evolution of two log-populations N ˆ ˆ D(Ni , Nj ) between them as defined in equation (12). (a) Log-populations after a long enough time become parallel. (b) Once the populations have overcome the initial discrete population regime, the distance between them becomes constant. (s = −0.1). Student Version of MATLAB
ˆi , N ˆj ) 4.2. Properties of D(N In figure 2, we show two log-populations and the distance between them. As can be seen in figure 2(a) log-populations after a long enough time become parallel i.e.,
Discreteness Effects in Population Dynamics
9
once the populations have overcome the discreteness effects, the distance between them becomes constant as can be seen in figure 2(b). The region where the distance between populations is constant characterizes the exponential regime of the populations growth, i.e., the region where the discreteness effects are not strong anymore. 14
5
s = -0.1
Average Distance
12
4
10
3
8
s = -0.15
s = -0.3
6
2
s = -0.2
4
1 0 0
s = -0.3
2
10
20
30
ˆF , N ˆj )ij (a) hD(N
40
50
0
10
20
30
40
50
60
70
80
90
100
ˆF , N ˆj )ij (b) Average hD(N
Figure 3. (a) Average distance of the populations in N with respect to a reference one for R = 20 realizations (light blue) and their average (dark blue). (b) Average distance between populations for several values of s. How fast a population “exits” from the discreteness effects regime depends on s: s closer to zero corresponds to a slower population growth and hence a longer discreteness regime.
ˆF ∈ N ˆ as reference, using the definitions above, it If we consider some population N ˆF , N ˆj ) between N ˆF and the rest of populations is possible to determine the distance D(N ˆ = {N ˆ1 , N ˆ2 , ..., N ˆJ }. In figure 3(a) we show their average hD(N ˆF , N ˆj )ij in light blue in N h i ˆi , N ˆj )i in dark blue. As we mentioned and its average over R = 20 realizations hD(N R
in section 2, the parameter s characterizes atypical behaviours of the unbiased dynamics, and this induces a dependence in s of the population growth. A population with a large value of s corresponds to a large deviation of K. Also, as it is clearly illustrated in figure 3(b), the time of entrance of the system into a regime free of discreteness effects depends on s. 5. Time Correction in the Evolution of Populations Based on the results we just illustrated, we propose a method in order to improve the approximation of Ψ(s) and reduce the influence of the initial discrete population size regime we described in subsection 3.2. We aim at giving more weight to the exponential regime in the determination of Ψ(s). As we will see below, this can be done through a delay in the evolution of populations.
Discreteness Effects in Population Dynamics
10
5.1. Time Delay Correction ˆ and their distribution of Consider J populations N , their respective log-populations N F F ˆj (with respect to a fixed final times TF = {t1 , ..., tJ }. We define as “delay” ∆τj of N ˆF ∈ N ˆ ) the time interval reference population N F ∆τj = tF F − tj
(13)
ˆj is ahead with respect to N ˆF , and if ∆τj > 0, N ˆj is delayed with such that, if ∆τj < 0, N ˆF . This lag can be compensated by performing on N ˆj the time translation respect to N ˆ new = N ˆj (s, t + ∆τj ) N j
(14)
7
7
6
6
5
5
Log−Populations
Log−Populations
ˆF share not only the final population Nmax but also the ˆjnew and N which produces that N same final time tF F . Moreover, considering also the fact that log-populations are parallel ˆF overlap in the region that we ˆ new and N at large times, this procedure produces that N j have called free of discreteness effects. The result of performing this transformation to ˆ is shown in figure 4. all the populations in N
4 3 2 1 0
4 3 2
10
20
30 Time
40
50
60
1 −10
0
10
20
30
40
50
60
Time
(a) Log-Populations
(b) Delayed Log-Populations
Figure 4. (a) Log-populations, (b) time-delayed log-populations, and their average (dark green). The fluctuations at initial times produce a gap in the evolution of individual populations inducing a relative shift that lasts forever. This is compensated by delaying the populations in time, as explained in section 4. (s = −0.25). Student Version of MATLAB
Student Version of MATLAB
Figure 4 also illustrates many of the points we have discussed up to now. One of them is related to the “wide” distribution of final times, i.e., min TF and max TF can be very distant one from each other. This along with the fact that the average population depends on min TF makes that the determination of Ψ(s) omits a considerable region where the populations have already entered the exponential regime. This implies precisely that more weight is given to the initial discreteness effects than to the exponential regime. These effects are in fact present up to relatively long times which means that if we would like to get rid of the region were discreteness effects are
Discreteness Effects in Population Dynamics
11
strong by cutting the populations, the determination of Ψ(s) would be restricted to ˆ we the interval [max TC , min TF ]. By applying precisely this time delay correction to N solve these two problems. First, we give more importance precisely to the region where the population growth is exponential. Second, we omit naturally the very first initial times of the evolution of our populations. As we mentioned in section 2.3, the inverse of the difference between the eigenvalues of Ws (equation (8)) tgap allows us to define the typical convergence time to the large time behaviour for equation (7). A crucial remark is that, as observed numerically, the duration before the population enters into the exponential regime is in fact larger than the time scale given by the gap: for instance, for the parameters used to obtain figure 4, from equation (10) one has tgap ≈ 0.804. The understanding of the duration of this discreteness effects regime would require a full analysis of the finite-population dynamics and its associated discreteness effects, which are not fully understood. We propose in this section a numerical procedure to reduce its influence. 5.2. Log-Population Variance As can be seen from figure 4, and as it is proved in figure 5, the variance of logpopulations (black) increases as a function of the time, faster during the transient regime, and slower during the exponential growth regime until the variance becomes constant. After the time-delay correction, the variance of the delayed log-population (blue) decreases to zero as a function of time. The s-dependent decrease rate is shown in figure 5(b).
0.2
−1
10
0.18 0.16
−2
10
0.14 0.12
Decrease Rate:
−3
10
0.1 0.08
−4
10
0.06 0.04
−5
10
0.02 0
20
40
60 Time
80
(a) Log-Population Variance
100
120
0
20
40
60 Time
80
100
120
(b) s - Dependent Decrease Rate
Figure 5. (a) Variance of the log-populations (black) and the delayed log-populations (blue) as a function of time. The variance of log-populations increases (or decreases, after the time transformation) as function of time. (b) Log-population variance in semi-log scale. (s = −0.1).
Discreteness Effects in Population Dynamics
12
6. Ψ(s) Before and After the Time Delay As we discussed in section 3.1, the large deviation function Ψ(s) can be recovered from the slope in time of the logarithm of the average population. We also mentioned in section 3.2, an alternative we can consider to overcome the discreteness effects would be to eliminate the initial transient regime where these effects are strong. As we will synthesize later, the improvement in the estimation of Ψ(s) comes precisely from these two main contributions, the time delaying of populations and the discarding of the initial transient regime of the populations. Let’s call Ψ(s) the analytical prediction for the large deviation function (given by equation (9)). Ψnum (s) is obtained from the slope of the logarithm of the average population (computed from merging several populations that have been generated using ˆ , as the cloning algorithm). Ψτ (s) is obtained through a time delay procedure over N was described above. These two numerical estimations are in fact averages over R realizations and over their last γ values. The method how Ψnum (s) and Ψτ (s) are computed is explained below. 6.1. Numerical Estimators for Ψ(s) Let’s call Ψ∗ (CN ) an estimation of Ψ (by some method (∗) ∈ {num, τ }) as a function of the cut in log-population CN . If we consider CN as CN = {CN1 , ..., CNΓ } a set of Γ cuts, Ψ∗ (CN ) is in fact Ψ∗ (CN ) = {Ψ∗ (CN1 ), ..., Ψ∗ (CNΓ )}. If [Ψ∗ (CNi )] is an average over R realizations, R 1X r i i Ψ (C ) Ψ∗ (CN ) = R r=1 ∗ N
(15)
our numerical estimation (for a given s) is then computed from an average of [Ψ∗ (CNi )] over its last γ values, i.e., Γ Γ R 1 X X r i 1 X i Ψ∗ (s) = Ψ∗ (CN ) = Ψ (C ) γ i=Γ−γ γR i=Γ−γ r=1 ∗ N
(16)
as is shown in figure 6. More details of the determination of these estimators are given in the subsection below. 6.2. Comparison between“Bulk” and “Fit” estimators of Ψ(s) The estimators we defined in the last subsection can be obtained from the “bulk” slope (figure 7(a)) given by equation (6) and from the slope that comes from the affine fit ˆ (s, t) = mt + b (figure 7(b)). Figure 7 shows the of the average log-population by N average over R = 40 realizations of the numerical estimators Ψnum (CN ) and Ψτ (CN ) as a function of the cut in log-population for s = −0.1. As before, [Ψτ (CN )] is shown in blue and [Ψnum (CN )] (without the “time delay”) is shown in black. As we already
Discreteness Effects in Population Dynamics
13
0.045
num
0.0448
[ ]
0.0446 0.0444
num
0.0442 0.044 2
2.5
3
3.5
4
4.5
5
Figure 6. Numerical estimations of Ψ(s = −0.1) as a function of the cut CN in (log) population. [Ψτ (CN )] is shown in blue and [Ψnum (CN )] in black for R = 40. The i ) over numerical estimations Ψnum and Ψτ are computed from an average of Ψ∗ (CN its last γ = 6 values. The subscript “ ∗ ” denotes “num” or “τ ”.
mentioned, the estimation for Ψ becomes better if we discard the initial transient regime where the discreteness effects are strong. The black curves in figure 7 represent the standard way of estimating Ψ which come from the slope of the average (log) population, shown in dark green in figure 4(a) for one realization. We can observe the effect of discarding the initial transient regime of these populations by cutting systematically this curve and computing Ψnum (CN ) from the growth rate m computed on the interval [CN , Nmax ]. Independently if Ψnum (CN ) is computed from the “bulk” slope or by the “fit” slope, for appropriate values of CN , Ψnum (CN ) becomes closer to the theoretical value. Additionally to this result, we can add the “time correction” or “delay” we proposed in section 5.1 and as can be seen in the blue curves in figure 7, the estimation Ψτ (CN ) is even better and closer to the theoretical value than Ψnum (CN ) for all CN . Once we have proved that the estimation of Ψ becomes better when we discard the initial times where the discreteness effects are strong and when we perform a “time delay” over our populations in order to give more weight to the final instances of our populations, the question that remains is related to what we should consider as Ψnum (s) and Ψτ (s). As we showed in figure 6, Ψnum (s = −0.1) and Ψτ (s = −0.1) are computed from an average over the last γ values of [Ψτ (CN )] and [Ψnum (CN )]. Below, we repeat this procedure and compute these estimators for several values of s, s ∈ [−0.3, −0.05]. The improvement in the determination of the ldf is measured through the relative distance of the numerical estimations with respect to the theoretical values and their errors.
Discreteness Effects in Population Dynamics 0.0454
14 0.0454
num
0.0452
0.0452
0.045
0.045
0.0448
0.0448
0.0446
0.0446
0.0444
0.0444
0.0442
0.0442
0.044
0.044
0.0438
0.0438
0.0436
0.0436
0.0434 2
2.5
3
3.5
4
4.5
num
0.0434 2
5
2.5
(a) “Bulk” slope
3
3.5
4
4.5
5
(b) “Fit” slope
Figure 7. Average over R = 40 realizations of the numerical estimators Ψnum (CN ) and Ψτ (CN ) as a function of the cut in log-population for s = −0.1. The estimation for Ψ becomes better if we discard the initial instances where discreteness effects are strong.
6.3. Relative Distance and Estimator Error The relative distance Ψ(s) − Ψ∗ (s) D(Ψ(s), Ψ∗ (s)) = Ψ(s)
(17)
between the estimator Ψ∗ (s) and the theoretical value Ψ(s) is shown in figure 8. −3
3
x 10
−3
3
x 10
num
num
2.5
2.5
2
2
1.5
1.5
1
1
0.5 0
0.5 −0.3
−0.25
−0.2
s
−0.15
−0.1
0
−0.05
(a) “Bulk” slope
−0.3
−0.25
−0.2
s
−0.15
−0.1
−0.05
(b) “Fit” slope
Figure 8. Relative distance D(Ψ(s), Ψ∗ (s)) between the estimator Ψ∗ (s) and the theoretical value Ψ(s). The deviation from the theoretical value is larger for values of s close to 0, but is smaller after the “time delay correction” for almost every value of s
.
Discreteness Effects in Population Dynamics
15
These distances were also computed from the “bulk” (a) and the “fit” slope (b) and with (blue) and without time delay (black). As we can observe, the deviation from the theoretical value is larger for values of s close to 0, but is smaller after the “time correction” for almost every value of s. In figure 9 we present the estimator error for Ψ(s) defined as σΨ (18) = √∗ R where R is the number of realizations and σΨ∗ is the standard deviation of Ψ∗ (s). Similarly as in previous results, the estimator error decreases as s approaches to 0 (for both slopes) and it is always smaller for Ψτ (s) for any value of s. −5
7
−5
x 10
7
x 10
num
num
6
6
5
5
4
4
3
3
2
2
1
1
0
−0.3
−0.25
−0.2
s
−0.15
−0.1
0
−0.05
(a) “Bulk” slope
−0.3
−0.25
−0.2
s
−0.15
−0.1
−0.05
(b) “Fit” slope
Figure 9. Estimator error for Ψ(s), num (black) and τ (blue). The estimator error decreases as s approaches to 0 (for both slopes) and it is always smaller for Ψτ (s) for any value of s.
.
7. Time Delay Properties In this section we analyse properties of the distribution of time delays ∆τ (s) = {∆τ1 (s), ..., ∆τJ (s)}. This distribution has been centered with respect to its mean. In figure 10(a), we show the variance σs2 [∆τ ] of the time delay distribution ∆τ (s). As we can see the dispersion of time delays is large for values of s close to 0 and decreases quickly as −s increases. This is understood by observing that the typical growth rate [rs (C) − r(C)] of the cloning algorithm goes to zero as s → 0 inducing a longer transient regime between the small and large population regimes. When we plot the variance in log-log scale, as in figure 10(b), we can observe two linear regimes, one characterized by an exponent m1 ≈ −2.877 (s ∈ [−0.15, −0.3]) and the other by m2 ≈ −2.4214 (s ∈ [−0.05, −0.15]). They correspond to power-law behaviours in time of the variance of the delays, which remain to be understood.
Discreteness Effects in Population Dynamics
16 6.5
600
6 500
Fitting 1 Fitting 2
5.5 5
400
4.5 300
4 3.5
200
3 2.5
100
2 0 0.05
0.1
0.15
−s
0.2
(a) Time Delay Variance
0.25
0.3
1.5 −3
−2.8 −2.6 −2.4 −2.2
−2
−1.8 −1.6 −1.4 −1.2
(b) Time Delay Variance in log-log scale
Figure 10. (a) Time delay variance σs2 [∆τ ]. The dispersion of the time delays is large for values of s close to 0 and decreases rapidly as −s increases. (b) Time delay variance regimes, one characterized with m1 ≈ −2.877 (s ∈ [−0.15, −0.3]) and the other with m2 ≈ −2.4214 (s ∈ [−0.05, −0.15]).
This dependence of the dispersion of time delays with s can be better seen in the distribution of time delays Ps (∆τ ) shown in figure 11 for various values of s. This distribution is wider for values of s closer to zero (figure 11(a)). However if we rescale the distributions of time delays by their respective σs , as shown in figure 11(b), the ∆τ distributions become independent of s as Ps (∆τ ) = σs [∆τ ] Pˆ σs [∆τ ] . This provides a strong numerical evidence supporting the existence of a universal distribution Pˆ . 8. Discussion In this paper we analysed the discreteness effects at initial times in population dynamics. During the initial transient regime of the evolution of populations, there is a wide distribution of times at which the first series of jumps occurs. This means that fluctuations at initial times produce that some populations remain in their initial states for much longer than others, producing a gap in their individual evolution. This induces a relative shift that lasts forever. These effects play an important role specially for the determination of the large deviation function which may be obtained from the growth rate of the average log-population (section 2). However, in section 3.2 we saw how by restricting the evolution of our populations up to a maximum time Tmax (or population Nmax ) which is not “large enough”, the average population (and Ψ(s)) is strongly affected by the behaviour of N at initial times. We proposed as an alternative to overcome the influence of initial discreteness effects to get rid of the regions of the populations where these effects are present. In other words, to cut the initial transient regime of the populations. In that case, we saw that the average of populations is restricted to the interval [max TC , min TF ] which can
Discreteness Effects in Population Dynamics
17 0.5
0.2
s = −0.3 s = −0.2 s = −0.1
0.18 0.16
0.4
0.3
0.12 0.1
0.25
0.08
0.2
0.06
0.15
0.04
0.1
0.02
0.05
−50
−1
10
0.35
0.14
0
s = −0.3 s = −0.2 s = −0.1
0.45
−40
−30
−20
−10
0
10
(a) Time Delay Distribution
20
30
0 −8
−2
10
−3
10
−8
−6
−6
−4
−2
0
−4
2
4
−2
0
(b) Rescaled Distribution Pˆ
2 ∆τ σs [∆τ ]
4
Figure 11. (a) Distribution of time delays for different values of s. The dispersion of time delaysis wider for values of s closer to zero. (b) Rescaled distribution of ∆τ ˆ time delays P σs [∆τ ] . The distribution of time delays depends only on their σs as Ps (∆τ ) = σs [∆τ ] Pˆ σs∆τ [∆τ ] .
be in fact very small and this can induce a poor estimation of Ψ(s) (Figure 1(b)). Complementary to this, we found a way of emphasizing the effects of the exponential growth regime in the determination of Ψ(s) by using the fact that log-populations after a long enough time become parallel (figure 2(a)) and that once the populations have overcome the discreteness effects, the distance between them becomes constant (figure 2(b)) and the discreteness effects are not strong anymore (section 4). We argue in section 5.1 that this initial discreteness effects or initial “lag” between populations could be compensated by performing over the populations a time translation (equation (14)). This time delay procedure is chosen so as to overlap the population evolutions in their large-time regime (figure 4(b)). The improvement in the estimation of Ψ comes precisely from these two main contributions, the time delaying of populations and the discarding of the initial transient regime of the populations. We showed how the the numerical estimations for the ldf are improved as the initial instances of the populations are discarded (independently of the method used to compute the growth rate of the average population, see figure 7). Also, it is was shown that if additionally, we perform the time delay procedure, the estimation of Ψ is improved even more and closer to the theoretical value (section 6.2). This result was confirmed later in section 6.3 by computing the relative distance of the numerical estimators with respect to the theoretical value and their errors. As we observed (figure 8), the deviation from the theoretical value is higher for values of s close to 0, but is smaller after the “time correction” for almost every value of s. Similarly for the error estimator (figure 9). Our numerical study was performed on a simple system, and we hope it can be extended to more complex phenomena. However, there remain open questions even
Discreteness Effects in Population Dynamics
18
for the death-and-birth system we have studied. The duration of the initial discretepopulation regime could be understood from an analytical study of the population dynamics itself. Our numerical results also support a power-law behaviour in time of the variance of the delays. Furthermore, it appeared that the distribution of the delays takes a universal form, after rescaling the variance to one. Those observations open questions for future studies. Acknowledgements Esteban Guevara thanks Khashayar Pakdaman for his support and discussions. This project was partially funded by the PEPS LABS and the LAABS Inphyniti CNRS projects. Special thanks to the Ecuadorian Government and the Secretar´ıa Nacional de Educaci´on Superior, Ciencia, Tecnolog´ıa e Innovaci´on, SENESCYT. References [1] W. Cochran, W., Sampling Techniques. Wiley Eastern, New Delhi (2007). [2] L. O. Hedges et al., Dynamic Order-Disorder in Atomistic Models of Structural Glass Formers, Science 323, 1309 (2009). [3] T. Speck et al., First-Order Phase Transition in a Model Glass Former: Coupling of Local Structure and Dynamics, Phys. Rev. Lett. 109, 195703 (2012). [4] D. Aldous and U. Vazirani, Go with the winners algorithms, in Proc. 35th IEEE Sympos. on Foundations of Computer Science (1994) [5] P. Grassberger, Go with the winners: a general Monte Carlo strategy, Comp. Phys. Comm. 147 64 (2002). [6] C. Giardin` a, J. Kurchan and L. Peliti, Direct evaluation of large-deviation functions, Phys. Rev. Lett. 96 120603 (2006). [7] V. Lecomte and J. Tailleur. A numerical approach to large deviations in continuous time, J. Stat. Mech. 2007, P03004 (2007). [8] C. Giardin` a, J. Kurchan, V. Lecomte and J. Tailleur. Simulating Rare Events in Dynamical Processes. J. Stat. Phys. 145, 787 (2011). [9] P. Del Moral, A. Doucet A., A. Jasra, J. R. Stat. Soc., Ser. B, Stat. Methodol. 68, 411 (2006). [10] P. I. Hurtado and P. L. Garrido, Test of the Additivity Principle for Current Fluctuations in a Model of Heat Conduction, Phys. Rev. Lett. 102, 250601 (2009). [11] P. I. Hurtado and P. L. Garrido, Current fluctuations and statistics during a large deviation event in an exactly solvable transport model, J. Stat. Mech. P02032 (2009). [12] F. C´erou, A. Guyader, T. Leli`evre, and D. Pommier, A multiple replica approach to simulate reactive trajectories, J. Chem. Phys. 134, pp. 054108 (2011). [13] E. Weinan and E. Vanden-Eijnden, Towards a Theory of Transition Paths, J. Stat. Phys. 123, 503 (2006). [14] B. Derrida, J.L. Lebowitz, Exact large deviation function in the asymmetric exclusion process, Phys. Rev. Lett. 80, 209 (1998). [15] B. Derrida, Microscopic versus macroscopic approaches to non-equilibrium systems, J. Stat. Mech. P01030 (2011). [16] L. Bertini, A. De Sole, D. Gabrielli, G. Jona-Lasinio, and C. Landim, Macroscopic fluctuation theory, Rev. Mod. Phys. 87, 593 (2015). [17] J. K. Weber et al., Emergence of Glass-like Behavior in Markov State Models of Protein Folding Dynamics, Am. Chem. Soc. 135, 5501 (2013).
Discreteness Effects in Population Dynamics
19
[18] S. Vaikuntanathan et al., Dynamic phase transitions in simple driven kinetic networks. Phys. Rev. E 89, 062108 (2014). [19] J. K. Weber et al., Heat dissipation guides activation in signaling proteins, PNAS 112, 10377 (2015). [20] R. Chetrite, H. Touchette, Nonequilibrium Markov Processes Conditioned on Large Deviations, Ann. Henri Poincare 16, 2005 (2015). [21] J. B. Anderson, A random-walk simulation of the Schr¨odinger equation: H3+ , J. Chem. Phys 63, 1499 (1975). [22] J. Tailleur and V. Lecomte. Simulation of large deviation functions using population dynamics. AIP Conf. Proc. 1091, 212 (2009).