Optimizing Expected Intersection-Over-Union with Candidate-Constrained CRFs

Faruk Ahmed, Daniel Tarlow, Dhruv BatraICCV 2015

Abstract

We study the question of how to make loss-aware predictions in image segmentation settings where the evaluation function is the Intersection-over-Union (IoU) measure that is used widely in evaluating image segmentation systems. Currently, there are two dominant approaches: the first approximates the Expected-IoU (EIoU) score as Expected-Intersection-over-Expected-Union (EIoEU), and the second approach is to compute exact EIoU but only over a small set of high-quality candidate solutions. We begin by asking which approach we should favor for two typical image segmentation tasks. Studying this question leads to two new methods that draw ideas from both existing approaches. Our new methods use the EIoEU approximation paired with high quality candidate solutions. Experimentally we show that our new approaches lead to improved performance on both image segmentation tasks.

Introduction

In semantic image segmentation, the gold standard for evaluation is Intersection-over-Union (IoU). Unlike simple pixel-wise accuracy, IoU accounts for the overlap between the predicted mask and the ground truth, making it much more representative of human judgment. However, IoU is a "high-order" loss. In a Conditional Random Field (CRF)—the standard probabilistic framework for this task—the probability of a segmentation depends on all pixels simultaneously. This makes calculating the Expected IoU (the core requirement of Bayesian Decision Theory to minimize risk) mathematically intractable because it requires summing over an exponentially large number of possible segmentations.

Historically, researchers have taken two main paths to address this:

  1. Approximating the loss (EIoEU): Using a "greedy" heuristic to optimize a simplified version of IoU that factorizes over pixels.
  2. Approximating the distribution (EMBR): Calculating the exact IoU, but only over a small set of "candidate" solutions (e.g., the top 30 most likely segmentations).

Methodology: Unifying Loss and Distribution Approximations

This work bridges the gap between these two approaches. The authors observe that the EIoEU approximation is actually exact if the probability distribution is a single point (a delta function). This realization motivates the development of Candidate-Constrained CRFs ($C^3$RFs).

Conceptual transition from full distribution to discrete candidates and then to regions of probability mass (Hamming balls).

Instead of treating a candidate as a single point, $C^3$RFs treat it as the center of a "Hamming ball"—a region of the solution space where segmentations are similar to the candidate. To make this tractable, the authors use Higher-Order Potentials (HOP) and cardinality trees to constrain the CRF to these Hamming balls. They then employ the Bethe approximation to estimate the "mass" (total probability) of these regions. This allows the model to favor a candidate not just because it has a high individual score, but because it represents a large, high-probability neighborhood of the solution space.

Experimental Results

The proposed methods were evaluated across three distinct tasks: toy grid problems, interactive binary segmentation, and category-level semantic segmentation on PASCAL VOC 2012.

Performance results across toy grids (a), binary foreground-background segmentation (b), and PASCAL category segmentation (c).

Key Findings:

  • Accuracy of Mass Estimation: On toy $N \times N$ grids, the Bethe estimator for region mass proved highly accurate, significantly outperforming sampling-based baselines as shown in Figure (a) above.
  • Superior Segmentation Performance: On PASCAL VOC 2012, the $C^3$RF-EIoEU method achieved a ~1.35% improvement over the standard MAP baseline and outperformed the previous state-of-the-art EMBR method.
  • The Importance of Enumeration: Simply replacing standard greedy search with an enumeration over diverse candidates (generated via DivMBest) significantly improved the performance of existing EIoEU approximations.

Conclusion

The core insight of this work is that we should prioritize solutions that sit within the most "probability mass" rather than just the single highest score. By unifying loss-aware prediction with candidate-constrained distributions, $C^3$RFs provide a robust framework for optimizing complex metrics like IoU. While the current implementation uses hard Hamming balls, future work may explore "soft" assignments to further refine the influence of candidate solutions.

Summary updated

BibTeX
@inproceedings{ahmed2015optimizing,
  author = {Faruk Ahmed and Daniel Tarlow and Dhruv Batra},
  title = {{Optimizing Expected Intersection-Over-Union with Candidate-Constrained CRFs}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2015},
  url = {https://openreview.net/forum?id=rkRAgzuZH},
}
Figure