Sign-changes as a universal concept in first-passage time calculations

First-passage time problems are ubiquitous across many fields of study including transport processes in semiconductors and biological synapses, evolutionary game theory and percolation. Despite their prominence, first-passage time calculations have proven to be particularly challenging. Analytical results to date have often been obtained under strong conditions, leaving most of the exploration of first-passage time problems to direct numerical computations. Here we present an analytical approach that allows the derivation of first-passage time distributions for the wide class of non-differentiable Gaussian processes. We demonstrate that the concept of sign changes naturally generalises the common practice of counting crossings to determine first-passage events. Our method works across a wide range of time-dependent boundaries and noise strengths thus alleviating common hurdles in first-passage time calculations.

The seminal work by Wiener and Rice [36,37] has been instrumental in advancing our understanding of FPT problems. They derived a series representation of the FPT distribution for a sufficiently smooth stationary stochastic process through a constant boundary. A common interpretation of this smoothness condition is that the stochastic process is differentiable in the mean-square sense. For a stationary stochastic process, differentiability arises from the behaviour of its covariance function at the origin. If it is differentiable there, the process is differentiable in the mean square sense [38]. Interestingly, this condition is already violated for any diffusion process * wilhelm.braun@uottawa.ca based on Brownian motion [39], most notably the ubiquitous Ornstein-Uhlenbeck process (OUP) and geometric Brownian motion.
A distinct advantage of the Wiener-Rice approach is that it often gives rise to compact analytical expressions, which in turn provide great insight into the stochastic system under investigation, as e.g. illustrated in [40,41]. In this paper, we show how the concepts that underlie the Wiener-Rice series can be generalised to nondifferentiable stochastic processes with arbitrary boundaries, thus translating the versatility and efficacy of the Wiener-Rice approach to a much enhanced range of physically relevant dynamics.

II. SIGN CHANGING PROBABILITIES
Consider a stationary stochastic process X(t) and a time-dependent boundary S(t). Let N ([0, t]) denote the number of crossings of X(t) and S(t) in a fixed interval [0, t]. If X(t) is differentiable, the mean number of crossings of X(t) through S(t) in any given finite time interval is always finite, i.e. E{N ([0, t])} < ∞ [36,37]. This entails that we can count the number of crossings, and in particular that there is at most one crossing within a sufficiently small time interval of length ∆. When we introduce the new process Z(t) = X(t) − S(t), we see that Z(t) changes sign as soon as X(t) crosses through S(t), and hence instead of counting crossings, we could count sign changes. If X(t) is non-differentiable, Rice's seminal work shows that E{N ([0, t])} = ∞. While this seems counterintuitive, infinite means are not uncommon in physics. A prominent example are power-law probability distributions of the form p(x) ∼ x −α , α > 0 [42] [43]. The divergence of E{N ([0, t])} does not allow us to count the number of crossings or sign changes anymore. In particular, the divergence holds for any t > 0, so we cannot choose an infinitesimal time interval ∆ to overcome it. In turn, this prevents us from using the original results by Wiener and Rice.
Progress can be made here by a change of perspective. We generally identify a crossing event in some interval [t, t + ∆] with Z(t) and Z(t + ∆) having opposite signs, i.e. we evaluate Z at the end points of the interval. For sufficiently small ∆ and a differentiable stochastic process, this is equivalent of a crossing anytime during the interval and hence justifies the practice of evaluating Z at the end points. For a non-differentiable stochastic process, we can still evaluate Z(t) and Z(t + ∆) and check for sign changes. The only difference is that this does not inform us about the number of crossings, but about the existence of at least one crossing. Given a sufficiently small ∆, this is the key information for practical calculations. Sign changes of Z(t) and Z(t + ∆) can therefore be used to identify FPTs for both differentiable and nondifferentiable stochastic processes.
The versatility of sign changes in computing FPTs is best illustrated with cases that cannot be solved with existing analytical techniques, yet frequently occur in applications. Figure 1 shows prototypical examples to which current approaches cannot be applied since the boundaries are neither convex nor concave. These boundaries can be found in areas as diverse as neuronal dynamics (Fig. 1a) and molecular transition theory (Fig. 1b). It is worth pointing out that the boundary in Fig. 1a originates from transforming a FPT problem for a driven stochastic system with constant threshold. In general, these problems cannot be solved analytically due to the explicit time-dependence of the stochastic dynamics [44]. However, by shifting the time-dependence to the threshold as we do here, the problem becomes analytically tractable. The example in Fig. 1b illustrates motion in a complex energy landscape with a time-dependent metastable state [45,46]. While this is most reminiscent of problems in physical chemistry, the same scenario occurs in general phase space dynamics [47].
The specific FPT problem that we will investigate is to determine when a Gaussian process X(t), whose initial value is drawn from its stationary distribution, crosses through S(t) from above for the first time, i.e. we are interested in the random variable T = inf {t > 0|X(t) ≤ S(t)} with a corresponding probability distribution F(t). While the theory presented here is valid for any Gaussian process, we will illustrate our results with an OUP given its prominence across so many fields of study. The dynamics of the OUP is governed by where W (t) is a standard Brownian motion, v is the mean of the OUP and τ , D > 0. The stationary variance and correlation coefficient of the OUP are given by Dτ /2 and exp(−|t|/τ ), respectively.
To begin our analysis, we define the conditional sign change probability p +− (t|x 0 ) = P(Z(t) > 0, Z(t + ∆) < 0|x 0 ), i.e. the probability of a sign change in [t, t + ∆] given a value of tional bivariate probability function of X(t), we see that Note that Eq. (2) is always well defined and does not rely on whether X(t) is differentiable or not. Since X(t) is Gaussian, f 2 is Gaussian again, and the corresponding mean and covariance matrix can be obtained in closed form. By expanding the integrals in Eq. (2) to lowest orders in ∆ following [48], we find where , and ρ(t) and σ 2 denote the correlation coefficient and the variance of X(t), respectively. Hence, p +− (t|x 0 ) = σ ∆/(πτ )f 1 (S(t)|x 0 ), where f 1 presents a conditional univariate Gaussian probability function. The value of x 0 has been fixed but arbitrary so far. By integrating it out we obtain the probability I 1 (t) = ∞ 0 p +− (t|x)p(x)dx for a sign change in the interval [t, t+∆]. Since both p(x) and p +− (t|x) are Gaussian, the integral can be performed analytically, and we arrive at where and ω(t) = ρ(t)(v − S(t))/σ 2 1 (t). We compare the analytical expression for I 1 with direct Monte-Carlo (MC) simulations in Fig. 2 for the two choices of S(t) shown in Fig. 1. The agreement is excellent, capturing the multimodal character of the crossing probability induced by the non-monotonicity of S(t) and spanning more than three orders of magnitude, with probabilities reaching values smaller than 10 −5 .

