GRSA: Generalized range swap algorithm for the efficient optimization of MRFs

Kangwei Liu, Junge Zhang, Peipei Yang, Kaiqi HuangCVPR 2015

Abstract

The Generalized Range Swap Algorithm (GRSA) significantly speeds up and broadens the applicability of Markov Random Field (MRF) optimization. By formulating the selection of "moves" as a Set Cover Problem and providing a new sufficient condition for submodularity, GRSA allows range swap algorithms to handle a wider variety of energy functions beyond truncated convex ones while running up to 14 times faster than previous state-of-the-art methods.

Introduction

Markov Random Fields (MRFs) are a mathematical backbone for computer vision tasks like stereo matching, image restoration, and segmentation. Optimizing these fields—finding the most likely label for every pixel—is notoriously difficult and NP-hard. Standard "graph-cut" algorithms like $\alpha$-expansion and $\alpha\beta$-swap are popular due to their speed, but they are limited to choosing between two labels in any given step.

"Range move" algorithms were developed to allow pixels to choose from a larger set of labels simultaneously, leading to better solutions. However, these had two major flaws: they only worked for specific "truncated convex" energy functions, and they were incredibly slow because they executed every possible range move, many of which were redundant. GRSA addresses these limitations through a more general mathematical framework and efficient move scheduling.

Methods

Expanding the Energy Palette

To use graph cuts for optimization, the energy function must be submodular. Previous range move methods were restricted to truncated convex functions to guarantee this. The authors propose a new theorem providing a sufficient condition for submodularity. This allows them to identify "candidate intervals" within arbitrary semimetric functions—such as piecewise linear or Geman-McClure functions—where the submodular property holds. By restricting label subsets to these intervals, range moves can be applied to a much broader class of vision problems.

Move Scheduling via Set Cover

Instead of blindly running every possible range move, GRSA treats move selection as a Set Cover Problem (SCP). The goal is to find the smallest collection of label subsets that covers every possible pair of labels at least once. Using a greedy algorithm, GRSA dynamically picks moves that cover the most "unvisited" label pairs with the least overlap. This ensures that every label has a chance to swap with every other label while drastically reducing the total number of expensive graph-cut computations.

Key Results

Efficiency and Scaling

On synthetic data, GRSA reduced running time by more than 80% compared to traditional range swaps. As shown in the scaling analysis, GRSA maintains a computational profile much closer to the fast but limited $\alpha\beta$-swap algorithm than to previous range swap implementations.

Running time vs. node size, demonstrating GRSA's superior scaling compared to traditional range swaps.

Convergence and Quality

In image restoration tasks, GRSA was 3–14 times faster than previous range swap methods. Despite this speedup, GRSA obtained competitive or superior energy levels. While $\alpha\beta$-swap is fast, it often converges to higher energy states. GRSA achieves the lower energy states characteristic of range move methods but at a fraction of the time.

Energy vs. Time comparison showing GRSA's rapid convergence to low energy states.

In stereo matching on the Tsukuba dataset, GRSA achieved an error rate of 4.5%, significantly outperforming $\alpha\beta$-swap, which had a 10.3% error rate. The algorithm typically requires a similar number of cycles to converge as older methods but performs far fewer moves within each cycle, leading to its massive efficiency gains.

Conclusion

GRSA is a framework that generalizes several existing MRF optimization methods. By leveraging local convexity and efficient set-based scheduling, it provides a powerful tool for complex vision tasks. Future work may involve more sophisticated cost functions for the Set Cover Problem and predictive move selection to further optimize the energy descent path.

Summary updated

BibTeX
@inproceedings{liu2015grsa,
  author = {Kangwei Liu and Junge Zhang and Peipei Yang and Kaiqi Huang},
  title = {{GRSA: Generalized range swap algorithm for the efficient optimization of MRFs}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2015},
  doi = {10.1109/cvpr.2015.7298785},
}
Figure