# Large deviations for sticky-reflecting Brownian motion with boundary diffusion

Jean-Baptiste Casteras, Leonard Monsaingeon, Luca Nenna

► To cite this version:

Jean-Baptiste Casteras, Leonard Monsaingeon, Luca Nenna. Large deviations for sticky-reflecting Brownian motion with boundary diffusion. 2025. hal-04895784

HAL Id: hal-04895784

https://inria.hal.science/hal-04895784v1

Preprint submitted on 18 Jan 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Large deviations for sticky-reflecting Brownian motion with boundary diffusion

Jean-Baptiste Casteras, Léonard Monsaingeon, Luca Nenna

## Abstract

We study a Schilder-type large deviation principle for sticky-reflected Brownian motion with boundary diffusion, both at the static and sample path level in the short-time limit. A sharp transition for the rate function occurs, depending on whether the tangential boundary diffusion is faster or slower than in the interior of the domain. The resulting intrinsic distance naturally gives rise to a novel optimal transport model, where motion and kinetic energy are treated differently in the interior and along the boundary.

*Keywords and phrases.* Large deviation principle, sticky boundary diffusion, Schrödinger problem, optimal transport

## 1 Introduction

In its classical version, Schilder's theorem completely describes on the path level the short-time behaviour of Brownian motion with generator $Q = \frac{1}{2}\Delta$. More precisely, the slowed-down Wiener measure $R^\epsilon$ on $\Omega = C([0, 1]; \mathbb{R}^d)$, corresponding to the process with generator $Q^\epsilon = \frac{\epsilon}{2}\Delta$, satisfies in the small-time regime $\epsilon \to 0$ the Large Deviation Principle

$$R^{\epsilon} \underset{\epsilon \to 0}{\asymp} \exp \left( -\frac{1}{\epsilon} C(\omega) \right), \quad C(\omega) = \frac{1}{2} \int_{0}^{1} |\dot{\omega}_{t}|^2 dt \quad (1.1)$$

with rate function given by the kinetic energy. The short-time behaviour can of course be analyzed for more general diffusion processes and this is interesting for many reasons, but let us just mention three in connection with analysis, optimal transport, and PDEs:

1. Varadhan's short-time formula [46]

$$-\lim_{t \to 0} t \log p_t(x, y) = \frac{1}{2} d^2(x, y)$$

relates the transition kernel $p_t(x, y)$ to the intrinsic distance $d^2(x, y)$ of a given diffusion process, which in turn can be used to establish upper and lower heat kernel estimates, Harnack inequalities, etc.

2. The short-time behaviour is a key ingredient for the so-called *Schrödinger problem*, which has been recognized over the past 20 years as an entropic approximation of Monge-Kantorovich optimal transport [33, 34, 37]. More precisely, given two distributions $\rho_0, \rho_1 \in \mathcal{P}(\mathbb{R}^d)$ and writing $H(P|R) = \int \frac{dP}{dR} \log \left( \frac{dP}{dR} \right) dR$ for the relative entropy of $P \ll R$ with respect to a reference measure $R$, the Schrödinger bridge problem reads

$$C^{\epsilon}(\rho_0, \rho_1) = \min_{P \in \mathcal{P}(\Omega)} \left\{ \epsilon H(P|R^{\epsilon}) \quad \text{s.t.} \ P_0 = \rho_0, P_1 = \rho_1 \right\}. \quad (1.2)$$
Here and throughout $e_t(\omega) = \omega_t$ denotes the time-t evaluation map, and $P_0 = e_{0\#}P$ and $P_1 = e_{1\#}P$ denote the marginals of the path measure $P$ at times $t = 0, 1$. Roughly speaking, as soon as the slowed-down measure satisfies the LDP $R^\epsilon \asymp \exp(-\frac{1}{\epsilon}C(\omega))$ the entropic problem Gamma-converges to

$$ \mathcal{C} = \Gamma - \lim_{\epsilon \to 0} \mathcal{C}^\epsilon $$

given by

$$ \mathcal{C}(\rho_0, \rho_1) = \min_P \left\{ \int C(\omega)P(d\omega) \quad \text{s.t.} \quad P_0 = \rho_0, P_1 = \rho_1 \right\}, $$

see e.g. [33, 8, 4, 7, 13]. This is nothing but the Lagrangian version of the celebrated Benamou-Brenier Eulerian interpretation of Monge-Kantorovich optimal transport [6]. Moreover, writing

$$ c(x, y) = \min_{\omega} \{C(\omega) \quad \text{s.t.} \quad \omega(0) = x, \omega(1) = y\} \qquad (1.3) $$

one also has the equivalent static Kantorovich formulation

$$ \mathcal{C}(\rho_0, \rho_1) = \min_{\pi} \left\{ \int c(x, y)\pi(dx, dy) \quad \text{s.t.} \quad \pi_x = \rho_0, \pi_y = \rho_1 \right\}. $$

Hence the rate function $C(\omega)$ in Schilder's theorem is deeply related to the optimal transport problem.

3. Since the works of Jordan, Kinderlehrer and Otto [29], it is well-known that the canonical Fokker-Planck equation $\partial_t\rho_t = Q^*\rho_t = \frac{1}{2}\Delta\rho_t$ (with no-flux conditions on the boundary of the domain $D \subset \mathbb{R}^d$) can be interpreted as the gradient flow of the entropy $H(\rho) = \int_D \rho \log \rho dx$ with respect to the Euclidean Wasserstein distance $W^2(\mu, \nu) = \mathcal{C}(\mu, \nu) = \min_{\pi} \int |x-y|^2\pi(dx, dy)$. Two ingredients connect here this macroscopic PDE with the microscopic (reflected) Brownian motion: the entropy $H(\rho) = H(\rho|\text{Leb})$ is computed relatively to the stationary, reversible Lebesgue measure, and the Wasserstein distance is built upon the underlying Euclidean cost $c(x, y) = |x-y|^2$ given by the intrinsic distance of the stochastic process. In the series of works [1, 19, 35, 36] it was understood that this macroscopic gradient flow structure can be justified at the microscopic level precisely from large deviation principles. In particular (1.1) plays a key role in the fist order expansion (Gamma-convergence) relating discrete-time rate functions on the one-hand, characterizing the hydrodynamic limit $N \to \infty$ for a large system of independent Brownian particles, and on the other hand minimizing movements/JKO schemes, a discrete-time characterization of the dissipative gradient flow structure of the macroscopic heat equation. We refer e.g. to [1, Theorem 3] for a self-contained statement and more details, but let us just summarize by saying that it is the LDP (1.1) that determines the correct Wasserstein dissipation mechanism and entropy functional, which in turn gives the Fokker-Planck equation as a canonical gradient flow. See also [22, §13.3 and Theorem 13.37].

All of this can be extended to cover more general models and processes (see e.g. [38, 39, 40, 41] to name just a few), but the analysis is always restricted to somehow “smooth” settings and requires a case-to-case adaptation. In this work, motivated by the three questions above and in particular by the connection with Fokker-Planck PDEs, we take interest in the short-time behaviour of a particular non-smooth diffusion, the so-called *Sticky-reflected Brownian Motion with boundary diffusion* (SBM in short). Sparked by applications in interacting particle systems with boundary or zero-range interactions [3, 31, 24], among others, SBM has received renewed attention in the last decade [9, 11, 30, 42, 20, 12]. In a given domain $D \subset \mathbb{R}^d$ SBM can be roughly described as follows. While in the interior, the process performs standard Brownian motion. Upon hitting the boundary, SBM “sticks” there for a while and thereafter undergoes
purely tangential diffusion along $\Gamma = \partial D$. The process then eventually reenters the domain and resumes standard Brownian motion, and so on. A delicate balance determines the jump rate from/to the boundary and involves the *local time* at the boundary, see later on Section 2 for rigorous details. Accordingly, the Fokker-Planck equation takes the form of a system of coupled interior/boundary parabolic equations (2.6).

By simple scaling arguments one can always assume that the interior diffusion occurs with volatility $\sigma_{\text{int}} = 1$, but a particularly important parameter in the model is the tangential diffusivity coefficient $a = \sigma_{\Gamma}^2 > 0$. We will show that a sharp transition takes place across $a = 1$, which is the critical threshold for which interior and boundary diffusions match tangentially: For $a > 1$ motion along the boundary is preferred, the rate function in our LDP will see the impact of $a$ in a nontrivial and global fashion, and therefore the intrinsic distance $d_a(x, y)$ induces a specific geometry that strongly depends on $a > 1$. On the other hand for $a \le 1$ interior motion becomes more favourable from an energetic perspective, the rate function will not depend on $a$ anymore, and one recovers instead a purely Euclidean scenario $d_a(x, y) \equiv |x - y|$ independently of $a < 1$.

In [16] the first two authors showed that the Fokker-Planck equation for SBM is a gradient flow for the standard Wasserstein distance when $a = 1$. This is expected when interior and boundary diffusions match tangentially, so that the intrinsic distance of SBM coincides with the Euclidean one $d_a^2(x, y) = |x - y|^2$. The case $a > 1$ should lead to a true metric gradient flow (in the sense of *curves of maximal slope* [2]) with respect to the Wasserstein distance $W_a^2$ induced by the cost $c(x, y) = d_a^2(x, y)$ and will be the subject of a future article [15]. For $a < 1$, since $d_a^2(x, y) = |x - y|^2$ is independent of $a$, the natural transportation distance is the Euclidean Wasserstein distance, so any Wasserstein gradient flow would not see $a$. On the other hand the probabilistic Fokker-Planck equation clearly depends on $a$, see later on Section 2 and in particular (2.6). This means that the gradient flow, if any, cannot be a true metric one, and that a finer understanding of the infinitesimal structure is needed. This will be investigated in a separate work [10].

Our goal here is threefold: 1) we study the LDP in its own right, 2) for $a < 1$ we exhibit a very natural example of Sturm's paradigm [44] when the diffusion process is not fully determined by its intrinsic distance, and 3) for $a > 1$ the LDP gives, via the Gamma-convergence entropic-to-deterministic problems, gives the natural dissipation mechanism and yields a limiting, nonstandard optimal transport problem which is thereby justified and will therefore be used in subsequent works to study gradient-flows. For full disclosure, we stress at this point that the rigorous analysis will only be carried in the particular case of half-spaces $D = \mathbb{R}_+^d$.

The paper is organized as follows. Section 2 contains a detailed description of SBM and its basic properties. In Section 3 we give a heuristic derivation of various levels of LDPs and formally identify the correct rate functions. In Section 4 we explicitly compute the Markov transition kernel of SBM in half-spaces. In Section 5 we build on this explicit representation to derive a static LDP for the initial-terminal joint marginals $R_{0,1}^\epsilon \asymp \exp(-\frac{1}{\epsilon}c(x, y))$, Theorem 5.1. Section 6 contains an analysis of the cost and identifies it as a dynamical Lagrangian minimization $c(x, y) = \min \int_0^1 L(\omega_t, \dot{\omega}_t)dt$, Theorem 6.1. Finally, in Section 7 we show exponential tightness of the path measure and strengthen the static LDP to a full sample paths LDP $R_x^\epsilon \asymp \exp(-\frac{1}{\epsilon}C_x(\omega))$, Theorem 7.1.

## 2 Sticky-reflected Brownian Motion with boundary diffusion

In its simplest form, SBM was originally studied by Feller [21] for the classification of boundary conditions for one-dimensional diffusions, and was later extended to include boundary diffusions in higher dimensions [27, 45, 47] including to Wentzell boundary conditions. Let $D \subset \mathbb{R}^d$ be a smooth domain with boundary $\Gamma = \partial D$. We write $\Gamma$ for objects and integrals intrinsically defined on $\Gamma$, seen as a $(d-1)$-manifold of its own, while we keep the notation $\partial D$ for the
boundary trace of objects defined in the whole domain $\bar{D}$ (typically appearing when integration by parts is performed).

The Sticky-reflected Brownian Motion with boundary diffusion (SBM in short) is the $\bar{D}$-valued stochastic process with Feller generator

$$ \Omega\phi(x) = \begin{cases} \frac{1}{2}\Delta\phi(x) & \text{if } x \in D \\ \frac{a}{2}\Delta_{\Gamma}\phi(x) - \theta\partial_n\phi(x) & \text{if } x \in \partial D \end{cases} \qquad (2.1) $$

and domain

$$ \mathcal{D}(\Omega) = \{ \phi \in C(\bar{D}) \text{ s.t. } \Omega\phi \in C(\bar{D}) \}. \qquad (2.2) $$

Here $n$ denotes the outer unit normal, and we write throughout $\nabla_{\Gamma}$, $\operatorname{div}_{\Gamma}$, $\Delta_{\Gamma}$ for the tangential gradient, divergence, and Laplace-Beltrami operators along $\Gamma = \partial D$. The tangential diffusion coefficient $a > 0$ will play a crucial role and we sometimes emphasize the dependence by writing $\Omega = \Omega_a$. On the other hand the stickiness $\theta$ plays a very minor role and we omit the dependence. The reversible stationary measure is

$$ \mu(dx) = dx + \frac{1}{2\theta}\sigma(dx), \qquad (2.3) $$

where $\sigma = \mathcal{H}_{\partial D}^{d-1}$ denotes the Lebesgue measure on the boundary. Note that $\mu$ depends on $\theta$, but crucially not on $a$. Integration by parts

$$ \begin{aligned} \int_{\bar{D}} \phi \Omega \psi \, d\mu &= \int_{D} \phi \frac{1}{2} \Delta \psi \, dx + \int_{\Gamma} \phi \left( \frac{a}{2} \Delta_{\Gamma} \psi - \theta \partial_{n} \psi \right) \frac{1}{2\theta} \, d\sigma \\ &= \frac{1}{2} \left( - \int_{D} \nabla \phi \cdot \nabla \psi \, dx + \int_{\partial D} \phi \partial_{n} \psi \, d\sigma \right) - \left( \frac{a}{4\theta} \int_{\Gamma} \nabla_{\Gamma} \phi \cdot \nabla_{\Gamma} \psi \, d\sigma + \frac{1}{2} \int_{\Gamma} \phi \partial_{n} \psi \, d\sigma \right) \\ &= - \frac{1}{2} \int_{\Omega} \nabla \phi \cdot \nabla \psi \, dx - \frac{a}{4\theta} \int_{\Gamma} \nabla_{\Gamma} \phi \cdot \nabla_{\Gamma} \psi \, d\sigma \end{aligned} \qquad (2.4) $$

shows that $\mu$ is indeed symmetric, and the corresponding Dirichlet form is

$$ \mathcal{E}_a(\phi) = \frac{1}{2} \int_D |\nabla \phi|^2 dx + \frac{a}{4\theta} \int_{\partial D} |\nabla_{\Gamma} \phi|^2 d\sigma $$

with domain

$$ \mathcal{D}(\mathcal{E}_a) = \{ \phi \in H^1(D) \quad \text{s.t.} \quad \phi|_{\partial D} \in H^1(\partial D) \}. $$

(Here and throughout $\phi|_{\partial D}$ stands for the boundary trace tr $\phi = \phi|_{\partial D}$ of $\phi \in H^1(D)$). It is shown in [25] that $\mathcal{E}_a$ is symmetric, regular, strongly local, and recurrent. We denote by $p_t(x, y)$ the transition kernel with density $p_t(x, y) = p_t(y, x)$ w.r.t to $\mu$. By [25, thm. 3.15 and thm 3.17] for any $x \in \bar{D}$ (including $x \in \Gamma = \partial D$) there is a unique path-measure $R_x$ on $\Omega = C([0, 1]; \bar{D})$ solving the martingale problem and represented through the SDE

