Large Deviations of the Exit Measure through a Characteristic Boundary for a Poisson driven SDE

Let O the basin of attraction of the unique stable equilibrium of a dynamical system, which is the law of large numbers limit of a Poissonian SDE. We consider the law of the exit point from O of that Poissonian SDE. We adapt the approach of M. Day (1990) for the same problem for a Brownian SDE. For that purpose, we will use the Large deviation for the Poissonian SDE reflected at the boundary of O studied in our recent work Pardoux and Samegni (2018).


Introduction
We consider a d-dimensional process of the type Here (P j ) 1≤j≤k are i.i.d. standard Poisson processes. The h j ∈ Z d denote the k respective jump directions with respective jump rates β j (z) and z ∈ A (where A is the "domain" of the process). In fact (1) specifies a continuous time Markov chain with state space We know from the law of large numbers of Kurtz [7], see also [1], that under mild assumptions on the rates β j , 1 ≤ j ≤ k, for all T > 0, Z N,z (t) converges to Y z (t) almost surely and uniformly over the interval and Y z t takes its values in the set We assume that the dynamical system (3) has possibly several equilibria which are locally stable and we consider the basin of attraction O of a stable equilibrium z * . For the models we have in mind (see the four examples in section 6 below), O has a characteristic boundary which is either the set {z ∈ A; z 1 = 0}, or else the part of the boundary of O which is included inÅ, the interior of A. In both cases, that characteristic boundary is denoted ∂O. The solution of the dynamical system (3) starting from z ∈ ∂O remain in ∂O for all time, since for all z ∈ ∂O < b(z), n(z) >:= 0, where n(z) is the unit outward normal to ∂O at z. Our goal in this paper is to study the most probable location of the exit point in ∂O of the trajectory of Z N,z , for large N, when the starting point z belongs to the interior of O. In other words, the aim is to study the probability that a trajectory of Z N exits O in the neighborhood of a point y ∈ ∂O, P(|Z N,z (τ N O ) − y| < δ) for large N. Here τ N,z O denotes the first time of exit of the process Z N,z (t) from O. We adopt the approach of Day [2]. First we define a reflected Poissonian SDE for which the large deviation principle is satisfied, with the same rate function as the original one defined by (1). We then follow the arguments of Day [2] to obtain our results.
Our motivation comes from the epidemics models. More precisely, we want to understand how the extinction of an endemic situation happens in infectious disease models.
In section 3, we define our reflecting Poissonian SDE and we formulate a large deviation principle satisfied by the latter. Section 4 presents some preliminary lemmas about the rate function. These lemmas are mostly adapted versions of those in chapter 6 of [4] and in Day [2]. Section 5 discusses the large deviations of the exit measure. Finally, in section 6, we consider four distinct epidemics models. In all those four cases, with the help of the Pontryaguin maximum principle, we show that for large N, the process Z N t hits ∂O in the vicinity of one particular point of that boundary with a probability close to one.

Notation and the main assumption
We define the following cone generated by the family of vectors (h j ) j=1,...,k C = y ∈ R d : y = k j=1 µ j h j , µ j ≥ 0 ∀j .
We remark that in all the epidemics models that we will consider, the family of vectors (h j ) j=1,...,k is such that C = R d .
We now formulate some assumptions which are useful in order to establish the large deviation principle of the reflected Poisson SDE that we will construct in section 3, and which we will assume o hold throughout this paper, without recalling them in the statements.
2.Ō is compact and there exists a point z 0 in the interior of O such that each segment joining z 0 and any z ∈ ∂O does not touch any other point of the boundary ∂O.
3. For each a > 0 small enough, z ∈Ō, if we denote z a = z + a(z 0 − z), there exist two positive constants c 1 and c 2 such that |z − z a | ≤ c 1 a dist(z a , ∂O) ≥ c 2 a 4. The rate functions β j are Lipschitz continuous with the Lipschitz constant equal to C.

