Benefit of Interpolation in Nearest Neighbor Algorithms

Yue Xing, Qifan Song, Guang Cheng

Abstract

Classical machine learning theory warns that "interpolating" (perfectly fitting) noisy training data leads to poor generalization. This paper challenges this conventional wisdom in the context of Nearest Neighbor (NN) algorithms. By introducing a weighted "interpolated-NN" variant, the authors prove that a mild degree of interpolation actually improves predictive performance and stability. Through rigorous statistical analysis and empirical validation across multiple datasets, the study demonstrates that interpolation can better balance the trade-off between bias and variance, offering a non-parametric perspective on the "double descent" phenomenon observed in deep learning.

The Challenge to Classical Wisdom

In contemporary machine learning, researchers have observed a puzzling phenomenon known as "double descent." Contrary to classical statistical intuition—which suggests that increasing model complexity beyond a certain point leads to overfitting—models that are large enough to perfectly fit every training point (interpolation) often perform better on new data than smaller, regularized models.

The double descent phenomenon illustrates how risk decreases in the overparameterized interpolating regime after an initial peak at the interpolation threshold.

While deep neural networks are often viewed as "black boxes," making this phenomenon difficult to parse, the $k$-Nearest Neighbor ($k$-NN) algorithm is mathematically transparent. This paper seeks to quantify the "blessing of interpolation" in this simpler setting to determine if interpolation is inherently beneficial and to identify the optimal level of fitting.

Methodology: The Interpolated-NN

The authors introduce a variant called interpolated-NN. Unlike a standard $k$-NN, which takes a uniform average of the $k$ closest neighbors, the interpolated-NN assigns weights based on distance:

$$W_i \propto (R_i / R_{k+1})^{-\gamma}$$

In this formula, $R_i$ represents the distance to the $i$-th neighbor, and $\gamma$ is the interpolation level.

  • When $\gamma = 0$, the model behaves like a standard, uniformly weighted $k$-NN.
  • As $\gamma \to \infty$, the algorithm concentrates all weight on the single nearest neighbor (1-NN), achieving perfect interpolation of the training data.

Using Taylor expansions of risk and "tube theory" for classification, the researchers decomposed the error into bias and variance components to observe how performance shifts as $\gamma$ varies.

Theoretical Insights: The U-Shaped Curve

The most significant theoretical finding is that the relationship between the interpolation level ($\gamma$) and the error rate follows a U-shaped curve. This implies that there is an optimal, non-zero level of interpolation that consistently outperforms the standard, non-interpolated $k$-NN.

The relationship between interpolation level and testing error (performance) is U-shaped, showing that an optimal interpolated-NN outperforms the standard kNN (γ=0).

This performance boost is explained by a "bias-variance free lunch": near $\gamma = 0$, increasing interpolation reduces the model's bias linearly while only increasing its variance quadratically. Consequently, the initial drop in bias outweighs the rise in variance, leading to a net improvement in generalization. However, this benefit is subject to the "curse of dimensionality"; in very high-dimensional spaces, points become equidistant, causing the weights to flatten and the interpolation benefit to diminish.

Empirical Results

The paper validates these findings using five real-world datasets, including HTRU2 (pulsar classification), Abalone (age prediction), and MNIST (handwritten digits). Across all datasets, the optimal $\gamma$ resulted in a lower error rate than the standard $\gamma=0$ approach:

  • MNIST: The error rate dropped from 4.97% (standard $k$-NN) to 4.66% at the optimal interpolation level.
  • Digit Dataset: Error rates were reduced from 1.75% to 1.54%.
  • Stability: The study proves that interpolated-NN is statistically stable, meaning its predictions do not fluctuate wildly when trained on different samples from the same population.

Conclusion and Future Directions

While interpolation acts as a stabilizer against random noise, it does introduce a trade-off regarding security. The "spiky" decision boundaries of interpolated models make them more vulnerable to "white-box" adversarial attacks, even as they improve generalization in natural settings.

Ultimately, these insights into the bias-variance balance of interpolation provide a clearer window into the mechanisms of modern machine learning. By understanding how simple algorithms like $k$-NN benefit from interpolation, researchers can better design and interpret more complex architectures like deep neural networks.

Summary updated

BibTeX
@article{xing2022benefit,
  author = {Yue Xing and Qifan Song and Guang Cheng},
  title = {{Benefit of Interpolation in Nearest Neighbor Algorithms}},
  journal = {SIAM J. Math. Data Sci.},
  year = {2022},
  doi = {10.1137/21m1437457},
}
Figure