Stochastic non-attractor inflation

We extend the formalism of stochastic inflation to the setup of non-attractor inflation with a sound speed $c_s$. We obtain the Langevin equations for the superhorizon perturbations and calculate the stochastic corrections to curvature perturbation power spectrum. It is shown that the fractional stochastic corrections in mean number of e-folds and power spectrum are at the order of power spectrum. We also calculate the boundary crossing and the first hitting probabilities in a hypothetical dS space with two boundaries in field space. Furthermore, the stochastic corrections in power spectrum in a setup akin to eternal inflation with large diffusion term are calculated.


Introduction
Currently inflation is the leading paradigm for the dynamics of early Universe cosmology. While it is still at the phenomenological stage and a deeper theoretical understanding of the mechanism behind the dynamics of inflation is missing, but its basic predictions are well consistent with cosmological observations [1,2]. Among the basic predictions of models of inflation are that the primordial perturbations are nearly Gaussian, nearly adiabatic and nearly scale invariant.
In its simplest realization, inflation is driven by a scalar field which slowly rolls on top of its nearly flat potential. Usually, it is assumed that the inflaton field has reached to its attractor phase in which the dynamics of the system is purely determined by the value of the field, φ(t) while the velocity of the fieldφ(t) does not play roles. In other words, while the general phase space of the inflaton field is two-dimensional spanned by the variables (φ(t),φ(t)), but the attractor phase is a one-dimensional subset of the phase space in which the value of the field plays the role of the clock, determining the whole dynamics of the system. This is well justified with the basic picture in which inflation is insensitive to classical histories so the attractor phase is the generic outcome of the inflationary dynamics.
The simplest model of non-attractor inflation is the so called ultra slow-roll (USR) inflation in which the potential is very flat in a finite range of the field values so the kinetic energy falls off exponentially [3][4][5][6][7]. In USR model, the would-be decaying mode of curvature perturbation (which is discarded in slow-roll models) is actually the growing mode. As a result, the curvature perturbation is not frozen on super-horizon scales and it undergoes an exponential growth. This is the key phenomenon distinguishing non-attractor models from the single field slow-roll scenarios which brought interests into models of non-attractor inflation in recent years. In particular, models of non-attractor inflation are among the very few known examples in literature which violate Maldacena's consistency condition [8]. Based on Maldacena's consistency condition, one can rule out "all" models of single field inflation if local-type non-Gaussianity is observed with the amplitude f N L 1. However, non-attractor models violate Maldacena's consistency condition exactly because the curvature perturbations are not frozen on super-horizon scales [4]. Technically speaking, while the non-attractor setup is still a single field model but it is not a single clock setup which was implicitly assumed in deriving Maldacena's consistency condition. This is because during the non-attractor regime the phase space is two-dimensional determined jointly by (φ(t),φ(t)) and one can not use φ(t) solely as the clock to parametrize the evolution of the system.
One drawback of the USR setup is that inflation does not end and the curvature perturbations grow indefinitely. To remedy these problems, one has to terminate the non-attractor phase say e. g. by a waterfall mechanism. In this picture, the whole inflationary period has two stages. The first stage is the non-attractor phase which lasts for a few e-folds. This is followed by the second stage which is in attractor phase yielding a long period of slow-roll inflation. In principle, the transition from non-attractor phase to attractor phase can have important effects on the final curvature perturbations [9,10].
In USR setup with a flat potential, one may worry that the stochastic quantum fluctuations of the inflaton field may build up and have non-trivial effects on curvature perturbation power spectrum. Indeed, there have been interests in literature on the possibility of generating large curvature perturbations in USR setup on a window of scales as seeds for primordial black hole formation during inflation [11,12], see also [13][14][15]. In [16] we have studied the quantum diffusion effects associated with the inflaton quantum fluctuations in the USR setup. Using the stochastic δN formalism the corrections in curvature perturbations power spectrum and bispectrum are studied systematically. It was shown that the stochastic effects are sub-leading in power spectrum and bispectrum. More specifically, the fractional corrections in power spectrum and bispectrum are at the order of power spectrum and therefore are negligible. In this paper we extend the analysis of [16] to the P (X) model of non-attractor inflation in which the inflaton field has non-standard kinetic energy. The P (X) non-attractor inflation model was studied in [17,18] as an extension of simple USR setup where the sound speed of the cosmological perturbations c s plays non-trivial roles in curvature perturbations and the amplitude of non-Gaussianity.
The rest of the paper is organized as follows. In section 2 we present the formalism of stochastic inflation which will be used for the P (X) setup presented in section 3. In section 4 we calculate the mean number of e-folds and the power spectrum using stochastic δN formalism. In section 5 we calculate the first hitting probabilities and the first boundary crossing for the classical motion and quantum jumps. In section 6 we consider the stochastic effects in the new limit of large diffusion term followed by summary and conclusions in section 7. Some technicalities of stochastic calculus and the sub-leading corrections of analysis in section 6 are relegated to appendices A and B respectively.

