The $k$-nearest neighbors ($k$NN) algorithm is a cornerstone of non-parametric classification in artificial intelligence, yet its deployment in large-scale applications is persistently constrained by the computational trade-off between inference speed and accuracy. Existing approximate nearest neighbor solutions accelerate retrieval but often degrade classification precision and lack adaptability in selecting the optimal neighborhood size ($k$). Here, we present an adaptive graph model that decouples inference latency from computational complexity. By integrating a Hierarchical Navigable Small World (HNSW) graph with a pre-computed voting mechanism, our framework completely transfers the computational burden of neighbor selection and weighting to the training phase. Within this topological structure, higher graph layers enable rapid navigation, while lower layers encode precise, node-specific decision boundaries with adaptive neighbor counts. Benchmarking against eight state-of-the-art baselines across six diverse datasets, we demonstrate that this architecture significantly accelerates inference speeds, achieving real-time performance, without compromising classification accuracy. These findings offer a scalable, robust solution to the inherent inference bottleneck of $k$NN, laying an adaptive structural foundation for graph-based nonparametric learning.


翻译:$k$最近邻($k$NN)算法是人工智能中非参数分类的基石,然而其在大规模应用中的部署始终受到推理速度与精度之间计算权衡的限制。现有近似最近邻方法虽能加速检索,但常以分类精度下降为代价,且缺乏选择最优邻域大小($k$)的自适应能力。本文提出一种自适应图模型,将推理延迟与计算复杂度解耦。通过将分层可导航小世界(HNSW)图与预计算投票机制相整合,本框架将邻域选择及加权的计算负荷完全转移至训练阶段。在该拓扑结构中,高层图可实现快速导航,而低层图则通过自适应邻域数量编码精确的节点级决策边界。在六个不同数据集上与八种最先进基线方法的基准测试表明,本架构在保持分类精度的同时显著加速推理速度,实现了实时性能。这些发现为$k$NN固有的推理瓶颈提供了可扩展、鲁棒的解决方案,并为基于图的非参数学习奠定了自适应结构基础。

0
下载
关闭预览

相关内容

PyGDA代码库,快速入门图域自适应学习
专知会员服务
11+阅读 · 2025年7月17日
【NeurIPS2022】具有自适应读出的图神经网络
专知会员服务
19+阅读 · 2022年11月11日
专知会员服务
66+阅读 · 2021年7月25日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
基于TensorFlow和Keras的图像识别
Python程序员
16+阅读 · 2019年6月24日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员