Efficient Energy Minimization for Enforcing Label Statistics.

Yongsub Lim, Kyomin Jung, Pushmeet Kohli

Introduction

In computer vision, finding the most likely (MAP) label for every pixel in an image is a fundamental task, often modeled using Markov Random Fields (MRFs). However, standard MAP solutions frequently fail to capture the reality of the scene because the underlying models are imperfect. To address this, researchers often incorporate "prior statistics"—such as the expected area of an object or its center of mass—as hard constraints. While these constraints improve accuracy, they transform standard optimization problems into NP-hard ones, typically requiring slow Linear Programming (LP) or Quadratic Relaxation (QR) methods that suffer from rounding errors.

Methodology

This paper introduces a highly efficient method for solving constrained energy minimization problems by directly exploiting the discrete structure of the problem, avoiding continuous relaxations entirely.

Lagrangian Dual Formulation

Instead of solving the constrained primal problem, the authors propose maximizing its Lagrangian dual. This approach involves finding optimal Lagrange multipliers (penalties) for violating constraints. Because the dual problem is low-dimensional—with the number of variables equal to the number of constraints rather than the number of pixels—it is significantly more efficient than LP-based methods.

The Oracle and Cutting Plane Algorithm

The method assumes the existence of an "oracle," such as Graph Cuts, which can solve the unconstrained version of the energy function in polynomial time. To find the optimal Lagrange multipliers, a cutting plane algorithm iteratively calls this oracle to build a piecewise linear approximation of the dual function. This framework is versatile, handling linear constraints (like size and volume) as well as non-linear, higher-order constraints (like boundary length, variance, and covariance).

Key Insights: The Power of Geometry

A critical observation in this work is the effectiveness of the Variance Constraint (Vr). By constraining the variance of pixel coordinates, the model encourages the segmentation to be rounder and more compact. This geometric prior significantly reduces the "speckle" noise and fragmentation common in unconstrained or poorly constrained segmentations.

Comparison of segmentation without constraints (left) vs. with Boundary (Br) and Variance (Vr) constraints (right). The constrained version reduces the error rate from 27.20% to 2.97%.

Experimental Results

The researchers evaluated their method using the GrabCut dataset, testing scalability across various image resolutions up to $1024 \times 1024$.

  • Speed: The proposed method is 20–100x faster than Linear Relaxation and 200–300x faster than Quadratic Relaxation. High-resolution tasks that take minutes with QR are completed in seconds.
  • Accuracy: The method consistently produced lower pixel error rates (ER) than relaxation-based approaches. For instance, combining Mean (Mn) and Variance (Vr) constraints can yield extremely precise silhouettes.
Segmentation of a person silhouette using Mean (Mn) and Variance (Vr) constraints, achieving a highly accurate 0.63% error rate in just 3.61 seconds.

Limitations and Future Work

The primary requirement for this method is that the "Oracle" algorithm must be efficient, which usually requires the energy function to be submodular. If constraints break submodularity, the search range must be restricted. Additionally, the method currently assumes that target statistics (like expected area) are provided by the user or an external system. Future work may involve automating the estimation of these statistics and applying this discrete dual framework to other domains in machine learning where global constraints are necessary.

Summary updated

Abstract

Energy minimization algorithms, such as graph cuts, enable the computation of the MAP solution under certain probabilistic models such as Markov random fields. However, for many computer vision problems, the MAP solution under the model is not the ground truth solution. In many problem scenarios, the system has access to certain statistics of the ground truth. For instance, in image segmentation, the area and boundary length of the object may be known. In these cases, we want to estimate the most probable solution that is consistent with such statistics, i.e., satisfies certain equality or inequality constraints. The above constrained energy minimization problem is NP-hard in general, and is usually solved using Linear Programming formulations, which relax the integrality constraints. This paper proposes a novel method that directly finds the discrete approximate solution of such problems by maximizing the corresponding Lagrangian dual. This method can be applied to any constrained energy minimization problem whose unconstrained version is polynomial time solvable, and can handle multiple, equality or inequality, and linear or non-linear constraints. One important advantage of our method is the ability to handle second order constraints with both-side inequalities with a weak restriction, not trivial in the relaxation based methods, and show that the restriction does not affect the accuracy in our cases.We demonstrate the efficacy of our method on the foreground/background image segmentation problem, and show that it produces impressive segmentation results with less error, and runs more than 20 times faster than the state-of-the-art LP relaxation based approaches.
BibTeX
@article{lim2014efficient,
  author = {Yongsub Lim and Kyomin Jung and Pushmeet Kohli},
  title = {{Efficient Energy Minimization for Enforcing Label Statistics.}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2014},
  url = {https://openreview.net/forum?id=Hi8VIPBedTr},
}
Figure