Stochastic Inflation
Here we briefly present the formalism of stochastic inflation which we employ in models of inflation with non-standard kinetic terms. Stochastic inflation formalism for a field with a non standard kinetic term was studied in the context of DBI inflation in [19].
In stochastic formalism, the quantum fluctuations of light scalar fields, such as the inflaton field, are decomposed into the long and short wavelengths perturbations. The small scale perturbations inside the Hubble horizon act as active source of noises for long mode perturbations outside the Hubble horizon. In a inflationary background with a near dS like background, these noises are Gaussian with the amplitude H/2π in which H is the Hubble expansion rate during inflation. For various works related to stochastic inflation see .
The model we are interested in enjoys a shift symmetry so the action is a function of X ≡ − 1 2 g µν ∂ µ φ∂ ν φ and there is no dependence on φ. In particular, as in USR model, the potential is flat, V = V 0 . The USR setup is a particular example with P = X which was studied in our previous work. The shift symmetry employed here is for simplification in order to handle the equations analytically. However, there is no limitation in employing stochastic formalism to general case in which the action is a function of φ with P = P (X, φ). Models with non-standard kinetic energy, such as DBI inflation, have been extensively studied in literature. One important prediction of these models is that large equilateral type non-Gaussianity can be generated with the amplitude of non-Gaussianity proportional to 1/c 2 s in which c s is the sound speed of scalar perturbations where P ,X denotes a derivative with respect to X and so on. The action is given by where R is the Ricci scalar with the reduced Planck mass set to unity, M P = 1. Starting with the FLRW metric the scalar field equation is given by in which a dot denotes the derivative with respect to t and H =ȧ(t)/a(t) is the Hubble expansion rate. Following [23,24], we split φ and its time derivative v ≡φ into the short and long wavelengths as follows in which the labels l and s denote the long and short modes respectively. To specify the quantum natures of the short modes we have inserted the factor √ in Eqs. (2.5) and (2.6). With this decomposition, to leading order in √ , X becomes Going to Fourier space , the short modes satisfy the following decomposition, and where θ is the step function. We have introduced the small dimensionless number ε 1 to separate the large and small scales in an appropriate way (ε should not be confused with the slow-roll parameter ). In addition, in this setup with a non-trivial c s the Hubble horizon is replaced by the sound horizon so k is accompanied by a factor c s . In addition, φ k (t) is written in terms of the annihilation and creation operator as φ k = a k ϕ k + a † −k ϕ * k in which ϕ k is the positive frequency mode function of scalar perturbations. Now we substitute Eqs. (2.5) and (2.6) into (2.4) and expand the result up to first order in √ , yielding the following equations [23,24] in phase spacė and where we have neglected the spatial derivatives of φ l . In addition, σ and τ are the stochastic noises originating from the short modes which affect the evolution of the long modes. More specifically, σ and τ are related to quantum mode functions via (2.13) Our goals here are to obtain the Langevin equations for the long modes and to calculate the correlation functions of the noises. Defining the mode functions u k ≡ zR k with R k = −Ḣ φ ϕ k , the equation of motion for the scalar perturbation is given by [64] cs , ≡ −Ḣ/H 2 is the first slow-roll parameter and a primes denotes a derivative with respect to conformal time dτ = dt/a(t).
Imposing the Bunch-Davies (Minkowski) initial condition for the modes deep inside the horizon, the solution is given by With the profile of wave function given above, we are able to obtain the amplitude of noise at the time of sound horizon crossing c s k = aH. Compared to [23,24], the wavefunction is multiplied by c s / P ,X while k → c s k. Correspondingly, the amplitude of the noise is scaled via [19] 1 Consequently, compared to [23,24], the vacuum correlation functions of σ and τ are given as follows where j 0 is the zeroth order spherical Bessel function. Moreover, the commutator of the τ and σ are given as follows As we see from (2.21), the commutator of σ and τ goes to zero when ε → 0 and hence the quantum nature of the noises disappear on superhorizon limit. In addition, from Eq. (2.18) we see that τ goes to zero on superhorizon scales while the correlation for σ simplifies to (2.22) where in the last equality we have used the number of e-folds, defined via dN = Hdt, as the clock.
With these considerations and noting that τ → 0, the Langevin equations for the superhorizon modes from Eqs. (2.10) and (2.11) are obtained to be

