When OT meets MoM: Robust estimation of Wasserstein Distance

Guillaume Staerman, Pierre Laforgue, Pavlo Mozharovskyi, Florence d'Alché-Buc

Abstract

The Wasserstein distance is a powerful tool in machine learning for comparing probability distributions, yet it remains highly sensitive to outliers. This paper proposes a robust framework for estimating Wasserstein distance by integrating the Median-of-Means (MoM) principle. We introduce three novel estimators—$W_{MoM}$, $W_{MoU}$, and $W_{MoU-diag}$—and demonstrate their theoretical and empirical resilience to heavy-tailed noise and contamination. By applying these estimators to Generative Adversarial Networks (GANs), we develop MoMWGAN, which achieves superior image generation quality on corrupted datasets compared to standard WGANs.

Introduction

The Wasserstein distance, also known as the Earth Mover's Distance, has gained significant traction in modern machine learning, particularly for training Generative Adversarial Networks (GANs). Its ability to account for the underlying geometry of the data space allows it to provide meaningful gradients even when the supports of two distributions are disjoint.

However, the Wasserstein distance possesses a significant vulnerability: extreme sensitivity to outliers. Because the metric seeks to transport all mass from one distribution to another, even a small number of distant, corrupted data points can disproportionately inflate the distance calculation. In real-world applications where datasets often contain mislabeled samples or sensor errors, this sensitivity can lead to unstable training and degraded model performance.

Methods

To address this fragility, we leverage the Median-of-Means (MoM) principle. The core idea of MoM is to partition data into $K$ blocks, compute the mean of each block, and then take the median of those means. This approach prevents a single outlier from skewing the final estimate.

We extend this logic to the dual formulation of the 1-Wasserstein distance, proposing three specific estimators:

  1. $W_{MoM}$: Computes the difference between the MoM estimators of two distributions.
  2. $W_{MoU}$: A more sophisticated version using "Medians of U-statistics," evaluating all possible combinations of data blocks between two sets.
  3. $W_{MoU-diag}$: A computationally efficient variant that only considers diagonal pairs of blocks.
Overview of MoM and MoU estimation strategies, including block structures and theoretical outlier tolerance.

For practical deep learning applications, we introduce MoMWGAN. This framework utilizes a neural network "critic" with clipped weights to approximate these robust distances, effectively filtering out noise during the training process.

Experimental Setup

The proposed methods were evaluated across several challenging scenarios:

  • Toy 2D Datasets: Mixtures of Gaussians contaminated with isolated (Uniform) or aggregate (Cauchy) outliers.
  • Polluted CIFAR10: 1.5% of images replaced by pure random intensity noise.
  • Polluted Fashion MNIST: A setup where five classes are "clean" and a sixth class (Sandals) serves as an anomaly.

Key Insights and Results

A primary finding is the Robustness-Efficiency Trade-off. The number of blocks $K$ serves as a critical hyperparameter: increasing $K$ enhances protection against outliers (up to nearly 50% contamination) but also increases the variance of the estimate.

Theoretical boundaries for outlier tolerance ($\tau_X, \tau_Y$) across different robust estimators.

Key results include:

  • Superior Image Quality: On polluted CIFAR10, standard WGANs often attempt to replicate the noise, resulting in grainy images. MoMWGAN successfully ignores these anomalies, producing significantly cleaner samples.
  • Quantitative Performance: MoMWGAN outperformed standard WGAN in Fréchet Inception Distance (FID) scores on both polluted CIFAR10 (55.9 vs. 57.0) and polluted Fashion MNIST (13.2 vs. 13.8).
  • Convergence Stability: MoM-based algorithms demonstrated faster and more reliable convergence in the presence of anomalies compared to standard estimators.

Conclusion

While robust estimation introduces some computational overhead—requiring multiple block evaluations per iteration—the benefits in stability and performance on corrupted data are substantial. Future work will focus on optimizing the $W_{MoU}$ estimator's theoretical analysis and exploring automatic tuning for the block parameter $K$. These robust Wasserstein estimators hold promise for broader applications in Variational Autoencoders (VAEs) and domain adaptation.

Summary updated

BibTeX
@inproceedings{staerman2021when,
  author = {Guillaume Staerman and Pierre Laforgue and Pavlo Mozharovskyi and Florence d'Alché-Buc},
  title = {{When OT meets MoM: Robust estimation of Wasserstein Distance}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2021},
}
Figure