arXiv:2610.17354cs.CVOct 2026

Manuscript Offprint

arXiv:2610.17354

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

Vincenzo Marcianò, Xiaoming Zhang, Gianluca Guglielmo, Sebastien Ourselin, Michela Antonelli, Maria A. Zuluaga

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. Official implementation available at github.com/erc-caravel/pytorch-mid

1 Introduction

Deep learning has substantially advanced automatic medical image segmentation, yielding models that range from single-anatomy specialists [17, 30, 25] to pan-organ foundation models [18, 26, 27, 38, 41]. Evaluating these models remains fundamentally tied to per-sample ground-truth (GT) annotations at test time. Dice similarity coefficient, Hausdorff distance (HD95), and normalised surface distance (NSD) [29] each measure how accurately a predicted mask reproduces the paired GT annotation at the voxel level. Although they were effective in controlled experimental conditions, several practical challenges remain to be addressed. First, every prediction must be matched to an annotated GT, an assumption that fails during prospective deployment and when evaluating foundation models on unlabeled cohorts. Second, when GT annotations are unavailable, an alternative is to generate surrogate references using encoder-decoder refinement models [8, 14, 22, 31, 39]; however, these approaches require training additional models for each target dataset, which is computationally expensive and limits scalability.

Perceptual image quality assessment has similarly moved beyond pixel-level comparison toward feature-level distances in pretrained encoder spaces. Learned Perceptual Image Patch Similarity

Preprint.

(LPIPS) [43] showed that ℓ2\ell_2 distances between VGG features of two images correlate with human perceptual judgements far better than Structural Similarity Index Measure (SSIM) or pixel norms, because pretrained encoders capture semantic structure rather than low-level coincidences. This idea extends naturally from per-sample distances to population-level comparisons. Once samples are embedded in a feature space, a dataset induces an empirical distribution, and the squared 2-Wasserstein distance W22W_2^2 provides a principled way to compare such distributions: it respects the geometry of the embedding space and admits a closed-form expression for Gaussian distributions [11]. The Fréchet Inception Distance (FID) applied this principle to generative image evaluation: images are embedded into Inception-v3 features, Gaussian distributions are fitted to the reference and generated sets, and the squared Fréchet distance, equivalent to W22W_2^2 between the two fitted Gaussians, is reported as a single scalar. FID requires no per-sample correspondence between reference and candidate sets, correlates with human judgements of image quality, and has become the de facto standard in generative modelling.

Feature-space distribution matching therefore offers a promising route toward segmentation evaluation without per-sample ground truth. However, extending this paradigm from image generation to medical image segmentation is non-trivial. First, segmentation quality is inherently defined over the joint distribution of images and masks: a mask may be anatomically plausible in isolation, yet clinically incorrect if it is misaligned with the anatomy in the corresponding image. Image-only distributional metrics cannot capture such failures. Second, medical imaging spans both volumetric and 2-D modalities (e.g., CT, MRI). A general-purpose metric should compare image-mask distributions across these settings without relying on modality-specific pipelines.

We propose MID (Mask-Image Distributional Divergence), a distribution-level metric for medical image segmentation that shifts evaluation from sample-wise mask comparison to probability-measure comparison over the joint space X×M\mathcal{X} \times \mathcal{M}. Specifically, MID maps each image and its class-specific mask to a joint representation through a pretrained medical vision encoder, thereby inducing two empirical push-forward distributions: one from ground-truth image-mask pairs and one from predicted image-mask pairs. MID then fits Gaussian approximations to these embedded distributions and reports their squared 2-Wasserstein distance. By comparing distributions rather than aligned samples, MID requires no per-case correspondence between reference and candidate sets, while remaining sensitive to the image-mask dependence that defines segmentation quality.

This construction adapts feature-space distribution matching to the structured image-mask dependency inherent in segmentation. MID captures failure modes invisible to single-modality metrics: unlike image-only approaches, it detects mask-image inconsistency; unlike mask-only metrics, it identifies anatomically implausible placements even when mask shapes are realistic.

Across 56 organ groups, using five signed-distance-transform (SDT)-based corruption types at three severity levels, MID increases consistently as segmentation quality degrades. Without requiring any per-sample correspondence, MID correlates with mean Dice at Spearman ρ=−0.55\rho = -0.55. For comparison, HD95, a paired-reference geometric metric, reaches ∣ρ∣=0.72|\rho| = 0.72 with Dice on the same corrupted masks but requires a ground-truth mask for every prediction. While per-sample metrics remain more precise when ground truth is available, MID provides a complementary distribution-level signal for settings where candidate predictions cannot be annotated case by case.

Our contributions are as follows: (1) we formulate segmentation evaluation without paired ground truth as distribution matching on the joint image-mask space and introduce MID; (2) we propose a diagnostic decomposition of MID into image, mask, and residual correspondence terms; and (3) across thirteen datasets, we show that MID tracks corruption severity, detects distribution shifts, identifies image-mask misalignment, and ranks models consistently with paired metrics.

References (41)