P (X) non-attractor inflation
The analysis presented in previous section was general for any P (X) model, independent of the system being in attractor or non-attractor phase. In this section we employ the stochastic formalism outlined above to non-attractor P (X) model. As mentioned in Introduction, the P (X) model is the extension of the USR setup which was studied in details in [17] and [18], see also [54]. One motivation to study non-attractor P (X) model was to obtain non-trivial contributions from c s in power spectrum and f N L . As discussed before, one drawback of the above setup (like the USR setup) is that inflation does not end. Indeed, as inflation proceeds the kinetic energy of the field falls off exponentially and the background approaches more and more to the dS spacetime. One can cure this problem by gluing the non-attractor phase to a follow up attractor phase. If the transition from non-attractor phase to the attractor phase is sharp, one may expect that the super-horizon perturbations may not be affected. However, in general, the transition may affect the final curvature perturbation power spectrum and bispectrum [9,10]. While our results in this section are valid for any P (X) non-attractor model, but to have a specific example, one can consider the following model [17,18], where α and β are positive constants. The conventional USR setup corresponds to the case β = 0. Note that as in USR setup, the dominant source of background expansion is given by V 0 so to leading order in slow-roll parameter, H 2 V 0 /3. As discussed in [17,18], during the non-attractor phase the non-linear term containing β dominates. In this limit, during the non-attractor phase, we obtain c 2 s 1/(2α − 1). As the system reaches the attractor phase and the kinetic energy falls off significantly, the usual linear term X takes over. Now considering a general P (X) non-attractor model and assuming a near constant H, which is a very good approximation in non-attractor setup, from Eq. (2.24) we obtaiṅ where the relationẊ = v lvl and the formula Eq. (2.1) for c s have been used. Using the number of e-fold N as the clock via Hdt = dN , the above equation can be solved yielding where X 0 is the initial kinetic energy of the field at the start of the non-attractor phase N = 0. From the above equation we find that Plugging this expression into Eq. (2.23) we obtain the following Langevin equation for φ(N ) where, as mentioned before, ξ (N ) is a white Gaussian noise. The above equation can be integrated yielding where φ 0 is the initial value of the field. Now let us define the surface of end of inflation (or the end of non-attractor phase, whichever comes first ) when φ reaches a fixed value φ = φ e . Classically and in the absence of the stochastic noise, this happens at N = N c which from Eq. (3.5) is given by However, in the presence of the stochastic noises, different patches take different number of e-folds before hitting the surface of end of inflation. As a result, the time of end of inflation, denoted by N , is a stochastic parameter. Correspondingly, Eq. (3.6), can be written as where we have defined the dimensionless parameter κ via Since κ is a key parameter of our analysis, it is useful to express it in terms of observable quantities. Indeed, using Eq. (3.3) relating X(N ) to X 0 and the relation ≡ −Ḣ/H 2 = XP ,X /H 2 for the first slow-roll parameter, one can show that is the curvature perturbation power spectrum calculated at the end of nonattractor phase. The superscript (0) here means that it is the classical power spectrum, i.e. power spectrum in the absence of stochastic noises. On the physical ground we expect κ 1 so a perturbative expansion in powers of κ is allowed. However, in Section 6 a hypothetical case violating κ 1 is studied which would be the case for eternal inflation. Now let us see how the small parameter κ varies along a given classical background trajectory. In the classical limit (in the absence of noise), from Eq. (3.6) the background field equation is given by (3.11) From the above equation we see that each trajectory is characterized by a maximum field excursion φ max given by beyond which the field can not roll classically. We can easily finḋ Since both φ max and φ e are fixed on a given trajectory, these relations enable us to see how φ 0 andφ 0 vary along the trajectory with changing N c . We can now infer from Eq. (3.9) that κ ∝ exp (3N c c 2 s ) /φ 0 is independent of N c . Finally, we remind that the velocity of the field falls off exponentially during the nonattractor phase. Specifically, from Eq. (3.11) or simply from Eq.
s N . This is the main reason why the curvature perturbations are not frozen on superhorizon scales, yielding to the violation of the non-Gaussianity consistency condition [4,17,18,65].

