NeurIPS 2026 · Poster

MID

Mask-Image Distributional Divergence for Evaluating Medical Image Segmentation

Vincenzo Marcianò1,2,3 · Xiaoming Zhang1,2 · Gianluca Guglielmo4 · Michela Antonelli3 · Sébastien Ourselin3 · Maria A. Zuluaga1,3
1EURECOM   2Sorbonne Université   3King's College London   4TU Graz

Programs that outline organs in medical scans are usually checked against an expert's hand-drawn outline for every scan. MID checks a whole batch of outlines at once. It compares the batch with a trusted collection of expert-checked scans, so the new scans need no hand-drawn answers.

drag to rotate
The idea

Compare populations of image–mask pairs

A mask can look like a perfect liver and still be wrong for the scan it sits on. So MID never looks at masks alone. Every image is encoded together with its mask, and MID compares the joint distribution of a candidate set with the joint distribution of a reference set. No case in one set has to match a case in the other.

1 · encode

One vector per pair

A frozen MedSigLIP encoder embeds the image and each class mask. The two 1152-d vectors are joined into one 2304-d point.

2 · project

Keep the main directions

PCA fitted on the reference keeps k = 128 components, which hold more than 94% of the reference variance.

3 · compare

Distance between two Gaussians

A Gaussian is fitted to each set. MID is the squared 2-Wasserstein distance between them, in closed form.

how far the centre movedhow the spread and shape changedreference Pcandidate Q
Try it · real MedSigLIP embeddings

Corrupt the masks and watch MID grow

Pick an organ and a corruption. Each blue dot is one scan with its expert mask. Each yellow dot is the same scan with a corrupted mask, made with the corruption code of the paper's sweep. All pairs go through MedSigLIP and a PCA with k = 128 fitted on the blue set. The view shows two of the 128 directions: across, the direction in which this corruption moves the set, and into the depth, the main direction of the reference. MID uses all 128.

drag to rotate
expert · corrupted

Organ

Corruption

Severity

moderate
cleanmildmod.severeextreme

Candidate size

n
standalone score
MID, organ max = 1
0
Dice1HD950
centre shift0
spread & shape0
Share of each term, all cases
MIDimg0
MIDmask0
MIDcorr0
This organ In the paper

What you are looking at.

Real embeddings · datasets

What a distribution shift looks like

These points are joint MedSigLIP embeddings of real image–mask pairs from ten datasets, on the first two principal components. CT datasets share one region. MRI datasets sit far along the first component. Pick a reference and a candidate to see how far apart their Gaussians are.

drag to rotate

Reference P

Candidate Q

Paper settings

Paper MID (k = 128)
0.278
25× the same-dataset floor of 0.011.
2-D view only, not MID: 0
centre shift0
spread & shape0
Candidate (reference: TotalSegmentator CT train)ModalityMID× floor

Sources. Points are digitised from the paper's PCA figure of joint MedSigLIP embeddings, which shows a subsample of each dataset. The small 2-D readout is the same Gaussian distance computed on these two coordinates only. It shows how the centre shift and the spread add up, but its scale is not the scale of MID. The table is Table 2 of the paper: reference is TotalSegmentator CT train (1105 cases, 6630 vectors, six abdominal organs), scored in the full 128-d projection.

Real embeddings · models

Ranking vessel models without labels

Three published methods segment the brain arteries in IXI MRA. Blue is the ground-truth distribution, yellow is one method's predictions on the same scans. Thin lines join each case to its own prediction. The closer the yellow cloud stays to the blue one, the lower the MID and the better the method.

drag to rotate

Method

Paper MID (k = 128)
0.0035
Dice0.83 HD954.6 mm 2-D view0
MethodMIDDice

Sources. MID, Dice and HD95 are the paper's values (Section 4.5). HD95 was reported for two of the three methods. The points are the 23 cases shown in the paper's latent-space figure, digitised from it. On these two components the Gaussian distance orders the methods the same way as the full MID.

Code · pytorch-mid

Score your own model

The package pytorch-mid computes MID from joint image–mask vectors. The tutorial covers the whole path: encode the scans with MedSigLIP, fit the projection on the reference, score each model, compare models at one size, and check the image–mask correspondence.

pip install git+https://github.com/erc-caravel/pytorch-mid
Cite

BibTeX

@inproceedings{marciano2026mid,
  title     = {{MID}: Mask-Image Distributional Divergence for
               Evaluating Medical Image Segmentation},
  author    = {Marcian{\`o}, Vincenzo and Zhang, Xiaoming and
               Guglielmo, Gianluca and Antonelli, Michela and
               Ourselin, S{\'e}bastien and Zuluaga, Maria A.},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026},
  eprint    = {2610.17354},
  archivePrefix = {arXiv}
}