Journal article
Title:
Accelerating k-Nearest Neighbors Search with GPU-Based Top-k Selection
Publication:
Journal of Parallel and Distributed Computing
220
Year:
2027
Abstract:
The k-Nearest Neighbors (kNN) algorithm is a fundamental tool in many fields, such as machine learning, data science, recommendation systems, and computer vision. In many applications, the algorithm processes multiple queries over large datasets while speed is of the essence. In this paper, we present a study of state-of-the-art GPU-accelerated solutions for the top-k selection phase of the algorithm in the multi-query setting. We propose a novel solution for on-the-fly single-pass top-k selection that builds upon the existing work. Our solution’s CUDA implementation is available in an open-source repository. We conducted extensive experiments comparing the solutions and our proposed optimizations on contemporary high-end GPUs. The evaluation shows a mean 2.1 × speedup and a peak 2.9 × speedup compared to the best-performing state-of-the-art solution for each problem instance. The solution achieves peak throughput over 87% of the theoretical maximum based on the memory bandwidth of the GPU. For low-dimensional data and small k values, we also provide a fused top-k selection and distance computation solution that further improves the performance on these problem instances.
BibTeX:
@article{hanak_accelerating_2027,
title = {{Accelerating k-Nearest Neighbors Search with GPU-Based Top-k Selection}},
author = {Hanák, Drahomír and Klepl, Jiří and Šmelko, Adam and Kruliš, Martin},
year = {2027},
journal = {{Journal of Parallel and Distributed Computing}},
doi = {10.1016/j.jpdc.2026.105384},
issn = {0743-7315},
pages = {105384},
url = {https://www.sciencedirect.com/science/article/pii/S0743731526001620},
volume = {220},
}