Power Spectrum
In this section, using the stochastic δN formalism, we calculate curvature perturbation power spectrum and the stochastic corrections. A similar analysis for the simple USR setup with P (X) = X and c s = 1 were performed in [16].
To use the stochastic δN formalism, we have to calculate N and δN 2 ≡ (N − N ) 2 = N 2 − N 2 in which the curvature perturbation power spectrum is given by [16,57,58] To start with, let us take the logarithm of both sides of (3.8) and expand the result in terms of κ, where we have defined and Note that W (N ) is the Wiener process [67] associated with the noise ξ(N ) satisfying Also note that the upper bound of the integral Eq. (4.4), N , is a stochastic quantity. Furthermore, the non-linear factor 1/ P ,X in Eq. (4.4) makes the relation between W(N ) and dW non-trivial.
Taking the stochastic average of Eq. (4.2), we have Note that we are interested into the leading stochastic corrections in curvature perturbation power spectrum. As a result, we have to calculate N and δN 2 to O(κ 4 ). For this purpose, we need W(N ) 2 , W(N ) 3 and W(N ) 4 to orders of κ 2 , κ and κ 0 respectively. Similarly, to calculate δN 2 , from Eq. (4.6) and (4.2) we have To proceed further, we need to calculate various correlations involving W(N ) n . This is somewhat non-trivial which we present the details in Appendix A. The key is to use the stochastic integrals in which [67] (4.9) Note that in the above integrals f (N ) is an arbitrary deterministic function but the upper bound of integral is a stochastic variable. Furthermore, using the Ito lemma Eq. (A.7), we can relate W(N ) n to W(N ) n−2 via In particular we have and Collecting the results, to leading orders in κ, we have (see Appendix A for details ) and where we have defined the integral I(N ) as .
Note that I(N ) is a non-stochastic function. Now we are in a position to calculate the leading stochastic corrections in various correlation functions, such as N and P R . For the average number of e-folds, from Eq. (4.6) we obtain (4.17) and (4.18) From Eq. (4.17) we see that the stochastic corrections in N is at the order of the power spectrum (∝ κ 2 ) which is negligible.
With N and δN 2 calculated above, and using the definition of κ given in Eq. (3.10), the curvature perturbation power spectrum from Eq. (4.1) is obtained to be The above formula is interesting, showing that the fractional stochastic corrections in power spectrum is at the order of power spectrum. Hence, the stochastic corrections in power spectrum is sub-leading. One can check that for the simple USR case with P = X and c s = 1, Eq. (4.19) reproduces the result in [16]. It is also interesting to apply the above general result to the particular P (X) model Eq. (3.1). In the limit discussed there, the leading order corrections to N is obtained to be Similarly, the curvature perturbation power spectrum is In particular, for the simple USR case with c s = 1, the above equations yield to and in agreement with the results of [16].

Boundary Crossing Probabilities
Here we extend the analysis of [16] to our setup studying a hypothetical question in which there are two absorbing barriers in field space located at φ + > φ 0 and φ − < φ 0 . The field hits either of the barriers and inflation ends after that. Our goal is to calculate the first boundary crossing probabilities p + and p − which are the probabilities of hitting first either φ + or φ − respectively. This setup may not be relevant for the observable inflationary period as it may take a large number of e-folds for the field to hit either barriers but nonetheless this is an interesting conceptual question. Based on our assumption, if we wait long enough the field hits either barriers so we have p + + p − = 1. Let us define N as the total number of e-folds required for the field φ to hit either of the barriers. Also, because of the shift symmetry involved in our setup, we assume the field starts at the origin in field space corresponding to φ 0 = 0. Using Eq. (3.6), the equation for φ(N ) is where W(N ) is as defined in Eq. (4.4).
Since there are two absorbing barriers φ ± , it is not easy to solve the above equation analytically so one has to employ numerical analysis. In special limits we solve the question of first boundary crossing analytically and compare them with the full numerical results.

