arXiv reader

Nearest-Neighbor Radii under Dependent Sampling

Yuanyuan Gao, Yilong Hou and Zhexiao Lin

arXiv
2605.14343v1 · PDF · 14 May 2026
Categories
cs.LG, math.ST, stat.ML, stat.TH
Licence
CC BY 4.0 The site shows the text.

Abstract

Nearest-neighbor methods are fundamental to classical and modern machine learning, yet their geometric properties are typically analyzed under independent sampling. In this paper, we study the nearest-neighbor radii under dependent sampling. We consider strong mixing dependent observations and ask whether dependence changes the scale of nearest-neighbor neighborhoods. We establish distribution-free almost sure convergence under polynomial mixing and sharp non-asymptotic moment bounds under geometric mixing. The moment bounds depend on the local intrinsic dimension rather than the ambient dimension, making the results applicable to high-dimensional data concentrated near lower-dimensional manifolds. Synthetic experiments and real-world time-series benchmarks support the theory, showing that nearest-neighbor geometry remains informative under dependence sampling.

Items 16

Theorem

Theorem 1

Q3US

Assume that the triangular array [X_{n,i}]_{1 \le i \le n,\ n \ge 1} is \alpha-mixing with coefficients [\alpha_m]_{m \ge 1} satisfying \alpha_m \lesssim m^{-\gamma} for some \gamma>1. If k/n \to 0, then

\|\mathcal X_{(k)}^n(x)-x\| \stackrel{\sf a.s.}{\longrightarrow} r_x.

In particular, if x \in {\rm supp}(\mu) and k/n \to 0, then

\|\mathcal X_{(k)}^n(x)-x\| \stackrel{\sf a.s.}{\longrightarrow} 0.
Assumption

Assumption 1 (Geometric \alpha-mixing)

69X3

There exists \gamma>0 such that \alpha_m \le e^{-\gamma m} for all m \ge 1.

Assumption

Assumption 2 (Local lower mass of order s at x)

96S3

There exist constants c_->0, r_0>0, and s>0 such that \mu(B(x,r)) \ge c_- r^s for all 0<r\le r_0.

Used by Proof
Assumption

Assumption 3 (Local upper mass of order s at x)

LGRN

There exist constants c_+>0, r_0>0, and s>0 such that \mu(B(x,r)) \le c_+ r^s for all 0<r\le r_0.

Used by Proof
Assumption

Assumption 4 (Compact support)

QELP

The support of \mu is contained in a compact set of diameter at most D.

Theorem

Theorem 2 (Non-asymptotic tail bound)

DZ8X

Assume Assumptions 1, 2, and 4. Define

b_n := \Big\lceil \frac{8}{\gamma}\log n \Big\rceil, \qquad r_*(n,k) := \Big(\frac{8k}{c_- n}\Big)^{1/s}.

Then there exists a constant c_0>0, depending only on \gamma, such that for every integer j \ge 0 satisfying 2^j r_*(n,k) \le r_0, we have

{\mathrm P}\big(R_{n,k}(x) > 2^j r_*(n,k)\big) \le 4\exp \Big(-c_0\,2^{js}\,\frac{k}{\log n}\Big) + C n^{-7},

for all sufficiently large n.

Used by Proof
Theorem

Theorem 3 (Sharp moment upper bound)

AHMM

Assume Assumptions 1, 2, and 4. Let p>0. Then there exists a constant C_{p,s}>0 such that, whenever K_0\log n \le k \le \kappa n, we have

{\mathrm E}\big[R_{n,k}(x)^p\big] \le C_{p,s}\Big(\frac{k}{n}\Big)^{p/s}.
Used by Proof
Theorem

Theorem 4 (Matching lower bound)

EDAW

Assume Assumption 3. Let p>0. Then whenever (\frac{k}{2c_+ n})^{1/s} \le r_0, we have

{\mathrm E}\big[R_{n,k}(x)^p\big] \ge \frac12\Big(\frac{k}{2c_+ n}\Big)^{p/s}.
Used by Proof
Theorem

Theorem 5 (Exact-order characterization)

7W9D

