Improving Adaptable Similarity Query Processing by Using Approximations

Mihael Ankerst, Bernhard Braunmüller, Hans-Peter Kriegel, Thomas Seidl

Abstract

Similarity search in high-dimensional spaces often employs quadratic form distance functions to account for feature correlations. However, these functions are computationally expensive, creating a significant CPU bottleneck. This paper proposes a high-performance framework that utilizes computationally efficient geometric approximations—such as Minimum Bounding Boxes (MBB) and Minimum Bounding Spheres (MBS)—to filter out distant objects. Experimental results demonstrate up to a 6x speedup in CPU time for range queries without compromising accuracy, effectively addressing the "math tax" associated with complex similarity metrics.

Introduction

In domains like medical imaging, CAD, and multimedia retrieval, similarity is frequently modeled using quadratic form distance functions. Unlike standard Euclidean distance, which assumes independent dimensions, quadratic forms represent query regions as multidimensional ellipsoids to capture correlations between features.

While accurate, these functions impose a heavy computational burden. A standard distance check is linear ($O(d)$) with respect to dimensionality, but a quadratic form check scales quadratically ($O(d^2)$). In high-dimensional applications, this "math tax" often accounts for over 70% of total query execution time, shifting the primary bottleneck from disk I/O to the CPU.

Methodology: Conservative Approximations

To mitigate this overhead, the authors propose a multi-step filtering approach using conservative approximations. The core idea is to enclose the expensive ellipsoid query within a simpler, cheaper geometric shape. If a candidate object lies outside this approximation, it is mathematically guaranteed to lie outside the true query ellipsoid, allowing it to be discarded without an expensive distance calculation.

The Minimum Bounding Box (MBB) provides a computationally cheap $O(d)$ filter for the $O(d^2)$ ellipsoid query.

The framework details three primary approximation techniques:

  1. Minimum Bounding Box (MBB): A rectilinear box that tightly encloses the ellipsoid, requiring only $O(d)$ time to check (see Figure 2).
  2. Minimum Bounding Sphere (MBS): A sphere enclosing the ellipsoid, derived from the minimum eigenvalue of the similarity matrix.
  3. Combined (COMB): A hybrid approach that utilizes both the box and the sphere, selecting the maximum of the two lower-bounding distances for optimal filtering.

These approximations are extended to k-Nearest Neighbor (k-NN) queries through "lower-bounding distance functions." If the lower-bound distance to a spatial index node (e.g., in an R-tree) exceeds the distance to the current $k$-th best match, the entire node can be pruned safely.

Experimental Evaluation

The proposed methods were evaluated using two datasets: ImageDB, containing 112,000 color images (8D histograms), and a Synthetic Data set of 1,000,000 objects in 8D space.

Key Results

  • CPU Bottleneck Mitigation: Experiments confirmed that CPU time, not I/O, is the dominant factor in advanced similarity searches. The proposed approximations achieved a 6x improvement in CPU time for range queries.
  • Filtering Efficiency: In many scenarios, over 90% of exact ellipsoid evaluations were avoided, as the approximations were sufficient to reject non-matching candidates.
  • k-NN Performance: The MBS approximation yielded approximately a 40% performance gain for k-NN searches.
  • Robustness of Combined Methods: The COMB method consistently outperformed individual approximations by leveraging the strengths of both boxes and spheres across various ellipsoid orientations.
Experimental data showing that CPU time is the primary bottleneck across different similarity matrices for both range and k-NN queries.

Discussion and Conclusion

The effectiveness of these approximations is tied to the "sphericity" of the query ellipsoid. Elongated ellipsoids may result in looser bounds for spheres, making the MBB more effective. Conversely, the MBB's performance can degrade if the ellipsoid is highly oblique relative to the coordinate axes.

The primary contribution of this work is the demonstration that "no false drop" filtering can significantly accelerate complex similarity queries by targeting the CPU bottleneck. Future work involves developing a runtime query optimizer to automatically select the most efficient approximation based on the geometry of the similarity matrix.

Summary updated

BibTeX
@inproceedings{ankerst1998improving,
  author = {Mihael Ankerst and Bernhard Braunmüller and Hans-Peter Kriegel and Thomas Seidl},
  title = {{Improving Adaptable Similarity Query Processing by Using Approximations}},
  booktitle = {VLDB},
  year = {1998},
}
Figure