Brownian motion
One limit that the first boundary crossing can be solved analytically is when there is no drift (X 0 = 0) so we have a pure quantum noise. This corresponds to a pure Brownian motion in a dS spacetime where the noise arises from the quantum fluctuations of the scalar field. Of course, this is a oversimplified case compared to slow-roll inflation where the field has a small classical drift, but nonetheless it provides interesting theoretical insights.
In this case, the evolution of fluctuations of φ is given by the following Brownian-like equation Now, taking the stochastic average of the above equation and noting that W(N ) = 0 we obtain This is interesting indicating that on average the field is stuck to the origin. On the other hand, from the definition of p + and p − one calculates φ(N ) to be Interestingly, the above results for p ± are exactly the same as in [16]. We conclude that the first hitting probability for a given barrier is proportional to the distance of the mirror barrier to the origin. The further away is the mirror barrier, the higher is the probability to first hit the given barrier. If either of φ + or φ − is pushed to infinity, then p + or p − goes to zero respectively which is understandable intuitively. The behaviour of p + is plotted in top panel of Fig. 1. The agreements between the full numerical results obtained from simulations and the theoretical values are excellent.
Having obtained p ± , the next step is to calculate N , the average number of e-folds when the filed hits either of the barriers. Because of the non-trivial effects of P (X) in W(N ), this analysis is more difficult that the case of [16]. To start with, taking the expectation value of the square of Eq. (5.2) we obtain where I(N ) is defined in Eq. (4.16).
On the other hand, using the values of p ± from Eq. (5.5) we have Combining the above two equations, we obtain the following implicit equation To interpret the meaning of Eq. (5.8) note that intuitively speaking H/2π √ c s represents the length of each quantum jump (with the effects of sound speed included) so the ratios √ c s ) and −φ − /(H/2π √ c s ) respectively measure the classical displacements of φ + and −φ − relative to quantum jumps to reach either of the barriers. In the special case when the initial position of the field is located on the position of either barrier then I( N ) = N = 0 and one of p ± is equal to unity while the other one is zero. For example, if we have φ + = 0, then p + = 1 and p − = 0. Eq. (5.8) is valid for any theory of P (X). Now as an example let us apply this to our special case of P (X) given in Eq. (3.1), yielding Note the non-trivial combination e 3(1−c 2 s )N which is non-linearly related to N and higher multipoles.
In the limit N 1, one can neglect the higher multipoles in e 3(1−c 2 s )N , yielding This agrees with the result in [16] when c s = 1. The linear dependence of N to φ + for a fixed value of φ − can be seen in Fig. 1 for small field values when N is also small. On the other hand, for large N 1, one may roughly take and obtain the following approximate result for N We emphasis that Eq. (5.12) provides only a rough estimation of N as Eq. (5.11) is valid only approximately. It is instructive to compare the behaviour of N in our case with the corresponding case in [16] when c s = 1. In that setup I(N ) is linear so N grows linearly in terms of φ + for a fixed value of φ − . Here, however, P (X) is non-linear so I(N ) becomes non-linear and the behaviour of N is very different than the linear dependence as can be seen in Fig. 1. Indeed, one sees a logarithmic dependence as is suggested from our semi-analytical formula Eq. (5.12).