Reflected solution of a Poisson driven SDE and Large deviation Principle(LDP )
For any z ∈Ō, let |y − z| otherwise, (7) andZ N t denote the d-dimensional processes defined bỹ where for j = 1, ..., k, Q N,j . is given as We then obtain a Poisson driven SDE whose solution takes its values in O (N ) = A (N ) ∩Ō. Let D T,Ō denote the set of functions from [0, T ] intoŌ which are right continuous and have left limits, AC T,Ō ⊂ D T,Ō the subspace of absolutely continuous functions. For any φ, ψ ∈ D T,Ō and W a subset of D T,Ō let For all φ ∈ AC T,Ō , let A d (φ) denote the (possibly empty) set of vector-valued Borel measurable functions µ such that for all j = 1, ..., k, 0 ≤ t ≤ T , µ j t ≥ 0 and We define the rate function where We assume in the definition of f (ν, ω) that for all ν > 0, log(ν/0) = ∞ and 0 log(0/0) = 0 log(0) = 0. By the definition of f , there is not difficult to remark that The above rate function can also be defined as where for all z ∈Ō, y ∈ R d L(z, y) = sup with for all z ∈Ō, y ∈ R d and θ ∈ R d The rate function defined above is a good rate function (cf [5]), that is for all s > 0, the set {φ ∈ D T,Ō : I T (φ) ≤ s} is compact. We now formulate the result concerning the LDP for our reflected model (8). This result is proved in [9].
For any open subset G of D T,Ō , the following holds uniformly over z ∈Ō For any δ, η, s > 0 there exists N 0 ∈ N such that for all N > N 0 d) For any closed subset F of D T,Ō , the following holds uniformly over z ∈Ō

