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.
Estimation based on nearest neighbor matching: from density ratio to average treatment effect
{5pt}
{5pt}
{5pt}
{5pt}
\hypersetup{colorlinks,breaklinks,urlcolor=blue,linkcolor=blue}
abstractNearest neighbor (NN) matching as a tool to align data sampled from different groups is both conceptually natural and practically well-used. In a landmark paper, abadie2006large provided the first large-sample analysis of NN matching under, however, a crucial assumption that the number of NNs, $M$, is fixed. This manuscript reveals something new out of their study and shows that, once allowing $M$ to diverge with the sample size, an intrinsic statistic in their analysis actually constitutes a consistent estimator of the density ratio. Furthermore, through selecting a suitable $M$, this statistic can attain the minimax lower bound of estimation over a Lipschitz density function class. Consequently, with a diverging $M$, the NN matching provably yields a doubly robust estimator of the average treatment effect and is semiparametrically efficient if the density functions are sufficiently smooth and the outcome model is appropriately specified. It can thus be viewed as a precursor of double machine learning estimators.
{\bf Keywords:} graph-based statistics, stochastic geometry, double robustness, double machine learning, propensity score.
Introduction
With observations from different groups, matching methods greenwood1945experimental, chapin1947experimental aim to balance them through minimizing group differences in observed covariates. Such methods have proven their usefulness for causal inference in various disciplines, including economics imbens2004nonparametric, epidemiology brookhart2006variable, political science ho2007matching,sekhon2008multivariate, sociology morgan2006matching, and statistics cochran1973controlling,rubin2006matched,rosenbaum2010design.
Among all the matching methods, nearest neighbor (NN) matching rubin1973matching is likely the most well-used and easiest to implement approach. In addition, it is computationally attractive as the time complexity of locating NNs is low. In the simplest treatment-control study, NN matching assigns each treatment (control) individual to $M$ control (treatment) individuals with the smallest distance to it. In this regard, two natural questions arise. First, how do we select the number of matches, $M$? This is referred to in the literature as ratio matching, and is both important and delicate, well-known to be related to the bias-variance tradeoff in nonparametic statistics smith19976,rubin2000combining. Second, how do we perform large-sample statistical inference for NN matching methods? Such an analysis is usually nonstandard and thus believed to be mathematically challenging. Indeed, it was long-lacking in the literature until abadie2006large.
To answer the above two questions, in a series of ingenious papers, abadie2006large,abadie2008failure,abadie2011bias,abadie2012martingale established large-sample properties of $M$-NN matching for estimating the average treatment effect (ATE). These results are, however, only valid under a crucial assumption that, in ratio matching, $M$ is fixed. The according message is then mixed. As a matter of fact,
abadie2006large argued --- which we quote here --- that the ATE estimator based on $M$-NN matching with a fixed $M$ is both asymptotically biased and statistically inefficient, namely, it “does not achieve the semiparametric efficiency bound as calculated by hahn1998role”. While bias correction is now feasible to alleviate the first issue abadie2011bias, the lack of efficiency seems fundamental.
This manuscript revisits the study of abadie2006large from a new perspective, bridging $M$-NN matching to density ratio estimation nguyen2010estimating,sugiyama2012density as well as double robustness scharfstein1999adjusting,bang2005doubly. To this end, our analysis stresses, in ratio matching, the importance of forcing $M$ to diverge with the sample size $n$ in order to achieve statistical efficiency. Our claim is thus aligned with similar ones in various other random graph-based inference problems MR2083,MR532236,MR947577,MR1212489,MR1701112,MR3909934,MR3961499, which also include a series of results made by some of the authors in this paper shi2021ac,shi2020power,lin2021boosting.
The contributions of this manuscript are mainly two-fold. First, we show that an intrinsic statistic that plays a central role in the analysis of abadie2006large, $K_M(x)$ (abadie2006large; to be defined in (ref) of Section (ref)), actually gives rise to a consistent density ratio estimator in the two-sample setting.
Even more interestingly, from the angle of density ratio estimation, this NN matching-based estimator is to our knowledge the first one that simultaneously satisfies the following three properties.
enumerate• Conceptually {\it one-step}: it directly estimates the density ratio with no need to estimate individual densities, and is thus in line with Vapnik's rule that “[w]hen solving a problem of interest, one should not solve a more general problem as an intermediate step” vapnik2006estimation.
• Computationally {\it of low complexity}: it is of a sub-quadratic (and nearly linear when $M$ is small) time complexity via a careful algorithmic formulation based on $k$-d trees (cf. Algorithms (ref)-(ref) and Theorem (ref) ahead), and thus in many scientific applications is computationally more attractive than its optimization-based alternatives lima2008estimating,kremer2015nearest,borgeaud2021improving.
• Statistically {\it rate-optimal}: it is information-theoretically efficient in terms of achieving an upper bound of estimation accuracy that matches the corresponding minimax lower bound over a class of Lipschitz density functions (cf. the set of results in Section (ref) ahead).
This estimator itself is accordingly an appealing alternative to existing density ratio estimators. Moreover, it is potentially useful in many data analysis problems (e.g., $f$-divergence estimation, classification, importance sampling, and etc.) where density ratio estimation plays a pivotal role.
Getting back to the original ATE estimation problem, our second contribution is to bridge the above insights to the bias-corrected matching-based estimator proposed in abadie2011bias as well as the double robustness and double machine learning framework introduced in scharfstein1999adjusting, bang2005doubly, and chernozhukov2018double. In fact, their bias-corrected estimator can be formulated as
\[
\hat{\tau}_M^{\rm bc} = \hat{\tau}^{\rm reg} + \frac{1}{n} \Big[ \sum_{i=1,D_i = 1}^n \Big(1 + \frac{K^1_M(i)}{M}\Big) \hat{R}_i - \sum_{i=1,D_i = 0}^n \Big(1 + \frac{K^0_M(i)}{M}\Big) \hat{R}_i \Big]
\]
(notation to be introduced in Section (ref)), where $1 + K^1_M(\cdot)/M$ and $1 + K^0_M(\cdot)/M$ approach the inverse of the propensity score $e(x)$ and $1-e(x)$, respectively. One could then leverage the general double robustness and double machine learning theory to validate the following two claims of (a double machine learning version of) $\hat{\tau}_M^{\rm bc}$.
itemize• {\it Consistency:} as long as either the density (propensity score) functions satisfy certain conditions or the outcome (regression) model is correctly specified, $M\log n/n\to 0$, and $M\to \infty$ as $n\to \infty$, $\hat{\tau}_M^{\rm bc}$ converges in probability to the population ATE, denoted as $\tau$.
• {\it Semiparametric efficiency:} if the density functions are sufficiently smooth, the outcome model is appropriately specified, and $M$ scales with $n$ at an proper rate, then (a sample-splitting and cross-fitting version of) $\hat{\tau}_M^{\rm bc}$ is an asymptotically normal estimator of $\tau$ with the asymptotic variance attaining the semiparametric efficiency lower bound hahn1998role. Furthermore, a simple consistent estimator of the asymptotic variance is available.
Our results thus complement those made in abadie2006large,abadie2011bias, rendering necessary confidence for practitioners to implement NN matching for inferring the ATE. In addition, although abadie2006large hints at the necessity of allowing $M$ to diverge for gaining efficiency, we provide rigorous theory for their conjecture.
Technically speaking, our analysis hinges on those $M$'s that grow with $n$. Existing results in NN matching literature, including abadie2006large, abadie2008failure, abadie2011bias, and abadie2012martingale, are then limited as they are all focused on a fixed $M$. Instead, we take a different route to establish nonasymptotic moment bounds of $K_M(x)$, where there is more room for $M$ to move around; of note, similar ideas were also pursued in lin2021boosting by the authors to analyze rank-based statistics. Detailed explanation of our theoretical analysis, however, has to be left to latter sections.
\paragraph*{Paper organization.} The rest of this manuscript is organized as follows. In Sections (ref)-(ref) we introduce the method, computation, and theory of density ratio estimation via NN matching. In detail, Section (ref) introduces the statistical setup and the matching-based estimator of density ratio. Section (ref) introduces the algorithms to implement the matching-based estimator constructed on the $k$-d tree structure. Section (ref) delivers the main theory, quantifying both pointwise and global approximation accuracy. Built on the previous three sections, Section (ref) formally elaborates on the double robustness and semiparametric efficiency of the bias-corrected NN matching-based estimator of the ATE. More applications of the proposed matching-based estimator will be covered in Section (ref), with proofs of the main results relegated to Section (ref) and the rest put in the appendix. Additional results about NN matching that cannot be incorporated in the double robustness and double machine learning framework are exhibited in the supplement.
\paragraph*{Notation.}
For any integers $n,d\ge 1$, let $\llbracket n\rrbracket:= \{1,2,\ldots,n\}$, $n!$ be the factorial of $n$, and $\bR^d$ be the $d$-dimensional real space. A set consisting of distinct elements $x_1,\dots,x_n$ is written as either $\{x_1,\dots,x_n\}$ or $\{x_i\}_{i=1}^{n}$, and its cardinality is written by $\lvert \{x_i\}_{i=1}^n \rvert$. The corresponding sequence is denoted $[x_1,\dots,x_n]$ or $[x_i]_{i=1}^{n}$.
The notation $\ind(\cdot)$ is saved for the indicator function.
For any $a,b \in \bR$, write $a \vee b = \max\{a,b\}$ and $a \wedge b = \min\{a,b\}$.
For any two real sequences $\{a_n\}$ and $\{b_n\}$, write $a_n \lesssim b_n$ (or equivalently, $b_n \gtrsim a_n$ or $a_n=O(b_n)$) if there exists a universal constant $C>0$ such that $a_n/b_n \le C$ for all sufficiently large $n$, and write $a_n \prec b_n$ (or equivalently, $b_n \succ a_n$ and $a_n=o(b_n)$) if $a_n/b_n \to 0$ as $n$ goes to infinity. We write $a_n\asymp b_n$ if both $a_n\lesssim b_n$ and $b_n\lesssim a_n$ holds. We use $\stackrel{\sf d}{\longrightarrow}$ and $\stackrel{\sf p}{\longrightarrow}$ to denote convergence in distribution and in probability, respectively. For any sequence of random variables $\{X_n\}$, write $X_n = o_{\mathrm P}(1)$ if $X_n \stackrel{\sf p}{\longrightarrow} 0$. For any random variable $Z$, ${\mathrm P}_Z$ represents its law. Denote the closed ball in $\bR^d$ centered at $x$ with radius $\delta$ by $B_{x,\delta}$. In the sequel, let $c,C,C',C'',C''',...$ be generic positive constants whose actual values may change at different locations.
Density ratio estimation I: method
From this section to Section (ref), we consider $X,Z$ to be two general random vectors in $\bR^d$ that are defined on the same probability space, with $d$ to be a fixed positive integer.
Let $\nu_0$ and $\nu_1$ represent the probability measures of $X$ and $Z$, respectively. Assume $\nu_0$ and $\nu_1$ are absolutely continuous with respect to the Lebesgue measure $\lambda$ on $\bR^d$ equipped with the Euclidean norm $\lVert \cdot \rVert$; denote the corresponding densities (Radon-Nikodym derivatives) by $f_0$ and $f_1$. Assume further that $\nu_1$ is absolutely continuous with respect to $\nu_0$ and write the corresponding density ratio, $f_1/f_0$, as $r$; we set $0/0=0$ by default.
Assume $X_1,\ldots,X_{N_0}$ are $N_0$ independent copies of $X$, $Z_1,\ldots,Z_{N_1}$ are $N_1$ independent copies of $Z$, and $[X_i]_{i=1}^{N_0}$ and $[Z_j]_{j=1}^{N_1}$ are mutually independent. The problem of estimating the density ratio $r$ based on $\{X_1,\ldots,X_{N_0},Z_1,\ldots,Z_{N_1}\}$ is fundamental in economics cunningham2021causal, information theory cover1999elements, machine learning sugiyama2012density, statistics imbens2015causal, and other fields.
In density ratio estimation, NN-based estimators are advocated before due to its computational efficiency; cf. lima2008estimating, poczos2011estimation, kremer2015nearest, noshad2017direct, MR3909934, zhao2020minimax, among many others.
In this manuscript, based on abadie2006large,abadie2008failure,abadie2011bias,abadie2012martingale's NN matching framework, we unveil a new density ratio estimator based on NN matching. To this end, some necessary notation is introduced first.
definition[NN matching]
For any $x, z \in \bR^d$ and $M \in \llbracket N_0\rrbracket$,
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• let $\cX_{(M)}(\cdot): \bR^d \to \{X_i\}_{i=1}^{N_0}$
be the mapping
that returns the value of the input $z$'s $M$-th NN in $\{X_i\}_{i=1}^{N_0}$, i.e., the value of $x \in \{X_i\}_{i=1}^{N_0}$ such that
\begin{align}
\sum_{i=1}^{N_0} \ind\Big(\lVert X_i - z \rVert \le \lVert x - z \rVert\Big) = M;
\end{align}
• let $K_M(\cdot): \bR^d\to \llbracket N_1\rrbracket$ be the mapping that returns the number of matched times of $x$, i.e.,
\begin{align}
K_M(x) = K_M\big(x;\{X_i\}_{i=1}^{N_0},\{Z_j\}_{j=1}^{N_1}\big) := \sum_{j=1}^{N_1} \ind\Big(\lVert x - Z_j \rVert \le \lVert \cX_{(M)}(Z_j) - Z_j \rVert\Big);
\end{align}
• let $A_M(\cdot): \bR^d\to \cB(\bR^d)$ be the corresponding mapping from $\bR^d$ to the class of all Borel sets in $\bR^d$ so that
\begin{align}
A_M(x) = A_M\big(x;\{X_i\}_{i=1}^{N_0}\big) := \Big\{z \in \bR^d : \lVert x - z \rVert \le \lVert \cX_{(M)}(z) - z \rVert\Big\},
\end{align}
returns the catchment area of $x$ in the setting of
(ref);
• for $i \in \llbracket N_0\rrbracket$, let $K_M(i)$ and $A_M(i)$ be shorthands of $K_M(X_i)$ and $A_M(X_i)$, respectively.
\end{enumerate}
remarkOf note, since $\nu_0$ is absolutely continuous with respect to the Lebesgue measure, a solution to (ref) exists and is unique. abadie2006large introduced the terms $K_M(\cdot)$ and $A_M(\cdot)$ to analyze the asymptotic behavior of their NN matching-based ATE estimator. We also adopt the terminology “catchment area” in Definition (ref)(ref) to align with them.
The following proposition formally links $K_M(\cdot)$ to $A_M(\cdot)$, was shown and used in the proof of abadie2006large, and is stated here for aiding understanding.
proposition[abadie2006large]
For any $x \in \bR^d$, we have
\[
K_M(x) = \sum_{j=1}^{N_1} \ind\Big(Z_j \in A_M(x)\Big).
\]
remark[Relation between $A_M(i)$'s and Voronoi tessellation when $M=1$]
It is easy to verify that, due to the absolute continuity of $\nu_0$, $[A_1(i)]_{i=1}^{N_0}$ are almost surely disjoint except for a Lebesgue measure zero area, and partition $\bR^d$ into $N_0$ polygons. Furthermore, one can verify that $\{A_1(i)\}_{i=1}^{N_0}$ are exactly the Voronoi tessellation defined in voronoi1908nouvelles, which plays a vital role in stochastic and computational geometry. In this case, each element $A_1(i)$ is the Voronoi cell from the definition of (ref).
With these notation and concepts, we are now ready to introduce the following density ratio estimator based on NN matching.
definition[NN matching-based density ratio estimator]
For any $M\in\llbracket N_0\rrbracket$ and $x \in \bR^d$, we define the following estimator of $r(x)$,
\begin{align}
\hat{r}_M(x) = \hat{r}_M\Big(x;\{X_i\}_{i=1}^{N_0},\{Z_j\}_{j=1}^{N_1}\Big) := \frac{N_0}{N_1} \frac{K_M(x)}{M}.
\end{align}
The estimator $\hat r_M(\cdot)$ is by construction a one-step estimator, and thus automatically satisfies Property (ref) in \hyperref[sec:intro]{Introduction}. In the following two sections, we will show that $\hat r_M(\cdot)$ also satisfies Properties (ref) and (ref).
Density ratio estimation II: computation
This section discusses implementation of and establishes Property (ref) for the proposed estimator $\hat r_M(\cdot)$. To this end, we separately discuss two cases:
itemize• {\bf Case I}: estimating only the values of $\hat r_M(\cdot)$ at the observed data points $X_1,\ldots,X_{N_0}$;
• {\bf Case II}: estimating the values of $\hat r_M(\cdot)$ at both the observed data points $X_1,\ldots,X_{N_0}$ and $n$ new points $x_1,\ldots,x_n\in \bR^d$.
{\bf Case I.} In many applications,
we are only interested in a functional of density ratios at observed sample points, i.e., the values of $\Phi\big(\{r(X_i)\}_{i=1}^{N_0}\big)$ for some given functions $\Phi$ defined on $\bR^{N_0}$. Check, e.g., (ref) and -- in a slightly different but symmetric form -- (ref) ahead for such examples on Kullback-Leibler (KL) divergence and ATE estimation. To this end, it is natural to consider the plug-in estimator $\Phi\big(\{\hat{r}_M(X_i)\}_{i=1}^{N_0}\big)$, for which it suffices to compute the values of $\{\hat{r}_M(X_i)\}_{i=1}^{N_0}$.
Built on the $k$-d tree structure bentley1975multidimensional for tracking NNs, Algorithm (ref) below outlines an easy to implement algorithm to simultaneously compute all the values of $\{\hat{r}_M(X_i)\}_{i=1}^{N_0}$. This algorithm could be regarded as a direct extension of the celebrated Friedman-Bentley-Finkel algorithm 10.1145/355744.355745 to the NN matching setting.
algorithm[algorithm omitted — 631 chars of source]
{\bf Case II.} Suppose we are interested in estimating density ratios at both the observed and $n$ new points in $\bR^d$. A naive algorithm is then to insert each new point into observed points and perform Algorithm (ref) in order. However, this algorithm is not ideal as the corresponding time complexity would be $n$ times the complexity of Algorithm (ref), which could be computationally heavy with a large number of new points.
Instead, we develop a more sophisticated implementation. Let the new points be $\{x_i\}_{i=1}^n$. Algorithm (ref) computes all the values of $\{\hat{r}_M(x_i)\}_{i=1}^n$ as well as $\{\hat{r}_M(X_i)\}_{i=1}^{N_0}$. The key message delivered here is that, compared to the aforementioned naive implementation, in Algorithm (ref) we only need to construct one single $k$-d tree; the matching elements are then categorized to two different sets, corresponding to those with regard to $X_i$'s and $x_i$'s, separately. Such an implementation is thus intuitively much more efficient.
algorithm[algorithm omitted — 1,192 chars of source]
The following is the main theorem of this section, elaborating on the computational advantage of the proposed estimator.
theorem\phantomsection
\begin{itemize}
• The average time complexity of Algorithm (ref) to compute all the values of $\{\hat{r}_M(X_i)\}_{i=1}^{N_0}$ is
\[
O\Big( (d+ N_1M/N_0)N_0\log N_0\Big).
\]
• Assume $[x_i]_{i=1}^n$ are independent and identically distributed (i.i.d.) following $\nu_0$ and are independent of $[X_i]_{i=1}^{N_0}$. Then the average time complexity of Algorithm (ref) to compute all the values of $\{\hat{r}_M(x_i)\}_{i=1}^n$ and $\{\hat{r}_M(X_i)\}_{i=1}^{N_0}$ is
\[
O\Big( (d + N_1M/N_0) (N_0 + n) \log(N_0 + n) \Big).
\]
\end{itemize}
remark[Comparison to non-NN-based estimators]
Assuming $N_0\asymp N_1\asymp N$, it is worth noting that optimization-based methods are commonly of a time complexity $O(N^2)$ if not worse noshad2017direct. They are thus less appealing in terms of handling gigantic data as was argued in, e.g., astronomy lima2008estimating,kremer2015nearest and big text analysis borgeaud2021improving applications.
remark[Comparison to the two-step NN-based density ratio estimator]
Regarding Case I, a direct calculation yields that the time complexity of the simple two-step NN-based method, which separately estimates $f_1$ and $f_0$ based on individual $M$-NN density estimators, is
\[
O(d N_0 \log N_0 + d N_1 \log N_1 + N_0 M \log N_0 + N_0 M \log N_1).
\]
It is thus of the same order as Algorithm (ref) when $N_1 \asymp N_0$, while computationally heavier when $N_1 \prec N_0$. Regarding Case II, the time complexity of the simple two-step NN-based method is
\[
O(d N_0 \log N_0 + d N_1 \log N_1 + (N_0+n)M\log N_0 + (N_0+n)M\log N_1).
\]
Thus, if $n$ is of less or equal order of $N_0$, it is of the same order when $N_1 \asymp N_0$, while computationally heavier than Algorithm (ref) when $N_1 \prec N_0$.
remark[Comparison to the one-step NN-based density ratio estimator in noshad2017direct] It is worth noting that, in order to estimate $f$-divergence measures, noshad2017direct constructed another one-step NN-based estimator admitting the following simple form,
\[
\hat r_M^{\prime}(x)=\frac{N_0}{N_1}\frac{\cM_i}{\cN_i+1},
\]
where $\cN_i$ and $\cM_i$ are the numbers of points in $\{X_i\}_{i=1}^{N_0}$ and $\{Z_i\}_{i=1}^{N_1}$ among the $M$ NNs of $x$; cf. noshad2017direct. For Case I, its time complexity is
\[
O(d (N_0+N_1) \log (N_0+N_1) + N_0 M \log (N_0+N_1));
\]
while for Case II it is
\[
O(d (N_0+N_1) \log (N_0+N_1) + (N_0+n) M \log (N_0+N_1)).
\]
Both are at the same order as the naive NN-based one, but unlike the naive approach, this estimator is indeed one-step. However, it is still theoretically unclear if this estimator is statistically efficient; see Remark (ref) ahead for more details.
Density ratio estimation III: theory
This section introduces the theory for density ratio estimation based on NN matching. To this end, before establishing detailed theoretical properties (e.g., consistency and the rate of convergence) for $\hat r_M(\cdot)$, we first exhibit a lemma elaborating on the (asymptotic) $L^p$ moments of $\nu_1(A_M(x))$, the $\nu_1$-measure of the catchment area. This novel result did not appear in Abadie and Imbens's analysis. It is also of independent interest in stochastic and computational geometry in light of Remark (ref).
lemma[Asymptotic $L^p$ moments of catchment areas's $\nu_1$-measure]
Assuming $M\log N_0/N_0 \to 0$ as $N_0 \to \infty$, we have
\[
\lim_{N_0\to\infty} \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] = r(x)
\]
holds for $\nu_0$-almost all $x$. If we further assume $M \to \infty$, then for any positive integer $p$, we have
\[
\lim_{N_0\to\infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p\big(A_M(x)\big)\big] = \big[r(x)\big]^p
\]
holds for $\nu_0$-almost all $x$.
remark[Relation to the measure of Voronoi cells]
When $M=1$ and $\nu_0 = \nu_1$, the measure of catchment areas reduces to the measure of Voronoi cells as pointed out in Remark (ref). Interestingly, in the stochastic geometry literature, devroye2017measure studied a related problem of bounding the moments of the measure of Voronoi cells (cf. Theorem 2.1 therein). Setting $M=1$ and $\nu_0 = \nu_1$ in the first part of Lemma (ref) and recalling Remark (ref), we can derive their Theorem 2.1(i). On the other hand, devroye2017measure showed that, as $\nu_0 = \nu_1$, $p=2$, and $d\leq 3$, unlike $(M^{-1}N_0)^2 {\mathrm E}[\nu_1^2\big(A_M(x)\big)]$, $N_0^2{\mathrm E}[\nu_1^2(A_1(x))]$ does not converge to 1; cf. devroye2017measure. This supports the necessity of forcing $M \to \infty$ for stabilizing the moments of $\hat r_M(\cdot)$.
Consistency
We first establish the pointwise consistency of the estimator $\hat r_M(x)$ for estimating $r(x)$. This requires nearly no assumption on $\nu_0,\nu_1$ except for those made at the beginning of Section (ref), in line with similar observations made in NN-based density estimation MR3445317.
theorem[Pointwise consistency] Assume $M\log N_0/N_0 \to 0$.
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• (Asymptotic unbiasedness) For $\nu_0$-almost all $x$, we have
\[
\lim_{N_0\to\infty} {\mathrm E}\big[\hat{r}_M(x)\big] = r(x).
\]
• (Pointwise $L_p$ consistency) Let $p$ be any positive integer and assume $MN_1/N_0 \to \infty$ and $M \to \infty$ as $N_0 \to \infty$. Then for $\nu_0$-almost all $x$, we have
\[
\lim_{N_0\to\infty} {\mathrm E} \big[ \lvert \hat{r}_M(x) - r(x) \rvert^p\big] = 0.
\]
\end{enumerate}
For evaluating the global consistency of the estimator, on the other hand, it is necessary to introduce the following (global) $L_p$ risk:
align[align omitted — 254 chars of source]
where $X$ is a copy drawn from $\nu_0$ that is independent of the data. For the $L_p$ risk consistency of the estimator, we impose conditions on $\nu_0$ and $\nu_1$ further as follows.
Denote the supports of $\nu_0$ and $\nu_1$ by $S_0$ and $S_1$, respectively. For any set $S\subset \bR^d$, denote the diameter of $S$ by
\[
{\rm diam}(S):= \sup_{x,z \in S} \Big\lVert x-z \Big\rVert.
\]
assumption\phantomsection
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• $\nu_0, \nu_1$ are two probability measures on $\bR^d$, both are absolutely continuous with respect to $\lambda$, and $\nu_1$ is absolutely continuous with respect to $\nu_0$.
• There exists a constant $R>0$ such that ${\rm diam}(S_0) \le R$.
• There exist two constants $f_L,f_U>0$ such that for any $x \in S_0$ and $z \in S_1$, $f_L \le f_0(x) \le f_U$ and $f_1(z) \le f_U$.
• There exists a constant $a \in (0,1)$ such that for any $\delta \in (0,{\rm diam}(S_0)]$ and $z \in S_1$,
\[
\lambda(B_{z,\delta} \cap S_0) \ge a \lambda(B_{z,\delta}),
\]
recalling that $B_{z,\delta}$ represents the closed ball in $\bR^d$ with center at $z$ and radius $\delta$.
\end{enumerate}
remarkAssumption (ref) is standard in the literature for establishing the global consistency of density ratio estimators. The regularity conditions on the support ensure that the angle of the support is not too sharp, which trivially hold for any $d$-dimensional cube. These conditions were also enforced in nguyen2010estimating, sugiyama2008direct, kpotufe2017lipschitz, among many others.
We then establish the $L_p$ risk consistency of the estimator via the Hardy–Littlewood maximal inequality stein2016singular; cf. Lemma (ref) ahead. Of note, this inequality was used in han2020optimal in a relative manner in order to study the information-theoretical limit of entropy estimation.
theorem[$L_p$ risk consistency]
Assume the pair of $\nu_0, \nu_1$ satisfies Assumption (ref). Let $p$ be any positive integer. Assume further that $M\log N_0/N_0 \to 0$, $MN_1/N_0 \to \infty$, and $M \to \infty$ as $N_0 \to \infty$. We then have
\[
\lim_{N_0\to\infty} {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert^p f_0(x) {\mathrm d} x \Big] = 0.
\]
As a direct corollary of Theorem (ref), one can obtain the limit of any finite moment of $\nu_1(A_M(\cdot))$ with a random center. This could be regarded as a global extension of Lemma (ref).
corollaryAssume the same conditions as in Theorem (ref).
We then have
\[
\lim_{N_0\to\infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p\big(A_M(W)\big)\big] = {\mathrm E} \big(\big[r(W)\big]^p\big),
\]
where $W$ follows an arbitrary distribution that is absolutely continuous with respect to $\nu_0$ and has density bounded upper and below by two positive constants. In particular, it holds when $W$ is drawn from $\nu_0$.
Rates of Convergence
In this section we establish the rates of convergence for $\hat r(x)$ under both pointwise and global measures. We first consider the pointwise mean square error (MSE) convergence rate and show that $\hat r_M(\cdot)$ is minimax optimal in that regard. In the sequel, we fix an $x \in \bR^d$ and consider the following local assumption on $(\nu_0,\nu_1)$.
assumption[Local assumption] \phantomsection
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• $\nu_0, \nu_1$ are two probability measures on $\bR^d$, both are absolutely continuous with respect to $\lambda$, and $\nu_1$ is absolutely continuous with respect to $\nu_0$.
• There exist two constants $f_L,f_U>0$ such that $f_0(x) \ge f_L$ and $f_1(x) \le f_U$.
• There exists a constant $\delta>0$ such that for any $z \in B_{x,\delta}$,
\[
\lvert f_0(x) - f_0(z) \rvert \vee \lvert f_1(x) - f_1(z) \rvert \le L \lVert x-z \rVert,
\]
for some constants $L>0$.
\end{enumerate}
Define the following probability class
\[
\cP_{x,\rm p}(f_L,f_U,L,d,\delta):=\Big\{(\nu_0,\nu_1): \text{Assumption \ref{asp:ptw} holds} \Big\}.
\]
The following theorem establishes the uniform pointwise convergence rate of $\hat r_M(\cdot)$.
theorem[Pointwise rates of convergence] Assume $M\log N_0/N_0 \to 0$ and $M/\log N_0 \to \infty$, and consider a sufficiently large $N_0$.
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• Asymptotic bias:
\[
\sup_{(\nu_0,\nu_1) \in \cP_{x,\rm p}(f_L,f_U,L,d,\delta)}\Big\lvert {\mathrm E}\big[\hat{r}_M(x)\big] - r(x) \Big\rvert \le C \Big(\frac{M}{N_0}\Big)^{1/d},
\]
where $C>0$ is a constant only depending on $f_L,f_U,L,d$.
\end{enumerate}
Further assume $MN_1/N_0 \to \infty$.
\begin{enumerate}[resume*]
• Asymptotic variance:
\[
\sup_{(\nu_0,\nu_1) \in \cP_{x,\rm p}(f_L,f_U,L,d,\delta)}\Var\big[\hat{r}_M(x)\big] \le C' \Big[ \Big(\frac{1}{M}\Big) + \Big(\frac{N_0}{MN_1}\Big)\Big],
\]
where $C'>0$ is a constant only depending on $f_L,f_U$.
• Asymptotic MSE: \[
\sup_{(\nu_0,\nu_1) \in \cP_{x,\rm p}(f_L,f_U,L,d,\delta)} {\mathrm E}\big[\hat{r}_M(x) - r(x)\big]^2 \le C'' \Big[ \Big(\frac{M}{N_0}\Big)^{2/d} + \Big(\frac{1}{M}\Big) + \Big(\frac{N_0}{MN_1}\Big)\Big],
\]
where $C''>0$ is a constant only depending on $f_L,f_U,L,d$.
\end{enumerate}
Further assume $N_1^{-\frac{d}{2+d}}\log N_0 \to 0$.
\begin{enumerate}[resume*]
• Fix $\alpha > 0$ and take $M = \alpha \cdot\{N_0^{\frac{2}{2+d}} \vee (N_0 N_1^{-\frac{d}{2+d}})\}$. We have
\begin{align}
\sup_{(\nu_0,\nu_1) \in \cP_{x,\rm p}(f_L,f_U,L,d,\delta)} {\mathrm E}\big[\hat{r}_M(x) - r(x)\big]^2 \le C”' (N_0 \wedge N_1)^{-\frac{2}{2+d}},
\end{align}
where $C'''>0$ is a constant only depending on $f_L,f_U,L,d,\alpha$.
\end{enumerate}
The final rate of convergence in Theorem (ref), Equ. (ref) matches the established minimax lower bound in Lipschitz density function estimation MR2724359. By some simple manipulation, the argument in MR2724359 directly extends to density ratio as the latter is a harder statistical problem kpotufe2017lipschitz. This is formally stated in the following proposition.
proposition[Pointwise MSE minimax lower bound]
For all sufficiently large $N_0$,
\[
\inf_{\tilde{r}} \sup_{(\nu_0,\nu_1) \in \cP_{x,\rm p}(f_L,f_U,L,d,\delta)} {\mathrm E}\big[\tilde{r}(x) - r(x)\big]^2 \ge c (N_0 \wedge N_1)^{-\frac{2}{2+d}},
\]
where $c>0$ is a constant only depending on $f_L,f_U,L,d$ and the infimum is taken over all measurable functions.
We then move on to the case of a global risk and study the rates of convergence in this regard. To this end, a global assumption on $(\nu_0,\nu_1)$ is given below.
assumption[Global assumption] \phantomsection
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• $\nu_0, \nu_1$ are two probability measures on $\bR^d$, both are absolutely continuous with respect to $\lambda$, and $\nu_1$ is absolutely continuous with respect to $\nu_0$.
• There exists a constant $R>0$ such that ${\rm diam}(S_0) \le R$.
• There exist two constants $f_L,f_U>0$ such that for any $x \in S_0$ and $z \in S_1$, $f_L \le f_0(x) \le f_U$ and $f_1(z) \le f_U$.
• There exists a constant $a \in (0,1)$ such that for any $\delta \in (0,{\rm diam}(S_0)]$ and any $z \in S_1$,
\[
\lambda(B_{z,\delta} \cap S_0) \ge a \lambda(B_{z,\delta}).
\]
• There exists a constant $H>0$ such that the surface area (Hausdorff measure, evans2018measure)
of $S_1$ is bounded by $H$.
• There exists a constant $L>0$ such that for any $x,z \in S_1$,
\[
\lvert f_0(x) - f_0(z) \rvert \vee \lvert f_1(x) - f_1(z) \rvert \le L \lVert x-z \rVert.
\]
\end{enumerate}
remarkAssumption (ref) is standard in the literature for establishing the global risk of density ratio estimators; similar assumptions were made in zhao2020analysis and zhao2020minimax. Note that the regularity conditions on the support automatically hold for $d$-dimensional cubes, and the restriction on the surface area is added to control the boundary effect on NN-based methods.
Define the following probability class
align[align omitted — 137 chars of source]
The next theorem establishes the uniform rate of convergence of $\hat r(\cdot)$ within the above probability class and under the $L_1$ risk. This rate is further matched by a minimax lower bound derived in Theorem 1 of zhao2020analysis using similar arguments as in the pointwise case.
theorem[Global rates of convergence under the $L_1$ risk] Assume $M\log N_0/N_0 \to 0$, $M/\log N_0 \to \infty$, $MN_1/N_0 \to \infty$, and consider a sufficiently large $N_0$.
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• We have the following uniform upper bound,
\[
\sup_{(\nu_0,\nu_1) \in \cP_{\rm g}(f_L,f_U,L,d,a,H,R)} {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert f_0(x) {\mathrm d} x \Big] \le C \Big[ \Big(\frac{M}{N_0}\Big)^{1/d} + \Big(\frac{1}{M}\Big)^{1/2} + \Big(\frac{N_0}{MN_1}\Big)^{1/2}\Big] ,
\]
where $C>0$ is a constant only depending on $f_L,f_U,a,H,L,d$.
• Further assume $N_1^{-\frac{d}{2+d}}\log N_0 \to 0$, fix $\alpha > 0$, and take $M = \alpha\cdot\{ N_0^{\frac{2}{2+d}} \vee (N_0 N_1^{-\frac{d}{2+d}})\}$. We then have
\[
\sup_{(\nu_0,\nu_1) \in \cP_{\rm g}(f_L,f_U,L,d,a,H,R)} {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert f_0(x) {\mathrm d} x \Big] \le C' (N_0 \wedge N_1)^{-\frac{1}{2+d}},
\]
where $C'>0$ is a constant only depending on $f_L,f_U,a,H,L,d,\alpha$.
\end{enumerate}
proposition[Global minimax lower bound under the $L_1$ risk]
If $a$ is sufficiently small and $H,R$ are sufficiently large, then for all sufficiently large $N_0$,
\[
\inf_{\tilde{r}} \sup_{(\nu_0,\nu_1) \in \cP_{\rm g}(f_L,f_U,L,d,a,H,R)} {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \tilde{r}(x) - r(x) \Big\rvert f_0(x) {\mathrm d} x \Big] \ge c (N_0 \wedge N_1)^{-\frac{1}{2+d}},
\]
where $c>0$ is a constant only depending on $f_L,f_U,L,d$ and the infimum is taken over all measurable functions.
remark[Comparison to the one-step estimator in noshad2017direct]
The estimator introduced in Remark (ref) by noshad2017direct is, to our knowledge, the only alternative density ratio estimator in the literature that is able to attain both the properties (ref) and (ref). However,
the arguments in noshad2017direct can only yield the bound
\[
{\mathrm E}\big[\hat r_M^{\prime}(x) - r(x)\big]^2 \lesssim \Big(\frac{M}{N_0}\Big)^{1/d} + \Big(\frac{1}{M}\Big)
\]
for $(\nu_0,\nu_1) \in \cP_{x,\rm p}(f_L,f_U,L,d,\delta)$. This is via Equ. (21) therein, de-poissonizing the estimator, and further assuming $N_1/N_0$ converges to a positive constant. The above bound is strictly looser than the bound $(M/N_0)^{2/d}+M^{-1}$ for $\hat r_M(\cdot)$ shown in Theorem (ref). However, it seems mathematically challenging to improve their analysis and accordingly, unlike $\hat r_M(\cdot)$, it is still theoretically unclear if the estimator $\hat{r}_M^{\prime}(x)$ is a statistically efficient density ratio estimator.
Revisiting the matching-based estimator of the ATE
This section studies the bias-corrected NN matching-based estimator of the ATE, proposed in abadie2011bias to correct the asymptotic bias of the original matching-based estimator derived by abadie2006large. To this end, we leverage the new insights obtained in the last three sections, and bridge the study to both the classic double robustness framework scharfstein1999adjusting,bang2005doubly and the modern double machine learning framework chernozhukov2018double.
We first introduce the setup for the NN matching-based estimator and its bias-corrected version. Following abadie2006large, let $[(X_i,D_i,Y_i)]_{i=1}^n$ be $n$ independent independent copies of $(X,D,Y)$, where $D\in\{0,1\}$ is a binary variable, $X \in \bR^d$ represents the individual covariates, assumed to be absolute continuous admitting a density $f_X$, and $Y \in \bR$ stands for the outcome variable.
For each unit $i \in \llbracket n\rrbracket$, we observe $D_i=1$ if in the treated group and $D_i=0$ if in the control group. Let $n_0:=\sum_{i=1}^n (1-D_i)$ and $n_1:=\sum_{i=1}^n D_i$ be the numbers of control and treated units, respectively. Under the potential outcome framework rubin1974estimating, the unit $i$ has two potential outcomes, $Y_i(1)$ and $Y_i(0)$, but we observe only one of them:
\[
Y_i =
casesY_i(0), & if D_i=0,\\
Y_i(1), & if D_i=1.
\]
The goal is to estimate the following population ATE,
align*[align* omitted — 61 chars of source]
based on the observations $\{(X_i, D_i, Y_i)\}_{i=1}^n$. To estimate ATE, we consider its empirical counterpart
align*[align* omitted — 96 chars of source]
where $\hat{Y}_i(0)$ and $\hat{Y}_i(1)$ are the imputed outcomes of $Y_i(0)$ and $Y_i(1)$. With a fixed $M$, the matching-based estimator in abadie2006large imputes the missing potential outcomes by
align*[align* omitted — 356 chars of source]
Here for $\omega\in\{0,1\}$, $\mathcal{J}^\omega_M(i)$ represents the index set of $M$-NNs of $X_i$ in $\{X_j:D_j=\omega\}_{j=1}^n$, i.e., the set of all indices $j \in \llbracket n\rrbracket$ such that $D_j=\omega$ and
\[
\sum_{\ell=1, D_\ell=\omega}^n \ind\Big(\lVert X_\ell -X_i \rVert \le \lVert X_j - X_i \rVert\Big) \le M.
\]
Let $K^\omega_M(i)$ be the number of matched times for unit $i$ such that $D_i=\omega$, i.e.,
\[
K^\omega_M(i) := \sum_{j=1, D_j = 1-\omega}^n \ind\Big(i \in \cJ^\omega_M(j)\Big).
\]
With the above notation and concepts, the matching-based estimator in abadie2006large can be written as
align[align omitted — 183 chars of source]
However, when $d>1$, the bias term of $\hat{\tau}_M$ is asymptotically non-negligible abadie2006large. To fix this, abadie2011bias proposed the following bias-corrected version for $\hat\tau_M$. In detail, let $\hat{\mu}_0(x)$ and $\hat{\mu}_1(x)$ be mappings from $\bR^d$ to $\bR$ that estimate the conditional means of the outcomes
\[
\mu_0(x) := {\mathrm E} [Y \,|\, X=x,D=0]~~ {\rm and}~~ \mu_1(x) := {\mathrm E} [Y \,|\, X=x,D=1],
\]
respectively, with the corresponding residuals
\[
\hat{R}_i := Y_i - \hat{\mu}_{D_i}(X_i), ~~i\in\llbracket n\rrbracket.
\]
The estimator based on the outcomes regression is
\[
\hat{\tau}^{\rm reg}:= n^{-1} \sum_{i=1}^n \Big[\hat{\mu}_1(X_i) - \hat{\mu}_0(X_i)\Big].
\]
One is then ready to check that the bias-corrected matching-based estimator in abadie2011bias has the following equivalent form, summarized as a lemma.
lemmaThe bias-corrected matching-based estimator in abadie2011bias can be rewritten as
\begin{align}
\hat{\tau}_M^{\rm bc} = \hat{\tau}^{\rm reg} + \frac{1}{n} \Big[ \sum_{i=1,D_i = 1}^n \Big(1 + \frac{K^1_M(i)}{M}\Big) \hat{R}_i - \sum_{i=1,D_i = 0}^n \Big(1 + \frac{K^0_M(i)}{M}\Big) \hat{R}_i \Big].
\end{align}
Equ. (ref) is related to doubly robust estimators. To compare them, we review the general double robustness framework. In detail, we first have some outcome models and residuals defined in the same way as above, and then let
\[
\hat{e}(x):\bR^d \to \bR
\]
be a genetic estimator of the propensity score
\[
e(x) := {\mathrm P}(D=1 \,|\, X =x).
\]
The doubly robust estimator in scharfstein1999adjusting and bang2005doubly could then be formulated as
align[align omitted — 209 chars of source]
Notice that conditional on $\mD := (D_1, \ldots, D_n)$, $[X_i:D_i=\omega]_{i=1}^n$ are $n_{\omega}$ i.i.d. random variables sampled from the distribution of $X \,|\, D=\omega$,
and the two groups of sample points,
\[
[X_i:D_i=0]_{i=1}^n ~~~{\rm and}~~~ [X_i:D_i=1]_{i=1}^n,
\]
are mutually independent. Denote the density of $X \,|\, D=\omega$ by $f_{X \,|\, D=\omega}$.
From the construction of $K_M^0(i), K_M^1(i)$ and results in Section (ref), under the density assumptions and an appropriate choice of $M$, conditional on $\mD$,
\[
\frac{n_0}{n_1} \frac{K^0_M(i)}{M}~~~{\rm and}~~~ \frac{n_1}{n_0} \frac{K^1_M(i)}{M}
\]
are consistent estimators of
\[
\frac{f_{X \,|\, D=1}(X_i)}{f_{X \,|\, D=0}(X_i)} ~~~{\rm and}~~~\frac{f_{X \,|\, D=0}(X_i)}{f_{X \,|\, D=1}(X_i)},
\]
respectively. Noting further that $n_1/n_0$ converges almost surely to ${\mathrm P}(D=1)/{\mathrm P}(D=0)$ by the law of large numbers, the following two statistics
\[
\frac{K^0_M(i)}{M}~~~{\rm and }~~~\frac{K^1_M(i)}{M}
\]
are then consistent estimators of
\[
\frac{e(X_i)}{1-e(X_i)}~~~{\rm and }~~~\frac{1-e(X_i)}{e(X_i)},
\]
respectively. Thus, in view of (ref), the bias-corrected matching-based estimator $\hat{\tau}_M^{\rm bc}$ in (ref) is actually a doubly robust estimator of $\tau$, and accordingly, should also enjoy all the desirable properties of doubly robust estimators. This novel insight into abadie2011bias's bias-corrected matching estimator allows us to establish its asymptotic properties with a diverging $M$, which is the main topic in the rest of this section. It is worth mentioning here that Abadie and Imbens never pointed out the relation between matching-based ATE estimators and the double robustness framework, and there is no study in the double robustness literature that has analyzed NN matching-based estimators.
To formally state the properties, we first leverage the results of
chernozhukov2018double. In the sequel, let $U_\omega := Y(\omega) - \mu_{\omega}(X)$ for $\omega \in \{0,1\}$ and $\bX$ be the support of $X$.
assumption\phantomsection
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• For almost all $x \in \bX$, $D$ is independent of $(Y(0),Y(1))$ conditional on $X=x$, and there exists some constant $\eta > 0$ such that $\eta < {\mathrm P}(D=1 \,|\, X=x) < 1-\eta$.
• $[(X_i,D_i,Y_i)]_{i=1}^n$ are i.i.d. following the joint distribution of $(X,D,Y)$.
• ${\mathrm E} [U^2_\omega \,|\, X=x] $ is uniformly bounded for almost all $x \in \bX$ and $\omega \in \{0,1\}$.
• ${\mathrm E} [\mu^2_\omega]$ is bounded for $\omega \in \{0,1\}$.
\end{enumerate}
assumption\phantomsection
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• ${\mathrm E} [U^2_\omega]$ is bounded away from zero for $\omega \in \{0,1\}$.
• There exists some constants $\kappa>0$ such that ${\mathrm E} [\lvert Y \rvert^{2+\kappa}]$ is bounded.
\end{enumerate}
assumptionFor $\omega \in \{0,1\}$, there exists a deterministic function $\bar{\mu}_\omega(\cdot):\bR^d \to \bR$ such that ${\mathrm E} [\bar{\mu}^2_\omega(X)]$ is bounded and the estimator $\hat{\mu}_\omega(x)$ satisfies
\[
\lVert \hat{\mu}_\omega - \bar{\mu}_\omega \rVert_\infty = o_{\mathrm P}(1),
\]
where $\lVert \cdot \rVert_\infty$ denotes the function $L_\infty$ norm.
assumptionFor $\omega \in \{0,1\}$, the estimator $\hat{\mu}_\omega(x)$ satisfies
\[
\lVert \hat{\mu}_\omega - \mu_\omega \rVert_\infty = o_{\mathrm P}(1).
\]
assumptionFor $\omega \in \{0,1\}$, the estimator $\hat{\mu}_\omega(x)$ satisfies
\[
\lVert \hat{\mu}_\omega - \mu_\omega \rVert_\infty = o_{\mathrm P}(n^{-d/(4+2d)}).
\]
remarkAssumption (ref)(ref) is the unconfoundedness and overlap assumptions, and is often referred to as the strong ignorability condition rosenbaum1983central. Assumption (ref) corresponds to Assumption 5.1 in chernozhukov2018double, and are similar to Assumption 4 in abadie2006large. Assumption (ref) allows for the misspecification of the outcome models; for example, if $\hat{\mu}_\omega = \bar{\mu}_\omega = 0$, $\hat{\tau}_M^{\rm bc}$ then reduces to $\hat{\tau}_M$. Assumption (ref) assumes that the outcome models are correctly specified. Assumption (ref) assumes approximation accuracy of the outcome model. abadie2011bias uses the power series approximation newey1997convergence to estimate the outcome model, which under some classic nonparametric statistics assumptions automatically satisfy Assumption (ref) (cf. Lemma A.1 in abadie2011bias).
remarkIn Assumption (ref), we assume an approximation rate under $L_\infty$ norm. This is different from the $L_2$ norm put in Assumption 5.1 in chernozhukov2018double, but can be handled with some trivial modification to the proof of chernozhukov2018double since one can replace the Cauchy–Schwarz inequality by the $L_1$-$L_\infty$ Hölder's inequality. Theorem (ref) can then be applied directly.
Lastly, we review the semiparametric efficiency lower bound for estimating ATE hahn1998role:
\[
\sigma^2:= {\mathrm E} \Big[\mu_1(X) - \mu_0(X) + \frac{D(Y-\mu_1(X))}{e(X)} - \frac{(1-D)(Y-\mu_0(X))}{1-e(X)} - \tau \Big]^2.
\]
Theorem (ref) above and standard results on the double machine learning estimators (cf. chernozhukov2018double) then imply the following theorem, showing that, once allowing $M$ to diverge at an appropriate rate, $\hat{\tau}_M^{\rm bc}$ in (ref) constitutes a doubly robust estimator of $\tau$. In addition, the counterpart of $\hat{\tau}_M^{\rm bc}$ via sample splitting and cross fitting chernozhukov2018double, denoted by $\tilde{\tau}_{M,K}^{\rm bc}$ with $K \ge 2$ representing a fixed number of partitions, is semiparametrically efficient. Check the beginning of Theorem (ref)'s proof for a formal definition of $\tilde{\tau}_{M,K}^{\rm bc}$.
theorem\phantomsection
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• (Double robustness) On one hand, if the distribution of $(X,D,Y)$ satisfies Assumptions (ref), (ref), and either $({\mathrm P}_{X\,|\, D=0}, {\mathrm P}_{X\,|\, D=1})$ or $({\mathrm P}_{X\,|\, D=1}, {\mathrm P}_{X\,|\, D=0})$ satisfies Assumption (ref), then if $M\log n/n \to 0$ and $M \to \infty$ as $n \to \infty$,
\begin{align*}
\hat{\tau}_M^{\rm bc} - \tau \stackrel{\sf p}{\longrightarrow} 0 {\rm and} \tilde{\tau}_{M,K}^{\rm bc} - \tau \stackrel{\sf p}{\longrightarrow} 0.
\end{align*}
On the other hand, if the distribution of $(X,D,Y)$ satisfies Assumptions (ref) and (ref), then
\begin{align*}
\hat{\tau}_M^{\rm bc} - \tau \stackrel{\sf p}{\longrightarrow} 0 {\rm and} \tilde{\tau}_{M,K}^{\rm bc} - \tau \stackrel{\sf p}{\longrightarrow} 0.
\end{align*}
• (Semiparametric efficiency of $\tilde{\tau}_{M,K}^{\rm bc}$) Assume the distribution of $(X,D,Y)$ satisfies Assumptions (ref), (ref), (ref) and either $({\mathrm P}_{X\,|\, D=0}, {\mathrm P}_{X\,|\, D=1})$ or $({\mathrm P}_{X\,|\, D=1}, {\mathrm P}_{X\,|\, D=0})$ satisfies Assumption (ref). Then if we pick $M = \alpha n^{\frac{2}{2+d}}$ for some constant $\alpha>0$,
\begin{align*}
\sqrt{n} (\tilde{\tau}_{M,K}^{\rm bc} - \tau) \stackrel{\sf d}{\longrightarrow} N(0,\sigma^2).
\end{align*}
In addition, letting
\begin{align*}
\hat{\sigma}^2:= \frac{1}{n} \sum_{i=1}^n \Big[\hat{\mu}_1(X_i) - \hat{\mu}_0(X_i) + D_i\Big(1 + \frac{K^1_M(i)}{M}\Big)\hat R_i -
(1-D_i)\Big(1 + \frac{K^0_M(i)}{M}\Big)\hat R_i - \hat{\tau}_M^{\rm bc} \Big]^2,
\end{align*}
we have $\hat{\sigma}^2\stackrel{\sf p}{\longrightarrow}\sigma^2$.
\end{enumerate}
remarkBoth $\hat\tau_{M}^{\rm bc}$ and $\tilde{\tau}_{M,K}^{\rm bc}$ directly estimate $1/e(X)$ and $1/(1-e(X))$ using $1+K_M^1(X)/M$ and $1+K_M^0(X)/M$, respectively. This is slightly different from the setup in chernozhukov2018double, which considered plug-in estimators based on an estimate of $e(X)$. Accordingly, some minor modifications are needed for employing their Theorem 5.1, and are completed in the proof of Theorem (ref)(ref).
remarkTo be in line with the double robustness terminology, we can call Assumptions (ref) and (ref) in Theorem (ref) the “density (or propensity) model assumptions” and Assumptions (ref) and (ref) the “outcome (or regression) model assumptions”. Note also that in Theorem (ref) we require additional smoothness (Lipschitz) conditions on the density functions. This is stronger than the corresponding conditions made in abadie2011bias but is needed for us to prove the semiparametric efficiency of $\tilde{\tau}_{M,K}^{\rm bc}$'s based on the double machine learning framework. On the other hand, this requirement could be removed for $\hat{\tau}_M^{\rm bc}$ via a more careful treatment based on the particular structure of the matching-based estimators; cf. Theorem (ref) and Remark (ref) ahead.
The analysis of $\hat\tau_M^{\rm bc}$ itself, on the other hand, cannot be directly incorporated in the double machine learning and its analysis has to be done independently. This is given in the next theorem based on the following two sets of assumptions.
assumption\phantomsection
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• ${\mathrm E} [U^2_\omega \,|\, X=x]$ is uniformly bounded away from zero for almost all $x \in \bX$ and $\omega \in \{0,1\}$.
• There exists some constants $\kappa>0$ such that ${\mathrm E} [\lvert U_\omega \rvert ^{2+\kappa} \,|\, X=x]$ is uniformly bounded for almost all $x \in \bX$ and $\omega \in \{0,1\}$.
• $\max_{t \in \Lambda_{\lfloor d/2 \rfloor + 1}} \lVert \partial^t \mu_{\omega} \rVert_\infty$ is bounded, where for any positive integer $k$, $\Lambda_k$ is the set of all $d$-dimensional vectors of nonnegative integers $t=(t_1,\ldots,t_d)$ such that $\sum_{i=1}^d t_i = k$ and $\lfloor \cdot \rfloor$ stands for the floor function.
\end{enumerate}
assumption\phantomsection
There exists some constant $\varepsilon>0$ such that for $\omega \in \{0,1\}$, the estimator $\hat{\mu}_\omega(x)$ satisfies
\[
\max_{t \in \Lambda_{\lfloor d/2 \rfloor + 1}} \lVert \partial^t \hat{\mu}_{\omega} \rVert_\infty = O_{\mathrm P}(1)~~~{\rm and}~~~ \max_{\ell \in \llbracket \lfloor d/2 \rfloor\rrbracket} \max_{t \in \Lambda_\ell} \lVert \partial^t \hat{\mu}_{\omega} - \partial^t \mu_{\omega} \rVert_\infty = O_{\mathrm P}(n^{-\gamma_\ell}),
\]
with some constants $\gamma_\ell$'s satisfying $\gamma_\ell > \frac{1}{2} - \frac{\ell}{d} + \varepsilon$ for $\ell=1,2,\ldots,\lfloor d/2 \rfloor$.
theorem[Semiparametric efficiency of $\hat\tau_M^{\rm bc}$]
Assume the distribution of $(X,D,Y)$ satisfies Assumptions (ref), (ref), (ref) and either $({\mathrm P}_{X\,|\, D=0}, {\mathrm P}_{X\,|\, D=1})$ or $({\mathrm P}_{X\,|\, D=1}, {\mathrm P}_{X\,|\, D=0})$ satisfies Assumption (ref). Define
\[
\gamma := \min_{\ell \in \llbracket \lfloor d/2 \rfloor\rrbracket }\Big\{ \Big[1-\Big(\frac{1}{2} - \gamma_\ell + \varepsilon\Big)\frac{d}{\ell}\Big] \wedge \Big[1- \Big(\frac{1}{2} + \varepsilon\Big)\frac{d}{\lfloor d/2 \rfloor + 1}\Big]\Big\};
\]
recall that $\gamma_\ell$'s and the constant $\varepsilon$ were introduced in Assumption (ref). Then, if $M \to \infty$ as $n \to \infty$ and $M \lesssim n^\gamma$,
\begin{align*}
\sqrt{n} (\hat\tau_M^{\rm bc} - \tau) \stackrel{\sf d}{\longrightarrow} N(0,\sigma^2).
\end{align*}
If in addition Assumption (ref) holds, we have $\hat{\sigma}^2\stackrel{\sf p}{\longrightarrow}\sigma^2$.
remarkAssumption (ref) is comparable to Assumption A.4 and the assumptions of Theorem 2 in abadie2011bias. Compared to the assumptions of Theorem 2 in abadie2011bias, Assumption (ref)(ref) is weaker in the sense that we only require a finite order of smoothness. Assumption (ref) again assumes the approximation accuracy of the outcome model, with lower convergence rates required for higher order derivatives of the outcome model. We note that under some smoothness conditions on the outcome model as made in abadie2011bias, Assumption (ref) is satisfied using power series approximation abadie2011bias.
remarkDue to the intrinsic structure of bias-corrected matching-based estimators, unlike a direct use of Hölder's inequality and assuming Assumption (ref) for double machine learning estimators, we instead assume Assumption (ref) on the approximation accuracy of the derivatives of the outcome models. There are additionally two differences between Theorem (ref)(ref) and Theorem (ref). First, unlike in Theorem (ref)(ref) where $M$ needs to grow polynomially fast with $n$, in Theorem (ref) we only require $M$ to (i) diverge not so fast for controlling the difference of matching units; and (ii) diverge to infinity (no matter how slowly it is) for achieving semiparametric efficiency. The sets of assumptions in Theorems (ref)(ref) and (ref) both render semiparametric efficiency for bias-corrected matching-based estimators. Second, in Theorem (ref) we only require Assumption (ref) to hold for the density model. This is again weaker than the Lipschitz-type conditions (Assumption (ref)) assumed in Theorem (ref)(ref) but is in line with the observations made in abadie2006large and abadie2011bias.
As $d = 1$, by picking $\hat{\mu}_\omega = 0$ for $\omega \in \{0,1\}$, Assumption (ref) is automatically satisfied and the bias-corrected estimator $\hat\tau_M^{\rm bc}$ reduces to the original estimator $\hat\tau_M$ studied in abadie2006large. Theorem (ref) then directly implies the following corollary, which corresponds to abadie2006large but with one key difference that $M\to\infty$ here.
corollary[Semiparametric efficiency of $\hat\tau_M$ when $d=1$]
Assume $d=1$, the distribution of $(X,D,Y)$ satisfies Assumptions (ref), (ref), and either $({\mathrm P}_{X\,|\, D=0}, {\mathrm P}_{X\,|\, D=1})$ or $({\mathrm P}_{X\,|\, D=1}, {\mathrm P}_{X\,|\, D=0})$ satisfies Assumption (ref). If $M \to \infty$ as $n \to \infty$ and $M \lesssim n^{\frac{1}{2} - \varepsilon}$ for some $\varepsilon>0$, then we have
\begin{align*}
\sqrt{n} (\hat\tau_M - \tau) \stackrel{\sf d}{\longrightarrow} N(0,\sigma^2).
\end{align*}
remarkBy picking $\hat{\mu}_\omega = 0$ for $\hat\tau_M$, Assumption (ref) is no longer satisfied. Accordingly, in Corollary (ref), $\hat{\sigma}^2$ may not be a consistent estimator of $\sigma^2$ without additional assumptions. However, by decomposing $\sigma^2$ into the form of Theorem 1 in hahn1998role, one could still estimate $\sigma^2$ via a similar and direct way as what is outlined in Section 4 in abadie2006large. We do not pursue this track in detail here as the case of $d=1$ without Assumption (ref) is beyond the main scope of this manuscript.
remarkThere are three additional problems in abadie2006large, abadie2012martingale. First, estimation of the average treatment effect on the treated (ATT) can be incorporated in the double robustness and double machine learning framework (Theorem (ref)) and matching framework (Theorem (ref)) in the same way. Second, asymptotic normality (with an additional asymptotic bias term) of $\hat{\tau}_M$ in general $d$ can be established as Theorem (ref). Third, unbalanced designs with $n_0 \succ n_1$ cannot be incorporated in the double robustness and double machine learning framework. In the supplement, we shall study the above unbalanced design case as $M$ is forced to diverge with $n$ and establish the corresponding properties.
Discussion
The success of NN matching in estimating ATE raises natural question about possible extension to other functional estimation problems. In what follows we present some partial results along this direction for the KL divergence estimation, which is a topic of interest in many applications; cf. the references at the beginning of zhao2020minimax.
In detail, let's consider the same two-sample setting as Sections (ref)-(ref). Denote $\phi(x) := x\log x$ with the convention that $\phi(0) = 0$. We consider estimating the KL divergence between $\nu_1$ and $\nu_0$, written as
align*[align* omitted — 82 chars of source]
based on the data points $\{X_i\}_{i=1}^{N_0},\{Z_j\}_{j=1}^{N_1}$. To estimate $D_\phi(\nu_1 \Vert \nu_0)$, it is natural to consider the following plug-in estimator,
align[align omitted — 168 chars of source]
where $\hat r_M(\cdot)$ is the NN matching-based density ratio estimator introduced in Section (ref).
Define the following probability class
align[align omitted — 228 chars of source]
The following results establish the MSE convergence rate of $\hat{D}_\phi$ and show that the estimator is minimax optimal over $\cP_{\rm KL}(f_L,f_U,L,d,a,H,R,f_U')$. Under the condition that $N_0\gtrsim N_1$, this rate is further (up to some $\log n$-terms) minimax optimal in view of han2020optimal and similar arguments as used in Section (ref).
theorem[Rates of convergence, KL divergence estimation] \phantomsection
\begin{enumerate}[itemsep=-.5ex,label=(\roman*)]
• Assume $M\log N_0/N_0 \to 0$, $M/\log N_0 \to \infty$, $MN_1/(N_0\log^2N_1) \to \infty$, $N_1^{-\frac{d}{1+d}}\log N_0 \to 0$. Then for all sufficiently large $N_0$,
\[
\sup_{(\nu_0,\nu_1) \in \cP_{\rm KL}(f_L,f_U,L,d,a,H,R,f_U')} {\mathrm E}\Big[\hat{D}_\phi - D_\phi(\nu_1 \Vert \nu_0) \Big]^2 \le C \Big[ \frac{1}{N_0} + \frac{1}{N_1} + \Big(\frac{M}{N_0}\Big)^{2/d} + \Big(\frac{1}{M}\Big)^2 + \Big(\frac{N_0}{MN_1}\Big)^2\Big] ,
\]
where $C>0$ is a constant only depending on $f_L,f_U,a,H,L,d,f_U'$.
• Fix $\alpha > 0$, and take $M = \alpha (N_0^{\frac{1}{1+d}}) \vee (N_0 N_1^{-\frac{d}{1+d}})$. Then for all sufficiently large $N_0$,
\[
\sup_{(\nu_0,\nu_1) \in \cP_{\rm KL}(f_L,f_U,L,d,R,a,H,f_U')} {\mathrm E}\Big[\hat{D}_\phi - D_\phi(\nu_1 \Vert \nu_0) \Big]^2 \le C' (N_0 \wedge N_1)^{-\frac{2}{1+d}},
\]
where $C'>0$ is a constant only depending on $f_L,f_U,a,H,L,d,f_U',\alpha$.
\end{enumerate}
proposition[MSE minimax rate, KL divergence estimation]
If $a$ is sufficiently small and $L,R,H,f_U'$ are sufficiently large, then for all sufficiently large $N_0$,
\[
\inf_{\tilde{D}_\phi} \sup_{(\nu_0,\nu_1) \in \cP_{\rm KL}(f_L,f_U,L,d,a,H,R,f_U')} {\mathrm E}\Big[\tilde{D}_\phi - D_\phi(\nu_1 \Vert \nu_0) \Big]^2 \ge c \Big[ \Big(\frac{1}{N_1}\Big)^{\frac{2}{1+d}} \Big(\frac{1}{\log N_1}\Big)^{\frac{2+4d}{1+d}} + \frac{1}{N_1} \Big],
\]
where $c>0$ is a constant only depending on $f_L,f_U,d$ and the infimum is taken over all measurable functions.
Proofs of the main results
\paragraph*{Additional notation.} We use $\mX$ and $\mZ$ to represent $(X_1,X_2,\ldots,X_{N_0})$ and $(Z_1,Z_2,\ldots,Z_{N_1})$, respectively. Let $U(0,1)$ denote the uniform distribution on $[0,1]$. In the sequel, let $U \sim U(0,1)$ and $U_{(M)}$ be the $M$-th order statistic of $N_0$ independent random variables from $U(0,1)$, assumed to be mutually independent and both independent of $(\mX,\mZ)$.
It is well known that $U_{(M)}$ follows the beta distribution ${\rm Beta}(M, N_0+1-M)$. Let ${\rm Bin}(\cdot,\cdot)$ denote the binomial distribution. Let $L_1(\bR^d)$ denote the space of all functions $f:\bR^d\to\bR$ such that $\int|f(x)|{\mathrm d} x<\infty$. For any $x \in \bR^d$ and function $f:\bR^d \to \bR$, we say $x$ is a Lebesgue point of $f$ if
\[
\lim_{\delta \to 0^+} \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f(x) - f(y) \rvert {\mathrm d} y = 0.
\]
Proof of Lemma (ref)
proof[Proof of Lemma (ref)]
From the Lebesgue differentiation theorem, for any $f \in L_1(\bR^d)$, for $\lambda$-almost all $x$, $x$ is a Lebesgue point of $f$. Then for $\nu_0$-almost all $x$, we have $f_0(x)>0$ and $x$ is a Lebesgue point of $f_0$ and $f_1$ from the absolute continuity of $\nu_0$ and $\nu_1$. We then only need to consider those $x \in \bR^d$ such that $f_0(x)>0$ and $x$ is a Lebesgue point of $f_0$ and $f_1$.
We first introduce a lemma about the Lebesgue point.
\begin{lemma}
Let $\nu$ be a probability measure on $\bR^d$ admitting a density $f$ with respect to the Lebesgue measure. Let $x \in \bR^d$ be a Lebesgue point of $f$. We then have, for any $\epsilon \in (0,1)$, there exists $\delta = \delta_x>0$ such that for any $z \in \bR^d$ such that $\lVert z - x \rVert \le \delta$, we have
\begin{align*}
\Big\lvert \frac{\nu(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} - f(x) \Big\rvert \le \epsilon, \Big\lvert \frac{\nu(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f(x) \Big\rvert \le \epsilon.
\end{align*}
\end{lemma}
{\bf Part I.} This part proves the first claim. We separate the proof of Part I into two cases based on the value of $f_1(x)$.
{\bf Case I.1.} $f_1(x)>0$.
Since $x$ is a Lebesgue point of $\nu_0$ and $\nu_1$, by Lemma (ref), for any $\epsilon \in (0,1)$, there exists some $\delta = \delta_x>0$ such that for any $z \in \bR^d$ with $\lVert z - x \rVert \le \delta$, we have
\begin{align*}
& \Big\lvert \frac{\nu_0(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} - f_0(x) \Big\rvert \le \epsilon f_0(x), \Big\lvert \frac{\nu_0(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f_0(x) \Big\rvert \le \epsilon f_0(x),\\
& \Big\lvert \frac{\nu_1(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} - f_1(x) \Big\rvert \le \epsilon f_1(x), \Big\lvert \frac{\nu_1(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f_1(x) \Big\rvert \le \epsilon f_1(x).
\end{align*}
Accordingly, if $\lVert z - x \rVert \le \delta$, we have
\[
\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \le \frac{\nu_0(B_{z,\lVert x-z \rVert})}{\lambda(B_{z,\lVert x-z \rVert})} \frac{\lambda(B_{x,\lVert x-z \rVert})}{\nu_1(B_{x,\lVert x-z \rVert})} \le \frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)}.
\]
Since $\lambda(B_{z,\lVert x-z \rVert}) = \lambda(B_{x,\lVert x-z \rVert})$, we then have
\begin{align}
\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \le \frac{\nu_0(B_{z,\lVert x-z \rVert})}{\nu_1(B_{x,\lVert x-z \rVert})} \le \frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)}.
\end{align}
On the other hand, for any $z \in \bR^d$ such that $\lVert z-x \rVert > \delta$,
\[
\nu_0(B_{z,\lVert z-x \rVert}) \ge \nu_0(B_{z^*,\delta}) \ge (1-\epsilon)f_0(x) \lambda(B_{z^*,\delta}) = (1-\epsilon)f_0(x) \lambda(B_{0,\delta}),
\]
where $z^*$ is the intersection point of the surface of $B_{x,\delta}$ and the line connecting $z$ and $x$.
Let $\eta_N = 4\log(N_0/M)$. Since $M \log N_0 /N_0 \to 0$, we can take $N_0$ large enough so that
\[
\eta_N \frac{M}{N_0} = 4\frac{M}{N_0} \log\Big(\frac{N_0}{M}\Big) < (1-\epsilon)f_0(x) \lambda(B_{0,\delta}).
\]
Then for any $z \in \bR^d$ such that $\nu_0(B_{z,\lVert z-x \rVert}) \le \eta_N M/N_0$, we have $\lVert z-x \rVert \le \delta$ since otherwise it would contradict the selection of $N_0$.
Let $Z$ be a copy from $\nu_1$ independent of the data. Then
\begin{align*}
& {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] = {\mathrm P} \Big(Z \in A_M(x)\Big)\\
= & {\mathrm P}\Big(\lVert x - Z \rVert \le \lVert \cX_{(M)}(Z) - Z \rVert\Big) = {\mathrm P}\Big( \nu_0(B_{Z,\lVert x - Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \Big).
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
For any given $z \in \bR^d$, $[\nu_0(B_{z,\lVert X_i - z \rVert})]_{i=1}^{N_0}$ are i.i.d. from $U(0,1)$ since $[X_i]_{i=1}^{N_0}$ are i.i.d. from $\nu_0$ and we use the probability integral transform. Then $\nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})$ has the same distribution as $U_{(M)}$ and is independent of $Z$.
{\bf Upper bound.} With a slight abuse of notation, we note $W = \nu_0(B_{Z,\lVert x-Z \rVert})$. We then have, from (ref) and (ref),
\begin{align*}
& {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] = {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})\Big) \\
\le& {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le \eta_N \frac{M}{N_0}\Big) + {\mathrm P}\Big(\nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) > \eta_N \frac{M}{N_0}\Big)\\
=&{\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le \eta_N \frac{M}{N_0}, \lVert Z - x \rVert \le \delta\Big) + {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big)\\
\le& {\mathrm P} \Big(\nu_0(B_{Z,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \lVert Z - x \rVert \le \delta\Big) + {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big)\\
\le& {\mathrm P} \Big(\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \lVert Z - x \rVert \le \delta\Big) + {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big)\\
\le&{\mathrm P} \Big(\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})\Big) + {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big)\\
=& {\mathrm P} \Big(\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} U \le U_{(M)}\Big) + {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big).
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
For the second term in (ref), notice that $\eta_N \to \infty$ as $N_0 \to \infty$. Then from the Chernoff bound and for $N_0$ sufficiently large, we have
\begin{align*}
& \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big) = \frac{N_0}{M} {\mathrm P}\Big({\rm Bin}\Big(N_0,\eta_N \frac{M}{N_0}\Big) \le M \Big)\\
\le & \frac{N_0}{M}\exp\Big((1+\log \eta_N - \eta_N) M\Big) \le \frac{N_0}{M} \exp\Big(-\frac{1}{2} \eta_N M \Big) = \Big(\frac{N_0}{M}\Big)^{1-2M}.
\end{align*}
Since $M /N_0 \to 0$ and $M \ge 1$, we then obtain
\[
\lim_{N_0 \to \infty} \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big) = 0.
\addtocounter{equation}{1}\tag{\theequation}\label{eq:meancatch3}
\]
For the first term in (ref), we have
\begin{align*}
& \frac{N_0}{M} {\mathrm P} \Big(\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} U \le U_{(M)}\Big) = \frac{N_0}{M} \int_0^1 {\mathrm P} \Big( U_{(M)} \ge \frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} t \Big){\mathrm d} t\\
=& \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \int_0^{\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t \le \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \int_0^{\infty} {\mathrm P} \Big( \frac{N_0}{M}U_{(M)} \ge t \Big) {\mathrm d} t\\
=& \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \frac{N_0}{M} {\mathrm E}[U_{(M)}] = \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \frac{N_0}{N_0+1}.
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
We then obtain
\[
\limsup_{N_0 \to \infty} \frac{N_0}{M} {\mathrm P} \Big(\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} U \le U_{(M)}\Big) \le \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)}.
\addtocounter{equation}{1}\tag{\theequation}\label{eq:meancatch4}
\]
Plugging (ref) and (ref) to (ref) then yields
\begin{align}
\limsup_{N_0 \to \infty} \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] \le \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)}.
\end{align}
{\bf Lower bound.}
We have, from (ref) and (ref),
\begin{align*}
& {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] = {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})\Big) \\
\ge& {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le \eta_N \frac{M}{N_0}\Big)\\
=& {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le \eta_N \frac{M}{N_0}, \lVert Z - x \rVert \le \delta\Big)\\
\ge& {\mathrm P} \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le \eta_N \frac{M}{N_0}, \lVert Z - x \rVert \le \delta\Big)\\
=& {\mathrm P} \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le \eta_N \frac{M}{N_0}\Big)\\
\ge& {\mathrm P} \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})\Big) - {\mathrm P}\Big(\nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) > \eta_N \frac{M}{N_0}\Big)\\
=& {\mathrm P} \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} U \le U_{(M)}\Big) - {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big).
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
The second last equality is from the fact that for $\lVert Z-x \rVert > \delta$,
\begin{align*}
&\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \nu_1(B_{x,\lVert x-Z \rVert}) \ge \frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \nu_1(B_{x,\delta})\\
\ge& \frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} f_1(x)(1-\epsilon) \lambda(B_{0,\delta}) = (1+\epsilon)f_0(x) \lambda(B_{0,\delta}) > \eta_N \frac{M}{N_0},
\end{align*}
and then that $\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \nu_1(B_{x,\lVert x-Z \rVert}) \le \eta_N \frac{M}{N_0}$ implies $\lVert Z-x \rVert \le \delta$.
For the first term in (ref), we have
\begin{align*}
\frac{N_0}{M} {\mathrm P} \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} U \le U_{(M)}\Big) &= \frac{N_0}{M} \int_0^1 {\mathrm P} \Big( U_{(M)} \ge \frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} t \Big){\mathrm d} t\\
&= \frac{1-\epsilon}{1+\epsilon} \frac{f_1(x)}{f_0(x)} \int_0^{\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t.
\end{align*}
If $\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \ge 1$, since $U_{(M)} \in [0,1]$, we have
\begin{align*}
\frac{N_0}{M} {\mathrm P} \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} U \le U_{(M)}\Big) = \frac{1-\epsilon}{1+\epsilon} \frac{f_1(x)}{f_0(x)} \frac{N_0}{M} {\mathrm E}[U_{(M)}] = \frac{1-\epsilon}{1+\epsilon} \frac{f_1(x)}{f_0(x)} \frac{N_0}{N_0+1}.
\end{align*}
Then
\begin{align*}
\lim_{N_0 \to \infty} \frac{N_0}{M} {\mathrm P} \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} U \le U_{(M)}\Big) = \frac{1-\epsilon}{1+\epsilon} \frac{f_1(x)}{f_0(x)}.
\end{align*}
If $\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} < 1$, from the Chernoff bound,
\begin{align*}
& \int_{\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \frac{N_0}{M}}^{\frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t \\
\le& \Big[1-\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)}\Big] \frac{N_0}{M} {\mathrm P} \Big( U_{(M)} \ge \frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \Big)\\
\le& \Big[1-\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)}\Big] \frac{N_0}{M} \exp \Big[ M - \frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} N_0 - M\log M + M \log\Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} N_0\Big)\Big].
\end{align*}
Since $f_0(x)>0$ and $M\log N_0 /N_0 \to 0$, we obtain
\[
\lim_{N_0 \to \infty} \int_{\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} \frac{N_0}{M}}^{\frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t = 0.
\]
Then
\begin{align*}
\lim_{N_0 \to \infty} \frac{N_0}{M} {\mathrm P} \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_0(x)}{f_1(x)} U \le U_{(M)}\Big) = \frac{1-\epsilon}{1+\epsilon} \frac{f_1(x)}{f_0(x)}.
\end{align*}
Plugging the above argument along with (ref) to (ref) yields
\begin{align}
\liminf_{N_0 \to \infty} \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] \ge \frac{1-\epsilon}{1+\epsilon} \frac{f_1(x)}{f_0(x)}.
\end{align}
Lastly, combining (ref) with (ref) and noticing that $\epsilon$ is arbitrary, we obtain
\begin{align}
\lim_{N_0 \to \infty} \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] = \frac{f_1(x)}{f_0(x)} = r(x).
\end{align}
{\bf Case I.2.} $f_1(x)=0$. Again, for any $\epsilon \in (0,1)$, by Lemma (ref), there exists some $\delta = \delta_x>0$ such that for any $z \in \bR^d$ with $\lVert z - x \rVert \le \delta$, we have
\begin{align*}
\Big\lvert \frac{\nu_0(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f_0(x) \Big\rvert \le \epsilon f_0(x), \Big\lvert \frac{\nu_1(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} \Big\rvert \le \epsilon.
\end{align*}
Recall that $W = \nu_0(B_{Z,\lVert x-Z \rVert})$. Then if $\lVert Z - x \rVert \le \delta$, we have
\begin{align*}
Z \ge (1-\epsilon) f_0(x) \lambda(B_{Z,\lVert x-Z \rVert}) = (1-\epsilon) f_0(x) \lambda(B_{x,\lVert x-Z \rVert}) \ge \frac{1-\epsilon}{\epsilon} f_0(x) \nu_1(B_{x,\lVert x-Z \rVert}).
\end{align*}
Proceeding in the same way as (ref), we obtain
\begin{align*}
& {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] \\
\le & {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le \eta_N \frac{M}{N_0}, \lVert Z - x \rVert \le \delta\Big) + {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big)\\
\le& {\mathrm P} \Big(\frac{1-\epsilon}{\epsilon} f_0(x) U \le U_{(M)}\Big) + {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big).
\end{align*}
For the first term above,
\begin{align*}
& \frac{N_0}{M} {\mathrm P} \Big(\frac{1-\epsilon}{\epsilon} f_0(x) U \le U_{(M)}\Big) = \frac{N_0}{M} \int_0^1 {\mathrm P} \Big( U_{(M)} \ge \frac{1-\epsilon}{\epsilon} f_0(x) t \Big){\mathrm d} t\\
=& \frac{\epsilon}{1-\epsilon} \frac{1}{f_0(x)} \int_0^{\frac{1-\epsilon}{\epsilon} f_0(x) \frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t \le \frac{\epsilon}{1-\epsilon} \frac{1}{f_0(x)} \int_0^{\infty} {\mathrm P} \Big( \frac{N_0}{M}U_{(M)} \ge t \Big) {\mathrm d} t\\
=& \frac{\epsilon}{1-\epsilon} \frac{1}{f_0(x)} \frac{N_0}{M} {\mathrm E}[U_{(M)}] = \frac{\epsilon}{1-\epsilon} \frac{1}{f_0(x)} \frac{N_0}{N_0+1}.
\end{align*}
By (ref) and noticing $\epsilon$ is arbitrary, one has
\begin{align}
\lim_{N_0 \to \infty} \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] = 0 = r(x).
\end{align}
Combining (ref) and (ref) completes the proof of the first claim.
{\bf Part II.} This part proves the second claim. We also separate the proof of Part II into two cases based on the value of $f_1(x)$.
{\bf Case II.1.} $f_1(x)>0$. Again, for any $\epsilon \in (0,1)$, we take $\delta$ in the same way as in Case I.1. Let $\eta_N = \eta_{N,p} = 4p\log(N_0/M)$. We also take $N_0$ sufficiently large so that
\[
\eta_N \frac{M}{N_0} = 4p\frac{M}{N_0} \log\Big(\frac{N_0}{M}\Big) < (1-\epsilon)f_0(x) \lambda(B_{0,\delta}).
\]
Let ${\tilde Z}_1,\ldots,{\tilde Z}_p$ be $p$ independent copies that are drawn from $\nu_1$ independent of the data. Then
\begin{align*}
& {\mathrm E}\big[\nu_1^p(A_M(x))\big] = {\mathrm P} \Big({\tilde Z}_1,\ldots,{\tilde Z}_p \in A_M(x)\Big)\\
=& {\mathrm P}\Big(\lVert x - {\tilde Z}_1 \rVert \le \lVert \cX_{(M)}({\tilde Z}_1) - {\tilde Z}_1 \rVert, \ldots, \lVert x - {\tilde Z}_p \rVert \le \lVert \cX_{(M)}({\tilde Z}_p) - {\tilde Z}_p \rVert\Big)\\
=& {\mathrm P}\Big(\nu_0(B_{{\tilde Z}_1,\lVert x - {\tilde Z}_1 \rVert}) \le \nu_0(B_{{\tilde Z}_1,\lVert \cX_{(M)}({\tilde Z}_1) - {\tilde Z}_1 \rVert}), \ldots, \nu_0(B_{{\tilde Z}_p,\lVert x - {\tilde Z}_p \rVert}) \le \nu_0(B_{{\tilde Z}_p,\lVert \cX_{(M)}({\tilde Z}_p) - {\tilde Z}_p \rVert})\Big).
\end{align*}
Let $W_k = \nu_0(B_{{\tilde Z}_k,\lVert x - {\tilde Z}_k \rVert})$ and $V_k = \nu_0(B_{{\tilde Z}_k,\lVert \cX_{(M)}({\tilde Z}_k) - {\tilde Z}_k \rVert})$ for any $k \in \llbracket p\rrbracket$. Then $[W_k]_{k=1}^p$ are i.i.d. since $[{\tilde Z}_k]_{k=1}^p$ are i.i.d. For any $k \in \llbracket p\rrbracket$ and ${\tilde Z}_k \in \bR^d$ given, $V_k \,|\, {\tilde Z}_k $ has the same distribution as $U_{(M)}$. Then for any $k \in \llbracket p\rrbracket$, $V_k$ has the same distribution as $U_{(M)}$, and $V_k$ is independent of ${\tilde Z}_k$.
Let $W_{\max} = \max_{k \in \llbracket p\rrbracket} W_k$ and $V_{\max} = \max_{k \in \llbracket p\rrbracket} V_k$. Then
\begin{align*}
{\mathrm E}\big[\nu_1^p(A_M(x))\big] &= {\mathrm P}\Big(W_1 \le V_1, \ldots, W_p \le V_p\Big) \le {\mathrm P}\Big(W_{\max} \le V_{\max}\Big)\\
&\le {\mathrm P}\Big(W_{\max} \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} \Big) + {\mathrm P}\Big( V_{\max} > \eta_N \frac{M}{N_0} \Big)
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
For the second term in (ref),
\[
{\mathrm P}\Big( V_{\max} > \eta_N \frac{M}{N_0}\Big) \le \sum_{k=1}^p {\mathrm P}\Big( V_k > \eta_N \frac{M}{N_0}\Big) = p {\mathrm P}\Big( U_{(M)} > \eta_N \frac{M}{N_0}\Big).
\]
Proceeding as (ref),
\begin{align*}
\Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(U_{(M)} > \eta_N \frac{M}{N_0}\Big) \le \Big(\frac{N_0}{M}\Big)^p \exp\Big(-\frac{1}{2} \eta_N M \Big) = \Big(\frac{N_0}{M}\Big)^{p(1-2M)}.
\end{align*}
We then obtain
\begin{align}
\lim_{N_0 \to \infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big( V_{\max} > \eta_N \frac{M}{N_0}\Big) = 0.
\end{align}
For the first term in (ref), notice that $[\nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert})]_{k=1}^p$ are i.i.d. from $U(0,1)$ since $[{\tilde Z}_k]_{k=1}^p$ are i.i.d. We then have
\begin{align*}
& \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_{\max} \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} \Big) \\
=& \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_{\max} \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} , \max_{k \in \llbracket p\rrbracket} \lVert {\tilde Z}_k - x \rVert \le \delta \Big)\\
\le & \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} , \max_{k \in \llbracket p\rrbracket} \lVert {\tilde Z}_k - x \rVert \le \delta \Big)\\
\le & \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) \le V_{\max} \Big)\\
= & \Big(\frac{N_0}{M}\Big)^p \int_0^1 pt^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = t \Big) {\mathrm d} t\\
= & p \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)}\Big)^p \int_0^{\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \frac{N_0}{M}} t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \frac{M}{N_0}t \Big) {\mathrm d} t\\
= & p \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)}\Big)^p \Big[ \int_0^1 t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \frac{M}{N_0}t \Big) {\mathrm d} t \\
& + \int_1^{\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \frac{N_0}{M}} t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \frac{M}{N_0}t \Big) {\mathrm d} t\Big].
\end{align*}
For the first term,
\[
\int_0^1 t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \frac{M}{N_0}t \Big) {\mathrm d} t \le \int_0^1 t^{p-1} {\mathrm d} t = \frac{1}{p}.
\]
For the second term, using the Chernoff bound, conditional on $\tilde{\mZ} = ({\tilde Z}_1, \ldots, {\tilde Z}_p)$,
\begin{align*}
& \int_1^{\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \frac{N_0}{M}} t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \tilde{\mZ} \Big) {\mathrm d} t\\
\le & \int_1^\infty t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \tilde{\mZ} \Big) {\mathrm d} t = \int_0^\infty (1+t)^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} (1+t) \,\Big{|}\, \tilde{\mZ} \Big) {\mathrm d} t\\
\le & \int_0^\infty (1+t)^{p-1} \Big[ \sum_{k=1}^p {\mathrm P}\Big( V_k \ge \frac{M}{N_0} (1+t) \,\Big{|}\, \tilde{\mZ} \Big) \Big] {\mathrm d} t = p \int_0^\infty (1+t)^{p-1} {\mathrm P}\Big( U_{(M)} \ge \frac{M}{N_0} (1+t) \Big) {\mathrm d} t\\
\le & p \int_0^\infty (1+t)^{p-1} (1+t)^M \exp(-tM) {\mathrm d} t = p e^M \int_1^\infty t^{M+p-1} \exp(-tM) {\mathrm d} t\\
\le & p e^M \int_0^\infty t^{M+p-1} \exp(-tM) {\mathrm d} t = \frac{pe^M}{M^{M+p}} \Gamma(M+p) = \frac{pe^M}{M^{M+p}} (M+1)^{p-1} \Gamma(M+1) (1+o(1)) \\
= & \frac{pe^M}{M^{M+p}} (M+1)^{p-1} \sqrt{2\pi M} \frac{M^M}{e^M} (1+o(1)) = \sqrt{2\pi} p M^{-1/2} \Big(1+\frac{1}{M}\Big)^{p-1} (1+o(1)),
\end{align*}
where the last three steps are from Stirling's approximation using $M \to \infty$.
Then
\[
\lim_{N_0 \to \infty}p \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)}\Big)^p \int_1^{\frac{1-\epsilon}{1+\epsilon} \frac{f_0(x)}{f_1(x)} \frac{N_0}{M}} t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = \frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)} \frac{M}{N_0}t \Big) {\mathrm d} t = 0,
\]
and then we obtain
\begin{align}
\limsup_{N_0 \to \infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_{\max} \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} \Big) \le \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)}\Big)^p.
\end{align}
Plugging (ref) and (ref) into (ref) yields
\begin{align}
\limsup_{N_0 \to \infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p(A_M(x))\big] \le \Big(\frac{1+\epsilon}{1-\epsilon} \frac{f_1(x)}{f_0(x)}\Big)^p = \Big(\frac{1+\epsilon}{1-\epsilon} r(x) \Big)^p.
\end{align}
Lastly, using Hölder's inequality,
\[
\Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p(A_M(x))\big] \ge \Big[\frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] \Big]^p.
\]
Employing the first claim, we have
\begin{align}
\liminf_{N_0 \to \infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p(A_M(x))\big] \ge \big[r(x)\big]^p.
\end{align}
Combining (ref) with (ref) and noting that $\epsilon$ is arbitrary, we obtain
\begin{align}
\lim_{N_0\to\infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p\big(A_M(x)\big)\big] = \big[r(x)\big]^p.
\end{align}
{\bf Case II.2.} $f_1(x)=0$. For any $\epsilon \in (0,1)$, we take $\delta$ in the same way as in the proof of Case I.2 and take $\eta_N$ as in the proof of Case II.1.
By (ref),
\begin{align*}
\Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p(A_M(x))\big] \le \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_{\max} \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} \Big) + \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big( V_{\max} > \eta_N \frac{M}{N_0} \Big).
\end{align*}
For the first term,
\begin{align*}
& \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_{\max} \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} \Big) \\
=& \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_{\max} \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} , \max_{k \in \llbracket p\rrbracket} \lVert Z_k - x \rVert \le \delta \Big)\\
\le & \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(\frac{1-\epsilon}{\epsilon} f_0(x) \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} , \max_{k \in \llbracket p\rrbracket} \lVert Z_k - x \rVert \le \delta \Big)\\
\le & \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(\frac{1-\epsilon}{\epsilon} f_0(x) \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) \le V_{\max} \Big)\\
= & \Big(\frac{N_0}{M}\Big)^p \int_0^1 pt^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{1-\epsilon}{\epsilon} f_0(x) t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = t \Big) {\mathrm d} t\\
= & p \Big(\frac{\epsilon}{1-\epsilon} \frac{1}{f_0(x)}\Big)^p \int_0^{\frac{1-\epsilon}{\epsilon} f_0(x) \frac{N_0}{M}} t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = t \Big) {\mathrm d} t\\
= & p \Big(\frac{\epsilon}{1-\epsilon} \frac{1}{f_0(x)}\Big)^p \Big[ \int_0^1 t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = t \Big) {\mathrm d} t \\
& + \int_1^{\frac{1-\epsilon}{\epsilon} f_0(x) \frac{N_0}{M}} t^{p-1} {\mathrm P}\Big( V_{\max} \ge \frac{M}{N_0} t \,\Big{|}\, \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) = t \Big) {\mathrm d} t\Big].
\end{align*}
Then proceeding in the same way as (ref), we have
\begin{align*}
\limsup_{N_0 \to \infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_{\max} \le V_{\max}, V_{\max} \le \eta_N \frac{M}{N_0} \Big) \le \Big(\frac{\epsilon}{1-\epsilon} \frac{1}{f_0(x)}\Big)^p.
\end{align*}
Lastly, using (ref) and noting again that $\epsilon$ is arbitrary, one obtains
\begin{align}
\lim_{N_0\to\infty} \Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p\big(A_M(x)\big)\big] = 0 = \big[r(x)\big]^p.
\end{align}
Combining (ref) and (ref) then completes the proof of the second claim.
Proof of Theorem (ref)
proof[Proof of Theorem (ref)(ref)]
By (ref) and that $[Z_j]_{j=1}^{N_1}$ are i.i.d,
\begin{align*}
{\mathrm E}\big[\hat{r}_M(x)\big] = {\mathrm E}\Big[\frac{N_0}{N_1} \frac{K_M(x)}{M}\Big] = \frac{N_0}{N_1 M} {\mathrm E}\Big[ \sum_{j=1}^{N_1} \ind\big(Z_j \in A_M(x)\big) \Big] = \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big].
\end{align*}
Employing Lemma (ref) then completes the proof.
proof[Proof of Theorem (ref)(ref)]
By Hölder's inequality, it suffices to consider the case when $p$ is even. Noticing that $x^p$ is convex for $p >1$ and $x>0$, one has
\begin{align}
{\mathrm E} \big[ \lvert \hat{r}_M(x) - r(x) \rvert^p\big] \le 2^{p-1} \Big( {\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - {\mathrm E}[\hat{r}_M(x) \,|\, \mX] \Big\rvert^p\Big] + {\mathrm E} \Big[ \Big\lvert {\mathrm E}[\hat{r}_M(x) \,|\, \mX] - r(x) \Big\rvert^p\Big] \Big).
\end{align}
For the second term in (ref), Lemma (ref) implies
\begin{align}
\lim_{N_0 \to \infty} {\mathrm E} \Big[ \Big\lvert {\mathrm E}[\hat{r}_M(x) \,|\, \mX] - r(x) \Big\rvert^p\Big] &= \lim_{N_0 \to \infty} {\mathrm E} \Big[ \Big\lvert \frac{N_0}{M} \nu_1\big(A_M(x)\big) - r(x) \Big\rvert^p\Big] = 0
\end{align}
by expanding the product term.
For the first term in (ref), noticing that $[Z_j]_{j=1}^{N_1}$ are i.i.d, we have $K_M(x) \,|\, \mX \sim {\rm Bin}(N_1,\nu_1(A_M(x)))$. Using Lemma (ref) and $MN_1/N_0 \to \infty$, for any positive integers $p$ and $q$, we have
\begin{align*}
\lim_{N_0 \to \infty} \Big( \frac{N_0}{N_1M}\Big)^p {\mathrm E}[N_1^p \nu_1^p(A_M(x))] = \big[r(x)\big]^p,\\
\lim_{N_0 \to \infty} \Big( \frac{N_0}{N_1M}\Big)^p \Big( \frac{N_0}{M}\Big)^q {\mathrm E}[N_1^p \nu_1^{p+q}(A_M(x))] = \big[r(x)\big]^p,
\end{align*}
and then ${\mathrm E}[N_1^p \nu_1^p(A_M(x))]$ is the dominated term among $[{\mathrm E}[N_1^k \nu_1^{k+q}(A_M(x))]]_{k \le p, q \ge 0}$.
To complete the proof, for any positive integer $c$ and $Z \sim {\rm Bin}(n,p')$, let $\mu_c := {\mathrm E}[(Z-{\mathrm E}[Z])^c]$ be the $c$-th central moment. According to romanovsky1923note, we have
\[
\mu_{c+1} = p'(1-p')\Big(nc\mu_{c-1}+\frac{{\mathrm d} \mu_c}{{\mathrm d} p'}\Big).
\]
Then for even $p$, we obtain
\[
{\mathrm E} \Big[ \Big(K_M(x) - N_1\nu_1(A_M(x)) \Big)^p\Big] \lesssim {\mathrm E}[N_1 \nu_1(A_M(x))]^{p/2} \lesssim \Big( \frac{N_1M}{N_0}\Big)^{p/2}.
\]
The first term in (ref) then satisfies
\begin{align*}
{\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - {\mathrm E}[\hat{r}_M(x) \,|\, \mX] \Big\rvert^p\Big] &= \Big( \frac{N_0}{N_1M}\Big)^p {\mathrm E} \Big[ \Big(K_M(x) - N_1\nu_1(A_M(x)) \Big)^p\Big] \lesssim \Big( \frac{N_0}{N_1M}\Big)^{p/2}.
\end{align*}
Since $MN_1/N_0 \to \infty$, we obtain
\begin{align}
\lim_{N_0 \to \infty} {\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - {\mathrm E}[\hat{r}_M(x) \,|\, \mX] \Big\rvert^p\Big] = 0.
\end{align}
Plugging (ref) and (ref) into (ref) then completes the proof.
Proof of Theorem (ref)
proof[Proof of Theorem (ref)]
We first cite the Hardy–Littlewood maximal inequality.
\begin{lemma}[Hardy–Littlewood maximal inequality stein2016singular]
For any locally integrable function $f:\bR^d \to \bR$, define
\[
{\sf M}f(x):= \sup_{\delta>0} \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f(z) \rvert {\mathrm d} z.
\]
Then for $d \ge 1$, there exists a constant $C_d>0$ only depending on $d$ such that for all $t>0$ and $f \in L_1(\bR^d)$, we have
\[
\lambda(\{x:{\sf M}f(x) > t\}) < \frac{C_d}{t} \lVert f \rVert_{L_1},
\]
where $\lVert \cdot \rVert_{L_1}$ stands for the function $L_1$ norm.
\end{lemma}
Let $\epsilon>0$ be given. We assume $\epsilon \le f_L$. From Assumption (ref), $S_0$ and $S_1$ are bounded, then $\nu_0$ and $\nu_1$ are compactly supported. Since $f_0, f_1 \in L_1$ and the class of continuous functions are dense in the class of compactly supported $L_1$ functions from simple use of Lusin's theorem, we can find $g_0,g_1$ such that $g_0,g_1$ are continuous and $\lVert f_0 - g_0 \rVert_{L_1} \le \epsilon^3$ and $\lVert f_1 - g_1 \rVert_{L_1} \le \epsilon^3$.
Since $g_0, g_1$ are continuous with compact supports, they are uniformly continuous, that is, there exists $\delta > 0$ such that for any $x,z \in \bR^d$ and $\lVert z-x \rVert \le \delta$, we have
\[
\lvert g_0(x) - g_0(z) \rvert \le \frac{\epsilon^2}{3}~~~{\rm and}~~~ \lvert g_1(x) - g_1(z) \rvert \le \frac{\epsilon^2}{3}.
\]
For any $x \in \bR^d$, we have
\begin{align*}
& \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_0(x) - f_0(z) \rvert {\mathrm d} z \\
\le & \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_0(x) - g_0(x) \rvert {\mathrm d} z + \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert g_0(x) - g_0(z) \rvert {\mathrm d} z + \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_0(z) - g_0(z) \rvert {\mathrm d} z\\
= & \lvert f_0(x) - g_0(x) \rvert + \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert g_0(x) - g_0(z) \rvert {\mathrm d} z + \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_0(z) - g_0(z) \rvert {\mathrm d} z.
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
For the first term in (ref), using Markov's inequality, one has
\begin{align}
\lambda\Big(\Big\{x: \Big\lvert f_0(x) - g_0(x) \Big\rvert > \frac{\epsilon^2}{3} \Big\}\Big) \le \frac{3}{\epsilon^2} \lVert f_0 - g_0 \rVert_{L_1} \le 3\epsilon.
\end{align}
For the second term in (ref), by the selection of $\delta$,
\begin{align}
\frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert g_0(x) - g_0(z) \rvert {\mathrm d} z \le \max_{z \in B_{x,\delta}} \lvert g_0(x) - g_0(z) \rvert \le \frac{\epsilon^2}{3}.
\end{align}
For the third term,
\[
\frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_0(z) - g_0(z) \rvert {\mathrm d} z \le \sup_{\delta>0} \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_0(z) - g_0(z) \rvert {\mathrm d} z = {\sf M}(f_0-g_0)(x).
\]
Lemma (ref) then yields
\begin{align}
\lambda\Big(\Big\{x:{\sf M}(f_0-g_0)(x) > \frac{\epsilon^2}{3} \Big\}\Big) < \frac{3C_d}{\epsilon^2} \lVert f_0 - g_0 \rVert_{L_1} \le 3C_d\epsilon.
\end{align}
We can establish similar results for $f_1,g_1$.
Let
\begin{align*}
A_1 := & \Big\{x: \Big\lvert f_0(x) - g_0(x) \Big\rvert > \frac{\epsilon^2}{3} \Big\} \bigcup \Big\{x: \Big\lvert f_1(x) - g_1(x) \Big\rvert > \frac{\epsilon^2}{3} \Big\} \bigcup \\
& \Big\{x:{\sf M}(f_0-g_0)(x) > \frac{\epsilon^2}{3} \Big\} \bigcup \Big\{x:{\sf M}(f_1-g_1)(x) > \frac{\epsilon^2}{3} \Big\}.
\end{align*}
Plugging (ref), (ref), (ref) into (ref), for any $x \notin A_1$ and $\lVert z - x \rVert \le \delta$, we have
\begin{align*}
\frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_0(x) - f_0(z) \rvert {\mathrm d} z \le \epsilon^2, \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_1(x) - f_1(z) \rvert {\mathrm d} z \le \epsilon^2,
\end{align*}
and
\[
\lambda(A_1) \le 6(C_d+1)\epsilon.
\]
Let $A_2 := \Big\{x: f_1(x) \le \epsilon\Big\}$. We then seperate the proof into three cases. In the following, it suffices to consider $f_0(x)>0$ due to the definition of $L_p$ risk in (ref).
{\bf Case I.} $x \notin A_1 \cup A_2$.
According to $\epsilon \le f_L$ and by the definition of $A_2$, for any $x \notin A_1 \cup A_2$ and $\lVert z-x \rVert \le \delta$,
\begin{align*}
& \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_0(x) - f_0(y) \rvert {\mathrm d} z \le \epsilon^2 \le \epsilon f_L \le \epsilon f_0(x),\\
& \frac{1}{\lambda(B_{x,\delta})} \int_{B_{x,\delta}} \lvert f_1(x) - f_1(y) \rvert {\mathrm d} z \le \epsilon^2 \le \epsilon f_1(x).
\end{align*}
We then obtain
\begin{align*}
& \Big\lvert \frac{\nu_0(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} - f_0(x) \Big\rvert \le \epsilon f_0(x), \Big\lvert \frac{\nu_0(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f_0(x) \Big\rvert \le \epsilon f_0(x),\\
& \Big\lvert \frac{\nu_1(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} - f_1(x) \Big\rvert \le \epsilon f_1(x), \Big\lvert \frac{\nu_1(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f_1(x) \Big\rvert \le \epsilon f_1(x).
\end{align*}
Let $\eta_N = \eta_{N,p} = 4p\log(N_0/M)$. We also take $N_0$ large enough so that
\[
\eta_N \frac{M}{N_0} = 4p\frac{M}{N_0} \log\Big(\frac{N_0}{M}\Big) < (1-\epsilon)f_L \lambda(B_{0,\delta}).
\]
Then for any $x \in \bR^d$ such that $f_0(x)>0$, we have
\[
\eta_N \frac{M}{N_0} < (1-\epsilon)f_0(x) \lambda(B_{0,\delta}).
\]
Proceeding as in the proof of Case II.1 of Lemma (ref) and also Theorem (ref) by using Fubini's theorem, since $\epsilon$ is arbitrary, we obtain
\begin{align}
\lim_{N_0\to\infty} {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert^p f_0(x) \ind(x \notin A_1 \cup A_2){\mathrm d} x \Big] = 0.
\end{align}
{\bf Case II.} $x \in A_2 \setminus A_1$.
In this case, we have
\begin{align*}
& \Big\lvert \frac{\nu_0(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} - f_0(x) \Big\rvert \le \epsilon f_0(x), \Big\lvert \frac{\nu_0(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f_0(x) \Big\rvert \le \epsilon f_0(x),\\
& \Big\lvert \frac{\nu_1(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} - f_1(x) \Big\rvert \le \epsilon^2, \Big\lvert \frac{\nu_1(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f_1(x) \Big\rvert \le \epsilon^2.
\end{align*}
Take $\eta_N$ and take $N_0$ sufficiently large as in Case I above. Proceeding as the proof of Case II.2 of Lemma (ref) and also Theorem (ref) by using Fubini's theorem, since $\epsilon$ is arbitrary, we obtain
\begin{align}
\lim_{N_0\to\infty} {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert^p f_0(x) \ind(x \in A_2 \setminus A_1){\mathrm d} x \Big] = 0.
\end{align}
{\bf Case III.} $x \in A_1$.
In this case, for any $x \in A_1$ and $z \in S_1$,
\[
\nu_0(B_{z,\lVert z-x \rVert}) \ge f_L \lambda(B_{z,\lVert z-x \rVert} \cap S_0) \ge af_L \lambda(B_{z,\lVert z-x \rVert}) \ge \frac{af_L}{f_U} \nu_1(B_{x,\lVert z-x \rVert}).
\]
Then for any $x \in A_1$, from (ref) and in the same way as (ref),
\begin{align*}
& \Big(\frac{N_0}{M}\Big)^p {\mathrm E}\big[\nu_1^p\big(A_M(x)\big)\big] = \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_1 \le V_1, \ldots, W_p \le V_p\Big) \le \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(W_{\max} \le V_{\max}\Big)\\
\le& \Big(\frac{N_0}{M}\Big)^p {\mathrm P}\Big(\frac{af_L}{f_U} \max_{k \in \llbracket p\rrbracket} \nu_1(B_{x,\lVert {\tilde Z}_k - x \rVert}) \le V_{\max} \Big) \le \Big(\frac{f_U}{af_L}\Big)^p (1+o(1)) = O(1).
\end{align*}
Proceeding as in the proof of Theorem (ref), and due to the boundedness assumptions on $f_0$ and $f_1$, for any $x \in A_1$ and $p$ even,
\begin{align*}
{\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert^p \Big] \lesssim {\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - {\mathrm E}[\hat{r}_M(x) \,|\, \mX] \Big\rvert^p \Big] + {\mathrm E} \Big[ \Big( {\mathrm E}[\hat{r}_M(x) \,|\, \mX] \Big)^p \Big] + \Big\lvert r(x) \Big\rvert^p \lesssim 1.
\end{align*}
Then
\[
{\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert^p f_0(x) \ind(x \in A_1){\mathrm d} x \Big] \lesssim f_U \lambda(A_1) \lesssim \epsilon.
\]
Since $\epsilon$ is arbitrary, one has
\begin{align}
\lim_{N_0\to\infty} {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert^p f_0(x) \ind(x \in A_1){\mathrm d} x \Big] = 0.
\end{align}
Combining (ref), (ref), and (ref) completes the proof.
Proof of Theorem (ref)
We only have to prove the first two claims as the rest are trivial.
proof[Proof of Theorem (ref)(ref)]
For any $z \in \bR^d$ such that $\lVert z-x \rVert \le \delta/2$, since $B_{z,\lVert z-x \rVert} \subset B_{x,2\lVert z-x \rVert} \subset B_{x,\delta}$, we have
\begin{align*}
\Big\lvert \frac{\nu_0(B_{z,\lVert z-x \rVert})}{\lambda(B_{z,\lVert z-x \rVert})} - f_0(x) \Big\rvert \le \frac{1}{\lambda(B_{z,\lVert z-x \rVert})} \int_{B_{z,\lVert z-x \rVert}} \lvert f_0(y) - f_0(x) \rvert {\mathrm d} y \le 2L \lVert z-x \rVert,\\
\Big\lvert \frac{\nu_1(B_{x,\lVert z-x \rVert})}{\lambda(B_{x,\lVert z-x \rVert})} - f_1(x) \Big\rvert \le \frac{1}{\lambda(B_{x,\lVert z-x \rVert})} \int_{B_{x,\lVert z-x \rVert}} \lvert f_1(z) - f_1(x) \rvert {\mathrm d} z \le L \lVert z-x \rVert.
\end{align*}
Consider any $\delta_N>0$ such that $\delta_N \le \delta/2$. If $\lVert z-x \rVert \le \delta_N$ and $f_0(x) > 2L\delta_N$, then
\[
\frac{f_0(x)-2L\delta_N}{f_1(x)+L\delta_N} \le \frac{\nu_0(B_{z,\lVert x-z \rVert})}{\lambda(B_{z,\lVert x-z \rVert})} \frac{\lambda(B_{x,\lVert x-z \rVert})}{\nu_1(B_{x,\lVert x-z \rVert})}.
\]
If further $f_1(x) > L\delta_N$, then
\[
\frac{\nu_0(B_{z,\lVert x-z \rVert})}{\lambda(B_{z,\lVert x-z \rVert})} \frac{\lambda(B_{x,\lVert x-z \rVert})}{\nu_1(B_{x,\lVert x-z \rVert})} \le \frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N}.
\]
On the other hand, if $\lVert z-x \rVert \ge \delta_N$ and $f_0(x) > 2L\delta_N$,
\[
\nu_0(B_{z,\lVert z-x \rVert}) \ge (f_0(x)-2L\delta_N) \lambda(B_{0,\delta_N}) = (f_0(x)-2L\delta_N) V_d \delta_N^d,
\]
where $V_d$ is the Lebesgue measure of the unit ball on $\bR^d$.
Let $\delta_N = (\frac{4}{f_L V_d})^{1/d} (\frac{M}{N_0})^{1/d}$. Since $M/N_0 \to 0$, we have $\delta_N \to 0$ as $N_0 \to \infty$. Taking $N_0$ large enough so that $\delta_N < f_L/(4L)$ and $\delta_N \le \delta/2$, then
\[
2LV_d \delta_N^{d+1} = \frac{M}{N_0} \frac{8L}{f_L} \delta_N < 2\frac{M}{N_0}.
\]
Then for any $(\nu_0,\nu_1) \in \cP_{x,\rm p}(f_L,f_U,L,d,\delta)$,
\[
(f_0(x)-2L\delta_N) V_d \delta_N^d > 4\frac{f_0(x)}{f_L} \frac{M}{N_0} - 2\frac{M}{N_0} \ge 2\frac{M}{N_0}.
\]
With a slight abuse of notation, let $W := \nu_0(B_{Z,\lVert x-Z \rVert})$. Then $W \le 2\frac{M}{N_0}$ implies that $\lVert Z-x \rVert \le \delta_N$.
Depending on the value of $f_1(x)$, the proof is separated into two cases.
{\bf Case I.} $f_1(x) > L\delta_N$.
{\bf Upper bound.} Proceeding similar to (ref), we have
\begin{align*}
& {\mathrm E}\big[\hat{r}_M(x)\big] = \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] = \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})\Big) \\
\le& \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le 2 \frac{M}{N_0}\Big) + \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big)\\
=& \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le 2 \frac{M}{N_0}, \lVert Z - x \rVert \le \delta_N \Big) + \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big)\\
\le& \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \lVert Z - x \rVert \le \delta_N\Big) + \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big)\\
\le& \frac{N_0}{M} {\mathrm P} \Big(\frac{f_0(x)-2L\delta_N}{f_1(x)+L\delta_N} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \lVert Z - x \rVert \le \delta_N\Big) + \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big)\\
\le& \frac{N_0}{M} {\mathrm P} \Big(\frac{f_0(x)-2L\delta_N}{f_1(x)+L\delta_N} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})\Big) + \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big)\\
=& \frac{N_0}{M} {\mathrm P} \Big(\frac{f_0(x)-2L\delta_N}{f_1(x)+L\delta_N} U \le U_{(M)}\Big) + \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big).
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
For the second term in (ref), since $M/\log N_0 \to \infty$, for any $\gamma>0$,
\begin{align}
\frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big) &= \frac{N_0}{M} {\mathrm P}\Big({\rm Bin}\Big(N_0,2 \frac{M}{N_0}\Big) \le M \Big)\notag\\
\le& \frac{N_0}{M}\exp\Big((\log2 -1) M\Big) = \frac{N_0}{M} N_0^{-(1-\log 2)M/\log N_0} \prec N_0^{-\gamma}.
\end{align}
For the first term in (ref), proceeding as (ref), we obtain
\begin{align*}
\frac{N_0}{M} {\mathrm P} \Big(\frac{f_0(x)-2L\delta_N}{f_1(x)+L\delta_N} U \le U_{(M)}\Big) \le \frac{f_1(x)+L\delta_N}{f_0(x)-2L\delta_N} \frac{N_0}{N_0+1}.
\end{align*}
Then we obtain
\begin{align}
{\mathrm E}\big[\hat{r}_M(x)\big] \le \frac{f_1(x)+L\delta_N}{f_0(x)-2L\delta_N} \frac{N_0}{N_0+1} + o(N_0^{-\gamma}).
\end{align}
{\bf Lower bound.} Proceeding similar to (ref), we have
\begin{align*}
& {\mathrm E}\big[\hat{r}_M(x)\big] = \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big] = \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})\Big) \\
\ge& \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le 2 \frac{M}{N_0}\Big)\\
=& \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le 2 \frac{M}{N_0}, \lVert Z - x \rVert \le \delta_N\Big)\\
\ge& \frac{N_0}{M} {\mathrm P} \Big(\frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le 2 \frac{M}{N_0}, \lVert Z - x \rVert \le \delta_N\Big)\\
=& \frac{N_0}{M} {\mathrm P} \Big(\frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le 2 \frac{M}{N_0}\Big)\\
\ge& \frac{N_0}{M} {\mathrm P} \Big(\frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N} U \le U_{(M)}\Big) - \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big)\\
=& \frac{f_1(x)-L\delta_N}{f_0(x)+2L\delta_N} \int_0^{\frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N} \frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t - \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big).
\end{align*}
Consider the first term. If $\frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N} \ge 1$, then
\begin{align*}
\frac{f_1(x)-L\delta_N}{f_0(x)+2L\delta_N} \int_0^{\frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N} \frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t = \frac{f_1(x)-L\delta_N}{f_0(x)+2L\delta_N} \frac{N_0}{N_0+1}.
\end{align*}
If $\frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N} < 1$, using the Chernoff bound, for any $\gamma>0$,
\begin{align*}
& \int_{\frac{f_0(x)+2L\delta_N}{f_1(x)-L\delta_N} \frac{N_0}{M}}^{\frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t \le \int_{\frac{f_0(x)}{f_1(x)} \frac{N_0}{M}}^{\frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t \le \int_{\frac{f_L}{f_U} \frac{N_0}{M}}^{\frac{N_0}{M}} {\mathrm P} \Big( U_{(M)} \ge \frac{M}{N_0}t \Big) {\mathrm d} t \\
\le& \Big[1-\frac{f_L}{f_U}\Big] \frac{N_0}{M} {\mathrm P} \Big( U_{(M)} \ge \frac{f_L}{f_U} \Big) \le \Big[1-\frac{f_L}{f_U} \Big] \frac{N_0}{M} \exp \Big[ M - \frac{f_L}{f_U} N_0 - M\log M + M \log\Big(\frac{f_L}{f_U} N_0\Big)\Big] \\
\prec & N_0^{-\gamma}.
\end{align*}
The last step is due to $M \log N_0/N_0 \to 0$. Recalling (ref), we then obtain
\begin{align}
{\mathrm E}\big[\hat{r}_M(x)\big] \ge \frac{f_1(x)-L\delta_N}{f_0(x)+2L\delta_N} \frac{N_0}{N_0+1} - o(N_0^{-\gamma}).
\end{align}
Combining (ref) and (ref), and taking $N_0$ large enough so that $L\delta_N \le f_U \wedge (f_L/4)$, one obtains
\begin{align*}
\Big\lvert {\mathrm E}\big[\hat{r}_M(x)\big] - r(x) \Big\rvert &\le \Big\lvert \frac{f_1(x)+L\delta_N}{f_0(x)-2L\delta_N} \frac{N_0}{N_0+1} - \frac{f_1(x)}{f_0(x)} \Big\rvert \bigvee \Big\lvert \frac{f_1(x)-L\delta_N}{f_0(x)+2L\delta_N} \frac{N_0}{N_0+1} - \frac{f_1(x)}{f_0(x)} \Big\rvert + o(N_0^{-\gamma})\\
&\le \frac{f_0(x)L\delta_N + 2f_1(x)L\delta_N}{f_0(x)(f_0(x)-2L\delta_N)} + \frac{1}{N_0+1} \frac{f_1(x)+L\delta_N}{f_0(x)-2L\delta_N} + o(N_0^{-\gamma})\\
&\le \Big( \frac{2}{f_L} + \frac{4f_U}{f_L^2}\Big) L \delta_N + \frac{4f_U}{f_L}\frac{1}{N_0+1} + o(N_0^{-\gamma}).
\end{align*}
By the selection of $\delta_N$ and that the right hand side does not depend on $x$, we complete the proof for this case.
{\bf Case II.} $f_1(x) \le L\delta_N$.
The upper bound (ref) in Case I still holds for this case. Accordingly, taking $N_0$ large enough so that $L\delta_N \le f_L/4$, one has
\begin{align*}
&\Big\lvert {\mathrm E}\big[\hat{r}_M(x)\big] - r(x) \Big\rvert \le {\mathrm E}\big[\hat{r}_M(x)\big] + r(x)\\
\le& \frac{f_1(x)+L\delta_N}{f_0(x)-2L\delta_N} \frac{N_0}{N_0+1} + \frac{f_1(x)}{f_0(x)} + o(N_0^{-\gamma}) \le \frac{4}{f_L} L\delta_N + \frac{1}{f_L} L\delta_N + o(N_0^{-\gamma}).
\end{align*}
We thus complete the whole proof.
proof[Proof of Theorem (ref)(ref)]
By the law of total variance,
\begin{align}
\Var\big[\hat{r}_M(x)\big] = {\mathrm E}\Big[\Var\Big[\hat{r}_M(x) \,\Big{|}\, \mX\Big]\Big] + \Var\Big[{\mathrm E}\Big[\hat{r}_M(x) \,\Big{|}\, \mX\Big]\Big].
\end{align}
For the first term in (ref), let $Z$ be a copy drawn from $\nu_1$ independently of the data. Then, since $[Z_j]_{j=1}^{N_1}$ are i.i.d,
\begin{align*}
&{\mathrm E}\Big[\Var\Big[\hat{r}_M(x) \,\Big{|}\, \mX\Big]\Big] = {\mathrm E}\Big[\Var\Big[\frac{N_0}{N_1M} K_M(x) \,\Big{|}\, \mX\Big]\Big]\\
=& \Big(\frac{N_0}{N_1M}\Big)^2 {\mathrm E}\Big[\Var\Big[ \sum_{j=1}^{N_1} \ind\big(Z_j \in A_M(x)\big) \,\Big{|}\, \mX\Big]\Big] = \frac{N_0^2}{N_1M^2} {\mathrm E}\Big[\Var\Big[ \ind\big(Z \in A_M(x)\big) \,\Big{|}\, \mX\Big]\Big]\\
=& \frac{N_0^2}{N_1M^2} {\mathrm E}\Big[ \nu_1\big(A_M(x)\big) - \nu_1^2\big(A_M(x)\big)\Big] \le \frac{N_0^2}{N_1M^2} {\mathrm E}\Big[ \nu_1\big(A_M(x)\big)\Big] \\
=& \frac{N_0}{N_1M} {\mathrm E}\big[\hat{r}_M(x)\big] \lesssim C \frac{N_0}{N_1M},
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
where $C>0$ is a constant only depending on $f_L,f_U$. The last step is due to (ref).
For the second term in (ref), notice that
\begin{align*}
\Var\Big[{\mathrm E}\Big[\hat{r}_M(x) \,\Big{|}\, \mX\Big]\Big] = \Var\Big[{\mathrm E}\Big[\frac{N_0}{N_1M} K_M(x) \,\Big{|}\, \mX\Big]\Big] = \Big(\frac{N_0}{M}\Big)^2 \Var\Big[ \nu_1\big(A_M(x)\big) \Big].
\end{align*}
Recalling that $W = \nu_0(B_{Z,\lVert x-Z \rVert})$, we have the following lemma about the density of $W$ near $x$.
\begin{lemma}
Denote the density of $W$ by $f_W$. Then for any $(\nu_0,\nu_1) \in \cP_{x,\rm p}(f_L,f_U,L,d,\delta)$,
\[
f_W(0) = r(x).
\]
Furthermore, for any $\epsilon>0$ and $N_0$ sufficiently large, we have for all $0 \le w \le 2M/N_0$,
\[
\sup_{(\nu_0,\nu_1) \in \cP_{\rm p}(f_L,f_U,\delta,L,d)} f_W(w) \le (1+\epsilon)\frac{f_U}{f_L}.
\]
\end{lemma}
Due to Lemma (ref), we can take $N_0$ sufficiently large so that for any $0 \le w \le 2M/N_0$,
\[
\sup_{(\nu_0,\nu_1) \in \cP_{\rm p}(f_L,f_U,\delta,L,d)} f_W(w) \le 2\frac{f_U}{f_L}.
\]
Let $Z,{\tilde Z}$ be two independent copies from $\nu_1$ that are further independent of the data. Let $W = \nu_0(B_{Z,\lVert x-Z \rVert})$ and ${\tilde W} = \nu_0(B_{{\tilde Z},\lVert x-{\tilde Z} \rVert})$. Let $V = \nu_0(B_{Z,\lVert \cX_{(M)}(Z) -Z \rVert})$ and ${\tilde V} = \nu_0(B_{{\tilde Z},\lVert \cX_{(M)}({\tilde Z}) -{\tilde Z} \rVert})$. We then have
\begin{align*}
\Var\Big[ \nu_1\big(A_M(x)\big) \Big] =& {\mathrm E}\Big[ \nu_1^2\big(A_M(x)\big) \Big] - \Big({\mathrm E}\Big[ \nu_1\big(A_M(x)\big) \Big]\Big)^2\\
=& {\mathrm P} \Big(Z \in A_M(x), {\tilde Z} \in A_M(x)\Big) - {\mathrm P} \Big(Z \in A_M(x)\Big) {\mathrm P} \Big({\tilde Z} \in A_M(x)\Big)\\
=& {\mathrm P} \Big(\lVert x - Z \rVert \le \lVert \cX_{(M)}(Z) - Z \rVert , \lVert x - {\tilde Z} \rVert \le \lVert \cX_{(M)}({\tilde Z}) - {\tilde Z} \rVert \Big) \\
& - {\mathrm P} \Big(\lVert x - Z \rVert \le \lVert \cX_{(M)}(Z) - Z \rVert\Big) {\mathrm P} \Big(\lVert x - {\tilde Z} \rVert \le \lVert \cX_{(M)}({\tilde Z}) - {\tilde Z} \rVert\Big)\\
=& {\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}\Big) - {\mathrm P} \Big(W \le V\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}\Big).
\end{align*}
Due to the independence between $Z$ and ${\tilde Z}$, $W$ and ${\tilde W}$ are independent. Notice that $V \,|\, Z$ have the same distribution as $U_{(M)}$ for any $Z \in \bR^d$, then $V$ and $Z$ are independent, so are ${\tilde V}$ and ${\tilde Z}$.
Let's expand the variance further as
\begin{align*}
& \Var\Big[ \nu_1\big(A_M(x)\big) \Big]\\
= & \Big[{\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}, W \le 2\frac{M}{N_0}, {\tilde W} \le 2\frac{M}{N_0} \Big) - {\mathrm P} \Big(W \le V, W \le 2\frac{M}{N_0}\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}, {\tilde W} \le 2\frac{M}{N_0}\Big) \Big]\\
&+ \Big[{\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}\Big) - {\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}, W \le 2\frac{M}{N_0}, {\tilde W} \le 2\frac{M}{N_0} \Big) \Big]\\
&- \Big[{\mathrm P} \Big(W \le V\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}\Big) - {\mathrm P} \Big(W \le V, W \le 2\frac{M}{N_0}\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}, {\tilde W} \le 2\frac{M}{N_0}\Big) \Big].
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
For the first term in (ref), we have the following lemma.
\begin{lemma} We have
\begin{align*}
& \Big(\frac{N_0}{M}\Big)^2 \Big[{\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}, W \le 2\frac{M}{N_0}, {\tilde W} \le 2\frac{M}{N_0} \Big) - {\mathrm P} \Big(W \le V, W \le 2\frac{M}{N_0}\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}, {\tilde W} \le 2\frac{M}{N_0}\Big) \Big] \\
& \leq C \frac{1}{M},
\end{align*}
where $C>0$ is a constant only depending on $f_L,f_U$.
\end{lemma}
For the second term in (ref),
\begin{align*}
&{\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}\Big) - {\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}, W \le 2\frac{M}{N_0}, {\tilde W} \le 2\frac{M}{N_0} \Big)\\
\le& {\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}, W > 2\frac{M}{N_0}\Big) + {\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}, {\tilde W} > 2\frac{M}{N_0}\Big)\\
\le & {\mathrm P} \Big(V > 2\frac{M}{N_0}\Big) + {\mathrm P} \Big({\tilde V} > 2\frac{M}{N_0}\Big) \\
=& 2 {\mathrm P} \Big(U_{(M)} > 2\frac{M}{N_0}\Big).
\end{align*}
Using the Chernoff bound and $M/\log N_0\to \infty$, for any $\gamma>0$,
\begin{align*}
\Big(\frac{N_0}{M}\Big)^2 {\mathrm P} \Big(U_{(M)} > 2\frac{M}{N_0}\Big) \le \Big(\frac{N_0}{M}\Big)^2 \exp \Big[ -(1 - \log 2)M \Big] \prec N_0^{-\gamma},
\end{align*}
We then have
\begin{align*}
& \Big(\frac{N_0}{M}\Big)^2 \Big[{\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}\Big) - {\mathrm P} \Big(W \le V, {\tilde W} \le {\tilde V}, W \le 2\frac{M}{N_0}, {\tilde W} \le 2\frac{M}{N_0} \Big) \Big]\\
&- \Big(\frac{N_0}{M}\Big)^2 \Big[{\mathrm P} \Big(W \le V\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}\Big) - {\mathrm P} \Big(W \le V, W \le 2\frac{M}{N_0}\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}, {\tilde W} \le 2\frac{M}{N_0}\Big) \Big]\\
\le& 2 \Big(\frac{N_0}{M}\Big)^2 {\mathrm P} \Big(U_{(M)} > 2\frac{M}{N_0}\Big) \prec N_0^{-\gamma}.
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
For the third term in (ref), it is easy to see
\[
\Big[{\mathrm P} \Big(W \le V\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}\Big) - {\mathrm P} \Big(W \le V, W \le 2\frac{M}{N_0}\Big) {\mathrm P} \Big({\tilde W} \le {\tilde V}, {\tilde W} \le 2\frac{M}{N_0}\Big) \Big] \ge 0.
\]
Plugging Lemma (ref) and (ref) into (ref), we obtain
\begin{align}
\Big(\frac{N_0}{M}\Big)^2 \Var\Big[ \nu_1\big(A_M(x)\big) \Big] \lesssim C \frac{1}{M},
\end{align}
where $C>0$ is a constant only depending on $f_L,f_U$.
Plugging (ref) and (ref) into (ref) completes the proof.
Proof of Theorem (ref)
proof[Proof of Theorem (ref)]
We only have to prove the first claim as the second is trivial.
Take $\delta_N = (\frac{4}{f_L V_d})^{1/d} (\frac{M}{N_0})^{1/d}$ as in the proof of Theorem (ref)(ref). Take $\delta_N' = (\frac{2}{a f_L V_d})^{1/d} (\frac{M}{N_0})^{1/d}$. For any $x \in \bR^d$, denote the distance of $x$ to the boundary of $S_1$ by $\Delta(x)$, i.e., $\Delta(x) = \inf_{z \in \partial S_1} \lVert z-x \rVert$.
Depending on the position of $x$ and the value of $\Delta(x)$, we separate the proof into three cases .
{\bf Case I.} $x \in S_1$ and $\Delta(x) > 2\delta_N$.
In this case, since $\Delta(x) > 2\delta_N$, for any $\lVert z - x \rVert \le \delta_N$, we have $B_{z,\lVert z-x \rVert} \subset S_1$. From the smoothness conditions on $f_0$ and $f_1$, similar to the proof of Theorem (ref), we have
\begin{align*}
& {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert f_0(x) \ind(x \in S_1, \Delta(x) > 2\delta_N) {\mathrm d} x \Big] \\
= & \int_{\bR^d} {\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert \Big] f_0(x) \ind(x \in S_1, \Delta(x) > 2\delta_N) {\mathrm d} x \\
\le & \int_{\bR^d} \Big({\mathrm E} \Big[ \hat{r}_M(x) - r(x) \Big]^2 \Big)^{1/2} f_0(x) \ind(x \in S_1, \Delta(x) > 2\delta_N) {\mathrm d} x \\
\le & C \Big[ \Big(\frac{M}{N_0}\Big)^{1/d} + \Big(\frac{1}{M}\Big)^{1/2} + \Big(\frac{N_0}{MN_1}\Big)^{1/2}\Big] \int_{\bR^d} f_0(x) \ind(x \in S_1, \Delta(x) > 2\delta_N) {\mathrm d} x\\
\le & C \Big[ \Big(\frac{M}{N_0}\Big)^{1/d} + \Big(\frac{1}{M}\Big)^{1/2} + \Big(\frac{N_0}{MN_1}\Big)^{1/2}\Big] \int_{\bR^d} f_0(x) {\mathrm d} x\\
= & C \Big[ \Big(\frac{M}{N_0}\Big)^{1/d} + \Big(\frac{1}{M}\Big)^{1/2} + \Big(\frac{N_0}{MN_1}\Big)^{1/2}\Big],
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
where the constant $C>0$ only depends on $f_L,f_U,L,d$.
{\bf Case II.} $x \in S_0 \setminus S_1$ and $\Delta(x) > \delta_N'$.
In this case, $r(x) = 0$ and for any $z \in S_1$,
\[
\nu_0(B_{z,\lVert z-x \rVert}) \ge f_L \lambda(B_{z,\lVert z-x \rVert} \cap S_0) \ge af_L \lambda(B_{z,\lVert z-x \rVert}) > af_L V_d \delta_N'^d \ge 2\frac{M}{N_0}.
\]
Then for any $\gamma>0$,
\begin{align*}
&{\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert \Big] = {\mathrm E} \Big[ \hat{r}_M(x) \Big] = \frac{N_0}{M} {\mathrm E}\big[\nu_1\big(A_M(x)\big)\big]\\
=& \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert})\Big) \le \frac{N_0}{M} {\mathrm P}\Big(U_{(M)} > 2 \frac{M}{N_0}\Big) \prec N_0^{-\gamma}.
\end{align*}
One then obtains
\begin{align*}
& {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert f_0(x) \ind(x \notin S_1, \Delta(x) > \delta_N') {\mathrm d} x \Big] \\
\prec & N_0^{-\gamma} \int_{\bR^d} f_0(x) \ind(x \in S_0 \setminus S_1, \Delta(x) > \delta_N') {\mathrm d} x \le N_0^{-\gamma}.
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
{\bf Case III.} $x \in S_0$ and $\Delta(x) \le (2\delta_N) \vee \delta_N'$.
In this case, for any $z \in S_1$,
\[
\nu_0(B_{z,\lVert z-x \rVert}) \ge f_L \lambda(B_{z,\lVert z-x \rVert} \cap S_0) \ge af_L \lambda(B_{z,\lVert z-x \rVert}) \ge \frac{af_L}{f_U} \nu_1(B_{x,\lVert z-x \rVert}).
\]
Accordingly,
\begin{align*}
&{\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert \Big] \le {\mathrm E} \Big[ \hat{r}_M(x) \Big] + r(x) = \frac{N_0}{M} {\mathrm P} \Big(W \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \Big) + r(x)\\
\le& \frac{N_0}{M} {\mathrm P} \Big( \frac{af_L}{f_U} \nu_1(B_{x,\lVert x-Z \rVert}) \le \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}), \nu_0(B_{Z,\lVert \cX_{(M)}(Z) - Z \rVert}) \le 2 \frac{M}{N_0}\Big) + r(x)\\
\le& \frac{N_0}{M} {\mathrm P}\Big(\frac{af_L}{f_U} U \le U_{(M)} \Big) + r(x) = \frac{f_U}{af_L} (1+o(1)) + \frac{f_U}{f_L}.
\end{align*}
From the definition of $\delta_N,\delta_N'$ and $M/N_0 \to 0$, we have $\delta_N,\delta_N' \to 0$ as $N_0 \to \infty$. Since the surface area of $S_1$ is bounded by $H$, we have
\[
\lambda(\{x:\Delta(x) \le (2\delta_N) \vee \delta_N'\}) \lesssim H \{(2\delta_N) \vee \delta_N'\}.
\]
Then we obtain
\begin{align*}
& {\mathrm E} \Big[ \int_{\bR^d} \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert f_0(x) \ind(\Delta(x) \le (2\delta_N) \vee \delta_N') {\mathrm d} x \Big] \\
= & \int_{\bR^d} {\mathrm E} \Big[ \Big\lvert \hat{r}_M(x) - r(x) \Big\rvert \Big] f_0(x) \ind(\Delta(x) \le (2\delta_N) \vee \delta_N') {\mathrm d} x \\
\le & \Big(\frac{f_U}{af_L} (1+o(1)) + \frac{f_U}{f_L} \Big) \int_{\bR^d} f_0(x) \ind(\Delta(x) \le (2\delta_N) \vee \delta_N') {\mathrm d} x\\
\le & \Big(\frac{f_U}{af_L} (1+o(1)) + \frac{f_U}{f_L} \Big) f_U \lambda(\{x:\Delta(x) \le (2\delta_N) \vee \delta_N'\})\\
\lesssim & \Big(\frac{f_U}{af_L} + \frac{f_U}{f_L} \Big) f_U H (\delta_N + \delta_N') \le C \Big(\frac{M}{N_0}\Big)^{1/d},
\addtocounter{equation}{1}\tag{\theequation}
\end{align*}
where the constant $C>0$ only depends on $f_L,f_U,a,H,d$.
Combining (ref), (ref), (ref) completes the proof.