Max-Sliced Wasserstein Distance and its use for GANs

Ishan Deshpande, Yuan-Ting Hu, Ruoyu Sun, Ayis Pyrros, Nasir Siddiqui, Sanmi Koyejo, Zhizhen Zhao, David Forsyth, Alexander Schwing

TL;DR

This paper introduces the max-sliced Wasserstein distance (max-SWD), a novel metric designed to train Generative Adversarial Networks (GANs) more efficiently in high-dimensional spaces. By searching for the single optimal projection direction that maximizes the distance between two distributions rather than averaging over thousands of random ones, max-SWD drastically reduces computational complexity while maintaining excellent sample generalization.

What Problem Does This Paper Address?

Training GANs to model high-dimensional data (like high-resolution images) is notoriously difficult. A major theoretical bottleneck is sample complexity—the number of data points required to accurately estimate the distance between the real data distribution and the generated distribution.

Standard Wasserstein Distance (WD) suffers severely from the "curse of dimensionality": its sample complexity grows exponentially with the number of dimensions. To circumvent this, researchers previously introduced the Sliced Wasserstein Distance (SWD). SWD projects high-dimensional distributions down onto random 1D lines, where computing optimal transport is incredibly fast and simple (just a matter of sorting the points).

However, SWD introduces a new headache: projection complexity. Because random 1D projections lose a massive amount of structural information, standard SWD requires thousands or tens of thousands of random directions to get an accurate estimate, making it computationally heavy and slow to converge.

Methods

The authors propose a elegant fix: instead of averaging over a massive swarm of random projections, why not just find and use the best one?

The Max-Sliced Wasserstein Distance defines the distance between two distributions as the maximum possible Wasserstein distance obtainable along any single 1D projection direction.

To make this practical for GAN training (the max-sliced GAN), the authors solve a challenging saddlepoint problem. Finding the exact analytical maximum direction at every step is intractable, so they use a neural network discriminator as a proxy. By training the discriminator to maximize a surrogate loss function (such as standard binary cross-entropy or a moment separator) in an adversarially learned feature space, the network naturally learns to align its weights with the direction of maximum dissimilarity. The generator is then trained to minimize the 1D Wasserstein distance along this single, optimized direction.

Datasets

The authors evaluated their approach on both text and image tasks using the following datasets:

  • CelebA-HQ: High-quality celebrity face images, trained at $256 \times 256$ resolution (and scaled up to $512 \times 512$ in the supplementary material).
  • LSUN Bedrooms: A large-scale dataset of bedroom scenes, trained at $256 \times 256$ resolution.
  • MUSE Bilingual Dictionaries: Used for an unsupervised word translation task across 5 language pairs (combinations of English, French, German, Russian, and Chinese).

Key Insights and Ideas

  • Polynomial vs. Exponential Complexity: The authors mathematically prove that for Gaussian distributions, both SWD and max-SWD enjoy polynomial sample complexity, whereas standard WD requires exponentially more samples. This provides a solid theoretical foundation for why sliced methods generalize better in high dimensions.
  • The Orthogonality Trap: In high-dimensional spaces, any randomly chosen vector is highly likely to be nearly orthogonal to the true vector separating two distributions. This explains why standard SWD requires an impractically large number of random projections to catch a clean training signal.
  • Discriminators as Direction Finders: A key "aha moment" of the paper is demonstrating that a standard classification network implicitly acts as an optimal projection estimator. Training a discriminator to separate real from fake samples automatically forces its feature space to align with the direction of maximum dissimilarity.
Discriminator alignment

Key Results

  • 1 vs. 10,000 Projections: On image generation tasks (CelebA-HQ and LSUN Bedrooms), a max-sliced GAN using just one optimized projection direction produced image qualities comparable to or better than a standard Sliced Wasserstein GAN using 10,000 random projections. This drastically slashes the computational and memory footprint of the model.
  • Faster Convergence: In toy Gaussian experiments, max-SWD converged significantly faster than standard SWD, a benefit that became even more pronounced as the dimensionality ($d$) scaled up to 1000.
Convergence comparison
  • Word Translation: On the unsupervised word translation benchmark, the max-sliced WGAN combined with Cross-Domain Similarity Local Scaling (CSLS) outperformed the state-of-the-art baseline across all 5 language pairs, proving its utility outside of computer vision.

Limitations and Future Work

  • Surrogate Dependency: Because the exact maximum direction cannot be computed analytically, the method's success relies heavily on the quality of the surrogate loss function and the stability of the discriminator's optimization. If the discriminator fails to find a good feature space, the projection direction becomes sub-optimal.
  • Explicit Feature Learning: While standard binary classification loss implicitly provides a rich feature space for finding the max direction, the authors note that future work should explore training the discriminator to isolate these optimal projection features in a more explicit, mathematically rigorous manner.

Summary updated

Abstract

Generative adversarial nets (GANs) and variational auto-encoders have significantly improved our distribution modeling capabilities, showing promise for dataset augmentation, image-to-image translation and feature learning. However, to model high-dimensional distributions, sequential training and stacked architectures are common, increasing the number of tunable hyper-parameters as well as the training time. Nonetheless, the sample complexity of the distance metrics remains one of the factors affecting GAN training. We first show that the recently proposed sliced Wasserstein distance has compelling sample complexity properties when compared to the Wasserstein distance. To further improve the sliced Wasserstein distance we then analyze its `projection complexity' and develop the max-sliced Wasserstein distance which enjoys compelling sample complexity while reducing projection complexity, albeit necessitating a max estimation. We finally illustrate that the proposed distance trains GANs on high-dimensional images up to a resolution of 256x256 easily.
BibTeX
@inproceedings{deshpande2019max,
  author = {Ishan Deshpande and Yuan-Ting Hu and Ruoyu Sun and Ayis Pyrros and Nasir Siddiqui and Sanmi Koyejo and Zhizhen Zhao and David Forsyth and Alexander Schwing},
  title = {{Max-Sliced Wasserstein Distance and its use for GANs}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.01090},
}
Figure