Notations and important Lemmas
We assume from now on that there exists a (unique) point z * ∈ O such that for any z ∈ O, Y z t → z * , as t → ∞. For z, y ∈Ō, we define the following functionals.
VŌ(z, y, T ) We will denote by B r (y) the open ball centered at y with radius r, and B r (K) = ∪ y∈K B r (y). For large N, the function VŌ(z, y) quantifies the energy needed for a trajectory to deviate from a solution to the ODE (3), and go from z to y, without leavinḡ O = O ∪ ∂O and V ∂O is the minimal energy required to leave the domain O when starting from z * . We now prove a few Lemmas, which are analogues of some Lemmas of chapter 6 in [4].
Lemma 4.1. There exists a constant C > 0 and a function K ∈ C(R + , R + ) with K(0) = 0 such that for all ρ > 0 small enough, there exists a constant T (ρ) with T (ρ) ≤ Cρ such that for all x ∈Å ∩Ō and all z, y ∈ B ρ (x) ∩O there exists an curve (φ t ) = (φ t (ρ, z, y)) Proof. We will exploit Assumptions 2.1.3 and 2.1.6 and refer to the notations there. Note that the distance between y and z is at most 2ρ. Let y a and z a be the points defined in Assumption 2.1.3, with a = 2ρ/c 2 . Then both are at distance at least 2ρ from the boundary of O, while they are at distance less than 2ρ one from another. Consequently the segment joining those two points is at distance at least √ 3ρ from the boundary. We choose as function φ the piecewise linear function which moves at speed one, first in straight line from z to z a , then from z a to y a , and finally from y a to y. The time needed to do so is bounded by 2 1 + c 1 c 2 ρ. Thanks to Assumption 2.1.1, I T (ρ) (φ) < ∞. Refering to the formula (11) for the rate function and to Assumption 2.1.6, we see that the contribution of the straight line between z a and y a to I T (ρ) (φ) is bounded by Cρ 1−ν , while the contribution of the two other pieces is bounded by a universal constant times The result follows.
For all z, y ∈ K, there exist 1 ≤ i, j ≤ M with z ∈ B r (z i ), y ∈ B r (z j ). Since VŌ(u, v) is continuous, chosing r small enough, we deduce that Moreover, from the finiteness of VŌ we have that for all z i , z j , there exists T i,j and φ t with We can fix T 0 = max i,j T i,j + 2 and Lemma 4.1 tells us that it is always possible to connect z and x i resp (z j and y) with and Concatenating φ i , φ and φ j , we obtain a trajectory φ with all the required properties. Now, we define the equivalence relation "R" inŌ by zRy iff VŌ(z, y) = VŌ(y, z) = 0. Proof. As zRy there exists a sequence of functions φ n t , 0 ≤ t ≤ T n , φ n 0 = z, φ Tn = y, with values inŌ and such that I Tn (φ n ) → 0. The T n are bounded from below by a positive constant. Indeed there exists n 0 ∈ N such that for all n ≥ n 0 I Tn (φ n |µ n ) ≤ 1. Now either T n ≥ σ −1 , where σ := sup 1≤j≤k, z∈A β j (z), or else from the Lemma 1 in [8], for all 1 ≤ j ≤ k, Moreover Tn 0 µ n,j t dt, Now, combining (15) and (16) we deduce that which shows that T n ≥ T for all n and some T > 0. Now I T (φ n t ) converges to 0 as n → ∞. Therefore, for a constant s > 0, there exists n 0 ∈ N such that for all n ≥ n 0 , I T (φ n ) < s. By the compactness of the set {ψ : I T (ψ) ≤ s}, there exists a subsequence (φ n k ) n k of these functions which converges, uniformly on [0, T ], to a function φ t . As I T is lower semicontinuous, we have Thus I T (φ) = 0 and φ is the trajectory of the dynamical system (3) starting from z. The points φ t , 0 ≤ t ≤ T , are equivalent to z and y since we have VŌ(z, φ n t ) and VŌ(φ n t , y) do not exceed I Tn (φ n ) → 0 as n → ∞.
Let u be one of the points z and y such that that |φ T − u| ≥ 1 2 |z − y| then φ T Ru. In the same way as earlier, we can find some time interval in which the points of the dynamical system starting from φ T are equivalent to u. We obtain the result by a successive application of the above reasoning. cf. preuve Lemme 1.5 page 165 de FW Lemma 4.4. Let all points of a compact K ⊆O ∪ ∂O be equivalent to each other but not equivalent to any other point in O ∪ ∂O. For any η > 0, δ > 0 and z, y ∈ K there exists a function φ t , 0 ≤ t ≤ T , φ 0 = z, φ T = y, entirely in the intersection ofŌ with the δ-neighborhood of K and such that I T (φ) < η.
Proof. As z, y ∈ K there exists a sequence of functions φ n t , 0 ≤ t ≤ T n , φ n 0 = z, φ n Tn = y, with values in O ∪ ∂O and such that I Tn (φ n ) → 0. And then there exists n 0 ∈ N such that for all n > n 0 , I Tn (φ n ) < η. If all curves φ n t with n > n 0 left the δ-neighborhood of K, then they would have a limit point x outside of this δ-neighborhood and we have VŌ(z, y) = VŌ(y, z) = 0 thus x is equivalent to z and y. A contradiction since all points of a compact K are equivalent to each other but not equivalent to any other point inŌ.
Lemma 4.5. Let K be a compact subset of O ∪ ∂O not containing any ω-limit set 1 entirely. There exist positive constants c and T 0 such that for all sufficiently large N and any T > T 0 and z ∈ K we have where τ N K is the time of first exit ofZ N t from K and under P z ,Z N t starts from the point z N defined by (7).
Proof. As K does not contain any ω-limit set entirely, we can choose δ sufficiently small such that the closed δ-neighborhood K δ does not contain any ω-limit set entirely, either.
where Y z (t) is the solution of (3) starting from z. We have τ (z) < ∞ for all z ∈ K δ . By the continuous dependence of a solution on the initial conditions,the function τ (z) is upper semi-continuous, and then it attains its largest value T 1 = sup z∈K δ τ (z) < ∞. Fix T 0 = T 1 + 1 and let F K δ the set of all functions φ t defined for 0 ≤ t ≤ T 0 and assuming values only in K δ . the set of these functions is closed in the sense of uniform convergence and because I T 0 is lower semi-continuous, Moreover for all φ ∈ F K δ , I T 0 (φ) > I 0 > 0 since there are no trajectories of the dynamical system (3) in F K δ . If a function φ spend a time T in K with T longer than T 0 we have I T (φ) ≥ I 0 ; for the functions φ spending time T ≥ 2T 0 in K we have I T ≥ 2I 0 , and so on. We deduce that for all φ spending time T in T > T 0 in K we have holds. The set of all such points of Y (t, z 0 ) is called ω−limit set of Y (t, z 0 ) and denote ω(z 0 ).

For z ∈ K the functions in the set
leave K δ during the time from 0 to T 0 ; the trajectoriesZ N,z t for which τ N K > T 0 , are at a distance greater than δ to this set. We deduce by using Theorem 3.1 that for any z ∈ K Now we use the Markov property and we have We obtain by induction that Hence the result with c = I 0 −η T 0 , where η is an arbitrary small number. The following assumptions comes essentially from [4] (page 150).
Assumption 4.6. There exists a finite number of compacts K 1 , · · · K M ⊆ ∂O such that We moreover define K 0 = {z * }. We now construct as in [2] and [4] an embedded Markov chainZ n associated to the processZ N (t) in the following way: let ρ 0 and ρ 1 such (20) And where Q j . is defined by (9) and We now establish the following equality.
K i for all t 0 < t < t 1 and φ t 1 ∈ K j for some j. Thus K i , then we can extend φ t to t > T as a solution of (3). By the assumption 4.6 (3), φ t comes arbitrarily close to M 1 K i as t → +∞, but without any increase in the value of I T (φ). It follows that As ǫ is arbitrary and the reverse inequality, Lemma 4.8. For all η > 0 there exists ρ 0 small enough such that for any ρ 2 , 0 < ρ 2 < ρ 0 , there exits ρ 1 , 0 < ρ 1 < ρ 2 such that for all N large enough, for all z in the ρ 2 -neighborhood G 2 i of the compact K i (i = 0, · · · , M), and all j ≥ 0 we have the inequalities: Proof. By using Lemma 4.1 let ρ > 0 such that T (ρ) < η/3K. We choose ρ 0 > 0 smaller than ρ/3 and 1 3 min i,j dist(K i , K j ), and ρ 2 ∈ (0, ρ 0 ) . For any two compacts Let We now choose 0 < ρ 1 < min(ρ/2, ρ 2 , ρ 3 ), and δ smaller than We also have dist(ψ i,1 , C) ≥ δ where C is defined by (18). Moreover according to Lemma We combine these curves with the curve φ i,j t and we obtain a function φ t , i and j) and φ 0 = z, φ T ∈ K j such that: It is easy using Lemma 4.1 and Lemma 4.2 to justify that the lengths of the intervals of definition of the functions φ t constructed for all possible compacts K i , K j and point z ∈ G 2 i can be bounded from above by a constant T 0 < ∞. The functions φ t can be extended to the intervals from T to T 0 to be a solution of (3) so that I T (φ) = I T 0 (φ).
Any trajectoryZ N,z (t) such that Z N,z − φ T 0 ≤ δ reaches the δ-neighborhood of K j without getting closer than 2ρ 1 − δ to any of the other compacts and thenZ 1 = Z N,z (θ 1 ) ∈ G 1 j . Thus using the large deviation Theorem 3.1 , we deduce that there exists N 0 depending only on η, T 0 and δ such that for all N ≥ N 0 we have And the left inequality of the Lemma follows.
Using the strong Markov property, it is sufficient to prove the right inequality for z ∈ Γ i . With our choice of ρ 0 and δ, for any curve φ t , 0 ≤ t ≤ T beginning in a point of Γ i , touching the δ-neighborhood of G 1 j and not touching the compacts K ℓ , ℓ = i, j we have Using lemma 4.5, there exists two constants c and T 1 such that for all N large enough Now we fix a T > T 1 then any trajectory ofZ N,z (t) beginning at a point z ∈ Γ i and being in G 1 j at time θ 1 and not touching the compacts K ℓ , ℓ = i, j either spends time T without touching G ∪ ∂O (i.e the event {θ 1 > T } is realized) or reaches G 1 j before time T and in this second case, with the notation Φ z (s) = {ψ ∈ D T,Ō : Hence, for any z ∈ Γ i we have from Lemma 4.5 and Theorem 3.1 (c) that for N large enough The lemma is proved.
Before we present others lemmas which will be useful, let us define the sequence κ n ∈ N for whichZ κn =Z N,z (θ κn ) ∈ G 1 0 . Note that the κ n areZ n stopping times and that the θ n and θ κn areZ N,z (t) stopping times.
Proof. We prove that lim Since Y z is continuous and never reaches ∂O, we have inf t≥0 dist(Y z (t), ∂O) =: δ > 0. Hence we have the following implication: In other words, The right hand side of Inequality (28) converges to zero as N → ∞ by the weak law of large numbers established in [9].
In the following, we present some lemmas which are analogue to the lemmas of [2].
Lemma 4.10. Given η > 0, there exists ρ 0 > 0 (which can be chosen arbitrarily small) such that for any ρ 2 ∈ (0, ρ 0 ), there exists ρ 1 ∈ (0, ρ 2 ) and N large enough such that for Proof. We have Moreover it is easy to see that The result now follows from Lemma 4.7 if we choose N such that In the following Lemma, we establish that an exit to the characteristic boundary ∂O is relatively likely onceZ N,z (t) is close to it. Lemma 4.11. Given η > 0, there exist 0 < γ < η, 0 < ρ < η, and N 0 large enough so that whenever dist(z, ∂O) < ρ/3 and N > N 0 , G is open for the Skorohod topology and as Z N,z satisfies the large deviation principle, we deduce that for all z ∈ O such that dist(z, ∂O) < ρ/3 we have for N large enough Moreover from Lemma 4.1 we can choose γ, ρ < η such that inf φ∈G I γ (φ) < η/4. Consequently P z (Z N ∈ G) ≥ exp{−Nη/2}.
We also have for all z ∈ O with dist(z, ∂O) < ρ/3.
Moreover we have Using the strong Markov property, we also have where the last inequality follows from Theorem 3.1 and Lemma 4.1. Combining (29), (30) and (31) we have the result.
In the next lemmas we denote and we establish some inequalities involving θ κ 1 .
Combining ψ a,1 t , 0 ≤ t ≤ T a,1 , ψ a t−T a,1 , T a,1 ≤ t ≤T + T a,1 and ψ a,2 t−T −T a,1 ,T + T a,1 ≤ t ≤ T a,2 +T + T a,1 we obtain a function ϕ t , 0 ≤ t ≤ T =T + T a,1 + T a,2 Let ρ 1 < ρ 0 , δ < min 1 2 c 2 a, ρ 0 2 and H ⊆ D T,Ō be the set of functions φ having the following properties: H is open and ϕ ∈ H (if ϕ intersects B ρ 1 (z * ) we use again Lemma 4.1 to modify ϕ). From theorem 3.1, for all N large enough we deduce by using (32) that We also have Furthermore for any x such that dist(x, y) < δ/2 for all γ > 0. In particular with γ selected as in Lemma 4.11, we deduce that We also have It follows from (33) and (34) that The lemma follows.
Concatenating ϕ a,1 t , 0 ≤ t ≤ T a,1 ,φ a t−T a,1 , T a,1 ≤ t ≤ T 3 + T a,1 and φ a,2 t−T 3 −T a,1 , T 3 + T a,1 ≤ t ≤ T a,2 + T 3 + T a,1 , we obtain a function ψ t , 0 ≤ t ≤ T such that Let δ ≤ min 1 2 c 2 a, ρ 0 2 and define G ⊆ D T,Ō to be the set of functions φ having the following properties: G is open and ψ ∈ G (if ψ intersect B ρ 1 (z * ) we use again Lemma 4.1 to modify it) we deduce from Theorem 3.1 and (35) that for large enough N Moreover we remark thatZ N ∈ G implies |Z N (τ N O ∧ T ) − y| < 1 2 δ and θ κ 1 > T . So for N large enough, We have moreover Furthermore for x such that dist(x, y) < δ/2 for all γ > 0. In particular with γ selected as in Lemma 4.11 and δ = ρ, we deduce that We also have It follows from (36) and (37) that Lemma 4.14. Given any η, there exists ρ 0 > 0 (which can be chosen arbitrarily small) such that for any ρ 2 ∈ (0, ρ 0 ), there exists ρ 1 ∈ (0, ρ 2 ) and N η such that for all N > N η and z ∈ G 1 0 , Proof. Let δ > 0, we define It is easy to see that

Now we use the strong Markov property to write that
we deduce that sup Now, we establish that we can choose ρ 0 and δ sufficiently small such that for all v ∈ Γ 0 we have, Using Lemma 4.1 there exists ρ > 0 such that T (ρ) < η/3K. We take ρ 0 < ρ/2, δ and γ sufficiently small such that for any trajectory φ t , 0 ≤ t ≤ T starting from v ∈ Γ 0 and touching O δ \ O δ+γ we have Moreover, using Lemma 4.5 there exists a constant c and T 1 such that for all N large enough, any Hence, for all v ∈ Γ 0 we have from Lemma 4.5 and Theorem 3.1 (c) Moreover, VŌ(z * , .) is continuous so if δ is sufficiently small then So sup This prove the lemma.

Main Result on the Exit Position
Before to formulate the main result of our paper (Theorem 5.3), we introduce here a notion important to understand the proof of that result.
Definition 5.1. Let L a subset of N and W a subset of L. A W-graph on L is an oriented graph which satisfies the following conditions (a) It consists of arrows i → j, i = j with i ∈ L \ W and j ∈ L.
(b) For all i ∈ L \ W , there exists exactly one arrow such that i is its initial point.
(c) For any i ∈ L \ W there exists a sequence of arrows leading from it to some point j ∈ W .
We will denote by Gr(W ) the set of W -graphs and for i ∈ L \ W , j ∈ W we denote by Gr i,j (W ) the set of W -graphs in which the sequence of arrows leading from i into W ends at j. We can now show the analogue of Lemma 3.2 in [2].
Lemma 5.2. For all y ∈ ∂O and η, δ 0 > 0 there exist ρ, δ < δ 0 and N 0 , so that for all z with dist(z, z * ) < ρ and N > N 0 , we have and Proof. Let y ∈ ∂O. We can always assume that y ∈ M 1 K i else we add the compact K = {y} in the list of the compacts and Assumption 2.1 remains true since V O (y, y) = 0 and If yRu for some u = y, then Lemma 4.3 implies that any ω-limit point of (3) starting at y is equivalent to y and then y was in a compact K i .
For the upper bound (39), we first obtain a lower bound of the denominator of (41) as follows: Now we use Lemma 4.11 to deduce that choosing γ, ρ 1 such that 0 < γ < η, 0 < ρ 1 < η and N 0 ∈ N we have for all u ∈ M 1 G 1 ℓ , dist(u, ∂O) < ρ 1 /2 and then for N > N 0 , Thus, for all ρ 1 sufficiently small, N large enough and all z ∈ G 1 0 , By using the lemma 4.10 we have for all suitable small ρ 1 , ρ 0 , and N large enough, and all z ∈ G 1 0 , We then deduce of (42) and (43) that We now use the embedded chainZ n to obtain a upper bound of the numerator of (41) in the following way: given δ < ρ 1 and z ∈ G 1 0 , where we assume of course that Now we try to have an upper bound of P v (Z n ∈ G 1 1 for some 0 ≤ n < κ 1 ) for v ∈ G 1 ℓ where ℓ = 0, 1. For all suitable ρ 1 , ρ 0 and N large we have for all v ∈ G 1 Where q W (v, G 1 1 ) is the probability that, starting from v the Markov chain (Z n ) hits G 1 1 when it first enters G 1 0 ∪ G 1 1 . Now we will use a result on the Markov chains described by [4] Thus It is easy to see that g∈Gr ℓ,1 (W ) exp − N (i→j)∈g VŌ(K i , K j ) is equivalent to a positive constant C 1 which is the number of graphs in Gr ℓ,1 (W ) at which the minimum of (i→j)∈g VŌ(K i , K j ) is attained multiplied by exp −N min g∈Gr ℓ,1 (W ) (i→j)∈g VŌ(K i , K j ) . We also see easily that the denominator in (47) is equivalent to a positive constant multiplied by exp − N min g∈Gr(W ) (i→j)∈g VŌ(K i , K j ) . Hence there exists N 0 such that for N ≥ N 0 We remark here that in the case of a single attracting set K 0 , VŌ(K i , K 0 ) = 0 for all i. Then we have min We also have min With these preceding remark, we deduce that Now according (46) and lemma 4.8 we have for N > 6 log(M ) We remark here that uniformly over z ∈ G 1 0 , provided ρ 1 , ρ 0 and N are chosen in suitable way. Combining (44), (48) and (41), we deduce that provided δ < ρ 1 with ρ 1 sufficiently small and N sufficiently large. As η > 0 is arbitrary, we obtain the upper bound (39) from (40). This concludes the proof of lemma 5.2.
We finally deduce our main result which is an analogue of Theorem 3.1 in [2].
Proof. We first remark that for z = z * the result is given by Lemma 5.2 . If z ∈ O \ {z * }, we make the restriction that ρ 0 be sufficiently small so that dist(z, K i ) > ρ 0 for all i = 0, ..., M. This allows us to write Upper bound of Π 1 . Lemma 5.2 tells us that for all z ∈ G 1 0 , Hence Π 1 can be bounded from above as follows Lower bound of Π 1 . From Lemma 4.9 we deduce that for suitably small ρ 0 , ρ 1 there exists N ∈ N such that, for all N > N 0 , Π 1 can then be bounded from below as follows using Lemma 5.2 Upper bound of Π 2 . We now obtain a upper bound for Π 2 by making the same computations as in the proof of lemma 5.2. Indeed for some 0 ≤ n < κ 1 )).
In order to obtain the lower bound (49), we deduce from the lower bounds for Π 1 and Π 2 that

Application to four models
In the four following models , we show that for N large, with high probability the stochastic process hits the boundary of the basin or attraction of the endemic equilibrium near the point to which the law of large number limit converges, when restricted to this boundary. Note that V ∂O is the value function of a deterministic optimal control problem. We will exploit Pontryaguin's maximum principle, in order to prove the results of this section. Let us first describe Pontryaguin's maximum principle in the case of the optimal control problems we are concerned with here, then we shall present the four models successively, and finally we shall prove our result. Note that Assumption 2.1 is easily verified in the first two examples, and has been carefully verified in [9] for the last two.

Pontryaguin maximum principle
Let us formulate the optimal control problem, of which V ∂O is the value function. Leṫ where B is the d×k matrix whose j-th column is the vector h j , 1 ≤ j ≤ k, and the control u ∈ L 1 ([0, ∞); R k + ) is to be chosen together with the final time T such as to minimize the cost functional subject to the constraint : z T ∈ M, where M is the set of points z ∈ A (or ∈ A R in the case of the SIR model with demography) which are such that We associate to the above control problem the Hamiltonian The maximum principle states that (see [10] and [14]) is an optimal pair, then there exists an adjoint state r ∈ C([0,T ]; R d ) such thaṫ z t = Bû t , : z 0 = z * , zT ∈ M, , rT ⊥ M, Note that rT ⊥ M means that rT and the tangent vector to M at zT are perpendicular. The fact that the Hamiltonian is zero at the final time is a consequence of two facts: the final time T is not fixed and there is no final cost; the fact that the Hamiltonian is zero along the optimal trajectory then follows from the fact that it is constant, since none of the coefficient depends upon the variable t.
Let us exploit Proposition 6.1 to rewrite the system of ODEs for z t and r t along an optimal trajectory. We denote by B * the transposed of the matrix B. Since for each 1 ≤ j ≤ k, u → (B * r) j u − f (u, β j (z)) is concave, its maximum is achieved at the zero of its derivative, if it is non negative. We conclude thatû j = e (B * r) j β j (z). Consequently, along the optimal trajectory, Moreover, the optimal cost readŝ In the examples below, d = 2. We shall denote by x t and y t the two components of z t , and by p t and q t the two components of r t .

The SIRS model
Let x t denote the proportion of infectious individuals in the population and y t the proportion of susceptibles. Since the total population size is constant, 1 − x t − y t is the proportion of removed (also called recovered) individuals, who lose their immunity and become susceptible again at rate ρ. The deterministic SIRS model, see e.g. [1], can be written asẋ If the basic reproduction number R 0 = λ/γ > 1, then there is a unique stable endemic equilibrium z * = ρ λ λ−γ ρ+γ , γ λ . The disease free equilibrium isz = (0, 1).
The corresponding SDE is of the form (1), with d = 2, k = 3, Note that in this example and in the next one, we do not need the definition of the reflected processZ N t , since it is identical to Z N t .
The system of ODES for the state and adjoint state (53) reads in this casė

The SIR model with demography
The deterministic SIR model with demography, see e.g. [1], can be written aṡ Again x t (resp. y t ) denotes the proportion of infectious (resp. susceptible) individuals in the population. As opposed to the SIRS model, the removed individuals do not loose their immunity, rather new susceptibles are born at rate µ, which is the rate at which both susceptibles and infectious die (the infectious heal at rate ρ as in the SIRS model). If R 0 = λ γ+µ > 1, there is a stable endemic equilibrium z * = µ γ+µ − µ λ , γ+µ λ , and a disease free equilibriumz = (0, 1).
One difficulty in this model is that the "proportions" here are not true proportions, they can be greater than 1. In fact the random process lives in all of R 2 + . However one can show, see [1] that the cost needed to hit the boundary {x+ y = R} tends to ∞ as R → ∞, hence for R large enough, if we restrict ourself to the subset A R = {(x, y) ∈ R 2 + , x + y ≤ R}, since min z∈∂A R V (z * , z) = min z 1 =0 V (z * , z). Also A R is not exactly A 1 which has been considered so far, it is easily seen that all our results extend to this new situation. The system of ODES for the state and adjoint state (53) reads in this casė

