Abstract
The Sliced-Wasserstein Autoencoder (SWAE) introduces a novel approach to generative modeling by regularizing the latent space using the Sliced-Wasserstein distance. Unlike Generative Adversarial Networks (GANs) that require complex adversarial training or Variational Autoencoders (VAEs) that often rely on restrictive closed-form priors, SWAE leverages the simplicity of one-dimensional optimal transport. By projecting high-dimensional distributions into random 1D slices, the model can efficiently match the latent distribution to any samplable prior. This results in a stable, easy-to-implement generative model that maintains the geometric benefits of the Wasserstein metric.
Introduction
Generative modeling aims to learn the underlying distribution of complex data to create new, realistic samples. Currently, the field is dominated by Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs). However, both have significant drawbacks. GANs are notoriously difficult to train, often suffering from mode collapse and requiring a delicate balance between a generator and a discriminator. VAEs typically rely on Kullback-Leibler (KL) divergence, which can be problematic when distributions do not overlap, and they usually require a closed-form prior, such as a Gaussian, to remain mathematically tractable.
The Sliced-Wasserstein Autoencoder (SWAE) addresses these issues by turning to Optimal Transport (OT) and Wasserstein distances. These metrics provide a meaningful distance between distributions even without overlap. While calculating Wasserstein distances in high-dimensional space is computationally expensive, SWAE utilizes the "sliced" version, which reduces the problem to a set of simple 1D calculations.
Methodology: The Power of Slicing
The core innovation of SWAE is the use of the Sliced-Wasserstein distance. According to integral geometry, a high-dimensional probability distribution can be uniquely represented by the set of all its 1D projections, or "slices." While the Wasserstein distance is difficult to compute in high dimensions, it becomes "embarrassingly simple" in one dimension: one simply sorts the samples and calculates the distance between them.
The SWAE training process involves:
- Encoder/Decoder Architecture: A standard autoencoder is used to map data to a latent space and back.
- Reconstruction Loss: Minimizing the distance (e.g., Mean Squared Error) between the input and the decoded output.
- Latent Regularization: Ensuring the encoded samples ($p_Z$) match a target distribution ($q_Z$).
- Slicing and Sorting: Instead of direct high-dimensional comparison, SWAE takes random 1D projections of both encoded samples and samples from the target distribution. These projections are sorted, and the distance between them is averaged over many random projections.
By reducing the problem to 1D projections, the most complex part of the Optimal Transport calculation becomes a simple sort operation ($O(M \log M)$), which is highly optimized on modern hardware. This approach allows the model to shape the latent space into any distribution that can be sampled from, even without a closed-form mathematical formula.
Experimental Evaluation
The authors evaluated SWAE across several datasets to demonstrate its flexibility and performance:
- MNIST: The model successfully forced the latent space into exotic shapes like rings and "bowls" while maintaining the ability to decode clear digits.
- CelebA: Using a 128-dimensional latent space with a uniform prior, SWAE produced sharp face reconstructions and smooth interpolations. Moving between encoded faces in the latent space resulted in realistic morphing, indicating a well-structured, convex latent space.
- Toy Manifolds: A 3D "S-curve" manifold was used to show the model's ability to unwrap non-linear structures into a 2D uniform distribution.
Discussion and Key Insights
SWAE offers several advantages over traditional generative models. Unlike Wasserstein GANs or Wasserstein Autoencoders (WAE), SWAE does not require an auxiliary "critic" or discriminator network, leading to much more stable training. Furthermore, it is not restricted to Gaussian priors; any samplable distribution, such as rings or custom point clouds, can be used. Because it utilizes a Wasserstein-based metric, the model preserves the "weak convergence" of measures, providing smoother gradients for training compared to f-divergences like KL or Jensen-Shannon.
Conclusion
The Sliced-Wasserstein Autoencoder provides a simple yet powerful alternative for generative modeling. While it avoids the instability of GANs and the prior restrictions of VAEs, some limitations remain. The number of projections required may scale with latent dimensionality, and reliance on reconstruction losses like MSE can sometimes lead to a loss of fine detail compared to adversarial methods. Future work will involve more rigorous quantitative benchmarking, such as Fréchet Inception Distance (FID) comparisons, on higher-resolution datasets.
Summary updated