Performance optimization for the k-nearest neighbors kernel on x86 architectures
Authors:
Open Access
- 15 November 2015
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1-12
Abstract
Nearest neighbor search is a cornerstone problem in computational geometry, non-parametric statistics, and machine learning. For N points, exhaustive search requires quadratic work, but many fast algorithms reduce the complexity for exact and approximate searches. The common kernel (kNN kernel) in all these algorithms solves many small-size problems exactly using exhaustive search. We propose an efficient implementation and performance analysis for the kNN kernel on x86 architectures. By fusing the distance calculation with the neighbor selection, we are able to utilize memory throughput. We present an analysis of the algorithm and explain parameter selection. We perform an experimental study varying the size of the problem, the dimension of the dataset, and the number of nearest neighbors. Overall we observe significant speedups. For example, when searching for 16 neighbors in a point dataset with 1.6 million points in 64 dimensions, our kernel is over 4 times faster than existing methods.Keywords
Funding Information
- National Science Foundation (CCF-1337393, OCI-1029022, CCF-1218483, CCF-1320112)
- National Institute for Health Research (10042242)
- Air Force Office of Scientific Research (FA9550-11-10339, FA9550-11-10339)
- U.S. Department of Energy (DE-SC0010518, DE-SC0009286, DE- FG02-08ER2585)
This publication has 20 references indexed in Scilit:
- Scalable Nearest Neighbor Algorithms for High Dimensional DataIEEE Transactions on Pattern Analysis and Machine Intelligence, 2014
- A Back-to-Basics Empirical Study of Priority Queues2013
- Randomized approximate nearest neighbors algorithmProceedings of the National Academy of Sciences, 2011
- Anatomy of high-performance matrix multiplicationACM Transactions on Mathematical Software, 2008
- Near-optimal hashing algorithms for approximate nearest neighbor in high dimensionsCommunications of the ACM, 2008
- The influence of caches on the performance of heapsACM Journal of Experimental Algorithmics, 1996
- A set of level 3 basic linear algebra subprogramsACM Transactions on Mathematical Software, 1990
- Bounds for Certain Multiprocessing AnomaliesBell System Technical Journal, 1966
- Algorithm 245: TreesortCommunications of the ACM, 1964
- Algorithm 64: QuicksortCommunications of the ACM, 1961