The SIV model
In this model, some of the individuals are vaccinated. Also the vaccine is not perfect, it gives a partial protection. If we denote by x t (resp. y t ) the proportion of infectious (resp. of vaccinated) individuals at time t, the model studied by [6] readṡ For certain values of the parameters, it is shown that this model have one disease-free equilibrium, one locally stable endemic equilibrium z * , and a third equilibriumz which lies on the characteristic boundary which separates the basins of attraction of the two other equilibria, which is here ∂O. The corresponding SDE is of the form (1), with d = 2, The system of ODES for the state and adjoint state (53) reads in this casė This is a version of the SIR model, where the recovered individuals are susceptible, but with a susceptibility which is less that that of those who have never been infected. They are of type S 1 . This model has been studied in [11]. Let x t (resp. y t ) denote the proportion of infectious (resp. of type S 1 ) individuals. The ODE readṡ x t = β(1 − x t − y t )x t − (µ + α)x t + rβx t y t , y t = αx t − µy t − rβx t y t .
Again for certain values of the parameters, we have the same large time description as for the SIV model, and ∂O is the characteristic boundary which separates the basins of attraction of the two local stable equilibria. The corresponding SDE is of the form (1), , β 2 (x, y) = αx, β 3 (x, y) = µx, β 4 (x, y) = rβxy and β 5 (x, y) = µy.

