Symmetric Wasserstein autoencoders

Sun Sun, Hongyu Guo

Introduction

Generative modeling often struggles with the inherent trade-off between accurately reconstructing data and learning a well-structured latent space. Traditional Variational Autoencoders (VAEs) rely on the asymmetric Kullback-Leibler (KL) divergence to align latent representations with a prior distribution. This often leads to "mean-seeking" behavior, where the model generates unrealistic samples, and a "blurry" latent space that fails to preserve the local topology of the data manifold.

Symmetric Wasserstein Autoencoders (SWAEs) address these limitations by leveraging Optimal Transport theory. By symmetrically matching the joint distributions of data and their latent representations, SWAEs treat the encoder and decoder as equal partners. This approach naturally preserves local data structures and introduces a built-in denoising effect, resulting in superior performance across generation, reconstruction, and classification tasks.

The SWAE Framework

The core innovation of SWAEs is the use of the Wasserstein distance to match the joint distribution of the encoder (mapping data $x$ to latent $z$) and the decoder (mapping latent $z$ to data $x$). Unlike the KL divergence, the Wasserstein distance is symmetric and provides a smoother metric for distribution alignment.

The SWAE architecture featuring symmetric joint distribution matching and a learnable pseudo-input prior.

Key Methodological Innovations:

  • Symmetric Joint Matching: The objective function decomposes into an x-loss (discrepancy in data space) and a z-loss (discrepancy in latent space). This symmetry ensures that the mapping is consistent in both directions.
  • Denoising by Design: The x-loss term acts as an implicit regularizer. Because the model matches generated data to observed data through a stochastic latent bridge, it learns to ignore small perturbations, effectively denoising the input.
  • Learnable Prior: Instead of a static Gaussian prior, SWAEs utilize a learnable prior based on "pseudo-inputs." This allows the model to adapt the latent space to the actual complexity of the dataset, avoiding the over-regularization common in standard VAEs.
  • Hybrid Objective: A weighting parameter $\beta$ balances the trade-off between the generative quality (distribution matching) and reconstruction accuracy.

Experimental Evaluation

The authors evaluated SWAEs against several baselines, including standard VAEs, WAE-GAN, and VampPrior, across four benchmark datasets: MNIST (digits), Fashion-MNIST (clothing), Coil20 (objects), and a subset of CIFAR-10 (birds, cats, and ships).

Topology Preservation

A critical advantage of the SWAE framework is its ability to maintain the local neighborhood structure of the data. In SWAEs, data points that are similar in the input space remain close in the latent space, a property often lost in standard VAEs.

Comparison of latent space distributions for SWAE (a) and VAE (b), demonstrating SWAE's superior ability to preserve local data structures and clustering.

Key Results and Insights

  • Latent Space Quality: In 5-Nearest Neighbor (5-NN) classification tasks, SWAEs consistently outperformed baselines. Notably, SWAE performance remained stable as the latent dimension increased, whereas VAE performance typically degraded.
  • Generation and Reconstruction: Using the Fréchet Inception Distance (FID), SWAEs achieved the best scores on Coil20 and CIFAR10-sub, producing sharper images. Furthermore, SWAEs (with $\beta=0.5$) achieved significantly lower reconstruction errors than all other tested models.
  • Robustness: Due to the inherent x-loss, SWAEs demonstrated a remarkable ability to recover clean images from noisy inputs, even without explicit denoising training.

Conclusion and Future Work

Symmetric Wasserstein Autoencoders provide a robust framework for learning the underlying geometry of data manifolds. While highly effective, the model's performance is sensitive to the hyperparameter $\beta$, requiring careful tuning. Future research may explore even more flexible priors, such as those based on Normalizing Flows, and investigate the scalability of SWAEs to high-resolution, large-scale datasets like ImageNet.

Summary updated

BibTeX
@inproceedings{sun2021symmetric,
  author = {Sun Sun and Hongyu Guo},
  title = {{Symmetric Wasserstein autoencoders}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2021},
}
Figure