$$ \left\{ \begin{aligned} \mathrm{d}X_t &= 1_D(X_t)\mathrm{d}B_t + 1_{\Gamma}(X_t) \left[ \sqrt{a}\mathrm{d}B_t^{\Gamma} - \theta n(X_t)\mathrm{d}t \right] \\ \mathrm{d}B_t^{\Gamma} &= \pi(X_t) \circ \mathrm{d}B_t \\ X_0 &= x \end{aligned} \right. . \qquad (2.5) $$

Here

$$ \pi(x) = \mathrm{Id} - n(x)n^t(x) \in M_{d \times d}(\mathbb{R}) $$

denotes the orthogonal projection on the tangent space $T_x \partial D$ at a point $x \in \partial D$ with outer normal $n(x)$. The Stratonovich SDE $\mathrm{d}B_t^{\Gamma} = \pi(X_t) \circ \mathrm{d}B_t$ simply means that $B_t^{\Gamma}$ is a Brownian motion on the boundary $\Gamma = \partial D$ with Laplace-Beltrami generator $\frac{1}{2}\Delta_{\Gamma}$, see [26]. Note that the full $d$-dimensional Brownian motion $B_t$ inside $D$ contains more information than the tangential one $B_t^{\Gamma}$. In [20] it is shown that even in one dimension $D = \mathbb{R}^+$ the SDE representing 1-dimensional SBM does not have strong solutions, and it is therefore natural to represent
the boundary BM $B^\Gamma$ in terms of the interior BM. An important feature of (2.5) is that it characterizes the local time at the boundary $L_t^\Gamma$ as

$$dL_t^\Gamma = \theta \mathbb{1}_\Gamma(X_t)dt,$$

see e.g. [20, thm. 5] and [28, §IV.7]. In particular, stickiness $\theta > 0$ yields non-trivial sojourn on the boundary with occupation time

$$O_t = \int_0^t \mathbb{1}_\Gamma(X_s)ds = \frac{1}{\theta}L_t^\Gamma.$$

Finally, for the sake of completeness and also for future reference, let us derive the Fokker-Planck equation for SBM. The relevant laws $X_t \sim \rho_t \in \mathcal{P}(\bar{D})$ will as always be absolutely continuous w.r.t the stationary measure $\mu$ in (2.3), hence we only consider measures $\rho \ll \mu$ and accordingly write

$$\rho(dx) = u(x)dx + v(x)\sigma(dx).$$

In order to compute the dual $\Omega^*$ of (2.1) we take $\phi \in \mathcal{D}(\Omega)$ and integrate by parts (assuming that $u, v$ are smooth enough)

$$\begin{aligned} \int_{\bar{D}} \phi(x)[\Omega^* \rho](dx) &= \int_{\bar{D}} [\Omega \phi](x) \rho(dx) = \int_D \left[\frac{1}{2}\Delta\phi\right] u + \int_{\Gamma} \left[\frac{a}{2}\Delta\Gamma\phi - \theta\partial_n\phi\right] v \\ &= \frac{1}{2} \left( \int_D \phi \Delta u + \int_{\partial D} u \partial_n \phi - \phi \partial_n u \right) + \left( \int_{\Gamma} \phi \frac{a}{2} \Delta \Gamma v - \theta v \partial_n \phi \right) \\ &= \int_D \frac{1}{2} \Delta u \phi + \int_{\Gamma} \left(\frac{a}{2} \Delta \Gamma v - \partial_n u\right) \phi + \int_{\partial D} \left(\frac{u}{2} - \theta v\right) \partial_n \phi. \end{aligned}$$

(all the integrals being implicitly computed with respect to the Lebesgue measures $dx, d\sigma$ on $D$ and $\Gamma = \partial D$, respectively) As a consequence the abstract Fokker-Planck equation $\partial_t \rho_t = \Omega^* \rho_t$ can be written in weak form (with again $\rho_t = u_t dx + v_t d\sigma$)

$$\begin{aligned} \forall \phi \in \mathcal{D}(\Omega): \quad & \int_D \phi \partial_t u_t + \int_{\Gamma} \phi \partial_t v_t = \frac{d}{dt} \left( \int_D \phi u_t + \int_{\Gamma} \phi v_t \right) \\ &= \frac{d}{dt} \int_{\bar{D}} \phi \rho_t = \int_{\bar{D}} (\Omega \phi) \rho_t = \int_{\bar{D}} \phi \Omega^* \rho_t \\ &= \int_D \frac{1}{2} \Delta u_t \phi + \int_{\Gamma} \left( \frac{a}{2} \Delta \Gamma v_t - \frac{1}{2} \partial_n u_t \right) \phi \\ & \phantom{=} + \int_{\partial \Omega} \left( \frac{u_t}{2} - \theta v_t \right) \partial_n \phi. \end{aligned}$$

Taking first $\phi \in C_c^\infty(\Omega)$ gives simply

$$\partial_t u_t = \frac{1}{2} \Delta u_t$$

in the interior, and we can simply cancel $\int_D \phi \partial_t u_t = \int_D \phi \frac{1}{2} \Delta u_t$ in the previous equality. This leaves

$$\forall \phi \in \mathcal{D}(\Omega): \quad \int_{\Gamma} \phi \partial_t v_t = \int_{\Gamma} \left( \frac{a}{2} \Delta \Gamma v_t - \frac{1}{2} \partial_n u_t \right) \phi + \int_{\partial \Omega} \left( \frac{1}{2} u_t - \theta v_t \right) \partial_n \phi.$$

Taking now any $\phi \in C^\infty(\Gamma)$ and extending to $\phi \in C^\infty(\bar{D})$ with zero normal derivative such that $\phi \in \mathcal{D}(\Omega)$ (this is no too difficult), we see now that $\int_{\Gamma} \phi \partial_t v_t = \int_{\Gamma} \left( \frac{a}{2} \Delta \Gamma v_t - \partial_n u_t \right) \phi$ for all $\phi \in C^\infty(\Gamma)$, meaning that

$$\partial_t v_t = \frac{a}{2} \Delta \Gamma v_t - \frac{1}{2} \partial_n u_t.$$
Subtracting again from the previous equality, we are finally left with

$$ \forall \phi \in \mathcal{D}(\Omega): \qquad 0 = \int_{\partial D} \left( \frac{1}{2} u_t - \theta v_t \right) \partial_n \phi. $$

It is relatively easy to check that the normal trace $\partial_n: \mathcal{D}(\Omega) \to C(\Gamma)$ is surjective, and therefore

$$ \left. \frac{1}{2} u_t \right|_{\partial D} = \theta v_t \quad \text{on the boundary } \partial \Omega. $$

In view of (2.3) this simply means that the density $f_t(x)$ of $\rho_t(dx) = f_t(x)\mu(dx)$ with respect to the stationary, reversible measure $\mu$ is continuous up to the boundary, which should come as no surprise. Summarizing, the Fokker-Planck equations is

$$ \partial_t \rho_t = Q^* \rho_t \quad \iff \quad \left\{ \begin{array}{ll} \rho_t = u_t dx + v_t d\sigma, & \text{in } D, \\ \partial_t u_t = \frac{1}{2} \Delta u_t & \text{in } \Gamma, \\ \partial_t v_t = \frac{a}{2} \Delta \Gamma v_t - \frac{1}{2} \partial_n u_t & \text{on } \partial \Omega. \\ \frac{1}{2} u_t = \theta v_t & \end{array} \right. \qquad (2.6) $$

### 3 Heuristics and technical obstructions

The SBM process slowed-down on time-scale $\varepsilon > 0$ is described by

$$ R_x^\varepsilon := \text{the path-measure with generator } Q^\varepsilon = \varepsilon Q $$

started at $x$. One of the classical approaches to analyze the large deviations of the diffusion $R^\varepsilon$ as $\varepsilon \to 0$ is as follows, see e.g. [22, 32]. Consider the Hamiltonian

$$ H^\varepsilon \phi := \varepsilon e^{-\frac{\phi}{\varepsilon}} Q^\varepsilon e^{\frac{\phi}{\varepsilon}} $$

and its associated Hamilton-Jacobi nonlinear semi-group $V^\varepsilon(t)\phi := \varepsilon \log \mathbb{E}_x e^{\frac{1}{\varepsilon}\phi(X_t^\varepsilon)}$ satisfying

$$ \left\{ \begin{array}{l} \frac{d}{dt} V^\varepsilon(t) \phi = H^\varepsilon V^\varepsilon(t) \phi, \\ V^\varepsilon(0) \phi = \phi. \end{array} \right. $$

Convergence of the generators

$$ \lim_{\varepsilon \to 0} H^\varepsilon \phi = H \phi \qquad (3.1) $$

in some vague sense and for a large enough class of functions $\phi$ should in principle imply convergence of generated semi-groups

$$ \lim_{\varepsilon \to 0} V^\varepsilon(t) \phi = V(t) \phi, \qquad (3.2) $$

where the limit $V$ is defined by

$$ \left\{ \begin{array}{l} \frac{d}{dt} V(t) \phi = H V(t) \phi, \\ V(0) \phi = \phi. \end{array} \right. $$

By standard Varadhan-Bryc arguments [18, chapters 4.2 and 4.3] one expects the LDP to hold with dynamical rate function given by the abstract time-slicing

$$ C(\omega) := \sup_{|\tau_N| \to 0} \sup_{\phi_1, \dots, \phi_N} \sum_{i=1}^{N} \phi_i(\omega_{t_i}) - V(t_i - t_{i-1})\phi_i(\omega_{t_{i-1}}), \qquad (3.3) $$
where the supremum is taken over all partitions $\tau_N$ of the time interval $[0, 1]$ such that $0 = t_0 < t_1 < \dots < t_N = 1$ with size $|\tau_N| = \max|t_{i+1} - t_i| \to 0$. In order to retrieve a more tractable expression for this, assume moreover that the variational representation

$$H\phi(x) = H(x, \nabla\phi(x)) = \sup_{q \in \mathbb{R}^d} \{\nabla\phi(x) \cdot q - L(x, q)\}, \quad x \in \bar{D}$$

holds for a sufficiently well-behaved Lagrangian $L$, i-e with $H(x, \cdot) = L^*(x, \cdot)$ convex conjugate of one another in the sense Fenchel-Legendre duality. Then $H$ generates a Nisio semi-group $V(t)$, the dynamical cost (3.3) can be computed from usual stochastic control theory [23] as a Lagrangian action

$$C(\omega) = \int_{0}^{1} L(\omega_t, \dot{\omega}_t)dt, \qquad (3.4)$$

and the diffusion $X^\epsilon$ finally satisfies the LDP

$$R_x^\epsilon \asymp \exp\left(-\frac{1}{\epsilon}C_x(\omega)\right) \quad \text{with rate function} \quad C_x(\omega) = \iota_{\{\omega_0=x\}} + C(\omega).$$

Here

$$\iota_{\{\omega_0=x\}} = \begin{cases} 0 & \text{if } \omega_0 = x \\ +\infty & \text{else} \end{cases}$$

encodes the initial condition $X_0 = x$, but one can also cover general initial distributions $X_0^\epsilon \sim \rho_0^\epsilon$ as long as they satisfy a LDP $\rho_0^\epsilon(dx) \asymp \exp(-\frac{1}{\epsilon}C_0(x))$. By the contraction principle one therefore expects that the initial-terminal joint distribution $R_{01}^\epsilon = (e_0, e_1)_{\#}R_x^\epsilon \in \mathcal{P}(\bar{D}^2)$ satisfies the LDP

$$R_{01}^{\epsilon} \asymp \exp\left(-\frac{1}{\epsilon}c(x, y)\right)$$

with the static cost (1.3) obtained by Lagrangian minimization

$$c(x, y) = \min_{\omega} \left\{ \int_{0}^{1} L(\omega_t, \dot{\omega}_t)dt \quad \text{s.t.} \quad \omega_0 = x, \omega_1 = y \right\}.$$

This determines the static LDP from the dynamic one, but the analysis goes both ways: by simple scaling the LDP for $\{R_{01}^\epsilon\}_\epsilon$ immediately gives the LDP for $\{R_{0\tau}^\epsilon\}_{\epsilon>0} = \{R_{0\tau}^\epsilon\}_{\epsilon>0}$ for any fixed $\tau > 0$. One expects in general the collection of all such $(0, \tau)$-joint distributions to fully determine the path measure, hence by time slicing the sample path large deviation should follow from the static one. This is actually the route that we will take.

Let us try to make this all of this more explicit in our particular setting. With the generator $\mathcal{Q}^\epsilon = \mathcal{Q}$ given by (2.1) one easily computes

$$H^\epsilon\phi(x) = \begin{cases} \frac{1}{2}|\nabla\phi|^2 + \frac{\epsilon}{2}\Delta\phi & \text{if } x \in D \\ \frac{\epsilon}{2}|\nabla_\Gamma\phi|^2 + \epsilon\left(\frac{\epsilon}{2}\Delta_\Gamma\phi - \theta\partial_n\phi\right) & \text{if } x \in \partial D, \end{cases} \qquad (3.5)$$

from which at least formally

$$H^\epsilon\phi(x) \xrightarrow{\epsilon \to 0} H\phi(x) = \begin{cases} \frac{1}{2}|\nabla\phi|^2 & \text{if } x \in D \\ \frac{\epsilon}{2}|\nabla_\Gamma\phi|^2 & \text{if } x \in \partial D. \end{cases} \qquad (3.6)$$

The Legendre transform can be computed explicitly as

$$L(x, q) = \sup_{p} \{q \cdot p - H(x, p)\} = \begin{cases} \frac{1}{2}|q|^2 & \text{if } x \in D \\ \frac{1}{2a}|q|^2 & \text{if } x \in \partial D \text{ and } q \in T_x \partial D. \\ +\infty & \text{else} \end{cases} \qquad (3.7)$$
It is straightforward to check that $L$ is jointly lower semicontinuous if and only if $a \ge 1$, and therefore the map

$$ \omega \mapsto C(\omega) := \int_{0}^{1} L(\omega_{t}, \dot{\omega}_{t})dt \quad \text{is l.s.c. if and only if } a \ge 1 $$

for the natural weak $H^1$ convergence, see later on Theorem 6.1. As usual, if a particular LDP holds for some rate function (here $C(\omega)$) it also holds for its lower semi-continuous relaxation, so imposing the lower semi-continuity of good rate functions allows to speak unambiguously of the rate function. In our particular context we thus expect that the LDP should hold in fact with $L$ replaced by its lower semi-continuous relaxation $\underline{L}$, with effective rate function

$$ \underline{C}_x(\omega) := \iota_{\{\omega_0=x\}} + \underline{C}(\omega) = \iota_{\{\omega_0=x\}} + \int_{0}^{1} \underline{L}(\omega_t, \dot{\omega}_t)dt. \quad (3.8) $$

Here we see the phase transition already appearing very naturally: For $a \ge 1$ we have $\underline{L} = L$ and the induced cost $\underline{C} = C$ feels the influence of $a$ in a nontrivial fashion. On the other hand it is not difficult to see that for $a < 1$ the relaxation is always given by $\underline{L} = L|_{a=1}$, which is somehow a monotone relation with respect to the diffusion coefficient in the trivial sense that $1 = \sup\{a, a < 1\}$. In that case the effective rate function $\underline{C} = C|_{a=1}$ does not depend on $a$.

In [44] K.T. Sturm showed that, perhaps surprisingly, diffusion processes are not always fully characterized by their intrinsic distance. More precisely, given any process $X$ with intrinsic distance $d^2(x, y)$, he constructs a second process $\tilde{X}$ with strictly smaller diffusion coefficients and yet sharing the same intrinsic distance $\tilde{d} = d$ with $X$. This monotonicity echoes our lower relaxation of the Lagrangian: for any $a < 1$ the SBM $X$ has intrinsic distance given by the Euclidean cost, and picking any $\tilde{a} < a$ gives a different diffusion $\tilde{X}$ with smaller coefficients but same distance. Clearly $a = 1$ is special in this sense, since it is the larger such $a$ for which one can pick $\tilde{a} < a$ in this way, and $a = 1$ is therefore a maximal diffusion of some sort. This is likely not a coincidence and will be investigated in a future work [10].

On a different note, the phase transition is also suggested from the boundary conditions, about which we deliberately remained vague so far. By definition of the Hamiltonian, a function $\phi$ is in the domain $\mathcal{D}(H^\epsilon)$ of (3.5) if and only if $\exp(\phi/\epsilon)$ is in the domain $\mathcal{D}(Q^\epsilon) = \mathcal{D}(Q)$, or equivalently if and only if the two expression in the right-hand side of (3.5) match continuously at the boundary $\partial D$. At least formally for $\epsilon \to 0$ this suggests

$$ |\nabla\phi(x)|^2 = a|\nabla_{\Gamma}\phi(x)|^2 \quad \text{for} \quad x \in \partial D. \quad (3.9) $$

* For $a > 1$ this simply means that, at boundary points, $\nabla\phi$ makes an angle $\alpha = \alpha(a)$ with the normal $n(x)$ given by

$$ \sin^2 \alpha = \frac{1}{a}. $$

This angle $\alpha$ will show up again later on, and we will prove that geodesics for the intrinsic distance always enter or exit the boundary with angle of incidence $\alpha$ (see Theorem 6.1). Notice that for $a = 1$ this corresponds to a right-angle condition $\alpha = \pi/2$, or equivalently to the Neumann boundary condition $\partial_n\phi = 0$ along $\partial D$. This is exactly the classical no-flux condition for the velocity field $v = \nabla\phi$ driving Lagrangian particles in the Benamou-Brenier formulation [6] of optimal transport.

* On the other hand for $a < 1$ the constraint (3.9) becomes unfeasible unless the whole gradient vanishes, $\nabla\phi|_{\partial D} = 0$. Formally this means that particles can no longer move along the boundary (not even tangentially), which seems surprising at first sight: choosing $x, y$ close enough on a concave or flat portion of the boundary $\partial D$, on expects that minimizing curves realizing $c(x, y) = \min_{\omega} \int_{0}^{1} L(\omega_t, \dot{\omega}_t)dt$ should actually remain supported along the boundary. This apparent paradox is yet another effect of the lack of lower semi-continuity for $a < 1$, and is simply resolved by the fact that no such minimizer actually exists. Indeed, for any curve $(\omega_t)_{t \in [0,1]}$ supported along the boundary, it is easy to construct a
curve $\omega' \approx \omega$ very close to $\omega$ with the same endpoints, but moving inside $D$ for all $t \in (0, 1)$ and thus with a strictly lesser cost

$$ \int_0^1 L(\omega_t', \dot{\omega}_t') dt = \frac{1}{2} \int |\dot{\omega}_t'|^2 dt < \frac{1}{2a} \int |\dot{\omega}_t'|^2 dt = \int_0^1 L(\omega_t, \dot{\omega}_t). $$

This shows that curves moving along the boundary are exponentially unlikely, as far as a putative rate function is concerned in the LDP, hence those trajectories will asymptotically never be seen by our sticky diffusion.

To summarize, the LDP is correctly captured by (3.8) with the relaxed Lagrangian $\underline{L}$, and the phase transition across $a = 1$ is simply the threshold determining whether $L$ is l.s.c. or not.

There are two main obstructions to turning this informal approach into rigorous analysis:

1. For $a < 1$ the lack of joint lower semi-continuity of $(x, q) \mapsto L(x, q)$ (mostly in the $x$ variable) immediately prevents any rigorous application of the above abstract arguments, i.e. the chain of implications (3.1) $\implies$ (3.2) $\implies$ (3.4) is no longer justified. Thus the lack of semicontinuity is not just an (almost aesthetic) matter of unique selection of a rate function, but rather a key step that fails in the dynamical/Lagrangian representation of $C(\omega)$.

2. For $a > 1$ the running cost $\omega \mapsto \int_0^1 L(\omega_t, \dot{\omega}_t)dt$ is l.s.c. but the argument requires no matter what a well-posedness of the Hamilton-Jacobi problem

$$ \partial_t \phi + H\phi = 0 $$

in the viscosity sense (more precisely, a resolvent estimate for $\text{id} - \tau H$ for small $\tau > 0$ based on maximum principles, see [22, 32]). In our particular context this corresponds to nonstandard, coupled interior-boundary Hamilton-Jacobi equations

$$ \left\{ \begin{array}{ll} \partial_t \phi + \frac{1}{2} |\nabla \phi| = 0 & \text{if } x \in D, \\ \partial_t \phi + \frac{a}{2} |\nabla_{\Gamma} \phi| = 0 & \text{if } x \in \partial D. \end{array} \right. $$

The recent theory in [5] might allow handling such delicate systems with discontinuous Hamiltonians, but for the sake of brevity we did not pursue in this direction.

Both obstacles are somehow orthogonal to each other: for $a \le 1$ the Hamilton-Jacobi problem is standard but the lower semi-continuity fails, while for $a \ge 1$ the Lagrangian is lower semi-continuous but the Hamilton-Jacobi system becomes difficult to cope with. In order to offer self-contained and rigorous proofs we opted here for a compromise and chose to work on half-spaces $D = \mathbb{R}_+^d$, where explicit formulas can be leveraged and standard stochastic calculus is sufficient to carry over the whole analysis. Of course, in smooth domains the boundary looks locally as $\mathbb{R}_+^d$: Because SBM still belongs to the realm of Feller diffusions with quadratic variance $E_x(|X_t - x|^2) \sim t$, one should expect that our results in half-spaces can be leveraged to cover general domains following a “local-to-global” construction, see e.g. [17, chapters 8 and 9], but this falls out of the scope of this paper

# 4 Transition kernel in half-spaces

From now on and unless otherwise specified we denote

$$ D = \mathbb{R}_+^d = \mathbb{R}^+ \times \mathbb{R}^{d-1} \quad \text{with} \quad \partial D \simeq \mathbb{R}^{d-1} $$

and

$$ x = (x_1, x') \in D \quad \text{with} \quad x_1 \in \mathbb{R}^+, x' = (x_2 \dots x_d) \in \mathbb{R}^{d-1}. $$
We shall often speak of $x_1, x'$ as the horizontal and vertical coordinates, respectively. In this particular setting the SBM process $X_t = (X_t^1, X_t')$ takes values in $\bar{D}$ and (2.5) takes the more explicit form

$$ \left\{ \begin{array}{l} dX_t^1 = 1_{\{X_t^1>0\}} dB_t^1 + \theta 1_{\{X_t^1=0\}} dt \\ dX_t' = \left[ \sqrt{a} 1_{\{X_t^1=0\}} + 1_{\{X_t^1>0\}} \right] dB_t' , \\ X_0 = x \end{array} \right. \qquad (4.1) $$

where $B = (B^1, B')$ is a standard $d$-dimensional Brownian motion. The goal of this section is to explicitly compute the transition kernel $p_t(x, dy)$ of SBM in this simple planar setting, given by (4.6) below.

The key observation here is that the horizontal $X^1$ evolution is uncoupled from the vertical $X'$ motion and corresponds to the 1-dimensional Sticky-reflected Brownian Motion studied in [20]. In particular the local time at the boundary of the full process is just given by the local time at the origin for the first component, which we simply denote

$$ L_t = L_t^\Gamma(X) = L_t^0(X^1). $$

By [20, §3 and theorem 5] the first equation in (4.1) encodes among other things a relation

$$ dL_t^0(X^1) = \theta 1_{\{X_t^1=0\}} dt = \theta dO_t $$

between the occupation time

$$ O_t := \int_0^t 1_{\Gamma}(X_s)ds = \int_0^t 1_{\{X_s^1=0\}}ds \quad \in [0,t] $$

and local time $L_t$, whence

$$ L_t = \theta O_t \quad \in [0, \theta t]. \qquad (4.2) $$

Note that in (4.1) the vertical diffusion $X'$ is only coupled to the horizontal motion of $X^1$ through the volatility $\sigma_t = \sigma(X_t^1) = \sqrt{a} 1_{\{X_t^1=0\}} + 1_{\{X_t^1>0\}}$, with $X^1$ independent of $B'$. By the strong Markov property and

$$ \int_0^t 1_{\{X_s^1=0\}}ds = O_t, \qquad \int_0^t 1_{\{X_s^1>0\}}ds = \int_0^t [1 - 1_{\{X_s^1=0\}}]ds = t - O_t, $$

we can integrate $dX_t' = [\sqrt{a} 1_{\{X_t^1=0\}} + 1_{\{X_t^1>0\}}] dB_t'$ explicitly as

$$ X_t' = \sqrt{a} \tilde{B}_{O_t} + \hat{B}_{t-O_t} \qquad (4.3) $$

almost surely, where $\tilde{B}', \hat{B}'$ are independent ($d-1$)-dimensional Brownian motions, also independent of $X^1$ and therefore of the occupation time $O_t$.

In order to eliminate the invariance under $\mathbb{R}^{d-1}$-vertical translation we always start from

$$ X_0 = (X_0^1, X_0') = (x_1, 0) \quad \text{for} \quad x_1 \ge 0. $$

We first condition on $(X_t^1, L_t) = (z, l)$ as

$$ \begin{aligned} p_t(x, dy) &= \mathbb{P}_x(X_t \in dy) = \mathbb{P}_x(X_t^1 \in dy_1, X_t' \in dy') \\ &= \int_{\mathbb{R}^+} \int_0^{\theta t} \mathbb{P}_x(X_t^1 \in dy_1, X_t' \in dy' \mid X_t^1 = z, L_t = l) \mathbb{P}_{x_1}(X_t^1 \in dz, L_t \in dl) \\ &= \int_{\mathbb{R}^+} \int_0^{\theta t} \mathbb{P}_x \left( X_t^1 \in dy_1, X_t' \in dy' \mid X_t^1 = z, O_t = \frac{1}{\theta} l \right) \mathbb{P}_{x_1}(X_t^1 \in dz, L_t \in dl). \end{aligned} $$
The point here is that the bivariate distribution $(X^1, L)$ for the 1-dimensional SBM in the conditioning can be determined explicitly. More precisely, for $x_1, z \ge 0$ let $T_0$ denote the first hitting time at the origin for 1D-Brownian motion, denote by

$$h(t, x_1) := \frac{|x_1|}{\sqrt{2\pi t}} e^{-\frac{|x_1|^2}{2t}} \quad t \ge 0$$

its distribution (i-e $P_{x_1}(T_0 \in dt) = h(t, x_1)dt$), and let

$$g_t^0(x_1, z) := \frac{1}{(2\pi t)^{\frac{1}{2}}} \left[ e^{-\frac{|x_1-z|^2}{2t}} - e^{-\frac{|x_1+z|^2}{2t}} \right], \quad z \in \mathbb{R}^+$$

be the kernel of Brownian motion before killing at the origin (i-e $P_{x_1}(B_t^1 \in dz, T_0 < t) = g_t^0(x_1, z)dz$). By [14, Theorem 2] there holds

$$\mathbb{P}_{x_1}(X_t^1 \in dz, L_t \in dl) = g_t^0(x_1, z) dz \delta_0(l) \\ + \frac{1}{\theta} h\left(t - \frac{l}{\theta}, l + x_1\right) \delta_0(dz) dl + 2h\left(t - \frac{l}{\theta}, l + x_1 + z\right) dz dl, \quad (4.4)$$

with implicitly $z \ge 0$ and $l \in [0, \theta t]$ as in (4.2). On the other hand, writing

$$g(t, z') = \frac{1}{(2\pi t)^{\frac{d-1}{2}}} \exp\left(-\frac{|z'|^2}{2t}\right), \quad z' \in \mathbb{R}^{d-1}$$

for the standard $(d-1)$-Gaussian, we can also compute

$$\begin{aligned} \mathbb{P}_x \left( X_t^1 \in dy_1, X_t' \in dy' \mid X_t^1 = z, O_t = \frac{1}{\theta}l \right) &= \delta_z(dy_1) \mathbb{P}_{x'} \left( \sqrt{a} \tilde{B}_{O_t}' + \hat{B}_{t-O_t}' \in dy' \mid O_t = \frac{1}{\theta}l \right) \\ &= \delta_z(dy_1) \mathbb{P}_{x'} \left( \sqrt{a} \tilde{B}_{\frac{l}{\theta}}' + \hat{B}_{t-\frac{l}{\theta}}' \in dy' \right) = \delta_z(dy_1) \mathbb{P}_{x'} \left( \tilde{B}_{\frac{l}{\theta}}' + \hat{B}_{t-\frac{l}{\theta}}' \in dy' \right) \\ &= \delta_z(dy_1) g \left( a \frac{l}{\theta} + t - \frac{l}{\theta}, y' - x' \right) dy', \end{aligned}$$

because the sum of independent Gaussian variables $\tilde{B} + \hat{B}$ remains Gaussian with additive variance. Putting

$$A := a - 1 \in (-1, \infty)$$

and gathering everything, we end-up with

$$\begin{aligned} p_t(x, dy) = & g_t^0(x_1, y_1) g(t, y' - x') dy_1 dy' \\ & + \frac{1}{\theta} \left( \int_0^{\theta t} h\left(t - \frac{l}{\theta}, l + x_1\right) g\left(t + A \frac{l}{\theta}, y' - x'\right) dl \right) \delta_0(dy_1) dy' \\ & + 2 \left( \int_0^{\theta t} h\left(t - \frac{l}{\theta}, l + x_1 + y_1\right) g\left(t + A \frac{l}{\theta}, y' - x'\right) dl \right) dy_1 dy'. \end{aligned} \quad (4.5)$$

Owing to $L_t = \theta O_t \in [0, \theta t]$ the local time runs in $l \in [0, \theta t]$ above, hence since $A > -1$ the effective time arguments $t - \frac{l}{\theta} \ge 0$ and $t + A \frac{l}{\theta} \ge t - \frac{l}{\theta} \ge 0$ in $h, g$ remain nonnegative as they should. Similarly we emphasize that all the time arguments will be nonnegative in the sequel, and this will be implicit throughout without any further mention. In our simple planar setting the stationary measure (2.3) decomposes as $\mu(dy) = (dy_1 + \frac{1}{2\theta}\delta_0(dy_1)) dy'$. Recalling that $g^0(x_1, 0) = 0$ for killed Brownian motion, (4.5) can be finally be written more compactly as
$$p_t(x, dy) = \left[ g_t^0(x_1, y_1)g(t, y' - x') + 2 \int_0^{\theta t} h\left(t - \frac{l}{\theta}, l + x_1 + y_1\right) g\left(t + A\frac{l}{\theta}, y' - x'\right) dl \right] \mu(dy). \quad (4.6)$$

# 5 Static Large Deviation Principle

As already discussed, the short time behaviour will be captured at the static level by the LDP for the slowed down transition kernels

$$\rho_x^\epsilon(dy) := p_\epsilon(x, dy) \quad \in \mathcal{P}(\bar{D}), \qquad (5.1)$$

where $x \in \bar{D}$ is fixed and $p_\epsilon(x, dy)$ is given by (4.6) with $t = \epsilon$. The main goal of this section is to establish

**Theorem 5.1.** Let $a > 0$ and write for convenience $A = a - 1$. For any fixed $x = (x_1, x') \in \bar{D} = \mathbb{R}^+ \times \mathbb{R}$ the sequence $\{\rho_x^\epsilon\}_{\epsilon>0} \in \mathcal{P}(\bar{D})$ from (5.1) satisfies the LDP

$$\rho_x^\epsilon(dy) \asymp_{\epsilon \to 0} \exp \left( -\frac{1}{\epsilon} c(x, y) \right)$$

with good rate function $y \mapsto c(x, y)$ given by

$$\text{if } a \le 1: \qquad c(x, y) := \frac{1}{2} |x - y|^2 \qquad (5.2)$$

$$\text{if } a > 1: \qquad c(x, y) := \frac{1}{2} \begin{cases} |x - y|^2 & \text{if } (x, y) \in \mathcal{C}, \\ \frac{1}{a} \left( \sqrt{A} |x_1 + y_1| + |y' - x'| \right)^2 & \text{else,} \end{cases} \qquad (5.3)$$

where for $A = a - 1 > 0$ the “cone” $\mathcal{C}$ is

$$\mathcal{C} := \left\{ (x, y) \in \bar{D}^2 : \quad |y' - x'| \le \frac{1}{\sqrt{A}} \left[ |x_1 + y_1| + 2\sqrt{a}\sqrt{x_1 y_1} \right] \right\}. \qquad (5.4)$$

Moreover $(x, y) \mapsto c(x, y)$ is symmetric and continuous over $\bar{D}^2$.

Note that $c$ strongly depends on $a$ (in a continuous way), but not on $\theta$. This might first come as a surprise, but we shall make a case later on that $c(x, y) = d^2(x, y)$ is truly the intrinsic distance for the SBM diffusion. On the other hand the $\theta$-“stickiness” clearly appears as a lower order drift term in (2.5), and intrinsic distances classically tend to depend on the purely diffusive part of the process only.

For later purposes it will be convenient to define

$$\mathcal{C}(x) := \{y \in \bar{D} : (x, y) \in \mathcal{C}\}, \qquad (5.5)$$

which is represented graphically in Figure 1 below. Note that $\mathcal{C}(x)$ is really a cone if $x_1 = 0$ with aperture exactly $\sin^2 \alpha = \frac{1}{a}$, while it is rather a horizontal paraboloid if $x_1 > 0$. It is worth stressing that the quantity $|x_1 + y_1|$ appearing in(5.3)(5.4) can be naturally interpreted as a horizontal travel distance from $x_1$ to $y_1$ when forced to go through $z_1 = 0$. This corresponds to a sticky scenario, where most random trajectories actually tend to go through the sticky boundary $z_1 = 0$ in order to move faster in the vertical direction by taking advantage of a stronger diffusion along the boundary if $a > 1$. Accordingly, a delicate balance will tip in
<figure><img src="image_2.png" /><figcaption>Figure 1: The cone $\mathcal{C}(x)$.</figcaption></figure>

favor of the “going through the boundary” strategy or not, depending on 1) the value of the diffusivity $a$, and 2) the relative location of the points $x, y$ to be connected (here $(x, y) \in \mathcal{C}$ or not). At a more technical level, let us anticipate that we will decompose below $\rho_x^\varepsilon = \rho_{\text{int}}^\varepsilon + \rho_{\text{st}}^\varepsilon$ as the sum of an “interior” kernel (corresponding to paths avoiding the boundary) and of a “sticky” kernel (corresponding to paths with positive sojourn along $\partial D$). The interior part will always lead to a standard Euclidean contribution $\rho_{\text{int}}^\varepsilon \asymp \exp(-\frac{1}{\varepsilon}I_{\text{int}}(x, y))$ with rate function $I_{\text{int}} = \frac{1}{2}|y - x|^2$. The second part involves local time accounting for stickiness, and leads to a contribution $\rho_{\text{st}}^\varepsilon \asymp \exp(-\frac{1}{\varepsilon}I_{\text{st}}(x, y))$ for a more complicated rate function $I_{\text{st}}$ that strongly feels the influence of the diffusion coefficient $a > 0$. Depending on the precise value of $a$ and relative positions of $x, y$, one or the other rate function will overtake, corresponding to the dichotomy in our statement.

In order to make the strategy of proof more precise we first change time scale

$$l = \varepsilon\theta L \quad \text{with} \quad L \in [0, 1].$$

From there (4.6) conveniently leads to

$$ \begin{aligned} \rho_x^\varepsilon(dy) &= \left[ g_\varepsilon^0(x_1, y_1)g(\varepsilon, y' - x') \right. \\ & \qquad \left. + \int_0^{\theta\varepsilon} h\left(\varepsilon - \frac{l}{\theta}, l + x_1 + y_1\right) g\left(\varepsilon + A\frac{l}{\theta}, y' - x'\right) dl \right] \mu(dy) \\ &= \left[ g_\varepsilon^0(x_1, y_1)g(\varepsilon, y' - x') \right. \\ & \qquad \left. + \int_0^1 h\left(\varepsilon(1-L), \varepsilon\theta L + x_1 + y_1\right) g\left(\varepsilon(1+AL), y' - x'\right) \varepsilon\theta dL \right] \mu(dy) \\ &= \left[ \rho_{\text{int}}^\varepsilon(x, y) + \rho_{\text{st}}^\varepsilon(x, y) \right] \mu(dy), \end{aligned} \quad (5.6) $$
where the interior and sticky densities are defined as

$$ \begin{aligned} \rho_{\text{int}}^{\varepsilon}(x, y) &:= g_{\varepsilon}^{0}(x_1, y_1)g(\varepsilon, y' - x') \\ &= \frac{1}{(2\pi\varepsilon)^{d/2}} \left[ \exp\left(-\frac{|x_1 - y_1|^2}{2\varepsilon}\right) - \exp\left(-\frac{|x_1 + y_1|^2}{2\varepsilon}\right) \right] \exp\left(-\frac{|x' - y'|^2}{2\varepsilon}\right) \end{aligned} \quad (5.7) $$

and

$$ \rho_{\text{st}}^{\varepsilon}(x, y) := \int_{0}^{1} \bar{\rho}_{\text{st}}^{\varepsilon}(x, y, L) dL, \quad (5.8) $$

with

$$ \begin{aligned} \bar{\rho}_{\text{st}}^{\varepsilon}(x, y, L) &:= \varepsilon\theta h(\varepsilon(1-L), \varepsilon\theta L + x_1 + y_1) g(\varepsilon(1+AL), y' - x') \\ &= \frac{\theta}{(2\pi\varepsilon)^{d/2}} \times \frac{\varepsilon\theta L + x_1 + y_1}{(1-L)^{d/2}(1+AL)^{d-1}} \exp\left(-\frac{|\varepsilon\theta L + x_1 + y_1|^2}{2\varepsilon(1-L)}\right) \exp\left(-\frac{|x' - y'|^2}{2\varepsilon(1+AL)}\right). \end{aligned} \quad (5.9) $$

For the interior contribution (5.7) one has $|x_1 - y_1| < |x_1 + y_1|$ for all $y_1$ (except for $y_1 = 0$ for which $g_{\varepsilon}^0$ vanishes anyway), hence one expects $\exp(-|x_1 - y_1|^2 / 2\varepsilon) \gg \exp(-|x_1 + y_1|^2 / 2\varepsilon)$ and therefore one should anticipate

$$ \rho_{\text{int}}^{\varepsilon}(x, y) \asymp \exp\left(-\frac{1}{\varepsilon}I_{\text{int}}(x, y)\right), \quad I_{\text{int}}(x, y) := \frac{1}{2}|x - y|^2. \quad (5.10) $$

Viewing $\bar{\rho}_{\text{st}}^{\varepsilon}(x, y, L)$ as acting on $L \in [0, 1]$ as well, one reads off at least formally from (5.9)

$$ \bar{\rho}_{\text{st}}^{\varepsilon}(x, y, L) \asymp \exp\left(-\frac{1}{\varepsilon}\bar{I}_{\text{st}}(x, y, L)\right), \quad \bar{I}_{\text{st}}(x, y, L) := \frac{|x_1 + y_1|^2}{2(1-L)} + \frac{|x' - y'|^2}{2(1+AL)}. \quad (5.11) $$

The contraction principle [18, thm. 4.2.1] thus suggests

$$ \rho_{\text{st}}^{\varepsilon}(x, y) = \int_{0}^{1} \bar{\rho}_{\text{st}}^{\varepsilon}(x, y, L) dL \asymp \exp\left(-\frac{I_{\text{st}}(x, y)}{\varepsilon}\right), \quad I_{\text{st}}(x, y) := \min_{L \in [0,1]} \bar{I}_{\text{st}}(x, y, L). \quad (5.12) $$

Finally, the sum should at least formally satisfy an LDP with rate given by the usual rule of the “least unlikely of the unlikely”, here

$$ \rho_x^{\varepsilon}(dy) = \left[ \rho_{\text{int}}^{\varepsilon}(x, y) + \rho_{\text{st}}^{\varepsilon}(x, y) \right] \mu(dy) \asymp \exp\left(-\frac{1}{\varepsilon}c(x, y)\right) \\ \text{with} \quad c(x, y) = \min\{I_{\text{int}}(x, y), I_{\text{st}}(x, y)\}. $$

It turns out that for $a \le 1 \Leftrightarrow A \le 0$ one always has $I_{\text{int}} \le I_{\text{st}}$, while for $a > 1$ one has $I_{\text{st}} < I_{\text{int}}$ if and only if $(x, y) \in \mathbb{C}$ exactly as in (5.2)(5.3). This line of thought really gives the correct result, but requires special technical care due to the $\frac{1}{1-L}$ singularity appearing both in the exponential rate and multiplicative prefactor in (5.9) and, to a lesser extent, to the atom at $y_1 = 0$ in $\mu(dy)$.

Let us now make this sketch of proof rigorous. For the sake of exposition we first establish two technical lemmas in order to fully determine $I_{\text{int}}$, $I_{\text{st}}$ and $c = \min\{I_{\text{int}}, I_{\text{st}}\}$ as functions of $x, y$.

**Lemma 5.2.** Let $a > 0$ and $A = a - 1$. The sticky rate $I_{\text{st}}$ defined by (5.11)(5.12) reads

$$ I_{\text{st}}(x, y) = \frac{1}{2} \begin{cases} |x_1 + y_1|^2 + |x' - y'|^2 & \text{if } a \le 1 \\ |x_1 + y_1|^2 + |x' - y'|^2 & \text{if } a > 1 \text{ and } |y' - x'| \le \frac{1}{\sqrt{A}}|x_1 + y_1| \\ \frac{1}{a} \left(\sqrt{A}|x_1 + y_1| + |x' - y'|\right)^2 & \text{if } a > 1 \text{ and } |y' - x'| > \frac{1}{\sqrt{A}}|x_1 + y_1| \end{cases} \quad (5.13) $$

and is continuous in y.
Proof. For fixed $x, y$ (with $x_1, y_1 \ge 0$) let

$$f(L) := \frac{|x_1 + y_1|^2}{1 - L} + \frac{|x' - y'|^2}{1 + AL},$$

so that by definition $I_{\text{st}}(x, y) = \frac{1}{2} \min_{L \in [0,1]} f(L)$ in (5.12).

In the easy case $A \le 0 \iff a \le 1$ the function $f$ is monotone nondecreasing and clearly the minimum is attained for $L = 0$ with value $I_{\text{st}}(x, y) = \frac{1}{2}f(0) = \frac{1}{2}(|x_1 + y_1|^2 + |x' - y'|^2)$.

Consider now the case $A > 0$, and observe that $f$ is convex. If $f'(0) = |x_1+y_1|^2 - A|x'-y'|^2 \ge 0$ then by convexity $f$ is minimized again at $L = 0$ and leads to the exact same value as above. This is exactly the second alternative in our statement.

Let us finally deal with the last case $f'(0) < 0$, which is exactly our third alternative in (5.13). Assume that $x_1 + y_1 > 0$: then $f(1^-) = +\infty$, and by strict convexity $f$ is minimized for a unique $L^* \in (0, 1)$. A tedious but straightforward computation allows to characterize this critical point $f'(L^*) = 0$ as the unique positive root of a certain quadratic polynomial in $L$ and leads to the precise value $f(L^*) = \frac{1}{a} (\sqrt{A}|x_1 + y_1| + |x' - y'|)^2$ as in our statement. It remains to observe that the very same formula remains valid also if $x_1 + y_1 = 0$, which is a particularly easy case when $f(L) = \frac{|x'-y'|^2}{1+AL}$ is obviously minimized by $f(1) = \frac{|x'-y'|^2}{1+A} = \frac{|x'-y'|^2}{a}$.

Those three cases are illustrated in Figure 2.

Finally, the continuity of $y \mapsto I_{\text{st}}(x, y)$ is easy to check in view of the explicit formula (5.13) and the proof is complete. □

**Lemma 5.3.** *The cost*

$$c(x, y) := \min\{I_{\text{int}}(x, y), I_{\text{st}}(x, y)\}$$

is given explicitly by (5.2)(5.3).

*Proof.* Recall that by definition $I_{\text{int}}(x, y) = \frac{1}{2}|x - y|^2$, so we need to compare this Euclidean cost to each of the three explicit cases in Lemma 5.2 to determine which of $I_{\text{int}}$, $I_{\text{st}}$ realizes the minimum.

* If $a \le 1$ we have by (5.13) that $I_{\text{int}}(x, y) = \frac{1}{2}(|x_1 - y_1|^2 + |x' - y'|^2) \le \frac{1}{2}(|x_1 + y_1|^2 + |x' - y'|^2) = I_{\text{st}}(x, y)$ due to $x_1, y_1 \ge 0 \implies |x_1 - y_1| \le |x_1 + y_1|$.

* For the very same reason the second alternative in (5.13) also leads to $I_{\text{int}} \le I_{\text{st}}$.

* In the third case, straightforward algebra shows that

$$I_{\text{st}}(x, y) \le I_{\text{int}}(x, y) \iff \frac{1}{a} \left( \sqrt{A} |x_1 + y_1| + |x' - y'| \right)^2 \le |x_1 - y_1|^2 + |x' - y'|^2.$$

Solving explicitly in $|x' - y'|$ shows that this quadratic inequality holds true outside of the two roots

$$|y' - x'| \notin [R^{-}, R^{+}], \qquad R^{\pm} = \frac{1}{\sqrt{A}} |x_1 + y_1| \pm 2 \sqrt{\frac{a}{A}} \sqrt{x_1 y_1}.$$

In particular our standing assumption that $|y' - x'| > \frac{1}{\sqrt{A}}|x_1 + y_1|$ from (5.13) rules out the lower part $|y' - x'| \le R^-$, hence in that case $I_{\text{st}} \le I_{\text{int}}$ if and only if $|y' - x'| \ge R^+$. According to (5.4) is exactly the definition of $(x, y) \notin \mathcal{C}$, or equivalently $y \notin \mathcal{C}(x)$, and the proof is complete.

Those three cases are again depicted in Figure 2. Note that if $x_1 > 0$ the cone $\mathcal{C}(x)$ is a true paraboloid as in Figure 2a, while if $x_1 = 0$ it collapses into a linear cone as in Figure 2b. □

We can now proceed with our main objective in this section
<figure><img src="image_3.png" /><figcaption>Figure 2: The alternatives in Lemma 5.2 and Lemma 5.3 (for $a > 1$).</figcaption></figure>

*Proof of Theorem 5.1.* Note first that the cone $\mathcal{C}$ is completely symmetric in $x \leftrightarrow y$, as is obvious from (5.4). Since the two expressions $|x - y|^2$ and $\frac{1}{a}(\sqrt{A}|x_1 + y_1| + |y' - x'|)^2$ in (5.2)(5.3) are also symmetric, clearly $c(x, y) = c(y, x)$. The continuity of $c$ is immediate from its explicit expression, and it is also easy to check that it has compact sublevelsets and is thus a good rate function as claimed.

Let us now address the main difficulty, namely the LDP itself. To this end, pick a Borel set $E \subset \bar{D}$ and assume $\mu(E) > 0$ (otherwise $\rho_x^\varepsilon \ll \mu$ implies $\rho_x^\varepsilon(E) = 0$ for all $\varepsilon > 0$ and there is nothing to prove).

**Step 1: LDP upper bound.** Since $y \mapsto c(x, y)$ is coercive

$$ \hat{\lambda} := \inf_{y \in \bar{E}} c(x, y) = \min_{y \in \bar{E}} c(x, y) \quad \in [0, \infty) $$

if finite. From (5.6) it suffices to estimate from above $\rho_{\text{int}}^{\varepsilon}, \rho_{\text{st}}^{\varepsilon} \lesssim e^{-\frac{\hat{\lambda}}{\varepsilon}}$ separately.

We start with the “interior” contribution. Recall that $\mu(dy) = (dy_1 + \frac{1}{2\theta}\delta_0(dy_1))dy'$, so $E$ is possibly concentrated on the boundary $\partial D = \{y_1 = 0\}$ even if $\mu(E) > 0$. By definition of $c = \min\{I_{\text{int}}, I_{\text{st}}\}$ and $\hat{\lambda}$ we have that $I_{\text{int}}(x, y) \ge c(x, y) \ge \hat{\lambda}$ for $\mu$-a.e. $y \in E$ (and even if $E$ concentrates on $\{y_1 = 0\}$). Recalling also that $g_{\varepsilon}^0(x_1, 0) = 0$ we then estimate from (5.7)

$$ \begin{aligned} \int_E \rho_{\text{int}}^{\varepsilon}(x, y)\mu(dy) &= \int_E \rho_{\text{int}}^{\varepsilon}(x, y)dy \\ &\le \frac{\theta}{(2\pi\varepsilon)^{\frac{d}{2}}} \int_E \left[ \exp\left(-\frac{|x_1 - y_1|^2}{2\varepsilon}\right) - 0 \right] \exp\left(-\frac{|x' - y'|^2}{2\varepsilon}\right) dy \\ &= \frac{C}{\varepsilon^{\frac{d}{2}}} \int_E \exp\left(-\frac{I_{\text{int}}(x, y)}{\varepsilon}\right) dy = \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\hat{\lambda}}{\varepsilon}} \int_E \exp\left(-\frac{I_{\text{int}}(x, y) - \hat{\lambda}}{\varepsilon}\right) dy. \end{aligned} $$
By definition of $\hat{\lambda}$ we can simply write $0 \le I_{\text{int}}(x, y) - \hat{\lambda} \le \frac{I_{\text{int}}(x, y) - \hat{\lambda}}{\varepsilon}$ in the exponential, whence

$$
\begin{align*}
\int_E \rho_{\text{int}}^{\varepsilon}(x, y) \mu(dy) &\le \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\hat{\lambda}}{\varepsilon}} \int_E \exp\left(-[I_{\text{int}}(x, y) - \hat{\lambda}]\right) dy \\
&= \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\hat{\lambda}}{\varepsilon}} \int_E \exp\left(-\frac{|x-y|^2}{2} + \hat{\lambda}\right) dy \\
&\le \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\hat{\lambda}}{\varepsilon}} \int_{\mathbb{R}_+^d} \exp\left(-\frac{|x-y|^2}{2} + \hat{\lambda}\right) dy = \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\hat{\lambda}}{\varepsilon}}, \quad (5.14)
\end{align*}
$$

