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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6a98c0b0-919c-431d-a298-7e77af67196aCited 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
- Beyond In-Domain Scenarios: Robust Density-Aware CalibrationChristian Tomani, Futa Kai Waseda, Yuesong Shen, Daniel CremersICML 2023 · 16 citations