III. FPT PROBABILITIES
From a conceptual point of view, I 1 (t) corresponds to the first term J 1 (t) of the FPT expansion derived by Wiener and Rice. Their original results for the full FPT distribution F(t) that measures crossings in the interval [t, t + ∆] can be expressed as  Fig. 1a (a,b) and Fig. 1b (c,d) obtained from MC simulations (solid grey line), Eq. 4 (dashed green line) and Eq. 9 (green circles).
where J n (t) = ∞ k=n q k (t)(k − 1)!/(k − n)! and q n (t) denotes the probability of n crossings during the time [0, t + ∆] including one in [t, t + ∆]. Therefore, J 1 (t) = ∞ k=1 q k (t) represents the probability of a crossing in [t, t + ∆] irrespective of how many other crossings have occurred prior to t. In comparison, I 1 (t) measures the probability of a sign change in [t, t + ∆] regardless of the behaviour of X(t) before t. Therefore, we expect I 1 (t) to constitute a first order approximation G 1 (t) of F(t): F(t) ≈ G 1 (t) = I 1 (t). This is confirmed in Fig. 3.
For ease of comparison, we provide separate panels for the first two peaks of the FPT distribution for both boundaries shown in Fig. 1. For all cases G 1 (t) lays on top of MC results and only starts to overestimate F(t) for times very close and larger than the local maximum of the FPT distribution. This is analogous to the Wiener-Rice expansion. For later times, it becomes more likely that the detected sign changes are not the first ones and hence do not constitute a FPT. We therefore count too many trajectories in G 1 (t). To alleviate this problem, we need to subtract the probability for the trajectories that we falsely included in G 1 (t). The leading correction term to G 1 (t) accounts for all trajectories that have sign changes in [t, t + ∆] and [s, s + ∆] for s < t [40]. Let p +−+− (s, t|x 0 ) = P(X(s) > S(s), X(s + ∆) < S(s + ∆); X(t) > S(t), X(t + ∆) < S(t + ∆)|x 0 ) denote the probability for sign changes in two disjunct intervals, then where p +− (s|x 0 , x 3 , x 4 ) is defined analogously to Eq. (2), the only difference being that here we condition on three instead of one value of X(t). By expanding Eq. (6) to lowest order in ∆ and using Eq. Since p +−+− is a Gaussian, we can again integrate out the dependence on x 0 to obtain the probability I 2 (s, t) = ∞ 0 p +−+− (s, t|x)p(x)dx for sign changes in two disjunct intervals [s, s + ∆] and [t, t + ∆] in closed form We provide details for E(s, t), F (s, t) and G(s, t) in the Appendix. Note the structural similarity between Eqs. (4) and (8). In Fig. 4 we plot I 2 (s, t) as a function of s for fixed values of t. There is almost no difference between the analytical expression and direct MC simulations, with the agreement ranging over three orders of magnitude in Fig. 4b. For a first-passage event at time t, second crossings can happen at any moment s < t. Therefore, we obtain the second order approximation G 2 (t) of F(t) by summing I 2 (s, t) over all possible values of s that are commensurate with ∆ and subtract this probability from G 1 (t): where we respect the strict inequality n∆ < t. Figure 3 shows that G 2 (t) provides a significantly improved approximation of F(t) as compared with G 1 (t). Note that G 2 (t) generally captures the rising phase of the FPT distribution very well, even including the maximum in Fig. 3b. This behaviour is consistent with other, although technically more limited, series expansions [49,50]. While G 1 (t) tends to overestimate F(t), G 2 (t) underestimates the true FPT statistics when it deviates at larger times. This is expected since we subtract too many trajectories in the computation of G 2 (t) [40], and can be remedied by including higher order terms in our expansion. A particularly useful property of our approach is that it allows for explorations beyond the small noise limit. Figure 5 shows results when the noise strength D is increased by a factor of 5 above an already moderate noise level. As expected, the FPT distributions shift to smaller times for stronger noise, but the the agreement between numerics and analytics persists.
For the computation of I 1 (t) and I 2 (s, t) we integrated out the dependence on the initial values of the OUP. This could be done analytically since the OUP was initially Gaussian distributed. As the theory stands it can equally well deal with highly skewed initial distributions or sharp initial values as e.g. used in [51]. As an illustration of this point, we chose x 0 ∈ [v + 2, v + 2.1], which corresponds to a strongly localised initial distribution. Figure 6 shows results for I 1 (t) and F(t). For the analytical results, we used p(x 0 ) = δ(v + 2 − x 0 ) due to the narrow support of the distribution of x 0 . We observe reasonably good agreement between numerical and analytical results. Importantly, the theory is able to capture the small peak in the FPT distribution just before t = 2. The main reason for the difference between the analytical and numerical results lies in the MC error. Indeed, the discrepancy between the analytical and numerical value for I 1 (t) in Fig. 6a at times t ≈ 2 and t ≈ 14 decreases with more MC realisations and hence is not a systematic error of the approach.

