Static and Streaming Data Structures for Fréchet Distance Queries

Arnold Filtser, Omrit Filtser

Abstract

This paper introduces efficient distance oracles for estimating the discrete Fréchet distance between curves in both static and streaming environments. By employing novel curve simplification techniques and a "leaping" framework, the proposed data structures achieve query times and space complexities that are independent of the input curve's length $m$. Notably, the streaming oracle matches the performance of the static version, offering a significant improvement over prior state-of-the-art methods.

Introduction

The Fréchet distance is a fundamental metric for measuring trajectory similarity, often visualized as the minimum leash length required for a man and a dog to traverse two paths without backtracking. While standard dynamic programming computes the discrete Fréchet distance in $O(nm)$ time, this becomes computationally prohibitive for massive datasets, such as continent-wide GPS traces or long-term stock market histories. This work addresses the need for distance oracles that can handle large-scale static data and high-velocity streams, providing near-linear query times relative to the query curve size $k$ and dimension $d$, while eliminating the dependence on the total input length $m$.

Methodology

The authors build their distance oracles using several key algorithmic innovations:

  • Curve Simplification: To decouple query performance from the massive input size $m$, the algorithm compresses the input curve $P$ into a much smaller simplification curve $\Pi$ of length $k$. This allows for efficient processing of high-dimensional data.
  • Grid Covers & Bounded Range Oracles: The algorithm discretizes the space of possible query curves using uniform grids. By precomputing and storing distances to these grid-curves in hash tables across multiple distance scales, the oracle can quickly approximate the distance for any query.
  • The "Leaping" Framework: In streaming scenarios where the optimal simplification distance is unknown, the LeapingStreamSimp algorithm dynamically adjusts its thresholds. As new points arrive, if the simplified curve exceeds the length budget $k$, the algorithm "leaps" by multiplying its distance guess by a constant factor and re-simplifying on-the-fly.
  • High-Dimensional Tools: To avoid the "curse of dimensionality," the authors utilize Well-Separated Pair Decompositions (WSPD) to identify critical distance values, ensuring efficiency in arbitrarily high dimensions.
Comparison of streaming curve simplification algorithms showing space and approximation trade-offs.

Key Results

The authors establish several state-of-the-art theoretical bounds for distance oracles, demonstrating that processing data on-the-fly does not necessarily incur an asymptotic performance penalty during querying.

  • Static and Streaming Oracles: Both achieve a $(1+\varepsilon)$-approximation with a query time of $\tilde{O}(kd)$ and storage space of $O(1/\varepsilon)^{kd} \log(1/\varepsilon)$. This represents a quartic (degree 4) improvement in query time compared to previous streaming oracles.
  • Sub-curve Queries: By building a hierarchical tree of simplifications, the authors enable queries against any sub-segment $P[i, j]$ in $\tilde{O}(k^2 d)$ time, using $m \log m \cdot O(1/\varepsilon)^{kd} \log(1/\varepsilon)$ space.
  • High-Dimensional Simplification: The paper provides an algorithm to compute a $(k, 1+\varepsilon)$-simplification in $\tilde{O}(md/\varepsilon^{4.5})$ time, removing exponential factors related to the dimension $d$.
Summary of performance bounds for static, streaming, and subcurve distance oracles, highlighting the independence from input size m.

Conclusion and Future Work

While the independence of query time and space from the input size $m$ is a significant breakthrough, the memory requirements still scale exponentially with the query size $k$ and dimension $d$ ($O(1/\varepsilon)^{kd}$). This makes the oracle highly effective for short queries in low-to-moderate dimensions, but poses challenges for larger query sets. Future research may explore reducing this exponential overhead or achieving strictly linear $O(md)$ query times for symmetric distance oracles without logarithmic overheads.

Summary updated

BibTeX
@inproceedings{filtser2021static,
  author = {Arnold Filtser and Omrit Filtser},
  title = {{Static and Streaming Data Structures for Fréchet Distance Queries}},
  booktitle = {SODA},
  year = {2021},
  doi = {10.1137/1.9781611976465.71},
}
Figure