# The Narrow Capture Problem on General Riemannian Surfaces

Medet Nursultanov  Department of Mathematics and Statistics, University of
Helsinki<EMAIL_ADDRESS>,  William Trad  School of Mathematics
and Statistics, University of Sydney<EMAIL_ADDRESS>,  Justin Tzou
School of Mathematical and Physical Sciences, Macquarie University
<EMAIL_ADDRESS>and  Leo Tzou  University of Amsterdam
<EMAIL_ADDRESS>
###### Abstract.

In this article, we study the narrow capture problem on a Riemannian
2-manifold. This involves the derivation of the mean first passage (sojourn)
time of a surface-bound ion modelled as a Brownian particle. We use a layer
potential argument in conjunction with microlocal analysis in order to derive
the leading order singularity as well as the $O(1)$ term of the mean first
passage time and the associated spatial average.

###### Key words and phrases:

Narrow capture problem, Mean first-passage time, Brownian motion

###### 2010 Mathematics Subject Classification:

Primary: 58J65 Secondary: 60J65, 60J70, 35B40, 92C37

##  1\. Introduction

We consider a Brownian particle bound to a surface which contains a small trap
denoted $\Gamma_{\varepsilon}$. The narrow capture problem deals with the time
required for such a particle to first encounter the trap. This time is called
the first-passage time and is denoted $\tau_{\Gamma_{\varepsilon}}$. Starting
from an initial location $x$ on the surface, the _expected time_ that a
particle will wander before being captured by the trap is called the mean
first-passage time and is denoted $u_{\varepsilon}(x)$.

The narrow capture problem along with the closely related narrow escape
problem (where the traps are small windows on the otherwise reflective
boundary of the search domain) have been used as simple, prototypical models
for various processes involving diffusive search such as a diffusing ion
inside a cell escaping through an ion channel on the cell membrane (see [34,
17, 36, 2, 8] and references therein). While we highlight some results below,
we refer the reader to [18, 4, 16] for a more comprehensive description of
results along with their applications to cellular and molecular biology.

On a flat, bounded domain $\Omega$, it was shown in [17] and [39] that the
mean escape time had the leading order expansion
$u_{\varepsilon}\sim-|\Omega|\log\varepsilon+O(1)$ as $\varepsilon\to 0$.
Within [37], similar expansions were derived for the sphere and annulus with
absorbing windows near singular points. More precisely, it was found that in
geometric configurations where the absorbing window was near a corner, the
mean escape time had an expansion of the form
$u_{\varepsilon}\sim\frac{|\Omega|}{\alpha}\log\varepsilon+O(1)$ where
$\alpha$ denotes the angle of the corner. Furthermore, it was found that when
the absorbing window was near a cusp point, the mean escape time had an
expansion given by $u_{\varepsilon}\sim\frac{|\Omega|}{\varepsilon}+O(1)$. It
is emphasized that in the above works, the leading order term was determined
and the extent to which the remainder terms were understood was $O(1)$.

In [34], a matched asymptotic method was employed to determine the $O(1)$ term
in the expansion in terms of a certain Green’s function that encoded
information on the geometry of $\Omega$, the locations of the traps, and the
initial position $x$. This method, developed in [44], effectively summed all
logarithmic correction terms in the expansion of $u_{\varepsilon}$, with the
resulting error term being transcendentally small in $\varepsilon$. In [7], a
more detailed model was considered in which the windows were allowed to open
and close stochastically, more closely mimicking the behavior of cell ion
channels. Other quantities of interest aside from the mean first passage time
include the variance of the first passage time [24] as well as the so-called
extreme first passage time, the minimum search time achieved by a large group
of searchers [31].

In three dimensions, the narrow escape time from a Euclidean, bounded domain
$\Omega$ with one circular trap of radius $\varepsilon$ on its boundary was
shown [39, 38] to have the leading order expansion
$u_{\varepsilon}\sim|\Omega|(4\varepsilon)^{-1}(1-\varepsilon\pi^{-1}H\log\varepsilon)+O(1)$,
where $H$ is the mean curvature of $\partial\Omega$ at the center of the trap.
In [11], a matched asymptotic analysis similar to that employed in [34] was
used to compute the $O(1)$ correction term in the expansion for the special
case in which $\Omega$ was the unit ball. In [33], the calculation of this
correction term was generalized using geometric microlocal methods to
Riemannian 3-manifolds with smooth boundary containing either a circular or
elliptical trap.

The narrow capture problem also has wide applications in cellular biology [10,
13]. For example, a diffusing molecule must arrive at a localized signaling
region within a cell or on its surface before a signaling cascade can be
initiated. In another example, a T cell may diffuse in search of an antigen-
presenting cell to trigger an immune response. In this latter example,
determining the duration of this search is relevant to understanding immune
response time [13, 14].

The matched asymptotic methods of [44] that were used for the aforementioned
narrow escape problems have also been successfully applied to narrow capture
problems in Euclidean metrics. In earlier works, the closely related problem
of computing the fundamental Neumann eigenvalue $\lambda_{0}$ for the
Laplacian in Euclidean two- and three-dimensional domains with small traps was
considered in [12, 23]. The spatial average of the mean first passage time was
shown to be proportional to $1/\lambda_{0}$ (see [23, 44]), and in [35], a
numerical algorithm was employed to optimize this quantity with respect to
configurations of traps located in the domain.

Extensions of these works include computing the full probability distribution
(i.e., all moments as opposed to just the first) of the first passage time
[29, 3, 5, 9], stochastic resetting [3, 5, 9], moving traps [43, 30, 21],
partially absorbing traps [28, 9], traps grouped in clusters [24, 20], and the
effect of advection [24, 32].

In a non-Euclidean geometry, [13] considered the mean first passage time of a
Brownian particle on a sphere containing small absorbing traps. Explicit
results were obtained through employment of the aforementioned matched
asymptotic method along with the known analytic formula for the Neumann
Green’s function for the Laplacian on sphere. The spherical geometry
considered was meant to approximate the geometry of a cell with receptor
clusters on its surface awaiting the arrival of surface-bound signaling
molecules. A more detailed model of a cell, however, would be non-spherical.
In fact, a cell’s geometry can be crucial to the manner in which it serves its
function [15]. It is with this motivation that we develop here a rigorous
mathematical framework for narrow capture problems posed on non-Euclidean and
non-spherical geometries.

We now mathematically formulate the narrow capture problem. Let $(M,g)$ be a
compact, connected, orientable, Riemannian surface with smooth boundary,
$\partial M$. First, we assume the boundary to be empty and calculate the
associated mean sojourn time as well as its spatial average. When the manifold
is of non-empty boundary, we assume, without loss of generality that $M$ is a
connected open subset of a compact orientable, Riemannian manifold
$(\tilde{M},g)$ without boundary. Let $(X_{t},\mathbb{P}_{t})$ be the Brownian
motion on $M$ generated by the (negative) Laplace-Beltrami operator
$\Delta_{g}=-d^{*}d$. We use $\Gamma_{\varepsilon}\subset M$ to denote a trap
with radius $\varepsilon>0$ and we denote by $\tau_{\Gamma_{\varepsilon}}$ the
first time the Brownian motion $X_{t}$ hits $\Gamma_{\varepsilon}$, that is

$\tau_{\Gamma_{\varepsilon}}:=\inf\\{t\geq 0:X_{t}\in\Gamma_{\varepsilon}\\}.$

Within the narrow capture problem we wish to derive an asymptotic as
$\varepsilon\to 0$ for the mean first-passage (sojourn) time which is defined
as the expected value:

$u_{\varepsilon}(x)=\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=x].$

An associated quantity of interest is the spatial average of the mean first-
passage time:

$|M_{\varepsilon}|^{-1}\int_{M_{\varepsilon}}\mathbb{E}[\tau_{\Gamma_{\varepsilon,a}}|X_{0}=x]dvol_{g}(x),$

where $M_{\varepsilon}:=M\setminus\Gamma_{\varepsilon}$ and
$|M_{\varepsilon}|$ is the Riemannian volume of $M_{\varepsilon}$ with respect
to the metric $g$.

Many works have been devoted to this topic, especially in applied mathematics.
In [27], the mean first-passage time for diffusing particles on a surface of
the sphere with one absorbing trap was considered. They obtained the
asymptotic, up to the bounded term, for mean first passage time and its
average. These results were generalised, in [13], for the case of several
traps. In [10, 28], the three-dimensional version of this problem was studied.
For domains in $\mathbb{R}^{3}$, they obtain the asymptotic formulas in terms
of capacitance, by using the method of matched asymptotic expansions. We also
mention works [6, 35, 42, 22, 3, 5, 40], where the authors investigate related
problems.

Despite the large number of works on this topic, there are still many
questions regarding more general geometries. In this direction, the goal of
this paper is to investigate the narrow capture problem for the Riemannian
surface. Similar to [1], we use a layer potential method, however by adjoining
this method with techniques originating from geometric microlocal analysis, we
can extend the results, as well as the method to more general geometries,
similar to the extension to broader classes of geometries for the narrow
escape problem in [33, 32]. As mentioned previously, we will consider empty
and non-empty boundary cases. For the sake of conciseness, we will present the
results and required Green’s function for the $\partial M=\emptyset$ case
here. For the associated Neumann Green’s function and results for the
$\partial M\neq\emptyset$, see Section 5.

(1.1) $\Delta_{g}E(x,y)=-\delta_{y}(x)+\frac{1}{|M|},\quad
E(x,y)=E(y,x),\quad\int_{M}E(x,y)dvol_{g}(y)=0.$

It was already known, see for example [33] and [41], that near the diagonal
the Green function satisfies

(1.2) $E(x,y)=-\frac{1}{2\pi}\log d_{g}(x,y)+P_{-4}(x,y),$

for some $P_{-4}(x,y)\in C^{1}(M\times M)$ which is infinitely smooth away
from the set $\\{(x,y)\in M\times M\mid x=y\\}$. (In fact, in the language of
pseudodifferential operators, we will see that $P_{-4}(x,y)$ is the Schwartz
kernel of a pseudodifferential operator of degree $-4$.)

This expansion allows us to obtain the following asymptotic for the narrow
capture of Brownian particles in a small trap:

######  Theorem 1.1.

Let $(M,g)$ be a closed orientable Riemannian surface. Fix $x_{0}\in M$ and
let $\Gamma_{\varepsilon}:=B_{\varepsilon}(x_{0})$ be a geodesic ball centred
at $x_{0}$ of geodesic radius $\varepsilon>0$.

i) For each $x\notin B_{\varepsilon}(x_{0})$, the first-passage time satisfies
the following asymptotic formula, as $\varepsilon\rightarrow 0$,

$\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=x]=-\frac{|M|}{2\pi}\log\varepsilon+|M|P_{-4}(x_{0},x_{0})-|M|E(x,x_{0})+r_{\varepsilon}(x)+O(\varepsilon\log\varepsilon).$

for some function $r_{\varepsilon}$ such that $\|r_{\varepsilon}\|_{C(K)}\leq
C_{K}\varepsilon$ for any compact $K\subset M$ for which
$K\cap\Gamma_{\varepsilon}=\emptyset$. The Green function $E(x,y)$ is given by
(1.1) and $P_{-4}(x_{0},x_{0})$ is the evaluation at $(x,y)=(x_{0},x_{0})$ of
the $C^{1}(M\times M)$ function $P_{-4}(x,y)$ in (1.2).

ii) Let $M_{\varepsilon}=M\setminus\Gamma_{\varepsilon}$, then the spatial
average of the mean first-passage time satisfies the asymptotic formula, as
$\varepsilon\rightarrow 0$,

$\frac{1}{|M_{\epsilon}|}\int_{M_{\varepsilon}}\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=y]dvol_{g}(y)=-\frac{|M|}{2\pi}\log\varepsilon+|M|P_{-4}(x_{0},x_{0})+O(\varepsilon\log\varepsilon).$

In Section $5$ Theorem 5.3 we will prove a similar result for $\partial
M\neq\emptyset$ with reflection boundary conditions for the Brownian motion.
In this setting, we will use instead the Neumann Green’s function $E(x,y)$.
See Section 5 for details.

This paper is structured in the following manner. In Section 2, we introduce
some notation and the geometric framework with which we will be operating.
Section 3 deals with investigating the singular structure of the Green’s
function on a Riemannian surface without boundary. In Section 4, We make use
of the derived Greens function to prove Theorem 1.1. In Section 5, we consider
the analogous problem in the setting of a manifold with boundary and impose a
reflecting boundary condition for our Brownian motion. The result will be
stated in Theorem 5.3.

##  2\. Preliminaries

Throughout this paper, $(M,g)$ be a compact connected orientable Riemannian
surface with smooth boundary, $\partial M$ which could be empty.The
corresponding volume form and geodesic distance are denoted by $dvol_{g}$ and
$d_{g}(\cdot,\cdot)$, respectively. By $|M|$ we denote the volume of $M$.

For fixed $x\in M$, we will denote by $B_{\rho}(x)$ the geodesic ball of
radius $\rho>0$ centred at $x$. In what follows $\rho$ will always be smaller
than the injectivity radius of $(M,g)$ and the distance from $x$ to $\partial
M$. We let $\mathbb{D}_{\rho}$ be the Euclidean ball in $\mathbb{R}^{2}$ of
radius $\rho$ centred at the origin.

In this work, we will often use the geodesic coordinates constructed as
follows. For fixed $x_{0}\in M$ and orthonormal tangent vectors
$E_{1},E_{2}\in T_{x_{0}}M$, write $t=(t_{1},t_{2})\in\mathbb{D}_{\rho}$ and
define

(2.1) $x(t;x_{0}):=\exp_{x_{0}}(t_{1}E_{1}+t_{2}E_{2})$

