Skip to main content
QUICK REVIEW

[Paper Review] A Bayes consistent 1-NN classifier

Aryeh Kontorovich, Roi Weiss|arXiv (Cornell University)|Jul 1, 2014
Machine Learning and AlgorithmsComputer Science6 citations
TL;DR

This paper proposes a margin-regularized 1-Nearest Neighbor (1-NN) classifier that achieves strong Bayes consistency, a property previously only attainable with $k$-NN when $k$ grows with sample size. By selecting a sub-sample $S^*(\gamma_n^*)$ that balances empirical error and margin, the method ensures almost sure convergence to the Bayes-optimal error rate, offering superior computational efficiency and finite-sample error bounds over traditional $k$-NN.

ABSTRACT

We show that a simple modification of the 1-nearest neighbor classifier yields a strongly Bayes consistent learner. Prior to this work, the only strongly Bayes consistent proximity-based method was the k-nearest neighbor classifier, for k growing appropriately with sample size. We will argue that a margin-regularized 1-NN enjoys considerable statistical and algorithmic advantages over the k-NN classifier. These include user-friendly finite-sample error bounds, as well as time- and memory-efficient learning and test-point evaluation algorithms with a principled speed-accuracy tradeoff. Encouraging empirical results are reported.

Motivation & Objective

  • To address the long-standing gap in Bayes consistency for efficient 1-NN classifiers, which are otherwise inconsistent despite strong practical performance.
  • To develop a 1-NN method that achieves strong Bayes consistency without requiring $k \to \infty$, unlike standard $k$-NN.
  • To provide a user-friendly, finite-sample generalization error bound for 1-NN, a missing feature in existing $k$-NN theory.
  • To enable efficient learning and inference via a principled speed-accuracy tradeoff through margin-based sub-sampling.
  • To establish theoretical guarantees for a computationally efficient 1-NN classifier that matches the consistency of $k$-NN with better algorithmic properties.

Proposed method

  • The method introduces an $(\varepsilon, \gamma)$-separable sub-sample $\tilde{S} \subset S$, where $\varepsilon$ bounds the empirical error and $\gamma$ enforces a minimum distance between opposite-labeled points.
  • It defines $\varepsilon^*(\gamma)$ as the minimal feasible empirical error for a given margin $\gamma$, and selects $\gamma_n^*$ to minimize a generalization error bound of the form $\mathsf{gen\text{-}err}_n(\varepsilon, \gamma) \leq \mathsf{empirical}_n(\varepsilon, \gamma) + \mathsf{complexity}_n(\gamma)$.
  • The classifier is induced by $S^*(\gamma_n^*)$, the $\varepsilon^*(\gamma_n^*)$-consistent, $\gamma_n^*$-separable sub-sample of the training data.
  • Theoretical analysis leverages metric measure space properties: completeness, doubling property, and regularity of the Borel measure to ensure convergence.
  • The approach builds on prior work (Gottlieb et al., 2010, 2018) but extends it by proving strong Bayes consistency for the 1-NN classifier under this sub-sampling scheme.
  • The proof relies on pointwise convergence of empirical risk to true risk and the use of Lebesgue’s dominated convergence theorem in the limit.

Experimental results

Research questions

  • RQ1Can a 1-NN classifier be made strongly Bayes consistent without requiring $k \to \infty$?
  • RQ2Can a margin-regularized 1-NN achieve finite-sample generalization bounds that are both usable and computable from the training sample?
  • RQ3Does a sub-sampling strategy based on margin and empirical error yield a classifier with better computational efficiency and accuracy tradeoffs than $k$-NN?
  • RQ4Is there a principled way to select a sub-sample that ensures convergence to the Bayes-optimal error rate in the 1-NN setting?
  • RQ5Can the theoretical guarantees of $k$-NN be extended to a 1-NN classifier with comparable or better algorithmic efficiency?

Key findings

  • The 1-NN classifier induced by $S^*(\gamma_n^*)$ is strongly Bayes consistent, meaning its error probability converges almost surely to the Bayes-optimal risk $R^*$ as $n \to \infty$.
  • The method achieves this consistency through a margin-regularized sub-sampling procedure that balances empirical error and margin, avoiding the need for $k \to \infty$.
  • Finite-sample generalization bounds are provided in the form $\mathsf{gen\text{-}err}_n(\varepsilon, \gamma) \leq \mathsf{empirical}_n(\varepsilon, \gamma) + \mathsf{complexity}_n(\gamma)$, which are computable from the observed sample.
  • The algorithmic efficiency is significantly improved: both training and inference are faster and require less memory than $k$-NN, especially for large $n$, due to sub-sampling and efficient search.
  • The approach provides a principled speed-accuracy tradeoff, with the margin $\gamma$ controlling the balance between accuracy and computational cost.
  • Empirical results demonstrate competitive performance, validating the theoretical claims and suggesting practical advantages over $k$-NN in real-world settings.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.