Brownian motion with drift
Now we consider the general case where the classical drift is present in addition to the noise term, corresponding toφ 0 = 0. As discussed in Section 3, when the field has the classical velocity there is a limit φ = φ max defined in Eq. (3.12) beyond which the field cannot go classically. As argued in [16] we can imagine that when the field has approached the classical limit φ max , then its classical evolution becomes more and more negligible and the effects from the diffusion terms W(N ) becomes more relevant.
In terms of φ max , Eq. (5.1) can be cast into in which the field displacement relative to φ max is defined via Though Eq. (5.13) has a simple form but it can not be solved analytically to obtain p ± and N . The main reasons are that there is a time-dependent drift term e −3c 2 s N and also that the stochastic variable N appears in W(N ). This is unlike the case in previous section where there was effectively a single barrier, i.e., the surface of end of inflation, and one could find analytic results.
As observed in [16] in the limit that the contribution of the drift term e −3c 2 s N becomes negligible, then Eq. (5.13) becomes a pure Brownian motion like Eq. (5.2) with the initial condition χ = 0. Intuitively speaking, this corresponds to the situation when one starts from φ max with zero initial velocity and the evolution of the field is governed by the quantum kicks as in Brownian motion. In order for this approximation to be valid, we have to wait long enough, N 1, so the classical velocity of the field falls off. In this limit, Eq. (5.5) with the replacement φ ± → χ ± can be used to obtain p ± , yielding The analysis of N is more non-trivial due to non-linear effects in the factor I(N ) as we observed in the case of pure Brownian motion in previous subsection. However, as before, we obtain the following implicit equation where to obtain the final equation the relation = XP ,X /H 2 has been used. For N 1 we obtain the following order of magnitude estimation Another limit that we can calculate N analytically is when the field is released at a distance very close to the right boundary, i.e. when φ 0 ∼ φ + . In our convention, this corresponds to the initial condition χ −1. In this configuration, we expect that the field hits the right boundary in short interval of time, either by classical motion or via one stochastic jump. Taking N 1, from Eq. (5.13) we find In Fig. 2 we have presented the simulated probability and mean number of e-folds for the case of Brownian motion with the drift. Compared to the results of [16] we see significant deviation for the behaviour of N for large values of χ + for a fixed value of χ − . This is because of the non-linear effects in the parameter I(N ). In [16], N was evolving linearly in χ + as given by Eq. (5.19). However, for large χ + , i.e. for large field displacement, the non-linear effects in P (X) and correspondingly in I(N ) becomes important and the shape of N deviates significantly from the linear curve, approaching a log curve as our formula Eq. (5.18) suggests.

Large Diffusion
In this section we calculate the power spectrum in a setup in which the diffusion (the coefficient of the white noise) is much larger than the drift (the non-stochastic term) in the Langevin equation. As such, this setup is more akin to eternal inflation where the quantum kicks of the scalar fields dominate over its classical slow-rolling dynamics.
Let us write the solution (3.6) of the Langevin equation (in the case of time-independent diffusion) as follows is the initial condition for the motion and Our assumption that the diffusion coefficient dominates over the drift coefficient is translated into |h| |µ|. 1 . We have already considered the boundary crossing probability in this setup in subsection 5.1 so our main objective here is to calculate the power spectrum. In fact, we shall set µ = 0 in this section and consider the O(µ) corrections in appendix B. This is because the large-diffusion limit is already non-trivial in the leading order. To see this, note that in the small-diffusion case, almost all trajectories would eventually cross the reheating surface φ e at some time. In other words, the probability to escape to infinity was zero (which is a generic feature of single-field models [68]), and that was why we didn't have to impose a left boundary φ − , i.e., the results were independent of φ − in the limit φ − → −∞. Although Eq. (5.5) shows that, with fixed φ + , we still have p − → 0 in the limit φ − → −∞, it turns out, as we will see below, that the moments N and N 2 diverge so we need to regularize them by imposing both right and left boundaries φ ± . In addition, to simplify the analysis further, we set c s = 1 corresponding to P (X) = X and W(N ) = W (N ). It would be interesting to extend the current analysis to the case with the general value of c s . 1 In the previous sections we used the parameter κ defined in Eq. (3.9) as a measure of the diffusion-to-drift ratio (at the boundary crossing time N = N ). However, κ is defined in terms of N c which is meaningful only when φ e (which corresponds to φ + ) is smaller than φ max , whereas for µ = 0 we have φ max = φ 0 , so the interval φ + ∈ [φ 0 , φ max ] shrinks to zero size. One can write κ = H/2π √ c s (φ max − φ e ) without reference to N c , but then it becomes negative when the right boundary φ e = φ + falls beyond the classically reachable value φ max ; then even the magnitude |κ| does not provide a good measure of diffusion-to-drift.
Let us recall Eqs. 5.5 and 5.8 that we obtained in subsection 5.1, which in the notation of this section read (note that I = N now): and Note that because of shift symmetry, we can set φ 0 = 0 as in the analysis in previous sections, but for the later use we have kept it arbitrary. We will also need a couple of stochastic identities [16] that we collect here for future reference: Let us calculate N + and N − first, which will prove to be handy for further calculations. N + is the average number of e-folds to hit φ + over all trajectories that are conditioned such that φ + is hit earlier than φ − . Obviously, we have Moreover, evaluating Eq. (6.1) at N , raising it to the third power and then taking the average, we find We can simplify the right hand side using Eqs. (6.5) by first writing and then using Eq. (6.9) to obtain Now Eqs. (6.8) abd (6.11) form a system of two equations for N ± which can readily be solved to yield In order to compute the power spectrum, we need to calculate N 2 . To this end, we start by evaluating Eq. (6.1) at N , raising it to the fourth power and then taking the average: (6.14) Using Eq. (6.6), as well as we can read N 2 from Eq. (6.14) as (6.16) We will also be interested in calculating N 2 ± . Evidently, they are related to N 2 via To proceed, we evaluate Eq. (6.1) at N , raise it to the fifth power and then take the average: To calculate the right hand side using Eq. (6.7), we need 19) and Plugging Eqs. (6.19) and (6.20) in Eq. (6.7) and then in Eq. (6.18), we get an equation for N 2 ± . Together with Eq. (6.17), it provides a system of equations which can be readily solved for N 2 ± to yield and As we will see in appendix B one can get the same results by using the distribution function directly. Finally we can calculate the power spectrum, which in the stochastic δN formalism is given by where we remind that δN 2 = N 2 − N 2 . It is therefore enough to insert the formulas for N and N 2 that we have obtained above to get There is a subtlety here. Since N is defined as the number of e-folds to either φ + or φ − , the resulting power spectrum of curvature perturbations (which are created during inflation on a flat potential) is calculated on the surface Σ = {φ = φ + } ∪ {φ = φ − }. This can be the case when reheating takes place on Σ, i.e., on both sides φ ± of the starting point φ 0 . Another case of interest to which Eq. (6.24) applies is when the phase of ultra-slow-roll terminates on both φ ± . However, if the end of inflation (or end of the ultra-slow-roll phase) occurs only on φ + , i.e., if Σ = {φ = φ + } then we need to consider only those trajectories that reach this new Σ. In this situation, we must replace N in Eq. (6.24) with N + (φ − will then play the role of a cut-off) and so we get Let us also compare these results with that of Ref. [12] where a reflective boundary condition is used on φ − and the power spectrum is calculated to be 2 In all three cases, Eqs. (6.24), (6.25), and (6.26) the power spectrum is proportional to However, the numerical prefactors differ, as well as the exact dependence on the boundary values φ ± . This is not surprising, as these three cases correspond to three physically different situations. As we mentioned before, Eq. (6.24) corresponds to Σ (the end of inflation, or end of ultra-slowroll phase) being when φ reaches either φ + or φ − . In the approach of Ref. [12], this corresponds to absorbing boundary conditions on both φ ± . On the other hand, Eq. (6.25) corresponds to a multiverse setup that exiting through φ + and φ − leads to two different universes and we want to calculate the power spectrum in the universe where the right boundary φ + has been hit. Finally, Eq. (6.26) applies when there is a reflecting wall (e.g., a very high potential barrier) at φ − that ensures that all trajectories exit inflation through φ + .

