Learning a Loopy Model For Semantic Segmentation Exactly

Andreas Christian Müller, Sven BehnkearXiv 2013

TL;DR

While exact inference in loopy graphical models is theoretically NP-hard, this paper demonstrates that exact learning of structural SVMs for semantic segmentation is practically feasible. By intelligently sequencing fast approximate inference, certifiable exact inference, and a novel dynamic caching scheme, the authors achieve guaranteed global optimality with minimal computational overhead.

What Problem Does This Paper Address?

Many computer vision tasks, such as semantic segmentation, are naturally modeled as image labeling problems using Conditional Random Fields (CRFs) or Markov Random Fields (MRFs) over pixel or superpixel graphs. Because these neighborhood graphs contain numerous cycles (loops), finding the exact most likely labeling—a step required repeatedly in the inner loop of max-margin training frameworks like Structural Support Vector Machines (SSVMs)—is an NP-hard problem.

Consequently, researchers have long assumed that exact learning of these loopy models is impossible. Instead, the community has relied on approximate inference methods. The major downside? These approximations offer no guarantees on how close the final learned parameters are to the true global optimum, leaving researchers uncertain whether poor performance stems from a flawed model or a sub-optimal training process.

Methods

The authors overcome this limitation by integrating multiple inference strategies within the one-slack cutting-plane training framework for SSVMs. Instead of relying on a single inference algorithm throughout the entire training process, they propose a multi-stage pipeline that transitions from fast to exact methods as training progresses:

  1. Cached Constraints: Reuses previous inference results to make quick initial progress without running full inference.
  2. Fast Under-generating Inference: Employs $\alpha$-expansion moves with Quadratic Pseudo-Boolean Optimization (QPBO) to quickly find good, feasible constraints.
  3. Certifiable Exact Inference: Utilizes the Alternating Direction Dual Decomposition ($AD^3$) method combined with a branch-and-bound strategy to find the exact solution and provide a mathematical certificate of optimality.

Additionally, they introduce a Dynamic Constraint Selection heuristic. This smart caching schedule decides whether to pull a constraint from the cache or run full inference based on how much the primal objective has shifted, preventing the algorithm from wasting time on unhelpful constraints.

Datasets

The approach was evaluated on two standard semantic image segmentation benchmarks:

  • MSRC-21: A dataset featuring 21 object classes, trained on 335 images from the standard training/validation split.
  • Pascal VOC 2010: A challenging benchmark for object category segmentation.

For both datasets, images were preprocessed into approximately 100 superpixels using the SLIC algorithm to form the underlying neighborhood graphs.

Key Insights and Ideas

  • The Power of Sequencing: You don't need to run slow, exact inference at every step of training. Fast approximations work perfectly early on; exact inference is only needed at the very end to certify that the global optimum has been reached.
  • Duality Gaps Matter: Under-generating methods (like standard graph cuts) are too optimistic about the primal objective and cannot provide a valid upper bound or a meaningful duality gap. Mixing them with over-generating/exact methods fixes this blind spot.
  • Optimization Peace of Mind: While exact learning doesn't drastically change final segmentation accuracy compared to good approximations, it provides a mathematical guarantee of optimality. This allows researchers to treat the optimizer as a reliable black box and focus entirely on feature engineering and model design.

Key Results

  • Massive Speedups via Smart Caching: The proposed dynamic caching scheme converged in 397 seconds on MSRC-21, compared to 1453 seconds using standard caching methods, and 2661 seconds with no cache at all.
Figure 1: Training time comparison using different caching heuristics. Large dots correspond to oQ, small dots correspond to oC, and the line shows oW . See the text for details.
  • Feasible Exact Learning: Guaranteeing exact optimality up to a tight tolerance ($\epsilon = 10^{-4}$) took only 18 minutes on MSRC-21 and 100 minutes on Pascal VOC 2010.
  • Competitive Performance: The exact model achieved an average accuracy of 79.0% on MSRC-21 and a Jaccard index of 30.4 on Pascal VOC 2010, matching or exceeding state-of-the-art CRF-based approaches using identical features.

Limitations and Future Work

The authors explicitly note that this exact inference approach is tailored for superpixel-based models (around 100 variables per image). It is not expected to scale efficiently to pixel-level models, which typically involve tens or hundreds of thousands of variables.

For future work, they suggest exploring other over-generating techniques, such as duality-based message passing algorithms, to find meaningful bounds on the true objective even within the massive pixel-level domain.

Summary updated

BibTeX
@misc{muller2013learning,
  author = {Andreas Christian Müller and Sven Behnke},
  title = {{Learning a Loopy Model For Semantic Segmentation Exactly}},
  year = {2013},
  eprint = {1309.4061},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1309.4061},
}
Figure