DEANN: Speeding up Kernel-Density Estimation using Approximate Nearest Neighbor Search

Matti Karppa, Martin Aumüller, Rasmus Pagh
7/6/2021
cs.DScs.LG

Official code: mkarppa/deann (16 stars, C++, MIT, last commit 2023-12-20).

Abstract

Kernel Density Estimation (KDE) is a nonparametric method for estimating the shape of a density function, given a set of samples from the distribution. Recently, locality-sensitive hashing, originally proposed as a tool for nearest neighbor search, has been shown to enable fast KDE data structures.

Show full abstract

However, these approaches do not take advantage of the many other advances that have been made in algorithms for nearest neighbor algorithms. We present an algorithm called Density Estimation from Approximate Nearest Neighbors (DEANN) where we apply Approximate Nearest Neighbor (ANN) algorithms as a black box subroutine to compute an unbiased KDE. The idea is to find points that have a large contribution to the KDE using ANN, compute their contribution exactly, and approximate the remainder with Random Sampling (RS). We present a theoretical argument that supports the idea that an ANN subroutine can speed up the evaluation. Furthermore, we provide a C++ implementation with a Python interface that can make use of an arbitrary ANN implementation as a subroutine for kernel density estimation. We show empirically that our implementation outperforms state of the art implementations in all high dimensional datasets we considered, and matches the performance of RS in cases where the ANN yield no gains in performance.

View on arXivView PDF

Code Implementations(1)

mkarppa/deannOfficial100%
MIT

Density Estimation from Approximate Nearest Neighbors

162C++, PythonJun 14, 20212 years agoMIT

Similar Papers

Cite this paper

@article{karppa2021deann,
  title  = {DEANN: Speeding up Kernel-Density Estimation using Approximate Nearest Neighbor Search},
  author = {Matti Karppa and Martin Aumüller and Rasmus Pagh},
  year   = {2021},
  eprint = {2107.02736},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2107.02736}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2107.02736.svg)](https://codeofpaper.com/paper/2107.02736)

Discussion