where $C \ge 0$ varies from line to line and depends on $x, \theta, \hat{\lambda}, E$ but not on $\varepsilon$. Note that at this stage we have possibly $C = 0$ if $E$ actually concentrates on the boundary. This settles the upper estimate for the “interior” part in (5.6).

For the second “sticky” contribution, recall that $\bar{I}_{\text{st}}(x, y, L) = \frac{|x_1+y_1|^2}{2(1-L)} + \frac{|x'-y'|^2}{2(1+AL)}$ and by definition $I_{\text{st}}(x, y) = \min_{L \in [0,1]} \bar{I}_{\text{st}}(x, y, L)$. Since $\hat{\lambda} \le c(x, y) \le I_{\text{st}}(x, y)$ for $\mu$-a.e. $y \in E$, we simply have $\bar{I}_{\text{st}}(x, y, L) \ge \hat{\lambda}$ for $\mu(dy)dL$-a.e. $(y, L) \in F := E \times [0, 1]$. From (5.9) we get

$$
\begin{align*}
\int_E \rho_{\text{st}}^{\varepsilon}(x, y) \mu(dy) &= \int_E \left( \int_0^1 \bar{\rho}_{\text{st}}^{\varepsilon}(x, y, L) dL \right) \mu(dy) \\
&= \frac{\theta}{(2\pi\varepsilon)^{\frac{d}{2}}} \int_F \frac{\varepsilon\theta L + x_1 + y_1}{(1-L)^{3/2}(1+AL)^{1/2}} \exp\left(-\frac{|\varepsilon\theta L + x_1 + y_1|^2}{2\varepsilon(1-L)}\right) \exp\left(-\frac{|x'-y'|^2}{2\varepsilon(1+AL)}\right) \mu(dy)dL \\
&= \frac{C}{\varepsilon^{\frac{d}{2}}} \int_F \frac{\varepsilon\theta L + x_1 + y_1}{(1-L)^{3/2}(1+AL)^{1/2}} \exp\left(-\frac{|\varepsilon\theta L + x_1 + y_1|^2 - |x_1+y_1|^2}{2\varepsilon(1-L)}\right) \\
&\qquad \times \exp\left(-\frac{1}{\varepsilon} \underbrace{\left[ \frac{|x_1+y_1|^2}{2(1-L)} + \frac{|x'-y'|^2}{2(1+AL)} \right]}_{=\bar{I}_{\text{st}}(x,y,L)} \right) \mu(dy)dL \\
&= \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\hat{\lambda}}{\varepsilon}} \int_F \frac{\varepsilon\theta L + x_1 + y_1}{(1-L)^{3/2}(1+AL)^{1/2}} \exp\left(-\theta L \frac{\varepsilon\theta L + 2x_1 + 2y_1}{2(1-L)}\right) \\
&\qquad \times \exp\left(-\frac{\bar{I}_{\text{st}}(x,y,L) - \hat{\lambda}}{\varepsilon}\right) \mu(dy)dL,
\end{align*}
$$

