# Evolutionary Adaptive Neighborhood Learning: A Genetic Algorithm for Instance-Dependent k Optimization in Nearest Neighbor Classification

DevFeed: [Evolutionary Adaptive Neighborhood Learning: A Genetic Algorithm for Instance-Dependent k Optimization in Nearest Neighbor Classification](<https://devfeed.tech/articles/evolutionary-adaptive-neighborhood-learning-a-genetic-algorithm-for-instance-dependent-k-optimization-in-nearest-neighbor-classification-120177.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.07257>)

Author: Isaac Touza, Kaladzavi Guidedi, Kolyang

Published: 2026-11-06T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Hyperparameter optimization](<https://devfeed.tech/topics/hyperparameter-optimization.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>)

Tags: [adaptive](<https://devfeed.tech/tags/adaptive.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [classification](<https://devfeed.tech/tags/classification.md>), [cross-validation](<https://devfeed.tech/tags/cross-validation.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [entropy](<https://devfeed.tech/tags/entropy.md>), [guarantees](<https://devfeed.tech/tags/guarantees.md>), [learning](<https://devfeed.tech/tags/learning.md>), [local](<https://devfeed.tech/tags/local.md>), [margin](<https://devfeed.tech/tags/margin.md>), [nearest-neighbor](<https://devfeed.tech/tags/nearest-neighbor.md>), [neighbours](<https://devfeed.tech/tags/neighbours.md>), [nested](<https://devfeed.tech/tags/nested.md>), [noise](<https://devfeed.tech/tags/noise.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [policy](<https://devfeed.tech/tags/policy.md>), [properties](<https://devfeed.tech/tags/properties.md>), [robustness](<https://devfeed.tech/tags/robustness.md>), [selection](<https://devfeed.tech/tags/selection.md>), [structure](<https://devfeed.tech/tags/structure.md>)

## AI overview

EANK replaces a single globally tuned k in k-nearest neighbor classification with an instance-dependent policy k(x), mapping local density, label entropy, vote margin, and concentration to neighborhood size. A real-coded elitist genetic algorithm optimizes the policy for leave-one-out accuracy with a neighborhood-smoothness penalty; precomputed neighbor votes reduce fitness evaluation costs. The abstract reports theoretical analysis of training-criterion dominance, convergence, policy regularity, and generalization. In experiments on synthetic data and twelve public datasets using nested cross-validation, EANK performs competitively against tuned global-k baselines and improves on default k=5. The excerpt gives no numerical results, so the size or consistency of these gains is unclear.

## Source excerpt

arXiv:2611.07257v1 Announce Type: cross Abstract: The number of neighbours k is the central hyperparameter of the k-nearest neighbour (k-NN) classifier and is usually selected globally through cross-validation or evolutionary search. However, the bias-variance trade-off is inherently local: dense and noise-free regions may favour small neighbourhoods, whereas sparse or noisy regions may require larger ones. Since global-k optimization is one-dimensional, replacing exhaustive search with a genetic algorithm offers little computational advantage. We therefore optimize an instance-dependent neighbourhood policy instead. We propose EANK (Evolutionary Adaptive Neighborhood K), which uses a low-dimensional policy to map local neighbourhood descriptors, including density, label entropy, vote margin, and concentration, to an adaptive number of neighbours k(x). A real-coded elitist genetic algorithm optimizes this policy using leave-one-out accuracy with a neighbourhood-smoothness penalty. Precomputed neighbour votes reduce fitness evaluation costs. We investigate theoretical properties of the method, including dominance over global-k solutions on the training criterion, evolutionary convergence, policy regularity, and generalization guarantees. Experiments on synthetic data with spatially heterogeneous structure and twelve public datasets evaluate predictive performance, robustness, and computational cost. Under nested cross-validation, EANK achieves competitive performance relative to tuned global-k baselines and improves upon the default k=5. We also examine the gap between training and test performance to assess the practical value of adaptive neighbourhood selection.