Total variation on a tree

Vladimir Kolmogorov, Thomas Pock, Michal RolinekarXiv 2015

This paper, "Total variation on a tree," by Kolmogorov, Pock, and Rolinek, presents a suite of highly efficient algorithms for a fundamental problem in computer vision and image processing: Total Variation (TV) minimization. By focusing on tree-structured graphs, the authors derive exact solvers that are significantly faster than previous methods, particularly for non-convex and piecewise-linear scenarios.

TL;DR

The authors develop state-of-the-art dynamic programming algorithms for minimizing total variation on trees, achieving complexities as low as $O(n \log \log n)$ for certain convex cases. These fast 1D solvers are then used as highly parallelizable building blocks to solve complex 2D image restoration and stereo matching problems an order of magnitude faster than existing techniques.

What Problem Does This Paper Address?

Total Variation (TV) regularization is a powerful tool for denoising and inverse problems because it suppresses noise while preserving sharp edges. The standard problem involves minimizing a functional that balances "data fidelity" (unary terms) with "smoothness" (pairwise terms based on the $L_1$ norm of gradients).

While efficient solvers exist for simple 1D chains, many real-world applications require handling:

  1. More complex structures: Moving beyond simple chains to tree-structured graphs.
  2. Non-convexity: Using "truncated" TV or non-convex data terms to better model outliers or discrete labels.
  3. Efficiency: Solving these problems fast enough for high-resolution 2D images.

The authors tackle the general problem of minimizing $f(x) = \sum_{i \in V} f_i(x_i) + \sum_{(i,j) \in E} f_{ij}(x_j - x_i)$ where $(V, E)$ is a tree, $f_i$ are unary terms, and $f_{ij}$ are TV-based pairwise terms.

Methods

The core approach is Dynamic Programming (DP) via message passing. The algorithm performs a "forward pass" from leaves to the root to compute messages (partial costs) and a "backward pass" to extract the optimal solution.

The technical innovation lies in how these messages are represented and updated:

  • Non-convex Case: The authors show that if unary terms are piecewise-linear, the messages remain piecewise-linear. They provide a specialized algorithm for min-convolution (a key step in DP) that manages the number of breakpoints in these functions efficiently.
  • Convex Case: They introduce several optimized algorithms:
  • An $O(n)$ time and memory-efficient solver for quadratic unaries on a chain.
  • An $O(n \log n)$ solver for piecewise-linear/quadratic unaries on trees using min-max heaps to manage function breakpoints.
  • A breakthrough $O(n \log \log n)$ solver for piecewise-linear unaries on chains, utilizing a divide-and-conquer strategy inspired by parametric max-flow techniques.
  • 2D Scaling: To solve 2D image problems, they use Lagrangian decomposition. This breaks a 2D grid into a set of independent 1D horizontal and vertical chain problems, which are solved iteratively using their fast 1D algorithms. This approach is highly parallelizable.

Datasets

The authors evaluate their algorithms on standard computer vision benchmarks:

  • Synthetic 1D signals: Noisy sine waves and step functions to test computational complexity and scaling (Figure 5, 7).
  • "TV-Tree" image: A 400x296 grayscale image used for $L_1$ and $L_2$ denoising experiments (Figure 6, 8).
  • Middlebury "Motorcycle" dataset: A high-resolution stereo pair (1000x1482) used to evaluate non-convex truncated TV for disparity estimation (Figure 9, 11, 12).

Key Insights and Ideas

  • Piecewise Function Representation: The "aha moment" for the non-convex case is realizing that messages can be stored implicitly as sequences of slopes and breakpoints. This keeps the computational cost proportional to the number of segments rather than a discretized grid.
  • Avoiding Explicit Breakpoints: In the $O(n \log \log n)$ case, the authors prove that one can avoid explicitly computing all pairwise breakpoints $\lambda_{ij}$ by using a pivot-based divide-and-conquer strategy, significantly beating the standard $O(n \log n)$ comparison-based limit.
  • Min-Convolution as a Geometric Operation: Figure 1 illustrates how different pairwise terms $g(z)$ act as geometric operators (like shifting or clipping) on the input cost function $h(z)$.
Illustration of min-convolution for non-convex functions.

Key Results

  • Speedup: For 2D TV-$L_2$ and TV-$L_1$ denoising, the proposed "TV-Chains" approach converges significantly faster than standard pointwise primal-dual methods, achieving an order of magnitude improvement in CPU time (see Figures 6d and 8d).
  • Complexity: The empirical performance often matches the theoretical best-case. For piecewise-quadratic unaries, the algorithm scales near-linearly in practice, even when the theoretical worst-case is $O(n \log n)$.
  • Qualitative Improvement: In stereo matching, using non-convex Truncated TV (TTV) leads to much sharper discontinuities and better preservation of small details compared to standard convex TV.
Comparison of standard TV vs. Truncated TV (TTV) for stereo matching. TTV yields sharper edges.

Limitations and Future Work

  • Non-convex Convergence: While the algorithms for 1D trees are exact, using them within a 2D Lagrangian decomposition for non-convex problems (like truncated TV) lacks theoretical convergence guarantees, even though it works well in practice.
  • Breakpoint Explosion: In the non-convex case with finite truncation values ($C_{ij} < \infty$), the number of breakpoints could theoretically grow exponentially, though the authors note this isn't observed in their practical experiments.
  • Parallelization: While the 1D subproblems are independent, the current implementation was tested on a single CPU core. Implementing this on GPUs or multi-core systems is a clear next step for even greater speedups.

Summary updated

BibTeX
@misc{kolmogorov2015total,
  author = {Vladimir Kolmogorov and Thomas Pock and Michal Rolinek},
  title = {{Total variation on a tree}},
  year = {2015},
  eprint = {1502.07770},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1502.07770},
}
Figure