Fine-Grained Hardness of Approximating Dynamic Time Warping
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.
Tom: We're looking at the paper: "Fine-Grained Hardness of Approximating Dynamic Time Warping".
Title and authors: Tom: So we're talking about the paper "Fine-Grained Hardness of Approximating Dynamic Time Warping" by Jihan Wang from Illinois. It looks at the limits on how well we can approximate dynamic time warping when you have to find a path between two sequences. Jane, what’s the actual takeaway here for someone who isn't deep in the math?
Jane: It shows that even with just three possible distance values—which is a simple uniform metric—we can't get an approximation faster than what the authors state, depending on how they assume those sequences are built. They use this to prove conditional lower bounds for dynamic time warping over the uniform metric on three symbols.
Tom: So it’s about showing that there are inherent limits when you try to approximate dynamic time warping deterministically, and those limits depend on the structure of your input data and how good an approximation factor you are allowed.
Lu: They have two main hardness results here: one for explicit strings and another for run-length encoded strings. These bounds show a tradeoff between approximation quality and running time.
Meng: I'm wondering about the run-length encoded part because that’s how most real data, like sensor readings or text sequences, actually comes in—does this mean algorithms on those kinds of inputs are even slower?
Lalam: The paper shows that for run-length encoded strings, assuming something called the Orthogonal Vectors Hypothesis or OVH rules out any constant-factor approximation in a certain running time complexity.
The paper's summary: Tom: So to summarize, the paper "Fine-Grained Hardness of Approximating Dynamic Time Warping" establishes these conditional lower bounds for approximating dynamic time warping over the uniform metric on three symbols. It’s about showing that no deterministic algorithm can achieve a certain approximation quality without paying a penalty in either running time or the quality of your approximation factor.
Jane: Basically, they set up two main hardness results: one for explicit strings and another one for run-length encoded strings. They use these bounds to show that achieving a better approximation usually costs more in terms of running time, or vice versa.
Lu: For the explicit strings part, they assume something called the Gap Block Disjointness hypothesis, which then leads to a result where no deterministic algorithm can approximate dynamic time warping in O of N squared minus delta time if we fix certain parameters.
Meng: O of N squared minus delta is pretty fast for a problem like this so that's a strong statement about the limits on what we can compute efficiently.
Lalam: And then they have the run-length encoded strings result which assumes something called the Orthogonal Vectors Hypothesis or OVH. This rules out any constant-factor approximation in O of N times M minus delta time if we fix that delta value.
Tom: So to put it plainly, they show that for these two different types of input data—the explicit ones and the run-length encoded ones—you can't get a good approximation without paying a penalty in either the time complexity or the quality of your approximation factor.
The paper's improvements: Jane: The paper suggests some ways to sharpen these hardness results. For explicit strings, they use Boolean gadgets and deterministic gap amplification to create a polynomial approximation gap. This means they are building a construction that forces the algorithm to handle the distance between elements in a very certain way.
Lu: They show that for any path segment in the grid for X minus X plus and Y minus Y plus if its cost is below some value H then dynamic time warping between those two points is less than H. This construction involves tagged Boolean gadgets that encode the source predicate and disjoint strips help make their lower bounds add up across the list construction lemma four point one.
Meng: That sounds like they're making a very certain structural argument to build the gap; I need to understand how that construction translates into a real running time bound for deployment.
Lalam: For the run-length encoded strings they use a reduction from Orthogonal Vectors on two lists of vectors of dimension d to dynamic time warping. This setup leads to an explicit string construction size that is roughly n times m times d cubed which gives them a lower bound H based on the sum of n and m plus m times d cubed.
Tom: So the improvement here is in how they build these gadgets—they are using certain structural properties of Boolean gadgets to ensure that the approximation gap they create is polynomial. That’s a big step because it connects the problem structure directly to a running time saving.
Conclusion: Jane: So wrapping up, what does this mean for the broader field? The main implication is that we understand the tradeoff between approximation quality and computation time for dynamic time warping. The work on "Fine-Grained Hardness of Approximating Dynamic Time Warping" shows that even small changes in the input representation—from explicit strings to run-length encoded ones—introduce distinct hardness conditions.
Tom: It confirms that there are inherent limits when you try to approximate dynamic time warping deterministically, and those limits depend on the particular structure of your input data and the approximation factor you are allowed.
Lu: It gives us concrete lower bounds for deterministic algorithms under certain hypotheses which is useful for understanding what kind of computational power would be needed to solve this problem efficiently.
Meng: For deployment it means we have better upper limits on how fast we can expect an algorithm to run when trying to get a certain level of accuracy on these types of sequences.
Lalam: The paper proves that under the Gap Block Disjointness hypothesis for explicit strings there are no deterministic algorithms in O of N squared minus delta time and under OVH for run-length encoded strings there are no constant-factor approximations in O of N times M minus delta time.
Jane: That's a lot to digest from these hardness results and the running times. We should keep an eye on how these conditional bounds interact with other research into sequence alignment and dynamic programming structures.
University of Illinois Urbana-Champaign
cs.CC, cs.DS
Submitted: 2026-10-06
Updated: 2026-11-20
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 97/100
The gist: Fine-Grained Hardness of Approximating Dynamic Time Warping proves conditional lower bounds for approximating dynamic time warping over the uniform metric on three symbols.
Key concepts
- Gap Block Disjointness (GBD) hypothesis
- This hypothesis is a condition under which no deterministic algorithm can approximate DTW in O(N^2−δ) time for fixed approximation factors. It relates to the structure of the input data, suggesting that if this condition holds, achieving good approximations requires significantly more time than quadratic complexity.
- Orthogonal Vectors Hypothesis (OVH)
- This hypothesis rules out any constant-factor approximation in Oe((nm)1−δ) time for run-length encoded strings. It suggests that the structure of run-length encoded data prevents efficient constant-factor approximations, forcing algorithms to take exponential time relative to the input size.
- Explicit String Construction
- This technique uses Boolean gadgets and deterministic gap amplification to create a polynomial approximation gap. By carefully designing these gadgets, the authors ensure that if a path segment has a cost below a certain threshold H, it guarantees that the true DTW distance is also below H.
- Circuit Consequences
- These consequences link the hardness of approximating DTW to complexity classes like ENP and Boolean circuits. If an algorithm could approximate DTW efficiently, it would imply that ENP functions are computable by small, nonuniform circuits, which the proof shows is not possible under the given lower bounds.
Terminology
Summary
Fine-Grained Hardness of Approximating Dynamic Time Warping proves conditional lower bounds for approximating dynamic time warping over the uniform metric on three symbols. p. 0 Fine-Grained Hardness of Approximating Dynamic Time Warping
Jihan Wang
The University of Illinois Urbana-Champaign
Department of Computer Science
Urbana, IL, USA
jihanw2@illinois. edu
Abstract
We prove conditional lower bounds for approximating dynamic time warping (DTW) over
the uniform metric on three symbols. Under the Gap Block Disjointness (GBD) hypothesis, for every fixed
κ ∈ (0, 1/6) and δ ∈ (0, 1), no deterministic algorithm Nκδ-approximates DTW on two explicit
strings of length N in O(N2−δ
) time. This matches the known tradeoff between approximation
and running-time exponents for deterministic algorithms within any fixed factor greater than
six in the approximation exponent.Where the paper says it
Where the paper says it
Lower Bounds for Explicit Strings
The authors prove conditional lower bounds for approximating dynamic time warping over the uniform metric on three symbols. Under the Gap Block Disjointness (GBD) hypothesis, no deterministic algorithm Nκδ-approximates DTW in O(N 2−δ) time for every fixed κ ∈ (0, 1/6) and δ ∈ (0, 1). p. 0 Let N, M be the two string lengths and n, m their
respective numbers of runs. Under the Gap Block Disjointness (GBD) hypothesis, for every fixed
κ ∈ (0, 1/6) and δ ∈ (0, 1), no deterministic algorithm Nκδ-approximates DTW on two explicit
strings of length N in O(N2−δ
) time. Under the Gap Block Disjointness (GBD) hypothesis, for every fixed
κ ∈ (0, 1/6) and δ ∈ (0, 1), no deterministic algorithm Nκδ-approximates DTW on two explicit
strings of length N in O(N2−δ
) time. This matches the known tradeoff between approximation
and running-time exponents for deterministic algorithms within any fixed factor greater than
six in the approximation exponent. For run-length encoded strings, the Orthogonal Vectors
Hypothesis (OVH) rules out any constant-factor approximation in Oe((nm)
1−δ
) time for every
constant δ > 0. More generally, for every fixed η ∈ (0, 1), it rules out (N +M)
1−η
-approximation
in the same running time.Where the paper says it
Where the paper says it
Where the paper says it
Explicit String Construction Details
The explicit string construction uses Boolean gadgets and deterministic gap amplification to obtain a polynomial approximation gap. The construction involves tagged Boolean gadgets that encode the source predicate, where a distance cap controls the cost of bad pairs, and disjoint strips make their lower bounds add across the list construction Lemma 4. p. 3 Our tagged Boolean gadgets encode the source predicate. A distance cap controls the cost of
bad pairs, and disjoint strips make their lower bounds add across the list construction. Suppose a path segment traverses every position of a heavy run. If the segment
has cost below H, at least one of these positions must occur in an equality cell. Exchange the sides for a literal known to the right encoder. For a gate with k children, let Xj , Yj be the strings in its j-th child comparison, j ∈ [k].Where the paper says it
Where the paper says it
Where the paper says it
Run-Length Encoded String Analysis
For run-length encoded strings, an elementary algorithm compares two sequences of run labels and returns zero if they agree and N + M otherwise. Under the Orthogonal Vectors Hypothesis (OVH), this rules out any constant-factor approximation in Oe((nm)1−δ) time for every constant δ > 0. p. 0 This matches the known tradeoff between approximation
and running-time exponents for deterministic algorithms within any fixed factor greater than
six in the approximation exponent. For run-length encoded strings, the Orthogonal Vectors
Hypothesis (OVH) rules out any constant-factor approximation in Oe((nm)
1−δ
) time for every
constant δ > 0.Where the paper says it
Hardness for Run-Length Encoded Strings
The proof of Theorem 1.2(i) uses Propositions 5. p. 2 Under GBD, Abboud and Backurs [AB17] showed that there is no δ > 0 such that, for every
ε > 0, LCS has a deterministic (1 + ε)-approximation in O(N2−δ
) time. Their construction uses a
growing alphabet to select a corresponding row pair. Hypothesis 2. For every ε > 0, there is a constant c > 0 such that no bounded-error randomized
algorithm solves Orthogonal Vectors on two lists of p vectors in dimension d = ⌈c log p⌉ in O(p
2−ε
)
time. Our tagged Boolean gadgets encode the source predicate. A distance cap controls the cost of
bad pairs, and disjoint strips make their lower bounds add across the list construction. Approximation behaves differently for other similarity measures. Buchin, Ophelders, and
Speckmann [BOS19] strengthened earlier SETH-based lower bounds [Bri14, BM16] to rule out
deterministic strongly subquadratic (3 − ε)-approximation for both continuous and discrete Fréchet
distance.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Circuit Consequences
The circuit consequences show that the assumed algorithm also rules out nonuniform linear-size Valiant series-parallel circuits for ENP Corollary 4.16 states that if DTW admits a deterministic Nκδ-approximation in O(N 2−δ) time, then ENP is not contained in the class of functions computed by nonuniform fan-in-two Boolean circuits of size O(v k) and depth O(h(v)). p. 1 For fixed κ ∈ (0, 1/6)
and δ ∈ (0, 1), suppose a deterministic algorithm Nκδ-approximates DTW on two strings of length
N in O(N2−δ
) time. For every polynomial size bound and every polynomial-time computable
sublinear depth bound, some language in E
NP then has no nonuniform fan-in-two circuits meeting
these bounds.Where the paper says it
The final part of the paper proves Theorem 1.2(ii) by setting e = ⌈2/η⌉ and H = (n + m)e in the same reduction. p. 2 Their three-symbol uniform-metric hard instances use long runs to force ordered equal-symbol
matches and separate distance at most one from distance above α. Transferring such gaps to
running-time lower bounds also requires a fine-grained source reduction with instances compact
enough to preserve the running-time saving. Let N, M be the two string lengths and n, m their
respective numbers of runs. Under the Gap Block Disjointness (GBD) hypothesis, for every fixed
κ ∈ (0, 1/6) and δ ∈ (0, 1), no deterministic algorithm Nκδ-approximates DTW on two explicit
strings of length N in O(N2−δ
) time. For run-length encoded strings, an encoding of regular-expression
membership gives accepting instances an alignment whose cost does not increase as selected runs
grow. Rejecting instances have distance at least the chosen run length, while the number of runs
stays fixed.Where the paper says it
Where the paper says it
Where the paper says it
Hardness for Explicit Strings
The proof of Theorem 1.1 relies on Corollary 4.14, which shows that if a deterministic Nκδ-approximation exists, then GBD is solved in O(p 2−ε) time. p. 0 Under the Gap Block Disjointness (GBD) hypothesis, for every fixed
κ ∈ (0, 1/6) and δ ∈ (0, 1), no deterministic algorithm Nκδ-approximates DTW on two explicit
strings of length N in O(N2−δ
) time. This matches the known tradeoff between approximation
and running-time exponents for deterministic algorithms within any fixed factor greater than
six in the approximation exponent. The first inequality makes its approximation factor smaller than q. The second keeps both construction and approximation time subquadratic in p, since 2 − δ > 1. The first inequality makes its approximation factor smaller than q. The second keeps both construction and approximation time subquadratic in p, since 2 − δ > 1. The first inequality makes its approximation factor smaller than q. The second keeps both construction and approximation time subquadratic in p, since 2 − δ > 1. With a = 0, a positive γ satisfies
both inequalities exactly when 6κ < 1. The constant six comes from the quadratic source bound
and the cubic dependence on q. With a = 0, a positive γ satisfies
both inequalities exactly when 6κ < 1. The constant six comes from the quadratic source bound
and the cubic dependence on q.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
The construction of the padded strings in Proposition 4.10 shows that the total expanded length is O(pHr∗) = O(qpr 2) and the construction time is O(qp'r 2). The family construction takes O(qt cubed polylog(qt)) time, which also fits within Oe(pr 2q 3)
Fine-Grained Consequences
Corollary 4.14 states that for every fixed κ ∈ (0, 1/6) and δ ∈ (0, 1), there are constants a, ε > 0 with the following property. p. 7 For fan-in-two Boolean formulas, we use an OR of two ANDs at every level, filling unused
inputs with constants. This fixed layout represents both gate types and gives all formulas with the
same depth bound the same collapses on each side. The matrix
encoding has r = O(KL). Taking 0 < α < a in the GBD hypothesis gives r = O(KL) ≤ p
a
for
sufficiently large p.Where the paper says it
Where the paper says it
The circuit criterion gives a function in ENP outside Cv. This proves the stated lower bound for the series-parallel conclusion, as the assumed DTW algorithm refutes GBD by Theorem 1. p. 1 For every polynomial size bound and every polynomial-time computable
sublinear depth bound, some language in E
NP then has no nonuniform fan-in-two circuits meeting
these bounds. By the connection of Abboud and Backurs [AB17], the assumed algorithm also rules
out nonuniform linear-size Valiant series-parallel circuits for E
NP. For every polynomial size bound and every polynomial-time computable
sublinear depth bound, some language in E
NP then has no nonuniform fan-in-two circuits meeting
these bounds. By the connection of Abboud and Backurs [AB17], the assumed algorithm also rules
out nonuniform linear-size Valiant series-parallel circuits for E
NP. For every polynomial size bound and every polynomial-time computable
sublinear depth bound, some language in E
NP then has no nonuniform fan-in-two circuits meeting
these bounds. By the connection of Abboud and Backurs [AB17], the assumed algorithm also rules
out nonuniform linear-size Valiant series-parallel circuits for E
NP. For every polynomial size bound and every polynomial-time computable
sublinear depth bound, some language in E
NP then has no nonuniform fan-in-two circuits meeting
these bounds. By the connection of Abboud and Backurs [AB17], the assumed algorithm also rules
out nonuniform linear-size Valiant series-parallel circuits for E
NP. For every polynomial size bound and every polynomial-time computable
sublinear depth bound, some language in E
NP then has no nonuniform fan-in-two circuits meeting
these bounds. By the connection of Abboud and Backurs [AB17], the assumed algorithm also rules
out nonuniform linear-size Valiant series-parallel circuits for E
NP.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
The proof of Theorem 1.2(ii) rules out such an algorithm within the same running time. p. 0 This matches the known tradeoff between approximation
and running-time exponents for deterministic algorithms within any fixed factor greater than
six in the approximation exponent. For run-length encoded strings, the Orthogonal Vectors
Hypothesis (OVH) rules out any constant-factor approximation in Oe((nm)
1−δ
) time for every
constant δ > 0. Let ⊕ denote coordinatewise addition modulo two. Choose a fixed small-bias family S of pairs
of index translations, and replace a local predicate by
F
′
(i, j) = _
(s,s′)∈S
F(ui⊕s, vj⊕s
′).Where the paper says it
Where the paper says it
The second inequality keeps both construction and approximation time subquadratic in p, since 2 − δ > 1. With a = 0, a positive γ satisfies both inequalities exactly when 6κ < 1. p. 7 The second keeps both construction and approximation time subquadratic in p, since 2 − δ > 1. With a = 0, a positive γ satisfies
both inequalities exactly when 6κ < 1.Where the paper says it
The construction, including padding, takes O(pHr∗) = O(qpr 2) time and length. The family construction takes O(qt cubed polylog(qt)) time, which also fits within Oe(pr 2q 3)
The first inequality gives Nκδ < q for sufficiently large p, so the approximation separates the two cases at threshold B0/2. Its running time is at most p(1+β)(2−δ)+o(1). p. 0 Under the Gap Block Disjointness (GBD) hypothesis, for every fixed
κ ∈ (0, 1/6) and δ ∈ (0, 1), no deterministic algorithm Nκδ-approximates DTW on two explicit
strings of length N in O(N2−δ
) time. This matches the known tradeoff between approximation
and running-time exponents for deterministic algorithms within any fixed factor greater than
six in the approximation exponent.Where the paper says it
The criterion then implies that ENP contains a function outside the family. This proves the stated lower bound for the series-parallel conclusion, as the assumed DTW algorithm refutes GBD by Theorem 1.1. The connection of Abboud and Backurs [AB17] gives the claimed circuit lower bound.
The criterion then implies that ENP contains a function outside the family. This proves the stated lower bound for the series-parallel conclusion, as the assumed DTW algorithm refutes GBD by Theorem 1.
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Enhanced approximation guarantees for Dynamic Time Warping (DTW) on explicit strings are achievable by combining Boolean gadgets with deterministic gap amplification to obtain a polynomial approximation gap, specifically showing that
no deterministic algorithm Nκδ-approximates DTW in O(N2−δ) time
under the Gap Block Disjointness hypothesis. -
Improved running time bounds for run-length encoded (RLE) strings allow algorithms to achieve an (N + M)-approximation in Oe((nm)1−δ) time by leveraging the Orthogonal Vectors Hypothesis, ruling out constant-factor approximations in this complexity class.
-
The system can utilize a reduction from SAT to Orthogonal Vectors combined with sparsification to establish hardness results for RLE DTW, suggesting that
randomized SETH [BPT22] implies OVH.
-
The AI system can perform exact Dynamic Time Warping on run-length encoded time series in Oe((n + m)k) time by utilizing the exact algorithm given by Froese et al. and then achieving a (1+epsilon)-approximation in Oe(nm/epsilon2) time using Xi and Kuszmaul's work.
-
The system can implement a fine-grained source reduction that separates distance values at growing thresholds, which is used to derive lower bounds for both explicit strings and RLE inputs.
Abstract
We prove conditional lower bounds for approximating dynamic time warping (DTW) over the uniform metric. Let N,M be the lengths of the two strings and n,m their numbers of runs. Under the Gap Block Disjointness Hypothesis, no deterministic algorithm O(N epsilon) -approximates DTW on two strings of length N over three symbols in O(N 2-δ) time for any constants δ in(0,1] and epsilon in[0,δ/3). In particular, no deterministic constant-factor approximation runs in strongly subquadratic time. For run-length encoded strings with n=m, the Orthogonal Vectors Hypothesis rules out every constant-factor approximation in O((nm) 1-δ) time for every constant δ>0. It also rules out (N+M) 1-η-approximation in this time for every constant η in(0,1). The bounds extend to every fixed metric with at least three points, including absolute distance on 0,1,2. Both reductions use long runs to force equal-symbol matches on low-cost paths. For explicit strings, Boolean gadgets encode the source predicate. A deterministic disperser-based density amplification then yields the polynomial gap. For run-length encoded strings, we encode regular-expression membership so that the gap grows without adding runs.
Sources
- Edit Distance Approximation: Subquadratic Factor Three and Monge Approximation Schemes
- Binary Dynamic Time Warping in Linear Time
Related papers
- The Proof Analysis Problem for Constant-Depth Frege
- Hardness of Counting Orderings: Taking Gadget Amplification to the Limit
- Completeness in the Polynomial Hierarchy and PSPACE for many natural problems derived from NP
- Rigorous Low-Degree Implications for Planted Subgraph Detection: Noise and Treewidth
- Parameterized Hardness of Zonotope Containment and Neural Network Verification
- Deterministic Verification and Computation of Real Matrix Products Have the Same Arithmetic Exponent