Assume Assumptions 1, 2, 3, and 4, with the same exponent s>0. Then for every p>0 there exist constants 0 < c_{p,s} \le C_{p,s} < \infty such that, for all sufficiently large n and all K_0\log n \le k \le \kappa n, we have

c_{p,s}\Big(\frac{k}{n}\Big)^{p/s} \le {\mathrm E}\big[R_{n,k}(x)^p\big] \le C_{p,s}\Big(\frac{k}{n}\Big)^{p/s}.
Lemma

Lemma 1 (Theorem 5 of ; Theorem 2.1 of)

RIIB

Let [Z_i]_{i=1}^n be a centered sequence of random variables such that

{\mathrm E}[Z_i]=0 \qquad\text{and}\qquad |Z_i|\le S(n)<\infty, \qquad i\in \llbracket n\rrbracket.

Then, for any n\ge 1, any m\in \llbracket n\rrbracket, and any \epsilon>4mS(n),

{\mathrm P}\Big(\Big|\sum_{i=1}^n Z_i\Big|>\epsilon\Big) \le 4\exp \left( -\frac{\epsilon^2}{64\frac{n}{m}\sigma_{n,m}^2+\frac83\,\epsilon m S(n)} \right) + 4\frac{n}{m}\alpha_m,

where

\sigma_{n,m}^2 := \sup_{0\le j\le n-1} {\mathrm E}\Big[\sum_{i=j+1}^{(j+m)\wedge n} Z_i\Big]^2.
Used by Proof, Proof
Proof

Proof

H2QP

Fix x\in {\mathbbm R}^d. Since \mathcal X_{(k)}^n(x)\in {\rm supp}(\mu) almost surely and r_x =\inf\{\|y-x\|: y\in {\rm supp}(\mu)\}, we have

\|\mathcal X_{(k)}^n(x)-x\| \ge r_x \qquad\text{a.s. for every }n.

Thus, it remains to prove that

\limsup_{n\to\infty}\|\mathcal X_{(k)}^n(x)-x\| \le r_x \qquad\text{a.s.}

Fix \varepsilon>0, and define

p_x := \mu(B_{x,r_x+\varepsilon}) = {\mathrm P}\big(\|X_{n,i}-x\|\le r_x+\varepsilon\big).

Since B_{x,r_x+\varepsilon} intersects {\rm supp}(\mu) by definition of r_x, we have p_x>0.

We observe that the event \|\mathcal X_{(k)}^n(x)-x\|>r_x+\varepsilon occurs if and only if fewer than k observations in the n-th row fall inside B_{x,r_x+\varepsilon}. Then we have

{\mathrm P}\big(\|\mathcal X_{(k)}^n(x)-x\|>r_x+\varepsilon\big) = {\mathrm P}\Big(\sum_{i=1}^n \mathbf 1\{\|X_{n,i}-x\|\le r_x+\varepsilon\}<k\Big).

We set

Z_{n,i} := \mathbf 1\{\|X_{n,i}-x\|\le r_x+\varepsilon\} - {\mathrm P}\big(\|X_{n,i}-x\|\le r_x+\varepsilon\big) = \mathbf 1\{\|X_{n,i}-x\|\le r_x+\varepsilon\}-p_x.

Then {\mathrm E}[Z_{n,i}]=0 and |Z_{n,i}|\le 1. Since Z_{n,i} is a measurable function of X_{n,i}, the sequence [Z_{n,i}]_{i=1}^n is again \alpha-mixing with the same mixing coefficients as [X_{n,i}]_{i=1}^n. Moreover, for any m\in\{1,\dots,n\} and any 0\le j\le n-1, the covariance inequality [davydov1968convergence, Corollary of Lemma 2.1] yields

\begin{aligned} {\mathrm E}\Big[\sum_{i=j+1}^{(j+m)\wedge n} Z_{n,i}\Big]^2 &= \operatorname{{\rm Var}}\Big(\sum_{i=j+1}^{(j+m)\wedge n} Z_{n,i}\Big) \\ &\le \sum_{i=j+1}^{(j+m)\wedge n}\operatorname{{\rm Var}}(Z_{n,i}) +2\sum_{i=j+1}^{(j+m)\wedge n}\sum_{k>i}\operatorname*{\rm Cov}(Z_{n,i},Z_{n,k}) \\ &\le m + 24\sum_{i=j+1}^{(j+m)\wedge n}\sum_{k>i}\alpha_{k-i} \|Z_{n,i}\|_\infty \|Z_{n,k}\|_\infty \\ &\le m + 24\sum_{i=j+1}^{(j+m)\wedge n}\sum_{k>i}\alpha_{k-i} \\ &\le m + 24m\sum_{\ell=1}^\infty \alpha_\ell. \end{aligned}