IV. DISCUSSION AND CONCLUSION
In the present work, we have derived an analytical approach to FPT calculations for stationary nondifferentiable Gaussian processes. Using the concept of sign changes, the results presented here overcome the often strong limitations of existing analytical techniques, such as convexity of the boundary, time scale separations or crossings being rare [24,37,49,52], and allow us to construct high-fidelity approximations of the full FPT statistics, which are notoriously hard to compute. Our approach is based on the ideas of Wiener and Rice to appropriately count random trajectories and thus demonstrates that their seminal concept for differentiable Gaussian processes can be generalised to nondifferentiable stochastic processes. Given that the computation of G 2 (t) is entirely based on the evaluation and summation of Gaussian distributions, it is numerically fast and allows us to accurately describe events even when they occur with low probability, for which MC sim-ulation are numerically expensive. While we illustrated our approach with the OUP, it works for any Gaussian process since equations (3) and (6) do not assume a specific form of the correlation coefficient ρ(t). What the time-dependence of ρ(t) determines is the scaling of I 1 (t) and I 2 (s, t) with ∆. Interestingly, for the OUP with ρ(t) ∼ exp(−|t|), we find I 1 (t) ∼ √ ∆ when t > ∆/2, a condition that is almost always satisfied due to the smallness of ∆. By changing the correlation coefficient such that the stochastic process becomes differentiable, e.g. the widely used ρ(t) ∼ exp(−t 2 ), we recover the original findings by Wiener and Rice [48].
To illustrate the versatility of our approach, we chose examples to which, to the best of our knowledge, current analytical methods cannot be applied since the time dependent boundaries are neither convex nor concave. It might therefore be tempting to consider the stochastic process Z(t) as introduced in Sec. II, which is the difference between the stochastic process X(t) and the time dependent boundary S(t). Consequently, the FPT problem for Z(t) involves a constant boundary at 0. However, the stochastic differential equation for Z(t) is explicitly time-dependent, which again renders the problem analytically intractable under general conditions [44].
In the past, non-differentiable stochastic processes have often been dealt with by transforming them into differentiable versions via smoothing. This is usually done by either convolving the non-differentiable stochastic prcess with a kernel or by filtering the correlation function in frequency space [53,54]. This requires firstly to find appropriate kernels or filters, and secondly to determine a bandwidth or cut-off frequency. This is not a trivial task, and often choices can only be justified a posteriori. From a practical point of view, this is a severe limitation. In contrast, the approach presented here works directly with the original non-differentiable stochastic process and thus avoids any of these complications.
On theoretical grounds, we expect that the dominant contribution of I 1 is in determining the rising phase of the peaks of the FPT distribution. This is well captured by the results shown in this study. Recently, the concept of few encounters has been introduced [55], and it was shown that the left part of the peaks of the FPT distribution is essential. Given the compact expression for I 1 , our results may prove useful in studying few encounters in more detail.
While we have focussed on stationary stochastic processes, an intriguing avenue for future research concerns the generalisation of our findings to non-stationary stochastic processes. The starting point is Eq. (3), but now both the mean and the standard deviation become time-dependent. Results analogous to Eqs. (4) and (8) would highlight the conceptual elegance of sign changing probabilities and moreover demonstrate that sign changing probabilities are a powerful and practical concept for investigating FPT and general level crossing [56,57] problems.