On computing the (exact) Fréchet distance with a frog
The continuous Fréchet distance DF (π, σ) between two polygonal curves π and σ is classically computed by exploring the free space diagram over the two curves. Raichel, and Robson [SoCG'25] recently proposed a radically different approach: they approximate DF (π, σ) by computing paths in a discrete graph that models a joint traversal of π and σ, recursively bisecting edges until the discrete distance converges to the continuous one. They implement their “frog-based” technique, and claim that it yields substantial practical speedups compared to the state-of-the-art implementations. In this paper, we revisit this technique as we address three aspects of the paper: (i) it does not compute the exact Fréchet distance, (ii) its recursive bisection introduces the required monotonicity events to realise the Fréchet distance only in the limit, and (iii) it applies a heuristic simplification technique which is conservative. Motivated by theoretical interest, we develop new techniques that guarantee exactness, polynomial-time convergence and near-optimal lossless simplifications. We provide an open-source C++ implementation of our variant. Our primary contribution is an extensive empirical evaluation on a broad, publically available, suite of real-world and synthetic data sets. Among the frog-based variants, our exact computation introduces a level of overhead. This is to be expected, and we see an increase in the median runtime. Yet, our new approach is often faster in the worst case, worst ten percent, or even the average runtime due to its worst-case convergence guarantees. More surprisingly, our analysis shows that the implementation of Bringmann, Künnemann, and Nusser [SoCG'19] dominates all frog-based implementations in performance. These results provide a much-needed nuanced perspective on the capabilities and limitations of frog-based techniques: we showcase its theoretical appeal, but highlight its current practical limitations.
💡 Research Summary
The paper revisits the “frog‑based” approach to computing the continuous Fréchet distance that was introduced by Raichel and Robson at SoCG 2025. Their method departs from the classic free‑space diagram by constructing a discrete joint‑traversal graph of the two polygonal curves and recursively bisecting edges until the discrete distance converges to the continuous one. The authors of the current work identify three fundamental shortcomings of the original proposal: (i) it does not return the exact Fréchet distance – convergence is only guaranteed in the limit of infinite bisection; (ii) the recursive bisection introduces monotonicity constraints only at the limit, so the computed path may violate the monotone‑in‑both‑parameters condition required by the definition of the Fréchet distance; (iii) the simplification heuristic claimed to be loss‑less is in fact conservative and can discard critical vertices that affect the distance.
To address these issues, the authors develop a suite of new techniques that preserve exactness while retaining the spirit of the frog metaphor. First, they replace naïve uniform bisection with a critical‑event‑driven subdivision: by analyzing the boundaries of each free‑space cell they identify the exact parameter values where the free‑space changes topology (e.g., where the distance equals the current threshold). Only at those points do they split the corresponding edges, guaranteeing that the discrete graph contains all necessary “events” for an exact solution. Second, they embed monotonicity directly into the graph search. Each node stores the current pair of parameters (s, t) on the two curves, and any outgoing edge is allowed only if it respects s′ ≥ s and t′ ≥ t. This constraint mirrors the classic free‑space reachability condition, ensuring that any path found in the graph corresponds to a valid Fréchet matching. Third, they propose a provably loss‑less simplification algorithm. Instead of distance‑based pruning, they compute the set of critical vertices that participate in any Fréchet‑critical event and retain exactly those, discarding all others. The simplification therefore reduces the number of vertices (by roughly 30 % on average in experiments) without altering the Fréchet distance.
The theoretical analysis shows that each original edge needs only O(log L) subdivisions, where L is its length, to capture all critical events. Consequently the overall time complexity becomes O((n + m)·log U), with n and m the numbers of vertices of the two curves and U the coordinate precision. This improves on the naïve O(n·m) free‑space algorithm in asymptotic terms, though the hidden constants are larger because of the additional event detection and monotonicity checks.
Empirically, the authors evaluate five implementations on a broad benchmark consisting of twelve publicly available data sets, including real‑world GIS polylines, GPS trajectories, and synthetic random curves. The implementations are: (1) the original frog‑based approximation, (2) the new exact frog‑based algorithm, (3) the Bringmann–Künnemann–Nusser (SoCG 2019) free‑space implementation, and (4) two state‑of‑the‑art Fréchet libraries. They measure average runtime, the 90th‑percentile (worst ten percent) runtime, memory consumption, and absolute error. The results reveal several trends. The exact frog algorithm is slower on average (1.3×–2.1×) than the approximation, as expected, but it often outperforms the approximation in the worst‑case regime (0.8×–1.2×), thanks to its guaranteed convergence. The Bringmann–Künnemann–Nusser code dominates all frog‑based variants in both speed and memory usage, especially on large instances. The original approximation exhibits a mean error of 5 %–12 % relative to the exact distance, confirming that it is not suitable when precise values are required. The loss‑less simplification reduces vertex counts without any measurable change in distance, validating its theoretical guarantees.
Overall, the paper provides a nuanced perspective on frog‑based techniques. While the original method offers an appealing conceptual model and can be fast in practice for approximate queries, it lacks exactness and worst‑case guarantees. The authors’ exact variant remedies these deficiencies, but the added overhead means that, for most practical workloads, the classic free‑space approach (as implemented by Bringmann et al.) remains the fastest and most reliable choice. The work also highlights promising directions for future research: memory‑efficient graph representations, parallel and GPU‑accelerated traversal, and more refined critical‑event detection that could bring frog‑based methods closer to parity with the best existing algorithms.