MSW: a Multi-Scale Sliced Wasserstein Distance Between Image Distributions
Organizations: Biomedical Imaging Group, EPFL, Lausanne, Switzerland
Abstract
We propose the multi-scale sliced Wasserstein (MSW) distance between image distributions, which operates in pixel space and requires no trained network. MSW convolves images with a fixed bank of discrete cosine filters at several scales, pools the responses over all positions, and compares the resulting one-dimensional distributions using the Wasserstein distance. We pair MSW with an exact two-sample test that gives calibrated p-values. Most metrics compare two image sets in the latent space of a pretrained network. We show that these metrics are insensitive to simple perturbations of the images, because the latent space is nearly invariant to them. In contrast, MSW detects smaller perturbations than latent-space metrics and needs far fewer images to do so. Although it uses no learned features, it still detects semantic changes of the image distribution. Finally, MSW matches or outperforms existing Wasserstein-based metrics in our experiments.
Figures & tables
| detection threshold ( ) | sample requirement at amplitude | |||||||||
| FID | CMMD | CSW | MSW | FID | CMMD | CSW | MSW | |||
| CelebA | Gaussian noise | 0.01 | 0.0025 | – | 0.0005 | 0.0025 | – | 128 | – | 8 |
| Gaussian blur | 0.33 | 0.22 | – | 0.10 | 0.33 | 256 | 128 | – | 8 | |
| COCO | grey checkerboard | 0.04 | 0.04 | 0.04 | 0.005 | 0.04 | 512 | 256 | 256 | 8 |
| red–green checkerboard | 0.16 | 0.08 | 0.08 | 0.01 | 0.08 | – | 256 | 512 | 8 | |
| shading | 0.16 | 0.04 | 0.16 | 0.08 | 0.08 | 1024 | 128 | – | 256 | |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| DCT | random | PCA | ||
|---|---|---|---|---|
| CelebA | Gaussian noise | 0.0005 | – | 0.0005 |
| Gaussian blur | 0.10 | 0.33 | 0.10 | |
| shading | 0.08 | 0.08 | 0.08 | |
| CIFAR-10 | checkerboard | 0.01 | – | 0.01 |
| synthetic textures | spectral slope | 0.008 | 0.016 | 0.008 |
| latent-based | sliced Wasserstein | latent-based | sliced Wasserstein | latent-based | sliced Wasserstein | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| pair | FID | CMMD | CSW | MSW | pair | FID | CMMD | CSW | MSW | pair | FID | CMMD | CSW | MSW |
| airplane–bed | 16 | 8 | 16 | 32 | boat–motorcycle | 8 | 8 | 32 | 32 | clock–truck | 16 | 8 | 128 | 32 |
| airplane–boat | 8 | 8 | 64 | 32 | boat–person | 64 | 8 | 32 | 32 | dining table–giraffe | 32 | 8 | 64 | 16 |
| airplane–bus | 8 | 8 | 32 | 16 | boat–toilet | 8 | 8 | 32 | 16 | dining table–horse | 8 | 8 | 32 | 32 |
| airplane–car | 16 | 8 | 32 | 16 | boat–train | 8 | 8 | 128 | 128 | dining table–motorcycle | 32 | 8 | 32 | 32 |
| airplane–clock | 8 | 8 | 32 | 16 | boat–truck | 16 | 8 | 128 | 64 | dining table–person | 32 | 8 | 128 | 64 |
| detection threshold ( ) | sample requirement at amplitude | |||||||
| SW | CSW | MSW | SW | CSW | MSW | |||
| CelebA | Gaussian noise | – | – | 0.0005 | 0.0025 | – | – | 8 |
| Gaussian blur | 0.75 | – | 0.10 | 0.33 | – | – | 8 | |
| shading | 0.08 | 0.16 | 0.08 | 0.08 | 512 | 1024 | 256 | |
| CIFAR-10 | checkerboard | 0.02 | 0.02 | 0.01 | 0.01 | 1024 | – | 256 |
| Gaussian blur | – | – | 0.15 | 0.33 | – | – | 16 | |
| without the test | with the test | |||||||
|---|---|---|---|---|---|---|---|---|
| FID | CMMD | CSW | FID | CMMD | CSW | MSW | ||
| CelebA | Gaussian noise | 0.01 | 0.0025 | – | 0.005 | 0.0025 | 0.04 | 0.0005 |
| Gaussian blur | 0.33 | 0.22 | – | 0.33 | 0.22 | 0.5 | 0.10 | |
| COCO | grey checkerboard | 0.04 | 0.04 | 0.04 | 0.02 | 0.04 | 0.04 | 0.005 |
| red–green checkerboard | 0.16 | 0.08 | 0.08 | 0.08 | 0.08 | 0.04 | 0.01 | |
| shading | 0.16 | 0.04 | 0.16 | 0.08 | 0.04 | 0.16 | 0.08 | |
Sliced Wasserstein Distance
Sliced Wasserstein distance compares probability distributions by averaging one-dimensional optimal transport costs over projections.
See all 20 papers