The result
In the four above examples, extinction happens when z t hits the boundary to whichz belongs (which is what is denoted ∂O in the previous sections of this paper). This is quite clear in the first two examples. In the last two, as soon as the process crosses that boundary, it converges very quickly (in zero time in the scale of Large Deviations) to the disease free equilibrium. When on the boundary ∂O, the solution of the ODE converges toz. It clearly follows from that remark that V ∂O = V O (z * ,z). What we want to show is that this minimum is unique, i.e. This shows, thanks to Corollary 5.4, that for large N, Z N,z will exit the domain of attraction of the endemic equilibrium z * in the vicinity ofz with probability almost 1.
We now turn to the Proof of Proposition 6.2 Suppose first that there exists a minimizing sequence {u n , n ≥ 1} ⊂ L 1 (R + ; R k + ) such that the corresponding trajectory z t hits the target M at some point z n ∈ ∂O\{z} in time T n , with T := sup n T n < ∞. Since I T is a good rate function (i.e. its level sets are compact), see Theorem 3 in [8], there exists a subsequence z n k which converges to a optimal trajectoryẑ which hits M at point z =z at timeT ≤ T , with a controlû ∈ L 1 ([0, T ]; R k + ). We concatenateẑ with the solution of the ODE starting from z, which converges toz (in infinite time). Since the second part of the trajectory runs at no cost, the whole trajectory is optimal for the same control problem as above, but with the constraint thatz must be the final point. We apply the Pontryagin maximum principle to this new optimal control problem, which implies the existence of a continuous adjoint state (p t , q t ). Since p t = q t = 0 for t >T , we have pT = qT = 0. But this is not possible. z t being bounded, the solution (p t , q t ) of the adjoint state equation cannot hit (0, 0) in finite time. One way to see this is to note that the function (p t , q t ) time reversed from timeT would solve an ODE starting from (0, 0), whose unique solution is (p t , q t ) ≡ (0, 0), see the second equation in (53). We conclude from the above argument that if an optimal trajectory converges to some point z =z, then it does so in infinite time. Consequently (x ∞ , y ∞ , p ∞ , q ∞ ) must be a fixed point of (53). It remains to show that (x,ȳ, 0, 0) is the only admissible fixed point. The argument is now slightly different in the various considered examples.
In the first two examples (SIRS and SIR with demography), we know that x ∞ (the first coordinate of z ∞ ) and the second coordinate q ∞ of r ∞ vanish. Consequently y ∞ must be the zero of 1 − y, hence equals 1.
In the two other cases, we first note that both p ∞ and q ∞ must be finite. Indeed, either the solution must remain bounded, or else would explode in finite time, which contradicts the existence of the adjoint state on [0, +∞). We next show that both coordinates of z ∞ , x ∞ and y ∞ , are positive. In case of the SIV model, we first note that y ∞ = 0 would imply x ∞ = 1, but (1, 0) is clearly not on M. On the other hand, x ∞ = 0 would imply that the second coordinate q ∞ of r ∞ vanishes, and y ∞ = η η+µ+θ , which again gives a point not on M. In case of the S 0 IS 1 model, we note that x ∞ = 0 implies y ∞ = 0, and the reserve implication is also true, but (0, 0) is not on M. Finally, sinceĈ < ∞, the running cost must converge to 0 as t → ∞. For each 1 ≤ j ≤ k such that β j (z ∞ ) > 0, this implies that r t , h j → 0 as t → ∞. This is true for j = 3 and 4 in case of the SIV model, for j = 3 and 5 in case of the S 0 IS 1 model. In both cases, it implies that (p ∞ , q ∞ ) = (0, 0). Consequently z ∞ is a zero of b(z) = k j=1 β j (z)h j and belongs to M, hence equalsz. The proof is complete.