Generative Modeling using the Sliced Wasserstein Distance

Ishan Deshpande, Ziyu Zhang, Alexander G. Schwing

Abstract

Traditional Generative Adversarial Networks (GANs) are often plagued by training instabilities due to their minimax objective. This paper presents the Sliced Wasserstein Generator (SWG), which reformulates generative modeling as a single minimization problem. By utilizing the Sliced Wasserstein Distance (SWD)—computed via random 1D projections and sorting—the authors achieve stable training and a loss metric that correlates directly with image quality.

Introduction

Generative Adversarial Networks (GANs) have revolutionized image synthesis but remain notoriously difficult to optimize. The standard two-player minimax game between a generator and a discriminator frequently leads to mode collapse and vanishing gradients. While the Wasserstein GAN (WGAN) addressed some of these issues by using the Earth Mover’s distance, its implementation still relies on a saddle-point formulation and requires complex constraints like Lipschitz continuity.

This work explores whether the Wasserstein distance can be optimized directly from samples as a pure minimization problem, bypassing the instability of adversarial games entirely.

Methodology: Sliced Wasserstein Distance

The core innovation is the use of the Sliced Wasserstein Distance (SWD). In high dimensions, computing the Wasserstein distance is computationally expensive ($O(N^{2.5} \log N)$). However, in one dimension, the problem simplifies to sorting samples and calculating the distance between paired elements ($O(N \log N)$).

The SWG algorithm approximates the high-dimensional distance by:

  1. Projecting real and fake data onto multiple random 1D directions.
  2. Computing the 1D Wasserstein distance for each projection via sorting.
  3. Averaging these distances to form the training objective.
Algorithm 1: Training the Sliced Wasserstein Generator. The process involves sampling data, projecting it onto random directions, sorting, and computing the L2 distance.

To handle complex image data, the authors use a discriminator network to map images into a lower-dimensional feature space. The SWD is then computed on the features of the penultimate layer, ensuring the projections capture meaningful semantic information.

Experiments and Results

The authors evaluated SWG on datasets including MNIST, CIFAR-10, CelebA, and LSUN Bedrooms.

Training Stability and Convergence

A key advantage of the SWD is that it provides a meaningful loss metric. Unlike standard GANs, where the discriminator's loss often fluctuates without indicating quality, the SWD loss decreases monotonically as the generator improves.

Training loss curves and generated MNIST samples for different sample sizes. The loss correlates strongly with the visual quality of the generated digits.

The method demonstrated extreme stability across various architectures. While WGANs often diverge without careful tuning, SWG successfully trained on fully connected and convolutional architectures with and without Batch Normalization.

Efficiency

Although the sorting step adds a slight overhead per iteration (approx. 1.5x slower than a WGAN update), SWG requires only a 1:1 update ratio between the generator and the feature-extracting discriminator. In contrast, WGAN typically requires five discriminator updates for every generator update, making SWG faster in total wall-clock time.

Discussion and Limitations

The SWG offers a theoretically grounded alternative to adversarial training. By proving that the empirical objective acts as an upper bound on the true sliced Wasserstein distance, the authors provide a more robust framework for generative modeling.

However, some challenges remain. The $O(N \log N)$ sorting step can become a bottleneck as sample sizes increase. Furthermore, while the mathematical formulation is a pure minimization, practical high-resolution applications still rely on a discriminator-like feature extractor to find a good feature space, which introduces some heuristic elements back into the pipeline.

Conclusion

The Sliced Wasserstein Generator demonstrates that direct distance minimization is a viable and often superior alternative to minimax optimization for generative tasks. By simplifying the training objective, the authors achieve greater stability and more interpretable training progress.

Summary updated

BibTeX
@inproceedings{deshpande2018generative,
  author = {Ishan Deshpande and Ziyu Zhang and Alexander G. Schwing},
  title = {{Generative Modeling using the Sliced Wasserstein Distance}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=rkZALpWdWr},
}
Figure