Products of Euclidean metrics and applications to proximity questions among curves
Abstract
Approximate Nearest Neighbor (ANN) search for polygonal curves is a fundamental challenge in computational geometry and data science. Popular metrics like the Discrete Fréchet Distance (DFD) and Dynamic Time Warping (DTW) are computationally expensive due to their alignment-based nature. This paper presents a new approach using randomized embeddings from $\ell_2$ to $\ell_p$ spaces to tackle the ANN problem. The authors provide the first $(1+\epsilon)$-approximation for DTW and develop data structures for both DFD and DTW with query times that scale linearly with the ambient dimension, effectively bypassing the curse of dimensionality for high-dimensional curve matching.
Introduction
Finding the nearest neighbor in a large dataset is a cornerstone of many applications. While well-solved for point sets, the problem becomes significantly more complex when the data consists of polygonal curves, such as GPS trajectories or protein structures. Comparing these objects requires specialized metrics like the Discrete Fréchet Distance (DFD), which minimizes the maximum distance in an alignment, or Dynamic Time Warping (DTW), which minimizes the sum of distances. Traditional algorithms for these metrics often face a trade-off between approximation quality and query efficiency, particularly in high-dimensional spaces where query times frequently scale exponentially with the dimension $d$.
Methodology
The core innovation of this work lies in treating curve distances as $\ell_p$-products of Euclidean metrics. Under this framework, DFD corresponds to the $p=\infty$ case, while DTW corresponds to $p=1$. The authors utilize Gaussian random projections to embed points from the original Euclidean space ($\ell_2$) into an $\ell_p$ space. This allows for the "vectorization" of point sequences by concatenating their projected coordinates.
To handle the temporal alignment aspect inherent to these metrics, the algorithm enumerates all possible valid traversals between curves of length $m$, building a separate ANN data structure for each. While this leads to high space complexity, it ensures that the query phase is highly efficient. The resulting vectors are indexed using Locality Sensitive Hashing (LSH) or bucketing techniques to enable fast retrieval.
Key Results and Theoretical Complexity
The theoretical contributions of this work are summarized in the table below, which compares the proposed data structures against prior state-of-the-art methods.
Notably, this work provides the first $(1+\epsilon)$-approximation for DTW with a query time of $\tilde{O}(d \cdot 2^{4m} \log n)$. For DFD, the method achieves a similar $(1+\epsilon)$ approximation with query times that are linear in $d$, a significant improvement over previous methods that were exponential in the dimension. For extremely high-dimensional cases ($d = \omega(\log n)$), further optimizations using Hamming space projections are introduced to maintain efficiency.
Discussion
A key insight of this research is the unconventional use of random projections into $\ell_p$ spaces where $p > 2$. While such embeddings generally lack strong guarantees for all points, the authors demonstrate that only "lower-tail inequalities" are necessary for the ANN problem—ensuring that distant points do not erroneously appear close in the projected space. This theoretical maneuver allows for the unification of DFD and DTW under a single framework.
The approach explicitly trades off significant preprocessing time and storage space (exponential in curve length $m$) to achieve near-optimal query performance. Consequently, this method is most effective for applications involving relatively short curves where query speed in high dimensions is the primary bottleneck.
Conclusion
This paper advances the state-of-the-art in curve matching by providing robust $(1+\epsilon)$ approximation guarantees for both DFD and DTW with linear scaling in the ambient dimension. While the exponential dependence on curve length $m$ limits the approach to specific sequence lengths, it provides a powerful theoretical foundation for high-dimensional proximity queries. Future work involves empirical validation and extending these techniques to other metric combinations, such as $\ell_p$-products of $\ell_q$ norms.
Summary updated