where $\exp_{x_{0}}(V)$ denotes the time $1$ map of $g$-geodesics with initial
point $x_{0}$ and initial velocity $V\in T_{x_{0}}M$. The coordinate
$t\in\mathbb{D}_{\rho}\mapsto x(t;x_{0})$ is then an $g$-geodesic coordinate
system for a neighbourhood of $x_{0}$ on $M$.

We will also use the re-scaled version of this coordinate system. For
$\varepsilon>0$ sufficiently small we define the (re-scaled) $g$-geodesic
coordinate by the following map

(2.2) $x^{\varepsilon}(\cdot;x_{0}):t=(t_{1},t_{2})\in\mathbb{D}\mapsto
x(\varepsilon t;x_{0})\in B_{\varepsilon}(x_{0}),$

where $\mathbb{D}$ is the unit disk in $\mathbb{R}^{2}$.

In the subsequent sections, we denote the centre of the "trap" by $x_{0}\in
M$, which will be considered as fixed. We will use the following notations. We
set $\Gamma_{\varepsilon}:=B_{\varepsilon}(x_{0})$

$M_{\varepsilon}=M_{\varepsilon}(x_{0}):=M\setminus\Gamma_{\varepsilon}$

and denote by $h=h(\varepsilon,x_{0})$ the metric on $\partial
M_{\varepsilon}$, induced by the trivial embedding of $\partial
M_{\varepsilon}$ into $M_{\varepsilon}$. The corresponding volume form is
denoted by $dvol_{h}$. Further, we set $z\in\partial
M_{\varepsilon}\mapsto\nu_{z}$ to be an outward pointing normal for
$M_{\varepsilon}$. Finally, we let $|M_{\varepsilon}|$,
$|\partial\Gamma_{\varepsilon}|$ be the volumes of $M_{\varepsilon}$ and
$\partial\Gamma_{\varepsilon}$ with respect to $g$ and $h$.

##  3\. Green’s function

Within this section we assume that $\partial M$ is empty and we consider the
Green function on $M$, which is the fundamental solution to the Laplace
equation:

(3.1) $\Delta_{g}E(x,y)=-\delta_{y}(x)+\frac{1}{|M|},\quad
E(x,y)=E(y,x),\quad\int_{M}E(x,y)dvol_{g}(y)=0.$

For a fixed $x_{0}\in M$ and set $\Gamma_{\varepsilon}=B_{\varepsilon}(x_{0})$
we consider the following function

$I_{\varepsilon}(x_{0},x):=\int_{\Gamma_{\varepsilon}}E(x,y)dvol_{g}(y).$

for $x\in M_{\epsilon}$. We will need to know about the singular behaviour of
$\partial_{\nu_{x}}E(\cdot,\cdot)$, $I_{\varepsilon}(x_{0},\cdot)$, and
$\partial_{\nu_{x}}I_{\varepsilon}(x_{0},\cdot)$ on
$\partial\Gamma_{\varepsilon}$ as we approach neighbourhoods of the diagonal.
To investigate these, we recall the singularity structure of $E(\cdot,\cdot)$:

######  Proposition 3.1.

The Green function $E(x,y)$ and has the following singularity structure near
the diagonal

$E(x,y)=-\frac{1}{2\pi}\log d_{g}(x,y)+P_{-4}(x,y),$

where $P_{-4}(x,y)\in C^{1}(M\times M)$ is infinitely differentiable off the
diagonal $\\{x=y\\}$.

We will prove proposition 3.1 in Section A as it involves the use of
pseudodifferential operators.

As the distance function plays a crucial role in the Green’s function
$E(x,y)$, it is useful to derive asymptotics for them in the appropriate
coordinate systems:

######  Lemma 3.2.

Let

$d_{g}^{*}(s,t):=d_{g}(x(s,x_{0}),x(t,x_{0})).$

where $t=(t_{1},t_{2})\in\mathbb{D}_{\rho}\mapsto x(t,x_{0})$ is the
coordinate system defined in (2.1). Then we have that

$d_{g}^{*}(s,t)=|s-t|+|s-t|F\left(t,\frac{s-t}{|s-t|},|s-t|\right)$

for some smooth function $F(t,\omega,r)\in C^{\infty}(\mathbb{D}_{\rho}\times
S^{1}\times[0,2\rho])$ which is $O(t)+O(r)$.

###### Proof.

By Lemma 4.8 of [26], if $t\mapsto x(t,x_{0})$ is any coordinate system, there
exists a matrix $H_{j,k}(s,t)$ smooth in $(s,t)$ such that

(3.2) $\displaystyle
d_{g}^{*}(s,t)^{2}=\sum_{j=1}^{2}H_{j,k}(s,t)(s_{j}-t_{j})(s_{k}-t_{k}),$

where $H_{j,k}(t,t)=g_{j,k}(t)$ is the coordinate expression for the metric
tensor $g$. Since the coordinate system (2.1) is the geodesic coordinate
system, we have that $g_{j,k}(t)=\delta_{j,k}+O(|t|^{2})$. So we get
$H_{j,k}(t,t)=\delta_{j,k}+O(|t|^{2})$. Taylor expand $H_{j,k}(s,t)$ around
$s=t$ and insert the resulting expression into (3.2) we get

$d_{g}^{*}(s,t)=|s-t|+|s-t|F\left(t,\frac{s-t}{|s-t|},|s-t|\right)$

for some smooth function $F\in C^{\infty}(\mathbb{D}_{\rho}\times
S^{1}\times[0,r_{0}])$ which is $O(t)+O(r)$. ∎

The following distance expression in the rescaled normal coordinates given by
(2.2) was stated in Corollary 2.6 of [33]:

######  Lemma 3.3.

For the coordinates given by (2.2),

$d^{-1}_{g}(x^{\varepsilon}(s,x_{0}),x^{\varepsilon}(t,x_{0}))=\varepsilon^{-1}|t-s|^{-1}+\varepsilon|t-s|^{-1}A(\varepsilon,s,r,\omega)$

for some smooth function $A$ in the variables
$(\varepsilon,s,r,\omega)\in[0,\varepsilon_{0}]\times\mathbb{D}\times\mathbb{R}\times
S^{1}$, where $r=|t-s|$ and $\omega=\frac{t-s}{|t-s|}$.

In the next two lemmas, we investigate the properties of
$I_{\varepsilon}(x_{0},\cdot)$

######  Lemma 3.4.

The following estimate holds

(3.3)
$\sup_{x\in\partial\Gamma_{\varepsilon}}I_{\varepsilon}(x_{0},x)=O(\varepsilon^{2}\log\varepsilon),\qquad\text{as
}\varepsilon\rightarrow 0.$

###### Proof.

Due to Proposition 3.1 it is sufficient to prove that

$\sup_{x\in\partial\Gamma_{\varepsilon}}\int_{\Gamma_{\varepsilon}}\log
d_{g}(x,y)dvol_{g}(y)=O(\varepsilon^{2}\log\varepsilon).$

We consider $\varepsilon>0$ sufficiently small, so that
$\log(10\varepsilon)<0$. Then, for $x\in\partial\Gamma_{\varepsilon}$,

$\left|\int_{\Gamma_{\varepsilon}}\log
d_{g}(x,y)dvol_{g}(y)\right|=\left|\int_{B_{\varepsilon}(x_{0})}\log
d_{g}(x,y)dvol_{g}(y)\right|\leq\left|\int_{B_{2\varepsilon}(x)}\log
d_{g}(x,y)dvol_{g}(y)\right|.$

For $\varepsilon>0$ sufficiently small we can find $\rho>3\varepsilon$ which
is smaller than the injectivity radius. We will use the coordinate system
given by

$\mathbb{D}_{\rho}\ni(s_{1},s_{2})\mapsto x(s_{1},s_{2};x_{0}),$

defined in Section 2. We recall that $s=(s_{1},s_{2})$ and $t=(t_{1},t_{2})$
and let

$d_{g}^{*}(s,t):=d_{g}(x(s,x_{0}),x(t,x_{0})).$

Lemma 3.2 tells us that

$d_{g}^{*}(s,t)=|s-t|+|s-t|F\left(t,\frac{s-t}{|s-t|},|s-t|\right)$

for some smooth function $F$ which is $O(|t|)+O(|s-t|)$. Therefore, for
sufficiently small $\varepsilon>0$, we can choose $\rho>0$ small enough so
that for all $s,t\in\mathbb{D}_{\rho}$,

$\frac{1}{2}|s-t|\leq d_{g}^{*}(t,s)\leq 2|s-t|.$

Furthermore, we choose $C>0$ such that $\sqrt{\textrm{det}(g_{j,k}(s))}\leq C$
for $s\in\mathbb{D}_{\rho}$. Therefore, for
$x=x(t,x_{0})\in\partial\Gamma_{\varepsilon}$, we estimate

$\displaystyle\left|\int_{B_{2\varepsilon}(x)}\log
d_{g}(x,y)dvol_{g}(y)\right|$
$\displaystyle\leq\left|C\int_{d_{g}^{*}(t,s)\leq
2\varepsilon}\log\left(2|s-t|\right)ds\right|$
$\displaystyle\leq\left|C\int_{|s-t|\leq
4\varepsilon}\log\left(2|s-t|\right)ds\right|=O(\varepsilon^{2}\log\varepsilon).$

∎

######  Lemma 3.5.

The following estimate holds

(3.4)
$\sup_{x\in\partial\Gamma_{\varepsilon}}\partial_{\nu_{x}}I(x_{0},x)=O(\varepsilon),\qquad\text{as
}\varepsilon\rightarrow 0.$

###### Proof.

Let us use the coordinate system $x(t,x_{0})$. Note that in these coordinates
the volume form for $M$ is given by

(3.5) $dvol_{g}(y)=(1+\varepsilon V_{\varepsilon}(s))ds_{1}\wedge ds_{2}$

for some smooth function $V_{\varepsilon}(s)$ whose derivatives of all orders
are bounded uniformly in $\varepsilon$. We also note that in these
coordinates, we have

(3.6)
$d_{g}(x(t;x_{0}),x(s;x_{0}))^{2}=\sum_{\alpha,\beta=1}^{2}G_{\alpha,\beta}(s,t)(s_{\alpha}-t_{\alpha})(s_{\beta}-t_{\beta})$

where $t=(t_{1},t_{2})$, $s=(s_{1},s_{2})$, and $G_{\alpha,\beta}(s,t)$ is a
smooth function on $\mathbb{D}\times\mathbb{D}$ such that
$G_{\alpha,\beta}(s,s)=\delta_{\alpha}^{\beta}+O(|s|^{2})$ for $s$ near $0$.
Then, by Proposition 2.8 in [41], we know

$\displaystyle E(x(t;x_{0}),x(s;x_{0}))=$
$\displaystyle-\frac{1}{4\pi}\log\left(\sum_{\alpha,\beta=1}^{2}G_{\alpha,\beta}(s,t)(s_{\alpha}-t_{\alpha})(s_{\beta}-t_{\beta})\right)$
$\displaystyle+q_{2}(s,s-t)+p_{2}(s,s-t)\log|s-t|+R(s,t).$

Here $p_{2}(x,z)$ is a polynomial homogeneous of degree $2$ in $z$, with the
coefficients that are bounded, together with their $x$-derivatives. A function
$q_{2}(x,z)$ is smooth on $\mathbb{R}^{2}\setminus\\{0\\}$ and homogeneous of
degree $2$ in $z$. Finally, $R\in
C^{2}(\mathbb{R}^{2}_{s}\times\mathbb{R}^{2}_{t})$.

Let us use the polar coordinates

$t=(r\cos\theta,r\sin\theta)\qquad
s=(r^{\prime}\cos\theta^{\prime},r^{\prime}\sin\theta^{\prime}).$

We note that $x(\\{|t|=\varepsilon;x_{0}\\})=\partial\Gamma_{\varepsilon}$ and
$r\mapsto(r\cos\theta,r\sin\theta)$ is the parametrization of unit speed
geodesic issued from the origin. Therefore, since $\partial_{\nu_{x}}$ is the
inward normal of $\partial\Gamma_{\varepsilon}$ for
$x=(r\cos\theta,r\sin\theta)\in\partial\Gamma_{\varepsilon}$, it follows from
Gauss Lemma that $\Phi_{*}\partial_{\nu_{x}}=-\partial_{r}\in
T_{(r\cos\theta,r\sin\theta)}\mathbb{R}^{2}$. Therefore

$\displaystyle\partial_{\nu_{x}}E(x,y)=\partial_{r}\Bigg{[}-\frac{1}{4\pi}\log$
$\displaystyle\left(\sum_{\alpha,\beta=1}^{2}G_{\alpha,\beta}(s,t)(s_{\alpha}-t_{\alpha})(s_{\beta}-t_{\beta})\right)$
$\displaystyle+q_{2}(s,s-t)+p_{2}(s,s-t)\log|s-t|+R(s,t)\Bigg{]}.$

Therefore

$\displaystyle\partial_{x}I(x_{0},x)=$
$\displaystyle\int_{\mathbb{D}_{\varepsilon}}\partial_{r}\Bigg{[}-\frac{1}{4\pi}\log\left(\sum_{\alpha,\beta=1}^{2}G_{\alpha,\beta}(s,t)(s_{\alpha}-t_{\alpha})(s_{\beta}-t_{\beta})\right)$
$\displaystyle+q_{2}(s,s-t)+p_{2}(s,s-t)\log|s-t|+R(s,t)\Bigg{]}(1+\varepsilon
V_{\varepsilon}(s))ds.$

From the properties of functions $q_{2}$, $p_{2}$, and $R$, mentioned above,
it follows that

$\int_{\mathbb{D}_{\varepsilon}}\partial_{r}\left(q_{2}(s,s-t)+p_{2}(s,s-t)\log|s-t|+R(s,t)\right)(1+\varepsilon
V_{\varepsilon}(s))ds=O(\varepsilon^{2})$

