A Generalization of the Nearest-Neighbor Classifier and its Associated Kernel
Year: 2026
Type: preprint
Abstract: A Classification neural network is actually a regressor fitted to a piecewise-constant function, the classification itself being performed by a nearest-neighbor classifier acting on the network output. Hence, classifying a sample among p classes with a neural network is a two-step procedure: first, the network transforms the sample into a p-dimensional vector, then the vector is associated with a class according to the closest canonical basis vector in dimension p (we call "targets" the basis vectors). In this procedure, the transform is learnable and the targets are fixed. We propose a simple classifier following the same "transform-then-classify-by-nearest-neighbor" approach, but where the transform is almost fixed and the targets are learnable. We show that this classifier is a generalization of the weighted nearest-neighbor classifier, and that its transform can be a good option to define a classification kernel. Although not tailored to compete with neural networks, it seems to perform similarly to standard classifiers such as Random Forest and Support Vector Machines, and, due to its simplicity and to it having only one hyperparameter, it can be useful when computational power is limited.
Source: HAL
Author: Debreuve, Eric
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7204674569