where $C$ is again a constant possibly varying from line to line but independent of $\varepsilon > 0$. Due to $\bar{I}_{\text{st}} \ge I_{\text{st}} \ge c \ge \hat{\lambda}$ we can simply write $\frac{\bar{I}_{\text{st}}(x,y,L)-\hat{\lambda}}{\varepsilon} \ge \bar{I}_{\text{st}}(x,y,L) - \hat{\lambda}$ in the last exponential term in the integral. Exploiting moreover the very rough bounds $1+AL \ge 1-L$, $\varepsilon\theta L \le \varepsilon\theta \le 1$ for small $\varepsilon$ as well as $\varepsilon\theta L + x_1 + y_1 \ge \varepsilon\theta L$ (recall that $x_1, y_1 \ge 0$ in $\bar{D}$) we obtain

$$
\begin{align*}
\int_E \rho_{\text{st}}^{\varepsilon}(x, y) \mu(dy) &\le \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\hat{\lambda}}{\varepsilon}} \int_F \frac{1+x_1+y_1}{(1-L)^2} \exp\left(-\varepsilon \frac{\theta^2 L^2}{2(1-L)}\right) \exp\left(-\bar{I}_{\text{st}}(x, y, L) + \hat{\lambda}\right) \mu(dy) dL \\
&= \frac{C e^{\hat{\lambda}}}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\hat{\lambda}}{\varepsilon}} \int_F \frac{1+x_1+y_1}{(1-L)^2} \exp\left(-\varepsilon \frac{\theta^2 L^2}{2(1-L)}\right) \\
&\qquad \times \exp\left(-\underbrace{\left[ \frac{|x_1+y_1|^2}{2(1-L)} + \frac{|x'-y'|^2}{2(1+AL)} \right]}_{=\bar{I}_{\text{st}}(x,y,L)}\right) \mu(dy) dL.
\end{align*}
$$
Since $\frac{1}{1+AL} \ge c = \frac{1}{1+|A|} > 0$ as soon as $a > 0 \iff A > -1$ we get

