MID: Mask-Image Distributional Divergence for Evaluating Medical Image Segmentation

Vincenzo Marcianò, Xiaoming Zhang, Gianluca Guglielmo, Michela Antonelli, Sebastien Ourselin, Maria A ZuluagaNeurIPS 2026

TL;DR

How do you know if a medical AI is tracing organs accurately when you deploy it on thousands of new, unlabeled hospital scans? Traditional metrics require human-drawn reference masks for every single scan, making real-world monitoring nearly impossible. This paper introduces MID (Mask-Image Distributional Divergence), a metric inspired by generative AI evaluation that grades segmentation quality across an entire population of scans—no per-patient ground truth required.

What Problem Does This Paper Address?

If you build a model to segment livers in CT scans, you usually test it using sample-wise overlap metrics like the Dice score or Hausdorff distance (HD95). These compare the AI's predicted mask against a radiologist's ground-truth mask, pixel by pixel.

That works great in a lab, right up until you deploy your model into the wild on unlabeled clinical cohorts. Without paired human annotations for every new scan, Dice and HD95 simply cannot be calculated. In generative AI (like image synthesis), researchers bypassed this paired-data bottleneck years ago using Fréchet Inception Distance (FID), which compares the statistical distribution of generated images against real ones. However, you can't blindly copy-paste FID to medical segmentation: a predicted liver mask might look anatomically gorgeous in isolation, yet sit completely in the wrong spot for that specific patient's scan.

Methods

To evaluate unlabeled predictions, the authors shift from comparing individual masks to comparing probability distributions over joint image-mask pairs.

Here is how MID works under the hood:

  1. Joint Encoding: You take a 3D scan and a predicted binary mask for a specific organ. Both are passed separately through a frozen, pretrained medical vision encoder (MedSigLIP) by averaging features across 16 uniformly sampled 2D slices. The image vector and mask vector are concatenated to lock in their pairing.
  2. Dimensionality Reduction: Because medical datasets are relatively small and high-dimensional covariance matrices are notoriously noisy to estimate, the joint vectors are compressed down to $k=128$ dimensions via Principal Component Analysis (PCA) fitted on a clean, labeled reference dataset.
  3. Distribution Matching: Just like standard FID, the algorithm fits multivariate Gaussians to the reference pool and your unlabeled candidate predictions, then computes the squared 2-Wasserstein (Fréchet) distance between them. Lower MID means your predicted image-mask pairs look statistically indistinguishable from real, ground-truth pairs.

What's novel: Beyond formulating segmentation evaluation in a joint embedding space, the authors introduce a neat diagnostic decomposition. By computing separate Fréchet distances on image features alone ($\text{MID}_{\text{img}}$) and mask features alone ($\text{MID}_{\text{mask}}$), whatever is left over from the total MID score isolates pure image-mask alignment ($\text{MID}_{\text{corr}}$).

Datasets

No new datasets are introduced, though the authors apply controlled synthetic corruptions (like smooth erosion, dilation, and ROOD-MRI acquisition artifacts) to stress-test the metric. They evaluate MID across 13 publicly available 3D datasets spanning CT, MRI, and magnetic resonance angiography (MRA):

  • Reference & Evaluation Pool (10 datasets): ACDC, IXI MRA (with VesselVerse annotations), six Medical Segmentation Decathlon tasks (Liver, Prostate, Lung, Pancreas, Spleen, Colon), and TotalSegmentator v2 (split into CT and MRI).
  • Held-out Candidate-Only Sets (3 datasets): AbdomenCT-1K, AMOS CT, and AMOS MRI.

Key Insights and Ideas

  • Catching the "Right Shape, Wrong Patient" Trap: If you take a dataset of perfect masks and randomly shuffle which scan they belong to, mask-only metrics won't blink—every mask is still anatomically realistic! When the authors ran this exact shuffling test, $\text{MID}_{\text{img}}$ and $\text{MID}_{\text{mask}}$ stayed flat, while the residual correspondence term ($\text{MID}_{\text{corr}}$) spiked, proving MID genuinely "sees" whether a mask fits its underlying anatomy.
  • Sensitivity to Anatomy over Raw Pixels: MID correlates much more strongly with Dice when masks suffer shape-altering corruptions (like erosion or elastic deformation) than when random false-positive blobs or missing slices are introduced. It cares about structural plausibility, not just voxel counts.
  • Sample Size Matters: Because MID estimates Gaussian moments, tiny test sets artificially inflate the score (finite-sample bias). The authors show MID stabilizes around 250 organ representations, offering concrete operating guidelines so practitioners don't misinterpret statistical noise as model failure.

