论文

EANK:用遗传算法为每个样本自适应选择 kNN 的 k 值

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

精选理由

一篇改进 kNN 的小论文:不再全局定一个 k,而是用遗传算法学出按每个样本自适应选 k 的策略,还附了 12 个数据集的实验和泛化证明。

论文提出 EANK(Evolutionary Adaptive Neighborhood K),针对 k-NN 分类器中 k 值通常全局固定的问题,改为按样本点自适应选择。方法用密度、标签熵、投票边际、集中度等局部描述子,通过低维策略映射出每个样本的 k(x),再由实数编码精英遗传算法以留一法准确率加邻域平滑惩罚来优化该策略。理论部分证明了该方法在训练准则上对全局 k 方案的支配性、进化收敛性和泛化保证。在合成数据与 12 个公开数据集的嵌套交叉验证实验中,EANK 表现与调优后的全局 k 基线相当,并优于默认的 k=5。

原文 · arXiv cs.AI

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

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.