$$ 
\begin{aligned}
\int_E \rho_{\text{st}}^{\varepsilon}(x, y) \mu(dy) &\le \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\lambda}{\varepsilon}} \int_F \frac{1}{(1-L)^2} \exp\left(-\varepsilon \frac{\theta L^2}{2(1-L)}\right) (1+x_1+y_1) \\
&\qquad \times \exp\left(-\frac{|x_1+y_1|^2}{2} - c|x'-y'|^2\right) \mu(dy) dL \\
&\le \frac{C}{\varepsilon^{\frac{d}{2}}} e^{-\frac{\lambda}{\varepsilon}} \left( \int_0^1 \frac{1}{(1-L)^2} \exp\left(-\varepsilon \frac{\theta L^2}{2(1-L)}\right) dL \right) \\
&\qquad \times \left( \int_{\bar{D}} (1+x_1+y_1) \exp\left(-\frac{|x_1+y_1|^2}{2} - c|x'-y'|^2\right) \mu(dy) \right).
\end{aligned}
$$

The second integral on the whole spatial domain $\bar{D}$ is clearly absolutely convergent due to the exponential decay in $y_1, y'$. As for the first $dL$ integral we estimate

$$ L \le \frac{1}{2}: \quad \frac{1}{(1-L)^2} \exp\left(-\varepsilon \frac{\theta L^2}{2(1-L)}\right) \le \frac{1}{(1-L)^2} \le \frac{1}{4}, $$

$$ L \ge \frac{1}{2}: \quad \frac{1}{(1-L)^2} \exp\left(-\varepsilon \frac{\theta L^2}{2(1-L)}\right) \le \frac{1}{\varepsilon^2} \left(\frac{\varepsilon}{1-L}\right)^2 \exp\left(-c \frac{\varepsilon}{1-L}\right), $$

where $c = \theta/8 > 0$. Being $u \mapsto u^2 \exp(-cu)$ globally bounded for $u \ge 0$ we conclude that

$$ \int_0^1 \frac{1}{(1-L)^2} \exp\left(-\varepsilon \frac{\theta L^2}{2(1-L)}\right) dL \le C \left(1+\frac{1}{\varepsilon^2}\right) $$

and therefore

$$ \int_E \rho_{\text{st}}^{\varepsilon}(x, y) \mu(dy) \le \frac{C}{\varepsilon^{\frac{d}{2}}} \left(1 + \frac{1}{\varepsilon^2}\right) e^{-\frac{\lambda}{\varepsilon}} \quad (5.15) $$

for some $C \ge 0$ independent of $\varepsilon$.

Gathering (5.14)(5.15) gives

$$ \rho_x^{\varepsilon}(E) = \int_E \rho_{\text{int}}^{\varepsilon}(x, y) dy + \int_E \rho_{\text{st}}^{\varepsilon}(x, y) \mu(dy) \le \frac{C}{\varepsilon^{\frac{d}{2}}} \left(1 + \frac{1}{\varepsilon^2}\right) e^{-\frac{\lambda}{\varepsilon}} $$

uniformly in $\varepsilon \to 0$, which in turn yields the LDP upper bound

$$ \limsup_{\varepsilon \to 0} \varepsilon \log \rho_x^{\varepsilon}(E) \le -\hat{\lambda} = -\inf_{y \in \bar{E}} c(x, y). $$

**Step 2: LDP lower bound.** Let

$$ \tilde{\lambda} := \inf_{y \in \bar{E}^\circ} c(x, y). $$

We want to prove that $\rho_x(E) \gtrsim e^{-\frac{\lambda}{\varepsilon}}$. If $E^\circ = \emptyset$ then $\tilde{\lambda} = +\infty$ and the statement is vacuous, so we may equally assume that $E^\circ$ is nonempty. Because $c(x, \cdot)$ is continuous, coercive, and bounded from below, there exists $y^* \in \bar{E}^\circ$ such that

$$ \tilde{\lambda} = c(x, y^*) = \min \{ I_{\text{int}}(x, y^*), I_{\text{st}}(x, y^*) \}. $$

As usual we distinguish cases depending on which of the two interior/sticky contributions $I_{\text{int}}$, $I_{\text{st}}$ realizes the “least unlikely of the unlikely”.

1. Assume first that $\tilde{\lambda} = I_{\text{st}}(x, y^*) \le I_{\text{int}}(x, y^*)$. By definition of $I_{\text{st}}(x, y) = \min_{L \in [0,1]} \bar{I}_{\text{st}}(x, y, L)$ there exists $L^* \in [0, 1]$ such that $\tilde{\lambda} = \bar{I}_{\text{st}}(x, y^*, L^*)$. Fix an arbitrarily small $\eta > 0$. By
continuity of $\bar{I}_{\text{st}}$ in (5.11) there exists a small neighborhood $F_{\eta} \subset F := E \times [0, 1]$ of $(y^*, L^*)$
with $\mu \otimes dL(F_{\eta}) < +\infty$ such that

$$
\bar{I}_{\text{st}}(x, y, L) \leq \bar{\lambda} + \eta \quad \text{for } \mu(dy)dL\text{-a.e. } (y, L) \in F_{\eta}.
$$

By (5.8)(5.9) we see that

$$
\begin{align*}
\rho_x^\epsilon(E) &= \int_E \rho_{\text{int}}^\epsilon(x, y)\mu(dy) + \int_E \int_0^1 \bar{\rho}_{\text{st}}^\epsilon(x, y, L)dL\mu(dy) \\
&\geq \int_{F_\eta} \bar{\rho}_{\text{st}}^\epsilon(x, y, L)dL\mu(dy) \\
&= \frac{\theta}{(2\pi\epsilon)^{\frac{d}{2}}} \int_{F_\eta} \frac{\epsilon\theta L + x_1 + y_1}{(1-L)^{3/2}(1+AL)^{1/2}} \\
&\qquad \times \exp\left(-\frac{|\epsilon\theta L + x_1 + y_1|^2}{2\epsilon(1-L)}\right) \exp\left(-\frac{|x'-y'|^2}{2\epsilon(1+AL)}\right) \mu(dy)dL,
\end{align*}
$$

and isolating the leading term $|\epsilon\theta L + x_1 + y_1|^2 = |x_1 + y_1|^2 + \epsilon\theta L (\epsilon\theta L + 2x_1 + 2y_1)$ in the
first exponential leads next to

$$
\begin{align*}
\rho_x^\epsilon(E) &\ge \frac{c}{\epsilon^{\frac{d}{2}}} \int_{F_\eta} \frac{\epsilon\theta L + x_1 + y_1}{(1-L)^{3/2}(1+AL)^{1/2}} \exp\left(-\theta L \frac{\epsilon\theta L + 2x_1 + 2y_1}{2(1-L)}\right) \\
&\qquad \times \exp\left(-\frac{1}{\epsilon} \underbrace{\left[ \frac{|x_1+y_1|^2}{2(1-L)} + \frac{|x'-y'|^2}{2(1+AL)} \right]}_{=\bar{I}_{\text{st}}(x,y,L)\le \bar{\lambda}+\eta} \right) \mu(dy)dL \\
&\ge \frac{c}{\epsilon^{\frac{d}{2}}} e^{-\frac{\bar{\lambda}+\eta}{\epsilon}} \int_{F_\eta} \frac{\epsilon\theta L + x_1 + y_1}{(1-L)^{3/2}(1+AL)^{1/2}} \exp\left(-\theta L \frac{\epsilon\theta L + 2x_1 + 2y_1}{2(1-L)}\right) \mu(dy)dL
\end{align*}
$$

for some $c > 0$ independent of $\epsilon$ (which will keep varying again from line to line below).
Recalling that $x_1, y_1 \ge 0$ and decreasing $F_\eta$ if needed we can assume that $0 \le x_1 + y_1 \le$
$2(x_1 + y_1^*)$ in $F_\eta$, and with $\frac{1}{1+AL} \ge \frac{1}{1+|A|}$, $\frac{1}{1-L} \ge 1$ and $\theta L \le \theta$, $\epsilon\theta L \le 1$
the previous integral can be bounded from below as

$$
\begin{align*}
\rho_x^\epsilon(E) &\ge \frac{c}{\epsilon^{\frac{d}{2}}} e^{-\frac{\bar{\lambda}+\eta}{\epsilon}} \int_{F_\eta} \frac{\epsilon\theta L}{(1+|A|)^{1/2}} \exp\left(-\theta \frac{1+4x_1+4y_1^*}{2(1-L)}\right) \mu(dy)dL \\
&= \frac{c}{\epsilon^{\frac{d}{2}-1}} e^{-\frac{\bar{\lambda}+\eta}{\epsilon}} \int_{F_\eta} L \exp\left(-\frac{C}{1-L}\right) \mu(dy)dL = \frac{c}{\epsilon^{\frac{d}{2}-1}} e^{-\frac{\bar{\lambda}+\eta}{\epsilon}}. \quad (5.16)
\end{align*}
$$

In the last equality we used that $(y, L) \mapsto Le^{-C/(1-L)} > 0$ is locally $\mu(dy)dL$-integrable
together with the fact that $F_\eta$ has positive measure, and as usual $c, C > 0$ may depend on
the various parameters (including $\eta > 0$) but not on $\varepsilon$.

2. Consider now the opposite case $\tilde{\lambda} = I_{\text{int}}(x, y^*) < I_{\text{st}}(x, y^*)$. If $a \le 1$ there holds $|x_1+y_1|^2 \ge |x_1-y_1|^2$ in (5.13) and therefore $I_{\text{st}} \ge I_{\text{int}}$, so we may as well assume that $a > 1$. But, for $a > 1$, from the proof of Lemma 5.3 we have $I_{\text{int}} = I_{\text{st}}$ if either $x_1 = 0$ or $y_1^* = 0$, see Figure 2. Hence we only consider $a > 1$ and $x_1, y_1^* > 0$.

This being said, fix again a small $\eta > 0$ and choose a small neighborhood $E_\eta \subset E$ of $y^*$
with positive Lebesgue measure (recall that $E^\circ \neq \emptyset$) and such that $I_{\text{int}}(x, y) \le \bar{\lambda} + \eta$, $\mu$-a.e.
on $E_\eta$. Up to decreasing $E_\eta$ if needed we can further assume that $x_1 y_1 \ge \frac{1}{2} x_1 y_1^* > 0$ in
this neighborhood. By (5.7) and $\mu(dy) \ge dy$, elementary algebra in the exponentials gives

$$
\begin{align*}
\rho_x^\epsilon(E) &= \int_E \rho_{\text{int}}^\epsilon(x, y)\mu(dy) + \int_E \rho_{\text{st}}^\epsilon(x, y)\mu(dy) \ge \int_{E_\eta} \rho_{\text{int}}^\epsilon(x, y)dy \\
&= \int_{E_\eta} \frac{1}{(2\pi\epsilon)^{d/2}} \left[ \exp\left(-\frac{|x_1 - y_1|^2}{2\epsilon}\right) - \exp\left(-\frac{|x_1 + y_1|^2}{2\epsilon}\right) \right] \exp\left(-\frac{|x' - y'|^2}{2\epsilon}\right) dy \\
&= \frac{c}{\epsilon^{d/2}} \int_{E_\eta} \left[ 1 - \exp\left(-\underbrace{\frac{2x_1y_1}{\epsilon}}_{\ge \frac{x_1y_1}{\epsilon}}\right) \right] \exp\left(-\underbrace{\frac{1}{\epsilon}\left[\frac{|x_1 - y_1|^2}{2} + \frac{|x' - y'|^2}{2}\right]}_{I_{\text{int}}(x,y) \le \tilde{\lambda} + \eta}\right) dy \\
&\ge \frac{c}{\epsilon^{d/2}} e^{-\frac{\tilde{\lambda} + \eta}{\epsilon}} \int_{E_\eta} \left[ 1 - \exp\left(-\frac{x_1y_1^*}{\epsilon}\right) \right] dy \\
&\ge \frac{c}{\epsilon^{d/2}} e^{-\frac{\tilde{\lambda} + \eta}{\epsilon}} \int_{E_\eta} \frac{1}{2} dy = \frac{c}{\epsilon} e^{-\frac{\tilde{\lambda} + \eta}{\epsilon}}, \quad (5.17)
\end{align*}
$$

where $c > 0$ is again uniform in $\epsilon$.

Gathering (5.16)(5.17) and taking $\epsilon \to 0$ we get in any case

$$
\liminf_{\epsilon \to 0} \epsilon \log \rho_x^\epsilon(E) \ge -(\tilde{\lambda} + \eta).
$$

Since $\eta > 0$ was arbitrary this gives the desired LDP lower bound the proof is complete. $\square$

6 Study of the cost function

In order to support our informal discussion from Section 3 we need now to rigorously identify the
static cost from Theorem 5.1 as a dynamical minimization problem $c(x, y) = \min \int_{0}^{1} L(\omega_t, \dot{\omega}_t)dt$,
where the Lagrangian $L(x, q)$ is obtained by Legendre-transforming the Hamiltonian

$$
H\phi(x) = H_a(x, \nabla\phi(x)) = \lim_{\epsilon \to 0} \epsilon e^{-\frac{\phi}{\epsilon}} Q^\epsilon e^{\frac{\phi}{\epsilon}}.
$$

Again, we only carry out this program in the easy planar setup for simplicity (our explicit computation of geodesics below becomes impossible in general manifolds). Claiming now full mathematical rigour, for fixed $a > 0$ and all $p \in T_x^*\bar{D}, q \in T_x\bar{D}$ we set according to (3.5)(3.6)(3.7)

$$
H(x, p) := \frac{1}{2} \begin{cases} |p|^2 & \text{if } x \in D \\ a|p|^2 & \text{if } x \in \partial D \end{cases}
$$

and

$$
L(x, q) := H^*(x, q) = \frac{1}{2} \begin{cases} |q|^2 & \text{if } x \in D \\ \frac{1}{a} |q|^2 & \text{if } x \in \partial D \end{cases} \quad (6.1)
$$

