Quadratic Wiggle Height Minimization
- Quadratic wiggle height minimization is a quadratic optimization framework that penalizes large vertical displacements using squared curvature and roughness measures.
- It underpins applications such as ordered storyline visualization, discrete smoothing, and stacked area charts by enforcing smooth and structured transitions.
- The approach leverages convex quadratic programming to efficiently optimize coordinate assignments under linear constraints, balancing performance and accuracy.
Quadratic wiggle height minimization denotes a family of quadratic optimization problems in which “wiggle” is penalized by a sum of squared vertical displacements, a curvature energy, or a roughness functional. In ordered storyline visualization, the canonical objective is
where is the -coordinate of character at time (Dobler et al., 27 Aug 2025). In quadratic smoothing, the same idea appears as
with chosen to encode curvature or roughness, for example for a second-difference operator (Levi et al., 2018). In Hilbert-space formulations, a canonical wiggle functional is
represented by a positive semidefinite operator 0 (Pappas, 2010). In stacked area charts, the quadratic objective is the sum of squared border changes over time (Dobler et al., 26 Jun 2025).
1. Formal problem classes
Several mathematically distinct models instantiate the same basic principle: large vertical changes are penalized more heavily than small ones because the penalty is quadratic. In storyline visualization, the decision variables are the layer-wise character coordinates 1, constrained by per-layer orderings and spacing rules. In smoothing and regularization, the variables are either vectors 2 or functions in a Hilbert space, and the objective is a quadratic form induced by a difference, Laplacian, or derivative operator. In stacked area charts, the optimization variable is typically the ordering 3, and the quadratic objective is defined on the resulting cumulative borders (Dobler et al., 27 Aug 2025, Levi et al., 2018, Pappas, 2010, Dobler et al., 26 Jun 2025).
| Setting | Variables | Quadratic wiggle objective |
|---|---|---|
| Storylines | 4 | 5 |
| Discrete smoothing | 6 | 7 |
| Hilbert-space smoothing | 8 | 9 |
| Stacked area charts | ordering 0, borders 1 | 2 |
The discrete and continuous versions are closely aligned. A second-difference penalty in 3 and the Sobolev-space energy 4 both penalize curvature; the storyline objective 5 penalizes temporal displacement rather than second derivative, but it is likewise a positive semidefinite quadratic objective (Levi et al., 2018, Pappas, 2010, Dobler et al., 27 Aug 2025).
2. Ordered storyline formulation
A storyline instance is a 4-tuple 6, where 7 is the set of characters, 8 is an ordered set of discrete time steps, 9 is the set of meetings, and 0 is the set of time steps for which character 1 is active. Each active character 2 has a coordinate 3 at time 4. An ordered storyline instance specifies, for each 5, a permutation 6 of the active characters 7, with the requirement that every meeting at time 8 appears as a consecutive block in 9. A coordination is valid if 0 whenever 1 (Dobler et al., 27 Aug 2025).
The paper defines 2-nice coordinations by two spacing parameters 3 and 4. If two consecutive characters in 5 belong to the same meeting, then 6; otherwise 7. With neighbor sets
8
the full QWHMin model uses variables 9 and the linear constraints
0
1
optionally together with 2. The direct quadratic objective is
3
This is a convex quadratic program: the objective is a sum of squares, the constraints are linear, and in matrix form the Hessian is block-diagonal with nonnegative diagonal elements, i.e., positive semidefinite. The formulation is explicitly downstream of ordering, because crossing minimization is NP-hard and QWHMin assumes that the permutations 4 are already fixed (Dobler et al., 27 Aug 2025).
3. Solver model, routing geometry, and empirical behavior
For the alignment phase, QWHMin is solved as a continuous convex QP. The implementation described in the paper uses Gurobi (12.0.2); the LP for linear wiggle height minimization (LWHMin) and the ILP for wiggle count minimization (WCMin) use the same coordinate variables, but QWHMin requires no binary variables, and branch-and-bound appears only for WCMin (Dobler et al., 27 Aug 2025).
After computing the optimal coordinates 5, the routing phase replaces each vertical move by two circular arcs with radii 6 and 7 meeting tangentially at a crossover point. Writing
8
and 9 for the horizontal width of transition block 0, the exact geometric relation is
1
A curve segment is 2-monotone iff 3, equivalently 4. For each transition 5, the paper solves an LP that minimizes 6 subject to this relation, lower bounds 7, and additional linear constraints that enforce monotone radial distance for neighboring curves running in parallel.
The comparison among objective functions is structurally important. LWHMin minimizes 8 and tends to distribute vertical movement more uniformly; QWHMin minimizes 9 and therefore penalizes large movements more strongly, preferring many small movements over a few big ones; WCMin minimizes the number of nonzero movements and can therefore force some remaining movements to become large. On the reported benchmark instances, LP/QP runtimes were typically 0–1s on most instances, whereas ILP runtimes for WCMin ranged from sub-second to hours and sometimes did not finish within 24 hours. The case study spans novels, blockbusters, publication data, and rolling stock schedules; QWHMin achieved the minimum quadratic wiggle, but the paper notes that with the two-arc rendering style it could increase width and perceived oscillation relative to LWHMin (Dobler et al., 27 Aug 2025).
4. Smoothing, curvature penalties, and constrained formulations
Outside storyline visualization, quadratic wiggle height objectives are standard quadratic roughness penalties. A general unconstrained form is
2
and a sphere-constrained version is
3
A “wiggle height” penalty can be modeled by choosing 4 to encode curvature or roughness. For second-difference smoothing, with second-difference matrix 5, one sets 6 with 7, giving
8
which penalizes curvature. For graph-based signals, one may set 9 or 0 with 1 a graph Laplacian, thereby penalizing variation across edges (Levi et al., 2018).
In Hilbert spaces, the same principle is expressed through positive operators. Let 2 be a complex Hilbert space, 3 bounded, self-adjoint, and positive semidefinite, and consider the quadratic objective 4. Under linear constraints 5, the feasible set is 6. If 7 is positive semidefinite with closed range, minimization is performed on 8, and the minimal-energy minimizer is
9
For a canonical wiggle functional on 0,
1
one sets
2
Then 3 consists of polynomials of degree 4, so nonuniqueness arises unless the constraints fix that affine space. If 5, then the minimum value is 6; otherwise the minimizer is unique in 7 (Pappas, 2010).
This operator-theoretic view makes clear that quadratic wiggle height minimization is not tied to a single application domain. It includes minimum-curvature interpolation, minimum-variation smoothing on graphs, and discrete trust-region subproblems, all under a common positive-semidefinite quadratic structure (Levi et al., 2018, Pappas, 2010).
5. Sublinear-time approximation for very large quadratic objectives
When the wiggle objective is encoded as a large quadratic form, one can approximate its minimizer in sublinear time under a random-access model. The input is 8, 9, 00, and the algorithm assumes random access to entries 01 and 02, with bounded entries such as 03. It samples a random index set 04 by including each index independently with probability 05, where
06
The unconstrained algorithm forms 07 and 08, solves the sampled quadratic, and optionally lifts the sampled minimizer by zero-padding. The sphere-constrained variant solves the sampled trust-region problem with scaled radius
09
The query complexity is 10 for 11 and 12 for 13, and the solve time is polynomial in 14, for example 15 (Levi et al., 2018).
The key technical tool is a decomposition
16
where 17 is block-constant with a polylogarithmic number of blocks and 18 has small spectral norm. More precisely, for 19, 20, and any 21, the number of blocks in 22 is
23
and
24
This is stronger than the Frieze–Kannan decomposition for the purposes of quadratic minimization, because the analysis needs spectral-norm control rather than cut-norm control. The residual contributes at most
25
so the pseudorandom part is small on any vector of bounded norm.
For the unconstrained problem, if 26 is the full minimizer and 27 is the sampled minimizer, then with probability at least 28,
29
This improves the Hayashi–Yoshida dependence on 30 by replacing it with 31, with 32. For the sphere-constrained problem, if 33 is the full optimum and 34 the sampled optimum, then with probability at least 35,
36
The same paper also gives a sublinear-time approximation algorithm for computing top singular values, connecting the wiggle-minimization setting to Rayleigh-quotient computations (Levi et al., 2018).
6. Complexity landscape and related discrete variants
The computational status of quadratic wiggle objectives depends sharply on which variables remain free. In ordered storylines, the combinatorial ordering has already been fixed, so both LWHMin and QWHMin are polynomial-time solvable: the former is an LP and the latter is a convex QP. By contrast, wiggle count minimization is NP-complete, and the paper gives a reduction from Planar Monotone 3-SAT. It also identifies a special case in which 37, for which WCMin is polynomial (Dobler et al., 27 Aug 2025).
In stacked area charts, the discrete quadratic wiggle objective is attached to border changes generated by an ordering 38. With cumulative borders
39
the unweighted quadratic objective is
40
The weighted version is
41
For arbitrary 42, including 43, both 44-WiggleMin and Weighted-45-WiggleMin are strongly NP-complete. The paper further states that there is no PTAS unless a subexponential-time algorithm for SAT exists, and no constant-factor approximation under the Small-Set Expansion Hypothesis. An exact MILP is given for the weighted 46 objective, and replacing the linear objective by squared absolute-border-change terms yields an exact MIQP for Weighted-2-WiggleMin (Dobler et al., 26 Jun 2025).
A recurring pattern therefore separates combinatorial and continuous difficulty. Once the vertical order is fixed, quadratic wiggle height minimization often reduces to convex quadratic programming; when the order itself must be optimized, strong NP-hardness can reappear even for the quadratic 47 objective. This suggests that in visualization applications the dominant difficulty often lies in layer ordering, while the coordinate-assignment phase remains tractable and structurally quadratic (Dobler et al., 27 Aug 2025, Dobler et al., 26 Jun 2025).