As easy as 1, 2... 4? Uncertainty in counting tasks for medical imaging

Zach Eaton-Rosen, Thomas Varsavsky, Sebastien Ourselin, M. Jorge CardosoarXiv 2019 · arXiv

TL;DR

This paper introduces a multi-task deep learning framework to directly estimate predictive intervals (PIs) for counting tasks in medical imaging, such as cell or lesion counting. By replacing unstable "Quality-Driven" losses with a novel formulation based on Kullback-Leibler (KL) divergence, the authors produce uncertainty bounds that are significantly narrower and more reliable than traditional sampling-based methods like Monte Carlo Dropout.

What Problem Does This Paper Address?

In medical imaging, counting objects—like nuclei in histology or lesions in brain scans—serves as a critical biomarker for diagnosis and treatment planning. However, a point estimate (e.g., "there are 25 cells") is often insufficient for clinical decision-making. Clinicians need to know the uncertainty of that measurement.

Existing methods for quantifying uncertainty generally fall into two camps:

  1. Epistemic (Model) Uncertainty: Captured by sampling multiple predictions (e.g., MC Dropout or M-Heads).
  2. Aleatoric (Data) Uncertainty: Captured by regressing noise parameters.

The challenge is that these methods often require complex post-hoc calibration to produce valid predictive intervals (e.g., a range that contains the true count 95% of the time). Even after calibration, these intervals are often uninformatively wide. This paper seeks a way to train a network to output narrow, accurate intervals directly from image features.

Methods

The authors propose a multi-task U-Net architecture designed to perform segmentation, density estimation, and interval regression simultaneously.

Fig. 2: Multi-task architecture for simultaneous segmentation and uncertainty prediction. All convolutions are 3×3 by the channel width, denoted in the dia- gram. The U-Net is complemented by an ‘arm’ which has residual blocks followed by max-pooling (maintaining 64 filters) until it reaches the output layer, where it returns an upper and lower bound. Dropout is enabled for methods that re- quire MC-sampling where indicated in the diagram, with p = 0.5. The bounds are trained with the loss from Equation 2.

The Novel Loss Function

The core contribution is the $L_{distribution}$ loss. Previous work attempted to regress intervals using a "Quality-Driven" (QD) loss, which penalizes intervals for being too wide or for failing to capture the ground truth. However, the authors found the QD loss unstable due to its one-sided nature.

Instead, they treat the status of a data point (being "under," "in," or "over" the predicted interval) as a discrete probability distribution $Q$. They then use KL divergence to encourage $Q$ to match a target distribution $P$ (e.g., for a 90% interval, $P = [0.05, 0.90, 0.05]$). To make this differentiable, they use a "soft membership" function based on sigmoids to determine if a ground-truth count falls within the predicted bounds $b_l$ and $b_u$.

Datasets

The method was evaluated on two distinct medical imaging tasks:

  1. Histopathological Cell Counting: A dataset of 33 labeled histology slides (512x512) across 7 tissue types. The network learns to predict counts based on segmentation, Euclidean Distance Transforms (EDT), and density maps.
  2. White Matter Hyperintensity (WMH) Counting: A dataset of 60 brain MRI subjects used for lesion counting, a common task in neuroradiology.
Illustrative figure of cell data showing ground-truth labels, segmentation, density, and EDT targets.

Key Insights and Ideas

  • Direct Regression vs. Sampling: Directly regressing the bounds ($b_l, b_u$) is more efficient and effective than trying to derive intervals from the variance of multiple stochastic passes (like MC Dropout).
  • Stability through KL Divergence: Moving from a simple penalty-based loss to a distribution-matching loss (KL divergence) makes the training process for predictive intervals much more stable and flexible.
  • Feature-Aware Error: Unlike simple baselines that might assume a fixed percentage error (e.g., ±10%), this model uses actual image features to decide when it is more or less certain, leading to tighter bounds where the data is clearer.

Key Results

The proposed method consistently outperformed baselines by providing the narrowest intervals while maintaining the target coverage (inlier percentage).

  • Cell Counting: The proposed method achieved a calibrated mean interval width ($W_{cal}$) of 12.20, compared to 18.61 for the best simple baseline and over 48.0 for calibrated MC sampling.
  • Lesion Counting: The method produced a width of 10.93, whereas the M-Heads baseline required a width of 24.1 to capture the same percentage of data.
  • High Correlation: All models maintained high Pearson correlation ($\rho \approx 0.96$ for cells) between predicted and ground-truth counts, ensuring that the primary counting task remained accurate while adding uncertainty information.
Fig. 3: Here we contrast our model (left) with the model with fitted percentage noise. The points represent the ground truths, and the lines represent the upper bound, mean and lower bound (note that the lines are for ease of visualisation: the x-axis is not continuous).

Limitations and Future Work

  • Out-of-Distribution (OOD) Data: The authors acknowledge that the model is unlikely to generalize well to samples drawn from outside the training distribution. They suggest domain-adaptation methods as a potential solution.
  • Interpretability: The model is currently a "black box" regarding how it decides on specific bounds. Future work could involve introspection methods to understand which image features trigger higher uncertainty.
  • Dimensionality: While tested on 2D tasks, the authors aim to extend this framework to 3D counting problems and a wider range of clinical biomarkers.

Summary updated

Abstract

Counting is a fundamental task in biomedical imaging and count is an important biomarker in a number of conditions. Estimating the uncertainty in the measurement is thus vital to making definite, informed conclusions. In this paper, we first compare a range of existing methods to perform counting in medical imaging and suggest ways of deriving predictive intervals from these. We then propose and test a method for calculating intervals as an output of a multi-task network. These predictive intervals are optimised to be as narrow as possible, while also enclosing a desired percentage of the data. We demonstrate the effectiveness of this technique on histopathological cell counting and white matter hyperintensity counting. Finally, we offer insight into other areas where this technique may apply.
BibTeX
@misc{eatonrosen2019as,
  author = {Zach Eaton-Rosen and Thomas Varsavsky and Sebastien Ourselin and M. Jorge Cardoso},
  title = {{As easy as 1, 2... 4? Uncertainty in counting tasks for medical imaging}},
  year = {2019},
  eprint = {1907.11555},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.11555},
}

Loading related content...

Figure