NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient Bregman Range Search

Lawrence CaytonNeurIPS 2009

Introduction

Range search—the process of finding all points in a database within a specific distance of a query—is a cornerstone of machine learning. It powers essential tasks ranging from kernel density estimation to outlier detection. Traditionally, these searches are accelerated using spatial data structures like KD-trees or metric trees. These structures rely heavily on the triangle inequality to "prune" or skip large sections of the search space that are mathematically guaranteed to be too far away.

However, many important measures of dissimilarity in machine learning are not true metrics. For instance, Kullback-Leibler (KL) divergence (used for comparing probability distributions) and Itakura-Saito divergence are Bregman divergences. They are often asymmetric and, crucially, do not satisfy the triangle inequality. This mathematical reality invalidates traditional pruning techniques, historically forcing researchers to rely on slow, brute-force linear scans for non-metric data.

This paper introduces the first efficient algorithm for range search using Bregman divergences. By leveraging unique geometric properties to solve non-convex optimization problems via simple 1D line searches, the authors achieve up to two orders of magnitude speedup over brute-force search.

Methods: The Bregman Ball Tree

To solve the non-metric search problem, the authors propose an algorithm based on the Bregman Ball Tree (BB-tree). This is a hierarchical binary tree where each node represents a "Bregman ball"—a set of points within a certain divergence from a center point.

The core technical challenge is determining when a node in the tree can be safely pruned. There are two primary scenarios:

  1. Exclusion Pruning: The node's ball and the query ball are completely disjoint. No points in this branch are relevant to the query, so the entire branch can be skipped.
  2. Inclusion Pruning: The node's ball is entirely contained within the query ball. All points in this branch are relevant, allowing the algorithm to return them all at once without calculating individual distances.
Exclusion and Inclusion Pruning

In standard metric spaces, checking for these conditions is straightforward. In Bregman spaces, however, checking containment is a non-convex optimization problem, which is typically computationally expensive. The paper’s breakthrough is proving that the optimal solution to this non-convex problem actually lies on a specific 1D "dual curve" connecting the centers of the two balls. This insight allows the algorithm to replace a complex multi-dimensional optimization with a lightning-fast 1D line search (using Newton’s or the secant method).

Key Insights

  • Geometry over Algebra: While Bregman divergences lack the algebraic convenience of the triangle inequality, they possess a rich "dual" geometry. The realization that the "furthest point" in a Bregman ball lies on a predictable path (the dual curve) is the key to making range search tractable.
  • The Power of Inclusion: Unlike Nearest Neighbor search, which primarily uses exclusion pruning, range search benefits immensely from inclusion pruning. If a whole cluster of points falls within the query radius, the BB-tree can grab them all simultaneously.
  • Handling Asymmetry: The algorithm natively accounts for the fact that $d_f(x, y) \neq d_f(y, x)$, a common property of KL-divergence that breaks most traditional search algorithms.

Experimental Results

The algorithm was evaluated on several high-dimensional datasets, primarily focused on text and image histograms where KL-divergence is standard (e.g., PubMed abstracts, Reuters RCV1 corpus, and Corel image histograms, with dimensions ranging from $D=4$ to $371$).

  • Exact Search Speedups: On the PubMed datasets, the BB-tree algorithm consistently outperformed brute force by 10x to 100x (one to two orders of magnitude).
  • Approximate Search: By allowing the search to stop early—sacrificing a small amount of recall for speed—the authors demonstrated massive speedups of up to four orders of magnitude ($10,000\times$) while maintaining high accuracy.
  • Dimensionality Impact: As expected, performance degrades as dimensionality increases due to the "curse of dimensionality." For very high-dimensional, small datasets (like the 371-D Semantic Space), the overhead of maintaining the tree meant it performed roughly equal to or slightly slower than brute force.

Limitations and Future Work

Like all tree-based spatial structures, the BB-tree struggles as the number of dimensions grows relative to the number of data points. Additionally, for KL-divergence, the math becomes complex if a Bregman ball crosses a domain boundary where a coordinate becomes zero. While rare in practice, this requires disabling inclusion pruning for those specific nodes.

Looking forward, the authors suggest that extending this approach to "dual-tree" algorithms—where both the query set and the database are structured in trees—could unlock even greater efficiencies for large-scale tasks like all-nearest-neighbors or kernel density estimation.

Summary updated

BibTeX
@inproceedings{cayton2009efficient,
  author = {Lawrence Cayton},
  title = {{Efficient Bregman Range Search}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2009},
}
Figure