English

Parallel Nearest Neighbors in Low Dimensions with Batch Updates

Data Structures and Algorithms 2021-11-09 v1 Computational Geometry

Abstract

We present a set of parallel algorithms for computing exact k-nearest neighbors in low dimensions. Many k-nearest neighbor algorithms use either a kd-tree or the Morton ordering of the point set; our algorithms combine these approaches using a data structure we call the \textit{zd-tree}. We show that this combination is both theoretically efficient under common assumptions, and fast in practice. For point sets of size nn with bounded expansion constant and bounded ratio, the zd-tree can be built in O(n)O(n) work with O(nϵ)O(n^{\epsilon}) span for constant ϵ<1\epsilon<1, and searching for the kk-nearest neighbors of a point takes expected O(klogk)O(k\log k) time. We benchmark our k-nearest neighbor algorithms against existing parallel k-nearest neighbor algorithms, showing that our implementations are generally faster than the state of the art as well as achieving 75x speedup on 144 hyperthreads. Furthermore, the zd-tree supports parallel batch-dynamic insertions and deletions; to our knowledge, it is the first k-nearest neighbor data structure to support such updates. On point sets with bounded expansion constant and bounded ratio, a batch-dynamic update of size kk requires O(klogn/k)O(k \log n/k) work with O(kϵ+polylog(n))O(k^{\epsilon} + \text{polylog}(n)) span.

Keywords

Cite

@article{arxiv.2111.04182,
  title  = {Parallel Nearest Neighbors in Low Dimensions with Batch Updates},
  author = {Magdalen Dobson and Guy Blelloch},
  journal= {arXiv preprint arXiv:2111.04182},
  year   = {2021}
}
R2 v1 2026-06-24T07:29:41.372Z