Since \sum_{\ell=1}^\infty \alpha_\ell<\infty, we set M = 1+24\sum_{\ell=1}^\infty \alpha_\ell <\infty, then

\sigma_{n,m}^2 := \sup_{0\le j\le n-1} {\mathrm E}\Big[\sum_{i=j+1}^{(j+m)\wedge n} Z_{n,i}\Big]^2 \le Mm.

Since k/n\to 0 and p_x>0, for all sufficiently large n, we have k-np_x \le -\frac{np_x}{2}. Then

\begin{aligned} {\mathrm P}\big(\|\mathcal X_{(k)}^n(x)-x\|>r_x+\varepsilon\big) &= {\mathrm P}\Big(\sum_{i=1}^n Z_{n,i}<k-np_x\Big) \\ &\le {\mathrm P}\Big(\Big|\sum_{i=1}^n Z_{n,i}\Big|>np_x-k\Big) \\ &\le {\mathrm P}\Big(\Big|\sum_{i=1}^n Z_{n,i}\Big|>\frac{np_x}{2}\Big). \end{aligned}

We now apply Lemma 1 with m_n = \lfloor \frac{3}{64}\frac{np_x}{\log n}\rfloor. Then m_n\to\infty and m_n/n \to 0. Therefore for all sufficiently large n, we have 64M \le \frac{4}{3}p_x m_n and \frac{np_x}{2}>4m_n, and then the conditions of Lemma 1 are satisfied with S(n)=1 and \epsilon_n=np_x/2. Using \sigma_{n,m_n}^2\le M m_n, we obtain

\begin{aligned} {\mathrm P}\Big(\Big|\sum_{i=1}^n Z_{n,i}\Big|>\frac{np_x}{2}\Big) &\le 4\exp \left[ -\frac{(np_x/2)^2}{64(n/m_n)\sigma_{n,m_n}^2 + \frac83 (np_x/2)m_n} \right] +4\frac{n}{m_n}\alpha_{m_n} \\ &\le 4\exp \left[ -\frac{n^2p_x^2/4}{64Mn + \frac43 np_x m_n} \right] +4\frac{n}{m_n}\alpha_{m_n} \\ &\le 4\exp \left[ -\frac{n^2p_x^2/4}{\frac83 np_x m_n} \right] +4\frac{n}{m_n}\alpha_{m_n} \\ &= 4\exp \left(-\frac{3}{32}\frac{np_x}{m_n}\right) +4\frac{n}{m_n}\alpha_{m_n}. \end{aligned}

By the choice of m_n, the exponential term is O(n^{-2}).

We now assume the mixing coefficients satisfy \alpha_m \lesssim m^{-(1+\gamma)} for some \gamma>1. Then

\frac{n}{m_n}\alpha_{m_n} \lesssim \frac{n}{m_n^{2+\gamma}} \lesssim \frac{(\log n)^{2+\gamma}}{n^{1+\gamma}},

which is summable in n. Then

\sum_{n=1}^\infty {\mathrm P}\big(\|\mathcal X_{(k)}^n(x)-x\|>r_x+\varepsilon\big) <\infty.

By the Borel–Cantelli lemma,

{\mathrm P}\big(\|\mathcal X_{(k)}^n(x)-x\|>r_x+\varepsilon\ \text{i.o.}\big)=0.

That is, for every fixed \varepsilon>0,

\|\mathcal X_{(k)}^n(x)-x\|\le r_x+\varepsilon \qquad\text{eventually a.s.}

Let \varepsilon=1/j, j\in\mathbb N, and intersect the resulting probability-one events. Then we obtain

\limsup_{n\to\infty}\|\mathcal X_{(k)}^n(x)-x\|\le r_x \qquad\text{a.s.}

