On Convergence of Nearest Neighbor Classifiers over Feature Transformations
Luka Rimanic, Cédric Renggli, Bo Li, Ce Zhang
Abstract
The k-Nearest Neighbors (kNN) classifier is a fundamental non-parametric machine learning algorithm. However, it is well known that it suffers from the curse of dimensionality, which is why in practice one often applies a kNN classifier on top of a (pre-trained) feature transformation. From a theoretical perspective, most, if not all theoretical results aimed at understanding the kNN classifier are derived for the raw feature space. This leads to an emerging gap between our theoretical understanding of kNN and its practical applications. In this paper, we take a first step towards bridging this gap. We provide a novel analysis on the convergence rates of a kNN classifier over transformed features. This analysis requires in-depth understanding of the properties that connect both the transformed space and the raw feature space. More precisely, we build our convergence bound upon two key properties of the transformed space: (1) safety -- how well can one recover the raw posterior from the transformed space, and (2) smoothness -- how complex this recovery function is. Based on our result, we are able to explain why some (pre-trained) feature transformations are better suited for a kNN classifier than other. We empirically validate that both properties have an impact on the kNN convergence on 30 feature transformations with 6 benchmark datasets spanning from the vision to the text domain.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Automatic Feasibility Study via Data Quality Analysis for ML: A Case-Study on Label Noise cites Nearest Neighbor Classifiers over Incomplete Information: From Certain Answers to Certain Predictions
- RAB: Provable Robustness Against Backdoor Attacks cites Nearest Neighbor Classifiers over Incomplete Information: From Certain Answers to Certain Predictions
Cited by top-tier papers3
- SHiFT: An Efficient, Flexible Search Engine for Transfer LearningCédric Renggli, Xiaozhe Yao, Luka Kolar, Luka Rimanic et al.VLDB 2023 · 8 citations
- Automatic Feasibility Study via Data Quality Analysis for ML: A Case-Study on Label NoiseCédric Renggli, Luka Rimanic, Luka Kolar, Wentao Wu et al.ICDE 2023 · 8 citations
- Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder PerspectiveSeungwook Han, Jinyeop Song, Jeff Gore, Pulkit AgrawalICML 2025
Builds on3
- Deep k-NN for Noisy LabelsDara Bahri, Heinrich Jiang, Maya R. GuptaICML 2020 · 90 citations
- Nearest Neighbor Classifiers over Incomplete Information: From Certain Answers to Certain PredictionsBojan Karlas, Peng Li, Renzhi Wu, Nezihe Merve Gürel et al.VLDB 2021 · 69 citations
- RAB: Provable Robustness Against Backdoor AttacksMaurice Weber, Xiaojun Xu, Bojan Karlas, Ce Zhang et al.S&P 2023
Related papers
- A Two-Stage Active Learning Algorithm for k-Nearest NeighborsNicholas Rittler, Kamalika ChaudhuriICML 2023 · 3 citations
- Efficient Classification with Adaptive KNNPuning Zhao, Lifeng LaiAAAI 2021 · 13 citations
- Extrapolation Towards Imaginary 0-Nearest Neighbour and Its Improved Convergence RateAkifumi Okuno, Hidetoshi ShimodairaNeurIPS 2020 · 2 citations
- Exact Robustness Certification of k-Nearest NeighborsFrancesco Ranzato, Ahmad Shakeel, Marco ZanellaCCS 2025
- kNN-CM: A Non-parametric Inference-Phase Adaptation of Parametric Text ClassifiersRishabh Bhardwaj, Yingting Li, Navonil Majumder, Bo Cheng et al.EMNLP Findings 2023
