Introduction
In high-stakes domains like medical imaging, the ability to quantify uncertainty is as critical as the prediction itself. While deep learning models have achieved remarkable accuracy in segmenting structures like tumors, cells, and organs, they rarely provide rigorous "error bars." This paper introduces a model-agnostic framework that uses mathematical morphology and Conformal Prediction (CP) to generate statistically guaranteed uncertainty margins around image segmentation masks.
The Challenge of Black-Box Uncertainty
Existing methods for Conformal Prediction typically require access to a model’s internal confidence scores, such as logits or sigmoid outputs. However, many real-world applications involve "black-box" models—proprietary software or complex foundation models where internal scores are either inaccessible or too noisy to be reliable. When internal scores are used, the resulting uncertainty regions can often be fragmented or biologically implausible. The proposed method bypasses these issues by operating solely on the final binary output.
Methodology: The Morphological "Balloon" Approach
The authors address these challenges by combining CP with mathematical morphology, specifically the dilation operation. Dilation expands the boundaries of a binary mask based on a structuring element (such as a small cross or square).
1. Calibration
The process begins with a held-out calibration dataset. For each image, the researchers determine a nonconformity score ($\lambda$), which is the minimum number of dilations required for the expanded mask to cover a specific target percentage ($\tau$) of the ground truth.
2. Statistical Guarantees
By calculating the $(1-\alpha)$ quantile of these nonconformity scores across the calibration set, the framework identifies a fixed number of dilations to apply to any new, unseen prediction. This produces a "prediction set"—the original mask plus a conformal margin—that is mathematically guaranteed to contain the ground truth at the desired coverage ratio with a probability of at least $1-\alpha$.
Experimental Results
The approach was evaluated across three distinct medical imaging tasks: White Blood Cell (WBC) segmentation, OASIS neuroimaging (MRI), and a multi-dataset collection for Polyp segmentation used to test robustness across clinical environments.
Key Findings
- Guaranteed Coverage: Across all datasets, the empirical coverage consistently met or exceeded the target confidence levels. For a 95% confidence request, the ground truth was captured at least 95% of the time.
- Efficiency and "Stretch": The method produces tight uncertainty regions. For the WBC dataset, the "stretch"—the ratio of the prediction set's area to the original mask—was as low as 1.108 for a 90% confidence level, meaning the safety margin added only about 10% more area.
- Robustness to Artifacts: By using binary masks and dilation, the method "smooths over" common deep learning artifacts, providing contiguous and biologically plausible margins rather than the scattered pixel clouds often produced by score-based methods.
Discussion and Future Work
A significant insight from this research is that the size of the required margin ($\lambda$) serves as a direct diagnostic tool for model quality; a model requiring fewer dilations to reach a confidence threshold is inherently more reliable than one requiring many.
However, the current method has limitations. It provides marginal guarantees (average performance across a dataset) rather than conditional guarantees (tailored to the difficulty of a specific image). Furthermore, because the method relies on dilating an existing prediction, it cannot recover "false negatives" that are spatially distant from the predicted object. Future work will focus on making these margins adaptive to image difficulty and extending the framework to multiclass segmentation scenarios.
Summary updated