Implicitly we mean here that $q \in T_x \partial D \cong \mathbb{R}^{d-1}$ should be a vertical tangent vectors if $x \in \partial D$
while $q \in T_x D \cong \mathbb{R}^d$ at interior points $x \in D$. According to our discussion in Section 3 $L$ is only
lower semi-continuous for $a > 1$, and we expect that the lower semi-continuous relaxation is the
relevant object. Here it is a simple exercise to compute

$$
\underline{L}(x, q) := \inf_{\substack{x_n \to x \\ q_n \to q}} \liminf L(x_n, q_n) = \begin{cases} L(x, q) & \text{if } a > 1 \\ \frac{1}{2} |q|^2 & \text{if } a \le 1. \end{cases} \quad (6.2)
$$

The associated path-action is

$$
\underline{C}(\omega) := \begin{cases} \int_0^1 \underline{L}(\omega_t, \dot{\omega}_t) dt & \text{if } \omega \in H^1, \\ +\infty & \text{else.} \end{cases} \quad (6.3)
$$
Recalling that the contact angle $\alpha$ is defined as

$$ \sin^2 \alpha = \frac{1}{a} \quad \text{for } a \ge 1, $$

our main result in this section is

**Theorem 6.1.** The dynamical cost $\underline{C}$ is $H^1$-weakly lower semi-continuous, coercive, and induces the static cost $c$ from Theorem 5.1 in the sense that

$$ c(x, y) = \min \left\{ \int_{0}^{1} \underline{L}(\omega_t, \dot{\omega}_t) dt : \omega \in H^1(0, 1; \bar{D}) \text{ and } \omega_0 = x, \omega_1 = y \right\}. \quad (6.4) $$

The minimum is always attained for a unique geodesic $(\gamma_t^{xy})_{t \in [0,1]} \in H^1(0, 1; \bar{D})$. Moreover

* For $a \le 1$ geodesics are the standard Euclidean interpolants $\gamma_t^{xy} = (1-t)x + ty$.

* For $a > 1$ geodesics are characterized as in Figure 3a and Figure 3b: for $y \notin \mathcal{C}(x)$ they are concatenations of at most three straight lines, either making an angle $\alpha$ with the normal direction or vertical along the boundary, while for $y \in \mathcal{C}(x)$ geodesics are again Euclidean interpolants.

Not only this is a dynamical characterization of our intrinsic distance, but it will also be useful in our next section 7 to derive the sample-path LDP from the static one in Theorem 5.1.

Since $\underline{L}(x, \cdot)$ is quadratic in its second argument, an immediate consequence is that our static cost, as a short-time rate function, truly determines the intrinsic distance of SBM:

**Corollary 6.2.** $c(x, y) = d^2(x, y)$ is a squared distance.

*Proof.* This is very classical so we only sketch the proof. Assume that $c(x, y) = 0$. According to (6.1)(6.2) there holds $\underline{L}(x, q) \ge C|q|^2$ for $C = \min\{1/2, 1/2a\} > 0$. In that case the unique minimizing geodesic must satisfy $0 = c(x, y) = \int_0^1 \underline{L}(\gamma_t^{xy}, \dot{\gamma}_t^{xy})dt \ge C \int_0^1 |\dot{\gamma}_t^{xy}|^2dt$, hence $x = \gamma_0^{xy} = \gamma_1^{xy} = y$. The symmetry is obvious in view of (6.4) and $\underline{L}(x, q) = \underline{L}(x, -q)$. For the triangular inequality, pick any $x, y, z$. For given $\lambda \in (0, 1)$ we can construct an admissible path $(\omega_t)_{t \in [0,1]}$ starting from $\omega_0 = x$, passing through $\omega_\lambda = y$ and finally $\omega_1 = z$ by following first the geodesic $\gamma^{xy}$ rescaled in time $t \in [0, \lambda]$ and then the geodesic $\gamma^{yz}$ in time $t \in [\lambda, 1]$. By quadratic scaling this gives a cost $d^2(x, z) \le \int_0^1 \underline{L}(\omega_t, \dot{\omega}_t) = \frac{1}{\lambda}d^2(x, y) + \frac{1}{1-\lambda}d^2(y, z)$, and choosing $\lambda = \frac{d(x,y)+d(y,z)}{d(x,y)}$ gives the triangular inequality $d^2(x, z) = [d(x, y) + d(y, z)]^2$. $\square$

*Proof of Theorem 6.1.* For $a \le 1$, $\underline{L}(x, q) = \frac{1}{2}|q|^2$ is the standard Euclidean cost and the whole statement is obvious so we only address the case $a > 1$.

Let us first prove that $C$ is a well-behaved functional. For $a > 1$ we have $\underline{L} = L$, hence by (6.1)

$$ \underline{L}(x, q) \ge \frac{1}{2a}|q|^2, \quad \forall x \in \bar{D}, q \in T_x \bar{D} \quad (6.5) $$

(this is of course a very bad estimate if $x \in D$, when $\underline{L}(x, q) = \frac{1}{2}|v|^2$). This immediately gives $\dot{H}^1$ coercivity of

$$ \omega \mapsto C(\omega) := \int_{0}^{1} \underline{L}(\omega_t, \dot{\omega}_t) dt \ge \frac{1}{2a} \int_{0}^{1} |\dot{\omega}_t|^2 dt. $$

For the weak lower semi-continuity, consider any fixed endpoints $\omega_0 = x, \omega_1 = y$ and let $\omega_n \to \omega$ weakly in $H^1$. By usual compactness $H^1 \subset C([0, 1])$ we can assume that $\omega_n \to \omega$ uniformly. Let

$$ Z := \{t \in (0, 1) : \omega_t \in \partial D\} \quad \text{and} \quad J := (0, 1) \setminus Z = \{t \in (0, 1) : \omega_t \in D\} $$
<figure><img src="image_4.png" /><figcaption>Figure 3: Geodesics for all possible configurations of $(x, y) \in \bar{D}^2$</figcaption></figure>

By standard properties of Sobolev functions we see that $\dot{\omega}_t$ is tangent to $\partial D$ for a.e. $t \in Z$. By standard weak lower semi-continuity we get

$$ \int_Z \underline{L}(\omega_t, \dot{\omega}_t) = \int_Z \frac{1}{2a} |\dot{\omega}_t|^2 \le \liminf_{n \to \infty} \int_Z \frac{1}{2a} |\dot{\omega}_t^n|^2 \le \liminf_{n \to \infty} \int_Z \underline{L}(\omega_t^n, \dot{\omega}_t^n) dt, $$

where the last very rough inequality is just (6.5). In order to get control over $J$, fix an arbitrarily small $\eta > 0$ and let

$$ J_{\eta} := \{t \in [0, 1] : \operatorname{dist}(\omega_t, \partial D) \ge \eta\} \subseteq J. $$

Since $\omega \in H^1$ is uniformly continuous we have that $|J \setminus J_{\eta}| \to 0$ as $\eta \to 0$. Crucially, for fixed $\eta$ the uniform convergence $\omega^n \to \omega$ guarantees that $\operatorname{dist}(\omega_t^n, \partial D) \ge \eta/2 > 0$ for sufficiently large $n$. As a consequence

$$ \begin{aligned} \int_{J_{\eta}} \underline{L}(\omega_t, \dot{\omega}_t) dt &= \int_{J_{\eta}} \frac{1}{2} |\dot{\omega}_t|^2 dt \le \liminf_{n \to \infty} \int_{J_{\eta}} \frac{1}{2} |\dot{\omega}_t^n|^2 dt \\ &= \liminf_{n \to \infty} \int_{J_{\eta}} \underline{L}(\omega_t^n, \dot{\omega}_t^n) dt \le \liminf_{n \to \infty} \int_{J} \underline{L}(\omega_t^n, \dot{\omega}_t^n) dt, \end{aligned} $$

where the last inequality holds simply because $J_{\eta} \subseteq J$. Since $\eta > 0$ was arbitrary and $|J \setminus J_{\eta}| \to 0$ as $\eta \to 0$ we conclude that

$$ \int_J \underline{L}(\omega_t, \dot{\omega}_t) dt = \lim_{\eta \to 0} \int_{J_{\eta}} \underline{L}(\omega_t, \dot{\omega}_t) dt \le \liminf_{n \to \infty} \int_J \underline{L}(\omega_t^n, \dot{\omega}_t^n) dt $$

and therefore

$$ \begin{aligned} \int_0^1 \underline{L}(\omega_t, \dot{\omega}_t) dt &= \int_Z \underline{L}(\omega_t, \dot{\omega}_t) dt + \int_J \underline{L}(\omega_t, \dot{\omega}_t) dt \\ &\le \liminf_{n \to \infty} \int_Z \underline{L}(\omega_t^n, \dot{\omega}_t^n) dt + \liminf_{n \to \infty} \int_J \underline{L}(\omega_t^n, \dot{\omega}_t^n) dt \le \liminf_{n \to \infty} \int_0^1 \underline{L}(\omega_t^n, \dot{\omega}_t^n) dt. \end{aligned} $$

This shows that the Lagrangian cost $C$ is lower-semicontinuous and coercive, and we can now focus on the geodesic problem itself. In other words, for fixed $x, y \in \bar{D}$ let us solve

$$ \min \left\{ \int_0^1 \underline{L}(\omega_t, \dot{\omega}_t) dt : \omega \in H^1(0, 1; \bar{D}) \text{ with } \omega_0 = x, \omega_1 = y \right\}. $$
First, note that linear interpolation $\omega_t = (1-t)x + ty$ is always an admissible competitor with finite cost, hence there exists a minimizing sequence $\{\omega^n\}_{n\ge0} \subset H^1$. Since the endpoints are fixed, the coercivity (6.5) gives $\|\omega^n\|_{H^1} \le C$ and there exists a weak-$H^1$ limit $\omega$. By lower-semicontinuity $\omega$ is necessarily a minimizer and it suffices to show that it has the right cost $c(x, y) = \int_0^1 L(\omega_t, \dot{\omega}_t)dt$. We distinguish cases depending on whether $x, y$ belong to $\partial D$ or not.

1. If $x_1 = y_1 = 0$, recall that $L(\omega_t, \dot{\omega}_t) \ge \frac{1}{2a}|\dot{\omega}_t|^2$ with equality if and only if $\omega_t \in \partial D$. Clearly in that case the best one can do is follow the Euclidean geodesic $\gamma_t^{xy} = (1-t)x + ty$ along the vertical boundary, for a cost $c(x, y) = \frac{1}{2a}|y-x|^2 = \int_0^1 \frac{1}{2a}|\dot{\gamma}_t^{xy}|^2dt$ as in (5.3).

2. Consider now $x_1 > 0$ and $y_1 > 0$ as in Figure 3a

* Pick first $y \notin \mathcal{C}(x)$, and take $z_{\text{in}}, z_{\text{out}} \in \partial D$ as in Figure 3a, implicitly defined through the condition of making an angle $\alpha$ with the normal (elementary geometry shows this is possible if $y \notin \mathcal{C}(x)$). The blue curve $x \rightsquigarrow z_{\text{in}} \rightsquigarrow z_{\text{out}} \rightsquigarrow y$ is always admissible. Suitably adjusting the constant speed on each segment so that $\underline{L}(\omega_t, \dot{\omega}_t) = \text{cst}$ for $t \in [0, 1]$, the definition of $\sin^2 \alpha = \frac{1}{a}$ precisely results in the overall cost $\frac{1}{2a} \left( \sqrt{A}(x_1 + y_1) + |y' - x'| \right)^2$ as in (5.3) (we omit the lengthy but straightforward computation here). Let us check that this is optimal. Indeed, since $y \in \mathcal{C}(x) \Leftrightarrow (x, y) \in \mathcal{C}$, and by definition of $\mathcal{C}$ this particular cost is strictly less than the Euclidean cost $\frac{1}{2}|y-x|^2$, which is clearly the best one could do if the geodesic remained contained in $D$ and away from $\partial D$ for all times $t \in [0, 1]$ (since then the Lagrangian would just be $\int_0^1 \frac{1}{2}|\dot{\omega}_t|^2dt$). This means that, for $y \notin \mathcal{C}(x)$, a geodesic must eventually go through the boundary at some point. By continuity, there are a first entry and last exit times $0 < t_{\text{in}} \le t_{\text{out}} < 1$ such that $Z_{\text{in}} := \omega_{t_{\text{in}}}$ and $Z_{\text{out}} := \omega_{t_{\text{out}}}$ lie on $\partial D$. Clearly in that case the best one can do is to first follow a geodesic $x + \frac{t}{t_{\text{in}}}(Z_{\text{in}} - x)$, then a vertical segment $Z_{\text{in}} + \frac{t-t_{\text{in}}}{t_{\text{out}}-t_{\text{in}}}(Z_{\text{out}} - Z_{\text{in}})$, and finally connect to $y$ via $Z_{\text{out}} + \frac{t-t_{\text{out}}}{1-t_{\text{out}}}(y - Z_{\text{out}})$. This has overall cost $\int_0^{t_{\text{in}}} \left| \frac{Z_{\text{in}}-x}{t_{\text{in}}} \right|^2 dt + \int_{t_{\text{in}}}^{t_{\text{out}}} \frac{1}{2a} \left| \frac{Z_{\text{out}}-Z_{\text{in}}}{t_{\text{out}}-t_{\text{in}}} \right|^2 dt + \int_{t_{\text{out}}}^1 \left| \frac{y-Z_{\text{out}}}{1-t_{\text{out}}} \right|^2 dt$. (The $1/2a$ factor along the vertical path is crucial here!) Optimizing first in $t_{\text{in},\text{out}}$ for fixed $Z_{\text{in}}, Z_{\text{out}}$, and then minimizing with respect to $Z_{\text{in}}, Z_{\text{out}} \in \partial D$, a tedious but straightforward computation shows that the optimal cost in this case is realized when $Z_{\text{in}} = z_{\text{in}}$ and $Z_{\text{out}} = z_{\text{out}}$ are precisely defined through the $\alpha$-angle condition as in Figure 3a (we omit again the details).

* If now $y \in \mathcal{C}(x)$ we claim that the Euclidean geodesic with cost $\frac{1}{2}|y-x|^2$ is optimal, see again Figure 3a. Clearly this is the best one can achieve without ever going through $\partial D$, so it is enough to prove that any path actually going through $\partial D$ has larger cost. For any such path $\omega$, let as before $0 < t_{\text{in}} \le t_{\text{out}} < 1$ be the first entry and last exit times, with $Z_{\text{in}} = \omega_{t_{\text{in}}} \in \partial D$ and $Z_{\text{out}} = \omega_{t_{\text{in}}} \in \partial D$. Exactly as before, the best strategy is then given explicitly by three consecutive straight lines $x \rightsquigarrow Z_{\text{in}} \rightsquigarrow Z_{\text{out}} \rightsquigarrow y$, each with constant speed suitably determined by $t_{\text{in}} \le t_{\text{out}}$. Again, this can be explicitly optimized first w.r.t to $t_{\text{in}} \le t_{\text{out}}$ for given $Z_{\text{in}}, Z_{\text{out}}$, and then with respect to the locations of $Z_{\text{in}}, Z_{\text{out}}$. The main difference is that the condition that $y \in \mathcal{C}(x)$ leads now to $Z_{\text{in}} = Z_{\text{out}}$, uniquely determined by normal reflection on the boundary (this is geometrically intuitive and clearly gives the shortest path from $x \in D$ to $y \in D$ if forced to go through the boundary at least once, so we skip the details). The resulting cost turns out to be exactly $\frac{1}{2}(|x_{-\text{in}}| + |Z_{\text{out}} - y|)^2 > \frac{1}{2}|x - y|^2$. This cannot be optimal, since the cost $\frac{1}{2}|x - y|^2$ is realized in particular by the Euclidean interpolation. As a consequence a minimizing curve cannot cross the boundary at any time, and the Euclidean geodesic $\gamma_t^{xy} = (1-t)x + ty$ is therefore the sought geodesic.

3. Finally we consider $x_1 = 0$ and $y_1 > 0$ (we already covered $x_1 = y_1 = 0$ and $x_1 > 0, y_1 > 0$, so all the remaining cases are covered by simple symmetry $c(x, y) = c(y, x)$).

* Pick first $y \notin \mathcal{C}(x)$. Similarly to a previous case, it is easy to check by hand that if $z_{\text{out}}$ is determined through the $\alpha$-angle condition as in Figure 3b and the constant
speed is suitably adjusted on each segment of the blue curve, the cost is exactly $\frac{1}{2a}(\sqrt{A}(x_1 + y_1) + |y' - x'|)^2$. By (5.3) this realizes the cost $c(x, y)$. We claim that this is necessarily optimal in the Lagrangian minimization. Indeed, by definition of $\mathcal{C}(x)$ this cost is strictly less than the Euclidean $\frac{1}{2}|x - y|^2$, hence a minimizing geodesic must necessarily go through the boundary at some point, until a last exit time $t_{\text{out}} \in [0, 1)$ with $Z_{\text{out}} \in \partial D$. The case $t_{\text{out}} = 0$ would lead to the suboptimal Euclidean cost and is therefore ruled out. By definition of $\bar{L}$ clearly the best one can do is then to move vertically $x \rightsquigarrow Z_{\text{out}}$ along $\partial D$ for $t \in [0, t_{\text{out}}]$ (wandering off of $\partial D$ would result in unnecessary oscillations in the horizontal direction as well as more costly vertical motion due to $a > 1$), and then remain contained in $D$ for later times $t \in (t_{\text{out}}, 1]$. In this scenario clearly the best strategy is to follow two consecutive straight lines $x \rightsquigarrow Z_{\text{out}} \rightsquigarrow y$, and optimizing first w.r.t. $t_{\text{out}}$ for fixed $Z_{\text{out}}$, and then w.r.t $Z_{\text{out}}$, one gets that $Z_{\text{out}} = z_{\text{out}}$ is determined exactly by the $\alpha$-angle condition with the right cost. This means that the blue curve in Figure 3b is optimal as claimed.

