Explaining the Success of Nearest Neighbor Methods in Prediction
George H. Chen, Devavrat Shah
TL;DR
This work synthesizes theory and practice around nearest neighbor prediction by deriving nonasymptotic guarantees for k-NN, fixed-radius NN, and kernel regression/classification in general metric spaces, anchored by smoothness or Besicovitch-type conditions. It shows how clustering structure enables reliable prediction in diverse tasks like time series forecasting, online collaborative filtering, and patch-based image segmentation, and it connects these guarantees to practical approximate NN methods and distance learning. The monograph also details plug-in classification via regression estimators, explores adaptive neighbor and bandwidth selection, and presents three contemporary applications with concrete nonasymptotic bounds and empirical validation. Overall, it provides a cohesive framework linking theory, scalable computation, and interpretability of NN-based prediction across domains.
Abstract
Many modern methods for prediction leverage nearest neighbor search to find past training examples most similar to a test example, an idea that dates back in text to at least the 11th century and has stood the test of time. This monograph aims to explain the success of these methods, both in theory, for which we cover foundational nonasymptotic statistical guarantees on nearest-neighbor-based regression and classification, and in practice, for which we gather prominent methods for approximate nearest neighbor search that have been essential to scaling prediction systems reliant on nearest neighbor analysis to handle massive datasets. Furthermore, we discuss connections to learning distances for use with nearest neighbor methods, including how random decision trees and ensemble methods learn nearest neighbor structure, as well as recent developments in crowdsourcing and graphons. In terms of theory, our focus is on nonasymptotic statistical guarantees, which we state in the form of how many training data and what algorithm parameters ensure that a nearest neighbor prediction method achieves a user-specified error tolerance. We begin with the most general of such results for nearest neighbor and related kernel regression and classification in general metric spaces. In such settings in which we assume very little structure, what enables successful prediction is smoothness in the function being estimated for regression, and a low probability of landing near the decision boundary for classification. In practice, these conditions could be difficult to verify for a real dataset. We then cover recent guarantees on nearest neighbor prediction in the three case studies of time series forecasting, recommending products to people over time, and delineating human organs in medical images by looking at image patches. In these case studies, clustering structure enables successful prediction.
