Improved Post-hoc Probability Calibration for Out-of-Domain MRI Segmentation

Cheng Ouyang, Shuo Wang, Chen Chen, Zeju Li, Wenjia Bai, Bernhard Kainz, Daniel Rueckert

Introduction

In safety-critical medical imaging applications, the reliability of a deep learning model is as important as its accuracy. While modern neural networks achieve high performance in segmentation tasks, they are notoriously prone to overconfidence. This phenomenon is particularly dangerous when models encounter "out-of-domain" (OOD) data—such as images with motion artifacts or scans acquired using different protocols—where the model may provide highly certain but incorrect predictions.

This paper addresses the challenge of probability calibration: ensuring that a model’s predicted probability (e.g., 70% confidence) aligns with the actual likelihood of being correct (70% accuracy). The authors propose a novel post-hoc calibration method that leverages local pixel susceptibility and global anatomical priors to provide more honest confidence scores without requiring retraining of the underlying segmentation model.

Methodology

The proposed framework is a post-hoc calibration model, designed as a lightweight, separate network that adjusts the outputs of a frozen, pre-existing segmentation model. The system generates a spatially varying temperature map ($T_i$), providing a specific scaling factor for every pixel to refine the model's confidence.

To compute this map, the architecture integrates two distinct sources of information:

  1. Local Level (Aleatoric-by-Augmentation): The system employs "test-time augmentation" by applying minor perturbations (e.g., brightness and contrast adjustments) to the input image. If a pixel's prediction is unstable under these perturbations, the calibration model identifies it as "susceptible" and lowers the confidence score for that region.
  2. Global Level (Shape Prior Module): A Denoising Autoencoder (DAE), pre-trained on high-quality cardiac segmentations, serves as an anatomical "second opinion." If the segmentation model produces a shape that violates known anatomical constraints, the shape prior flags the output as unreliable.

These features are processed through a shallow ResNet equipped with channel attention, which adaptively weighs local jitter against global shape consistency to produce the final calibrated probabilities.

Experimental Setup

The researchers evaluated their method across three distinct scenarios to test its robustness to domain shift:

  • Intra-domain Testing: Using the ACDC Dataset (cardiac MRI, bSSFP sequence) for standard performance benchmarks.
  • Artifact Resistance: Using the Torchio library to simulate common MRI issues, including bias fields, motion artifacts, ghosting, and k-space spikes.
  • Cross-protocol Testing: Using the MS-CMRSeg Challenge Dataset. The model was trained on bSSFP images but tested on Late Gadolinium Enhancement (LGE) images, representing a significant shift in imaging sequence.

Results and Discussion

The proposed method was compared against the previous state-of-the-art, Local Temperature Scaling (LTS), using Expected Calibration Error (ECE) and Static Calibration Error (SCE) as primary metrics.

  • Robustness to Artifacts: On images corrupted by simulated artifacts, the method reduced the ECE from 14.48% (LTS) to 12.78%.
  • Cross-Sequence Generalization: In the transition from bSSFP to LGE sequences, the ECE improved from 16.78% to 15.37%.
  • Qualitative Reliability: Visual analysis indicates that the resulting entropy maps—which visualize areas of model doubt—align more closely with actual segmentation errors than previous methods. This provides a more intuitive and reliable "warning light" for clinicians reviewing AI-generated segmentations.

Conclusion and Future Work

By treating pixel susceptibility as a proxy for uncertainty and using anatomical shape as a guardrail, this method significantly improves the trustworthiness of MRI segmentation in OOD scenarios. Because the approach is post-hoc, it can be integrated into existing clinical pipelines without modifying original model weights.

One limitation noted by the authors is that the current Shape Prior is optimized for regular structures like the heart. Future research will focus on developing more flexible shape priors capable of handling highly variable geometries, such as complex tumors or branching vascular structures, to extend the utility of this calibration technique to a broader range of pathologies.

Summary updated

BibTeX
@inproceedings{ouyang2022improved,
  author = {Cheng Ouyang and Shuo Wang and Chen Chen and Zeju Li and Wenjia Bai and Bernhard Kainz and Daniel Rueckert},
  title = {{Improved Post-hoc Probability Calibration for Out-of-Domain MRI Segmentation}},
  booktitle = {UNSURE @ MICCAI},
  year = {2022},
  url = {https://openreview.net/forum?id=qd2hkwOtBs},
}
Figure