Together with the lower bound \|\mathcal X_{(k)}^n(x)-x\|\ge r_x a.s. for every n, we obtain

\|\mathcal X_{(k)}^n(x)-x\| \to r_x \qquad\text{almost surely}.

This completes the proof.

Uses Lemma 1
Proof

Proof

UEIN

Fix r>0, and define

Y_i(r):=\mathbf 1\{\|X_{n,i}-x\|\le r\}, \qquad p_r:={\mathrm E}[Y_i(r)]=\mu(B(x,r)).

Let

N_n(x,r):=\sum_{i=1}^n Y_i(r).

By the definition of the k-nearest-neighbor radius,

R_{n,k}(x)>r \iff N_n(x,r)<k.

We now use a blocking argument. Partition the row into alternating kept and discarded blocks of length b_n. Set M_n=\lfloor \frac{n}{2b_n}\rfloor, and for u=1,\dots,M_n, define the kept block

I_u:=\{(2u-2)b_n+1,\dots,(2u-1)b_n\}.

Let

W_u(r):=\sum_{i\in I_u}Y_i(r), \qquad S_n^{\rm keep}(r):=\sum_{u=1}^{M_n}W_u(r).

Since S_n^{\rm keep}(r)\le N_n(x,r), we obtain

\mathbb P(R_{n,k}(x)>r) = \mathbb P(N_n(x,r)<k) \le \mathbb P(S_n^{\rm keep}(r)<k).

Consider the radius

r_j=2^j r_*(n,k) = 2^j\Big(\frac{8k}{c_- n}\Big)^{1/s}, \qquad j\ge 0,

and assume r_j\le r_0. By Assumption 2,

p_{r_j} = \mu(B(x,r_j)) \ge c_- r_j^s = 8\cdot2^{js}\frac{k}{n}.

Since b_n/n \to 0 and M_n b_n \ge n/4 for all sufficiently large n,

\mu_j={\mathrm E}[S_n^{\rm keep}(r_j)] = M_n b_n p_{r_j} \ge n\,p_{r_j}/4 \ge 2^{js+1}k.

Therefore, on the event \{S_n^{\rm keep}(r_j)<k\}, since \mu_j\ge 2k,

\mu_j-S_n^{\rm keep}(r_j)>\mu_j-k\ge \mu_j/2.

Then

\{S_n^{\rm keep}(r_j)<k\} \subseteq \left\{ \left|S_n^{\rm keep}(r_j)-\mu_j\right|>\frac{\mu_j}{2} \right\}.

Therefore, if we define

Z_u:=W_u(r_j)-{\mathrm E}[W_u(r_j)], \qquad u=1,\dots,M_n,

we have

\mathbb P(R_{n,k}(x)>r_j) \le \mathbb P\Big(\Big|\sum_{u=1}^{M_n}Z_u\Big|>\frac{\mu_j}{2}\Big).

Next we apply Lemma 1 for the block sequence [Z_u]_{u=1}^{M_n}. Since each Z_u is measurable with respect to the coordinates in the kept block I_u, and successive kept blocks are separated by a discarded block of length b_n, the sequence [Z_u]_{u=1}^{M_n} is \alpha-mixing with coefficients

\bar\alpha_\ell := \sup_{u\ge 1}\sup_{A\in\sigma(Z_1,\dots,Z_u),B\in\sigma(Z_{u+\ell},Z_{u+\ell+1},\dots)} |\mathbb P(A\cap B)-\mathbb P(A)\mathbb P(B)| \le \alpha_{\ell b_n}, \qquad \ell\ge 1.

In particular, \bar\alpha_1\le \alpha_{b_n}\le e^{-\gamma b_n}\le n^{-8}, as long as b_n is chosen with a sufficiently large constant times \log n. Also, 0\le W_u(r_j)\le b_n, so |Z_u| = |W_u(r_j)-{\mathrm E} W_u(r_j)| \le b_n. Thus the boundedness parameter in Lemma 1 is S(M_n)=b_n.

To bound the variance term \sigma^2_{M_n,1}, since W_u(r_j) is a sum of b_n Bernoulli indicators, we have W_u(r_j)^2\le b_n W_u(r_j), and therefore

\operatorname{{\rm Var}}(Z_u) \le {\mathrm E}[W_u(r_j)^2] \le b_n\,{\mathrm E}[W_u(r_j)] = b_n^2 p_{r_j}.

Then for the block sequence with block parameter m=1,

\sigma^2_{M_n,1} = \sup_{0\le v\le M_n-1}{\mathrm E}[Z_{v+1}^2] \le b_n^2 p_{r_j}.

We now apply Lemma 1 to [Z_u]_{u=1}^{M_n} with m=1 and threshold \varepsilon=\mu_j/2=M_n b_n p_{r_j}/2. Since \varepsilon\ge k\ge K_0\log n, and b_n\asymp \log n, we may choose K_0 sufficiently large so that \varepsilon>4b_n for all sufficiently large n. Then by Lemma 1,

\begin{aligned} \mathbb P\Big(\Big|\sum_{u=1}^{M_n}Z_u\Big|>\frac{\mu_j}{2}\Big) &\le 4\exp \left( -\frac{(\mu_j/2)^2} {64 M_n \sigma_{M_n,1}^2 + \frac83(\mu_j/2)b_n} \right) +4M_n\bar\alpha_1 \\ &\le 4\exp \left( -\frac{(\mu_j/2)^2} {64 M_n b_n^2 p_{r_j} + \frac43 \mu_j b_n} \right) +4M_n\bar\alpha_1. \end{aligned}

Using \mu_j=M_n b_n p_{r_j}, we obtain \frac43 \mu_j b_n = \frac43 M_n b_n^2 p_{r_j}, so the denominator is bounded by

\left(64+\frac43\right)M_n b_n^2 p_{r_j} \le 66\,M_n b_n^2 p_{r_j},

and then

\begin{aligned} \frac{(\mu_j/2)^2} {64 M_n b_n^2 p_{r_j} + \frac43 \mu_j b_n} &\ge c\frac{\mu_j^2}{M_n b_n^2 p_{r_j}} = c\frac{(M_n b_n p_{r_j})^2}{M_n b_n^2 p_{r_j}} = c M_n p_{r_j}. \end{aligned}

Since M_n\ge n/(4b_n) for all large n,

M_n p_{r_j} \ge \frac{n}{4b_n}\cdot 8\cdot2^{js}\frac{k}{n} = 2\cdot2^{js}\frac{k}{b_n}.

Therefore, for some universal constant c_0>0,

\mathbb P(R_{n,k}(x)>r_j) \le 4\exp \left(-c_0 2^{js}\frac{k}{b_n}\right) + 4M_n\bar\alpha_1.

Finally, using b_n\asymp \log n, \bar\alpha_1\le n^{-8}, and M_n\le n/(2b_n), we obtain 4M_n\bar\alpha_1 \le C n^{-7}, and then

\mathbb P(R_{n,k}(x)>r_j) \le 4\exp \left(-c_0\,2^{js}\frac{k}{\log n}\right) + C n^{-7},

after adjusting constants. This completes the proof.

Proof

Proof

QDR2

Let

r_* = \Big(\frac{8k}{c_- n}\Big)^{1/s}

and choose J_0 maximal such that 2^{J_0}r_* \le r_0. Since the support of \mu has diameter at most D, we have R_{n,k}(x)\le D almost surely.

We decompose the moment over

\{R_{n,k}(x)\le r_*\}, \quad \{2^j r_* < R_{n,k}(x)\le 2^{j+1}r_*\},\ 0\le j\le J_0-1, \quad \{R_{n,k}(x)>2^{J_0}r_*\},

and we obtain

\begin{aligned} \mathbb E[R_{n,k}(x)^p] &\le r_*^p + \sum_{j=0}^{J_0-1}(2^{j+1}r_*)^p\,\mathbb P(R_{n,k}(x)>2^j r_*) + D^p\,\mathbb P(R_{n,k}(x)>2^{J_0}r_*). \end{aligned}

We now apply Theorem 2. For every 0\le j\le J_0,

\mathbb P(R_{n,k}(x)>2^j r_*) \le 4\exp \Big(-c_0\,2^{js}\frac{k}{\log n}\Big)+Cn^{-7},

and then

\begin{aligned} \mathbb E[R_{n,k}(x)^p] &\le r_*^p + C r_*^p \sum_{j=0}^{J_0-1}2^{jp} \exp \Big(-c_0\,2^{js}\frac{k}{\log n}\Big) + C r_*^p n^{-7}\sum_{j=0}^{J_0-1}2^{jp} + C D^p n^{-7}. \end{aligned}

We now bound the three terms on the right-hand side. For the first term, since k\ge K_0\log n, the quantity k/\log n is bounded below by a positive constant. Therefore

\sum_{j=0}^{J_0-1}2^{jp} \exp \Big(-c_0\,2^{js}\frac{k}{\log n}\Big) \le \sum_{j\ge 0}2^{jp}e^{-c_1 2^{js}} <\infty

for some constant c_1>0. For the second term, since 2^{J_0}r_*\le r_0<2^{J_0+1}r_*, we have 2^{J_0}\asymp r_*^{-1}, where the constants depend only on r_0. Then

r_*^p\sum_{j=0}^{J_0-1}2^{jp} \le C r_*^p 2^{J_0 p} \le C,

and then

C r_*^p n^{-7}\sum_{j=0}^{J_0-1}2^{jp} \le C n^{-7},

which is negligible. The third term C D^p n^{-7} is negligible as well. Combining the above estimates yields

\mathbb E[R_{n,k}(x)^p] \le C r_*^p + C n^{-7} \le C r_*^p.

Since

r_*^p = \Big(\frac{8k}{c_- n}\Big)^{p/s} \asymp \Big(\frac{k}{n}\Big)^{p/s},

we obtain

\mathbb E[R_{n,k}(x)^p] \le C\Big(\frac{k}{n}\Big)^{p/s}.

This completes the proof.

Proof

Proof

JPN9

Let

r^- = \Big(\frac{k}{2c_+ n}\Big)^{1/s}.

By Assumption 3,

\mu(B(x,r^-)) \le c_+(r^-)^s = \frac{k}{2n}.

Therefore,

{\mathrm E}[N_n(x,r^-)] = n\,\mu(B(x,r^-)) \le k/2,

where,

N_n(x,r)=\sum_{i=1}^n \mathbf 1\{\|X_{n,i}-x\|\le r\}.

By Markov’s inequality,

{\mathrm P}\big(N_n(x,r^-)\ge k\big) \le \frac{{\mathrm E}[N_n(x,r^-)]}{k} \le \frac12,

and

R_{n,k}(x)>r^- \iff N_n(x,r^-)<k,

we have

{\mathrm P}\big(R_{n,k}(x)>r^-\big)\ge \frac12.

On the event \{R_{n,k}(x)>r^-\}, we have R_{n,k}(x)^p\ge (r^-)^p, and then

{\mathrm E}[R_{n,k}(x)^p] \ge (r^-)^p\,{\mathrm P}\big(R_{n,k}(x)>r^-\big) \ge \frac12\,(r^-)^p.

By the definition of r^-, we obtain

{\mathrm E}[R_{n,k}(x)^p] \ge \frac12\Big(\frac{k}{2c_+ n}\Big)^{p/s}.

The completes the proof.

Proof

Proof

W1RC

The conclusion follows directly by combining the upper and lower bounds established in Theorems 3 and 4.

Setup

Setup

J6L1

Experiment 1 uses interior query aggregation. For each MC replication, we sample

X_{\mathrm{eval}}\sim \mathrm{Unif}([0.01,0.99]^d),\qquad |X_{\mathrm{eval}}|=1000,

The number of NNs is chosen as k=\lfloor n^\beta\rceil with \beta on a 20-point grid in [0.1,0.9] for slope fitting. We also impose a cap for \frac{k}{n}\le 0.01.

Source and licence

The text on this page is from arXiv:2605.14343v1 by Yuanyuan Gao, Yilong Hou and Zhexiao Lin, under the licence CC BY 4.0. The corpus made these changes: it read the items out of the LaTeX source, it expanded the macros of the paper, it put each proof after its statement, and it converted the text to HTML. The formulas are the TeX of the paper, and KaTeX renders them. A formula or a reference can look different from the PDF. The page is published under CC BY 4.0.

The record of each item is in analysis/objects/2605/2605.14343.jsonl.