Quantification of Uncertainty with Adversarial Models in Medical Image Segmentation

Hana Jebril, Thomas Pinetz, Günter Klambauer, Hrvoje BogunovićarXiv 2026

TL;DR

Standard deep learning models for medical image segmentation are notoriously overconfident, often masking critical errors at tissue and pathological boundaries. To solve this, the authors introduce QUAM-SM, a post-hoc framework that uses targeted adversarial search to identify "fragile" pixels where a model's decision is easily flipped. By doing so, it successfully disentangles epistemic (model) uncertainty from aleatoric (data) uncertainty, significantly outperforming existing uncertainty estimation methods.

What Problem Does This Paper Address?

In clinical workflows, medical image segmentation isn't just about getting the highest Dice score; it's about knowing when the model might be wrong. For instance, when tracking a tumor over time, a minor segmentation error could lead a clinician to mistake true disease progression for pseudo-progression.

Unfortunately, standard deep neural networks suffer from poor calibration—they are frequently overconfident, even when they are completely wrong. While methods like Deep Ensembles or Monte Carlo (MC) Dropout exist, they rely on stochastic sampling within a narrow region of the model's posterior distribution. This means they often fail to capture the full spectrum of potential prediction failures, particularly at subtle pathological boundaries where expert human annotators themselves might disagree.

Methods

Instead of relying on random sampling, QUAM-SM (Quantification of Uncertainty with Adversarial Models in Medical Image Segmentation) turns to adversarial search. The core intuition is elegant: pixels that the model is uncertain about are inherently easier for an adversarial agent to perturb into an incorrect class.

Fig. 1: QUAM-SM Overview: Following initial segmentation (yref), QUAM-SM utilizes post-hoc adversarial search across M adversarial model outputs to iden- tify predictive fragility. This fragility is decomposed into aleatoric and epistemic components and combined into a Total Uncertainty map, effectively distinguish- ing boundary instability (red star) from robust certain regions (blue stars).

The framework operates post-hoc on a fixed, pre-trained segmentation model through the following steps:

  1. Reference Segmentation: The model generates an initial baseline segmentation ($y_{ref}$) for a test image.
  2. Adversarial Model Search: The framework optimizes the model's weights to find alternative, plausible segmentation hypotheses. The optimization balances two losses:
  3. An adversarial loss that drives the pixel predictions toward a targeted adversarial label ($y_{mask}$).
  4. A penalty loss that ensures the model's predictions remain realistic and consistent with the training data manifold.
  5. Targeted Attack Strategies: The authors experimented with three ways to define the adversarial target ($y_{mask}$): Global Extreme Masks (GEM), Training-Based Masks (TBM), and Morphology-Augmented Masks (MAM). MAM applies morphological dilation or erosion to the reference mask, specifically probing structural instability right at the boundaries.
  6. Mixture Importance Sampling (MIS): Because adversarial search introduces bias, MIS is used to re-weight the sampled models, yielding a statistically consistent estimate of the true posterior.
  7. Uncertainty Decomposition: Using the Expected Entropy framework, the total uncertainty is cleanly separated into aleatoric uncertainty (inherent data ambiguity) and epistemic uncertainty (lack of model knowledge).

Datasets

The method was validated on two public multi-annotator datasets, which provide the ideal ground truth for evaluating uncertainty against human disagreement:

  • REFUGE Dataset ($D_R$): 1,200 color fundus photography images for optic disc and cup segmentation, where each image contains independent annotations from seven expert observers.
  • QUBIQ2021 Prostate Tumour Dataset ($D_Q$): 52 MRI volumes (using 2D slices) annotated by six different experts to capture prostate tumor boundaries.

Key Insights and Ideas

  • Adversarial Fragility as a Proxy for Uncertainty: Actively pushing a model to change its mind via targeted optimization explores the posterior distribution far more effectively than passive stochastic sampling (like MC Dropout).
  • Boundary Sensitivity via Morphology: The biggest "aha" moment in the ablation studies was the superiority of Morphology-Augmented Masks (MAM). Probing the local neighborhood of a boundary using erosion and dilation yields much more reliable uncertainty maps than forcing the model toward global extremes or random training masks.
  • True Alignment with Human Experts: By isolating aleatoric uncertainty, QUAM-SM aligns exceptionally well with actual inter-rater variability (the disagreement map between the 6-7 human experts), proving its clinical relevance.

Key Results

QUAM-SM consistently outperformed established baselines—including Deep Ensembles (DE), MC Dropout, Probabilistic U-Net (PUnet), and SURE—across both datasets.

Table 1: Comparison of uncertainty methods M (DE [9], MC [2], PUnet [8], SURE [11], TTA [19]) on REFUGE (DR) and QUBIQ2021 (DQ).
  • Higher Correlation with Ground Truth: On the REFUGE dataset, QUAM-SM achieved a Pearson Correlation Coefficient (PCC) of 0.79 for total uncertainty, vastly outperforming Deep Ensembles (0.57) and MC Dropout (0.59).
  • Better Goodness of Fit: The $R^2$ metric for aleatoric uncertainty reached 0.64 on REFUGE and 0.40 on QUBIQ2021, showing a massive leap over baseline methods which hovered much lower (e.g., SURE scored 0.08 and 0.13 respectively).
  • Qualitative Clarity: As shown in the qualitative visualizations, QUAM-SM produces sharp, well-defined uncertainty maps around object boundaries that closely mirror the true human expert entropy maps, whereas baselines often produce blurry or incomplete uncertainty fields.
Fig. 2: Qualitative comparison between our method and state-of-the-art for total and aleatoric uncertainty on the same cases.

Limitations and Future Work

Despite its strong performance, QUAM-SM has two primary limitations:

  1. Data Access Requirements: The framework requires access to the training data distribution during the test-time optimization phase to calculate the penalty loss and keep the adversarial models on the data manifold.
  2. Computational Overhead: Because it relies on a post-hoc optimization loop per test image (running $M$ iterations to find adversarial weights), it is computationally heavier than standard single-forward-pass uncertainty methods.

Future work will likely focus on accelerating this adversarial search to make it viable for real-time clinical deployment.

Summary updated

Abstract

Reliable pixel-level uncertainty quantification holds the potential to transform clinical workflows by enabling high-fidelity longitudinal monitoring and distinguishing true pathological changes from artifacts. Ideally, these models provide the stability required for critical treatment planning and surgical intervention. However, standard deep learning models often suffer from miscalibration, yielding overconfident predictions that mask underlying vulnerabilities at subtle pathological boundaries. To address this, we propose QUAM-SM, a post-hoc framework using targeted adversarial search to identify "adversarially fragile" pixels. By actively seeking perturbations that expose predictive instability, our method highlights regions where decisions are most vulnerable to being flipped. Importantly, the framework disentangles epistemic uncertainty from aleatoric uncertainty. Experiments on two public datasets with multiple expert annotations demonstrate that QUAM-SM outperforms both standard and recent uncertainty estimation approaches in terms of reliability and boundary sensitivity. Code is available at https://github.com/HanaJebril/quam_sm
BibTeX
@misc{jebril2026quantification,
  author = {Hana Jebril and Thomas Pinetz and Günter Klambauer and Hrvoje Bogunović},
  title = {{Quantification of Uncertainty with Adversarial Models in Medical Image Segmentation}},
  year = {2026},
  eprint = {2606.18860},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.18860},
}

Loading related content...

Figure