* Now if $y \in \mathcal{C}(x)$ the same optimization program easily leads to $Z_{\text{out}} = x$ and $t_{\text{out}} = 0$, i-e the geodesic immediately exits $\partial D$ and never reenters. But in that case $\omega_t \in D$ for all $t \in (0, 1]$, the Lagrangian is simply $\int_0^1 \frac{1}{2}|\dot{\omega}_t|^2dt$, so the minimal cost is realized by Euclidean interpolation as in our statement and the proof is complete.

□

# 7 Sample path Large Deviation Principle

Recall that $\Omega = C([0, 1]; \bar{D})$ and $R_x^\epsilon \in \mathcal{P}(\Omega)$ is the path measure for SBM started from $x \in \bar{D}$, slowed-down on the scale $\epsilon > 0$ as before. The goal of this section is to establish the dynamical counterpart of Theorem 5.1

**Theorem 7.1.** For fixed $x \in \bar{D}$ the sequence $\{R_x^\epsilon\}_{\epsilon>0} \in \mathcal{P}(\Omega)$ satisfies a Large Deviation Principle

$$R_x^\epsilon \underset{\epsilon \to 0}{\rightsquigarrow} \exp \left( -\frac{1}{\epsilon} \underline{C}_x(\omega) \right)$$

for the uniform topology on $\Omega$, with good rate function

$$\underline{C}_x(\omega) = \iota_{\{\omega_0=x\}} + \underline{C}(\omega)$$

and $\underline{C}$ as in (6.3).

This is nothing but a Schilder's theorem for sticky-reflected Brownian motion. Our interest for such dynamical statement is twofold. First, it provides information at the path level, which conveys more information than the static LDP in Theorem 5.1. Second, this allows a direct application abstract results guaranteeing Gamma-convergence of the $\epsilon$-Schrödinger problem to the deterministic counterpart, see e.g. [33, prop. 2.5 and thm. 2.7].

Note that our static result from Theorem 5.1 asserts nothing but the LDP for the initial-terminal joint distribution for $\delta_x \otimes \rho_x^\epsilon = (e_0, e_1)_\# R_x^\epsilon$. Just as in one of the classical proofs of Schilder's theorem for pure Brownian motion, the main and standard idea to establish Theorem 7.1 will be to perform a time slicing, retrieve a discrete LDP via the Chapman-Kolmogorov property and iterated applications of our previous static LDP, and finally apply the Dawson-Gärtner theorem to recover the dynamic LDP by projective limit. More precisely, we will first establish

**Proposition 7.2.** Theorem 7.1 holds for the topology of pointwise convergence on $\Omega$.

To this end, fix a large $N \in \mathbb{N}$ and take any partition $\tau_N$ of the time interval $[0, 1]$

$$0 = t_0 < t_1 < \dots < t_N = 1$$
with size $|\tau_N| = \max_i |t_{i+1} - t_i| \to 0$ as $N \to \infty$. For a fixed curve $\omega \in \Omega$ with $\omega_0 = x$ we denote

$$y_j := \omega_{t_j}, \quad j = 0, \dots, N,$$

and

$$R_x^{\epsilon,N} := (e_{t_0}, \dots, e_{t_N})_{\#} R_x^{\epsilon} \quad \in \mathcal{P}(\bar{D}^{N+1}).$$

In other words,

$$R_x^{\epsilon,N}(E_0 \times \dots \times E_N) = R_x^{\epsilon}(\omega_{t_0} \in E_0, \dots, \omega_{t_N} \in E_N) = \mathbb{P}_x(X_{t_0}^{\epsilon} \in E_0, \dots, X_{t_N}^{\epsilon} \in E_N)$$

for the slowed-down sticky Brownian motion $(X_t^\epsilon)_{t \in [0,1]}$.

**Lemma 7.3.** For any fixed $x \in \bar{D}$ and $N < +\infty$ the sequence $\{R_x^{\epsilon,N}\}_{\epsilon>0}$ satisfies the LDP

$$R_x^{\epsilon,N} \underset{\epsilon \to 0}{\asymp} \exp \left( -\frac{1}{\epsilon} C_x^N (y_0, \dots, y_N) \right)$$

with good rate function

$$C_x^N(y_0, \dots, y_N) := \iota_{\{y_0=x\}} + C_x^N(y_0, \dots, y_N) \quad \text{with} \quad C_x^N(y_0, \dots, y_N) := \sum_{j=0}^{N-1} \frac{c(y_j, y_{j+1})}{t_{j+1} - t_j}, \quad (7.1)$$

where the static cost $c(x, y)$ is exactly as in (5.2)(5.3).

*Proof.* The argument is very similar to the proof of Theorem 5.1 so we only sketch the details. Pick any Borel sets $E_0, \dots, E_N \subset \bar{D}$, and let us denote for convenience

$$\epsilon_j := \epsilon(t_{j+1} - t_j) \quad \text{and} \quad E := E_1 \times \dots \times E_N.$$

By the Chapman-Kolmogorov property we have that

$$R_x^{\epsilon,N}(E_0 \times \dots \times E_N) = \mathbb{1}_{\{x \in E_0\}} \int_E p_{\epsilon_0}(x, dy_1) p_{\epsilon_1}(y_1, dy_2) \dots p_{\epsilon_{N-1}}(y_{N-1}, dy_N) \\ = \mathbb{1}_{\{x \in E_0\}} \int_E \rho_x^{\epsilon_0}(dy_1) \rho_{y_1}^{\epsilon_1}(dy_2) \dots \rho_{y_{N-1}}^{\epsilon_{N-1}}(dy_N).$$

Just as in (5.6)(5.7)(5.8)(5.9) the kernels $\rho_{y_j}^{\epsilon_j}(dy_{j+1})$ are explicitly given by

$$\rho_{y_j}^{\epsilon_j}(dy_{j+1}) = \rho_{\text{int}}^{\epsilon_j}(y_j, y_{j+1}) dy_{j+1} + \left( \int_0^1 \bar{\rho}_{\text{st}}^{\epsilon_j}(y_j, y_{j+1}, L_j) dL_j \right) \mu(dy_{j+1}).$$

For finite $N$, it is a tedious but rather straightforward exercise to adapt $N$ consecutive times the same argument as in the proof of Theorem 5.1 to get the LDP for $R_x^{\epsilon,N}$ as $\epsilon \to 0$. Let us just sketch the idea. For the LDP lower bound, pick first a minimizer $y^* = (y_0^*, \dots, y_N^*)$ of $C_x^N$ in $\bar{E} = \bar{E}_1 \times \dots \times \bar{E}_N$. In (7.1) clearly one has two possible rate functions $I_{\text{int}}(y_j, y_{j+1})$ and $I_{\text{st}}(y_j, y_{j+1}) = \min_{L_j \in [0,1]} \bar{I}_{\text{st}}(y_j, y_{j+1}, L_j)$ competing for $c(y_j, y_{j+1}) = \min\{I_{\text{int}}(y_j, y_{j+1}), I_{\text{st}}(y_j, y_{j+1})\}$. Distin- guishing which one is acting separately on each subinterval $[t_j, t_{j+1}]$, each with scale $\epsilon_j = \epsilon(t_{j+1} - t_j)$, one simply guesses as in the proof of Theorem 5.1 how to pick either an $\eta$- neighborhood $E_{j,\eta} \subset E_j$ of $y_{j+1}^*$ or a neighborhood $F_{j,\eta} \subset E_j \times [0,1]$ of $(y_{j+1}^*, L_j^*)$ (depending on whether $I_{\text{int}}$ or $I_{\text{st}}$ is smaller) in order to get the LDP lower bound, up to an arbitrarily small correction $\eta$ (see again the details of the proof of Theorem 5.1). The LDP upper bound is even simpler, given that the upper estimates used in the static proof were actually global in $x, y, L$ (at least to a sufficient extent so that they can be iterated $N$ times). The $t_{j+1} - t_j$ scaling in (7.1) appears as usual due to our setting $\epsilon_j = \epsilon(t_{j+1} - t_j)$ in each subinterval. $\square$
Proof of Proposition 7.2. In view of Lemma 7.3 and by the Dawson-Gärtner theorem [18, thm. 4.6.1], the desired LDP will automatically hold with good rate function

$$ \sup_{|\tau_N| \to 0} C_x^N(\omega_{t_0}, \dots, \omega_{t_N}) = \iota_{\{\omega_0=x\}} + \sup_{|\tau_N| \to 0} C^N(\omega_{t_0}, \dots, \omega_{t_N}), \quad \omega \in \Omega $$

so clearly it is enough to show that

$$ \sup_{|\tau_N| \to 0} \sum_{j=0}^{N-1} \frac{c(\omega_{t_j}, \omega_{t_{j+1}})}{t_{j+1} - t_j} = \begin{cases} \int_0^1 \underline{L}(\omega_t, \dot{\omega}_t) dt & \text{if } \omega \in H^1 \\ +\infty & \text{else} \end{cases} $$

for any fixed $\omega \in \Omega$.

To this end, consider first $\omega \in H^1$. Setting $\gamma_s^j := \omega_{t_j+s(t_{j+1}-t_j)}$, we have by (6.4) and 2-homogeneity of $\underline{L}(x, \cdot)$ that

$$ c(\omega_{t_j}, \omega_{t_{j+1}}) \le \int_0^1 \underline{L}(\gamma_s^j, \dot{\gamma}_s^j) ds = (t_{j+1} - t_j) \int_{t_j}^{t_{j+1}} \underline{L}(\omega_t, \dot{\omega}_t) dt. $$

As a consequence

$$ C^N(\omega_{t_0}, \dots, \omega_{t_N}) = \sum_{j=0}^{N-1} \frac{c(\omega_{t_j}, \omega_{t_{j+1}})}{t_{j+1} - t_j} \le \sum_{j=0}^{N-1} \int_{t_j}^{t_{j+1}} \underline{L}(\omega_t, \dot{\omega}_t) dt = \int_0^1 \underline{L}(\omega_t, \dot{\omega}_t) dt $$

for any $N$. In order to get a lower bound, let $(\omega_t^N)_{t \in [0,1]}$ be the continuous, piecewise geodesic interpolation of $\omega_{t_0}, \dots, \omega_{t_N}$, where geodesics are not the Euclidean ones but rather the intrinsic ones from Theorem 6.1, and appropriately scaled in time so that

$$ C^N(\omega_{t_0}, \dots, \omega_{t_N}) = \sum_{j=0}^{N-1} \frac{c(\omega_{t_j}, \omega_{t_{j+1}})}{t_{j+1} - t_j} = \int_0^1 \underline{L}(\omega_t^N, \dot{\omega}_t^N) dt. $$

By coercivity (6.5) and the previous upper bound we see that $\{\omega^N\}_N$ is bounded in $H^1$ with fixed endpoints $\omega_0^N = \omega_0$ and $\omega_1^N = \omega_1$. We can therefore assume that $\omega^N$ has a weak-$H^1$ limit, and this limit is of course $\omega$. Hence by the weak lower semicontinuity in Theorem 6.1 and from the previous upper bound we obtain

$$ \begin{aligned} \int_0^1 \underline{L}(\omega_t, \dot{\omega}_t) dt &\le \liminf_{N \to \infty} \int_0^1 \underline{L}(\omega_t^N, \dot{\omega}_t^N) dt \\ &= \liminf_{N \to \infty} C^N(\omega_{t_0}, \dots, \omega_{t_N}) \\ &\le \limsup_{N \to \infty} C^N(\omega_{t_0}, \dots, \omega_{t_N}) \le \int_0^1 \underline{L}(\omega_t, \dot{\omega}_t) dt \end{aligned} $$

as claimed.

If now $\omega \notin H^1$, standard properties of Sobolev functions give that $\sum_{j=0}^{N-1} \frac{|\omega_{t_{j+1}} - \omega_{t_j}|^2}{t_{j+1} - t_j} \to +\infty$ as $|\tau^N| \to 0$. The coercivity (6.5) integrated along geodesics readily gives $c(x, y) \ge \frac{1}{2a}|x - y|^2$ for any $x, y$, thus

$$ \sum_{j=0}^{N-1} \frac{c(\omega_{t_{j+1}}, \omega_{t_j})}{t_{j+1} - t_j} \ge \frac{1}{2a} \sum_{j=0}^{N-1} \frac{|\omega_{t_{j+1}} - \omega_{t_j}|^2}{t_{j+1} - t_j} \xrightarrow{N \to \infty} +\infty $$

and the proof is complete.

We are finally in position to establish our main result.
*Proof of Theorem 7.1.* Since the uniform topology is obviously stronger than pointwise convergence, by [18, Corollary. 4.2.6] it is enough to prove that {$R_x^\epsilon$}$_{\epsilon>0}$ is exponentially tight for the uniform topology. By [43, Theorem 4.1] it is enough to check the “exponential Arzelà-Ascoli” conditions

(i) compactness:

$$ \lim_{M \to \infty} \limsup_{\epsilon \to 0} \epsilon \log R_x^\epsilon \left( \left\{ \omega : |\omega(0)| \ge M \right\} \right) = -\infty, $$

(ii) equicontinuity: for all fixed $\eta > 0$,

$$ \lim_{\delta \to 0} \limsup_{\epsilon \to 0} \epsilon \log R_x^\epsilon \left( \left\{ \omega : \sup_{|t-s| \le \delta} |\omega(t) - \omega(s)| \ge \eta \right\} \right) = -\infty. \quad (7.2) $$

Since $\omega(0) = x$ for $R_x^\epsilon$-a.e. $\omega \in \Omega$ the first condition is trivial so we only focus on the second part. Fix $\eta > 0$. We first deal with the vertical component, which according to (4.3) reads

$$ X_t^{\epsilon'} = \sqrt{a} \tilde{B}_{O_{\epsilon t}}' + \tilde{B}_{\epsilon t - O_{\epsilon t}}' $$

for two independent $(d-1)$-Brownian motions $\tilde{B}', \hat{B}'$. For fixed $0 \le s \le t \le 1$ we have

$$ |X_t^{\epsilon'} - X_s^{\epsilon'}| \le \sqrt{a} |\tilde{B}_{O_{\epsilon t}}' - \tilde{B}_{O_{\epsilon s}}'| + |\tilde{B}_{\epsilon t - O_{\epsilon t}}' - \tilde{B}_{\epsilon s - O_{\epsilon s}}'| $$

and therefore

$$ \mathbb{P} \left( \sup_{|t-s| \le \delta} |X_t^{\epsilon'} - X_s^{\epsilon'}| \ge \eta \right) \le \mathbb{P} \left( \sup_{|t-s| \le \delta} |\tilde{B}_{O_{\epsilon t}}' - \tilde{B}_{O_{\epsilon s}}'| \ge \frac{\eta}{2\sqrt{a}} \right) \\ + \mathbb{P} \left( \sup_{|t-s| \le \delta} |\hat{B}_{\epsilon t - O_{\epsilon t}}' - \hat{B}_{\epsilon s - O_{\epsilon s}}'| \ge \frac{\eta}{2} \right) =: A'_\epsilon + B'_\epsilon $$

For the first $A'_\epsilon$ term, recall that the occupation time $O_t = \int_0^t \mathbb{1}_{\{X_t^1=0\}} d\tau$ only depends on the horizontal sticky Brownian motion, which in turn is completely independent of the two vertical Brownian motions $\tilde{B}', \hat{B}'$. As a consequence, by independence and standard properties of Brownian increments, $\tilde{B}_{O_{\epsilon t}} - \tilde{B}_{O_{\epsilon s}}$ is distributed as $\tilde{B}_{O_{\epsilon t} - O_{\epsilon s}}$ and therefore

$$ A'_\epsilon = \mathbb{P} \left( \sup_{|t-s| \le \delta} |\tilde{B}_{O_{\epsilon t} - O_{\epsilon s}}'| \ge \frac{\eta}{2\sqrt{a}} \right). $$

Now, since $0 \le O_{\epsilon t} - O_{\epsilon s} = \int_{\epsilon s}^{\epsilon t} \mathbb{1}_{\{X_t^1=0\}} d\tau \le \epsilon(t-s)$ one has

$$ \sup_{|t-s| \le \delta} |\tilde{B}_{O_{\epsilon t} - O_{\epsilon s}}'| \le \sup_{\tau \le \epsilon \delta} |\tilde{B}'_\tau| $$

almost surely. Finally, by standard properties of Brownian motion one has the classical estimate (see e.g. [18, Lemma 5.2.1])

$$ \mathbb{P} \left( \sup_{\tau \in [0, T]} |B_\tau| \ge M \right) \le 4(d-1) \exp \left( - \frac{M^2}{2(d-1)T} \right), \quad \forall M > 0, T > 0. $$

Putting $M = \eta/2\sqrt{a}$ and $T = \epsilon\delta$ we see that

$$ A'_\epsilon \le 4(d-1) \exp \left( - \frac{\eta^2}{8a(d-1)\epsilon\delta} \right) $$

Similarly, since $t - O_t$ and $\hat{B}'$ are independent and $0 \le (\epsilon t - O_{\epsilon t}) - (\epsilon s - O_{\epsilon s}) \le \epsilon(t-s)$, one easily gets that

$$ B'_\epsilon \le 4(d-1) \exp \left( - \frac{\eta^2}{8(d-1)\epsilon\delta} \right) $$
and thus

$$A'_{\epsilon} + B'_{\epsilon} \leq C \exp(-c\eta^2/\delta\epsilon)$$

for some uniform constants $C, c > 0$ independent of $\eta, \epsilon, \delta > 0$. This immediately gives the exponential equicontinuity (7.2) for the horizontal component.

Let us now turn to the horizontal component $X_t^{\epsilon 1} = X_{\epsilon t}^1$, where $(X_{\tau}^1)_{\tau \ge 0}$ is the one-dimensional sticky-reflecting Brownian motion started from $x_1 \ge 0$. First of all, by fine properties of the one-dimensional reflected SBM [20, eqs. (2.11) and (3.7)] we have that

$$X_t^1 = |S_t| = \left| x_1 + B_t - \int_0^t 1_{\{S_\tau=0\}} dB_\tau^0 \right|,$$

where $S_t$ is the two-sided, non-reflected sticky Brownian motion on $\mathbb{R}$ and $B_t, B_t^0$ are two standard Brownian motions in $\mathbb{R}$. It follows that

$$|X_t^1 - X_s^1| \le |S_r - S_s| \le |B_t - B_s| + \left| \int_s^t 1_{\{S_\tau=0\}} dB_\tau^0 \right|$$

and therefore, for fixed $\eta, T > 0$ and $s \ge 0$

$$\begin{aligned} \mathbb{P} \left( \sup_{t \in [s, s+T]} |S_t - S_s| \ge \eta \right) &\le \mathbb{P} \left( \sup_{t \in [s, s+T]} |B_t - B_s| \ge \eta/2 \right) \\ &\quad + \mathbb{P} \left( \sup_{t \in [s, s+T]} \left| \int_s^t 1_{\{S_\tau=0\}} dB_\tau^0 \right| \ge \eta/2 \right) \\ &=: A_T^1 + B_T^1. \end{aligned}$$

For the first term we have exactly as before

$$A_T^1 = \mathbb{P} \left( \sup_{\tau \in [0, T]} |B_\tau| \ge \eta/2 \right) \le 4 \exp \left( -\frac{\eta^2}{8T} \right).$$

For the second term let us set

$$Y_t := \int_s^t 1_{\{S_\tau=0\}} dB_\tau^0.$$

For fixed $\lambda > 0$ let $f(y) := \exp(\lambda y)$ and $Z_t := f(Y_t)$. Because $f$ is convex and $Y$ is a martingale, $Z$ is a submartingale and therefore by Doob's martingale inequality

$$\mathbb{P} \left( \sup_{t \in [s, s+T]} Y_t \ge \eta/2 \right) = \mathbb{P} \left( \sup_{t \in [s, s+T]} Z_t \ge f(\eta/2) \right) \le \frac{\mathbb{E}(Z_{s+T})}{\exp(\lambda \eta/2)}.$$

Applying Itô's lemma

$$dZ_t = f'(Y_t)dY_t + \frac{1}{2}f''(Y_t)d\langle Y \rangle_t = \lambda Z_t dY_t + \frac{\lambda^2}{2}Z_t 1_{\{S_t=0\}}dt,$$

taking expectation, and integrating we see that

$$\mathbb{E}(Z_t) = \mathbb{E}(Z_s) + \frac{\lambda^2}{2} \mathbb{E} \int_s^t Z_\tau 1_{\{S_\tau=0\}} d\tau = 1 + \frac{\lambda^2}{2} \int_s^t \mathbb{E}(Z_\tau 1_{\{S_\tau=0\}}) d\tau \le 1 + \frac{\lambda^2}{2} \int_s^t \mathbb{E}(Z_\tau) d\tau.$$

Grönwall's inequality yields $\mathbb{E}(Z_{s+T}) \le \exp(\lambda^2 T/2)$, thus

$$\mathbb{P} \left( \sup_{t \in [s, s+T]} Y_t \ge M/2 \right) \le \exp(\lambda^2 T/2 - \lambda \eta/2)$$
for any $\lambda > 0$. The right-hand side is minimized for $\lambda = \frac{\eta}{2T}$ and therefore

$$ \mathbb{P}\left(\sup_{t \in [s, s+T]} Y_t \geq \eta/2\right) \leq \exp(-\eta^2/8T). $$

Since $Y_t$ is distributed as $-Y_t$ we conclude that

$$ B_T^1 = \mathbb{P}\left(\sup_{t \in [s, s+T]} |Y_t| \geq \eta/2\right) \leq 2 \exp(-\eta^2/8T). $$

Finally scaling down time $t, s \leftrightarrow \varepsilon s, \varepsilon t$ and $T = \varepsilon \delta$ gives

$$ \mathbb{P}\left(\sup_{|s-t|\leq\delta} |X_t^{\varepsilon 1} - X_s^{\varepsilon 1}| \geq \eta\right) = \mathbb{P}\left(\sup_{|s-t|\leq\delta} |X_{\varepsilon t}^{1} - X_{\varepsilon s}^{1}| \geq \eta\right) \leq A_{\varepsilon\delta}^{1} + B_{\varepsilon\delta}^{1} \leq C \exp(-c\eta^2/\varepsilon\delta). $$

This shows that the horizontal component also satisfies the equicontinuity (7.2) and concludes the proof. □

## Acknowledgments

J.-B.C. was supported by FCT - Fundação para a Ciência e a Tecnologia, under the project UIDB/04561/2020. L.M. was funded by FCT - Fundação para a Ciência e a Tecnologia through a personal grant 2020/00162/CEECIND (DOI 10.54499/2020.00162.CEECIND/CP1595/CT0008) and project UIDB/00208/2020 (DOI 10.54499/UIDB/00208/2020) and warmly thanks A. Baradat, C. Léonard, and M. von Renesse for discussions pertaining to this work. L.N. benefited from the support of the FMJH Program PGMO and from the ANR project GOTA (ANR-23-CE46-0001).

## References

[1] Stefan Adams, Nicolas Dirr, Mark A Peletier, and Johannes Zimmer. From a large-deviations principle to the wasserstein gradient flow: a new micro-macro passage. *Communications in Mathematical Physics*, 307:791–815, 2011.

[2] Luigi Ambrosio, Nicola Gigli, and Giuseppe Savaré. *Gradient flows: in metric spaces and in the space of probability measures*. Springer Science & Business Media, 2008.

[3] Alexander Aurell and Boualem Djehiche. Behavior near walls in the mean-field approach to crowd dynamics. *SIAM Journal on Applied Mathematics*, 80(3):1153–1174, 2020.

[4] Aymeric Baradat and Léonard Monsaingeron. Small noise limit and convexity for generalized incompressible flows, schrödinger problems, and optimal transport. *Archive for Rational Mechanics and Analysis*, 235(2):1357–1403, 2020.

[5] Guy Barles and Emmanuel Chasseigne. *On Modern Approaches of Hamilton-Jacobi Equations and Control Problems with Discontinuities: A Guide to Theory, Applications, and Some Open Problems*, volume 104. Springer Nature, 2023.

[6] Jean-David Benamou and Yann Brenier. A computational fluid mechanics solution to the Monge-Kantorovich mass transfer problem. *Numerische Mathematik*, 84(3):375–393, 2000.

[7] Jean-David Benamou, Guillaume Carlier, and Luca Nenna. Generalized incompressible flows, multi-marginal transport and sinkhorn algorithm. *Numerische Mathematik*, 142:33–54, 2019.

[8] Espen Bernton, Promit Ghosal, and Marcel Nutz. Entropic optimal transport: Geometry and large deviations. *Duke Mathematical Journal*, 171(16):3363–3400, 2022.
[9] Marie Bormann. Functional inequalities for doubly weighted brownian motion with sticky-reflecting boundary diffusion. *arXiv preprint arXiv:2409.19336*, 2024.

[10] Marie Bormann, Léonard Monsaingeon, D.R. Michiel Renger, and Max von Renesse. *in preparation*, 2025.

[11] Marie Bormann, Max von Renesse, and Feng-Yu Wang. Functional inequalities for brownian motion on manifolds with sticky-reflecting boundary diffusion. *Probability Theory and Related Fields*, pages 1–40, 2024.

[12] Nawaf Bou-Rabee and Miranda C Holmes-Cerfon. Sticky brownian motion and its numerical solution. *SIAM review*, 62(1):164–195, 2020.

[13] Guillaume Carlier, Vincent Duval, Gabriel Peyré, and Bernhard Schmitzer. Convergence of entropic schemes for optimal transport and gradient flows. *SIAM Journal on Mathematical Analysis*, 49(2):1385–1418, 2017.

[14] Jean-Baptiste Casteras and Léonard Monsaingeon. Trivariate distribution of sticky brownian motion. *arXiv preprint arXiv:2307.10849*, 2023.

[15] Jean-Baptiste Casteras, Léonard Monsaingeon, and Luca Nenna. *in preparation*, 2025.

[16] Jean-Baptiste Casteras, Léonard Monsaingeon, and Filippo Santambrogio. Sticky-reflecting diffusion as a wasserstein gradient flow. *arXiv preprint arXiv:2401.16842*, 2024.

[17] Mireille Chaleyat-Maurel, Robert Azencott, Philippe Bougerol, Paolo Baldi, Laure Elie, Jacques Granara, André Bellaiche, and Catherine Bellaiche. Géodésiques et diffusions en temps petit. *Astérisque*, 84, 1981.

[18] Amir Dembo and Ofer Zeitouni. *Large deviations techniques and applications*. Springer, 2009.

[19] Manh Hong Duong, Vaios Laschos, and Michiel Renger. Wasserstein gradient flows from large deviations of many-particle limits. *ESAIM: Control, Optimisation and Calculus of Variations*, 19(4):1166–1188, 2013.

[20] Hans-Jürgen Engelbert and Goran Peskir. Stochastic differential equations for sticky brownian motion. *Stochastics An International Journal of Probability and Stochastic Processes*, 86(6):993–1021, 2014.

[21] William Feller. The parabolic differential equations and the associated semi-groups of transformations. *Annals of Mathematics*, 55(3):468–519, 1952.

[22] Jin Feng and Thomas G Kurtz. *Large deviations for stochastic processes*. Number 131. American Mathematical Soc., 2006.

[23] Wendell H Fleming and Halil Mete Soner. *Controlled Markov processes and viscosity solutions*, volume 25. Springer Science & Business Media, 2006.

[24] Martin Grothaus and Andreas Nonnenmacher. Overdamped limit of generalized stochastic hamiltonian systems for singular interaction potentials. *Journal of Evolution Equations*, 20(2):577–605, 2020.

[25] Martin Grothaus and Robert Vosshall. Stochastic differential equations with sticky reflection and boundary diffusion. *Electronic Journal of Probability*, 22, 2017.

[26] Elton P Hsu. *Stochastic analysis on manifolds*. Number 38. American Mathematical Soc., 2002.

[27] Nobuyuki Ikeda. On the construction of two-dimensional diffusion processes satisfying wentzell's boundary conditions and its application to boundary value problems. *Memoirs of the College of Science, University of Kyoto. Series A: Mathematics*, 33(3):367–427, 1961.

[28] Nobuyuki Ikeda and Shinzo Watanabe. *Stochastic differential equations and diffusion processes*. Elsevier, 2014.

[29] Richard Jordan, David Kinderlehrer, and Felix Otto. The variational formulation of the fokker-planck equation. *SIAM journal on mathematical analysis*, 29(1):1–17, 1998.
[30] Vitalii Konarovskyi, Victor Marx, and Max von Renesse. Spectral gap estimates for brownian motion on domains with sticky-reflecting boundary diffusion. *arXiv preprint arXiv:2106.00080*, 2021.

[31] Vitalii Konarovskyi and Max-K von Renesse. Reversible coalescing-fragmentating wasserstein dynamics on the real line. *Journal of Functional Analysis*, 286(8):110342, 2024.

[32] Richard C Kraaij. Large deviations of the trajectory of empirical distributions of feller processes on locally compact spaces. *The Annals of Probability*, 46(2):775–828, 2018.

[33] Christian Léonard. From the Schrödinger problem to the Monge–Kantorovich problem. *Journal of Functional Analysis*, 262(4):1879–1920, 2012.

[34] Christian Léonard. A survey of the schrödinger problem and some of its connections with optimal transport. *Discrete & Continuous Dynamical Systems-A*, 34(4):1533–1574, 2014.

[35] Matthias Liero, Alexander Mielke, Mark A Peletier, and DR Michiel Renger. On microscopic origins of generalized gradient structures. *Discrete and Continuous Dynamical Systems-S*, 10(1):1–35, 2017.

[36] Alexander Mielke, Mark A Peletier, and DR Michiel Renger. On the relation between gradient flows and the large-deviation principle, with applications to markov chains and diffusion. *Potential Analysis*, 41:1293–1327, 2014.

[37] Toshio Mikami. Monge's problem with a quadratic cost by the zero-noise limit of h-path processes. *Probability theory and related fields*, 129(2):245–260, 2004.

[38] Robert IA Patterson and DR Michiel Renger. Large deviations of jump process fluxes. *Mathematical Physics, Analysis and Geometry*, 22(3):21, 2019.

[39] Robert IA Patterson, DR Michiel Renger, and Upanshu Sharma. Variational structures beyond gradient flows: a macroscopic fluctuation-theory perspective. *Journal of Statistical Physics*, 191(2):18, 2024.

[40] Mark A Peletier, Riccarda Rossi, Giuseppe Savaré, and Oliver Tse. Jump processes as generalized gradient flows. *Calculus of Variations and Partial Differential Equations*, 61:1–85, 2022.

[41] Mark A Peletier and André Schlichting. Cosh gradient systems and tilting. *Nonlinear Analysis*, 231:113094, 2023.

[42] Goran Peskir. On boundary behaviour of one-dimensional diffusions: from brown to feller and beyond. *William Feller, Selected Papers II*, pages 77–93, 2015.

[43] Anatolii Puhalskii. *On Functional Principle of Large Deviations*, pages 198–218. De Gruyter, Berlin, Boston, 1991.

[44] Karl-Theodor Sturm. Is a diffusion process determined by its intrinsic metric? *Chaos, Solitons & Fractals*, 8(11):1855–1860, 1997.

[45] Satoshi Takanobu and Shinzo Watanabe. On the existence and uniqueness of diffusion processes with wentzell's boundary conditions. *Journal of Mathematics of Kyoto University*, 28(1):71–80, 1988.

[46] Sathamangalam R Srinivasa Varadhan. On the behavior of the fundamental solution of the heat equation with variable coefficients. *Communications on Pure and Applied Mathematics*, 20(2):431–455, 1967.

[47] Shinzo Watanabe. On stochastic differential equations for multi-dimensional diffusion processes with boundary conditions. *Journal of Mathematics of Kyoto University*, 11(1):169–180, 1971.

JEAN-BAPTISTE CASTERAS (jeanbaptiste.casteras@gmail.com).

CMAFCIO, FACULDADE DE CIÊNCIAS DA UNIVERSIDADE DE LISBOA, EDIFICIO C6, PISO 1,
CAMPO GRANDE 1749-016 LISBOA, PORTUGAL

LÉONARD MONSAINGEON (leonard.monsaingeon@univ-lorraine.fr).

INSTITUT ÉLIE CARTAN DE LORRAINE, UNIVERSITÉ DE LORRAINE, SITE DE NANCY B.P.

70239, F-54506 VANDOEUVRE-LÈS-NANCY CEDEX, FRANCE

GROUP OF MATHEMATICAL PHYSICS, DEPARTAMENTO DE MATEMÁTICA, INSTITUTO SUPERIOR TÉCNICO, AV. ROVISCO PAIS, 1049-001 LISBOA, PORTUGAL

LUCA NENNA (luca.nenna@universite-paris-saclay.fr).

UNIVERSITÉ PARIS-SACLAY, CNRS, LABORATOIRE DE MATHÉMATIQUES D'ORSAY, PARMA,

INRIA SACLAY, 91405, ORSAY, FRANCE