uniformly on $t$. Hence, we have

$\displaystyle\partial_{x}I(x_{0},x)=$
$\displaystyle-\frac{1}{4\pi}\int_{\mathbb{D}_{\varepsilon}}\partial_{r}\log\left(\sum_{\alpha,\beta=1}^{2}G_{\alpha,\beta}(s,t)(s_{\alpha}-t_{\alpha})(s_{\beta}-t_{\beta})\right)ds$
(3.7)
$\displaystyle-\frac{\varepsilon}{4\pi}\int_{\mathbb{D}_{\varepsilon}}\partial_{r}\log\left(\sum_{\alpha,\beta=1}^{2}G_{\alpha,\beta}(s,t)(s_{\alpha}-t_{\alpha})(s_{\beta}-t_{\beta})\right)V_{\varepsilon}(s)ds+O(\varepsilon^{2})$

The first integral of the right-hand side is equal to

$\displaystyle\int_{0}^{2\pi}$
$\displaystyle\int_{0}^{\varepsilon}\frac{2\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}&r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}r^{\prime}dr^{\prime}d\theta^{\prime}$
(3.8)
$\displaystyle+\int_{0}^{2\pi}\int_{0}^{\varepsilon}\frac{\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}&r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}\partial_{r}G\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}&r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}r^{\prime}dr^{\prime}d\theta^{\prime},$

where $G=G(r,\theta,r^{\prime},\theta^{\prime})$ is two by two matrix with
entries $\\{G_{\alpha,\beta}(s,t)\\}$ with $t=t(r,\theta)$ and
$s=s(r^{\prime},\theta^{\prime})$. Since $x\in\partial
B_{\varepsilon}(x_{0})$, we take $r=\varepsilon$. Then, if we change the
variable $r^{\prime}\mapsto\varepsilon r^{\prime}$, the last expression
becomes

$\displaystyle\varepsilon\int_{0}^{2\pi}$
$\displaystyle\int_{0}^{1}\frac{2\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}\cos\theta-r^{\prime}\cos\theta^{\prime}&\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}r^{\prime}dr^{\prime}d\theta^{\prime}$
$\displaystyle+\varepsilon^{2}\int_{0}^{2\pi}\int_{0}^{1}\frac{\begin{bmatrix}\cos\theta-r^{\prime}\cos\theta^{\prime}&\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}\partial_{r}G\begin{bmatrix}\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}\cos\theta-r^{\prime}\cos\theta^{\prime}&\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}r^{\prime}dr^{\prime}d\theta^{\prime}.$

Note that we have integrable singularity at point
$(r^{\prime},\theta^{\prime})=(1,\theta)$ and integrals are bounded uniformly
on $\theta$. Therefore, the last expression is $O(\varepsilon)$ as
$\varepsilon\rightarrow 0$ uniformly on $\theta$. Since $V_{\varepsilon}(s)$
is bounded uniformly on $\varepsilon$, the second term of (3) is
$O(\varepsilon^{3})$. ∎

Next, we obtain the singularity structure of
$\partial_{\nu_{x}}E(\cdot,\cdot)$ in a neighbourhood of $x_{0}$:

######  Lemma 3.6.

Let $B_{\varepsilon}(x_{0})$ be the geodesic ball with radius $\varepsilon$
centred at $x_{0}$. Then

$\partial_{\nu_{x}}E(x,y)\left.\right|_{x,y\in\partial\Gamma_{\varepsilon}}=\frac{1}{4\pi\varepsilon}+Q_{\varepsilon}(x,y),$

for some function $Q_{\varepsilon}$ such that

$\sup_{x\in\partial\Gamma_{\varepsilon}}\int_{\partial\Gamma_{\varepsilon}}Q_{\varepsilon}(x,y)dvol_{h}(y)=O(\varepsilon).$

###### Proof.

We begin as in the prove of Lemma 3.5. We repeat all steps until we derive

$\displaystyle\partial_{\nu_{x}}E(x,y)=\partial_{r}\Bigg{[}-\frac{1}{4\pi}\log$
$\displaystyle\left(\sum_{\alpha,\beta=1}^{2}G_{\alpha,\beta}(s,t)(s_{\alpha}-t_{\alpha})(s_{\beta}-t_{\beta})\right)$
(3.9) $\displaystyle+q_{2}(s,s-t)+p_{2}(s,s-t)\log|s-t|+R(s,t)\Bigg{]}.$

We recall that $p_{2}(x,z)$ is a polynomial homogeneous of degree $2$ in $z$,
with the coefficients that are bounded, together with their $x-$derivatives. A
function $q_{2}(x,z)$ is smooth on $\mathbb{R}^{2}\setminus\\{0\\}$ and
homogeneous of degree $2$ in $z$. Finally, $R\in
C^{2}(\mathbb{R}^{2}_{s}\times\mathbb{R}^{2}_{t})$. These conditions imply
that

$\int_{0}^{2\pi}\partial_{r}\left[q_{2}(s,s-t)+p_{2}(s,s-t)\log|s-t|+R(s,t)\right]\left.\right|_{r=r^{\prime}=\varepsilon}d\theta^{\prime}=O(1)$

as $\varepsilon\rightarrow 0$ uniformly on $\theta$.

Next, we investigate the first term of the right-hand side of (3), which can
be written as follows

$\frac{1}{4\pi}\frac{2\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}&r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}\\\
+\frac{1}{4\pi}\frac{\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}&r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}\partial_{r}G\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}&r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}r\cos\theta-r^{\prime}\cos\theta^{\prime}\\\
r\sin\theta-r^{\prime}\sin\theta^{\prime}\end{bmatrix}}.$

Since $x$, $y\in\partial\Gamma_{\varepsilon}$, we take
$r=r^{\prime}=\varepsilon$, so that the last expression becomes

$\frac{1}{2\pi\varepsilon}\frac{\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}\cos\theta-\cos\theta^{\prime}&\sin\theta-\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}}\\\
+\frac{1}{4\pi}\frac{\begin{bmatrix}\cos\theta-\cos\theta^{\prime}&\sin\theta-\sin\theta^{\prime}\end{bmatrix}\partial_{r}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}\cos\theta-\cos\theta^{\prime}&\sin\theta-\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}}.$

Note that the last term belongs to $L^{\infty}(S^{1}_{\theta}\times
S^{1}_{\theta^{\prime}})$ uniformly in $\varepsilon$. Therefore, it remains to
show that

(3.10)
$\frac{1}{2\pi\varepsilon}\frac{\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}}{\begin{bmatrix}\cos\theta-\cos\theta^{\prime}&\sin\theta-\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}}=\frac{1}{4\pi\varepsilon}+L_{\varepsilon}(\theta,\theta^{\prime})$

for some function $L_{\varepsilon}$ such that

$\int_{0}^{2\pi}L_{\varepsilon}(\theta,\theta^{\prime})d\theta^{\prime}=O(1),\qquad\text{as
}\varepsilon\rightarrow 0,$

uniformly on $\theta$. Let $J(\theta,\theta^{\prime})$ be the left-hand side
of (3.10). We denote $J_{1}:=J\chi_{|\theta-\theta^{\prime}|<\varepsilon}$ and
$J_{2}:=J\chi_{|\theta-\theta^{\prime}|>\varepsilon}$, where $\chi$ is an
indicator function of the corresponding set.

To investigate $J_{1}$, we will use Taylor expansion for its numerator and
denominator at $\theta^{\prime}=\theta$. We recall that
$G_{j,k}(x,x)=g_{j,k}(x)$, for $r=r^{\prime}=\varepsilon$, we get

(3.11) $G=g+\varepsilon
R_{\varepsilon}(\theta,\theta^{\prime})(\theta-\theta^{\prime}),$

where $R_{\varepsilon}$ is two by two matrix with
$C^{\infty}(S^{1}_{\theta}\times S^{1}_{\theta^{\prime}})$ entries and
$g=\\{g_{j,k}(\varepsilon\cos\theta,\varepsilon\sin\theta)\\}_{k,j}^{2}$.
Furthermore, we express $g$ in the following way

(3.12) $g=I+\Gamma(\varepsilon,\theta),$

where $I$ is two by two identity matrix and $\Gamma$ is two by two matrix with
interiors $O(\varepsilon^{2})$. Therefore, by applying Taylor expansion at
$\theta=\theta^{\prime}$, we obtain

$\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}=\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}g\begin{bmatrix}-\sin\theta\\\
\cos\theta\end{bmatrix}\\\
+\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}g\begin{bmatrix}K_{1}(\theta,\theta^{\prime})\\\
K_{2}(\theta,\theta^{\prime})\end{bmatrix}(\theta-\theta^{\prime})^{2}+O(\varepsilon)O(|\theta-\theta^{\prime}|^{2}),$

for some $K=(K_{1},K_{2})\in L^{\infty}\left(S^{1}\times S^{1}\right)^{2}$.
Note that the normal vector on $\\{|t|=\varepsilon\\}$ is given by
$\cos\theta\partial_{t_{1}}+\sin\theta\partial_{t_{2}}$ at the point
$(\varepsilon\cos\theta,\varepsilon\sin\theta)$, while the tangent is given by
$-\sin\theta\partial_{t_{1}}+\cos\theta\partial_{t_{2}}$. Therefore the first
term of the right-hand side of the last equation is zero, so that

$\displaystyle\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}=\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}g\begin{bmatrix}K_{1}\\\
K_{2}\end{bmatrix}(\theta-\theta^{\prime})^{2}+O(\varepsilon)O(|\theta-\theta^{\prime}|^{2}).$

Similarly, by using (3.11) and (3.12), we show that

$\displaystyle\begin{bmatrix}\cos\theta-\cos\theta^{\prime}&\sin\theta-\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}=2(\theta-\theta^{\prime})^{2}+O(\varepsilon)O(|\theta-\theta^{\prime}|^{2}).$

The last two estimates imply that

$\int_{0}^{2\pi}J_{1}d\theta^{\prime}=\frac{1}{2\pi\varepsilon}\int_{0}^{2\pi}\frac{\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}K_{1}\\\
K_{2}\end{bmatrix}+O(\varepsilon)}{2+O(\varepsilon)}\chi_{|\theta-\theta^{\prime}|<\varepsilon}(\theta^{\prime})d\theta^{\prime}=O(1)$

as $\varepsilon\rightarrow 0$ uniformly in $\theta$.

Next, we will investigate $J_{2}$. From (3.11) and (3.12), it follows that

$\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}=1-\cos(\theta-\theta^{\prime})+O(\varepsilon^{2})O(|\theta-\theta^{\prime}|)+O(\varepsilon)O(|\theta-\theta^{\prime}|^{2}).$

In the region $\\{|\theta-\theta^{\prime}|>\varepsilon\\}$, we can rewrite
this

$\begin{bmatrix}\cos\theta&\sin\theta\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}=1-\cos(\theta-\theta^{\prime})+O(\varepsilon)O(|\theta-\theta^{\prime}|^{2}).$

Similarly,

$\begin{bmatrix}\cos\theta-\cos\theta^{\prime}&\sin\theta-\sin\theta^{\prime}\end{bmatrix}G\begin{bmatrix}\cos\theta-\cos\theta^{\prime}\\\
\sin\theta-\sin\theta^{\prime}\end{bmatrix}=2-2\cos(\theta-\theta^{\prime})+O(\varepsilon)O(|\theta-\theta^{\prime}|^{3}).$

Therefore, we have

$\displaystyle J_{2}$
$\displaystyle=\frac{1}{2\pi\varepsilon}\left(\frac{1}{2}+\frac{O(\varepsilon)O(|\theta-\theta^{\prime}|^{2})}{2-2\cos(\theta-\theta^{\prime})+O(\varepsilon)O(|\theta-\theta^{\prime}|^{3})}\right)$
$\displaystyle=\frac{1}{4\pi\varepsilon}+\frac{O(1)}{\frac{2-2\cos(\theta-\theta^{\prime})}{(\theta-\theta^{\prime})^{2}}+O(\varepsilon)O(|\theta-\theta^{\prime}|)}$

Since $(2-2\cos(\theta-\theta^{\prime}))(\theta-\theta^{\prime})^{-2}$ is a
positive and continuous function of $\theta^{\prime}\in[0,2\pi]$, we conclude
that

$\int_{0}^{2\pi}\left(J_{2}-\frac{1}{4\pi\varepsilon}\right)d\theta^{\prime}=O(1)\qquad\text{as
}\varepsilon\rightarrow 0,$

uniformly in $\theta$. The Lemma is proved. ∎

##  4\. Narrow capture problem on the surface without boundary

In this section, we prove Theorem 1.1. We start by recalling the formulation
of the problem. Let $(X_{t},\mathbb{P}_{x})$ be the Brownian motion on a
boundaryless manifold $M$ starting at $x$, generated by $\Delta_{g}$. For
$x_{0}\in M$ and $\varepsilon>0$, let
$\Gamma_{\varepsilon}=B_{\varepsilon}(x_{0})$ be a small geodesic ball centred
at fixed point $x_{0}\in M$. Denote by $\tau_{\Gamma_{\varepsilon}}$ the first
time the Brownian motion $X_{t}$ hits $\Gamma_{\varepsilon}$, that is

$\tau_{\Gamma_{\varepsilon}}:=\inf\\{t\geq 0:X_{t}\in\Gamma_{\varepsilon}\\}.$

We aim to investigate the mean first-passage time and its average:

$\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=x],\qquad|M_{\varepsilon}|^{-1}\int_{M_{\varepsilon}}\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=x]dvol_{g}(x).$

where $M_{\varepsilon}:=M\setminus\Gamma_{\varepsilon}$. Namely, we want to
derive asymptotic expansion for these quantities as $\varepsilon\to 0$. It is
known that $\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=x]$ satisfies the
following boundary value problem, see for instance Appendix A in [33],

