Fast Single-Core K-Nearest Neighbor Graph Computation

12/13/2021
by   Dan Kluser, et al.
0

Fast and reliable K-Nearest Neighbor Graph algorithms are more important than ever due to their widespread use in many data processing techniques. This paper presents a runtime optimized C implementation of the heuristic "NN-Descent" algorithm by Wei Dong et al. for the l2-distance metric. Various implementation optimizations are explained which improve performance for low-dimensional as well as high dimensional datasets. Optimizations to speed up the selection of which datapoint pairs to evaluate the distance for are primarily impactful for low-dimensional datasets. A heuristic which exploits the iterative nature of NN-Descent to reorder data in memory is presented which enables better use of locality and thereby improves the runtime. The restriction to the l2-distance metric allows for the use of blocked distance evaluations which significantly increase performance for high dimensional datasets. In combination the optimizations yield an implementation which significantly outperforms a widely used implementation of NN-Descent on all considered datasets. For instance, the runtime on the popular MNIST handwritten digits dataset is halved.

READ FULL TEXT
research
02/24/2023

Graph Laplacians on Shared Nearest Neighbor graphs and graph Laplacians on k-Nearest Neighbor graphs having the same limit

A Shared Nearest Neighbor (SNN) graph is a type of graph construction us...
research
03/29/2021

Large-Scale Approximate k-NN Graph Construction on GPU

k-nearest neighbor graph is a key data structure in many disciplines suc...
research
06/24/2007

Metric Embedding for Nearest Neighbor Classification

The distance metric plays an important role in nearest neighbor (NN) cla...
research
05/16/2019

Derived Codebooks for High-Accuracy Nearest Neighbor Search

High-dimensional Nearest Neighbor (NN) search is central in multimedia s...
research
09/18/2018

MNIST Dataset Classification Utilizing k-NN Classifier with Modified Sliding Window Metric

This paper evaluates the performance of the K-nearest neighbor classific...
research
04/03/2019

SANNS: Scaling Up Secure Approximate k-Nearest Neighbors Search

We present new secure protocols for approximate k-nearest neighbor searc...

Please sign up or login with your details

Forgot password? Click here to reset