Stochastic Segmentation Networks: Modelling Spatially Correlated Aleatoric Uncertainty

Miguel Monteiro, Loïc Le Folgoc, Daniel Coelho de Castro, Nick Pawlowski, Bernardo Marques, Konstantinos Kamnitsas, Mark van der Wilk, Ben Glocker

Introduction

In many image segmentation tasks—especially in medical imaging—there is rarely a single "correct" ground truth. Different experts often disagree on the exact boundaries of a tumor or anatomical structure. This inherent ambiguity in the data is known as aleatoric uncertainty.

Most deep learning models approach segmentation as a collection of independent pixel-wise classifications. While effective for generating a single most-likely prediction, this approach fails to capture the spatial relationships between pixels. When sampling from such models, the result is often "grainy" noise because the model does not account for the fact that if one pixel belongs to a structure, its neighbor likely does too. Stochastic Segmentation Networks (SSNs) address this by modeling the joint distribution of the entire label map.

Methodology

The core innovation of SSNs is to stop assuming pixel independence and instead model the logit map (the pre-softmax values) as a multivariate normal distribution. To make this computationally feasible for high-resolution 2D and 3D images, the authors utilize a low-rank parameterization of the covariance matrix:

$$\Sigma = PP^T + D$$

  • $P$ (Covariance Factor): A low-rank matrix capturing primary spatial correlations (how groups of pixels move together).
  • $D$ (Diagonal): A diagonal matrix capturing independent pixel-wise variance.
Comparison of graphical models for image segmentation: (a) latent variable models like CVAEs, (b) standard pixel-wise models, and (c) the SSN approach modeling correlated logits.

This framework allows the model to be trained using a modified cross-entropy loss via Monte-Carlo sampling and the "re-parameterization trick." SSNs are designed as a "plug-and-play" head that can be added to existing architectures like U-Nets or DeepMedic.

Key Insights: Spatial Coherence vs. Grainy Noise

By modeling the joint distribution, SSNs produce alternative samples that look like realistic segmentations (e.g., a slightly larger or smaller tumor) rather than a "salt-and-pepper" mess of uncertain pixels. This is achieved through the low-rank factor $P$, which enforces spatial structure in the uncertainty.

Visualization of independent pixel-wise uncertainty (a) resulting in grainy samples, versus spatially correlated uncertainty (b) in SSNs which produces coherent segmentation hypotheses.

Unlike Conditional Variational Autoencoders (CVAEs), which require a partial forward pass for every new sample, SSNs only require a single forward pass to generate the distribution parameters. Subsequent sampling is extremely fast and scales linearly with the rank of the covariance matrix.

Experimental Results

The researchers evaluated SSNs on two major benchmarks:

  1. LIDC-IDRI (2D Lung Nodules): SSNs outperformed existing probabilistic models (Probabilistic U-Net and PHiSeg) in terms of Generalized Energy Distance (GED), which measures how well the predicted distribution matches the variety of expert opinions.
  2. BraTS 2017 (3D Brain Tumors): The model successfully captured structured uncertainty in high-dimensional volumetric data, where previous methods often struggled with memory constraints.

Notably, modeling uncertainty also improved the "mean" prediction accuracy (Dice Similarity Coefficient) compared to deterministic baselines, suggesting that learning the distribution of labels provides a useful regularizing effect during training.

Limitations and Future Work

While SSNs offer significant improvements, they rely on a "rank" hyperparameter for the covariance matrix that may be dataset-specific. Additionally, the multivariate normal distribution is unimodal; if the true distribution of labels is multi-modal (e.g., two distinct, equally plausible interpretations), a single Gaussian in logit space may struggle to represent both simultaneously. Future research may explore more complex distribution types or automated rank selection.

Summary updated

BibTeX
@inproceedings{monteiro2020stochastic,
  author = {Miguel Monteiro and Loïc Le Folgoc and Daniel Coelho de Castro and Nick Pawlowski and Bernardo Marques and Konstantinos Kamnitsas and Mark van der Wilk and Ben Glocker},
  title = {{Stochastic Segmentation Networks: Modelling Spatially Correlated Aleatoric Uncertainty}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure