Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.
Bias correction for Chatterjee's graph-based correlation coefficient
{5pt}
{5pt}
{5pt}
{5pt}
\hypersetup{colorlinks,breaklinks,urlcolor=blue,linkcolor=blue}
abstractAzadkia21simple recently introduced a simple nearest neighbor (NN) graph-based correlation coefficient that consistently detects both independence and functional dependence. Specifically, it approximates a measure of dependence that equals 0 if and only if the variables are independent, and 1 if and only if they are functionally dependent. However, this NN estimator includes a bias term that may vanish at a rate slower than root-$n$, preventing root-$n$ consistency in general. In this article, we (i) analyze this bias term closely and show that it could become asymptotically negligible when the dimension is smaller than four; and (ii) propose a bias-correction procedure for more general settings. In both regimes, we obtain estimators (either the original or the bias-corrected version) that are root-$n$ consistent and asymptotically normal.
{\bf Keywords}: measure of dependence, nearest neighbor graph, graph-based statistics, regression adjustment, nonparametric ridge regression.
Introduction
Sourav Chatterjee, in his groundbreaking paper chatterjee2020new, introduced a novel and elegant approach to estimating the dependence measure of MR3024030. This measure captures both independence and perfect functional dependence: it equals 0 if and only if the two random scalars are independent, and 1 if and only if one is a measurable function of the other almost surely. Chatterjee’s work led to a new rank-based statistic, now widely known as Chatterjee’s rank correlation.
Among the notable extensions of this work is the contribution by Azadkia21simple, who generalized Chatterjee’s rank correlation to multivariate settings through a sophisticated integration of rank statistics and nearest neighbor (NN) graphs. However, unlike Chatterjee’s original rank correlation—which has been shown to be root-$n$ consistent and asymptotically normal under broad conditions lin2022limit,kroll2024asymptotic—the NN-based correlation coefficient of Azadkia21simple suffers from a bias term that may decay at a rate slower than root-$n$, rendering the estimator not root-$n$ consistent in general.
This article examines the bias of the NN-based correlation coefficient in greater depth and contributes in two main directions. First, building on the thought-provoking work of viel2025convergenceratenearestneighbour, which analyzed the bias of another NN-based estimator in causal inference, we show that the bias of the NN-based correlation coefficient could become asymptotically negligible when the dimension $d \le 3$. This finding advances the current understanding, which establishes analogous asymptotic negligibility only in the univariate case $d=1$.
Second, for more general scenarios in which the bias may no longer be ignorable, we propose a regression-adjustment technique and derive the large-sample properties of the resulting bias-corrected estimator of Chatterjee’s NN graph-based correlation coefficient. Our approach is inspired, once again, by related developments in causal inference, including the influential ideas of rubin1973use and the theoretical foundations laid out in abadie2011bias, lin2021estimation, lin2022regression, and cattaneo2024rosenbaum. Leveraging these insights, we develop a new theory for nonparametric ridge regression and demonstrate that the proposed correction can asymptotically eliminate the bias of the original NN estimator, thereby restoring root-$n$ consistency without affecting the limiting variance.
In both directions, the original NN-based estimator of Azadkia21simple (when $d \le 3$) and the newly proposed bias-corrected estimator (for more general settings) share the same attractive property: each achieves root-$n$ consistency and asymptotic normality with an identical limiting variance, regardless of the dimensionality of the covariates. This robustness allows seamless integration with both analytical variance estimators lin2022limit and bootstrap-based procedures dette2025simple, thereby facilitating valid inference.
{\bf Notation.} In the following, for any two real numbers $a, b$, we write $a \wedge b := \min\{a,b\}$ and $a \vee b := \max\{a,b\}$. For any two real sequences $\{a_n\}_{n\geq 1}$ and $\{b_n\}_{n\geq 1}$, we denote $a_n= O(b_n)$ (or equivalently, $a_n\lesssim b_n$) if there exists a constant $C>0$ such that $|a_n|\le C|b_n|$ for all sufficiently large $n$, and $a_n= o(b_n)$ if $|a_n|/|b_n|\to 0$ as $n\to \infty$. For any two real sequences $\{a_n\}, \{b_n\}$, we write $a_n \asymp b_n$ if both $a_n\lesssim b_n$ and $b_n\lesssim a_n$ hold true. We write $O_{\mathrm{P}}$ and $o_{\mathrm{P}}$ if $O(\cdot)$ and $o(\cdot)$ hold in probability, respectively.
Chatterjee's NN graph-based correlation coefficient
We begin with a brief review of the current understanding of Azadkia21simple's NN graph-based correlation coefficient. Consider $(X,Y) \in \mathbb{R}^d \times \mathbb{R}$ to be a pair of random variables. To quantify the strength of dependence between $X$ and $Y$, MR3024030 introduced the following population quantity, now referred to as the Dette–Siburg–Stoimenov dependence measure:
\[
T = T(Y,X) := \frac{\int \mathrm{Var}\big(\mathrm{E}[\mathbbm{1}(Y \geq t) \mid X]\big) \mathrm{d} \mu(t)}{\int \mathrm{Var}\big(\mathbbm{1}(Y \geq t)\big) \mathrm{d} \mu(t)},
\]
where $\mu$ denotes the law of $Y$ and $\mathbbm{1}(\cdot)$ is the indicator function. As shown in MR3024030 and further developed in Azadkia21simple, $T$ satisfies the desirable properties of being
enumerate[itemsep=-.5ex,label=(\roman*)]
• $T = 0$ if and only if $Y$ is independent of $X$;
• $T = 1$ if and only if $Y$ is a measurable function of $X$ almost surely.
Let $(X_1,Y_1),\ldots,(X_n, Y_n)$ be the sample. For each $i \in [n] := \{1,2,\ldots,n\}$, define
\[
R_i := \sum_{j=1}^n \mathbbm{1}(Y_j \leq Y_i), \quad \text{and} \quad N_i := \argmin_{j \ne i} \|X_i - X_j\|,
\]
where $R_i$ is the rank of $Y_i$ among $\{Y_1, \ldots, Y_n\}$ and $N_i$ indexes the nearest neighbor (NN) of $X_i$ under the Euclidean metric, $\|\cdot\|$. To estimate $T$ based on the sample $\{(X_i, Y_i)\}_{i=1}^n$, Azadkia21simple proposed the following NN-based rank correlation coefficient:
\[
\hat T_n = \hat{T}_n(Y,X) := \frac{6}{n^2 - 1} \sum_{i=1}^n \min\big\{R_i, R_{N(i)}\big\} - \frac{2n + 1}{n - 1}.
\]
The asymptotic properties of $\hat T_n$ are summarized in the following theorem under the following assumption of the data generating scheme.
assumption$(X,Y), (X_1,Y_1),\ldots, (X_n,Y_n)$ are independently sampled from a fixed and continuous cumulative distribution function (CDF) $F_{X,Y}$.
theoremAssume Assumption (ref).
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• Azadkia21simple: $\hat T_n$ converges almost surely to $T$.
• deb2020kernel and shi2021ac: under the assumption that $X$ and $Y$ are independent and $X$ is absolutely continuous, $n^{1/2} \hat T_n$ converges in distribution to a normal distribution with mean zero and a distribution-free variance.
• lin2022limit: under the assumption that $Y$ is not a measurable function of $X$ almost surely, we have
\[
\frac{\hat T_n - \mathrm{E}[\hat T_n]}{\sqrt{\mathrm{Var}[\hat T_n]}} \longrightarrow N(0,1) \quad \text{in distribution}.
\]
• Azadkia21simple and lin2022limit: suppose there exist constants $\beta, C, C_1, C_2 > 0$ such that for all $t \in \bR$ and $x, x' \in \bR^d$,
\begin{align*}
&\Big| \mathrm{P}(Y \ge t \mid X = x) - \mathrm{P}(Y \ge t \mid X = x') \Big| \le C\big(1 + \|x\|^\beta + \|x'\|^\beta\big)\|x - x'\|, \\
and \quad &\mathrm{P}(\|X\| \ge t) \le C_1 e^{-C_2 t},
\end{align*}
then
\[
\mathrm{E}[\hat T_n] - T = O\left( \frac{(\log n)^{d + \beta + 1 + \ind(d=1)}}{n^{1/d}} \right).
\]
• lin2022limit: the limit of $n \mathrm{Var}(\hat T_n)$ exists, is finite, and equals zero if and only if $Y$ is a measurable function of $X$ almost surely.
• lin2022limit and dette2025simple: consistent estimators of the limiting variance $n \mathrm{Var}(\hat T_n)$ exist.
\end{enumerate}
Theorem (ref) characterizes the asymptotic behavior of $\hat T_n$. In particular, Part (ref) highlights the main obstacle preventing $\hat T_n$ from achieving root-$n$ consistency: the presence of a theoretically non-negligible bias term. This is not unexpected for researchers familiar with NN-based statistics. Indeed, bias correction has played a central role in related areas such as NN graph-based estimation for causal inference abadie2011bias, lin2021estimation and entropy estimation MR3909934. In the next section, we will present our approach to addressing this final gap for $\hat T_n$.
Beyond the above theoretical results, it is worth acknowledging ongoing efforts in this research direction, including deeper investigations of $T$ bucher2024lack, further analyses of $\hat T_n$ shi2020power, bickel2022measures, lin2024failure, han2024azadkia, auddy2021exact, zhang2024asymptotic, exploration of new dependence measures satisfying the defining properties of $T$ griessenberger2022multivariate, ansari2025directextensionazadkia, strothmann2024rearranged, azadkia2025new, and extensions of $\hat T_n$-type ideas to broader statistical contexts huang2020kernel, azadkia2021fast, gamboa2022global, ansari2023quantifying, gao2024family, fuchs2024quantifying, tran2024rank, zhang2025extensions. More recent developments include zhou2025association and olivares2025powerful. For broader overviews and related perspectives, we refer the reader to the surveys conducted by han2021extensions and chatterjee2022survey.
Bias analysis
We begin with a closer analysis of the bias of $\hat T_n$. To this end, we first recall the closed-form expression for the bias term $\mathrm{E}[\hat T_n]-T$, as derived in lin2022limit.
lemma[Equation (3.1), lin2022limit]
Assume Assumption (ref). Then
\begin{align}
\mathrm{E}[\hat T_n] - T =&\
6\left\{
\mathrm{E}\left[\mathbbm{1}\left(Y_2 \le Y_1 \wedge Y_{N(1)}\right)\right]
- \mathrm{E}\left[\mathbbm{1}\left(Y_2 \le Y_1 \wedge \tilde{Y}_1\right)\right]
\right\} \notag\\
&- \frac{6}{n+1}\,\mathrm{E}\left[\mathbbm{1}\left(Y_2 \le Y_1 \wedge Y_{N(1)}\right)\right]
+ \frac{6n}{n^2-1}\,\mathrm{E}\left[\mathbbm{1}\left(Y_1 \le Y_1 \wedge Y_{N(1)}\right)\right]
- \frac{3}{n-1},
\end{align}
where $\tilde Y_1$ is an independent sample from the conditional distribution of $Y$ given $X=X_1$.
Define the leading bias term in (ref) by
\[
L \coloneqq
\mathrm{E}\Big[\mathbbm{1}\!\big(Y_2 \le Y_1 \wedge Y_{N(1)}\big)\Big]
-
\mathrm{E}\Big[\mathbbm{1}\!\big(Y_2 \le Y_1 \wedge \tilde Y_1\big)\Big].
\]
Lemma (ref) then directly yields
\[
\mathrm{E}[\hat T_n] - T = 6L + O(n^{-1}).
\]
Thus, analyzing the bias reduces to understanding the behavior of $L$.
To this end, introduce the conditional mean function
\[
G_{x}(t) \coloneqq \mathrm{E}\big[\mathbbm{1}(Y \ge t)\mid X=x\big].
\]
A simple calculation shows that
\[
L
= \mathrm{E}\!\Big[F_Y\!\big(Y_1 \wedge Y_{N(1)}\big) - F_Y\!\big(Y_1 \wedge \tilde Y_1\big)\Big]
= \int \mathrm{E}\!\left[G_{X_1}(t)\,G_{X_{N(1)}}(t) - G_{X_1}^2(t)\right] \mathrm{d}\mu(t),
\]
highlighting the central role played by the conditional mean function $G_x(\cdot)$ in the analysis of $\mathrm{E}[\hat T_n]-T$. This is a key insight already emphasized in the original paper Azadkia21simple.
Equation (ref) is a classical representation of the bias of NN-based functional estimators. As shown in Azadkia21simple (cf.\ Theorem (ref)(ref)), a direct analysis of (ref) implies that the resulting estimator converges at a rate slower than $n^{-1/2}$ whenever $d \ge 2$. In the broader literature, singh2016finite were the first to suggest that such functional NN estimators may nevertheless achieve parametric convergence rates in multivariate settings, provided the underlying density is sufficiently smooth, even though the NN density estimator itself generally does not adapt automatically to such smoothness zhao2022analysis. Subsequently, and more closely related to our work, viel2025convergenceratenearestneighbour analyzed the bias of an NN-based estimator in causal inference and demonstrated that the phenomenon identified by singh2016finite extends to this class of NN estimators as well.
In this section, we follow the argument of viel2025convergenceratenearestneighbour and show that the bias term in (ref) can also be asymptotically negligible. To prepare for the analysis, we introduce some additional notation. For a twice continuously differentiable function
\[
f: U \to \mathbb{R}, \qquad U \subseteq \mathbb{R}^d \ \text{open},
\]
we denote its gradient and Hessian at $x$ by $\nabla f(x)$ and $\nabla^{2} f(x)$, respectively. Let $\mathcal{X} \coloneqq {\rm supp}(X)$ denote the support of $X$, and define
\[
\delta(x) \coloneqq
cases\mathrm{dist}(x,\partial \mathcal{X}), & if x \in \mathcal{X},\\[3pt]
-\mathrm{dist}(x,\partial \mathcal{X}), & if x \notin \mathcal{X},
\]
where
\[
\mathrm{dist}(x,\partial \mathcal{X})
= \inf_{z \in \partial \mathcal{X}} \|x - z\|
\]
denotes the Euclidean distance from $x$ to the boundary $\partial \mathcal{X}$ of $\mathcal{X}$. Finally, for any positive integer $b$, we use $\mathcal{H}^b$ to denote the $b$-dimensional Hausdorff measure.
The following assumption regulates the behavior of $X$ and imposes smoothness conditions on the conditional mean function $G_x(t)$ with respect to $x$. Similar conditions appear in viel2025convergenceratenearestneighbour.
assumptionLet $\mathcal{X} \coloneqq {\rm supp}(X) \subseteq \mathbb{R}^d$. We assume:
\begin{assparts}[label=(\roman*),ref=\theassumption-(\roman*),itemsep=0pt]
• For every $t \in {\rm supp}(\mu)$, there exists a twice continuously differentiable function
\[
\tilde G_{\cdot}(t): \mathbb{R}^d \to [0,1]
\]
such that $\tilde G_{\cdot}(t) = G_{\cdot}(t)$ on $\mathcal{X}$, and
\[
\sup_{t \in {\rm supp}(\mu),\, x' \in \mathbb{R}^d}
\Big( \|\nabla_x \tilde G_{x'}(t)\| + \|\nabla_x^2 \tilde G_{x'}(t)\|_2 \Big) < \infty,
\]
where $\|\cdot\|_2$ denotes the matrix spectral norm.
• $X$ admits a Lebesgue density $f_X$ satisfying
\[
\inf_{x \in \mathcal{X}} f_X(x) \ge \mathfrak{p} > 0
\]
for some constant $\mathfrak{p}$, and $f_X$ is Lipschitz continuous on $\mathcal{X}$.
• $\mathcal{X}$ is compact.
• $\mathcal{X}$ has a Lipschitz boundary Grisvard11Elliptic_nonsmooth_domains.\footnote{Note that if $\emptyset \ne\mathring{\mathcal{X}}$ (the interior of $\mathcal{X}$) is bounded and convex, then $\mathcal{X}$ has a Lipschitz boundary; cf.\ Grisvard11Elliptic_nonsmooth_domains.}
\end{assparts}
Assumption (ref) yields the following result, which establishes the asymptotic negligibility of the bias even when $d>1$.
theorem[Bias rate]
Assume Assumptions (ref) and (ref). Then, as $n \to \infty$,
\[
\mathrm{E}[\hat{T}_n] - T = O\big(n^{-2/d} + n^{-1}\big).
\]
Consequently, whenever $d \le 3$,
\begin{align}
n^{1/2}(\hat T_n - T) \;\to\; N(0,\sigma_T^2)
\quad in distribution,
\end{align}
where $\sigma_T^2$ is the asymptotic variance of $\hat T_n$ as given in lin2022limit.
Theorem (ref) provides a convergence rate for $\mathrm{E}[\hat{T}_n]-T$ that is typically sufficient for establishing the central limit theorem (ref). In particular, it shows that—under the stated conditions—the bias is $o(n^{-1/2})$ whenever $d \le 3$. Under additional smoothness assumptions, however, one can derive a more refined expansion of the bias and show that the above rate is, in general, unimprovable and therefore sharp. Such refinements follow from a higher-order expansion of the bias term, paralleling the arguments of viel2025convergenceratenearestneighbour.
assumptionWe assume the following is true.
\begin{assparts}[label=(\roman*),ref=\theassumption-(\roman*),itemsep=0pt]
• There exists a continuously differentiable function
\[
\tilde f_X : \mathbb{R}^d \to [0,\infty)
\]
such that $\tilde f_X(x) = f_X(x)$ for all $x \in \mathcal{X}$, and $\tilde f_X$ is $C^{1}$ on $\mathbb{R}^d$. Moreover, there exists $\alpha \in (0,1)$ such that
\[
\|\nabla \tilde f_X\|_{C^{0,\alpha}(\mathcal{X})}
\coloneqq
\sup_{x \neq y \in \mathcal{X}}
\frac{\|\nabla \tilde f_X(x) - \nabla \tilde f_X(y)\|}{\|x - y\|^{\alpha}}
< \infty.
\]
• There exists $\beta \in (0,1)$ such that the function $\tilde G$ in Assumption (ref) further satisfies
\[
\sup_{t \in {\rm supp}(\mu)}
\Big(
\sup_{x'} \|\nabla_x \tilde G_{x'}(t)\|
+ \sup_{x'} \|\nabla_x^{2} \tilde G_{x'}(t)\|_2
+ \|\nabla_x^{2} \tilde G_{\cdot}(t)\|_{C^{0,\beta}(\mathcal{X})}
\Big)
< \infty.
\]
• $\mathcal{X}$ has a $C^{2}$ boundary Grisvard11Elliptic_nonsmooth_domains.
\end{assparts}
theorem[Bias expansion]
Assume Assumptions (ref), (ref), and (ref). We then have, as $n\to \infty$,
\[
\mathrm{E}[\hat{T}_n]-T=(\mathfrak{C}_1+\mathfrak{C}_3) n^{-\frac{2}{d}}+\mathfrak{C}_2 n^{-1}+o(n^{-\frac{2}{d}}+n^{-1}),
\]
where
\[
\begin{aligned}
\mathfrak{C}_1&:=-6\Gamma(1+2/d)v_d^{-\frac{2}{d}}\int_\mathcal{X} f_X(x)^{1-\frac{2}{d}}d^{-1}\big(\nabla \log f_X(x)\cdot \mathfrak{A}(x)+\frac{1}{2}\mathrm{Tr}(\mathfrak{B}(x))\big)\mathrm{d} x,\\
\mathfrak{A}(x)&:=\int G_x(t)\nabla_x G_x(t)\mathrm{d} \mu(t), \quad \quad \mathfrak{B}(x):=\int G_x(t)\nabla_x^2 G_x(t)\mathrm{d} \mu(t),\\
\mathfrak{C}_2&:=-6\int \mathrm{E}\big[G_X(t)^2\big]\mathrm{d} \mu(t),\\
\mathfrak{C}_3&:=-3(2^{2/d}-1)v_d^{-2/d}\Gamma(1+2/d)\int_{\partial \mathcal{X}} f_X(y)^{1-2/d}\mathfrak{G}(y)\mathrm{d} \mathcal{H}^{d-1}(y),\\
\mathfrak{G}(x)&:=\int \big(\nabla\delta(x)\cdot \nabla_xG_x(z)\big)G_x(z)\mathrm{d} \mu(z),
\end{aligned}
\]
where $v_d$ denotes the volume of Euclidean unit ball in $\mathbb{R}^d$ and $\mathrm{Tr}(\cdot)$ outputs the trace of the input matrix.
Bias correction
Method
Section (ref) outlines the landscape of the bias of $\hat T_n$ and provides both positive and negative insights. On the positive side, Theorem (ref) shows that the bias is asymptotically negligible whenever $d \le 3$. On the other hand, Theorem (ref) demonstrates that, in general, the bias cannot converge at a rate faster than that established in Theorem (ref). Consequently, a bias correction becomes necessary whenever $d \ge 4$.
As a matter of fact, Lemma (ref) naturally motivates a bias-corrected version of $\hat T_n$. Recall that
\[
\mathrm{E}[\hat T_n] - T = 6L + O(n^{-1}).
\]
To obtain a root-$n$ consistent estimator of $T$, it suffices to construct an estimator $\hat L_n$ such that
\[
\hat L_n - L = o_{\mathrm{P}}(n^{-1/2}),
\]
in which case
\[
n^{1/2}(\hat T_n - 6\hat L_n - T)
= n^{1/2}(\hat T_n - \mathrm{E}[\hat T_n]) + o_{\mathrm{P}}(1).
\]
Toward this goal, recall that
\[
L
= \mathrm{E}\!\left[F_Y\!\big(Y_1 \wedge Y_{N(1)}\big) - F_Y\!\big(Y_1 \wedge \tilde Y_1\big)\right]
= \int \mathrm{E}\!\left[G_{X_1}(t)\, G_{X_{N(1)}}(t) - G_{X_1}^2(t)\right] \mathrm{d} \mu(t),
\]
suggesting that a natural estimator of $L$ may be obtained by replacing the integral, expectations, and the conditional mean function $G_x(\cdot)$ with their empirical counterparts.
The procedure then proceeds as follows.
enumerate[itemsep=-.5ex,label=(\roman*)]
• We use the full data to estimate the {\it bivariate regression function} $G_x(\cdot)$, yielding an estimator $\hat G_x(\cdot)$, and to approximate the expectation
\[
\mathrm{E}\left[\hat G_{X_1}(t)\, \hat G_{X_{N(1)}}(t) - \left\{\hat G_{X_1}(t)\right\}^2\right]
\]
via the average
\[
\hat \mathrm{E} \left[\hat G_{X_1}(t)\, \hat G_{X_{N(1)}}(t) - \left\{\hat G_{X_1}(t)\right\}^2\right]
:= \frac{1}{n} \sum_{i=1}^n \left[
\hat G_{X_i}(t)\, \hat G_{X_{N(i)}}(t)
- \left\{\hat G_{X_i}(t)\right\}^2
\right].
\]
• We next use the empirical distribution of $Y_1,\ldots,Y_n$ to approximate the integral over $\mu$, yielding the following bias estimator that takes a natural U-statistic form:
\begin{align*}
\hat L_n :=& \frac{1}{n(n-1)} \sum_{i\ne j\in[n]}
\left[\hat G_{X_i}(Y_j)\, \hat G_{X_{N(i)}}(Y_j)
- \left\{\hat G_{X_i}(Y_j)\right\}^2\right].
\end{align*}
The resulting {\it bias-corrected} NN graph-based correlation coefficient is then given by
\[
\hat T_n^{\mathrm{bc}} := \hat T_n - 6 \hat L_n.
\]
Theory
Before stating the main result of this section, we introduce additional notation. For any function $f: \mathbb{R}^d \to \mathbb{R}$, define its $L^{\infty}$ norm over the support of $X$ as
\[
\norm{f}_{\infty} := \sup_{x \in {\rm supp}(F_X)} |f(x)|,
\]
where $F_X$ denotes the CDF of $X$ and ${\rm supp}(\cdot)$ denotes the support of a distribution or law. For any positive integer $q$, let $\Lambda_q$ denote the set of multi-indices of total degree $q$:
\[
\Lambda_q := \left\{ \alpha = (\alpha_1, \ldots, \alpha_d) : \sum_{i=1}^d \alpha_i = q,\ \alpha_i \in \mathbb{Z}^{\geq 0}~~\text{for all }i \in [d] \right\},
\]
where $\mathbb{Z}^{\geq 0}$ is the set of nonnegative integers. For each $\alpha \in \Lambda_q$, we adopt the following multi-index notation for derivatives:
\[
D^\alpha f = \frac{\partial^{|\alpha|} f}{\partial x^\alpha} = \frac{\partial^{\alpha_1 + \cdots + \alpha_d} f}{\partial x_1^{\alpha_1} \cdots \partial x_d^{\alpha_d}},\quad
|\alpha| = \sum_{i=1}^d \alpha_i,\quad
\alpha! = \prod_{i=1}^d \alpha_i!,\quad
x^\alpha = \prod_{i=1}^d x_i^{\alpha_i}.
\]
For any positive integer $K$, let $I_K$ denote the identity matrix of dimension $K$. Lastly, for any nonnegative random variable $Z$ and any $s>0$, we denote
\[
\mathrm{E}^{s}[Z] := (\mathrm{E}[Z])^{s}.
\]
A general theory for bias correction
To facilitate presentation, we begin by introducing general conditions for the bias-corrected estimator $\hat T_n^{\rm bc}$ under certain high-level assumptions on the estimator of $G_x(\cdot)$. These assumptions will be verified in Section (ref) for a specific class of ridge least squares estimators.
We first impose regularity conditions on $F_X$.
assumption[Regularity conditions for $F_X$]
The distribution of $X$ satisfies that
\begin{enumerate}[itemsep=0pt,label=(\roman*)]
• its density is bounded away from 0 in its support;
• for any $r > 0$ and all sufficiently large $n$,
\[
\mathrm{E}^{1/r} \|X_1 - X_{N(1)}\|^r \leq C_r n^{-1/d},
\]
where $C_r$ is a constant only depending on $r$.
\end{enumerate}
Assumption (ref)(ref) is standard in the NN literature. On the other hand, we refer the readers of interest to evans2002asymptotic for distributions that satisfy Assumption (ref)(ref).
Next, we assume sufficient smoothness of the function $G_{\cdot}(t)$, requiring a higher degree than Azadkia21simple, but similar to what was posed in lin2021estimation and cattaneo2024rosenbaum.
assumption[Smoothness conditions for $G_x(t)$]
The followings hold:
\begin{enumerate}[itemsep=0pt,label=(\roman*)]
• $\max_{\alpha\in\Lambda_1} \|D^\alpha G_{\cdot}(t)\|_{\infty}$ is uniformly bounded over $t \in {\rm supp}(\mu)$;
• $\max_{\alpha\in \Lambda_{\lfloor d/2 \rfloor +1}} \|D^\alpha G_{\cdot}(t)\|_{\infty}$ is uniformly bounded over $t \in {\rm supp}(\mu)$.
\end{enumerate}
Finally, we assume regularity of the estimator $\hat G_{\cdot}(t)$, in line with lin2021estimation and cattaneo2024rosenbaum.
assumption[Regularity conditions for $\hat{G}_x(t)$]
The followings hold:
\begin{enumerate}[itemsep=0pt,label=(\roman*)]
• the integral
\[
\int \mathrm{E}^{1/2}\left[\max_{\alpha \in \Lambda_{\lfloor d/2 \rfloor +1}} \Big\|D^\alpha \hat{G}_{\cdot}(t)\Big\|_{\infty}^2 \right] \mathrm{d} \mu(t) = O(1);
\]
• for each $\ell \in \{0, \ldots, \lfloor d/2 \rfloor\}$, there exists $\gamma_\ell > \max\left\{ \frac{1}{2} - \frac{\ell \vee 1}{d}, 0 \right\}$ such that
\[
\int \mathrm{E}^{1/2}\left[\max_{\alpha\in\Lambda_\ell} \Big\|D^\alpha \hat{G}_{\cdot}(t) - D^\alpha G_{\cdot}(t)\Big\|_{\infty}^2\right] \mathrm{d} \mu(t) = O(n^{-\gamma_\ell});
\]
• the integral
\[
\int\mathrm{E}\Big[\Big\|\hat G_{\cdot}(t)-G_{\cdot}(t)\Big\|_{\infty}^2\Big]
\,\mathrm{d}\mu(t)= o\bigl(n^{-1/2}\bigr).
\]
\end{enumerate}
theorem[Main result]
Assume Assumption (ref) and Assumptions (ref)-(ref). Then the followings hold:
\begin{enumerate}[itemsep=0pt,label=(\roman*)]
• $n^{1/2}\mathrm{E}\big|\hat L_n - L\big| \to 0$;
• $n^{1/2}(\hat T_n^{\rm bc} - T) \to N(0, \sigma^2)$ in distribution, where $\sigma^2$ is the asymptotic variance of $\hat T_n$ as in lin2022limit.
\end{enumerate}
remarkIt is worth comparing the assumptions made in this section with those imposed in Section (ref). Recall that Assumptions (ref) and (ref) place smoothness requirements on the density $f_X$ and the function $G$. In fact, when $d \le 3$, Assumption (ref) already implies Assumption (ref), while Assumptions (ref), (ref), and (ref) together imply Assumption (ref) (cf.\ Lemma (ref) ahead). Thus, the bias-correction approach generally requires weaker smoothness assumptions, albeit at the cost of introducing additional steps to correct the bias.
Ridge least squares
The remaining task is to verify Assumption (ref), which cannot be directly addressed using standard nonparametric regression results newey1997convergence, chen2018optimal, belloni2015some. In particular, unlike previous work, our setting requires control of estimation error in expectation rather than in probability, necessitating a more stable estimator.
To this end, we employ ridge regularization via ridge least squares tuo2024asymptotic, kurisu2024series. Following the setup of cattaneo2024rosenbaum, let
\[
p_K(\cdot) = (p_{1K}(\cdot), \ldots, p_{KK}(\cdot))^\top \in \mathbb{R}^K
\]
be a $K$-dimensional vector of basis functions capable of approximating
\[
\psi_t(\cdot) := G_{\cdot}(t), \quad \text{for any } t \in {\rm supp}(\mu).
\]
We estimate
\[
G_x(t) = \mathrm{E}[\mathbbm{1}(Y \ge t) \mid X = x]
\]
by projecting $\mathbbm{1}(Y \ge t)$ onto the span of the basis functions. This corresponds to nonparametric linear probability models.
Define
\[
\psi_{t,K}(x) := p_K(x)^\top \beta_{t,K}, \quad \hat{\psi}_{t,K}(x) := p_K(x)^\top \hat{\beta}_{t,K},
\]
where $\beta_{t,K}$ is the population $L^2$ projection:
\[
\beta_{t,K} := \argmin_{b \in \mathbb{R}^K} \mathrm{E}\left[(\psi_t(X_1) - p_K(X_1)^\top b)^2\right],
\]
and $\hat\beta_{t,K}$ is the ridge estimate:
\[
\hat{\beta}_{t,K} := \argmin_{b \in \mathbb{R}^K} \left\{ \frac{1}{n} \sum_{i=1}^n (\mathbbm{1}(Y_i \ge t) - p_K(X_i)^\top b)^2 + \lambda_n \|b\|^2 \right\},
\]
with regularization parameter $\lambda_n > 0$. Introduce further
align*[align* omitted — 348 chars of source]
The following quantities play a key role in characterizing the behavior of series estimators and their associated approximation errors:
\[
\underline{\lambda}_K := \lambda_{\min}(Q), \quad \zeta_{r,K} := \max_{\alpha \in \Lambda_r} \sup_{x} \|D^\alpha p_K(x)\|, \quad \vartheta_{r,K}^t := \max_{\alpha \in \Lambda_r} \|D^\alpha \psi_t - D^\alpha \psi_{t,K}\|_{\infty}.
\]
Here, \(\lambda_{\min}(Q)\) denotes the smallest eigenvalue of \(Q\); \(\zeta_{r,K}\) measures the smoothness of the basis functions \(p_K\); and \(\vartheta_{r,K}^t\) captures the best possible order-\(r\) approximation error of the basis \(p_K\) in representing the target function \(\psi_t(\cdot)\).
assumption\begin{enumerate}[itemsep=0pt,label=(\roman*)]
• The pairs $(X_i, Y_i)$ for $i = 1, \ldots, n$ are i.i.d. from a distribution $F_{X,Y}$ on $\mathbb{R}^d \times \mathbb{R}$.
• $\underline{\lambda}_K > 0$ for all $K$.
\end{enumerate}
The above assumption ensures that $Q$ is invertible and is standard in the literature newey1997convergence, cattaneo2024rosenbaum. The expressions for $\beta_{t,K}$ and $\hat{\beta}_{t,K}$ can then be simplified to
\[
\beta_{t,K} = Q^{-1} \mathrm{E}[p_K(X) \psi_t(X)], \quad \hat{\beta}_{t,K} = (P^\top P + n \lambda_n I_K)^{-1} P^\top \mathbbm{1}(Y_{[n]} \ge t).
\]
Our goal is to derive a bound for
\[
\mathrm{E}\left[ \max_{\alpha \in \Lambda_r} \| D^\alpha \hat{\psi}_{t,K} - D^\alpha \psi_t \|_\infty^2 \right].
\]
Such a bound can be directly used to verify Assumption (ref). To this end, we introduce the following assumption, which imposes regularity conditions on the smoothness of the basis functions $p_K$.
assumptionAssume $\lambda_n \asymp n^{-c}$ for some $c > 0$ and $K = K_n \to \infty$ as $n \to \infty$. Moreover, assume $\underline{\lambda}_K>\lambda_n$ for all sufficiently large $n$, $K/n\to 0$, $\zeta_{0,K} = o((n/\log n)^{1/4}(\underline{\lambda}_K - \lambda_n)^{1/2})$,
and $\underline{\lambda}_K^{-1} \zeta_{0,K}^2 \log K = o(n)$.
Assumption (ref) is mild. For instance, $\zeta_{r,K} = O(K^{1+r})$ for power series, and $\zeta_{r,K} = O(K^{1/2 + r})$ for Fourier series, splines, compactly supported wavelets, and piecewise polynomials. Moreover, $\underline{\lambda}_K$ is typically bounded away from zero uniformly in $K$; see newey1997convergence and cattaneo2024rosenbaum. Importantly, we do not require the “noise” term $\mathbbm{1}(Y \geq t) - \psi_t(X)$ to be independent of the covariates $X$.
theorem[Uniform approximation rate]
Under Assumptions (ref) and (ref), we have
\[
\mathrm{E}\left[ \max_{\alpha \in \Lambda_r} \| D^\alpha \hat{\psi}_{t,K} - D^\alpha \psi_t \|_\infty^2 \right] \lesssim \kappa_{1,n} + \kappa_{2,n} + \kappa_{3,n} + (\vartheta_{r,K}^t)^2,
\]
where
\[
\kappa_{1,n} := \underline{\lambda}_K^{-1} \zeta_{0,K}^2 K n^{-1}, ~~
\kappa_{2,n} := \underline{\lambda}_K^{-4} \left( \underline{\lambda}_K \zeta_{0,K}^2 \log K \cdot n^{-1} + \lambda_n^2 \right), ~~\text{and}~~
\kappa_{3,n} := \zeta_{0,K}^2 \zeta_{r,K}^2 n^{-1}.
\]
Simulation studies
In this section, we present a series of illustrative simulations to demonstrate the performance of the bias-corrected estimator and compare it with the original NN graph-based statistic proposed by Azadkia21simple. To this end, we consider the following simulation setup:
align*[align* omitted — 201 chars of source]
In each simulation round, we generate independent copies \( \{(\widetilde{X}_i, \widetilde{Y}_i)\}_{i=1}^n \) from the above multivariate normal distribution. Then we define $X= \big(\Phi(\widetilde{X}^{(1)}), \ldots, \Phi(\widetilde{X}^{(d)})\big)^\top$ and $Y=\Phi(\widetilde{Y})$, where $\Phi$ is the standard normal CDF.
In this case, by ansari2025directextensionazadkia, we have the closed-form formula:
\[
T(Y,X)\;=\;\frac{3}{\pi}\,\arcsin\!\Big(\frac{1+\rho^{2}}{2}\Big)\;-\;\frac{1}{2}.
\]
We consider \( \rho = 0, 0.3, 0.5, 0.7, 0.9 \), dimensions \( d = 2, 4, 6, 8, 10 \), and sample sizes \( n = 300, 600, 900 \). For the bias correction, we use power series basis functions of polynomial degree equal to $2$. We have set the ridge penalty parameter $\lambda_n = n^{-0.85}$. Variance estimation for both \( \hat{T}_n \) and the bias-corrected estimator \( \hat{T}_n^{\text{bc}} \) is performed via the \( m \)-out-of-\( n \) bootstrap with \( m = \lfloor n^{1/2} \rfloor \), as recommended in dette2025simple.
Tables (ref)--(ref) report the root mean square errors (RMSE) and empirical coverage probabilities (ECP) for both estimators over 1,000 independent repetitions. We consider the nominal significance level \( \alpha = 0.05 \) for the empirical coverage. The empirical results show that as the dimension or correlation increases, the performance of \( \hat{T}_n^{\text{bc}} \) clearly dominates that of \( \hat{T}_n \). For small dimensions (especially when $d=2$) or correlation (e.g., when $\rho=0$ when no bias is present), the two (original and bias-corrected) correlation estimators have more comparable performance. All these simulations give necessary supplement to the derived theory.
All reproducible code is available in the associated GitHub repository: \url{https://github.com/chenleihaomars/Simulation-for-ACbc}.
{
table[table omitted — 1,151 chars of source]
}
{
table[table omitted — 1,151 chars of source]
}
{
table[table omitted — 1,129 chars of source]
}
{
table[table omitted — 1,129 chars of source]
}
{
table[table omitted — 1,131 chars of source]
}
Proofs
Proof for (ref)
We introduce some notation. Let $\mathbb{S}^{d-1}$ denote the $(d-1)$-dimensional sphere in $\mathbb{R}^{d}$ and $B(x,r)\subseteq \mathbb{R}^d$ denote the $d$-dimensional open ball in $\mathbb{R}^d$ with center $x$ and radius $r$. Let $v_d$ denote the volume of unit Euclidean ball in $\mathbb{R}^d$. Denote by $\sigma$ the surface measure on $\mathbb{S}^{d-1}$. Let the real number $\mathfrak{D}$ denote the diameter of $\mathcal{X}$, i.e., $\mathfrak{D}=\sup_{x,y\in \mathcal{X}}\|x-y\|$.
proof[Proof of (ref)]
By (ref), it suffices to show $L=O(n^{-\frac{2}{d}})$. By (ref), we have
\[
G_{x^\prime}(u)-G_{x}(u)=\nabla_x G_x(u)\cdot (x^\prime-x)+R_x(u,\|x-x^\prime\|),
\]
where the remainder $R_x$ satisfies $\sup_{s}|R_x(s,\|x-x^\prime\|)|\le C\|x-x^\prime\|^2$.
Therefore,
\[
\begin{aligned}
\big|L\big|&=\Big|\mathrm{E}\big[(X_{N(1)}-X_1)\cdot \mathfrak{A}(X_1)\big]+\mathrm{E}\int R_{X_1}(u,\|X_{N(1)}-X_1\|)G_{X_1}(u) \mathrm{d} \mu(u) \Big|\\
&\le C\sup_{x^\prime}\|\mathfrak{A}(x^\prime)\|\,\mathrm{E}\big[\|\mathrm{E} [X_1-X_{N(1)}\mid X_1]\|\big]+C\mathrm{E} \|X_1-X_{N(1)}\|^2,
\end{aligned}
\]
where $\mathfrak{A}(X_1)=\int G_{X_1}(t)\nabla_x G_{X_1}(t)\mathrm{d} \mu(t)$. (ref) implies that $\sup_{x^\prime}\|\mathfrak{A}(x^\prime)\|<\infty$.
We now analyze the term $\mathrm{E}\big[\|\mathrm{E} [X_1-X_{N(1)}\mid X_1]\|\big]$. Similar to viel2025convergenceratenearestneighbour, consider the polar representation $X_1-X_{N(1)}=R\Xi$, where $R$ takes values in $(0,\infty)$ and $\Xi$ takes values in the $(d-1)$-sphere $\mathbb{S}^{d-1}$. Denote by $\pi_{r,x}(\xi)$ the conditional density of $\Xi$ given $R=r$ and $X_1=x$. Then by (ref), we have
\[
\pi_{r,x}(\xi)=\frac{f_X(x+r\xi)\mathbbm{1}(\xi\in A_x(r))}{\int_{A_x(r)} f(x+r\zeta)\mathrm{d} \sigma(\zeta)},
\]
where $\sigma$ is the surface measure on $\mathbb{S}^{d-1}$ and $A_x(r)= \{\xi \in \mathbb{S}^{d-1}:x+r\xi \in \mathcal{X}\}$. Therefore,
\[
\mathrm{E}[\Xi\mid R=r,X_1=x]=\frac{\int_{A_x(r)}\xi\big(f_X(x+r\xi)-f_X(x)\big)\mathrm{d} \sigma(\xi) +f_X(x)\int_{A_x(r)}\xi \mathrm{d} \sigma(\xi)}{\int_{A_x(r)}f_X(x+r\xi)\mathrm{d} \sigma(\xi)}.
\]
If $r\le \delta(x)$, then $A_x(r)=\mathbb{S}^{d-1}$ and $\int_{A_x(r)}\xi \mathrm{d} \sigma(\xi)=0$. Since $f_X$ is $\mathcal{L}$-Lipschitz and $f_X\ge \mathfrak{p}$, for $r\le \delta(x)$,
\[
\big\|\mathrm{E}[\Xi\mid R=r,X_1=x]\big\|\le \frac{\mathcal{L} r\int_{\mathbb{S}^{d-1}}\|\xi\|\mathrm{d} \sigma(\xi)}{\mathfrak{p}\sigma(\mathbb{S}^{d-1})}\le Cr.
\]
For any $r$ and $x$, we have $\|\mathrm{E}[\Xi \mid R=r, X=x]\|\le 1$. So for all $x$ and $r$
\[
\big\|\mathrm{E}[\Xi \mid R=r, X=x]\big\|\le Cr\mathbbm{1}(r\leq \delta(x))+\mathbbm{1}(r>\delta(x)).
\]
Thus,
\[
\begin{aligned}
\big\|\mathrm{E}[X_1-X_{N(1)}\mid X_1=x]\big\|&\le \mathrm{E}\big[R\,\big\|\mathrm{E}[\Xi\mid R,X_1=x]\big\|\mid X_1=x\big]\\
&\le C\,\mathrm{E}[R^2\mathbbm{1}(R\le \delta(x))+R\mathbbm{1}(R>\delta(x))\mid X_1=x].
\end{aligned}
\]
Hence,
\[
\mathrm{E}\big[\|\mathrm{E} [X_1-X_{N(1)}\mid X_1]\|\big]\lesssim \mathrm{E}[R^2]+\mathrm{E}[R\mathbbm{1}(R>\delta(X_1))].
\]
In the following, we show $\mathrm{E}[R\mathbbm{1}(R>\delta(X_1))]=O(n^{-\frac{2}{d}})$. First note that
\[
\mathrm{E}[R\mathbbm{1}(R>\delta(X_1))]=\mathrm{E}(R-\delta(X_1))^+ +\mathrm{E}\delta(X_1)\mathbbm{1}(\delta(X_1)<R)=: \mathcal{E}_1+\mathcal{E}_2,
\]
where $(R-\delta(X_1))^+=\max\{R-\delta(X_1),0\}$. We analyze $\mathcal{E}_1$ and $\mathcal{E}_2$ individually. First, note that
\[
\mathcal{E}_1=\int_0^\infty \mathrm{P}(\delta(X_1)< r<R)\mathrm{d} r, \text{ and } \mathrm{P}(\delta(X_1)< r <R)=\mathrm{E}[\mathbbm{1}(\delta(X_1)< r)\mathrm{P}(R>r\mid X_1)].
\]
When $r\le r_0$ for a sufficiently small $r_0>0$, since (ref) establishes for all $x\in \mathcal{X}$
\[
p_x(r)\coloneqq \int_{B(x,r)\cap \mathcal{X}} f\ge \mathfrak{p} |B(x,r)\cap \mathcal{X}| \ge \mathfrak{p} c^d_0v_dr^d,
\]
it holds for all $x\in \mathcal{X}$ that
\[
\mathrm{P}(R>r\mid X_1=x)=(1-p_x(r))^{n-1}\le \exp(-Cnr^d).
\]
So
\[
\mathcal{E}_1\le \int_0^{r_0} \mathrm{P}(\delta(X_1)< r)\exp(-Cnr^d)\mathrm{d} r+ \int_{r_0}^{\mathfrak{D}} \mathrm{P}(R>r,\delta(X_1)< r)\mathrm{d} r =: \mathcal{E}_{1,1}+\mathcal{E}_{1,2},
\]
where $\mathfrak{D}$ is the diameter of $\mathcal{X}$.
For $\mathcal{E}_{1,1}$, we have by (ref),
\[
\mathcal{E}_{1,1}\le C\int_0^{r_0}r\exp(-Cnr^d)\mathrm{d} r\lesssim n^{-2/d}.
\]
For $\mathcal{E}_{1,2}$, since $\mathrm{P}(R>r,\delta< r)\le \mathrm{P}(R>r_0)\le \exp(-Cnr_0^d)$, we have
\[
\mathcal{E}_{1,2}\le \int_{r_0}^\mathfrak{D} \exp(-Cnr_0^d)\mathrm{d} r\le (\mathfrak{D}-r_0)\exp(-Cnr_0^d)=o(n^{-2/d}).
\]
This shows $\mathcal{E}_1=O(n^{-2/d})$. Now we show $\mathcal{E}_2=O(n^{-2/d})$. Note that
\[
\begin{aligned}
\mathcal{E}_{2}&\le \|f_X\|_{\infty}\int_{\mathcal{X}}\delta(x)\mathrm{P}(R>\delta(x)\mid X_1=x)\mathrm{d} x \\
&\le C\|f_X\|_{\infty}\int_{\{0\le \delta(x)\le r_0\}}\delta(x)\exp(-Cn\delta(x)^d)\mathrm{d} x+C\|f_X\|_{\infty}\exp(-Cnr_0^d)\int_{\{r_0< \delta(x)\le \mathfrak{D}\}} \delta(x)\mathrm{d} x\\
&\lesssim \int_{\{0\le \delta(x)\le r_0\}}\delta(x)\exp(-Cn\delta(x)^d)\mathrm{d} x+ \exp(-Cnr_0^d)\mathfrak{D}|\mathcal{X}|=\widetilde{\mathcal{E}}_{2}+o(n^{-2/d}),
\end{aligned}
\]
where $\widetilde{\mathcal{E}}_{2}=\int_{\{0\le \delta(x)\le r_0\}}\delta(x)\exp(-Cn\delta(x)^d)\mathrm{d} x$. Set
\[
h(t)\coloneqq te^{-Cnt^d}
\]
and monotone increasing function
\[
m(t)\coloneqq |\{x\in \mathcal{X}:0\le \delta(x)\le t\}| ~~\text{ for }t\in [0,r_0].
\]
Then integration by parts yields
\[
\widetilde{\mathcal{E}}_2=\int_0^{r_0} h(t)\mathrm{d} m(t)=h(r_0)m(r_0)-h(0)m(0)-\int_0^{r_0}m(t)h^\prime(t)\mathrm{d} t.
\]
Note that $h(r_0)m(r_0)\le Cr_0^2e^{-Cnr_0^d}=o(n^{-2/d})$, $h(0)m(0)=0$ and
\[
\int_0^{r_0}m(t)h^\prime(t)\mathrm{d} t\le C\int_0^{r_0} e^{-Cnt^d}(t+t^{d+1}n)\mathrm{d} t=O(n^{-2/d})
\]
by (ref). Hence, $\widetilde{\mathcal{E}}_{2}=O(n^{-2/d})$.
proof[Proof of (ref)]
By (ref), we can write
\[
\mathrm{E}[\widehat{T}_n]-T=6L-\frac{6}{n+1}E_{1,n}+\frac{6n}{n^2-1}E_{2,n}-\frac{3}{n-1},
\]
where $E_{1,n}=\mathrm{E}[\mathbbm{1}(Y_2\le Y_1\wedge Y_{N(1)})]$ and $E_{2,n}=\mathrm{E}[\mathbbm{1}(Y_1\le Y_1\wedge Y_{N(1)})]$. Note that, as $n\to \infty$,
\[
-\frac{6}{n+1}E_{1,n}+\frac{6n}{n^2-1}E_{2,n}-\frac{3}{n-1}=n^{-1}(-6E_{1,n}+6E_{2,n}-3)+o(n^{-1})
\]
and we have the following Lemma:
\begin{lemma}
It holds true that $E_{1,n}\to \int \mathrm{E}[G_X(t)^2]\mathrm{d} \mu(t)$ and $E_{2,n}\to 1/2$ as $n\to \infty$.
\end{lemma}
It remains to analyze the first term $L$. For that purpose, fix a positive sequence
\[
r_n=n^{-a} \text{ with }a=\frac{4d+5}{4d^2+6d}.
\]
Write
\[
\mathcal{X}_r\coloneqq \{x\in \mathcal{X}:\delta(x)\ge r\} ~~\text{for any } r>0
\]
and
\[
\begin{aligned}
L=&\, \mathrm{E} \Big[\int \big(G_{X_{N(1)}}(t)-G_{X_1}(t)\big)G_{X_1}(t)\mathrm{d} \mu(t)\Big]\\
=&\, \mathrm{E} \Big[\int \big(G_{X_{N(1)}}(t)-G_{X_1}(t)\big)G_{X_1}(t)\mathrm{d} \mu(t) \cdot \mathbbm{1}(X_1\in \mathcal{X}_{r_n})\Big]\\
& +\mathrm{E} \Big[\int \big(G_{X_{N(1)}}(t)-G_{X_1}(t)\big)G_{X_1}(t)\mathrm{d} \mu(t) \cdot \mathbbm{1}(X_1\in \mathcal{X}\setminus \mathcal{X}_{r_n})\Big]\\
=: &\, L_n^{\mathrm{int}}+L_n^{\mathrm{bd}}.
\end{aligned}
\]
The goal is to show
\[
L_n^{\mathrm{int}}=\widetilde{\mathfrak{C}}_1n^{-\frac{2}{d}}+o(n^{-\frac{2}{d}}) ~~\text{ and }~~L_n^{\mathrm{bd}}=\widetilde{\mathfrak{C}}_3 n^{-\frac{2}{d}}+o(n^{-\frac{2}{d}}),
\]
where $\widetilde{\mathfrak{C}}_1=-\frac{1}{6}\mathfrak{C}_1$ and $\widetilde{\mathfrak{C}}_3=-\frac{1}{6}\mathfrak{C}_3$.
\refstepcounter{step}
\paragraph*{Step \thestep: Analyze $L_n^{\mathrm{int}}$.}
\if\relax\detokenize{step1:int}\relax\else\fi
By (ref), Taylor expansion gives, for small $0<r< r_n$,
\begin{equation}
G_{x+r\xi}(t)-G_x(t)=r\nabla_x G_x(t)\cdot \xi +\frac{1}{2}r^2\xi^\top\nabla_x^2 G_x(t) \xi +O(r^{2+\beta})
\end{equation}
uniformly in $x\in \mathcal{X}_{r_n}, t\in {\rm supp}(\mu), \xi \in \mathbb{S}^{d-1}$, i.e.,
\[
\sup_{x\in \mathcal{X}_{r_n},t\in {\rm supp}(\mu),\xi\in \mathbb{S}^{d-1}}\big|G_{x+r\xi}(t)-G_x(t)-\big(r\nabla_x G_x(t)\cdot \xi +\frac{1}{2}r^2\xi^\top\nabla_x^2 G_x(t)\xi\big)\big|\le Cr^{2+\beta}.
\]
By (ref), the Taylor expansion of $f_X$ at $x\in \mathcal{X}_{r_n}$ as $r\downarrow 0$ gives:
\[
f_X(x+r\xi)=f_X(x)+r\nabla f_X(x)\cdot \xi+R_1(x,r,\xi),
\]
and since $\int_{\mathbb{S}^{d-1}}\xi \mathrm{d} \sigma(\xi)=0$,
\[
\begin{aligned}
\int_{\mathbb{S}^{d-1}} f_X(x+r\xi)\mathrm{d}\sigma(\xi)&=f_X(x)\sigma(\mathbb{S}^{d-1})+r\nabla f_X(x)\cdot \int_{\mathbb{S}^{d-1}}\xi \mathrm{d} \sigma(\xi)+R_2(x,r)\\
&=f_X(x)\sigma(\mathbb{S}^{d-1})+R_2(x,r),
\end{aligned}
\]
where $|R_1(x,r,\xi)|\le Cr^{1+\alpha}$ and $|R_2(x,r)|=|\int_{\mathbb{S}^{d-1}}R_1(x,r,\xi)\mathrm{d} \sigma(\xi)|\le C\sigma(\mathbb{S}^{d-1})r^{1+\alpha}$. Therefore, by (ref),
\[
\pi_{r,x}(\xi)=\frac{f_X(x)+r\nabla f_X(x)\cdot \xi +R_1(x,r,\xi)}{f_X(x)\sigma(\mathbb{S}^{d-1})+R_2(x,r)}.
\]
Note that $\int_{\mathbb{S}^{d-1}}\xi R_1(x,r,\xi)\mathrm{d} \sigma(\xi)=O(r^{1+\alpha})$ and $\int_{\mathbb{S}^{d-1}} f_X(x) \xi \mathrm{d} \sigma(\xi)=0$. Write
\[
\kappa(x,r)\coloneqq \frac{R_2(x,r)}{\sigma(\mathbb{S}^{d-1})f_X(x)}.
\]
Then it yields
\[
\begin{aligned}
\mathrm{E}[\Xi\mid R=r,X_1=x]&=\int_{\mathbb{S}^{d-1}}\xi \pi_{r,x}(\xi)\mathrm{d} \sigma(\xi)\\
&=\frac{r \int_{\mathbb{S}^{d-1}} \xi(\nabla f_X(x)\cdot \xi)\mathrm{d} \sigma(\xi)+O(r^{1+\alpha})}{f_X(x)\sigma(\mathbb{S}^{d-1})+R_2(x,r)}\\
&=\frac{d^{-1}r\nabla \log f_X(x)+O(r^{1+\alpha})}{1+\kappa(x,r)},
\end{aligned}
\]
since $\int_{\mathbb{S}^{d-1}} \xi(\nabla f_X(x)\cdot \xi) \mathrm{d}\sigma(\xi)=\int_{\mathbb{S}^{d-1}} \xi\xi^\top \mathrm{d}\sigma(\xi) \nabla f_X(x)=\frac{\sigma(\mathbb{S}^{d-1})}{d} \nabla f_X(x)$. Since $\kappa(x,r)=O(r^{1+\alpha})$ uniformly in $x\in \mathcal{X}_{r_n}$, we have
\begin{equation}
\begin{aligned}
\mathrm{E}[\Xi\mid R=r,X_1=x]&=d^{-1}r\nabla\log f_X(x)\big(1-\kappa(x,r)+O(\kappa(x,r)^2)\big)\\
&=d^{-1}r\nabla\log f_X(x)+O(r^{1+\alpha}).
\end{aligned}
\end{equation}
Similarly, we have
\[
\mathrm{E}[\Xi\Xi^\top\mid R=r,X_1=x]=\frac{d^{-1}I_d}{1+\kappa(x,r)}+\frac{R_3(x,r)}{\sigma(\mathbb{S}^{d-1})f_X(x)(1+\kappa(x,r))},
\]
where
\[
R_{3}(x,r):=\int_{\mathbb{S}^{d-1}}\xi \xi^\top R_1(x,r,\xi)\mathrm{d} \sigma(\xi).
\]
Note that $\|R_3(x,r)\|_2\le C\sigma(\mathbb{S}^{d-1})r^{1+\alpha}$. So, uniformly in $x\in \mathcal{X}_{r_n}$
\begin{equation}
\mathrm{E}[\Xi\Xi^\top\mid R=r,X_1=x]=d^{-1}I_d+O(r^{1+\alpha}).
\end{equation}
Combining (ref) gives: uniformly in $x\in \mathcal{X}_{r_n}$
\[
\begin{aligned}
&\mathrm{E}\Big[\int\big(G_{X_{N(1)}}(t)-G_{X_1}(t)\big)G_{X_1}(t)\mathrm{d} \mu(t) \mathbbm{1}(R\le r_n)\mid X_1=x\Big]\\
=&d^{-1}\mathrm{E}[R^2\mathbbm{1}(R\le r_n)\mid X_1=x]\big(\nabla \log f_X(x)\cdot \mathfrak{A}(x)+\frac{1}{2}\mathrm{Tr}(\mathfrak{B}(x))\big)+o(n^{-\frac{2}{d}}).
\end{aligned}
\]
We have
\[
\mathrm{E}[R^2\mathbbm{1}(R\le r_n)\mid X_1=x]=\mathrm{E}[R^2\mid X_1=x]+o(n^{-\frac{2}{d}})
\]
uniformly in $x\in \mathcal{X}_{r_n}$, since for every $x\in \mathcal{X}_{r_n}$
\[
\begin{aligned}
\mathrm{E}[R^2\mathbbm{1}(R>r_n)\mid X_1=x]&=r_n^2\mathrm{P}(R>r_n\mid X_1=x) +2\int_{r_n}^\mathfrak{D} r\mathrm{P}(R>r\mid X_1=x)\mathrm{d} r\\
&\lesssim r_n^2\exp(-Cnr^d_n)+(\mathfrak{D}^2-r_n^2)\exp(-Cnr^d_n)=o(n^{-\frac{2}{d}}),
\end{aligned}
\]
where we use the fact that $r_n\downarrow 0$ with $r_n^{-d}=o\big(\frac{n}{\log n^{2/d}}\big)$.
By the boundedness of function $G$, we have
\[
\begin{aligned}
&\mathrm{E}\Big[\int\big(G_{X_{N(1)}}(t)-G_{X_1}(t)\big)G_{X_1}(t)\mathrm{d} \mu(t) \mathbbm{1}(R> r_n)\mid X_1=x\Big]\\
\lesssim& \mathrm{P}(R>r_n\mid X_1=x)\le \exp(-Cnr_n^{d}) =o(n^{-\frac{2}{d}}).
\end{aligned}
\]
This implies
\[
\begin{aligned}
&\mathrm{E}\Big[\int\big(G_{X_{N(1)}}(t)-G_{X_1}(t)\big)G_{X_1}(t)\mathrm{d} \mu(t) \mathbbm{1}(R\le r_n)\mid X_1=x\Big]\\
=&\mathrm{E}\Big[\int\big(G_{X_{N(1)}}(t)-G_{X_1}(t)\big)G_{X_1}(t)\mathrm{d} \mu(t) \mid X_1=x\Big]+o(n^{-\frac{2}{d}})
\end{aligned}
\]
uniformly in $x\in \mathcal{X}_{r_n}$, and therefore
\[
L_{n}^{\mathrm{int}}=\int_{\mathcal{X}_{r_n}}f_X(x)d^{-1}\big(\nabla \log f_X(x)\cdot \mathfrak{A}(x)+\frac{1}{2}\mathrm{Tr}(\mathfrak{B}(x)) \big) \mathrm{E}[R^2\mid X_1=x]\mathrm{d} x+o(n^{-\frac{2}{d}}).
\]
Note that the following holds:
\begin{lemma}
We have $\mathrm{E}[R^2\mid X_1=x]=\Gamma(1+2/d)(v_df_X(x)n)^{-\frac{2}{d}}+o(n^{-\frac{2}{d}})$ uniformly in $x\in \mathcal{X}_{r_n}$ provided $r_n\downarrow 0$ with $n r_n^d\to \infty$.
\end{lemma}
Plugging it in gives
\[
L_n^{\mathrm{int}}=\Gamma(1+2/d)(v_dn)^{-\frac{2}{d}}\int_{\mathcal{X}_{r_n}} I(x)\mathrm{d} x +o(n^{-\frac{2}{d}}),
\]
where
\[
I(x):=f_X(x)^{1-\frac{2}{d}}d^{-1}\big(\nabla \log f_X(x)\cdot \mathfrak{A}(x)+\frac{1}{2}\mathrm{Tr}(\mathfrak{B}(x)) \big).
\]
The integrand $I(x)$ is continuous and bounded on $\mathcal{X}$, so $\int_{\mathcal{X}_{r_n}} I(x)\mathrm{d} x\to \int_{\mathcal{X}} I(x)\mathrm{d} x<\infty$ as $n\to \infty$. Hence,
\[
L_n^{\mathrm{int}}=\widetilde{\mathfrak{C}}_1n^{-\frac{2}{d}}+o(n^{-\frac{2}{d}}).
\]
\refstepcounter{step}
\paragraph*{Step \thestep: Analyze $L_n^{\mathrm{bd}}$.}
\if\relax\detokenize{step2:bd}\relax\else\fi
Set $I(X_{[n]})\coloneqq \int\big(G_{X_{N(1)}}(t)-G_{X_{1}}(t)\big)G_{X_{1}}(t)\mathrm{d} \mu(t)$. Then
\[
\begin{aligned}
L^{\mathrm{bd}}_n&=\int_{\mathcal{X}\setminus \mathcal{X}_{r_n}}f_X(x)\mathrm{E}[I(X_{[n]})\mathbbm{1}(R\le \delta(x))\mid X_1=x]\mathrm{d} x+\int_{\mathcal{X}\setminus \mathcal{X}_{r_n}}f_X(x)\mathrm{E}[I(X_{[n]})\mathbbm{1}(R> \delta(x))\mid X_1=x]\mathrm{d} x\\
& =: L^{\mathrm{bd}}_{n,1}+L^{\mathrm{bd}}_{n,2}.
\end{aligned}
\]
We show $ L^{\mathrm{bd}}_{n,1}=o(n^{-2/d})$. Similar to the argument before (note that on $\{R\le \delta(x)\}$ the ball $B(x,R)\subseteq \mathcal{X}$), we have
\[
\big|\mathrm{E}[I(X_{[n]})\mathbbm{1}(R\le \delta(x))\mid X_1=x]\big|\lesssim \mathrm{E}[R^2\mid X_1=x]\lesssim n^{-\frac{2}{d}}
\]
uniformly for all $x\in \mathcal{X}$. Therefore, by (ref),
\[
\int_{\mathcal{X}\setminus \mathcal{X}_{r_n}} f_X(x)\big|\mathrm{E}[I(X_{[n]})\mathbbm{1}(R\le \delta(x))\mid X_1=x]\big|\mathrm{d} x \lesssim n^{-\frac{2}{d}}r_n=o(n^{-\frac{2}{d}}).
\]
We analyze $ L^{\mathrm{bd}}_{n,2}$. Note that
\[
L^{\mathrm{bd}}_{n,2}=\tilde{L}_{n,2}^{\mathrm{bd}}+\int_{\mathcal{X}\setminus \mathcal{X}_{r_n}}f_X(x)\mathrm{E}[I(X_{[n]})\mathbbm{1}(R>r_n)\mid X_1=x]\mathrm{d} x=\tilde{L}_{n,2}^{\mathrm{bd}}+o(n^{-2/d}),
\]
where
\[
\tilde{L}_{n,2}^{\mathrm{bd}}=\int_{\mathcal{X}\setminus \mathcal{X}_{r_n}}f_X(x)\mathrm{E}[I(X_{[n]})\mathbbm{1}(\delta(x)<R\le r_n)\mid X_1=x]\mathrm{d} x.
\]
Indeed, since $p_r(x)\ge \mathfrak{p} |\mathcal{X}\cap B(x,r)|\ge \mathfrak{p} c_0 v_d (r_n\wedge r_0)^d$ for all $x\in \mathcal{X}$ and $r\in [r_n,\infty)$, we have uniformly in $x$
\[
\mathrm{E}[I(X_{[n]})\mathbbm{1}(R>r_n)\mid X_1=x]\lesssim
(1-p_{r_n}(x))^{n-1}\le \exp(-(n-1)p_{r_n}(x))\le \exp(-c_1 n r_n^d)=o(n^{-2/d}).
\]
Now, we analyze $\tilde{L}_{n,2}^{\mathrm{bd}}$. By (ref), we have
\[
\mathrm{E}[\Xi\mid R=r,X_1=x]=\frac{\int_{A_x(r)}\xi f_X(x+r\xi)\mathrm{d} \sigma(\xi)}{\int_{A_x(r)} f_X(x+r\xi)\mathrm{d} \sigma(\xi)}.
\]
Define
\[
\mathcal{S}_n\coloneqq \Big\{(x,r):x\in \mathcal{X}\setminus \mathcal{X}_{r_n},0\le \delta(x)\le r\le r_n\Big\}.
\]
Using the Lipschitz continuity and strict positivity of $f_X$ on the compact support and the fact that $\sigma(A_x(r))$ is bounded away from zero uniformly on $\mathcal{S}_n$, it follows that
\[
\mathrm{E}[\Xi\mid R=r,X_1=x]=\frac{\int_{A_x(r)}\xi\mathrm{d} \sigma(\xi)}{\sigma(A_x(r))}+O(r)
\]
uniformly for $(x,r)\in \mathcal{S}_n$. Define
\[
C_{x}(r)\coloneqq \Big\{\xi\in \mathbb{S}^{d-1}:\xi\cdot \nabla\delta(x)\ge -\delta(x)/r\Big\}.
\]
In angular coordinates, the actual feasible direction set $A_x(r)$ differs only slightly in measure from the spherical cap $C_x(r)$, which is justified by the following lemma.
\begin{lemma}
We have $\sigma(A_x(r)\,\triangle\, C_{x}(r))=o(1)$ as $n\to \infty$ uniformly for a.e.\ $(x,r)\in \mathcal{S}_n$.
\end{lemma}
Since the function $\xi\mapsto \xi$ is bounded and both $\sigma(A_x(r))$ and $\sigma(C_x(r))$ are uniformly bounded away from zero, we have uniformly for a.e.\ $(x,r)\in \mathcal{S}_n$
\[
\mathrm{E}[\Xi\mid R=r,X_1=x]=\sigma(C_{x}(r))^{-1}\int_{C_{x}(r)}\xi \mathrm{d} \sigma(\xi)+o(1).
\]
Define
\[
\mathfrak{M}_d(\tau)\coloneqq \sigma(C_x(r))^{-1}\int_{C_x(r)}\xi \cdot \nabla \delta(x)\mathrm{d} \sigma(\xi)~~ \text{ for }\tau=\delta(x)/r\in[0,1].
\]
Then we can write
\[
\sigma(C_x(r))^{-1}\int_{C_x(r)}\xi \mathrm{d} \sigma(\xi)=\mathfrak{M}_{d}(\delta(x)/r)\nabla \delta(x).
\]
Plugging the expression for $\int_{C_{x}(r)}\xi \mathrm{d} \sigma(\xi)$ into the expression of $\mathrm{E}[\Xi\mid R=r,X_1=x]$ gives, uniformly in $x\in \mathcal{X}\setminus \mathcal{X}_{r_n}$,
\[
\begin{aligned}
&\mathrm{E}[I(X_{[n]})\mathbbm{1}(\delta(x)<R\le r_n)\mid X_1=x]\\
=&\mathrm{E}[R\ \mathfrak{M}_d(\delta(x)/R)\mathfrak{G}(x)\mathbbm{1}(\delta(x)<R\le r_n)\mid X_1=x]+\mathrm{E}[o(R)\mathbbm{1}(\delta(x)<R\le r_n)\mid X_1=x]\\
=:& \Upsilon_1(x)+\Upsilon_2(x).
\end{aligned}
\]
Note that
\[
\begin{aligned} \tilde{L}^{\mathrm{bd}}_{n,2}&=\int_{\{0\le \delta(x)\le r_n\}}f_X(x)\mathrm{E}[I(X_{[n]})\mathbbm{1}(\delta(x)<R\le r_n)\mid X_1=x]\mathrm{d} x\\
&=\int_{\{0\le \delta(x)\le r_n\}}f_X(x) \Upsilon_1(x) \mathrm{d} x+\int_{\{0\le \delta(x)\le r_n\}}f_X(x) \Upsilon_2(x)\mathrm{d} x\\
&=: \tilde{L}^{\mathrm{bd}}_{n,2,1}+\tilde{L}^{\mathrm{bd}}_{n,2,2}.
\end{aligned}
\]
The goal is to show $\tilde{L}^{\mathrm{bd}}_{n,2,2}=o(n^{-2/d})$.
We have for $x\in \mathcal{X}\setminus \mathcal{X}_{r_n}$
\[
\begin{aligned}
\mathrm{E}[R\mathbbm{1}(\delta(x)<R\le r_n)\mid X_1=x]&\le \delta(x)\mathrm{P}(R>\delta(x)\mid X_1=x)+\int_{\delta(x)}^\mathfrak{D} \mathrm{P}(R>r\mid X_1=x)\mathrm{d} r, \\
&\lesssim \delta(x)\exp(-Cn\delta(x)^d)+n^{-\frac{1}{d}}\exp(-Cn\delta(x)^d).
\end{aligned}
\]
Note that similar to the analysis of $\widetilde{\mathcal{E}}_2$ in the proof of (ref), we have
\[
\begin{aligned}
\int_{\{0\le \delta(x)\le r_n\}}\delta(x)\exp(-Cn\delta(x)^d)\mathrm{d} x&=O(n^{-2/d}) \quad \text{ and } \\
n^{-1/d}\int_{\{0\le \delta(x)\le r_n\}}\exp(-Cn\delta(x)^d)\mathrm{d} x&=O(n^{-2/d}).
\end{aligned}
\]
Hence, $\tilde{L}^{\mathrm{bd}}_{n,2,2}=o(n^{-2/d})$.
Now we analyze the main term $\tilde{L}^{\mathrm{bd}}_{n,2,1}$. Note that
\[
\tilde{L}^{\mathrm{bd}}_{n,2,1}=\int_{\mathcal{X}\setminus \mathcal{X}_{r_n}}f_X(x)\mathfrak{G}(x)\int_{\delta(x)}^{r_n} \int_{\mathbb{S}^{d-1}} r\mathfrak{M}_d(\delta(x)/r)g_x(r,\xi)\mathrm{d} \sigma(\xi) \mathrm{d} r\mathrm{d} x,
\]
where $g_x(r,\xi)$ is the conditional density of $(R,\Xi)$ given $X_1=x$ in (ref) and
\begin{equation}
g_x(r)=\int_{\mathbb{S}^{d-1}} g_x(r,\xi)\mathrm{d} \sigma(\xi)=(n-1)r^{d-1}(1-p_r(x))^{n-2}\int_{A_x(r)}f_X(x+r\xi)\mathrm{d} \sigma(\xi).
\end{equation}
By (ref), we have, uniformly in $x\in \mathcal{X}\setminus \mathcal{X}_{r_n}$,
\begin{equation}
\int_{A_x(r)}f_X(x+r\xi) \mathrm{d} \sigma(\xi)=f_X(x)\sigma(C_x(\delta(x)/r))(1+o(1)).
\end{equation}
\begin{lemma}
It holds true that, as $n\to \infty$,
\[
\sup_{(x,r)\in \mathcal{S}_n}\Bigg|\frac{|B(x,r)\cap \mathcal{X}|-v_d\mathfrak{F}_d(\delta(x)/r)r^d}{r^d}\Bigg|=o(1),
\]
where $\mathfrak{F}_d(\tau):=\frac{1}{2}\Big(1+I_{\tau^2}\big(\frac{1}{2},\frac{d+1}{2}\big)\Big)$ and $I_{\cdot}(\cdot,\cdot)$ denotes the regularized incomplete beta function.
\end{lemma}
Write $\rho_x(\tau)=nf_X(x)v_d\mathfrak{F}_d(\tau)$. Note that $nr_n^{d+1}=o(1)$ and $nr_n^{2d}=o(1)$.
(ref) implies that, as $n\to \infty$,
\begin{equation}
\sup_{(x,r)\in \mathcal{S}_n}\big|(1-p_{r}(x))^{n-2}-\exp(-\rho_x(\delta(x)/r)r^d)\big|=o(1).
\end{equation}
Plugging (ref) into (ref) gives, uniformly in $\mathcal{S}_n$,
\[
g_x(r)=(n-1)r^{d-1}\exp(-\rho_x(\delta(x)/r)r^d)f_X(x)\sigma(C_x(\delta(x)/r))(1+o(1)).
\]
The above derivation yields $\tilde{L}^{\mathrm{bd}}_{n,2,1}=\varpi(1+o(1))$, where
\[
\varpi=\int_{\{0\le \delta(x)\le r_n\}}f_X(x)\mathfrak{G}(x)\int_{\delta(x)}^{r_n}r\mathfrak{M}_d(\delta(x)/r)(n-1)r^{d-1}\exp(-\rho_x(\delta(x)/r)r^d)f_X(x)\sigma(C_x(\delta(x)/r))\mathrm{d} r \mathrm{d} x.
\]
The next step is to deduce the asymptotic expression of $\varpi$, which is of the order $n^{-2/d}$. Note that
\[
\begin{aligned}
\varpi&=\int_{\{0\le \delta(x)\le r_n\}}\mathfrak{G}(x)f_X(x)\int_{\delta(x)/r_n}^{1}\mathfrak{M}_d(\tau)(n-1)\delta(x)^{d+1}\tau^{-(d+2)}\exp(-\rho_x(\tau)\delta(x)^d\tau^{-d})f_X(x)\sigma(C_x(\tau))\mathrm{d} \tau\mathrm{d} x\\
&=(n-1)\int_0^1\mathfrak{M}_d(\tau)\sigma(C(\tau))\tau^{-(d+2)}\int_{\{0\le \delta(x)\le r_n\tau\}} \delta(x)^{d+1}\exp(-\rho_x(\tau)\delta(x)^d\tau^{-d})f_X^2(x)\mathfrak{G}(x)\mathrm{d} x\mathrm{d} \tau,
\end{aligned}
\]
where we apply the change of variable $\tau=\delta(x)/r$ in the first equality and use the Fubini theorem in the second equality, and denote $\sigma(C_x(\tau))$ by $\sigma(C(\tau))$ as $\sigma(C_x(\tau))$ does not depend on $x$. We then have the following lemma.
\begin{lemma}
We have $\varpi=\widetilde{\mathfrak{C}}_3n^{-2/d}+o(n^{-2/d})$.
\end{lemma}
This completes the proof.
Proofs for (ref)
We start by introducing the additional notation used in the following. In the following, let $\|\cdot\|_2$ be the spectral (operator) norm of a matrix, $\mathrm{Tr}(M)$ denote the trace of matrix $M$, and $\mathrm{Diag}(m_1,\ldots,m_n)$ represent an $n$-dimensional diagonal matrix with diagonal elements $m_1,\ldots,m_n$. For symmetric matrices $M_1$ and $M_2$, we write $M_1\preceq M_2$ if $M_2-M_1$ is a positive semi-definite matrix. Let $\|\cdot\|_{L^2}$ represent the $L^2(F_X)$-norm of functions.
proof[Proof of (ref)]
Write
\[
H_t \coloneqq G_{X_1}(t)\,G_{X_{N(1)}}(t) - G_{X_1}^2(t),
\quad
\hat{H}_t \coloneqq \hat{G}_{X_1}(t)\,\hat{G}_{X_{N(1)}}(t)
- \hat{G}_{X_1}^2(t),
\]
Note that
\[
\begin{aligned}
L-\hat{L}_n
&= \int \mathrm{E}\big[H_t\big]\,\mathrm{d}\mu(t)
- \int \hat{\mathrm{E}}\big[\hat{H}_t\big]\,\mathrm{d}\hat{\mu}(t)\\
&= \int \mathrm{E}\big[H_t - \hat{H}_t\big]\,\mathrm{d}\mu(t)
+ \int \big(\mathrm{E}\big[\hat{H}_t\big] - \hat{\mathrm{E}}\big[\hat{H}_t\big]\big)
\,\mathrm{d}\mu(t)
+ \bigg(
\int \hat{\mathrm{E}}\big[\hat{H}_t\big]\,\mathrm{d}\mu(t)
- \int \hat{\mathrm{E}}\big[\hat{H}_t\big]\,\mathrm{d}\hat{\mu}(t)
\bigg)\\
&=: B_1 + B_2 + B_3.
\end{aligned}
\]
The proof proceeds with the individual analysis of $B_1$, $B_2$, and $B_3$.
\refstepcounter{step}
\paragraph*{Step \thestep: Bound $B_1$.}
\if\relax\detokenize{step1:boundingB1}\relax\else\fi
We have
\[
\begin{aligned}
B_1
&= \int
\mathrm{E}\bigl[\bigl(G_{X_1}(t)-\hat{G}_{X_1}(t)\bigr)\,
\bigl(G_{X_{N(1)}}(t)-G_{X_1}(t)\bigr)\bigr]
\,\mathrm{d}\mu(t)\\
&\quad
+ \int
\mathrm{E}\bigl[\hat{G}_{X_1}(t)\,
\bigl(\bigl(G_{X_{N(1)}}(t)-\hat{G}_{X_{N(1)}}(t)\bigr)
- \bigl(G_{X_1}(t)-\hat{G}_{X_1}(t)\bigr)\bigr)\bigr]
\,\mathrm{d}\mu(t)\\
&= \int
\mathrm{E}\bigl[\bigl(G_{X_1}(t)-\hat{G}_{X_1}(t)\bigr)\,
\bigl(G_{X_{N(1)}}(t)-G_{X_1}(t)\bigr)\bigr]
\,\mathrm{d}\mu(t)\\
&\quad
+ \int
\mathrm{E}\bigl[G_{X_1}(t)\,
\bigl(\bigl(G_{X_{N(1)}}(t)-\hat{G}_{X_{N(1)}}(t)\bigr)
- \bigl(G_{X_1}(t)-\hat{G}_{X_1}(t)\bigr)\bigr)\bigr]
\,\mathrm{d}\mu(t)\\
&\quad
+ \int
\mathrm{E}\bigl[(\hat G_{X_1}(t)-G_{X_1}(t))\,
\bigl(\bigl(G_{X_{N(1)}}(t)-\hat{G}_{X_{N(1)}}(t)\bigr)
- \bigl(G_{X_1}(t)-\hat{G}_{X_1}(t)\bigr)\bigr)\bigr]
\,\mathrm{d}\mu(t)\\
&=: B_{11} + B_{12}+B_{13}.
\end{aligned}
\]
The goal is to show $|B_{1j}|=o(n^{-\frac{1}{2}})$ for $j=1,2,3$.
For the first term $B_{11}$, by Assumptions (ref)-(ref), we have
\[
\begin{aligned}
|B_{11}|
&\le \int
\mathrm{E}\bigl[\,|G_{X_1}(t)-\hat{G}_{X_1}(t)|\;
|G_{X_{N(1)}}(t)-G_{X_1}(t)|\,\bigr]
\,\mathrm{d}\mu(t)\\
&\lesssim \int
\mathrm{E}\bigl[\big\|G_{\cdot}(t)-\hat{G}_{\cdot}(t)\big\|_{\infty}\;
\sup_{t}\max_{\alpha\in \Lambda_1}\|D^\alpha G_{\cdot}(t)\|_{\infty}\;
\big\|X_{{N}(1)}-X_1\big\|\bigr]
\,\mathrm{d}\mu(t)\\
&\lesssim \sup_{t}\max_{\alpha\in \Lambda_1}\|D^\alpha G_{\cdot}(t)\|_{\infty}\,
\Bigl(\int
\mathrm{E}^{1/2}\bigl[\big\|G_{\cdot}(t)-\hat{G}_{\cdot}(t)\big\|_{\infty}^2\bigr]
\,\mathrm{d}\mu(t)\Bigr)\,
\mathrm{E}^{1/2}\bigl[\big\|X_{N(1)}-X_1\big\|^2\bigr]\\
&= o\bigl(n^{-\frac12}\bigr),
\end{aligned}
\]
where we use the Cauchy-Swartz inequality in the third inequality.
Now we consider $B_{12}$. As $\big|G_X(t)\big|$ is bounded, we have
\[
|B_{12}|\lesssim \int \mathrm{E}\big[ \big| \bigl(G_{X_{N(1)}}(t)-\hat{G}_{X_{N(1)}}(t)\bigr)
- \bigl(G_{X_1}(t)-\hat{G}_{X_1}(t)\bigr)\big| \big] \mathrm{d} \mu(t)=: \Xi.
\]
It suffices to show $\Xi=o(n^{-\frac{1}{2}})$. By the Taylor expansions of $G_{X_{N(1)}}(t)-G_{X_1}(t)$ and $\hat{G}_{X_{N(1)}}(t)-\hat{G}_{X_1}(t)$, we have, with $k=\lfloor d/2 \rfloor +1$,
\[
\begin{aligned}
&\Bigg|G_{X_{N(1)}}(t)-G_{X_1}(t)
- \sum_{\ell=1}^{k-1}\sum_{\alpha \in \Lambda_\ell}
\frac{D^\alpha G_{X_1}(t)}{\alpha!}\,
(X_{N(1)}-X_1)^\alpha\Bigg|
\lesssim \max_{\beta\in \Lambda_k}\|D^\beta G_{\cdot}(t)\|_{\infty}\,
\big\|X_{N(1)}-X_1\big\|^k,\\
&\Bigg|\hat{G}_{X_{N(1)}}(t)-\hat{G}_{X_1}(t)
- \sum_{\ell=1}^{k-1}\sum_{\alpha \in \Lambda_\ell}
\frac{D^\alpha \hat{G}_{X_1}(t)}{\alpha!}\,
(X_{N(1)}-X_1)^\alpha\Bigg|
\lesssim \max_{\beta\in \Lambda_k}\|D^\beta \hat{G}_{\cdot}(t)\|_{\infty}\,
\big\|X_{N(1)}-X_1\big\|^k,\\
&\text{ and }\\
&\Bigg|\sum_{\ell=1}^{k-1}\sum_{\alpha \in \Lambda_\ell}
\frac{D^\alpha G_{X_1}(t)}{\alpha!}\,
(X_{N(1)}-X_1)^\alpha
- \sum_{\ell=1}^{k-1}\sum_{\alpha \in \Lambda_\ell}
\frac{D^\alpha \hat{G}_{X_1}(t)}{\alpha!}\,
(X_{N(1)}-X_1)^\alpha\Bigg|\\
&\quad\lesssim
\sum_{\ell=1}^{k-1}
\max_{\alpha\in \Lambda_\ell}\|D^\alpha G_{\cdot}(t)
- D^\alpha \hat{G}_{\cdot}(t)\|_{\infty}\,
\big\|X_{N(1)}-X_1\big\|^\ell.
\end{aligned}
\]
This gives
\[
\begin{aligned}
\Xi
&\lesssim \int
\mathrm{E}\bigl[
\bigl(\max_{\beta\in \Lambda_k}\|D^\beta G_{\cdot}(t)\|_{\infty}
+ \max_{\beta\in \Lambda_k}\|D^\beta \hat{G}_{\cdot}(t)\|_{\infty}\bigr)\,
\big\|X_{N(1)}-X_1\big\|^k\bigr]
\,\mathrm{d}\mu(t)\\
&\quad
+ \sum_{\ell=1}^{k-1}
\int
\mathrm{E}\bigl[
\max_{\alpha\in \Lambda_\ell}\|D^\alpha G_{\cdot}(t)
- D^\alpha \hat{G}_{\cdot}(t)\|_{\infty}\,
\big\|X_{N(1)}-X_j\big\|^\ell\bigr]
\,\mathrm{d}\mu(t)\\
&\lesssim \Big(\int
\max_{\beta\in \Lambda_k}\|D^\beta G_{\cdot}(t)\|_{\infty}
\,\mathrm{d}\mu(t)\Big)\,
\mathrm{E}\bigl[\big\|X_{N(1)}-X_1\big\|^k\bigr]\\
&\quad
+ \Bigl(\int
\mathrm{E}^{1/2}\bigl[\max_{\beta\in \Lambda_k}\|D^\beta \hat{G}_{\cdot}(t)\|_{\infty}^2\bigr]
\,\mathrm{d}\mu(t)\Bigr)\,
\mathrm{E}^{1/2}\bigl[\big\|X_{N(1)}-X_1\big\|^{2k}\bigr]\\
&\quad
+ \sum_{\ell=1}^{k-1}
\Bigl(\int
\mathrm{E}^{1/2}\bigl[\max_{\alpha\in \Lambda_\ell}\|D^\alpha G_{\cdot}(t)
- D^\alpha \hat{G}_{\cdot}(t)\|_{\infty}^2\bigr]
\,\mathrm{d}\mu(t)\Bigr)\,
\mathrm{E}^{1/2}\bigl[\big\|X_{N(1)}-X_1\big\|^{2\ell}\bigr]\\
&= o\bigl(n^{-\frac12}\bigr),
\end{aligned}
\]
where we use again the Cauchy-Swartz inequality in the second inequality, and Assumptions (ref)-(ref) in the final step.
Lastly, we analyze $B_{13}$. It holds true that
\begin{align*}
|B_{13}| &\leq \int \mathrm{E}[(\hat G_{X_1}(t)-G_{X_1}(t))^2]\mathrm{d}\mu(t) + \int \mathrm{E}\Big|(\hat G_{X_1}(t)-G_{X_1}(t))(\hat G_{X_{N(1)}}(t)-G_{X_{N(1)}}(t))\Big|\mathrm{d}\mu(t)\\
&\leq 2\int\mathrm{E}\bigl[\big\|G_{\cdot}(t)-\hat{G}_{\cdot}(t)\big\|_{\infty}^2\bigr]
\,\mathrm{d}\mu(t)\\
&= o\bigl(n^{-\frac12}\bigr),
\end{align*}
by Assumption (ref). This completes the proof of the first step.
\refstepcounter{step}
\paragraph*{Step \thestep: Bound $B_2$.}
\if\relax\detokenize{step2:boundingB2}\relax\else\fi
We have
\[
\begin{aligned}
B_2
&= \int \mathrm{E}\bigl[\hat{G}_{X_1}(t)\,\hat{G}_{X_{N(1)}}(t)
- \hat{G}_{X_1}^2(t)\bigr]
\,\mathrm{d}\mu(t)
- \int \hat{\mathrm{E}}\bigl[\hat{G}_{X_1}(t)\,\hat{G}_{X_{N(1)}}(t)
- \hat{G}_{X_1}^2(t)\bigr]
\,\mathrm{d}\mu(t)\\
&= \int \frac1n
\sum_{i=1}^n
\left\{
\bigl(\mathrm{E}\big[\hat{G}_{X_1}(t)\hat{G}_{X_{N(1)}}(t)
- \hat{G}^2_{X_1}(t)\bigr]\bigr)
- \bigl(\hat{G}_{X_i}(t)\hat{G}_{X_{N(i)}}(t)
- \hat{G}^2_{X_i}(t)\bigr)
\right\}
\,\mathrm{d}\mu(t)\\
&= \frac1n\sum_{i=1}^n (-Z_i)=: U,
\end{aligned}
\]
where
\[
Z_i
= \int \bigl[\hat{G}_{X_i}(t)\hat{G}_{X_{N(i)}}(t)-\hat{G}^2_{X_i}(t)\bigr]\,\mathrm{d}\mu(t)-\int \mathrm{E}\bigl[\hat{G}_{X_1}(t)\hat{G}_{X_{N(1)}}(t)-\hat{G}^2_{X_1}(t)\bigr]\,\mathrm{d}\mu(t).
\]
Now the problem reduces to bounding $U$. Define
\[
\overline U \coloneqq \frac1n\sum_{i=1}^n (-\overline Z_i),
\]
where
\[
\overline Z_i
\coloneqq \int \bigl[G_{X_i}(t)G_{X_{N(i)}}(t)-G_{X_i}^2(t)\bigr]\,\mathrm{d}\mu(t)-\int \mathrm{E}\bigl[G_{X_1}(t)G_{X_{N(1)}}(t)-G^2_{X_1}(t)\bigr]\,\mathrm{d}\mu(t).
\]
Note that $\mathrm{E}\bigl[\big|U\big|\bigr]
\le \mathrm{E}\bigl[\big|\overline U - U\big|\bigr]
+ \mathrm{E}\bigl[\big|\overline U\big|\bigr]$. Therefore, to show $\mathrm{E}|B_2|=o(n^{-\frac{1}{2}})$, it suffices to show $\mathrm{E}\big[|\overline{U}|\big]=o(n^{-\frac{1}{2}})$ and $\mathrm{E}\bigl[\big|\overline U - U\big|\bigr]=o(n^{-\frac{1}{2}})$.
For $\overline U$, using the McDiarmid's inequality along with Assumption (ref)(ref) (leading to the strong convergence of NN distance to 0), Assumption (ref), and the fact that each node $i$ can be the NN of at most $O(d)$ many points, changing one input value will only incur an $o_{a.s}(1/n)$ difference in the output. This then yields
\[
\mathrm{E} |\overline U| = o(n^{-1/2}).
\]
Finally, by (ref), we have
\[
\begin{aligned}
\mathrm{E}\bigl[\big|U-\overline U\big|\bigr] \le \frac1n\sum_{i=1}^n
\mathrm{E}\bigl[\big|\overline Z_i - Z_i\big|\bigr]\lesssim \Xi = o(n^{-\frac12}).
\end{aligned}
\]
This concludes $\mathrm{E} |B_2|=o(n^{-\frac{1}{2}})$.
\refstepcounter{step}
\paragraph*{Step \thestep: Bound $B_3$.}
\if\relax\detokenize{step3:boundingB3}\relax\else\fi
We have
\[
\begin{aligned}
B_3
&=
\int \hat{\mathrm{E}}\bigl[\hat{G}_{X_1}(t)\hat{G}_{X_{N(1)}}(t)-\hat{G}_{X_1}^2(t)\bigr]\mathrm{d}\mu(t)
- \frac{1}{n}\sum_{i=1}^n\frac{1}{n-1}\sum_{j\ne i}
\bigl[\hat{G}_{X_j}(Y_i)\hat{G}_{X_{N(j)}}(Y_i)-\hat{G}_{X_j}^2(Y_i)\bigr]\\
&= \frac{1}{n}\sum_{i=1}^n(-W_i),
\end{aligned}
\]
where
\[
W_i
:= \frac{1}{n-1}\sum_{j\ne i}\Big\{
\bigl[\hat{G}_{X_j}(Y_i)\hat{G}_{X_{N(j)}}(Y_i)-\hat{G}_{X_j}^2(Y_i)\bigr]
- \int \bigl[\hat{G}_{X_j}(t)\hat{G}_{X_{N(j)}}(t)-\hat{G}_{X_j}^2(t)\bigr]\mathrm{d}\mu(t)\Big\}.
\]
Define
\[
S \coloneqq \frac{1}{n}\sum_{i=1}^n(-W_i)
\quad\text{and}\quad
\overline{S} \coloneqq \frac{1}{n}\sum_{i=1}^n(-\overline{W}_i),
\]
where
\[
\overline{W}_i
\coloneqq \frac{1}{n-1}\sum_{j\ne i}\Big\{
\bigl[G_{X_j}(Y_i)G_{X_{N(j)}}(Y_i)-G_{X_j}^2(Y_i)\bigr]
- \int \bigl[G_{X_j}(t)G_{X_{N(j)}}(t)-G_{X_j}^2(t)\bigr]\mathrm{d}\mu(t)\Big\}.
\]
For analyzing $\overline S$, we introduce $\tilde N(k)= N^{\setminus i}(k)$ to index the NN of $X_k$ in $\{X_j; j \ne i\}$ and
\[
\tilde S := \frac{1}{n}\sum_{i=1}^n(-\tilde{W}_i)
\]
with
\[
\tilde W_i:=\frac{1}{n-1}\sum_{j\ne i}
\Big\{\bigl[G_{X_j}(Y_i)G_{X_{\tilde N(j)}}(Y_i)-G_{X_j}^2(Y_i)\bigr]
- \int \bigl[G_{X_j}(t)G_{X_{\tilde N(j)}}(t)-G_{X_j}^2(t)\bigr]\mathrm{d}\mu(t)\Big\}.
\]
The new random integer $\tilde N(k)$ has the advantage of being independent of $(X_i,Y_i)$ as long as $k\ne i$, so that $\mathrm{E}(\tilde W_i)=0$, which gives us $\mathrm{E}(\tilde S) = 0$. Since $\mathrm{E}|S|\le \mathrm{E}|S-\overline{S}|+\mathrm{E}|\overline{S}-\widetilde{S}|+\mathrm{E}|\widetilde{S}|$, we analyze the three terms on the right-hand side individually.
{\bf Step 3.1.} We first show $\mathrm{E}|\widetilde{S}|=o(n^{-\frac{1}{2}})$. For this, we implement a similar argument as in (ref): using the McDiarmid's inequality along with Assumption (ref)(ref), Assumption (ref), and the fact that each node $i$ can be the NN of at most $O(d)$ many points, changing one input value will only incur an $o_{a.s}(1/n)$ difference in the output. Therefore, $\mathrm{E}|\widetilde{S}|=o(n^{-\frac{1}{2}})$.
{\bf Step 3.2.} Secondly, we show that $\mathrm{E}|\overline S-\widetilde S|=O(1/n)$. For this, we have
\[
|\overline S-\tilde S| \le \frac{4}{n(n-1)}\sum_{i=1}^n \sum_{j\ne i} \mathbbm{1}(N(j)=i)=\frac{4}{n(n-1)}\sum_{j=1}^n \sum_{i\ne j} \mathbbm{1}(N(j)=i)=\frac{4}{n-1}.
\]
Therefore, $\mathrm{E}|\overline{S}-\widetilde{S}|=O(\frac{1}{n})$.
{\bf Step 3.3.} It remains to relate $S$ to $\overline S$. To this end, similar to (ref), we can derive
\[
\mathrm{E} |S-\overline{S}| = o(n^{-\frac12}),
\]
which shows $ \mathrm{E} |B_3| = o(n^{-\frac12})$.
This concludes the first statement of the theorem. The second statement is then direct.
proof[Proof of (ref)]
Proof of this theorem is derived from the following three lemmas. The first one derives an upper bound on $\mathrm{E}\bigl[\max_{\alpha\in \Lambda_r}\big\|D^\alpha \hat{\psi}_{t,K}
- D^\alpha \psi_{t}\big\|_\infty^2\bigr]$ in terms of $\zeta_{0,K}$, $\zeta_{r,K}$, $\underline{\lambda}_K$, $K$, $n$, $\mathrm{E}\bigl[\big\|\hat{Q}^{-1}\big\|_2\bigr]$, and $\mathrm{E}\bigl[\big\|\hat{Q}^{-1}\big\|_2^2\,
\big\|Q^{-\frac12}\,\hat{Q}\,Q^{-\frac12} - I_K\big\|_2^2\bigr]$.
\begin{lemma}
In the setting of (ref), we have
\[
\mathrm{E}\bigl[\max_{\alpha\in \Lambda_r}\big\|D^\alpha \hat{\psi}_{t,K}
- D^\alpha \psi_{t}\big\|_\infty^2\bigr]
\le \zeta_{r,K}^2\,\underline{\lambda}_K^{-1}
\bigl(\eta_1 + \eta_2 + \eta_3\bigr)
+ 2\,(\vartheta_{r,K}^t)^2,
\]
where
\[
\eta_1 = \frac{1}{4}\,\zeta_{0,K}^2\,K\,n^{-1}\,
\mathrm{E}\bigl[\big\|\hat{Q}^{-1}\big\|_2\bigr],
\quad
\eta_2 = 2\,\zeta_{0,K}^6\,\underline{\lambda}_K^{-1}\,
\mathrm{E}\bigl[\big\|\hat{Q}^{-1}\big\|_2^2\,
\big\|Q^{-\frac12}\,\hat{Q}\,Q^{-\frac12} - I_K\big\|_2^2\bigr],
\quad
\eta_3 = 2\,\zeta_{0,K}^2\,\underline{\lambda}_K^{-1}\,n^{-1}.
\]
\end{lemma}
The next two lemmas derive orders of $\mathrm{E}\bigl[\big\|\hat{Q}^{-1}\big\|_2\bigr]$ and $\mathrm{E}\bigl[\big\|\hat{Q}^{-1}\big\|_2^2\,
\big\|Q^{-\frac12}\,\hat{Q}\,Q^{-\frac12} - I_K\big\|_2^2\bigr]$ in terms of $\zeta_{0,K}$, $\underline{\lambda}_K$, $K$, $n$, and $\lambda_n$.
\begin{lemma}
Let $a$ be a positive integer. Assume $\lambda_n>0$ and $\lambda_n\asymp n^{-c}$ for some $c> 0$. Furthermore, assume
\[
\zeta_{0,K}=o\Big(\left( \frac{n(\underline{\lambda}_K-\lambda_n)^2}{\log K+\log(\lambda_n^{-a})}\right) ^{\frac{1}{4}}\wedge \left( \frac{n(\underline{\lambda}_K-\lambda_n)}{\log K+\log(\lambda_n^{-a})}\right) ^{\frac{1}{2}}\Big)
\]
with $\underline{\lambda}_K>\lambda_n$ for all sufficiently large $n$. Then we have
\[
\mathrm{E}\big[\big\|\hat{Q}^{-1}\big\|_2^a\big]=O(\underline{\lambda}_K^{-a}) \text{ as } n\to \infty.
\]
\end{lemma}
\begin{lemma}
Under (ref), we have
\[
\mathrm{E}\big[\big\|\hat{Q}^{-1}\big\|_2^2\big\|Q^{-\frac{1}{2}}\hat{Q}Q^{-\frac{1}{2}}-I_K\big\|_2^2\big] \lesssim \underline{\lambda}_K^{-4}(\underline{\lambda}_K\zeta_{0,K}^2\log(K)n^{-1}+\lambda_n^2).
\]
\end{lemma}
Note that since $K/n \to 0$ and $\lambda_n\asymp n^{-c}$, we have $\log K+\log (\lambda_n^{-a})\asymp \log n$. In addition, $\zeta_{0,K} = o((n/\log n)^{1/4}(\underline{\lambda}_K - \lambda_n)^{1/2})$ implies $\zeta_{0,K} = o((n/\log n)^{1/2}(\underline{\lambda}_K - \lambda_n)^{1/2})$. Hence, (ref) implies the assumptions of (ref). Combining the three lemmas gives the result.
Proofs of supporting lemmas
proof[Proof of (ref)]
We show the first claim. Note that $E_{1,n}=\int\mathrm{E}[G_{X_1}(t)G_{X_{N(1)}}(t)]\mathrm{d} \mu(t)$ and $X_{N(1)}$ converges to $X_1$ in probability. Then by the continuity and boundedness of $G$, we have (boundedness of $G$ upgrades convergence in probability to convergence of expectations and allows to interchange limit and integral)
\[
E_{1,n}=\int\mathrm{E}[G_{X_1}(t)G_{X_{N(1)}}(t)]\mathrm{d} \mu(t) \to \int \mathrm{E}[G_{X_1}(t)^2]\mathrm{d} \mu(t).
\]
We now show the second claim. Note that
\[
\begin{aligned}
\mathrm{P}(Y_1\le Y_{N(1)}\mid X_1=x,X_{N(1)}=z)&=\mathrm{E}[\mathrm{P}(Y_1\le Y_{N(1)}\mid Y_1,X_1=x,X_{N(1)}=z)]\\
&=\int \mathrm{P}(Y_{N(1)}\ge t\mid X_{N(1)}=z)\mathrm{P}(Y_1\in \mathrm{d} t\mid X_1=x)\\
&=\int G_z(t) \mathrm{P}(Y_1\in \mathrm{d} t\mid X_1=x),
\end{aligned}
\]
and
\[
\mathrm{E}[G_x(Y_1)\mid X_1=x]=\frac{1}{2}.
\]
Therefore, we have
\[
\begin{aligned}
E_{2,n}&=\mathrm{E}[\mathrm{P}(Y_1\le Y_{N(1)}\mid X_1,X_{N(1)})]\\
&=\mathrm{E}\Big[\int G_{X_{N(1)}}(t)\mathrm{P}(Y_1\in \mathrm{d} t\mid X_1)\Big]\\
&\to \mathrm{E}\Big[\int G_{X_{1}}(t)\mathrm{P}(Y_1\in \mathrm{d} t\mid X_1)\Big]=\frac{1}{2},
\end{aligned}
\]
and the proof is thus complete.
proof[Proof of (ref)]
Write $p_r(x)\coloneqq \int_{B(x,r)\cap \mathcal{X}}f_X(u)\mathrm{d} u$. We have uniformly in $x\in \mathcal{X}_{r_n}$ and $0<r\le r_n$
\[
p_r(x)=f_X(x)v_dr^d+O(r^{d+1}).
\]
Set
\[
M_n\coloneqq \widetilde{M}_nn^{-\frac{1}{d}},~~\text{ with }
\widetilde{M}_n=\min\Big\{n^{\frac{1}{2d(d+1)}},\frac{1}{2}r_n n^{\frac{1}{d}}\Big\}.
\]
This choice gives $M_n\to 0$ and $nM_n^d\to \infty$.
Since
\[
M_n\le r_n~~ {\rm and}~~ \log(1-u)=-u-\frac{u^2}{2}+O(u^3),
\]
when $r\le M_n$ we have
\[
\log(1-p_r(x))^{n-1}=-(n-1)f_X(x)v_dr^d+O(nr^{d+1})+O(nr^{2d})
\]
uniformly in $x\in \mathcal{X}_{r_n}$ and $r\le M_n$. Since
\[
nr^{d+1}\le \widetilde{M}_n^{d+1}n^{-\frac{1}{d}}=o(1)~~ {\rm and}~~ nr^{2d}\le \widetilde{M}_n^{2d}n^{-1}=o(1),
\]
we have
\[
(1-p_r(x))^{n-1}=\exp(-nf_X(x)v_dr^d)(1+o(1))
\]
uniformly in $x\in \mathcal{X}_{r_n}$ and $r\in[0,M_n]$. Note that uniformly in $x\in \mathcal{X}_{r_n}$
\[
\int_{M_n}^\infty r\mathrm{P}(R>r\mid X_1=x)\mathrm{d} r=\int_{M_n}^{r_0}+\int_{r_0}^\mathfrak{D}\lesssim n^{-\frac{2}{d}}e^{-CnM_n^d}+e^{-Cnr_0^d}=o(n^{-2/d}).
\]
Hence,
\begin{align*}
\mathrm{E}[R^2\mid X_1=x]&=2\int_0^\infty r\Pr(R>r\mid X_1=x)\mathrm{d} r\\
&=2\int_0^{M_n} r(1-p_r(x))^{n-1}\mathrm{d} r+o(n^{-\frac{2}{d}})\\
&=2(1+o(1))\int_0^{M_n}r\exp(-nv_df_X(x)r^d)\mathrm{d} r+o(n^{-\frac{2}{d}})\\
&=2(1+o(1))\int_0^\infty r\exp(-nv_df_X(x)r^d)\mathrm{d} r+o(n^{-\frac{2}{d}})\\
&=\Gamma(1+2/d)(v_df_X(x)n)^{-\frac{2}{d}}+o(n^{-\frac{2}{d}}),
\end{align*}
uniformly in $x\in \mathcal{X}_{r_n}$.
proof[Proof of (ref)]
Define
\[
\varepsilon_n\coloneqq \sup_{\|h\|\le r_n,|\delta(x)|\le r_n}\frac{|\delta(x+h)-\delta(x)-\nabla\delta(x)\cdot h|}{\|h\|}.
\]
By (ref), delfour2011shapes implies that function $x\mapsto\delta(x)$ is $C^{1,1}$ locally near the boundary. Since $\partial \mathcal{X}$ is compact, we can obtain a finite cover of $\partial \mathcal{X}$ so that we obtain a uniform tube radius $r_*>0$ and a uniform Lipschitz constant for $\nabla \delta$ on $\{|\delta|<r_*\}$. Therefore, $\varepsilon_n\downarrow 0$ as $n\to \infty$ and for sufficiently large $n$, it holds for $0\le r\le r_n$
\[
\sup_{\|\xi\|=1,|\delta(x)|\le r_n}|\delta(x+r\xi)-(\delta(x)+r\xi\cdot\nabla \delta(x))|\le r\varepsilon_n.
\]
If $\xi\in A_x(r)\setminus C_x(r)$, then
\[
0\le \delta(x+r\xi)\le \delta(x)+r\xi\cdot \nabla \delta(x)+r\varepsilon_n
\]
and thus
\[
\delta(x)+r\xi\cdot\nabla \delta(x)\geq -r\varepsilon_n.
\]
If $\xi\in C_x(r)\setminus A_x(r)$, then
\[
0> \delta(x+r\xi)\ge \delta(x)+r\xi\cdot \nabla \delta(x)-r\varepsilon_n
\]
and thus
\[
\delta(x)+r\xi\cdot\nabla \delta(x)< r\varepsilon_n.
\]
Therefore, when $0\le \delta(x)\le r\le r_n$, we have
\[
A_x(r)\,\triangle\, C_{x}(r)\subseteq M_x(r)\coloneqq\{\xi\in \mathbb{S}^{d-1}:|\delta(x)+r\xi\cdot\nabla \delta(x)|\le r\varepsilon_n\}.
\]
Note that when $d\ge 2$
\[
\begin{aligned}
\sup_{0\le \delta(x)\le r\le r_n} \sigma(M_x(r))&=\sup_{0\le \delta(x)\le r\le r_n}\int \mathbbm{1}(y\in M_x(r))\mathrm{d} \sigma(y)\\
&\le \sigma(\mathbb{S}^{d-2})\sup_{0\le \delta(x)\le r\le r_n}\int_{-\delta(x)/r-\varepsilon_n}^{-\delta(x)/r+\varepsilon_n}(1-u^2)^{\frac{d-3}{2}}\mathrm{d} u=O(\varepsilon_n\vee \sqrt{\varepsilon_n})=o(1).
\end{aligned}
\]
When $d=1$, $\sigma(A_x(r)\,\triangle\, C_{x}(r))=0$ for all $0\le \delta(x)<r\le r_n$.
proof[Proof of (ref)]
First note that
\[
|B(x,r)\cap \mathcal{X}|=r^d\int_{B(0,1)}\mathbbm{1}(x+ru\in \mathcal{X})\mathrm{d} u=r^d\int_{B(0,1)}\mathbbm{1}(\delta(x+ru)\ge 0)\mathrm{d} u.
\]
Similar to the proof of (ref), we have
\[
H_{\tau-\varepsilon_n}\subseteq \{u:\delta(x+ru)\ge 0\}\subseteq H_{\tau+\varepsilon_n},
\]
where $H_{\tau}\coloneqq \{u\in B(0,1):u\cdot \nabla \delta(x)\ge -\tau\}$ for $\tau\coloneqq \delta(x)/r \in [0,1]$.
Therefore,
\[
\{u:\delta(x+ru)\ge 0\}\,\triangle\, H_{\tau}\subseteq (H_{\tau+\varepsilon_n}\setminus H_{\tau})\cup (H_{\tau}\setminus H_{\tau-\varepsilon_n})\subseteq \widetilde{H}_{\tau},
\]
where $\widetilde{H}_{\tau}=\{u:|u\cdot \nabla\delta(x)+\tau|\le \varepsilon_n\}$. Thus,
\[
\Big|\int_{B(0,1)}\mathbbm{1}(\delta(x+ru)\ge 0)\mathrm{d} u-\int_{B(0,1)}\mathbbm{1}(u\in H_{\tau})\mathrm{d} u\Big|\le |\widetilde{H}_{\tau}|.
\]
Write $u=\alpha \nabla\delta(x)+w$ with $w$ orthogonal to $\nabla \delta(x)$ and $\alpha=u\cdot\nabla \delta(x)\in (-1,1)$. Then
\[
\begin{aligned}
|\widetilde{H}_\tau|&=\int_{\{\alpha:|\alpha+\tau|\le \varepsilon_n\}} |B_{d-1}(0,\sqrt{1-\alpha^2})|\mathrm{d} \alpha\\
&= \int_{\{\alpha:|\alpha+\tau|\le \varepsilon_n\}} v_{d-1}(1-\alpha^2)^{\frac{d-1}{2}}\mathrm{d} \alpha\\
&\le 2v_{d-1}\varepsilon_n.
\end{aligned}
\]
In addition, note that
\[
\int_{B(0,1)}\mathbbm{1}(u\in H_{\tau})\mathrm{d} u=|B(0,1)\cap H_\tau|=v_d\frac{\int^1_{-\tau}(1-u^2)^{\frac{d-1}{2}}\mathrm{d} u}{\int^1_{-1}(1-u^2)^{\frac{d-1}{2}}\mathrm{d} u}=\frac{1}{2}v_d\Big(1+I_{\tau^2}\Big(\frac{1}{2},\frac{d+1}{2}\Big)\Big).
\]
Hence, we have
\[
\sup_{(x,r)\in \mathcal{S}_n}\Bigg|\frac{|B(x,r)\cap \mathcal{X}|-v_d\mathfrak{F}_d(\delta(x)/r)r^d}{r^d}\Bigg|=o(1)
\]
and the proof is thus complete.
proof[Proof of (ref)]
For sufficiently large $n$, define $\Psi:\partial\mathcal{X}\times [0,r_n]\to \mathcal{X}$ such that
\[
\Psi(y,s)=y+s\mathbf{n}(y),
\]
where $\mathbf{n}(y)$ is the inward normal at $y$. By (ref), $\Psi$ is well defined and a $C^1$-diffeomorphism onto its image $\{x:0\le \delta(x)\le r_n\}$. Then we have, by the change-of-variable formula,
\[
\begin{aligned}
&n\int_{\{0\le \delta(x)\le r_n\tau\}} \delta(x)^{d+1}\exp(-\rho_x(\tau)\delta(x)^d\tau^{-d})f_X^2(x)\mathfrak{G}(x)\mathrm{d} x\\
=& n\int_{\partial \mathcal{X}}\int_0^{r_n\tau} s^{d+1}\exp(-\rho_{y+s\mathbf{n}(y)}(\tau)s^{d}\tau^{-d})f_X^2(y+s\mathbf{n}(y))\mathfrak{G}(y+s\mathbf{n}(y))J_{\Psi}(y,s)\mathrm{d} s \mathrm{d} \mathcal{H}^{d-1}(y)\\
=:& \Upsilon(\tau),
\end{aligned}
\]
where $J_\Psi$ denotes the Jacobian of $\Psi$. Note that from the conditions on $f_X$ and $G$ and the inequality
\[
e^{-a}-e^{-b}\le e^{-\min\{a,b\}}|a-b| ~~\text{ for }a,b\ge 0,
\]
it holds true, with constants $C$ and $c$ independent of $y,s,\tau$ for all $s,y$ and $\tau\in (0,1]$,
\[
\begin{aligned}
|f_X^2(y+s\mathbf{n}(y))\mathfrak{G}(y+s\mathbf{n}(y))-f_X^2(y)\mathfrak{G}(y)|&\le Cs \quad \text{ and }\\
|\exp\big(-\rho_{y+s\mathbf{n}(y)}(\tau)s^d\tau^{-d}\big)-\exp\big(-\rho_{y}(\tau)s^d\tau^{-d}\big)|&\le C s^{d+1}\tau^{-d}n\exp(-c\rho_y(\tau)s^d\tau^{-d}).
\end{aligned}
\]
In addition, by (ref), we have
\[
|J_{\Psi}(y,s)-1|\le Cs~~\text{ for }(y,s)\in \partial \mathcal{X}\times [0,r_n].
\]
Therefore, we have
\[
\Upsilon(\tau)=n\int_{\partial \mathcal{X}}\int_0^{r_n\tau} s^{d+1}\exp(-\rho_{y}(\tau)s^{d}\tau^{-d})f_X^2(y)\mathfrak{G}(y)\mathrm{d} s\mathrm{d} \mathcal{H}^{d-1}(y)+\mathcal{E}_n(\tau),
\]
and by the choice of $r_n$, uniformly in $\tau \in (0,1]$
\[
\begin{aligned}
|\mathcal{E}_n(\tau)|&\le Cn\int_{\partial \mathcal{X}}\int_0^{r_n\tau} ns^{2d+2}\tau^{-d}\exp\big(-c\rho_y(\tau)s^d\tau^{-d}\big)+s^{d+2}\exp\big(-c\rho_y(\tau)s^d\tau^{-d}\big)\mathrm{d} s\mathrm{d} \mathcal{H}^{d-1}(y)\\
&\lesssim n^2r_n^{2d+3}=o(n^{-2/d}).
\end{aligned}
\]
The remaining task is to evaluate the main term of $\Upsilon(\tau)$. First note that for $a,m>0$, we have
\[
\int^r_0 s^m \exp(-as^d)\mathrm{d} s=a^{-\frac{1+m}{d}}d^{-1}\gamma\Big(\frac{1+m}{d},ar^d\Big),
\]
where $\gamma(\cdot,\cdot)$ is the lower incomplete gamma function. Therefore, we have
\[
\int_0^{r_n\tau} s^{d+1}\exp(-\rho_y(\tau)\tau^{-d}s^d)\mathrm{d} s= d^{-1}\big(\rho_y(\tau)\tau^{-d}\big)^{-(1+2/d)}\gamma(1+2/d,\rho_y(\tau)r_n^d).
\]
Note that $\gamma(1+2/d,\rho_y(\tau)r_n^d)=\Gamma(1+2/d)+o(1)$ uniformly in $\tau$ and $y$. So the main term of $\Upsilon(\tau)$ is uniformly in $\tau$
\[
\Upsilon(\tau)-\mathcal{E}_n(\tau)
=d^{-1}\Gamma(1+2/d)n\int_{\partial \mathcal{X}} f_X^2(y) \mathfrak{G}(y) \big(\rho_y(\tau)\tau^{-d}\big)^{-(1+2/d)}\mathrm{d} \mathcal{H}^{d-1}(y)(1+o(1)).
\]
Since $nf_X(y)\big(\rho_y(\tau)\tau^{-d}\big)^{-(1+2/d)}=n^{-2/d}f_X(y)^{-2/d}\big(v_d\mathfrak{F}_d(\tau)\tau^{-d}\big)^{-(1+2/d)}$, it holds true that
\[
\int_0^1 \mathfrak{M}_d(\tau)\sigma(C(\tau))\tau^{-(d+2)}n\big(\rho_y(\tau)\tau^{-d}\big)^{-(1+2/d)}\mathrm{d} \tau\asymp n^{-2/d} \int_0^1 \mathfrak{M}_d(\tau)\sigma(C(\tau))\mathfrak{F}_d(\tau)^{-(1+2/d)}\mathrm{d} \tau,
\]
where the integral $\int_0^1 \mathfrak{M}_d(\tau)\sigma(C(\tau))\mathfrak{F}_d(\tau)^{-(1+2/d)}\mathrm{d} \tau$ is finite, and
\[
\begin{aligned}
&\int_{0}^1 \mathfrak{M}_d(\tau)\sigma(C(\tau))\tau^{-(d+2)} (\Upsilon(\tau)-\mathcal{E}_n(\tau))\mathrm{d} \tau \\
&= n^{-2/d}d^{-1}\Gamma(1+2/d)\int_{0}^{1} \mathfrak{M}_d(\tau)\sigma(C(\tau))\big(v_d\mathfrak{F}_d(\tau)\big)^{-(1+2/d)}\mathrm{d} \tau\int_{\partial \mathcal{X}}f_X(y)^{1-2/d}\mathfrak{G}(y)\mathrm{d} \mathcal{H}^{d-1}(y)+o(n^{-2/d}).
\end{aligned}
\]
We now compute the integral
\[
\int_{0}^{1} \mathfrak{M}_d(\tau)\sigma(C(\tau))\mathfrak{F}_d(\tau)^{-(1+2/d)}\mathrm{d} \tau.
\]
By rotation, assume $\nabla \delta(x)=e_d=(0,\ldots,0,1 )\in\mathbb{R}^d$. In this case, we can write
\[
C(\tau)=\{\xi\in \mathbb{S}^{d-1}:\xi_d\ge -\tau\}.
\]
For $d\ge 2$, write $\xi=(\sqrt{1-u^2}w,u)$ with $u\in[-1,1]$ and $w\in \mathbb{S}^{d-2}$. By the symmetry of the first $(d-1)$-coordinates of $C_x(r)$, we have
\begin{align*}
\int_{C(\tau)}\xi \mathrm{d} \sigma(\xi)&=\int_{-\tau}^1 \int_{\mathbb{S}^{d-2}}(\sqrt{1-u^2}w,u)(1-u^2)^{\frac{d-3}{2}}\mathrm{d} \sigma_{d-2}(w)\mathrm{d} u\\
&=\sigma_{d-2}(\mathbb{S}^{d-2})\Big(\int_{-\tau}^1 u(1-u^2)^{\frac{d-3}{2}}\mathrm{d} u\Big)e_d,
\end{align*}
which implies $\mathfrak{M}_d(\tau)\sigma(C(\tau))=v_{d-1}(1-\tau^2)^{\frac{d-1}{2}}$.
Also note that $\mathfrak{F}_d^\prime(\tau)=v_{d-1}v_d^{-1}(1-\tau^2)^{\frac{d-1}{2}}$. Therefore, $\mathfrak{M}_d(\tau)\sigma(C(\tau))=v_d\mathfrak{F}_d^\prime (\tau)$. When $d=1$, after rotation, we have $C_x(r)=\{\xi \in \{-1,1\}:\xi \ge -\tau\}$. Note that
\[
\int_{C_x(r)}\xi \mathrm{d} \sigma=\sum_{\xi\in C_x(r)} \xi =\mathbbm{1}(0\le \tau <1)\quad \text{ and }\quad
\int_{C_x(r)}\ \mathrm{d} \sigma=\#C_x(r)=2-\mathbbm{1}(0\le \tau <1).
\]
Hence, $\mathfrak{M}_1(\tau)\sigma(C(\tau))=\mathbbm{1}(0\le \tau<1)$. Also note that $\mathfrak{F}_1(\tau)=\frac{1}{2}(1+\tau)$ and $v_1\mathfrak{F}_1^\prime(\tau)=1$ for $\tau\in (0,1)$. Therefore, for $\tau\in (0,1)$, it holds $\mathfrak{M}_1(\tau)\sigma(C(\tau))=v_1\mathfrak{F}_1^\prime(\tau)$. Hence, for $d\ge 1$
\[
\int_{0}^{1} \mathfrak{M}_d(\tau)\sigma(C(\tau))\mathfrak{F}_d(\tau)^{-(1+2/d)}\mathrm{d} \tau=v_d\int_0^1 \mathfrak{F}_d^\prime(\tau)\mathfrak{F}_d(\tau)^{-(1+2/d)}\mathrm{d} \tau=\frac{dv_d}{2}(2^{2/d}-1),
\]
where we use the facts that
\[
\frac{\mathrm{d}}{\mathrm{d} \tau}\mathfrak{F}_d(\tau)^{-2/d}=-\frac{2}{d}\mathfrak{F}_d^\prime(\tau)\mathfrak{F}_d(\tau)^{-(1+2/d)}~~~{\rm and}~~~ \mathfrak{F}_d(1)=1 \text{ and }\mathfrak{F}_d(0)=\frac{1}{2}.
\]
Overall, we have
\[
\varpi=\int_{0}^1 \mathfrak{M}_d(\tau)\sigma(C(\tau))\tau^{-(d+2)} \Upsilon(\tau)\mathrm{d} \tau=\widetilde{\mathfrak{C}}_3 n^{-2/d}+o(n^{-2/d}),
\]
where
\[
\widetilde{\mathfrak{C}}_3=\frac{1}{2}(2^{2/d}-1)v_d^{-2/d}\Gamma(1+2/d)\int_{\partial \mathcal{X}} f_X(y)^{1-2/d}\mathfrak{G}(y)\mathrm{d} \mathcal{H}^{d-1}(y).
\]
This completes the proof.
lemmaSuppose (ref). Then there exist constants $r_0>0$ and $c_0\in (0,1)$ such that for every $x\in \mathcal{X}$ and $0\le r\le r_0$, $|\mathcal{X}\cap B(x,r)|\ge c_0v_dr^d$.
proof[Proof of (ref)]
By Grisvard11Elliptic_nonsmooth_domains, there exist $\theta\in(0,\frac{\pi}{2}]$ and $h^*>0$ such that for every $y\in \partial\mathcal{X}$ there is a new coordinate for which $y-\mathcal{C}_{\theta,h^*}\subseteq \mathcal{X}$ where $\mathcal{C}_{\theta,h^*}\coloneqq \{(z^\prime,z_d):(\cot\theta)\|z^\prime\|<z_d<h^*\}$.
Fix $y\in \partial \mathcal{X}$. Let $0<\rho\le r_0\coloneqq \min\{\frac{h^*}{2},1\}$. Set $s\coloneqq \frac{\rho}{2}$ and take the point $z\coloneqq y-(0,\ldots,0,s)$. We show for $\kappa\coloneqq \frac{1}{4}\min \{1,\frac{1}{1+\cot\theta}\}$, it holds
\begin{equation}
B(z,\kappa \rho)\subseteq (y-\mathcal{C}_{\theta,h^*})\cap B(y,\rho)\subseteq \mathcal{X}\cap B(y,\rho).
\end{equation}
For any $w\in B(z,\kappa \rho)$, we can write $w=y-(w^\prime,w_d)$ with $\|(w^\prime,w_d)-(0,s)\|<\kappa \rho$. Then $\|w^\prime\|<\kappa \rho$ and $|w_d-s|<\kappa \rho$. Therefore, by the choice of $\kappa$
\[
(\cot\theta)\|w^\prime
\|< (\cot\theta)\kappa \rho<s-\kappa \rho< w_d.
\]
Since $w_d<\kappa \rho+s$ and $\kappa \rho\le s\le \frac{h^*}{2}$, it yields $w_d<h^*$. Hence, $w$ satisfies the cone inequality and $w\in y-\mathcal{C}_{\theta,h^*}$. Note that $\|w-y\|\le \|z-y\|+\kappa \rho=s+\kappa \rho< \rho$. So $w\in B(y,\rho)$.
Now take arbitrary $x\in \mathcal{X}$ and $0<r\le r_0$. If $\delta(x)\ge \frac{r}{2}$, then $B(x,\frac{r}{2})\subseteq \mathcal{X}$ and $|B(x,r)\cap \mathcal{X}|\ge 2^{-d}v_dr^d$. Otherwise, pick $y\in \partial \mathcal{X}$ with $\|x-y\|=\delta(x)<\frac{r}{2}$. Apply (ref) with $\rho=\frac{r}{2}$ to get
\[
B\big(z,\frac{\kappa}{2}r\big)\subseteq \mathcal{X}\cap B\big(y,\frac{r}{2}\big)\subseteq \mathcal{X}\cap B(x,r).
\]
Hence, $|B(x,r)\cap \mathcal{X}|\ge \big(\frac{\kappa}{2}\big)^d v_dr^d$. Setting $c_0\coloneqq \min\{2^{-d},\big(\frac{\kappa}{2}\big)^d\}$ gives $|\mathcal{X}\cap B(x,r)|\ge c_0v_dr^d$.
lemmaSuppose (ref). Then there exists a constant $C>0$ such that for all $0\le r\le r_0$
\[
\mathrm{P}(\delta(X_1)\le r)\le \|f_X\|_{\infty}\big|\{x\in \mathcal{X}: \delta(x)\le r\}\big|\le Cr.
\]
proof[Proof of (ref)]
Since $\mathcal{X}$ is compact and has Lipschitz boundary, up to a rigid motion, there exist finitely many open sets $U_i=V_i\times (a_i,b_i)$ with open set $V_i\subseteq \mathbb{R}^{d-1}$, covering $\partial \mathcal{X}$ such that
\[
\mathcal{X}\cap U_i=\{(v,t)\in V_i\times (a_i,b_i): t\ge \varphi_i(v)\},
\]
where $\varphi_i:V_i\to \mathbb{R}$ are $\mathcal{L}$-Lipschitz such that $\varphi_i(V_i)\subseteq (a_i+\varepsilon,b_i-\varepsilon)$ for some small $\varepsilon>0$.
When $r\le r_*$ is small enough, since $\varphi_i$ is $\mathcal{L}$-Lipschitz, it holds for some constant $c_\mathcal{L}$
\[
\{x\in \mathcal{X}\cap U_i:\delta(x)\le r\}\subseteq \{(v,t):v\in V_i, \varphi_i(v)\le t\le \varphi_i(v)+c_\mathcal{L} r\}.
\]
Indeed, take a point $x=(v,\varphi_i(v)+s)\in \mathcal{X}\cap U_i$ with height $s>0$ above the boundary graph. For any boundary point $z=(v^\prime,\varphi_i(v^\prime))\in \partial \mathcal{X}\cap U_i$,
\[
\begin{aligned}
\|x-z\|^2&=\|v-v^\prime\|^2+(\varphi_i(v)+s-\varphi_i(v^\prime))^2\\
&\ge \|v-v^\prime\|^2+(s-|\varphi_i(v)-\varphi_i(v^\prime)|)^2\\
&\ge \|v-v^\prime\|^2+(s-\mathcal{L}\|v-v^\prime\|)^2\\
& =(1+\mathcal{L}^2)\|v-v^\prime\|^2-2s \mathcal{L}\|v-v^\prime\|+s^2\eqcolon g(\|v-v^\prime\|).
\end{aligned}
\]
The quadratic function $g$ has minimum value $\frac{s^2}{1+\mathcal{L}^2}$. Therefore,
\[
\delta(x)\ge \frac{s}{\sqrt{1+\mathcal{L}^2}}=: \frac{s}{c_\mathcal{L}}.
\]
To ensure the vertical strip stays inside the cylinder $V_i\times (a_i,b_i)$ for all $v\in V_i$, pick $0<r_*< \frac{\varepsilon}{c_\mathcal{L}}$. Therefore, if $\delta(x)\le r\le r_*$, then we have $0<s\le c_\mathcal{L} r$, which is equivalent to
\[
\Big\{x\in \mathcal{X}\cap U_i:\delta(x)\le r\Big\}\subseteq \Big\{(v,t):v\in V_i, \varphi_i(v) \le t\le \varphi_i(v)+c_\mathcal{L} r\Big\}.
\]
We then have the following Euclidean volume bound
\[
|\{x\in \mathcal{X}\cap U_i:\delta(x)\le r\}|\le \int_{V_i}\int_{\varphi_i(v)}^{\varphi_i(v)+c_Lr} \mathrm{d} t\mathrm{d} v\le c_\mathcal{L}|V_i|r.
\]
Thus
\[
|\{x\in \mathcal{X}:\delta(x)\le r\}|\le c_{\mathcal{L}}\sum_i\lambda_{d-1}(V_i) r\le Cr.
\]
Hence,
\[
\mathrm{P}(\delta(X)\le r)=\int_{\delta\le r}f_X(x)\mathrm{d} x\le \|f_X\|_{\infty}|\{\delta\le r\}|\le Cr.
\]
For $r_*<r\le r_0$, we use the trivial bound $\mathrm{P}(\delta(X)\le r)\le 1\le \frac{1}{r_*}r$. Overall, for all $0\le r\le r_0$, we obtain the linear bound
\[
\mathrm{P}(\delta(X)\le r)\le Cr
\]
and thus complete the proof of this lemma.
lemmaLet $\mathcal{X}\subseteq \mathbb{R}^d$ be compact with Lipschitz boundary $\partial \mathcal{X}$. Fix $x\in \mathbb{R}^d$. For $r>0$, define the sphere $S_r(x)\coloneqq \{u\in \mathbb{R}^d:\|u-x\|=r\}=\partial B(x,r)$ and the set of directions $\Pi_r(x)\coloneqq\{\xi\in \mathbb{S}^{d-1}:x+r\xi \in \partial \mathcal{X}\}$. Then
\[
\mathcal{H}^{d-1}(\partial \mathcal{X} \cap S_r(x))=0 \quad \text{ and } \quad \sigma(\Pi_r(x))=0 \quad \text{ for a.e.\ } r>0.
\]
proof[Proof of (ref)]
Since $\mathcal{X}$ is compact and has Lipschitz boundary, $\mathcal{H}^d(\partial \mathcal{X})=0$. Define $\varphi:\mathbb{R}^d\to \mathbb{R}$, $\varphi(u)\coloneqq \|u-x\|$. It is $1$-Lipschitz with $|\nabla \varphi(u)|=1$ for all $u\ne x$. By the coarea formula evans2015measure, we have
\[
0=\mathcal{H}^d(\partial \mathcal{X})= \int_{\partial \mathcal{X}} \mathrm{d} u=\int_0^\infty \mathcal{H}^{d-1}(\partial \mathcal{X} \cap S_r(x)) \mathrm{d} r.
\]
Since $\mathcal{H}^{d-1}(\partial \mathcal{X} \cap S_r(x))$ is nonnegative, it holds $\mathcal{H}^{d-1}(\partial \mathcal{X} \cap S_r(x))=0$ for a.e.\ $r>0$.
The map $\Psi_r:\mathbb{S}^{d-1}\to S_r(x)$, defined as $\Psi_r(\xi)=x+r\xi$, is a $C^\infty$-diffeomorphism with Jacobian $r^{d-1}$. Thus, $\Psi_r$ pushforwards surface measure $\sigma$ on $\mathbb{S}^{d-1}$ to $r^{-(d-1)}\mathcal{H}^{d-1}$ on $S_r(x)$. Hence, for a.e.\ $r>0$, we have
\[
\sigma(\Pi_r(x))=\sigma(\{\xi:x+r\xi\in \partial \mathcal{X}\})=r^{-(d-1)}\mathcal{H}^{d-1}(\partial \mathcal{X} \cap S_r(x))=0
\]
and thus complete the proof.
lemma[Conditional density]
For $n\ge 2$, let $X_1,\ldots,X_n$ be i.i.d.\ in $\mathbb{R}^d$ with density $f_X$ and support $\mathcal{X}\subseteq \mathbb{R}^d$. Assume that $\mathcal{X}$ has Lipschitz boundary and there exists a continuous function $f\in C(\mathbb{R}^d)$ such that $f=f_X$ a.e.\ on $\mathcal{X}$. Fix $x\in \mathcal{X}$ and for $r\ge 0$ define
\[
p_r(x)\coloneqq\int_{B(x,r)\cap \mathcal{X}} f_X(t)\mathrm{d} t, \quad A_x(r)\coloneqq \Big\{\xi \in \mathbb{S}^{d-1}:x+r\xi \in \mathcal{X}\Big\}
\]
and
\[
R\coloneqq \min_{2\le j\le n}\|X_j-X_1\|, \quad \Xi\coloneqq \frac{X_{N(1)}-X_1}{\|X_{N(1)}-X_1\|}\in \mathbb{S}^{d-1}.
\]
Then we have:
\begin{enumerate}[itemsep=0pt,label=(\roman*)]
• the joint conditional density of $(R,\Xi)$ given $X_1=x$ with respect to $\mathrm{d} r\mathrm{d} \sigma(\xi)$, is
\[
g_{x}(r,\xi)=(n-1)r^{d-1}(1-p_r(x))^{n-2}f_X(x+r\xi)\mathbbm{1}(\xi \in A_x(r));
\]
• the conditional density of $\Xi$ given $R=r$ and $X_1=x$ with respect to $\sigma$ is
\[
\pi_{r,x}(\xi)=\frac{f_X(x+r\xi)\mathbbm{1}(\xi\in A_x(r))}{\int_{A_x(r)} f_X(x+r\zeta)\mathrm{d} \sigma(\zeta)}.
\]
\end{enumerate}
proof[Proof of (ref)]
For Borel set $A\subseteq \mathbb{S}^{d-1}$ and $ \varepsilon >0$, define
\[
S_{r, \varepsilon}(x;A)\coloneqq \{x+s\xi:r\le s<r+ \varepsilon,\xi \in A\}.
\]
Set
\[
\begin{aligned}
q_{r, \varepsilon}(x;A)\coloneqq \mathrm{P}(X_2\in S_{r, \varepsilon}(x;A)\cap \mathcal{X})&=\int_{S_{r,\varepsilon}(x;A)\cap \mathcal{X}} f_X(t)\mathrm{d} t\\
&=\int_{r}^{r+ \varepsilon} s^{d-1} \int_A h_s(\xi) \mathrm{d} \sigma(\xi)\mathrm{d} s,
\end{aligned}
\]
where
\[
h_s(\xi):=f(x+s\xi)\mathbbm{1}(x+s\xi \in \mathcal{X}).
\]
Note that $h_s(\xi) \to h_r(\xi)$ as $s\downarrow r$ pointwise for every $\xi$ such that $x+r\xi \in \mathcal{X}\setminus \partial \mathcal{X}$. (ref) implies
\[
\sigma(\{\xi\in \mathbb{S}^{d-1}:x+r\xi \in \partial \mathcal{X}\})=0 ~~\text{ for a.e. } r>0.
\]
So, $h_s\to h_r$ as $s\downarrow r$ $\sigma$-a.e.\ for a.e.\ $r>0$. Fix a small $ \varepsilon_0>0$ and consider
\[
\mathcal{K}\coloneqq \{x+s\xi:s\in [r,r+ \varepsilon_0],\xi\in \mathbb{S}^{d-1}\}.
\]
Then $\mathcal{K}\cap \mathcal{X}$ is compact. By the continuity of $f$, we have
\[
\sup_{x\in \mathcal{K}\cap \mathcal{X}}f(x)<\infty.
\]
Note that for every $s\in [r,r+ \varepsilon_0]$, the function $h_s$ is dominated by $\sup_{x\in \mathcal{K}\cap \mathcal{X}}f(x)$ and
\[
\frac{1}{ \varepsilon}\int_r^{r+ \varepsilon}s^{d-1}\mathrm{d} s\to r^{d-1}~~\text{ as } \varepsilon \downarrow 0.
\]
Then, the dominated convergence theorem gives
\[
\frac{q_{r, \varepsilon}(x;A)}{ \varepsilon}\to r^{d-1}\int_{A\cap A_x(r)}f_X(x+r\xi) \mathrm{d} \sigma(\xi) \quad \text{ as } \varepsilon\downarrow 0.
\]
It means that
\[
q_{r, \varepsilon}(x;A)= \varepsilon r^{d-1}\int_{A\cap A_x(r)}f_X(x+r\xi) \mathrm{d} \sigma(\xi)+o( \varepsilon) \quad \text{ as } \varepsilon\downarrow 0.
\]
Set
\[
\chi_{r}\coloneqq \sum_{j=2}^n \mathbbm{1}(X_j\in B(x,r)\cap \mathcal{X})~~~{\rm and }~~~\chi^\prime_{r, \varepsilon}(A)\coloneqq \sum_{j=2}^n \mathbbm{1}(X_j\in S_{r, \varepsilon}(x;A)\cap \mathcal{X}).
\]
We then have, when $ \varepsilon>0$ is sufficiently small,
\[
\begin{aligned}
\mathrm{P}(\Xi\in A, R\in [r,r+ \varepsilon)\mid X_1=x)&=\mathrm{P}\Big(\chi_r=0,\chi_{r, \varepsilon}^\prime(\mathbb{S}^{d-1})\ge 1, \frac{X_{N(1)}-x}{\|X_{N(1)}-x\|}\in A\Big)\\
&= \mathrm{P}\Big(\chi_r=0,\chi_{r, \varepsilon}^\prime(\mathbb{S}^{d-1})= 1, \frac{X_{N(1)}-x}{\|X_{N(1)}-x\|}\in A\Big)+O( \varepsilon^2)\\
&= \sum_{j=2}^n \mathrm{P}(X_j\in S_{r, \varepsilon}(x;A),[X_k\notin B(x,r)\cup S_{r, \varepsilon}(x;\mathbb{S}^{d-1})]_{k\ne j})+O( \varepsilon^2)\\
&= (n-1)q_{r, \varepsilon}(x;A)(1-p_r(x)-q_{r, \varepsilon}(x))^{n-2}+O( \varepsilon^2)\\
&= (n-1)q_{r, \varepsilon}(x;A)(1-p_r(x))^{n-2}+O( \varepsilon^2)
\end{aligned}
\]
since $\mathrm{P}(\chi_{r, \varepsilon}^\prime(\mathbb{S}^{d-1})\ge 2)=\binom{n-1}{2}q_{r, \varepsilon}(x;\mathbb{S}^{d-1})^2=O( \varepsilon^2)$ and $X_1,\ldots,X_n$ are i.i.d.. Dividing both sides by $ \varepsilon$ and sending $ \varepsilon \downarrow 0$ give the joint density of $(R,\Xi)$ given $X_1=x$, with respect to $\mathrm{d} r\mathrm{d} \sigma(\xi)$, which is
\[
g_{x}(r,\xi)=(n-1)r^{d-1}(1-p_r(x))^{n-2}f_X(x+r\xi)\mathbbm{1}(\xi \in A_x(r)).
\]
The second claim is obvious from the first one.
lemmaLet $a\ge 0$ be an integer. Then for any $c\in (0,1)$
\[
\int_{x}^\infty r^ae^{-nr^d}\mathrm{d} r\lesssim n^{-\frac{a+1}{d}}e^{-cnx^{d}}.
\]
proof[Proof of (ref)]
Note that
\[
\begin{aligned}
\int_{x}^\infty r^a e^{-nr^d}\mathrm{d} r &= \int_{nx^d}^\infty \Big(\frac{t}{n}\Big)^{\frac{a}{d}} e^{-t}d^{-1}n^{-\frac{1}{d}}t^{\frac{1}{d}-1}\mathrm{d} t \qquad && (t\coloneqq nr^d)\\
&= d^{-1}n^{-\frac{a+1}{d}} \int_{nx^d}^\infty t^{\frac{1+a}{d}-1}e^{-t}\mathrm{d} t\\
&= d^{-1}n^{-\frac{a+1}{d}} \Gamma\Big(\frac{1+a}{d},nx^d\Big).
\end{aligned}
\]
We now analyze the Gamma function: for $0<\varepsilon<1$
\[
\Gamma(s,x)=\int_x^\infty t^{s-1}e^{-t}\mathrm{d} t\le C \int_x^\infty e^{-(1-\varepsilon)t}\mathrm{d} t=\frac{C}{1-\varepsilon} e^{-(1-\varepsilon)x}.
\]
Therefore, $ \int_{x}^\infty r^ae^{-nr^d}\mathrm{d} r\lesssim n^{-\frac{a+1}{d}}e^{-cnx^{d}}$.
lemmaLet $\mathcal{X}\subseteq \mathbb{R}^d$ be compact with $C^2$-boundary. There then exists a small $\check{r}>0$, such that the map $\Psi:\partial\mathcal{X}\times [0,\check{r}]\to \mathcal{X}$,
\[
\Psi(y,s)=y+s\mathbf{n}(y),
\]
where $\mathbf{n}(y)$ is the inward normal at $y$, is a $C^1$-diffeomorphism onto its image $\{x\in\mathcal{X}:0\le \delta(x)\le \check r\}$. Furthermore, the Jacobian $J_{\Psi}$ of $\Psi$ satisfies
\[
|J_{\Psi}(y,s)-1|\le Cs,~~\text{ for all }(y,s)\in \partial \mathcal{X}\times [0,\check{r}]
\]
with some constant $C>0$.
proof[Proof of (ref)]
From delfour2011shapes, there exists $\check{r}$ such that the map $\Psi$ is well defined and is a $C^1$-diffeomorphism onto $\{x\in\mathcal{X}:0\le \delta(x)\le \check r\}$. By delfour2011shapes and smoothness of the determinant map, for some constant $C>0$ and all $(y,s)\in \partial \mathcal{X}\times [0,\check{r}]$, it holds true that
\[
|J_{\Psi}(y,s)-1|\le Cs
\]
and the proof is thus complete.
proof[Proof of (ref)]
First note that
\[
\max_{\alpha\in \Lambda_r}
\big\|D^\alpha p_K^\top\bigl(\hat{\beta}_{t,K}-\beta_{t,K}\bigr)\big\|_\infty^2
\le \zeta_{r,K}^2\,
\|\hat{\beta}_{t,K}-\beta_{t,K}\|^2.
\]
We also have
\[
\|\hat{\beta}_{t,K}-\beta_{t,K}\|^2
\le \underline{\lambda}_K^{-1}\,
\|\hat{\psi}_{t,K}-\psi_{t,K}\|_{L^2}^2,
\]
since
\[
\|\hat{\psi}_{t,K}-\psi_{t,K}\|_{L^2}^2
= \bigl(\hat{\beta}_{t,K}-\beta_{t,K}\bigr)^\top
Q\,
\bigl(\hat{\beta}_{t,K}-\beta_{t,K}\bigr).
\]
Therefore,
\[
\begin{aligned}
&\mathrm{E}\bigl[\max_{\alpha\in \Lambda_r}
\big\|D^\alpha \hat{\psi}_{t,K}
- D^\alpha \psi_{t}\big\|_\infty^2\bigr]\\
\quad\le& 2\,
\mathrm{E}\bigl[\max_{\alpha\in \Lambda_r}
\big\|D^\alpha p_K^\top
\bigl(\hat{\beta}_{t,K}-\beta_{t,K}\bigr)\big\|_\infty^2\bigr]
+ 2\,\max_{\alpha\in \Lambda_r}
\|D^\alpha\psi_{t,K}-D^\alpha\psi_t\|_{\infty}^2\\
\quad\le& 2\,\zeta_{r,K}^2\,\underline{\lambda}_K^{-1}\,
\mathrm{E}\bigl[\|\hat{\psi}_{t,K}-\psi_{t,K}\|_{L^2}^2\bigr]
+ 2\,(\vartheta_{r,K}^t)^2.
\end{aligned}
\]
So now we analyze \(\mathrm{E}[\|\hat{\psi}_{t,K}-\psi_{t,K}\|_{L^2}^2]\). We can bound $\|\hat{\psi}_{t,K}-\psi_{t,K}\|_{L^2}^2$ by two terms as follows:
\[
\begin{aligned}
\|\hat{\psi}_{t,K}-\psi_{t,K}\|_{L^2}^2
&= \int
\bigl(p_K(x)^\top(\hat{\beta}_{t,K}-\beta_{t,K})\bigr)^2
\,\mathrm{d} F_{X}(x)\\
&= \bigl(\hat{\beta}_{t,K}-\beta_{t,K}\bigr)^\top
\mathrm{E}\bigl[p_K(X)p_K(X)^\top\bigr]
\bigl(\hat{\beta}_{t,K}-\beta_{t,K}\bigr)\\
&= \big\|Q^{\frac12}\,
(\hat{\beta}_{t,K}-\beta_{t,K})\big\|^2\\
&= \big\|Q^{\frac12}\,
\bigl((P^\top P + n\lambda_n I_K)^{-1}P^\top \mathbbm{1}(Y_{[n]}\ge t)
- \beta_{t,K}\bigr)\big\|^2\\
&\le 2\,
\big\|Q^{\frac12}\,(P^\top P + n\lambda_n I_K)^{-1}P^\top \varepsilon_t\big\|^2
+ 2\,
\big\|Q^{\frac12}\,
\bigl((P^\top P + n\lambda_n I_K)^{-1}P^\top \Psi_t
- \beta_{t,K}\bigr)\big\|^2\\
&= 2\,
\big\|Q^{\frac12}\,\hat{Q}^{-1}P^\top \varepsilon_t / n\big\|^2
+ 2\,
\big\|Q^{\frac12}\,
\bigl(\hat{Q}^{-1}P^\top \Psi_t / n
- \beta_{t,K}\bigr)\big\|^2,
\end{aligned}
\]
where \(\hat{Q} = (P^\top P + n\lambda_n I_K)/n\),
\(\varepsilon_t = \mathbbm{1}(Y_{[n]}\ge t) - \Psi_t\), and
\(\Psi_t = (\psi_t(X_1),\ldots,\psi_t(X_n))^\top\). In the following, we analyze these two terms individually.
\refstepcounter{step}
\paragraph*{Step \thestep: Analyze the first term.}
\if\relax\detokenize{step1:firstterm}\relax\else\fi
For the first term, we have
\[
\begin{aligned}
\big\|Q^{\frac12}\,\hat{Q}^{-1}P^\top \varepsilon_t / n\big\|^2
&\le \big\|Q^{\frac12}\,\hat{Q}^{-\frac12}\big\|_2^2\,
\big\|\hat{Q}^{-\frac12}P^\top \varepsilon_t\big\|^2 / n^2\\
&= \big\|Q^{\frac12}\,\hat{Q}^{-1}\,Q^{\frac12}\big\|_2\,
\big\|\hat{Q}^{-\frac12}P^\top \varepsilon_t\big\|^2 / n^2.
\end{aligned}
\]
We have
\[
\frac{\mathrm{E}\bigl[\big\|\hat{Q}^{-\frac12}P^\top \varepsilon_t\big\|^2 \mid \mathcal{F}_n\bigr]}{n^2}
= \frac{\mathrm{Tr}\bigl(\hat{Q}^{-\frac12}P^\top
\mathrm{E}[\varepsilon_t\varepsilon_t^\top \mid \mathcal{F}_n]
P\,\hat{Q}^{-\frac12}\bigr)}{n^2},
\]
where \(\mathcal{F}_n\coloneqq \sigma(X_1,\ldots,X_n)\) is the $\sigma$-algebra generated by $X_1,\ldots,X_n$.
For each \(i\), given \(\mathcal{F}_n\), the random variable \(\mathbbm{1}(Y_i\ge t)\) is Bernoulli with parameter \(\psi_t(X_i)\) and therefore
\[
\mathrm{E}[\varepsilon_{t,i} \mid \mathcal{F}_n] = 0,
\quad
\Var(\varepsilon_{t,i}\mid \mathcal{F}_n) = \psi_t(X_i)\bigl(1 - \psi_t(X_i)\bigr) \le \frac14.
\]
Note that \(Y_i\) is independent of \(Y_j\) given \(\mathcal{F}_n\) for \(i\ne j\). Hence,
\[
\mathrm{E}[\varepsilon_t\varepsilon_t^\top \mid \mathcal{F}_n]
= \mathrm{Diag}\bigl(\Var(\varepsilon_{t,1}\mid \mathcal{F}_n),\ldots,\Var(\varepsilon_{t,n}\mid \mathcal{F}_n)\bigr)
\preceq \frac14\,I_n.
\]
It follows that
\[
\frac{\mathrm{Tr}\bigl(\hat{Q}^{-\frac12}P^\top
\mathrm{E}[\varepsilon_t\varepsilon_t^\top \mid \mathcal{F}_n]
P\,\hat{Q}^{-\frac12}\bigr)}{n^2}
\le \frac14\,\frac{\mathrm{Tr}(A^\top A)}{n^2},
\quad
A \coloneqq P\,\hat{Q}^{-\frac12}.
\]
Since \(P^\top P = n(\hat{Q}-\lambda_n I_K)\), we have
\[
A^\top A = n\,(I_K - \lambda_n \hat{Q}^{-1})
\preceq n\,I_K, \quad \text{ and }
\quad
\mathrm{Tr}(A^\top A)\le n\,\mathrm{Tr}(I_K)=nK.
\]
Thus
\[
\frac{\mathrm{E}\bigl[\big\|\hat{Q}^{-\frac12}P^\top \varepsilon_t\big\|^2 \mid \mathcal{F}_n\bigr]}{n^2}
\le \frac{K}{4n}.
\]
Therefore,
\[
\begin{aligned}
\frac{\mathrm{E}\bigl[\|Q^{\frac12}\,\hat{Q}^{-1}\,Q^{\frac12}\|_2\,
\big\|\hat{Q}^{-\frac12}P^\top \varepsilon_t\big\|^2\bigr]}{n^2}&= \frac{\mathrm{E}\bigl[\|Q^{\frac12}\,\hat{Q}^{-1}\,Q^{\frac12}\|_2\,
\mathrm{E}\bigl[\big\|\hat{Q}^{-\frac12}P^\top \varepsilon_t\big\|^2 \mid \mathcal{F}_n\bigr]\bigr]}{n^2}\\
&\le \mathrm{E}\bigl[\|Q^{\frac12}\,\hat{Q}^{-1}\,Q^{\frac12}\|_2\bigr]\;\frac{K}{4n}\\
&\le \|Q\|_2\;\mathrm{E}\bigl[\|\hat{Q}^{-1}\|_2\bigr]\;\frac{K}{4n}\\
& \le \zeta_{0,K}^2\;\mathrm{E}\bigl[\|\hat{Q}^{-1}\|_2\bigr]\;\frac{K}{4n}.
\end{aligned}
\]
\refstepcounter{step}
\paragraph*{Step \thestep: Analyze the second term.}
\if\relax\detokenize{step1:firstterm}\relax\else\fi
Now consider the second term:
\[
\begin{aligned}
&\mathrm{E}\Bigl[\big\|Q^{\frac12}\bigl(\hat{Q}^{-1}P^\top \Psi_t/n
- \beta_{t,K}\bigr)\big\|^2\Bigr]\\
\quad=& \mathrm{E}\Bigl[\big\|Q^{\frac12}\bigl(\hat{Q}^{-1}P^\top \Psi_t/n
- Q^{-1}P^\top \Psi_t/n
+ Q^{-1}P^\top \Psi_t/n
- Q^{-1}\mathrm{E}[p_K(X)\psi_t(X)]\bigr)\big\|^2\Bigr]\\
\quad\le& 2\,\mathrm{E}\Bigl[\big\|Q^{\frac12}(\hat{Q}^{-1}-Q^{-1})P^\top \Psi_t/n\big\|^2\Bigr]
+2\,\mathrm{E}\Bigl[\big\|Q^{-\frac12}\bigl(P^\top \Psi_t/n
- \mathrm{E}[p_K(X)\psi_t(X)]\bigr)\big\|^2\Bigr].
\end{aligned}
\]
For the first piece, note \(\frac1nP^\top\Psi_t = \frac1n\sum_i p_K(X_i)\,\psi_t(X_i)\) and
\(\big\|\frac1n\sum_i p_K(X_i)\psi_t(X_i)\big\|\le \zeta_{0,K}\). Then
\[
\begin{aligned}
\mathrm{E}\Bigl[\big\|Q^{\frac12}(\hat{Q}^{-1}-Q^{-1})P^\top \Psi_t/n\big\|^2\Bigr]&\le \mathrm{E}\Bigl[\big\|Q^{\frac12}(\hat{Q}^{-1}-Q^{-1})\big\|_2^2\,
\big\|P^\top \Psi_t/n\big\|^2\Bigr]\\
&\le \zeta_{0,K}^2\,
\mathrm{E}\Bigl[\big\|Q^{\frac12}(\hat{Q}^{-1}-Q^{-1})\big\|_2^2\Bigr]\\
&= \zeta_{0,K}^2\,
\mathrm{E}\Bigl[\big\|Q^{\frac12}(\hat{Q}^{-1}-Q^{-1})Q^{\frac12}\,
Q^{-\frac12}\bigr\|_2^2\Bigr]\\
&\le \zeta_{0,K}^2\,\big\|Q^{-\frac12}\big\|_2^2\,
\mathrm{E}\bigl[\big\|Q^{\frac12}\hat{Q}^{-1}Q^{\frac12}-I_K\big\|_2^2\bigr]\\
&= \zeta_{0,K}^2\,\underline{\lambda}_K^{-1}\,
\mathrm{E}\bigl[\big\|Q^{\frac12}\hat{Q}^{-1}Q^{\frac12}-I_K\big\|_2^2\bigr].
\end{aligned}
\]
Write \(M\coloneqq Q^{-\frac12}\hat{Q}Q^{-\frac12}\). Then
\begin{align*}
&\mathrm{E}\bigl[\big\|Q^{\frac12}\hat{Q}^{-1}Q^{\frac12}-I_K\big\|_2^2\bigr]
= \mathrm{E}\bigl[\|M^{-1}-I_K\|_2^2\bigr]= \mathrm{E}\bigl[\big\|M^{-\frac12}(M-I_K)M^{-\frac12}\big\|_2^2\bigr]\\
\le& \mathrm{E}\bigl[\|M^{-1}\|_2^2\,\|M-I_K\|_2^2\bigr]\le \|Q\|_2^2\,
\mathrm{E}\bigl[\|\hat{Q}^{-1}\|_2^2\,\|M-I_K\|_2^2\bigr] \le \zeta_{0,K}^4\,
\mathrm{E}\bigl[\|\hat{Q}^{-1}\|_2^2\,\|M-I_K\|_2^2\bigr].
\end{align*}
We bound the second piece by
\[
\begin{aligned}
\mathrm{E}\Bigl[\big\|Q^{-\frac12}\bigl(P^\top \Psi_t/n
- \mathrm{E}[p_K(X)\psi_t(X)]\bigr)\big\|^2\Bigr]&\le \mathrm{E}\Bigl[\underline{\lambda}_K^{-1}
\big\|P^\top \Psi_t/n
- \mathrm{E}[p_K(X)\psi_t(X)]\big\|^2\Bigr]\\
& =\mathrm{E}\Big[\underline{\lambda}_K^{-1}\Big\|\frac{1}{n}\sum_{i=1}^n \big(p_K(X_i)\psi_t(X_i)-\mathrm{E}[p_K(X)\psi_t(X)]\big)\Big\|^2\Big]\\
&= n^{-1}\,\underline{\lambda}_K^{-1}\,
\mathrm{E}\Bigl[\big\|p_K(X)\,\psi_t(X)
- \mathrm{E}[p_K(X)\psi_t(X)]\big\|^2\Bigr]\\
&\le \zeta_{0,K}^2\,n^{-1}\,\underline{\lambda}_K^{-1}.
\end{aligned}
\]
Combining all the above bounds gives the result.
proof[Proof of (ref)]
Write $A_n\coloneqq \{\|\hat{Q}^{-1}\|_2^a\leq 2^a\underline{\lambda}_K^{-a}\}$. Note that
\[
\begin{aligned}
\mathrm{E}[\|\hat{Q}^{-1}\|_2^a]&=\mathrm{E}[\|\hat{Q}^{-1}\|_2^a\mathbbm{1}(A_n)]+\mathrm{E}[\|\hat{Q}^{-1}\|_2^a\mathbbm{1}(A_n^c)]\leq 2^a\underline{\lambda}_K^{-a}+\lambda_n^{-a}\mathrm{P}(A_n^c),
\end{aligned}
\]
since $\|\hat{Q}^{-1}\|_2^a\leq \lambda_n^{-a}$ and $\lambda_n>0$. Therefore, it is sufficient to prove $\lambda_n^{-a}\mathrm{P}(A_n^c) \to 0$ as $n\to \infty$.
Define $\Delta\coloneqq \hat{Q}-Q$. The strategy is to first show $A_n^c\subseteq \{\|\Delta\|\geq \frac{1}{2}\underline{\lambda}_K\}$ and then apply the concentration inequality of the random matrix to bound $\mathrm{P}(\|\Delta\|\geq \frac{1}{2}\underline{\lambda}_K)$.
\refstepcounter{step}
\paragraph*{Step \thestep: Show sets inclusion.}
\if\relax\detokenize{step1:setinclusion}\relax\else\fi
Now we show $A_n^c\subseteq \{\|\Delta\|\geq \frac{1}{2}\underline{\lambda}_K\}$. For that purpose, suppose that $\|\Delta\|_2< \frac{1}{2}\underline{\lambda}_K$. This implies
\[
\|Q^{-1}\Delta\|_2\leq \|Q^{-1}\|_2\|\Delta\|_2< \frac{1}{2},
\]
since $\|Q^{-1}\|_2=\underline{\lambda}_K^{-1}$. Then from the Neumann series representation of $(I_K+Q^{-1}\Delta)^{-1}$, we have
\[
(Q+\Delta)^{-1}=[Q(I_K+Q^{-1}\Delta)]^{-1}=\sum_{k=0}^\infty (Q^{-1}\Delta)^kQ^{-1}.
\]
Therefore,
\[
\|\hat{Q}^{-1}\|_2=\|(Q+\Delta)^{-1}\|_2\leq \|Q^{-1}\|_2\sum_{k=0}^\infty \|Q^{-1}\Delta\|_2^k=\frac{\|Q^{-1}\|_2}{1-\|Q^{-1}\Delta\|_2}\leq 2\underline{\lambda}_K^{-1}.
\]
This means that $\{\|\Delta\|_2< \frac{1}{2}\underline{\lambda}_K\}\subseteq A_n$, which is equivalent to $A_n^c \subseteq \{\|\Delta\|_2\geq \frac{1}{2}\underline{\lambda}_K\}$.
\refstepcounter{step}
\paragraph*{Step \thestep: Bound matrix perturbation.}
\if\relax\detokenize{step2:bound}\relax\else\fi
Recall that
\[
\Delta\coloneqq \hat{Q}-Q=\frac{1}{n}\sum_{i=1}^n(p_K(X_i)p_K(X_i)^\top -Q)+\lambda_n I_K,
\]
where the term $M_i\coloneqq \frac{1}{n}(p_K(X_i)p_K(X_i)^\top -Q)$ is mean-zero symmetric. From (ref), the concentration inequality of the random matrix tropp2012user gives that (where we assume WLOG that $\underline{\lambda}_K-\lambda_n\geq 0$)
\[
\lambda_n^{-a}\mathrm{P}(A_n^c)\leq \lambda_n^{-a}\mathrm{P}\big(\|\Delta\|_2\geq \frac{1}{2}\underline{\lambda}_K\big)\leq \lambda_n^{-a}K\exp\Big(\frac{-(\frac{1}{2}\underline{\lambda}_K-\lambda_n)^2/2}{\sigma^2+R(\frac{1}{2}\underline{\lambda}_K-\lambda_n)/3}\Big),
\]
where $R$ is such that $\|M_i\|_2\leq R$ a.s.\ and $\sigma^2=\|\sum_{i=1}^n\mathrm{E}[M_i^2]\|_2$. We can pick $R\coloneqq \frac{2\zeta_{0,K}^2}{n}$, since
\[
\|M_i\|_2\leq \frac{1}{n}(\|p_K(X_i)p_K(X_i)^\top\|_2+\|Q\|_2)\leq \frac{2\zeta_{0,K}^2}{n}.
\]
We also have
\[
\sigma^2=n\|\mathrm{E}[M_1^2]\|_2\leq 4\zeta_{0,K}^4/n.
\]
Therefore, we have
\[
\lambda_n^{-a}\mathrm{P}(A_n^c)\leq \lambda_n^{-a}K\exp\Big(\frac{-3n(\frac{1}{2}\underline{\lambda}_K-\lambda_n)^2}{32\zeta_{0,K}^4}\Big)+\lambda_n^{-a}K\exp\Big(\frac{-3n(\frac{1}{2}\underline{\lambda}_K-\lambda_n)}{16\zeta_{0,K}^2}\Big),
\]
where the right-hand side goes to zero as $n\to \infty$ since $\lambda_n\asymp n^{-c}$ for some $c\geq 0$ and $\zeta_{0,K}=o\Big(\left( \frac{n(\underline{\lambda}_K-\lambda_n)^2}{\log K+\log(\lambda_n^{-a})}\right) ^{\frac{1}{4}}\wedge \left( \frac{n(\underline{\lambda}_K-\lambda_n)}{\log K+\log(\lambda_n^{-a})}\right) ^{\frac{1}{2}}\Big)$. This then concludes $\mathrm{E}[\|\hat{Q}^{-1}\|_2^a]=O(\underline{\lambda}_K^{-a})$ as $n\to \infty$.
proof[Proof of (ref)]
The Cauchy–Schwarz inequality gives
\[
\mathrm{E}\big[\big\|\hat{Q}^{-1}\big\|_2^2\big\|Q^{-\frac{1}{2}}\hat{Q}Q^{-\frac{1}{2}}-I_K\big\|_2^2\big]\leq \mathrm{E}\big[\big\|\hat{Q}^{-1}\big\|_2^4\big]^{\frac{1}{2}}\mathrm{E}\big[\big\|Q^{-\frac{1}{2}}\hat{Q}Q^{-\frac{1}{2}}-I_K\big\|_2^4\big]^{\frac{1}{2}}.
\]
By (ref), we have $\mathrm{E}\big[\|\hat{Q}^{-1}\|_2^4\big]^{\frac{1}{2}}=O(\underline{\lambda}_K^{-2})$. So it remains to analyze $\mathrm{E}\big[\big\|Q^{-\frac{1}{2}}\hat{Q}Q^{-\frac{1}{2}}-I_K\big\|_2^4\big]$.
Set $\tilde{Q}\coloneqq \hat{Q}-\lambda_nI_K$. Then
\[
\mathrm{E}\big[\big\|Q^{-\frac{1}{2}}\hat{Q}Q^{-\frac{1}{2}}-I_K\big\|_2^4\big]\leq 8\mathrm{E}\big[\big\|Q^{-\frac{1}{2}}\tilde{Q}Q^{-\frac{1}{2}}-I_K\big\|_2^4\big]+8(\lambda_n\underline{\lambda}_K^{-1})^4.
\]
Define $\tilde{M}_i\coloneqq \frac{1}{n}(Q^{-\frac{1}{2}}p_K(X)p_K(X)^\top Q^{-\frac{1}{2}} -I_K)$. Then we have
\[
\begin{aligned}
\tilde{\sigma}^2&=n\big\|\mathrm{E}\big[\tilde{M}_1^2\big]\big\|_2 \\
&=\frac{1}{n}\big\|\mathrm{E}\big[Q^{-\frac{1}{2}}p_K(X)p_K(X)^\top Q^{-\frac{1}{2}}-2Q^{-\frac{1}{2}}p_K(X)p_K(X)^\top Q^{-\frac{1}{2}}+I_K\big]\big\|_2\\
&\leq \frac{1}{n}( 1+\underline{\lambda}_K^{-1}\zeta_{0,K}^2).
\end{aligned}
\]
We have
\[
\big\|\tilde{M}_i\big\|_2\leq \frac{1}{n}\big\|Q^{-\frac{1}{2}}p_K(X)p_K(X)^\top Q^{-\frac{1}{2}}-I_K\big\|_2\leq \frac{1}{n}(\underline{\lambda}_K^{-1}\zeta_{0,K}^2+1)=: \tilde{R}.
\]
Set $a_n\coloneqq \underline{\lambda}_K^{-\frac{1}{2}}\zeta_{0,K}\sqrt{\log(K)/n}+\underline{\lambda}_K^{-1}\zeta_{0,K}^2\log(K)/n=: b_n+c_n$. Applying the concentration inequality of the random matrix tropp2012user gives
\[
\begin{aligned}
\mathrm{E}\big[\big\|Q^{-\frac{1}{2}}\tilde{Q}Q^{-\frac{1}{2}}&-I_K\big\|_2^4\big]=4\int_{0}^{\infty} t^{3}\mathrm{P}\big(\big\|Q^{-\frac{1}{2}}\tilde{Q}Q^{-\frac{1}{2}}-I_K\big\|_2\geq t\big) \mathrm{d} t\\
&=4\int_{0}^{a_n} t^{3}\mathrm{P}\big(\big\|Q^{-\frac{1}{2}}\tilde{Q}Q^{-\frac{1}{2}}-I_K\big\|_2\geq t\big) \mathrm{d} t+4\int_{a_n}^{\infty} t^{3}\mathrm{P}\big(\big\|Q^{-\frac{1}{2}}\tilde{Q}Q^{-\frac{1}{2}}-I_K\big\|_2\geq t\big) \mathrm{d} t\\
&\leq a_n^4+4\int_{a_n}^\infty t^3K\left[\exp\Big(\frac{-3t^2}{8\tilde{\sigma}^2}\Big)\mathbbm{1}\Big(t\leq \frac{\tilde{\sigma}^2}{\tilde{R}}\Big)+\exp\Big(\frac{-3t}{8\tilde{R}}\Big)\mathbbm{1}\Big(t>\frac{\tilde{\sigma}^2}{\tilde{R}}\Big)\right]\mathrm{d} t\\
&\leq a_n^4+4\int_{b_n}^\infty t^3K\exp\Big(\frac{-t^2}{C\underline{\lambda}_K^{-1}n^{-1}\zeta_{0,K}^2}\Big)\mathrm{d} t +4\int_{c_n}^\infty t^3K\exp\Big(\frac{-t}{C\underline{\lambda}_K^{-1}n^{-1}\zeta_{0,K}^2}\Big)\mathrm{d} t\\
&=: a_n^4+4\Upsilon_1+4\Upsilon_2.
\end{aligned}
\]
We now analyze $\Upsilon_1$:
\[
\begin{aligned}
\Upsilon_1&=\int_{b_n}^\infty t^3K\exp\Big(\frac{-t^2}{C\underline{\lambda}_K^{-1}n^{-1}\zeta_{0,K}^2}\Big)\mathrm{d} t\\
&=\frac{A^2K}{2}\int_{\frac{b_n^2}{A}}^\infty u\exp(-u)\mathrm{d} u & (A\coloneqq C\underline{\lambda}_K^{-1}n^{-1}\zeta_{0,K}^2,u\coloneqq \frac{t^2}{A})\\
&=\frac{A^2K}{2}\Big(1+\frac{b_n^2}{A}\Big)\exp\Big(-\frac{b_n^2}{A}\Big) & (\int_x^\infty ue^{-u}\mathrm{d} u=(1+x)e^{-x})\\
&=O\big(\underline{\lambda}_K^{-2}n^{-2}\zeta_{0,K}^4+\underline{\lambda}_K^{-2}n^{-2}\zeta_{0,K}^4\log K\big) & \text{ as } n\to \infty.
\end{aligned}
\]
Since $\underline{\lambda}_K^{-1}\zeta_{0,K}^2\log(K)n^{-1} \to 0 $ as $n\to \infty$, we have $a_n\asymp \underline{\lambda}_K^{-\frac{1}{2}}\zeta_{0,K}\sqrt{\log(K)/n}$ and therefore $a_n^4\asymp \underline{\lambda}_K^{-2}\zeta_{0,K}^4(\log K)^2n^{-2}$. Also, recall that $K\to \infty$ as $n\to \infty$. Hence,
\[
\frac{\underline{\lambda}_K^{-2}n^{-2}\zeta_{0,K}^4+\underline{\lambda}_K^{-2}n^{-2}\zeta_{0,K}^4\log K}{a_n^4} \to 0\quad \text{ as } n\to \infty,
\]
which implies $\Upsilon_1=o(a_n^4)$.
Next, we analyze $\Upsilon_2$:
\[
\begin{aligned}
\Upsilon_2&=\int_{c_n}^\infty t^3K\exp\Big(\frac{-t}{C\underline{\lambda}_K^{-1}n^{-1}\zeta_{0,K}^2}\Big)\mathrm{d} t\\
&= KA^4\Gamma\big(4,\frac{c_n}{A}\big) & (A\coloneqq C\underline{\lambda}_K^{-1}n^{-1}\zeta_{0,K}^2)\\
&=3!KA^4\exp\Big(\frac{-c_n}{A}\Big)\Big(1+\frac{c_n}{A}+\frac{c_n^2}{2A^2}+\frac{c_n^3}{6A^3})\qquad & (s\in\mathbb{Z}^+, \Gamma(s,x)=(s-1)!e^{-x}\sum_{k=0}^{s-1}\frac{x^k}{k!}\Big)\\
&=O\big(\underline{\lambda}_K^{-4}n^{-4}\zeta_{0,K}^8(\log K)^3\big).
\end{aligned}
\]
Since $\underline{\lambda}_K^{-1}\zeta_{0,K}^2\log(K)n^{-1} \to 0 $ as $n\to \infty$, it holds
\[
\frac{\underline{\lambda}_K^{-4}n^{-4}\zeta_{0,K}^8(\log K)^3}{\underline{\lambda}_K^{-2}\zeta_{0,K}^4(\log K)^2n^{-2}}=\underline{\lambda}_K^{-2}n^{-2}\zeta_{0,K}^4 \log K\to 0, \quad\text{ as }n \to \infty.
\]
Hence, $\Upsilon_2=o(a_n^4)$. Overall, it establishes
\[
\mathrm{E}[\|Q^{-\frac{1}{2}}\hat{Q}Q^{-\frac{1}{2}}-I_K\|_2^4]=O(a_n^4+(\lambda_n\underline{\lambda}_K^{-1})^4)=O(\underline{\lambda}_K^{-2}\zeta_{0,K}^4\log(K)^2n^{-2}+(\lambda_n\underline{\lambda}_K^{-1})^4)
\]
and thus finishes the proof.