Summary and Discussions
In this paper we have extended the stochastic inflation formalism to the setup of non-attractor inflation. To simplify the analysis we have restricted ourselves to the P (X) setup which is shift symmetric. We have obtained the Langevin equations for the long mode perturbations and have solved them. In principle these analysis can be extended to a more general P (X, φ) setup though the analysis will be more complicated.
We have calculated the stochastic corrections in cosmological observables such as N and the curvature perturbation power spectrum P R . We have shown that the stochastic corrections in these observables are sub-leading. More specifically, it is shown that the fractional corrections in these observables are at the order of power spectrum. Compared to analysis in USR setup, the non-linearities inherited in P (X) setup and the effects of c s made the analysis of stochastic correlations such as W(N ) n more non-trivial and we had to employ the Ito lemma iteratively to calculate various stochastic integrals.
We also studied the boundary crossings and the first hitting probabilities in a hypothetical setup in dS space with two boundaries in field space. We have calculated the probabilities of hitting first either the right or left boundaries in a pure Brownian case where the field has no classical drift and moves only subject to stochastic kicks. The general case when both the classical drift and the stochastic diffusion terms are present is more non-trivial. However, in the large N limit this configuration approaches a Brownian limit where the classical motion reaches its final limit in field space and the subsequent dynamics is controlled by the diffusion term. We have calculated the first hitting probabilities in this limit as well and have verified that the results are in good agreements with the full numerical simulations.
Finally, we considered a hypothetical setup in which the diffusion term dominates over the classical drift term. This situation is more akin to the eternal inflation picture where the quantum kicks push the field upwards and prevent it from the classical slow-rolling. Of course, this setup is opposite to the conventional regime of inflation where the classical slow-rolling is the dominant effects in the dynamics of the field. We have calculated the power spectrum and have verified that it scales like H −2 , although its exact form depends on the details of the boundary conditions imposed. This can have interesting implications for eternal inflation and for the collapse of regions of spacetime to form primordial black hole during eternal inflation.
In this appendix we provide the details of the stochastic analysis to calculate various correlation functions perturbatively in powers of κ.
Our starting point is the perturbative expansion of N in powers of κ, As mentioned in the main text, W (N ) is the Wiener process [67] associated with the noise ξ(N ) satisfying To calculate power spectrum, we need to calculate N and δN 2 = N 2 − N 2 to order κ 4 in which and Consequently, we have to calculate W(N ) 2 , W(N ) 3 and W(N ) 4 to orders of κ 2 , κ and κ 0 respectively. For this purpose, we use the following fundamental properties of the stochastic integral [67] N 0 f (N ) dW = 0 , (A. 6) and the Ito lemma, in which states that [16,67] Now taking the stochastic average of the integrated form of the above formula and using Eq. (A.6) yields The advantage of the above formula is that it relates W(N ) n to W(N ) n−2 . In particular, for n = 2, 3 and 4 we obtain Note that N is a stochastic variable, so the above stochastic integrals are non-trivial. We proceed iteratively in powers of κ. As for the second integral in Eq. (A.17) we change the integration variable as follows in which a prime indicates the derivative with respect to N . Note that the above procedure is valid to order κ 2 .
Combining the above results, to order κ 2 we obtain Now, using P ,X = X P XX = −6c 2 s XP XX and the formula for c s in Eq. (2.1), the above expression simplifies to To calculate W(N ) 4 , we start from Eq. (A.11) and use the Ito lemma again. Defining dQ ≡ dN/P ,X , then the right hand side of Eq. (A.11) is manipulated to Since we need to calculate W(N ) 4 to order κ 0 , we can simply replace the upper bound for the integrals above by N c , obtaining Finally, we need to calculate W(N ) 3 to order κ. Using the Ito lemma (as in above analysis) for the right hand side of Eq. (A.10) we obtain Having calculated W(N ) 2 , W(N ) 3 and W(N ) 4 to necessary orders in κ, we obtain N and δN 2 to order κ 4 as given in Eqs. (4.17) and (4.18) respectively.

