Conformal Prediction Sets for Instance Segmentation

Kerri Lu, Dan M. Kluger, Stephen Bates, Sherrie Wang

Abstract

Current instance segmentation models achieve high performance on average predictions, but lack principled uncertainty quantification: their outputs are not calibrated, and there is no guarantee that a predicted mask is close to the ground truth. To address this limitation, we introduce a conformal prediction algorithm to generate adaptive confidence sets for instance segmentation. Given an image and a pixel coordinate query, our algorithm generates a confidence set of instance predictions for that pixel, with a provable guarantee for the probability that at least one of the predictions has high Intersection-Over-Union (IoU) with the true object instance mask. We apply our algorithm to instance segmentation examples in agricultural field delineation, cell segmentation, and vehicle detection. Empirically, we find that our prediction sets vary in size based on query difficulty and attain the target coverage, outperforming existing baselines such as Learn Then Test, Conformal Risk Control, and morphological dilation-based methods. We provide versions of the algorithm with asymptotic and finite sample guarantees.

Addressing the Reliability Gap in Instance Segmentation

Instance segmentation—the task of identifying and outlining individual objects in an image—has seen massive leaps in performance with models like the Segment Anything Model (SAM). However, these models remain "black boxes" regarding reliability. While they may provide confidence scores, these are rarely calibrated to actual physical accuracy.

Crucially, existing uncertainty methods for segmentation typically focus on "local" uncertainty, such as dilating or eroding a mask's boundary. This approach fails to capture structural uncertainty: the fundamental ambiguity of whether a region should be interpreted as one large object or multiple smaller ones. If a model is forced to select a single "best" mask, it may be incorrect in a way that simple boundary adjustments cannot rectify.

Methodology: Adaptive Confidence Sets

The proposed conformal prediction algorithm produces adaptive confidence sets through a multi-step process:

  1. Diverse Candidate Generation: Instead of relying on a single mask, the algorithm varies a "tunable parameter" $T$ of the underlying segmentation model (such as a watershed or logit threshold) to generate a variety of potential masks for a specific pixel query.
  2. Statistical Calibration: Using a held-out calibration dataset, the algorithm identifies a minimal subset of these parameters that "cover" the ground truth with a user-defined Intersection-over-Union (IoU) threshold $\tau$ at a specific error rate $\alpha$.
  3. Duplicate Removal: To maintain human interpretability, the algorithm removes "near-duplicate" masks. If two candidates are nearly identical, only one is retained.
  4. Adaptivity: The size of the prediction set adapts to the difficulty of the image. An unambiguous query might return a single mask, while a complex, ambiguous query might yield three or four distinct possibilities.
Figure 1: Comparison of the proposed conformal prediction sets against baseline methods. The conformal set captures structural uncertainty by providing multiple plausible masks, ensuring at least one has high IoU with the ground truth.

Experimental Evaluation

The method was evaluated across three distinct domains to demonstrate its versatility:

  • Fields of the World (FTW): Satellite imagery for agricultural field delineation, a task characterized by faint or overlapping boundaries.
  • Cellpose: Microscopy images for biological cell segmentation, involving crowded environments and local boundary noise.
  • Cityscapes: Street-level imagery for vehicle detection, a standard computer vision benchmark.

Key Results and Insights

The proposed method consistently outperformed baselines like Learn Then Test (LTT) and morphological dilation across several metrics:

  • Higher Coverage: In the agricultural field task, the method achieved 79.7% coverage (at IoU > 0.7) compared to only 66.3% for the best single-parameter baseline.
  • Improved Object Capture: In vehicle detection, coverage increased from 66.1% to 84.3%, demonstrating that the confidence set often contains the correct object even when the model's top-ranked prediction is inaccurate.
  • Interpretable Set Sizes: Despite offering multiple options, the sets remained small. In most cases, the algorithm returned three or fewer masks, expanding the set only when the query was truly ambiguous.
Figure 5: Qualitative results across three datasets (Field Delineation, Cell Segmentation, and Vehicle Detection) showing the conformal prediction sets and their corresponding IoU scores.

Conclusion and Future Work

This framework highlights the importance of addressing structural uncertainty in segmentation. By selecting a set of masks from different model parameters, the algorithm can present users with multiple hypotheses (e.g., "merged" vs. "split" regions) simultaneously.

Future research may focus on moving from "global" guarantees (averaged across all queries) to "local" guarantees that account for the specific difficulty of an individual image. Additionally, there is an opportunity to train models specifically to produce diverse, plausible candidates rather than optimizing for a single average output.

Summary updated

BibTeX
@misc{lu2026conformal,
  author = {Kerri Lu and Dan M. Kluger and Stephen Bates and Sherrie Wang},
  title = {{Conformal Prediction Sets for Instance Segmentation}},
  year = {2026},
  eprint = {2602.10045},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.10045},
}
Figure