Key Results

Across 840 controlled corruption scenarios, MID tracks segmentation degradation smoothly without ever seeing test-time ground truth, correlating cleanly with paired Dice (Spearman $\rho = -0.55$) and HD95 ($\rho = 0.72$), outperforming mask-only and standard 2D Inception-FID baselines.

Figure 1: Representative examples from the controlled corruption sweep (Experiment 1) and from a real segmentation model. The four panels show Task10 Colon with blob-shaped false positives, Task09 Spleen with smooth dilation, ACDC left ventricle with blob-shaped false positives, and Task07 Pancreas with SegResNet predictions after 50, 150, and 300 training epochs. Overlays show the ground-truth mask and the corrupted or predicted masks. Line plots show MID, Dice, and HD95 across severity levels or training epochs. In the ACDC panel, the line plots use Task09 Spleen population data as a proxy. MID is normalised by the panel-wise maximum for visualisation only; all reported correlations use raw values.

When tested on real-world clinical shifts against a clean abdominal CT reference, MID acts as a calibrated odometer for domain shift:

  • Same distribution (held-out CT): $0.011$ (the baseline noise floor).
  • Modality shift (same organs, MRI): $0.278$ (a $25\times$ jump).
  • Modality + Anatomy shift (Cardiac/Prostate MRI): $\sim 0.93–0.95$ ($\sim 85\times$ jump).

Finally, when ranking real 3D models (like nnUNet, SwinUNETR, and MedSAM), MID reproduces the exact ground-truth leaderboard on brain vessel segmentation—ranking nnUNet first ($\text{MID} = 0.0035$, Dice $0.83$), A2V second ($0.0091$, Dice $0.74$), and SPOCKMIP third ($0.026$, Dice $0.65$)—purely from unlabeled test predictions.

Figure 3: a) MID vs. Dice across real segmentation model outputs. Points are coloured by model; y-axis is log-scaled. b) Ground-truth and predicted-mask distributions for three IXI MRA vessel segmentation methods. The axes are the first two principal components of the ground-truth reference. Lines are iso-density contours. Legend values are MID in the full k = 128 space.

Limitations and Future Work

  • Single-Gaussian Assumption: Fitting one bell curve works well for homogeneous cohorts, but a pooled CT-and-MRI reference set is inherently bimodal. Mixture models may be needed to calibrate absolute scores across diverse hospital pools.
  • Anatomy Scale Differences: Raw MID scores span an order of magnitude between tiny structures (like adrenal glands) and massive ones (like the liver). You must interpret scores against organ-specific baselines rather than comparing a liver score directly to a vessel score.
  • Future Directions: The authors suggest developing a class-conditional MID variant to allow direct cross-organ comparisons, and expanding validation from 3D volumetric scans to natively 2D medical imaging like X-rays, histopathology, and fundus photography.

Summary updated

Abstract

Current evaluation protocols for medical image segmentation remain largely anchored in sample-wise comparisons, e.g., Dice and Hausdorff distance, which require each prediction to be paired with a ground-truth mask. Yet two limitations arise in practice: they are inapplicable when predictions are made on unlabeled data; and even when annotations are available, they cannot assess whether a collection of predictions matches the distributional structure of the ground-truth population. We introduce MID (Mask–Image Distributional Divergence), a distribution-level evaluation metric for medical image segmentation. MID builds upon the observation that segmentation quality is a property of the joint image-mask distribution: a mask may be anatomically plausible in isolation yet incorrect for the image it accompanies. MID compares the joint distribution of images and masks between a reference set and a set of predictions, without requiring sample-wise correspondence. This captures both mask realism and image-mask consistency. We evaluate MID across 13 publicly available datasets spanning CT, MRI, and MRA. Under anatomically realistic corruptions across 56 organ groups, MID tracks mean Dice and Hausdorff distance without per-sample ground-truth pairing. MID also detects distributional shifts across modalities and anatomies, identifies image-mask misalignment through controlled shuffling experiments, and produces reliable model rankings across real segmentation models.
BibTeX
@inproceedings{marciano2026mid,
  author = {Vincenzo Marcianò and XIAOMING ZHANG and Gianluca Guglielmo and Michela Antonelli and Sebastien Ourselin and Maria A Zuluaga},
  title = {{MID: Mask-Image Distributional Divergence for Evaluating Medical Image Segmentation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Oxe8M9Grah},
}
Figure