Stochastic Segmentation with Conditional Categorical Diffusion Models

Lukas Zbinden, Lars Doorenbos, Theodoros Pissas, Adrian Thomas Huber, Raphael Sznitman, Pablo Márquez-Neila · DOI

Introduction

Standard semantic segmentation models are typically designed to produce a single, deterministic output. However, real-world data often contains inherent ambiguity, known as aleatoric uncertainty. In medical imaging, for instance, different expert radiologists may provide varying annotations for the same tumor boundary. In autonomous driving, the exact limits of a distant crowd or a sidewalk can be interpreted in multiple valid ways. Deterministic models forced to produce a single "average" mask often result in blurry boundaries or a false sense of certainty that ignores critical edge cases.

To address this, researchers have developed the Conditional Categorical Diffusion Model (CCDM). Unlike traditional methods that struggle with high-dimensional stochastic outputs, CCDM treats segmentation as a generative task over discrete categories, learning the entire distribution of possible labels for a given image.

Methodology

CCDM is built upon the principles of Denoising Diffusion Probabilistic Models (DDPMs), but with a critical shift from continuous to categorical space.

Categorical Diffusion Process

While most diffusion models add Gaussian noise to continuous data, CCDM employs a forward process that gradually replaces discrete labels with uniform noise across $L$ possible classes. The model is conditioned on the original input image $I$. During the reverse process, the model starts with a map of random noise and, guided by the image features, iteratively cleans it to produce a valid segmentation mask.

Overview of the Conditional Categorical Diffusion Model (CCDM) architecture and reverse process.

Architecture and Features

The core architecture utilizes a U-Net-like backbone enhanced with self-attention. To improve performance on complex, high-resolution scenes, the authors introduced CCDM-Dino, a variant that incorporates high-level visual features from a pre-trained Dino-ViT transformer. This allows the model to capture global context more effectively without a massive increase in parameter count. Furthermore, the authors refined the mathematical formulation of the reverse process to ensure more stable training compared to previous categorical diffusion attempts.

Experimental Setup

The model was evaluated on two benchmarks representing different types of ambiguity:

  1. LIDC (Lung Image Database Consortium): A medical dataset where each image is annotated by four different radiologists, serving as the gold standard for multi-rater disagreement.
  2. Cityscapes: A benchmark for urban scene segmentation involving 19 object categories, testing the model's ability to handle high-resolution complexity.

Key Results

CCDM achieved state-of-the-art (SOTA) performance on the LIDC dataset, particularly in terms of Generalized Energy Distance (GED). This metric confirms that the distribution of samples generated by the model statistically matches the variation seen across human experts.

Comparison of ground-truth annotations from multiple radiologists versus samples generated by CCDM on the LIDC dataset.

On the Cityscapes dataset, CCDM-Dino achieved a mean IoU of 65.8% at $256 \times 512$ resolution. Notably, it outperformed established deterministic models like HRNet and UPerNet while using significantly fewer parameters (30M vs. up to 83M). Qualitatively, CCDM produces sharper and more realistic structures in ambiguous regions, such as tree boundaries or distant crowds, where deterministic baselines often produce indistinct "blobs."

Conclusion and Future Work

CCDM successfully demonstrates the power of generative modeling for semantic segmentation, effectively capturing expert disagreement and environmental ambiguity. However, challenges remain regarding inference speed, as the iterative nature of diffusion (requiring hundreds of steps) is slower than one-shot architectures. Future research may explore "latent diffusion" techniques to perform the process in a compressed space, potentially enabling real-time application and scaling to megapixel resolutions.

Summary updated

BibTeX
@inproceedings{zbinden2023stochastic,
  author = {Lukas Zbinden and Lars Doorenbos and Theodoros Pissas and Adrian Thomas Huber and Raphael Sznitman and Pablo Márquez-Neila},
  title = {{Stochastic Segmentation with Conditional Categorical Diffusion Models}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  doi = {10.1109/iccv51070.2023.00109},
}
Figure