PHiSeg: Capturing Uncertainty in Medical Image Segmentation

Christian F. Baumgartner, Kerem C. Tezcan, Krishna Chaitanya, Andreas M. Hötker, Urs J. Muehlematter, Khoschy Schawkat, Anton S. Becker, Olivio Donati, Ender Konukoglu · MICCAI · 2019

In one paragraph

A normal segmentation network returns one mask. When experts disagree, or the border is blurry, there are many plausible masks, and PHiSeg learns to produce them. It is a conditional variational autoencoder (a VAE whose random code is also told about the image) with one random variable per resolution level. The coarsest variable decides the rough shape, and each finer one adds a residual correction at twice the resolution. Drawing a new sample means drawing a new set of codes and decoding.

What problem it fixes

The baseline is the Probabilistic U-Net, which injects one random code at the top (full-resolution) end of a U-Net. The authors name two weaknesses:

  1. Randomness enters at one place only, so variation at coarse scales (“is this lesion big or small?”) has to be squeezed through a single code.
  2. The code is concatenated as extra channels, so the network is free to ignore it. They report that, trained on a single annotator, the Probabilistic U-Net sometimes collapses to near-deterministic output.

PHiSeg’s answer is to make every skip connection of the U-Net a random sample. No information can reach the output from the image without passing through a sampling step, so the noise cannot be bypassed.

The model, intuition first

Sampling goes top-down:

  1. Draw the coarse code z_L from a distribution that depends on the image.
  2. A small network looks at that draw and the image features at the next finer resolution, and outputs a mean and a spread. Draw z_{L-1} from that Gaussian.
  3. Repeat until z_1 (full resolution).
  4. The decoder turns the codes into a mask: a rough mask from the coarsest level, then a residual added at each finer level.

Because each step sees the coarser draw, the fine detail stays consistent with the coarse choice.

Each z_\ell is a small feature map (image size divided by 2^{\ell-1}, with D=2 channels per location), not one vector. The paper reports this keeps the spatial structure and improves accuracy. The best model used 7 resolution levels, of which L=5 carry latents.

The formulas

p(s\mid x)=\int p(s\mid z_1,\dots,z_L)\,p(z_1\mid z_2,x)\cdots p(z_{L-1}\mid z_L,x)\,p(z_L\mid x)\,dz

Read left to right: the chance of mask s given image x is the average, over all code draws, of the chance the decoder produces s from those codes. Each conditional factor is an axis-aligned Gaussian (independent per location and channel):

p(z_\ell\mid z_{\ell+1},x)=\mathcal N\big(\phi^{(\mu)}_\ell(z_{\ell+1},x),\ \phi^{(\sigma)}_\ell(z_{\ell+1},x)\big)

where \phi^{(\mu)},\phi^{(\sigma)} are neural networks. The posterior q(z_\ell\mid z_{\ell+1},s,x) has the same form but also sees the ground-truth mask s.

Training

The integral cannot be computed, so the model maximises a lower bound on \log p(s\mid x) (the ELBO; see the ELBO page):

\mathcal L=\mathbb E_q\big[\log p(s\mid z)\big]-\alpha_L\,\mathrm{KL}\big[q(z_L\mid s,x)\,\|\,p(z_L\mid x)\big]-\sum_{\ell<L}\alpha_\ell\,\mathbb E_{q(z_{\ell+1}\mid s,x)}\Big[\mathrm{KL}\big[q(z_\ell\mid z_{\ell+1},s,x)\,\|\,p(z_\ell\mid z_{\ell+1},x)\big]\Big]

Two departures from the clean theory were needed for stable training:

How they judge it

Data: LIDC-IDRI lung nodules (1018 CT patches, 4 radiologists) and an in-house prostate MR set (68 patients, 6 annotators).

Results

Setup Metric Prob. U-Net PHiSeg, L=5
LIDC, all experts D^2_{GED} (lower is better) 0.2393 0.2248
Prostate, all experts D^2_{GED} 0.1322 0.0864
LIDC, one expert D^2_{GED} 0.4452 0.3225

Dice of the mean prediction is not significantly different from a plain U-Net, so the stochastic parts cost no accuracy. L=1 (no hierarchy) is worse, which is the evidence for the multi-level design.

Questions and doubts

Takeaways