(4.1) $\begin{cases}\Delta_{g}u_{\varepsilon}=-1&\text{on }M_{\varepsilon};\\\
u_{\varepsilon}=0&\text{on }\partial
M_{\varepsilon}=\partial\Gamma_{\varepsilon},\end{cases}$

which gives the compatibility condition

(4.2)
$\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=-|M_{\varepsilon}|.$

To prove Theorem 1.1, we will need the following auxiliary result.

######  Proposition 4.1.

Let $u_{\varepsilon}$ be the solution of (4.1), then

$\partial_{\nu}\left.u_{\varepsilon}\right|_{\partial\Gamma_{\varepsilon}}=-\frac{|M_{\varepsilon}|}{2\pi\varepsilon}+W_{\varepsilon}.$

for some $W_{\varepsilon}\in O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(1)$
as $\varepsilon\rightarrow 0$.

###### Proof.

By using Green’s identity, we obtain

(4.3)
$\frac{1}{|M|}\int_{M_{\varepsilon}}u_{\varepsilon}(y)dvol_{g}(y)-u_{\varepsilon}(x)+\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=I_{\varepsilon}(x_{0},x).$

We take $\partial_{\nu_{x}}$ and restrict to $\partial\Gamma_{\varepsilon}$

$-\partial_{\nu_{x}}u_{\varepsilon}(x)+\partial_{\nu_{x}}\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=\partial_{\nu_{x}}I_{\varepsilon}(x_{0},x),$

and hence, by Lemma 3.5, we derive

$-\partial_{\nu_{x}}u_{\varepsilon}(x)+\partial_{\nu_{x}}\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon).$

By Proposition 11.3 of [41],

$-\frac{1}{2}\partial_{\nu}u_{\varepsilon}(x)+\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu_{x}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon).$

Therefore, from Lemma 3.6, it follows

$\frac{1}{2}\partial_{\nu}u_{\varepsilon}(x)=\frac{1}{4\pi\varepsilon}\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)+\int_{\partial\Gamma_{\varepsilon}}Q_{\varepsilon}(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)+O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon).$

Hence, the compatibility condition (4.2) gives

(4.4)
$\varepsilon\partial_{\nu}u_{\varepsilon}(x)=-\frac{|M_{\varepsilon}|}{2\pi}+2\varepsilon\int_{\partial\Gamma_{\varepsilon}}Q_{\varepsilon}(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)+O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon^{2}).$

Next, we estimate

$\displaystyle\sup_{x\in\partial\Gamma_{\varepsilon}}\left|\varepsilon\int_{\partial\Gamma_{\varepsilon}}Q_{\varepsilon}(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)\right|$
$\displaystyle\leq$
$\displaystyle\sup_{x\in\partial\Gamma_{\varepsilon}}\left|\varepsilon\partial_{\nu}u_{\varepsilon}\right|\sup_{x\in\partial\Gamma_{\varepsilon}}\int_{\partial\Gamma_{\varepsilon}}\left|Q_{\varepsilon}(x,y)\right|dvol_{h}(y)$
$\displaystyle\leq$ $\displaystyle
C\varepsilon^{2}\sup_{x\in\partial\Gamma_{\varepsilon}}\left|\partial_{\nu}u_{\varepsilon}\right|$

The last estimate comes from Lemma 3.6. Combine this estimate with (4.4) we
obtain that

$\varepsilon\partial_{\nu_{x}}u_{\varepsilon}(x)=-\frac{|M_{\varepsilon}|}{2\pi}+O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon).$

This completes the proof. ∎

###### Proof of Theorem 1.1.

We first prove ii) then proceed with i). By Proposition 4.1, we can express

$\partial_{\nu}\left.u_{\varepsilon}\right|_{\partial\Gamma_{\varepsilon}}=-\frac{|M_{\varepsilon}|}{2\pi\varepsilon}+W_{\varepsilon}$
(4.5)
$\displaystyle\|W_{\varepsilon}\|_{L^{\infty}(\partial\Gamma_{\epsilon})}\leq
C.$

uniformly in $\epsilon>0$. Then, for $x\in
M_{\varepsilon}\setminus\partial\Gamma_{\varepsilon}$, (4.3) gives

$\frac{1}{|M|}\int_{M_{\varepsilon}}u_{\varepsilon}(y)dvol_{g}(y)-u_{\varepsilon}(x)-\frac{|M_{\varepsilon}|}{2\pi\varepsilon}\int_{\partial\Gamma_{\varepsilon}}E(x,y)dvol_{h}(y)+\int_{\partial\Gamma_{\varepsilon}}E(x,y)W_{\varepsilon}(y)dvol_{h}(y)\\\
=I_{\varepsilon}(x_{0},x),$

or equivalently

(4.6)
$\frac{1}{|M|}\int_{M_{\varepsilon}}u_{\varepsilon}(y)dvol_{g}(y)=u_{\varepsilon}(x)+\frac{|M_{\varepsilon}|}{2\pi\varepsilon}\int_{\partial\Gamma_{\varepsilon}}E(x,x_{0})dvol_{h}(y)\\\
+\frac{|M_{\varepsilon}|}{2\pi\varepsilon}\int_{\partial\Gamma_{\varepsilon}}(E(x,y)-E(x,x_{0}))dvol_{h}(y)-\int_{\partial\Gamma_{\varepsilon}}E(x,y)W_{\varepsilon}(y)dvol_{h}(y)+I_{\varepsilon}(x,x_{0}).$

To compute the left-hand side, we restrict this to
$\partial\Gamma_{\varepsilon}$ where $u_{\varepsilon}=0$. We note that
Proposition 3.1 combined with Lemma 3.2 shows that in the coordinates (2.1)
the leading singuarlity of the Green’s function $E(x(s,x_{0},),x(t,x_{0}))$ is
of the form

$E(x(s,x_{0}),x(t,x_{0}))=C\log|t-s|+L^{\infty}(\mathbb{D}_{\rho}\times\mathbb{D}_{\rho})$

Combine this with Lemma 3.4 and (4.5) gives

$\sup_{x\in\partial\Gamma_{\varepsilon}}\left|\int_{\partial\Gamma_{\varepsilon}}E(x,y)W_{\varepsilon}(y)dvol_{h}(y)\right|=O(\varepsilon\log\varepsilon),\qquad\sup_{x\in\partial\Gamma_{\varepsilon}}\left|I_{\varepsilon}(x_{0},x)\right|=O(\varepsilon^{2}\log\varepsilon)$

as $\varepsilon\rightarrow 0$. Therefore, restricting (4.6) to
$\partial\Gamma_{\varepsilon}$ and using Proposition 3.1, we obtain

(4.7)
$\frac{1}{|M|}\int_{M_{\varepsilon}}u_{\varepsilon}(y)dvol_{g}(y)=-\frac{|M_{\varepsilon}||\partial\Gamma_{\varepsilon}|}{4\pi^{2}\varepsilon}\log\varepsilon+\frac{|M_{\varepsilon}||\partial\Gamma_{\varepsilon}|}{2\pi\varepsilon}P_{-4}(x_{0},x_{0})\\\
+\frac{|M_{\varepsilon}|}{2\pi\varepsilon}\int_{\partial\Gamma_{\varepsilon}}(E(x,y)-E(x,x_{0}))dvol_{h}(y)\left.\right|_{x\in\partial\Gamma_{\varepsilon}}+O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon\log\varepsilon).$

Let us examine the third term of the right-hand side

(4.8) $\int_{\partial\Gamma_{\varepsilon}}(E(x,y)-E(x,x_{0}))dvol_{h}(y)\\\
=\int_{\partial\Gamma_{\varepsilon}}(\log d_{g}(x,y)-\log
d_{g}(x,x_{0}))dvol_{h}(y)+\int_{\partial\Gamma_{\varepsilon}}(P_{-4}(x,y)-P_{-4}(x,x_{0}))dvol_{h}(y),$

where $x\in\partial\Gamma_{\varepsilon}$. Joint differentiability of $P_{-4}$
gives

(4.9)
$\sup_{x\in\partial\Gamma_{\varepsilon}}\left|\int_{\partial\Gamma_{\varepsilon}}(P_{-4}(x,y)-P_{-4}(x,x_{0}))dvol_{h}(y)\right|\leq
C\varepsilon^{2}.$

To investigate the first term of the right-hand side of (4.8), we use the
coordinate system $x^{\varepsilon}(\cdot,x_{0})$ with
$x=x^{\varepsilon}(t,x_{0})$ and $y=x^{\varepsilon}(s,x_{0})$. Let
$d\sigma(s)$ be the pull back of the volume form $dvol_{h}(y)$ under $s\mapsto
x^{\varepsilon}(s,x_{0})$, then

$dvol_{h}(y)=\varepsilon(1+v_{\varepsilon}(s))d\sigma(s)$

for some smooth function
$\|v_{\varepsilon}\|_{L^{\infty}(\partial\Gamma_{\varepsilon})}\leq
C\varepsilon$. By Lemma 3.3 we have

$d^{-1}_{g}(x^{\varepsilon}(t,x_{0}),x^{\varepsilon}(s,x_{0}))=\varepsilon^{-1}|t-s|^{-1}+\varepsilon|t-s|^{-1}A(\varepsilon,s,r,\omega)$

for some smooth function $A(\epsilon,s,r,\omega)$ in the variables
$(\varepsilon,s,r,\omega)\in[0,\varepsilon_{0}]\times\mathbb{D}\times\mathbb{R}\times
S^{1}$, where $r=|t-s|$ and $\omega=\frac{t-s}{|t-s|}$. Therefore, the first
term of (4.8) becomes

$\displaystyle\int_{\partial\Gamma_{\varepsilon}}(\log d_{g}(x,y)-\log
d_{g}(x,x_{0}))dvol_{h}(y)$
$\displaystyle=\varepsilon\int_{\partial\mathbb{D}}\log\left(\frac{1}{\varepsilon^{-1}|t-s|^{-1}+\varepsilon|t-s|^{-1}A}\right)(1+v_{\varepsilon}(s))d\sigma(s)$
(4.10)
$\displaystyle=\varepsilon\int_{\partial\mathbb{D}}\log\left(\frac{\varepsilon|t-s|}{1+\varepsilon^{2}A}\right)(1+v_{\varepsilon}(s))d\sigma(s).$

We have trivially that

(4.11)
$\varepsilon\left|\int_{\partial\mathbb{D}}\log\left(\frac{\varepsilon}{1+\varepsilon^{2}A(\varepsilon,s,r,\omega)}\right)(1+v_{\varepsilon}(s))d\sigma(s)\right|\leq
C\varepsilon\log\varepsilon$

and

(4.12)
$\displaystyle\left|\varepsilon\int_{\partial\mathbb{D}}\log|t-s|v_{\varepsilon}(s)d\sigma(s)\right|$
$\displaystyle\leq\varepsilon\int_{\partial\mathbb{D}}\left|\log|t-s|v_{\varepsilon}(s)\right|d\sigma(s)\leq
C\varepsilon^{2}$

for all $t\in\partial\mathbb{D}$. Therefore, inserting the estimates (4.11)
and (4.12) into (4) gives that for $t\in\partial\mathbb{D}$,

$\displaystyle\int_{\partial\Gamma_{\varepsilon}}(\log d_{g}(x,y)-\log
d_{g}(x,x_{0}))dvol_{h}(y)$
$\displaystyle=\varepsilon\int_{\partial\mathbb{D}}\log|t-s|d\sigma(s)+O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon\log\varepsilon)$
$\displaystyle=\frac{\varepsilon}{2}\int_{0}^{2\pi}\log(2-2\cos\theta^{\prime})d\theta^{\prime}+O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon\log\varepsilon)$
$\displaystyle=O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon\log\varepsilon)$

This combined with (4.9) and (4.8) gives

$\left|\int_{\partial\Gamma_{\varepsilon}}(E(x,y)-E(x,x_{0}))dvol_{h}(y)\right|\leq
C\varepsilon\log\varepsilon.$

Inserting this estimate into (4.7) implies

$\frac{1}{|M|}\int_{M_{\varepsilon}}u_{\varepsilon}(y)dvol_{g}(y)=-\frac{|M_{\varepsilon}||\partial\Gamma_{\varepsilon}|}{4\pi^{2}\varepsilon}\log\varepsilon+\frac{|M_{\varepsilon}||\partial\Gamma_{\varepsilon}|}{2\pi\varepsilon}P_{-4}(x_{0},x_{0})\\\
+O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon\log\varepsilon).$

We take the supremum norm over $\partial\Gamma_{\varepsilon}$ to obtain

(4.13)
$\frac{1}{|M|}\int_{M_{\varepsilon}}u_{\varepsilon}(y)dvol_{g}(y)=-\frac{|M_{\varepsilon}||\partial\Gamma_{\varepsilon}|}{4\pi^{2}\varepsilon}\log\varepsilon+\frac{|M_{\varepsilon}||\partial\Gamma_{\varepsilon}|}{2\pi\varepsilon}P_{-4}(x_{0},x_{0})\\\
+O(\varepsilon\log\varepsilon).$

Next, we note that
$|\Gamma_{\varepsilon}|=|B_{\varepsilon}(x_{0})|=O(\varepsilon^{2})$ and

$|\partial\Gamma_{\varepsilon}|=|\partial
B_{\varepsilon}(x_{0})|=\int_{\partial
B_{\varepsilon}(x_{0})}dvol_{h}(y)=\int_{\partial\mathbb{D}}\varepsilon(1+v_{\varepsilon}(s))d\sigma(s)=2\pi\varepsilon+O(\varepsilon^{2}).$

This gives us part ii) of Theorem 1.1.

Let us put (4.13) into (4.3) to we obtain

$u_{\varepsilon}(x)=-\frac{|M|}{2\pi}\log\varepsilon+|M_{\varepsilon}|P_{-4}(x_{0},x_{0})\\\
+\int_{\partial
M_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)-I_{\varepsilon}(x_{0},x)+O(\varepsilon\log\varepsilon).$

as $\varepsilon\rightarrow 0$. It remains to show that for a fixed compact set
$K\subset\subset M_{\varepsilon}$,

(4.14)
$\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)-I_{\varepsilon}(x_{0},x)=-|M|E(x,x_{0})+r_{\varepsilon}(x).$

for some $r_{\varepsilon}(x)$ whose $L^{\infty}(K)$ norm is of order
$\varepsilon$.

To do this, let us fix any compact set $K\subset M$ which does not contain
$x_{0}$, so that $K\cap\Gamma_{\varepsilon}$ is empty for sufficiently small
$\varepsilon>0$. Then $E(\cdot,\cdot)$ is smooth in
$K\times\Gamma_{\varepsilon}$, and hence we estimate

$\sup_{x\in K}I(x_{0},x)=\sup_{x\in
K}\int_{\Gamma_{\varepsilon}}E(x,y)dvol_{g}(y)=O(\varepsilon^{2})\qquad\text{as
}\varepsilon\rightarrow 0.$

Next, we write

$\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=\int_{\partial\Gamma_{\varepsilon}}(E(x,y)-E(x,x_{0}))\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)\\\
+E(x,x_{0})\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y).$

The first integral can be estimated using Proposition 4.1 and the smoothness
of $E(\cdot,\cdot)$ in $K\times\Gamma_{\varepsilon}$to give

$\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=O_{L^{\infty}(K)}(\varepsilon)+E(x,x_{0})\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y).$

Now use the compatibility condition (4.2) to get for $x\in K$,

$\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=-|M_{\varepsilon}|E(x,x_{0})+O_{L^{\infty}(K)}(\varepsilon)=-|M|E(x,x_{0})+O_{L^{\infty}(K)}(\varepsilon).$

This gives Part i) of Theorem 1.1.

∎

##  5\. Narrow capture problem on the surface with boundary

Here, we consider the same problem for the case when the surface has a smooth
boundary , $\partial M$, which reflects the particle. Without loss of
generality, we assume that $M$ is an connected open subset of a compact
orientable Riemannian manifold $(\tilde{M},g)$ without boundary. Let
$\tilde{E}(x,y)$ be the Green’s function on $\tilde{M}$, given by (3.1). The
Neumann Green’s function $E(x,y)$ is given by, for $x\in M^{0}$,

(5.1) $\begin{cases}\Delta_{g,y}E(x,y)=-\delta_{x}(y)+\frac{1}{|M|},&\text{for
}y\in M,\\\ \partial_{\nu_{y}}E(x,y)=0,&\text{for }y\in\partial M,\\\
\int_{M}E(x,y)dvol_{g}(y)=0.\end{cases}$

We can obtain this function by setting $E=\tilde{E}-C$, where the correction
term $C(x,y)$ is the solution to the boundary value problem, for $x\in M^{0}$,

$\begin{cases}\Delta_{g,y}C(x,y)=\frac{1}{|\tilde{M}|}-\frac{1}{|M|},&\text{for
}y\in M,\\\
\partial_{\nu_{y}}C(x,y)=\partial_{\nu_{y}}\tilde{E}(x,y),&\text{for
}y\in\partial M,\\\
\int_{M}C(x,y)d_{g}(y)=\int_{M}\tilde{E}(x,y)dvol_{g}(y).\end{cases}$

Therefore, for $U\subset\subset M$ away from the boundary, that is
$\mathrm{dist}_{g}(U,\partial M)>0$, it follows

$C=\tilde{E}-E\in C^{\infty}(\bar{U}\times\bar{U}).$

Hence, we can decompose

(5.2) $E(x,y)=-\frac{1}{2\pi}\log d_{g}(x,y)+P_{-4}(x,y),$

where $P_{-4}(x,y)\in C^{1}(\bar{U}\times\bar{U})$. Moreover, since we are
considering the centre of the trap, $x_{0}$, to be fixed in the interior of
$M$ with a sufficiently small $\varepsilon>0$, we have that

$\sup_{x\in\partial\Gamma_{\varepsilon}}\int_{\Gamma_{\varepsilon}}C(x,y)dvol_{g}(y)=O(\varepsilon^{2}),\qquad\sup_{x\in\partial\Gamma_{\varepsilon}}\partial_{\nu_{x}}\int_{\Gamma_{\varepsilon}}C(x,y)dvol_{g}(y)=O(\varepsilon^{2}),$
$\sup_{x\in\partial\Gamma_{\varepsilon}}\partial_{\nu_{x}}\int_{\partial\Gamma_{\varepsilon}}C(x,y)dvol_{h}(y)=O(\varepsilon),$

as $\varepsilon\rightarrow 0$. As a result, we obtain the following analogues
of Lemmas 3.4-3.6 for the function

$I_{\varepsilon}(x_{0},x):=\int_{\Gamma_{\varepsilon}}E(x,y)dvol_{g}(y),$

######  Lemma 5.1.

As $\varepsilon\rightarrow 0$, we have that

$\sup_{x\in\partial\Gamma_{\varepsilon}}I_{\varepsilon}(x_{0},x)=O(\varepsilon^{2}\log\varepsilon),\qquad\sup_{x\in\partial\Gamma_{\varepsilon}}\partial_{\nu_{x}}I(x_{0},x)=O(\varepsilon),$
$\partial_{\nu_{x}}E(x,y)\left.\right|_{x,y\in\partial\Gamma_{\varepsilon}}=\frac{1}{4\pi\varepsilon}+Q_{\varepsilon}(x,y),$

for some function $Q_{\varepsilon}$ such that

$\sup_{x\in\partial\Gamma_{\varepsilon}}\int_{\partial\Gamma_{\varepsilon}}Q_{\varepsilon}(x,y)dvol_{h}(y)=O(\varepsilon).$

Note that, in this case, $\partial M\neq\emptyset$, the mean first-passage
time $\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=x]$ satisfies the following
mixed boundary value problem, see Appendix in [33],

(5.3) $\begin{cases}\Delta_{g}u_{\varepsilon}=1&\text{on }M_{\varepsilon},\\\
u_{\varepsilon}=0,&\text{on }\partial\Gamma_{\varepsilon},\\\
\partial_{\nu}u=0,&\text{on }\partial M.\end{cases}$

which gives the compatibility condition

(5.4)
$\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=-|M_{\varepsilon}|.$

As a result, we have the following analogue of Proposition 4.1

######  Proposition 5.2.

Let $u_{\varepsilon}$ be the solution of (5.3), then

$\partial_{\nu}\left.u_{\varepsilon}\right|_{\partial\Gamma_{\varepsilon}}=-\frac{|M_{\varepsilon}|}{2\pi\varepsilon}+W_{\varepsilon}.$

for some $W_{\varepsilon}\in O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(1)$
as $\varepsilon\rightarrow 0$.

###### Proof.

By the Green’s identity,

$\frac{1}{|M|}\int_{M_{\varepsilon}}u_{\varepsilon}(y)dvol_{g}(y)-u_{\varepsilon}(x)-I_{\varepsilon}(x_{0},x)\\\
=\int_{\partial
M_{\varepsilon}}\partial_{\nu_{y}}E(x,y)u_{\varepsilon}(y)dvol_{h}(y)-\int_{\partial
M_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y).$

Using the boundary condition for both $E$ and $u_{\varepsilon}$, we obtain

$\frac{1}{|M|}\int_{M_{\varepsilon}}u_{\varepsilon}(y)dvol_{g}(y)-u_{\varepsilon}(x)+\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=I_{\varepsilon}(x_{0},x).$

Next, as in Proposition 4.1, we take $\partial_{\nu_{x}}$, restrict to
$\partial M_{\varepsilon}$, and use Lemma 5.1 to obtain

$-\partial_{\nu}u_{\varepsilon}(x)+\partial_{\nu}\int_{\partial\Gamma_{\varepsilon}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon).$

By Proposition 11.3 of [41],

$-\frac{1}{2}\partial_{\nu}u_{\varepsilon}(x)+\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu_{x}}\tilde{E}(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)-\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu_{x}}C(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon)$

so that

$-\frac{1}{2}\partial_{\nu}u_{\varepsilon}(x)+\int_{\partial\Gamma_{\varepsilon}}\partial_{\nu_{x}}E(x,y)\partial_{\nu}u_{\varepsilon}(y)dvol_{h}(y)=O_{L^{\infty}(\partial\Gamma_{\varepsilon})}(\varepsilon).$

Further, we repeat the steps of the proof of Proposition 4.1 with replacing
Lemma 3.6 to Lemma 5.1. ∎

Repeating the proof of Theorem 1.1 by replacing Proposition 4.1 with 5.2 and
Lemmas 3.4-3.6 with 5.1 yields the following theorem

######  Theorem 5.3.

Let $(M,g,\partial M)$ be a compact, connected and orientable Riemannian
surface with smooth boundary. Fix $x_{0}\in M^{0}$ and let
$\Gamma_{\varepsilon}:=B_{\varepsilon}(x_{0})$ be a geodesic ball centered at
$x_{0}$ of geodesic radius $\varepsilon>0$ such that
$\partial\Gamma_{\varepsilon}\cap\partial M=\emptyset$ .

i) For each $x\notin\Gamma_{\varepsilon}$, the first-passage time satisfies
the following asymptotic formula, as $\varepsilon\rightarrow 0$,

$\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=x]=-\frac{|M|}{2\pi}\log\varepsilon+|M|P_{-4}(x_{0},x_{0})-|M|E(x,x_{0})+r_{\varepsilon}(x)+O(\varepsilon\log\varepsilon).$

for some function $r_{\varepsilon}$ such that $\|r_{\varepsilon}\|_{C(K)}\leq
C_{K}\varepsilon$ for any compact $K\subset M$ for which
$K\cap\Gamma_{\varepsilon}=\emptyset$. The Neumann Green’s function $E(x,y)$
is given by (5.1) and $P_{-4}(x_{0},x_{0})$ is the evaluation at
$(x,y)=(x_{0},x_{0})$ of the kernel $P_{-4}(x,y)$ in (5.2).

ii) Let $M_{\varepsilon}=M\setminus\Gamma_{\varepsilon}$, then the spatial
average of the mean first-passage time satisfies the asymptotic formula, as
$\varepsilon\rightarrow 0$,

$\frac{1}{|M|}\int_{M_{\varepsilon}}\mathbb{E}[\tau_{\Gamma_{\varepsilon}}|X_{0}=y]dvol_{g}(y)=-\frac{|M|}{2\pi}\log\varepsilon+|M|P_{-4}(x_{0},x_{0})+O(\varepsilon\log\varepsilon).$

##  Appendix A Proof of Proposition 3.1

In this section we provide a brief outline for the necessary aspects of the
theory of pseudo-differential operators. For a greater in-depth description of
$\mathit{\Psi DO}$, we refer to the reader to [19], [41] or [45]. After the
basic elements of $\mathit{\Psi DO}$s have been described, we offer a proof
for Proposition 3.1.

###  A.1. Overview of Pseudo-differential operators ($\mathit{\Psi DO}$) on
Manifolds

Let $p(x,\xi)\in C^{\infty}(T^{*}\mathbb{R}^{n})$. We call $p(x,\xi)$ a
standard symbol of order $m$ if for all $m\in\mathbb{R}$, the following
estimate holds uniformly

$\displaystyle|D^{\alpha}_{x}D^{\beta}_{\xi}p(x,\xi)|\lesssim\langle\xi\rangle^{m-|\beta|}$

for every multi-index $\alpha,\beta\in\mathbb{N}^{n}$. Should $p(x,\xi)$ be an
order $m$ standard symbol, we say that $p(x,\xi)\in
S^{m}_{1,0}(T^{*}\mathbb{R}^{n})$.

######  Remark A.1.

We use $D_{\xi}:=-i\partial_{\xi},D_{x}:=-i\partial_{x}$ and
$\langle\xi\rangle:=(1+|\xi|^{2})^{1/2}$.

Of particular interest is a subspace of $S^{m}_{1,0}(T^{*}\mathbb{R}^{n})$
known as the _classical symbols of order $m$_ denoted by
$S^{m}_{cl}(T^{*}\mathbb{R}^{n})$. Such symbols are defined via a homogeneity
requirement on the asymptotic expansion of $p(x,\xi)$

(A.1) $p(x,\xi)\sim\sum_{j=0}^{\infty}p_{m-j}(x,\xi).$

where $p_{m-j}(x,\xi)$ are homogeneous of order $m-j$ in the fiber for all
$x\in\mathbb{R}^{n}$. i.e. $p_{m-j}(x,\lambda\xi)=\lambda^{m-j}p_{m-j}(x,\xi)$
for $\lambda,|\xi|\geq 1$. The above expansion (A.1) is an asymptotic
expansion in the sense that

$\displaystyle p(x,\xi)-\sum_{j=0}^{N}p_{m-j}(x,\xi)\in
S^{m-N-1}_{1,0}(T^{*}\mathbb{R}^{n}).$

If $p(x,\xi)\in S^{m}_{1,0}(T^{*}\mathbb{R}^{n})$, we can define an operator
$p(x,D):C_{c}^{\infty}(\mathbb{R}^{n})\rightarrow\mathcal{D}^{\prime}(\mathbb{R}^{n})$
which is given locally by the following expression

(A.2) $p(x,D)v:=\int_{\mathbb{R}^{n}}e^{i\xi\cdot
x}p(x,\xi)\widehat{v}(\xi)d\xi.$

Such an operator is called an $m$-th order pseudo-differential operator and we
say that $p(x,D)\in\Psi^{m}_{1,0}(\mathbb{R}^{n})$. We can also define
$\Psi^{m}_{cl}(\mathbb{R}^{n})$ by requiring $p(x,\xi)\in
S^{m}_{cl}(T^{*}\mathbb{R}^{n})$ in (A.2). Furthermore, we can uniquely extend
$p(x,D)$ to a bounded linear operator $p(x,D):H^{k}(\mathbb{R}^{n})\rightarrow
H^{k-m}(\mathbb{R}^{n})$ for $k\in\mathbb{R}$. We also define the space of
_smoothing operators_ , pseudo-differential operators with smooth kernels
_along the diagonal_ as

$\displaystyle\Psi^{-\infty}(\mathbb{R}^{n}):=\bigcup_{m\in\mathbb{R}}\Psi^{m}(\mathbb{R}^{n}).$

Smoothing operators arise as pseudo-differential operators of symbols
belonging to the space defined by

$\displaystyle
S^{-\infty}(T^{*}\mathbb{R}^{n})=\bigcup_{m\in\mathbb{R}}S^{m}(T^{*}\mathbb{R}^{n}).$

We also have that if $p(x,D)\in\Psi^{m}(\mathbb{R}^{n})$ and
$q(x,D)\in\Psi^{l}(\mathbb{R}^{n})$, then
$p(x,D)q(x,D)\in\Psi^{m+l}(\mathbb{R}^{n})$. The way such composition is
defined is via a _symbol calculus_. The symbol for $p(x,D)q(x,D)$, denoted by
$(p\\#q)(x,\xi)$ is given by

(A.3)
$(p\\#q)(x,\xi)\sim\sum_{\mu}\frac{i^{|\mu|}}{\mu!}D_{\xi}^{\mu}p(x,\xi)D_{x}^{\mu}q(x,\xi).$

where $\mu\in\mathbb{N}^{n}$ denotes a multi-index. The derivation for this
formula can be found in [41], Chapter 7, Section 3. Another important aspect
of pseudo-differential operators, which will largely be used in the proof of
proposition 3.1 is the notion of elliptic parametrices. First, if
$p(x,D)\in\Psi^{m}(\mathbb{R}^{n})$, we say that $p(x,D)$ is elliptic if the
following lower bound estimate holds for constants $C,R>0$

$\displaystyle|p(x,\xi)|\geq C(1+|\xi|)^{m},\;\ \text{for}|\xi|\geq R.$

If $p(x,D)$ is elliptic, then the following theorem holds

######  Theorem A.2.

If $p(x,D)\in\Psi^{m}(\mathbb{R}^{n})$ is elliptic, then there exists a
$q(x,D),\tilde{q}(x,D)\in\Psi^{-m}(\mathbb{R}^{n})$ such that

$\displaystyle p(x,D)q(x,D)$ $\displaystyle=I+\Psi^{-\infty}(\mathbb{R}^{n})$
$\displaystyle\tilde{q}(x,D)p(x,D)$
$\displaystyle=I+\Psi^{-\infty}(\mathbb{R}^{n})$

The proof for the above theorem can be found in [41], Chapter 7, Section 4.
The operators $q(x,D),\tilde{q}(x,D)$ are known as right and left parametrices
of $p(x,D)$ respectively. Furthermore, it is a straightforward corollary that
$q(x,D)=\tilde{q}(x,D)+\Psi^{-\infty}(\mathbb{R}^{n})$.

In lieu of the pseudo-differential theory on $\mathbb{R}^{n}$, there is a
natural extension to $C^{\infty}$-manifolds. Let $M$ be a closed manifold. An
operator $A:C^{\infty}(M)\rightarrow\mathcal{D}^{\prime}(M)$ is said to belong
to $\Psi^{m}_{1,0}(M)$ if there is an atlas $(U_{j},\varphi_{j})$ covering
$M$, with $\varphi_{j}:U_{j}\rightarrow V_{j}\subset\mathbb{R}^{n}$ and a
partition of unity $\\{\chi_{j}\\}$ subordinate to the atlas covering such
that the following operator

$\displaystyle
u\mapsto(\chi_{k}A\chi_{j}\varphi_{j}^{*}u)\circ\varphi_{k}^{-1}.$

belongs to $\Psi^{m}_{1,0}(\mathbb{R}^{n})$. Similarly, if $a\in
C^{\infty}(T^{*}M)$, we say that $a\in S^{m}_{1,0}(T^{*}M)$ if

$\displaystyle\chi_{j}\circ\varphi_{j}^{-1}a(\varphi_{j}^{-1}(\cdot),\varphi_{j}^{*}\cdot)\in
S^{m}_{1,0}(T^{*}\mathbb{R}^{n}).$

The classical pseudo-differential operators and symbols on $M$ are defined in
the same way.

###  A.2. Proof of Proposition 3.1

Since $\Delta_{g}\in\Psi^{2}_{cl}(M)$ elliptic, we have that as a result of
Theorem A.2, there is a parametrix $P\in\Psi^{-2}_{cl}(M)$ satisfying the
following equation

$\displaystyle\Delta_{g}P=I+\Psi^{-\infty}(M)$

Furthermore, as a corollary of Borel’s lemma ,[45], we can express the
Schwartz kernel of $P$ as

$\displaystyle P(x,y)=\sum_{j=0}^{\infty}P_{-2-j}(x,y)$

where $P_{-2-j}\in\Psi^{-2-j}_{cl}(M)$. A standard first order parametrix
construction indicates that we can choose for $x$ near $y$

$\displaystyle P_{-2}(x,y)=-\frac{1}{2\pi}\log d_{g}(x,y)$

So, our claim is that $P_{-3}=0$. This problem, reduces to showing that

(A.4) $P-P_{-2}\in\Psi^{-4}_{cl}(M)$

Left composition of $\Delta_{g}$ with (A.4) results in the following
equivalent formulation

(A.5) $\Delta_{g}P_{-2}-I\in\Psi^{-2}_{cl}(M)$

Self-adjointness of $P_{-2}$ and $\Delta_{g}$imply that (A.5) is equivalent to

(A.6) $P_{-2}\Delta_{g}-I\in\Psi^{-2}_{cl}(M)$

Should (A.6) be true, then we would infer that the expansion for
$P_{-2}\Delta_{g}$ consists of no $-1$ order pseudo-differential operator.
This is equivalent to requiring the principle symbol, which is homogeneous of
degree $-1$ satisfy the following

$\displaystyle\sigma_{-1}(P_{-2}\Delta_{g}-I)(y,\eta)=0,\,\ \text{for all}\,\
(y,\eta)\in T^{*}M$

In order to attain the above requirement, we show that
$\sigma_{-1}(P_{-2}\Delta_{g}-I)$ can be bounded from above in the following
manner

(A.7) $|\sigma_{-1}(P_{-2}\Delta_{g}-I)(y_{0},\tau\eta_{0})|\lesssim\tau^{-2}$

for $\tau\rightarrow\infty$ and fixed $(y_{0},\eta_{0})\in S^{*}M$. Since the
decay is radially symmetric and is independent of the choice of $y_{0}$, (A.7)
implies that $\sigma_{-1}(P_{-2}\Delta_{g}-I)$ vanishes on $T^{*}M$. Now, we
let $\Phi:V\rightarrow U$ be a Riemann normal co-ordinate chart, centered at
$y_{0}$ for which $\Phi(0)=y_{0}\in U\subset M$. Let
$A:C_{c}^{\infty}(\mathbb{R}^{2})\rightarrow\mathcal{D}^{\prime}(\mathbb{R}^{2})$
and
$B:C_{c}^{\infty}(\mathbb{R}^{2})\rightarrow\mathcal{D}^{\prime}(\mathbb{R}^{2})$
denote the pull-back operators for $P_{-2}$ and $\Delta_{g}$ by $\Phi$
respectively. Then, by the invariance of principle symbols under
symplectomorphism, we have that

$\displaystyle\sigma_{-1}(P_{-2}\Delta_{g}-I)(y_{0},\eta_{0})=\sigma_{-1}(AB-I)(0,\xi)$

If $a(t,\xi)$ and $b(t,\xi)$ denote the symbols of $A$ and $B$, then by (A.3),
we have that

$\displaystyle(a\\#b)(t,\xi)=a(t,\xi)b(t,\xi)-i\sum_{|\mu|=1}D^{\mu}_{\xi}a(t,\xi)D^{\mu}_{t}b(t,\xi)+S^{-2}_{cl}(T^{*}\mathbb{R}^{2})$

Furthermore, if we restrict $t=0$, since we are working in Riemannian normal
co-ordinates, we have that $\left.D^{\mu}_{t}b(t,\xi)\right|_{t=0}=0$, which
is shown in [25], and thus

$\displaystyle(a\\#b)(0,\xi)=a(0,\xi)b(0,\xi)+S^{-2}_{cl}(T^{*}\mathbb{R}^{2})$

Since the symbol $a(0,\xi)$ is given by the Schwartz kernel of $A$, where

$\displaystyle a(0,\xi)=-\frac{1}{2\pi}\int_{\mathbb{R}^{2}}e^{-i\xi\cdot
t}\log|t|dt=|\xi|^{-2}$

we have that

$\displaystyle(a\\#b)(0,\xi)=1+S^{-2}_{cl}(T^{*}\mathbb{R}^{2})$

This implies that

$\displaystyle|(a\\#b)(0,\xi)-1|\lesssim\langle\xi\rangle^{-2}\implies\sigma_{-1}(AB-I)(0,\xi)=0$

The last equality thus implies that
$\sigma_{-1}(P_{-2}\Delta_{g}-I)(y,\eta)=0$ for all $(y,\eta)\in T^{*}M$.

## References

  * [1] Habib Ammari, Kostis Kalimeris, Hyeonbae Kang, and Hyundae Lee.  Layer potential techniques for the narrow escape problem.  J. Math. Pures Appl. (9), 97(1):66–84, 2012.
  * [2] O Bénichou and R Voituriez.  Narrow-escape time problem: time needed for a particle to exit a confining domain through a small window.  Physical review letters, 100(16):168105, 2008.
  * [3] P. C. Bressloff.  Asymptotic analysis of extended two-dimensional narrow capture problems.  Proc. A., 477(2246):Paper No. 20200771, 17, 2021.
  * [4] Paul C Bressloff.  Stochastic processes in cell biology, volume 41.  Springer, 2014.
  * [5] Paul C. Bressloff.  Asymptotic analysis of target fluxes in the three-dimensional narrow capture problem.  Multiscale Model. Simul., 19(2):612–632, 2021.
  * [6] Paul C. Bressloff, Berton A. Earnshaw, and Michael J. Ward.  Diffusion of protein receptors on a cylindrical dendritic membrane with partially absorbing traps.  SIAM J. Appl. Math., 68(5):1223–1246, 2008.
  * [7] Paul C Bressloff and Sean D Lawley.  Escape from subcellular domains with randomly switching boundaries.  Multiscale Modeling & Simulation, 13(4):1420–1445, 2015.
  * [8] Paul C Bressloff and Jay M Newby.  Stochastic models of intracellular transport.  Reviews of Modern Physics, 85(1):135, 2013.
  * [9] Paul C Bressloff and Ryan D Schumm.  The narrow capture problem with partially absorbing targets and stochastic resetting.  Multiscale Modeling & Simulation, 20(2):857–881, 2022.
  * [10] A. F. Cheviakov and M. J. Ward.  Optimizing the principal eigenvalue of the Laplacian in a sphere with interior traps.  Math. Comput. Modelling, 53(7-8):1394–1409, 2011.
  * [11] Alexei F Cheviakov, Michael J Ward, and Ronny Straube.  An asymptotic analysis of the mean first passage time for narrow escape problems: Part II: The sphere.  Multiscale Modeling & Simulation, 8(3):836–870, 2010.
  * [12] Alexei F Cheviakov and Michael Jeffrey Ward.  Optimizing the principal eigenvalue of the Laplacian in a sphere with interior traps.  Mathematical and Computer Modelling, 53(7-8):1394–1409, 2011.
  * [13] Daniel Coombs, Ronny Straube, and Michael Ward.  Diffusion on a sphere with localized traps: mean first passage time, eigenvalue asymptotics, and Fekete points.  SIAM J. Appl. Math., 70(1):302–332, 2009.
  * [14] Monica I Delgado, Michael Jeffrey Ward, and Daniel Coombs.  Conditional mean first passage times to small traps in a 3-d domain with a sticky boundary: applications to T cell searching behavior in lymph nodes.  Multiscale Modeling & Simulation, 13(4):1224–1258, 2015.
  * [15] Ricardo A Fernandes, Kristina A Ganzinger, Justin C Tzou, Peter Jönsson, Steven F Lee, Matthieu Palayret, Ana Mafalda Santos, Alexander R Carr, Aleks Ponjavic, Veronica T Chang, et al.  A cell topography-based mechanism for ligand discrimination by the t cell receptor.  Proceedings of the National Academy of Sciences, 116(28):14002–14010, 2019.
  * [16] D. Holcman and Z. Schuss.  The narrow escape problem.  SIAM Rev., 56(2):213–257, 2014.
  * [17] David Holcman and Z Schuss.  Escape through a small opening: receptor trafficking in a synaptic membrane.  Journal of Statistical Physics, 117(5):975–1014, 2004.
  * [18] David Holcman and Zeev Schuss.  Stochastic narrow escape in molecular and cellular biology.  Analysis and Applications. Springer, New York, 2015.
  * [19] Lars Hörmander.  The analysis of linear partial differential operators. III.  Classics in Mathematics. Springer, Berlin, 2007.  Pseudo-differential operators, Reprint of the 1994 edition.
  * [20] Sarafa Iyaniwura and MJ Ward.  Asymptotic analysis for the mean first passage time in finite or spatially periodic 2D domains with a cluster of small traps.  The ANZIAM Journal, 63(1):1–22, 2021.
  * [21] Sarafa Iyaniwura, Tony Wong, Michael J Ward, and Colin B Macdonald.  Simulation and optimization of mean first passage time problems in 2-D using numerical embedded methods and perturbation theory.  Multiscale Modeling & Simulation, 19(3):1367–1393, 2021.
  * [22] Sarafa A. Iyaniwura, Tony Wong, Colin B. Macdonald, and Michael J. Ward.  Optimization of the Mean First Passage Time in Near-Disk and Elliptical Domains in 2-D with Small Absorbing Traps.  SIAM Rev., 63(3):525–555, 2021.
  * [23] Theodore Kolokolnikov, Michele S Titcombe, and Michael J Ward.  Optimizing the fundamental neumann eigenvalue for the Laplacian in a domain with small traps.  European Journal of Applied Mathematics, 16(2):161–200, 2005.
  * [24] Venu Kurella, Justin C. Tzou, Daniel Coombs, and Michael J. Ward.  Asymptotic analysis of first passage time problems inspired by ecology.  Bull. Math. Biol., 77(1):83–125, 2015.
  * [25] John M. Lee.  Introduction to Riemannian manifolds, volume 176 of Graduate Texts in Mathematics.  Springer, Cham, 2018.  Second edition of [ MR1468735].
  * [26] Thibault Lefeuvre.  Tensor Tomography for Surfaces. 2018.  PhD thesis, Master thesis.
  * [27] Lauffenburger DA. Linderman JJ.  Analysis of intracellular receptor/ligand sorting. calculation of mean surface and bulk diffusion times within a sphere.  Biophys J., 50(2):295–305, 1986.
  * [28] Alan E. Lindsay, Andrew J. Bernoff, and Michael J. Ward.  First passage statistics for the capture of a Brownian particle by a structured spherical target with multiple surface traps.  Multiscale Model. Simul., 15(1):74–109, 2017.
  * [29] Alan E Lindsay, Ryan T Spoonmore, and Justin C Tzou.  Hybrid asymptotic-numerical approach for estimating first-passage-time densities of the two-dimensional narrow capture problem.  Physical Review E, 94(4):042418, 2016.
  * [30] Alan E Lindsay, JC Tzou, and Theodore Kolokolnikov.  Optimization of first passage times by multiple cooperating mobile traps.  Multiscale Modeling & Simulation, 15(2):920–947, 2017.
  * [31] Jacob B Madrid and Sean D Lawley.  Competition between slow and fast regimes for extreme first passage times of diffusion.  Journal of Physics A: Mathematical and Theoretical, 53(33):335002, 2020.
  * [32] Medet Nursultanov, William Trad, and Leo Tzou.  Narrow escape problem in the presence of the force field.  ARXIVMath Meth Appl Sci., pages 1–25, 2022.
  * [33] Medet Nursultanov, Justin C. Tzou, and Leo Tzou.  On the mean first arrival time of Brownian particles on Riemannian manifolds.  J. Math. Pures Appl. (9), 150:202–240, 2021.
  * [34] Samara Pillay, Michael Jeffrey Ward, Anthony Peirce, and Theodore Kolokolnikov.  An asymptotic analysis of the mean first passage time for narrow escape problems: Part I: Two-dimensional domains.  Multiscale Modeling & Simulation, 8(3):803–835, 2010.
  * [35] Wesley J. M. Ridgway and Alexei F. Cheviakov.  Locally and globally optimal configurations of $n$ particles on the sphere with applications in the narrow escape and narrow capture problems.  Phys. Rev. E, 100:042413, Oct 2019.
  * [36] Zeev Schuss, Amit Singer, and David Holcman.  The narrow escape problem for diffusion in cellular microdomains.  Proceedings of the National Academy of Sciences, 104(41):16098–16103, 2007.
  * [37] A. Singer, Z. Schuss, and D. Holcman.  Narrow escape, part iii: Non-smooth domains and riemann surfaces.  Journal of Statistical Physics, 122(3):491–509, Feb 2006.
  * [38] Amit Singer, Z Schuss, and D Holcman.  Narrow escape and leakage of Brownian particles.  Physical Review E, 78(5):051111, 2008.
  * [39] Amit Singer, Zeev Schuss, David Holcman, and Robert S Eisenberg.  Narrow escape, part i.  Journal of Statistical Physics, 122(3):437–463, 2006.
  * [40] Ronny Straube, Michael J. Ward, and Martin Falcke.  Reaction rate of small diffusing molecules on a cylindrical membrane.  J. Stat. Phys., 129(2):377–405, 2007.
  * [41] Michael E. Taylor.  Partial differential equations II. Qualitative studies of linear equations, volume 116 of Applied Mathematical Sciences.  Springer, New York, second edition, 2011.
  * [42] Michèle S. Titcombe and Michael J. Ward.  An asymptotic study of oxygen transport from multiple capillaries to skeletal muscle tissue.  SIAM J. Appl. Math., 60(5):1767–1788, 2000.
  * [43] Justin C Tzou and Theodore Kolokolnikov.  Mean first passage time for a small rotating trap inside a reflective disk.  Multiscale Modeling & Simulation, 13(1):231–255, 2015.
  * [44] Micheal J Ward and Joseph B Keller.  Strong localized perturbations of eigenvalue problems.  SIAM Journal on Applied Mathematics, 53(3):770–798, 1993.
  * [45] M W Wong.  An Introduction to Pseudo-Differential Operators.  WORLD SCIENTIFIC, 2nd edition, 1999.


# BabyBear: Cheap inference triage for expensive language models

Leila Khalili, Yao You, John Bohannon
Primer Technologies Inc.
San Francisco, California
<EMAIL_ADDRESS>

###### Abstract

Transformer language models provide superior accuracy over previous models but
they are computationally and environmentally expensive. Borrowing the concept
of model cascading from computer vision, we introduce BabyBear, a framework
for cascading models for natural language processing (NLP) tasks to minimize
cost. The core strategy is inference triage, exiting early when the least
expensive model in the cascade achieves a sufficiently high-confidence
prediction. We test BabyBear on several open source data sets related to
document classification and entity recognition. We find that for common NLP
tasks a high proportion of the inference load can be accomplished with cheap,
fast models that have learned by observing a deep learning model. This allows
us to reduce the compute cost of large-scale classification jobs by more than
50% while retaining overall accuracy. For named entity recognition, we save
33% of the deep learning compute while maintaining an F1 score higher than 95%
on the CoNLL benchmark.

##  1 Introduction

"If all you have is a hammer, everything looks like a nail." This proverb
describes a problem today for practitioners of Natural Language Processing
(NLP). Our hammer is the transformer language model: BERT and its many
descendants Devlin et al. (2018); Joshi et al. (2020); Liu et al. (2019).
Increasing the size, and thus cost, of these models continues in pursuit of
ever better performance Ghorbani et al. (2021).

So why not solve everything with language models? Increasing computational
complexity and memory consumption makes training these models harder and
limits their scaling. Encoding text as high-dimensional vectors that pass
through a neural network with hundreds of millions of parameters requires
specialized hardware (GPUs, TPUs) that rapidly drains both your budget and the
electrical grid Xu et al. (2018); Vaswani et al. (2017); Dozat and Manning
(2016). Moreover, they simply are not always required. Less complex models
like XGBoost or an LSTM are capable of solving portions of almost any given
NLP task as well as a transformer based model can. For example, in Turkish
sentiment analysis Kavi (2020) XGBoost can achieve 88% accuracy, suggesting
that 88% of the inference could be taken care of by XGBoost, leaving just 12%
for a deep learning model. The trick is the triage: How to identify those 88%
of data examples?

One strategy to reduce computation is to train a large model and then compress
it. An example is DistilBERT, a smaller, faster version of BERT which can be
fine-tuned. DistilBert has been found to be 60% faster with 97% of BERT’s
performance for some NLP tasks Sanh et al. (2019). However, DistilBERT is
still a GPU-hungry deep learning transformer model.

Another strategy is to bypass unnecessary computation by early exiting, in
which the inference is terminated when possible at an early layer of the
neural network itself. The early layers of BERT contain shallow features and
perform poorly compared to a fine-tuned BERT with the same reduced number of
layers Li et al. (2020). Accordingly, CascadeBERT Li et al. (2020) has been
proposed as a cascade of multiple BERT-like models arranged in increasing
depth of layers. TangoBERT Mamou et al. (2022) is closely related to
CascadeBERT but explores much smaller models such as distilled version of
RoBERTa. Both CascadeBERT and TangoBERT still require expensive GPU
computation due to their transformer architectures.

Our work uses a similar early exiting strategy, however we use the cheapest
options possible: Predictive models such as XGBoost that run on CPU at a
fraction of the cost and latency. The idea of BabyBear in a nutshell: For any
given task, the difficulty of data examples are not evenly distributed. To
take advantage of this, we place a faster, cheaper, less powerful model (the
"babybear") upstream of a slower, more expensive, more powerful model (the
"mamabear"). The babybear model learns from mamabear as oracle. All that you,
the human engineer, must do is choose a maximum accuracy cost you are willing
to pay for the BabyBear computation savings.

In this paper we introduce Babybear and apply it to several open source data
sets and measure its impact on computational cost. Our code is available on
github 111https://github.com/PrimerAI/primer-research/tree/main/babybear so
you can start saving too.

##  2 Methodology

For the BabyBear algorithm we denote an ensemble of classification models
$M_{m}$ where $m=\\{b,p\\}$. The babybear model $M_{b}$ is a simple
classification model or an ensemble of models such as logistic regression,
random forest, and XGBoost Brownlee (2016). The key requirement for the
babybear model is the output of its prediction must include a confidence
score. The mamabear model $M_{m}$ is the relatively more expensive and
accurate model for which babybear is performing inference triage. We treat the
predictions of mamabear as gold-labeled training data for babybear.

Algorithm 1 shows the procedure of inference triage where $x$ is the input
document and $t$ is the confidence threshold.

1

2inference-triage;

Input : Models($M_{m}$, $M_{b}$), threshold, input($x$)

Output : labels

3 if  _$M_{b}(x)$ > $t$_ then

4 return $M_{b}(x)$;

5

6else

7 return $M_{m}(x)$;

8

9 end if

Algorithm 1 Inference triage

Confidence Threshold. The first step to find $t$ is to choose a confidence
function. This function maps probability distribution of each data point to a
confidence measure. There are different methods to choose this confidence
function. For example maximum probability in the predicted distribution Huang
et al. (2017); Wang et al. (2020) or the gap between two top logits or entropy
of the distributions Streeter (2018). In this paper we choose maximum
probability for its simplicity. Confidence threshold is a value in $[0,1]$
that defines how confident $M_{b}$ must be to skip inference with $M_{m}$. The
algorithm for choosing this parameter is described in Algorithm 2. X is the
set of inputs $x_{j}$, $A_{f}$ is the minimum performance the user demands
from the final BabyBear system and $C$ is the confidence interval.

1 confidence-threshold;

Input : $X=\\{x_{j}\\}$, $A_{f}$, $C=\\{c_{j}\\}$

Output : t

2 for  _$c$ in C:_ do

3 $A\leftarrow$ performance on $X$ at each $c_{j}$;

4 if  _$A\approx A_{f}$ :_ then

5 Return $t\leftarrow c_{j}$

6 end if

7

8 end for

Algorithm 2 Finding confidence threshold

Higher threshold values mean that the babybear predictions are not trusted and
most of the documents are sent to mamabear. This will reduce the savings to
maintain performance. On the other hand, as the threshold approaches zero,
most documents are handled by babybear which reduces GPU run time.

###  2.1 Application examples

The general method described in section 2 can be applied to different problems
including classification and entity recognition tasks, relation extraction,
etc. In this paper we focus on classification and entity recognition. Applying
BabyBear on classification is very straightforward and can be followed as
algorithm 1. In the case of NER, the algorithm needs some modifications which
are described in the following section.

BabyBear on entity recognition. In typical English prose text, many sentences
contain no relevant entities. At the sentence level for the ncbi_disease data
set 1, 47% of sentences have no biomedical entities. Therefore, if we can
avoid sending these sentences to the mamabear model, we have the potential to
save about half of the computational cost.

(a)

(b)

Figure 1: Distribution of number of entities in each sentence in, top:
ncbi_disease with total number of 941 sentences, bottom: CoNLL data set with
total number of 3454 sentences.

Accordingly, we cast the entity recognition babybear task as binary
classification to identify two classes: sentences with "no-entities" and
sentences "with entity". (For class "with-entity" there exists at least one
entity). In the rest of our paper we refer to this method as EntityBear. In
this scenario, high-confidence documents are identified as class "no-entity"
and have $P_{b}(x)>t$. Unlike classification tasks in which the savings are
associated with the high-confidence documents, in EntityBear the savings
derive from the "no-entity" text we spare mamabear from seeing. Only "with-
entity" text is sent to mamabear. Therefore, it is expected that the savings
for EntityBear on entity recognition tasks will be lower than those for
BabyBear on classification tasks.

We also expanded the EntityBear paradigm into a cascade of multiple BabyBear
models. These BabyBear models are EntityBear and DistilBear. We applied this
to the CoNLL data set Sang and De Meulder (2003) .

The text input for both CoNLL and ncbi_disease are single-sentence length, so
documents must be split into sentences during pre-processing. The sentences
classified "with-entities", are joined back together to form a document and
passed to mamabear to extract entities.

##  3 Implementation and Experimental Setting

###  3.1 Tasks

We conducted experiments on two text classification tasks (emotion
recognition, sentiment analysis) and two entity recognition tasks
(ncbi_disease and CoNLL). See details below.

Classification: Emotion Recognition. This task consists of recognizing
emotions expressed on Twitter. We used the data set from Saravia et al. (2018)
which is English Twitter messages with six basic emotions: anger, fear, joy,
love, sadness, and surprise. These emotions are classified as classes from 0
to 5 respectively. This pipeline will download and cache a pretrained model
bhadresh-savani/bert-base-uncased-emotion 222https://huggingface.co/bhadresh-
savani/bert-base-uncased-emotion as the mamabear model.

Classification: Sentiment Analysis. The goal of sentiment analysis is to
recognize if a tweet is positive, negative or neutral. We used the Semeval2017
data set from Rosenthal et al. (2019) which includes data from previous runs
(2013, 2014, 2015, and 2016) of the same SemEval task. The mamabear model is
the pretrained model cardiffnlp/twitter-roberta-base-sentiment-latest
333https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest
from huggingface.

Entity recognition: ncbi_disease. The ncbi_data set is taken from Doğan et al.
(2014). It contains the disease name and concept annotations of the NCBI
disease corpus, a collection of 793 PubMed abstracts fully annotated at the
mention and concept level to serve as a research resource for the biomedical
natural language processing community. In this data set tag 0 indicates no
disease mentioned, 1 signals the first token of a disease, and 2 the
subsequent disease tokens. fidukm34/biobert_v1.1_pubmed-finetuned-ner-
finetuned-ner 444https://huggingface.co/fidukm34/biobert_v1.1_pubmed-
finetuned-ner-finetuned-ner is the mamabear model used for this data set.

Entity recognition: CoNLL. The CoNLL-2003 data set Sang and De Meulder (2003)
classifies four types of named entities: person, location, organization, and
miscellaneous named entities that do not belong to the previous three groups.
Here the mamabear model is dslim/bert-base-NER
555https://huggingface.co/dslim/bert-base-NER and the DistilBERT model is
gunghio/distilbert-base-multilingual-cased-finetuned-conll2003-ner
666https://huggingface.co/gunghio/distilbert-base-multilingual
-cased-finetuned-conll2003-ner?text=U.S+is+a+country.

###  3.2 Experiment Results

We applied inference triage to the data sets mentioned in section 3.1. For the
classification tasks we used XGBoost Brownlee (2016) as babybear and Universal
Sentence Encoder Cer et al. (2018) as its embedding method. The code was run
on a GPU instance of g4dn.2xlarge on Amazon Web Services (AWS).

The data set statistics are summarized in table 1. After training the babybear
model, we applied algorithm 2 on validation data set to find confidence
threshold, $t$. The performance threshold is defined as minimum accuracy of
${A_{f}=0.9}$ for classification task and ${A_{f}=0.99}$ for entity
recognition tasks on the test data set. For the values of confidence
threshold, saving and accuracy on test data set please refer to 1. Saving is
the percentage of input data that are evaluated using the BabyBear model and
are not sent to mamabear model.

Name | #labels | Train(K) | Val.(K) | Test(K) | Threshold | Saving | Accuracy
---|---|---|---|---|---|---|---
| Emotion Recognition
---
6 | 11.2 | 4.8 | 2 | .825 | 64.6 | 86.9
| Sentiment Analysis
---
3 | 7 | 3 | 3 | .825 | 28.5 | 95.9
ncbi_disease | - | 5.4 | .9 | .9 | .785 | 9.6 | 99.2
CoNLL | - | 7 | 3 | 3.4 | .978 | 18.3 | 97.8
Table 1: Values of threshold, % saving and accuracy for different data sets.

####  3.2.1 Classification

Emotion. Figure 2a shows the saving and accuracy as a function of threshold
$t$. For the chosen value of threshold $t$, over 64% of documents are
classified using the babybear model and the rest using the mamabear model. The
overall accuracy of the inference triage model is 87%. Figure 2b shows the
accuracy as a function of GPU run time. Each data point corresponds to a value
of $t$.

(a)

(b)

Figure 2: Experiment on emotion data set. top: Accuracy and saving as a
function of confidence threshold, bottom: Accuracy as a function of GPU run
time for different values of confidence threshold.

Running the entire data set on GPU with mamabear takes 20.76 mins, while
applying BabyBear reduces the run time to 7.39 mins, a savings of 64%. 2a).

Sentiment Analysis Confidence threshold for this data set is $t=0.825$. About
28% of the documents are processed by babybear with a system accuracy of 96%.
The savings with an accuracy closer to 90% ($t=.725$) is about 50%.

(a)

(b)

Figure 3: Experiment on sentiment analysis. top: Accuracy and saving as a
function of confidence threshold, bottom: Performance as a function of GPU run
time for different values of confidence threshold.

Maximum time is 31.35 min with mamabear alone which is reduced to 22.48 min
after applying BabyBear, about 39% savings of time. In this data set there is
a difference between the savings in figure 3 (top) and the time saving in 3
(bottom). The reason is that the computational cost of each document is
different.

####  3.2.2 Entity Recognition

Table 1 shows that savings for the entity recognition tasks are less than
those for classification tasks. The maximum possible savings in classification
is 100% of documents, while in entity recognition the maximum possible savings
are defined by the ratio of "no-entity" versus "with-entity" in the text.
Based on table 1 the maximum savings is 47% and 18% for ncbi_disease and
CoNLL, respectively.

ncbi_disease. Figure 4 shows the performance and saving as a function of $t$.
As it can be seen the saving is about 18% with $t=.978$.

(a)  Figure 4:  Performance and saving as a function of confidence threshold
on ncbi_disease data set.

In this data set GPU run time savings is about 17% which is very close to the
maximum possible savings ( 18% saving shown in top figure 4). Since all of the
documents confidently predicted to be class "with-entity" are sent to
mamabear, all of the 18% saving of GPU run time are from class "no-entity".
The accuracy of the babybear model limits the achievable savings from
inference triage for this task. About half of the documents could be
classified as "no-entity" and spared from mamabear. Increasing the babybear
model’s accuracy is key to improving the savings.

CoNLL. In this data set 645 documents out of 3453 have "no-entity" which is
around 19% of all the input data. This is the upper bound on savings. In this
data set we save over 9.7% of GPU run time which is very close to the
percentage of documents not sent to mamabear (9.6% saving). Therefore, we are
saving on 9% of class "no-entity" which is close to half of the maximum
possible saving.

GPU run time as figure 5a shows has greater fluctuation compared to the
classification tasks e.g. figures 5b.

(a)

(b)

Figure 5: top: GPU run time at different confidence threhsold, bottom:
Distribution of GPU run time of entity recognition model for CoNLL data set on
100 data set ( $\sigma=.15$ and $\mu=1.26$)

The higher fluctuation in GPU run time for this data set is related to the
high variance of mamabear run time. As an example run time of 100 documents
running 200 times shows a noticeable variance.

DistilBear. In the previous section we applied a simple babybear model on
different data sets. For complicated problems like entity recognition, this
algorithm can be expanded into a cascade of multiple babybear models. Maximum
saving using the proposed entity recognition model (EntityBear) is limited to
the maximum number of "no-entity" sentences. Here we proposed a combination of
multiple babybear models. This algorithm is shown in figure 6.

(a)

(b)

Figure 6: top: DistilBear architecture. Input documents are first processed by
EntityBear model. If document is identified as "with-entity" it will predicted
by DistilBERT model. Otherwise, the more accurate final BERT model processes
the document and produces the final prediction. Bottom: Performance and saving
of DistilBear model on CoNLL data set.

EntityBear uses the model trained in section 3.2.2. DistilBear uses a binary
classification model trained on labels 0 and 1. Label "1" is assigned when
DistilBERT model can correctly predict the entities in a sentence. Sentences
predicted as class 0 will be sent to the BERT model. DistilBear is trained on
2000 data examples using an XGBoost classifier. This algorithm is applied on
2000 data examples. EntityBear saves 341 documents, while the rest are sent to
DistilBear, the mamabear. Figure 6 shows the performance of DistilBear for
different threshold values. For high values of threshold, saving in limited to
the savings on EntityBear. However for $t=.9$ by holding F1 score over than
95% we can get to savings of 33% which is higher than the potential saving in
EntityBear model.

##  4 Conclusion

In this paper, we propose an inference triage framework, BabyBear, with the
goal of accelerating the inference time for NLP tasks and reducing the cost of
inference. Inference triage achieves those goals by using much less expensive
models that run on CPU for the subset of tasks that they can confidently
handle. Conventional (non-deep) machine learning models are shown to be
adequate for a large proportion of inference examples for both classification
and entity recognition tasks. A deep learning language model is only applied
when the triage algorithm invokes it.

Our experimental results on two classification data sets (emotion recognition,
sentiment analysis) and two entity recognition data sets (CoNLL, ncbi_disease)
demonstrate substantial savings on inference time without significantly
sacrificing performance. This algorithm reduced GPU run time for
classification tasks by up to 64% while maintaining accuracy over 90%.

We also explored variations on the BabyBear framework, expanding it into a
cascade of multiple babybear models and applying it to entity recognition
tasks. For the CoNLL data set, we maintained a 95% of F1 score while reducing
the GPU run time by 33%.

We should stop using transformer language models as the only tool in our NLP
toolkit. Let BabyBear help out.

##  5 Appendices

## Acknowledgements

We thank Oleg Vasilyev and Jake Asquith for review of the paper and valuable
feedback.

## References

  * Brownlee (2016) Jason Brownlee. 2016.  _XGBoost With python: Gradient boosted trees with XGBoost and scikit-learn_.  Machine Learning Mastery.
  * Cer et al. (2018) Daniel Cer, Yinfei Yang, Sheng-yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St John, Noah Constant, Mario Guajardo-Cespedes, Steve Yuan, Chris Tar, et al. 2018\.  Universal sentence encoder.  _arXiv preprint arXiv:1803.11175_.
  * Devlin et al. (2018) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018.  Bert: Pre-training of deep bidirectional transformers for language understanding.  _arXiv preprint arXiv:1810.04805_.
  * Doğan et al. (2014) Rezarta Islamaj Doğan, Robert Leaman, and Zhiyong Lu. 2014.  Ncbi disease corpus: a resource for disease name recognition and concept normalization.  _Journal of biomedical informatics_ , 47:1–10.
  * Dozat and Manning (2016) Timothy Dozat and Christopher D Manning. 2016.  Deep biaffine attention for neural dependency parsing.  _arXiv preprint arXiv:1611.01734_.
  * Ghorbani et al. (2021) Behrooz Ghorbani, Orhan Firat, Markus Freitag, Ankur Bapna, Maxim Krikun, Xavier Garcia, Ciprian Chelba, and Colin Cherry. 2021.  Scaling laws for neural machine translation.  _arXiv preprint arXiv:2109.07740_.
  * Huang et al. (2017) Gao Huang, Danlu Chen, Tianhong Li, Felix Wu, Laurens van der Maaten, and Kilian Q Weinberger. 2017.  Multi-scale dense networks for resource efficient image classification.  _arXiv preprint arXiv:1703.09844_.
  * Joshi et al. (2020) Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S Weld, Luke Zettlemoyer, and Omer Levy. 2020.  Spanbert: Improving pre-training by representing and predicting spans.  _Transactions of the Association for Computational Linguistics_ , 8:64–77.
  * Kavi (2020) Deniz Kavi. 2020.  Turkish text classification: From lexicon analysis to bidirectional transformer.  _arXiv preprint arXiv:2104.11642_.
  * Li et al. (2020) Lei Li, Yankai Lin, Deli Chen, Shuhuai Ren, Peng Li, Jie Zhou, and Xu Sun. 2020\.  Cascadebert: Accelerating inference of pre-trained language models via calibrated complete models cascade.  _arXiv preprint arXiv:2012.14682_.
  * Liu et al. (2019) Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.  Roberta: A robustly optimized bert pretraining approach.  _arXiv preprint arXiv:1907.11692_.
  * Mamou et al. (2022) Jonathan Mamou, Oren Pereg, Moshe Wasserblat, and Roy Schwartz. 2022.  Tangobert: Reducing inference cost by using cascaded architecture.  _arXiv preprint arXiv:2204.06271_.
  * Rosenthal et al. (2019) Sara Rosenthal, Noura Farra, and Preslav Nakov. 2019.  Semeval-2017 task 4: Sentiment analysis in twitter.  _arXiv preprint arXiv:1912.00741_.
  * Sang and De Meulder (2003) Erik F Sang and Fien De Meulder. 2003.  Introduction to the conll-2003 shared task: Language-independent named entity recognition.  _arXiv preprint cs/0306050_.
  * Sanh et al. (2019) Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. 2019.  Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter.  _arXiv preprint arXiv:1910.01108_.
  * Saravia et al. (2018) Elvis Saravia, Hsien-Chi Toby Liu, Yen-Hao Huang, Junlin Wu, and Yi-Shin Chen. 2018\.  Carer: Contextualized affect representations for emotion recognition.  In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing_ , pages 3687–3697.
  * Streeter (2018) Matthew Streeter. 2018.  Approximation algorithms for cascading prediction models.  In _International Conference on Machine Learning_ , pages 4752–4760. PMLR.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017.  Attention is all you need.  In _Advances in neural information processing systems_ , pages 5998–6008.
  * Wang et al. (2020) Xiaofang Wang, Dan Kondratyuk, Eric Christiansen, Kris M. Kitani, Yair Alon, and Elad Eban. 2020.  Wisdom of committees: An overlooked approach to faster and more accurate models.
  * Xu et al. (2018) Xiaowei Xu, Yukun Ding, Sharon Xiaobo Hu, Michael Niemier, Jason Cong, Yu Hu, and Yiyu Shi. 2018.  Scaling for edge inference of deep neural networks.  _Nature Electronics_ , 1(4):216–222.