B Drift Corrections to Large Diffusion
In this appendix we calculate the O(µ) corrections to the quantities p ± and N of section 6. To this end we start by taking the average value of Eq. (6.1) and its square up to first order of µ: As it can be seen from Eqs. (B.1) and (B.2) to calculate the first order of µ contribution, it is enough to calculate F (N ) and F (N )W (N ) at the zeroth order, i.e., in the standard Brownian regime with no drift. This is because one expects that in the limit µ → 0 we get the results in the standard Brownian motion without drift. So the expectation is that if one expands F (N ) (µ) in terms of µ powers then the zeroth order corresponds to the case without drift. To calculate these two quantities we use the probability distribution function of pure Brownian motion. It can be shown that in the standard Brownian motion, the probability distribution function f (N ; φ + , φ − , φ 0 ) for first crossing any of the barriers φ ± at time N = N , starting from φ 0 , has the following form [66]: Now let's define the following distribution functions where N φ ± are defined as follows In other words f ± are the time distribution functions such that one of the barriers is hit earlier than the other one. One can verify that where M ± (s) are the generating function for the moments of f ± and M (s) is that of the total probability distribution function of hitting the barriers. By using Eq. (B.15) we get By this expression as well as p + + p − = 1 and Eq. (B.1) one can see that The conditional averages are calculated as follows Substituting these expressions into Eq. (B.2) we find the following expression for the mean number of e-folds: One can do the same procedure to get N 2 up to O(µ), but because this expression is very complicated we avoid presenting it here. Finally, we show the results of calculation of moments in the pure Brownian motion regime using the generating functions. One can easily show that and (B.24) It is interesting to note that Eqs. (B.14) and (B.13) can be used to obtain the results we derived in section 6 by a simple differentiation: 25) and Also we have Similarly one can calculate N n for an arbitrary positive integer by the stochastic calculus (a la section 6) and the moment generating function approach. Obviously, the two methods give the same result. However as we see the latter is much easier and faster to obtain the results.