atlas

Research map / Learning theory and algorithms / Prediction and decision losses

KNN Implementation Details Can Dramatically Change Performance: An Example from Cover Trees

NeurIPS 2026 · Learning theory and algorithms › Prediction and decision losses · approach: Approximate nearest neighbor indexing

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Re-implements cover trees in a unified Rust library (RUSTKNN) and shows that implementation details (query mode, base parameter, micro-optimizations, all-NN vs held-out evaluation) can change performance rankings substantially.

Problem

Exact k-nearest-neighbor search results and rankings depend on implementation details (query mode, base parameter, micro-optimizations, evaluation protocol) that are rarely reported, so cross-codebase comparisons confound algorithmic and implementation effects.

Approach

Build a single controlled Rust codebase implementing three cover tree construction variants and three query modes with feature-flag ablations of micro-optimizations, then measure how each factor changes runtime across k, datasets, and evaluation protocols using repeated independent allocations with bootstrap CIs.

Key results

Surprising findings

Limitations

Experimental setup

Datasets: iris wine glass bupa ionosphere pima optdigits pendigits letter corel covtype mnist

Benchmarks: all-nearest-neighbor query on 12 UCI/MNIST datasets held-out k-NN query scaling

Metrics: median query time (ms) with bootstrap 95% CI distance computation counts slowdown factor from ablation

Baselines: C++ cover tree reference (Beygelzimer et al.) mlpack cover tree single-tree mlpack cover tree dual-tree kiddo

Builds on: cover tree (Beygelzimer et al.) Izbicki and Shelton simplified and nearest ancestor cover trees dual-tree traversal (Curtin et al.)

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy