WAD-Div

Rethinking Diversity Metrics in Medical Imaging with Wasserstein Distance

BVM 2026

Find the nearest images

Choose an image. Its closest neighbours each contribute one distance.

Selected image

Radiograph 01

Nearest neighbours by feature distance

  1. 1Radiograph 061.687
  2. 2Radiograph 071.947
  3. 3Radiograph 082.134

Distance from the selected image

0 0.6 1.2 1.8 2.4 3 1 2 3

Twelve public chest radiographs from the NIH Clinical Center. Neighbour distances use RadImageNet ResNet-50 features.

Pool the image distances

Build the distance distribution

Each image contributes its k nearest neighbours. See exactly where their distances enter the histogram.

Radiograph 01 and its three neighbours

Radiograph 06 (1.687), Radiograph 07 (1.947), Radiograph 08 (2.134) enter the histogram once each. Across the twelve images, three neighbours per image contribute 36 directed distances. Their mean is 1.591, the WAD-Div score against a zero reference.

Read the bin counts for this example
Feature distanceRadiograph 01All twelve images
0–0.300
0.3–0.600
0.6–0.900
0.9–1.202
1.2–1.5014
1.5–1.819
1.8–2.1110
2.1–2.411
2.4–2.700
2.7–300

This teaching example uses a separate set of twelve radiographs and 2,048 pooled features per image. The NIH Clinical Center provided the images. Wang et al., ChestX-ray8 (CVPR 2017) · NIH image use and attribution · Image sources and feature extraction

How the reference changes the score

Choose what distance means

The feature encoder defines what counts as similar. The reference determines how to read the score.

  1. Embed the images

    Map each image or volume into a feature space with an encoder suited to its modality.

  2. Collect local distances

    For each sample, take its distances to the k nearest other samples. Pool them into one distribution.

  3. Compare distributions

    Use the one-dimensional Wasserstein distance to measure the separation between the pooled distances and the chosen reference.

Reference distributions

Complete collapse

Every reference distance is zero. In this case the raw score equals the mean observed neighbour distance. Larger values indicate more spread in that feature space.

A low-variability baseline

An exponential distribution places most of its weight near zero and allows some larger distances. The paper tests how the reference choice affects the diversity curves.

A comparison dataset

Compute a second dataset’s neighbour-distance distribution using the same encoder and k. A smaller distance means the two distributions of local spacing are more alike.

Authors’ method and reference definitions

Try the metric on repeated feature positions

Keep 24 observations and vary how many distinct positions they occupy.

This example uses invented coordinates. Distances are in arbitrary feature units. Metric implementation

Read the experiments

Diversity rises with unique samples

The study varied how many distinct chest radiographs and lung CT volumes were present in each dataset.

Four plots show raw and normalized WAD-Div increasing with the number of unique chest radiographs and lung CTs under zero and exponential references.
Figure 2 from Rethinking Diversity Metrics in Medical Imaging with Wasserstein Distance. Full-resolution figure

Read the figure

Left column

Raw scores generally rise as unique samples are added. The lung CT curves fluctuate above 50 unique volumes, and the two modalities have different scales.

Right column

The normalized scores approach one as the number of unique samples increases. The transformation compresses differences near the upper end of the scale.

Why use features?

In separate augmentation experiments, small image changes moved pixel-based MS-SSIM even when the underlying anatomy was the same.

Paper and code

Resources and citation

Cite this work

@inproceedings{seyfarth2026waddiv,
  title = {Rethinking Diversity Metrics in Medical Imaging with {Wasserstein}
      Distance},
  author = {Seyfarth, Marvin and Dar, Salman U. H. and Engelhardt, Sandy},
  booktitle = {Bildverarbeitung für die Medizin 2026},
  series = {Informatik aktuell},
  publisher = {Springer Vieweg},
  pages = {420--426},
  year = {2026},
  doi = {10.1007/978-3-658-51100-5_83}
}