Asymptotic Slowing Down of the Nearest-Neighbor Classifier

Robert R. Snapp, Demetri Psaltis, Santosh S. VenkateshNeurIPS 1990

This classic paper from the early 1990s provides a rigorous mathematical foundation for one of the most infamous hurdles in machine learning: the Curse of Dimensionality. While practitioners intuitively understand that high-dimensional data is inherently more difficult to model, Snapp, Psaltis, and Venkatesh quantify exactly how much harder it gets for one of the simplest and most popular algorithms—the Nearest-Neighbor (NN) classifier.

In short, the authors prove that the error rate of a nearest-neighbor classifier converges to its infinite-data limit at a rate of $M^{-2/n}$, where $M$ is the number of training samples and $n$ is the number of dimensions. As features are added, the amount of data required to maintain accuracy grows exponentially, providing an analytic validation of Bellman’s "curse of dimensionality."

The Finite Data Dilemma in Nearest-Neighbor Classification

The Nearest-Neighbor classifier is beloved for its simplicity: to classify a new point, the algorithm simply finds the closest labeled point in the training set and assigns its label.

Nearest-neighbor decision boundaries partitioning a 2D feature space.

Since the 1960s, thanks to foundational work by Cover and Hart, it has been known that with infinite data, this simple strategy is remarkably effective. Its error is at most twice that of the theoretical "perfect" Bayes classifier. However, real-world applications are constrained by finite data. The burning question for engineers is: How much data ($M$) is actually needed to approach that optimal asymptotic performance?

Previous work demonstrated that in a simple one-dimensional world ($n=1$), the error drops rapidly as data is added. But as models move into high-dimensional feature spaces—such as images or genomic sequences—the "proximity" between points becomes a less reliable measure of similarity. This paper seeks to quantify exactly how the dimensionality of the space "slows down" the learning process.

Quantifying the Curse: The $M^{-2/n}$ Rule

The authors utilize an asymptotic expansion to analyze the probability of error. They assume the data follows a probability distribution that satisfies a "weak smoothness criterion" (essentially, ensuring the class-conditional densities do not exhibit wild, infinite jumps).

The core of their contribution is Theorem 3, which derives the first two terms of the asymptotic expansion for the probability of error, $P_M(\text{error})$:

$$P_M(\text{error}) \approx P_\infty(\text{error}) + \frac{a}{M^{2/n}}$$

Here, $P_\infty$ represents the baseline error with infinite data, and $a$ is a constant dependent on the degree of overlap between different classes. The critical insight of this result lies in the exponent: $2/n$.

The Universal Exponent and Exponential Explosion

While the constant $a$ fluctuates depending on the specific data distribution, the rate of convergence is overwhelmingly dominated by $M^{-2/n}$. This exponent is largely "distribution-free," meaning the slowing down is a fundamental property of the geometry of high-dimensional space, rather than a quirk of specific datasets.

To keep the error below a certain threshold $\delta$, the required sample size $M$ must be proportional to $(1/\delta)^{n/2}$. Consequently, doubling the dimensions does not merely require double the data; it demands orders of magnitude more. In high dimensions, "nearest" neighbors are rarely actually "near," rendering proximity an increasingly ineffective measure of class identity as $n$ grows.

Empirical Validation

While the paper is heavily grounded in mathematical proofs, the authors included numerical experiments to test their theory against cases that technically violate their strict smoothness assumptions (such as normal distributions, which are not strictly "bounded away from zero").

They generated synthetic data for two classes in $n$-dimensional space ($R^n$), both following Gaussian distributions with different means. Testing dimensions $n=1$ through $n=5$ with reference patterns $M$ ranging from 1 to 200, they ran over 160,000 Bernoulli trials per data point to ensure accurate estimates.

Log-log plot of the error gap versus sample size $M$ for dimensions $n=1$ through $n=5$.

The numerical experiments perfectly matched the theoretical power law. When plotting the log of the error gap against $\log_{10}(M)$, the results formed straight lines with slopes corresponding exactly to $-2/n$:

  • For $n=1$, the error decreases as $1/M^2$ (a very fast convergence).
  • For $n=5$, the error decreases as $1/M^{0.4}$ (a painfully slow convergence).

This confirmed that their asymptotic formula is a robust predictor of performance even for common, unbounded distributions like Gaussians.

Broader Implications and Limitations

Neural Network Implications: The authors argue that because neural networks often rely on smooth input-output responses—effectively utilizing proximity in feature space—they likely face these exact same scaling challenges. Unless specific architectures are used that exploit prior knowledge to reduce the effective dimensionality, neural networks cannot easily escape this curse.

The "Curse" vs. "Capacity": The authors note a tension between their results and Computational Learning Theory. Some theories suggest that a network with a fixed "capacity" might not need exponential data. However, the authors counter that finding the right parameters for such a network without prior information effectively turns it back into a non-parametric problem, subjecting it once again to the curse of dimensionality.

The Necessity of Feature Selection: Ultimately, the paper concludes that the only reliable way to beat this asymptotic slowing down is to use prior information to select a smaller number of truly descriptive features. Throwing every possible variable into a model without feature selection is a mathematically proven recipe for diminishing returns.

Summary updated

BibTeX
@inproceedings{snapp1990asymptotic,
  author = {Robert R. Snapp and Demetri Psaltis and Santosh S. Venkatesh},
  title = {{Asymptotic Slowing Down of the Nearest-Neighbor Classifier}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {1990},
  url = {https://openreview.net/forum?id=r14OAdW_WH},
}
Figure