Contrastive uncertainty learning for robust multi-structure segmentation in lower-pelvic MR

Bilal Sidiqi, Yipei Wang, Wen Yan, Shaheer U. Saeed, Daniel C. Alexander, Yipeng HuarXiv 2026

TL;DR

Contrastive Uncertainty Learning (CUL) is a new framework that uses a model's own "confusion" (predictive uncertainty) to improve medical image segmentation. By forcing the model to separate confident, correct features from ambiguous or incorrect ones in its internal representation, CUL significantly reduces boundary errors in complex prostate MRI scans without sacrificing overall accuracy.

What Problem Does This Paper Address?

In medical imaging, especially prostate MRI, boundaries between anatomical structures (like the prostate, bladder, and rectum) are often blurry and ambiguous. Standard deep learning models are usually trained using "overlap" losses like the Dice coefficient. While these are great for getting the general shape right, they are surprisingly insensitive to small but clinically significant errors at the boundaries.

Furthermore, while many researchers use "uncertainty" to flag potential errors after a model has finished its prediction (post-hoc), few have successfully used that uncertainty during the training process to actually teach the model to be more robust. The authors aim to bridge this gap, using uncertainty as a direct supervisory signal to prevent "feature collapse"—a situation where the model's internal embeddings for difficult boundary pixels become indistinguishable from clear, easy pixels, leading to catastrophic segmentation failures.

Methods

The authors propose Contrastive Uncertainty Learning (CUL). The core idea is to structure the model's "feature space" (the internal mathematical representation of the image) based on how confident the model is about each voxel.

  1. Uncertainty Estimation: The model uses Monte Carlo (MC) Dropout—running the same image through the network multiple times with different random neurons turned off—to generate an uncertainty map.
  2. Sampling Strategy: Based on this map and the ground truth, voxels are sorted into two pools:
  3. Anchors: Voxels that are both correctly predicted and have low uncertainty.
  4. Negatives: Voxels that are either misclassified or have high uncertainty.
  5. Contrastive Loss: The model is trained to "pull" same-class anchors together in feature space while "pushing" anchors away from the negative pool. This ensures that ambiguous features don't "pollute" the clean clusters of confident features.
Fig. 1: Overview of the proposed Contrastive Uncertainty Learning (CUL) frame- work. Prostate MRI is processed by a segmentation network to produce voxel wise predictions and an associated uncertainty map. Voxel embeddings are partitioned into low and high uncertainty regions and used to construct con- trastive pairs. Low-uncertainty same-class features are pulled together, while high-uncertainty or misclassified features are repelled, improving boundary ro- bustness.

The underlying architecture is a powerful Vision Transformer (ViT) encoder paired with a UperNet decoder, a combination known for handling multi-scale spatial information well.

Datasets

The study utilized a large, multi-institute dataset of 589 3D T2-weighted pelvic MRI scans. The task involved segmenting eight distinct anatomical structures: the bladder, bone, obturator internus, central gland, transition zone, rectum, seminal vesicle, and neurovascular bundle. The data was split into 412 scans for training, 60 for validation, and 117 for testing.

Key Insights and Ideas

  • Uncertainty as a Teacher: Instead of treating uncertainty as a warning light for humans, CUL treats it as a roadmap for the model. It tells the model: "These are the areas where your internal logic is failing; keep these features separate from the ones you've mastered."
  • Geometric "Insurance": The authors describe CUL as a form of geometric insurance. It doesn't necessarily make the "easy" cases better, but it provides a safety net that prevents the model from making massive, nonsensical errors in difficult cases.
  • Beyond Overlap: The research highlights that the Dice score (the standard metric) can be misleading. A model can have a high Dice score but still have boundary errors that would make it dangerous for applications like radiotherapy planning. CUL specifically targets these boundary errors.

Key Results

The results demonstrate that while global overlap (Dice) remained stable, the precision of the boundaries improved significantly:

  • Surface Distance (SD) Improvement: The mean surface distance dropped from 1.61mm to 1.42mm (p < 0.0001), indicating much tighter boundary alignment.
  • Structure-Specific Gains: CUL achieved statistically significant improvements in 6 out of 8 anatomical structures, including the bladder, bone, and central gland.
Table 4: Per-structure SD (mm ↓), n=117, paired Wilcoxon vs. Baseline. ∗p<0.05, ∗∗p<0.01, ∗∗∗p<0.001.
  • The 22x Asymmetry: In a "hard-case" analysis, the authors found that CUL was 22 times more likely to significantly improve a difficult case than to degrade it (18.8% improved vs. 0.9% degraded). This confirms its role as a robust "insurance" mechanism.
Table 2: Case-wise performance distribution (n=117). Significant improve- ment/degradation thresholds: SD ±0.1 mm, HD95 ±0.5 mm.
  • Hard Case Robustness: When looking specifically at the most difficult scans (those with the highest baseline error), CUL reduced the 95th percentile Hausdorff Distance (HD95) by an average of 1.11mm, whereas easy cases saw almost no change.

Limitations and Future Work

The authors acknowledge a few areas for further development:

  • Fixed Thresholds: The current model uses a fixed uncertainty threshold ($\tau = 0.5$) to define "low" vs "high" uncertainty. Future iterations could use adaptive thresholds that change during training.
  • Computational Overhead: Using MC Dropout during training increases the computational cost, as it requires multiple forward passes per image.
  • Domain Robustness: While tested on a multi-institute dataset, further work is needed to see how well this uncertainty-guided learning generalizes across different MRI scanner types and protocols.

Summary updated

BibTeX
@misc{sidiqi2026contrastive,
  author = {Bilal Sidiqi and Yipei Wang and Wen Yan and Shaheer U. Saeed and Daniel C. Alexander and Yipeng Hu},
  title = {{Contrastive uncertainty learning for robust multi-structure segmentation in lower-pelvic MR}},
  year = {2026},
  eprint = {2610.20251},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.20251},
}
Figure