Flow Stochastic Segmentation Networks

Fabio De Sousa Ribeiro, Omar Todd, Charles Jones, Avinash Kori, Raghav Mehta, Ben Glocker

TL;DR

This paper introduces Flow Stochastic Segmentation Networks (Flow-SSNs), a novel generative model for image segmentation that can capture complex, high-rank pixel-wise covariances without the limitations of previous methods. By leveraging normalizing flows, Flow-SSNs achieve state-of-the-art results on challenging medical imaging tasks while being more efficient to sample from.

What Problem Does This Paper Address?

Semantic image segmentation aims to produce pixel-wise predictions that identify objects and their boundaries. Traditional methods often treat this as a deterministic classification task, overlooking the inherent uncertainty in real-world data, especially in medical imaging. This uncertainty can stem from various sources like indistinct boundaries, poor image quality, or even differing expert opinions. Existing probabilistic segmentation models often struggle to capture spatially correlated uncertainty, either by making restrictive low-rank assumptions on covariance matrices or by ignoring pixel correlations altogether. This limits their ability to represent the full spectrum of plausible segmentation outcomes, which is crucial for applications requiring reliable uncertainty estimates.

Methods

The core innovation is the Flow Stochastic Segmentation Network (Flow-SSN). Unlike prior Stochastic Segmentation Networks (SSNs) that relied on low-rank Gaussian distributions for modeling uncertainty, Flow-SSNs utilize normalizing flows. This allows them to:

  • Estimate Arbitrarily High-Rank Covariances: Flow-SSNs don't assume a low rank for pixel-wise covariances. Instead, they learn a more expressive distribution.
  • Avoid Storing Distributional Parameters: The complexity is learned through the flow, not by explicitly storing covariance parameters.
  • Leverage Expressive Priors: The model dedicates most of its capacity to learning a conditional base distribution (the "prior") for the flow, making sampling more efficient.
  • Discrete and Continuous-Time Variants: The paper proposes both discrete-time autoregressive flows (using Inverse Autoregressive Flows - IAFs) and modern continuous-time flows (using Neural Ordinary Differential Equations - ODEs). Continuous-time flows offer more flexibility in modeling complex covariance structures.
  • Flow Matching (FM) for Training: For continuous-time flows, the authors adapt Flow Matching techniques, which provide a simulation-free way to train the ODE-based models.

Datasets

The paper evaluates Flow-SSNs on the following datasets:

  • MarkovShapes: A synthetic dataset introduced by the authors to precisely control the rank of pixel-space covariances, allowing for a clear demonstration of Flow-SSN's advantages over low-rank SSNs.
  • LIDC-IDRI: A standard benchmark for lung nodule segmentation, featuring multiple ground-truth label maps from different radiologists to capture inter-expert variability.
  • REFUGE-MultiRater: A benchmark for optic cup segmentation, also providing multiple expert annotations to reflect inherent variability.

Key Insights and Ideas

  • Low-Rank Assumption is a Bottleneck: The theoretical analysis demonstrates that even with induced rank increases, the effective rank of covariances in traditional SSNs grows sublinearly with the assumed rank, limiting their expressivity. Flow-SSNs directly address this by not making such assumptions.
  • Flows for Covariance Modeling: Normalizing flows are a natural fit for modeling complex, high-dimensional distributions, making them ideal for capturing rich pixel-wise covariances in segmentation.
  • Prior-Centric Design for Efficiency: By learning a powerful, fixed prior and using a lightweight flow for dependencies, Flow-SSNs achieve significant sampling efficiency gains compared to diffusion models.
  • Discrete vs. Continuous Trade-offs: While continuous-time flows offer greater flexibility, discrete-time autoregressive flows can be significantly faster for sampling, as demonstrated on the REFUGE-MultiRater dataset.

Key Results

  • State-of-the-Art Performance: Flow-SSNs achieve state-of-the-art results on LIDC-IDRI and REFUGE-MultiRater benchmarks across metrics like Generalised Energy Distance (GED), Dice, and Hungarian-Matched Intersection over Union (HM-IoU).
  • Fewer Parameters: Flow-SSNs achieve these results with fewer parameters compared to many baseline methods.
  • Improved Sampling Efficiency: Flow-SSNs are significantly more efficient to sample from than standard diffusion-based segmentation models, with some variants being up to 10x more efficient than CCDM.
  • MarkovShapes Demonstration: On the synthetic MarkovShapes dataset, Flow-SSN accurately models the true covariance and generates faithful samples, while a rank-2 SSN fails and produces erroneous samples.

Limitations and Future Work

  • Discrete-Time Flow Speed: While discrete-time Flow-SSNs can be faster, the paper notes that continuous-time flows are generally expected to outperform them in expressivity, suggesting further exploration into optimizing discrete-time models.
  • Foundation Models as Priors: The authors suggest leveraging large foundation models as flexible priors for continuous-time Flow-SSNs as a promising avenue for future work.
  • Real-World Applications: The paper highlights the potential of Flow-SSNs for safety-critical applications with inherent ambiguities, such as medical imaging, implying future work could focus on deploying these models in clinical settings.

Summary updated

BibTeX
@inproceedings{ribeiro2025flow,
  author = {Fabio De Sousa Ribeiro and Omar Todd and Charles Jones and Avinash Kori and Raghav Mehta and Ben Glocker},
  title = {{Flow Stochastic Segmentation Networks}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure