Skip to main content
QUICK REVIEW

[Paper Review] Approximate Nearest Neighbor for Curves - Simple, Efficient, and Deterministic

Arnold Filtser, Omrit Filtser|arXiv (Cornell University)|Jan 1, 2020
Data Management and AlgorithmsComputer Science8 citations
TL;DR

This paper presents a simple, deterministic, and efficient data structure for approximate nearest neighbor search on curves under discrete Fréchet and dynamic time warping distances. By discretizing the space based on input curves, it achieves O(md) query time and n · O(1/ε)md storage—exponentially better than prior work—while supporting both symmetric and asymmetric settings with k ≪ m query curve lengths.

ABSTRACT

In the (1+ε,r)-approximate near-neighbor problem for curves (ANNC) under some similarity measure δ, the goal is to construct a data structure for a given set 𝒞 of curves that supports approximate near-neighbor queries: Given a query curve Q, if there exists a curve C ∈ 𝒞 such that δ(Q,C)≤ r, then return a curve C' ∈ 𝒞 with δ(Q,C') ≤ (1+ε)r. There exists an efficient reduction from the (1+ε)-approximate nearest-neighbor problem to ANNC, where in the former problem the answer to a query is a curve C ∈ 𝒞 with δ(Q,C) ≤ (1+ε)⋅δ(Q,C^*), where C^* is the curve of 𝒞 most similar to Q. Given a set 𝒞 of n curves, each consisting of m points in d dimensions, we construct a data structure for ANNC that uses n⋅ O(1/ε)^{md} storage space and has O(md) query time (for a query curve of length m), where the similarity measure between two curves is their discrete Fréchet or dynamic time warping distance. Our method is simple to implement, deterministic, and results in an exponential improvement in both query time and storage space compared to all previous bounds. Further, we also consider the asymmetric version of ANNC, where the length of the query curves is k ≪ m, and obtain essentially the same storage and query bounds as above, except that m is replaced by k. Finally, we apply our method to a version of approximate range counting for curves and achieve similar bounds.

Motivation & Objective

  • To address the (1+ε, r)-approximate nearest neighbor for curves (ANNC) problem under discrete Fréchet and ℓp,2 distances.
  • To design a data structure that achieves sub-exponential query time and space complexity, overcoming limitations of prior randomized or exponential-time approaches.
  • To extend the solution to the asymmetric setting where query curves are significantly shorter than input curves (k ≪ m).
  • To apply the method to approximate range counting for curves, maintaining similar efficiency bounds.

Proposed method

  • The method uses a space discretization based on the input curves to precompute a small set of representative curves that approximate all possible queries.
  • It constructs a dictionary (hash table or prefix tree) storing curves from a discretized grid, where each curve is rounded to the nearest grid point.
  • For a query curve Q, it computes a rounded version Q′ in the discretized space and retrieves all curves in the data structure within (1+ε)r of Q′.
  • The approach leverages the fact that if a curve is within distance r of Q, then its rounded version is within (1+ε)r of Q′, ensuring correctness.
  • The method is deterministic and avoids reliance on complex locality-sensitive hashing or randomized projections.
  • It generalizes to ℓp,2-distance (including DFD and DTW) and supports range counting by maintaining counts of curves in each grid cell.

Experimental results

Research questions

  • RQ1Can a deterministic, efficient data structure be constructed for ANNC under discrete Fréchet distance with sub-exponential query time and space?
  • RQ2How can the ANNC problem be solved efficiently in the asymmetric setting where query curves are much shorter than input curves?
  • RQ3Can the same approach be extended to approximate range counting for curves with similar efficiency bounds?
  • RQ4What is the trade-off between approximation factor, storage, and query time in this setting, and can it be optimized to be near-optimal?

Key findings

  • The proposed data structure achieves O(md) query time and n · O(1/ε)md storage space for ANNC under discrete Fréchet and ℓp,2 distances, representing an exponential improvement over prior methods.
  • For the asymmetric setting with query curve length k ≪ m, the bounds are O(kd) query time and n · O(1/ε)kd storage, with m replaced by k in the exponents.
  • The method is deterministic and simple to implement, avoiding complex randomized or hashing-based constructions used in prior work.
  • The approach supports approximate range counting with space O(n · (1/ε)^m(d+1)) and query time O(md log(nmd/ε)), matching the efficiency of the ANNC solution.
  • The algorithm is optimal up to logarithmic factors, matching the space bound of Har-Peled and Kumar (2011) while achieving linear query time in md.
  • A curve simplification algorithm is provided that computes a curve with minimal vertices within (1+ε)r of the original, running in O(d·m log m / ε + m·ε^{-4.5} log(1/ε)) time.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.