Motivation
Nonparametric regression estimates the regression function x↦E(Y∣X=x) from i.i.d. observations (X1,Y1),…,(Xn,Yn) without assuming a parametric form. The simplest such estimates are local averages: to predict at a point X, average the responses Yi of the sample points closest to X. Nearest neighbor rules of this kind go back to Fix and Hodges (1951) for classification and are still a standard baseline in statistics and machine learning.
Before 1977, consistency results for such estimates assumed regularity of the distribution of X: a density, continuity of the regression function, or bounded support. C. J. Stone's paper Consistent nonparametric regression (Ann. Statist. 5 (1977) 595–645) proved that suitable nearest neighbor estimates are consistent in Lr for every joint distribution of (X,Y) with E∣Y∣r<∞. This property, now called universal consistency, is the subject of the first chapters of Györfi, Kohler, Krzyżak and Walk, A Distribution-Free Theory of Nonparametric Regression (Springer, 2002), where Stone's theorem is the organising result.
This mission formalizes Theorem 2 of Stone's paper, the universal consistency of nearest neighbor weights. Mission I of the series formalizes the general criterion (Theorem 1) that the proof applies; mission III treats conditional quantiles.
Setting
Let X,X1,X2,… be i.i.d. random vectors in Rd with an arbitrary law μ. A weight function Wn assigns to the query point X and the sample numbers Wni(X)=Wni(X,X1,…,Xn), 1≤i≤n. It is a probability weight function if Wni≥0 and ∑iWni(X)=1. Given i.i.d. pairs (X,Y),(X1,Y1),… with Y real, the estimate of E(Y∣X) is
E^n(Y∣X)=i=1∑nWni(X)Yi.
The sequence {Wn} is consistent if, whenever the pairs are i.i.d. with the given law of X, r≥1 and E∣Y∣r<∞, one has E∣E^n(Y∣X)−E(Y∣X)∣r→0.
Scales and metrics. A scale is a nonnegative function snj=snj(X,X1,…,Xn), 1≤j≤d, and its pseudometric is
ρn(u,v)=(j:snj>0∑(snjuj−vj)2)1/2.
The choice snj≡1 gives the Euclidean metric; the sample standard deviations of the coordinates give a unit-free one. The sequence {sn} is regular (p. 599) with constants 0<a≤b if P(snj>0)→1 for every coordinate of X with a nondegenerate law, snj/snl is bounded in probability for any two such coordinates, and condition (7) holds: interchanging X and Xi changes snj by a factor in [a,b] whenever the jth coordinates of X1,…,Xn do not all coincide.
Nearest neighbor weights. Let cn1≥⋯≥cnn≥0 with ∑icni=1 and cni=0 for i>n. The weight of Xi is
Wni(X)=λcnν+⋯+cn,ν+λ−1,
where ν−1 is the number of other sample points strictly ρn-closer to X than Xi and λ−1 the number at the same distance: the kth closest point receives cnk, and tied points share the average of the coefficients of their ranks. The uniform k-NN rule is cni=1/k for i≤k.
Formalization targets
Goal: Theorem 2 (p. 600)
For every law μ of X and every regular sequence of scales,
nlimi>αn∑cni=0 (∀α>0)andnlimcn1=0⟹{Wn} is consistent.
Uniform, triangular and quadratic kn-NN weights with kn→∞, kn/n→0 satisfy both conditions (Corollary 3).
Milestones
- Corollary 1 (sufficiency), p. 598. Probability weights with E∑iWni(X)f(Xi)≤CEf(X) for some C≥1 and all nonnegative Borel f, with ∑iWni(X)I{∥Xi−X∥>a}→0 and maxiWni(X)→0 in probability, are consistent.
- Proposition 9, p. 611. For every δ>0, limα↓0limsupnP(maxi∈In,αn(X)∥Xi−X∥>δ)=0, where In,t(X) are the indices of the ⌊t⌋ nearest neighbors (with ties).
- Proposition 10, p. 613. For 0<a≤bj≤b, two vectors 0<∥u∥≤∥v∥ in a set V∈V(d,a/b) satisfy ∥v~∥>∥v~−u~∥ after rescaling u~j=bjuj, v~j=bjvj. Here V(d,c) is the family of sets in which any two nonzero vectors satisfy u⋅v>(1−c2/2)∥u∥∥v∥, and β(d,c) is the least number of members of V(d,c) covering Rd.
- Proposition 12, p. 613. For fixed points, the swapped weights Uni(X)=Wni(Xi,X1,…,X,…,Xn) satisfy ∑iUni(X)≤β(d,a/b).
- Proposition 11, p. 613. E∑iWni(X)f(Xi)≤β(d,a/b)Ef(X) for nonnegative Borel f with Ef(X)<∞.
Significance
Theorem 2 established that a local averaging estimate can be consistent with no assumption on the distribution of X beyond the moment condition on Y. The same argument, through Theorem 1, became the standard template for proving universal consistency of kernel, partitioning and nearest neighbor estimates, and of the classification rules derived from them (Devroye, Györfi and Lugosi, A Probabilistic Theory of Pattern Recognition, 1996). The constant β(d,a/b) of Proposition 11 is an early instance of the cone-covering bound on how many points can have a given point among their nearest neighbors, a lemma that reappears throughout nearest neighbor theory.
The result is proved (1977), and textbook proofs exist. Mathlib contains no formalization of Theorem 2, of Stone's criterion, or of the cone-covering lemma. A formal development would supply reusable infrastructure: nearest neighbor weights with averaged ties, the exchangeability argument behind Proposition 11, and Lr consistency of weighted averages for i.i.d. data encoded through kernels.
Difficulty
The obvious argument estimates E^n(Y∣X) by a continuity argument around X, which needs a density or continuity of E(Y∣X) and is unavailable here. The difficulty is condition (1) of Stone's criterion: a single sample point may be a nearest neighbor of many query points, so E∑iWni(X)f(Xi) is not obviously comparable to Ef(X) for arbitrary f and arbitrary μ (atoms, singular parts, unbounded support). The bound must hold uniformly in n and in the distribution, with a data-dependent metric whose scale changes when X and Xi are interchanged. Ties in ρn, which have positive probability when μ has atoms, must be handled by the averaged weights (8), not by an index tie-break.
Formalization scope
Points live in EuclideanSpace ℝ (Fin d). The i.i.d. sequence is the coordinate process of Measure.infinitePi, coordinate 0 being X; sample indices are 0-based, coefficients cn,m keep the paper's 1-based index. "Whenever the pairs are i.i.d." is encoded by quantifying over every Markov kernel κ (the conditional law of Y given X), with pairs distributed as (μ⊗κ)⊗N and E(Y∣X=x)=∫yκ(x,dy). Expectations of nonnegative quantities are lower Lebesgue integrals in [0,∞]; convergence in probability is TendstoInMeasure; limits of probabilities are taken in [0,∞].
Standing assumptions and additions, each disclosed in the item statements:
- the scales are regular (the standing assumption of §3, p. 599) and Borel measurable (added; the paper treats them as random variables);
- condition (7) is read for all points, as Proposition 12's proof uses it, and "do not coincide" means "are not all equal";
- "nondegenerate" means the coordinate's law is not a point mass; snj/snl is real division (0 where snl=0, an event of vanishing probability);
- Corollary 1's weights are assumed jointly Borel;
- Proposition 9's distance a is renamed δ, and the maximum over an empty index set is read as "no index";
- β(d,c) is an infimum over N; that a finite cover exists is part of the work, not an assumption.
No statement corrects the print.
The goal is stated as Lr consistency over all kernels and all r≥1, for an unrestricted law μ: it is not stated through Corollary 1's three conditions nor through β, and no density, moment or support hypothesis on X is present, so a proof cannot reduce to a special case.
A complete development needs: exchangeability of finite i.i.d. samples under the product measure, the finite cone cover of Rd, the strong law of large numbers (Proposition 9's proof), and Stone's criterion (mission I). Contributions proving any milestone, the cone-cover existence lemma, or the transfer of exchangeability through infinitePi are welcome.
Selected references
- C. J. Stone, Consistent nonparametric regression, Ann. Statist. 5(4) (1977) 595–645. https://doi.org/10.1214/aos/1176343886
- L. Györfi, M. Kohler, A. Krzyżak, H. Walk, A Distribution-Free Theory of Nonparametric Regression, Springer, 2002. https://doi.org/10.1007/b97848
- L. Devroye, L. Györfi, G. Lugosi, A Probabilistic Theory of Pattern Recognition, Springer, 1996. https://doi.org/10.1007/978-1-4612-0711-5
- E. Fix, J. L. Hodges, Discriminatory analysis. Nonparametric discrimination: consistency properties, USAF School of Aviation Medicine, Report 4, 1951; reprinted in Int. Stat. Rev. 57(3) (1989) 238–247. https://doi.org/10.2307/1403797