Sliced Generative Models

Szymon Knop, Marcin Mazur, Jacek Tabor, Igor T. Podolak, Przemysław Spurek

Abstract

In this paper, we discuss a class of AutoEncoder-based generative models utilizing a one-dimensional sliced approach. The core concept involves reducing the discrimination between high-dimensional samples to a one-dimensional case. Our experiments reveal that these methods can be categorized into two groups: those modifying standard normality tests and those based on classical distances between samples. While both groups function as valid generative models, the distance-based methods yield a faster decrease in the Fréchet Inception Distance (FID).

Introduction

Generative models like Variational AutoEncoders (VAEs) and Wasserstein AutoEncoders (WAEs) strive to map data into a latent space that follows a specific prior distribution, typically a standard Gaussian. Achieving this alignment in high-dimensional space is computationally intensive. The Sliced Wasserstein AutoEncoder (SWAE) simplified this by projecting high-dimensional distributions onto random 1D lines. However, SWAE often requires continuous sampling from the prior and relies on a sensitive hyperparameter ($\lambda$) to balance reconstruction and normality. This work expands the "sliced" framework to address these limitations by exploring various 1D distance measures and normality tests.

Methodology

The Slicing Technique

The model projects high-dimensional latent vectors onto random 1D unit vectors. In this reduced dimensionality, calculating the distance between the latent distribution and the prior becomes mathematically straightforward and computationally efficient, bypassing the complexities of high-dimensional distribution matching.

Model Variants

Four new "Sliced" AutoEncoder variants are introduced:

  • SCFWAE (Sliced Closed Form Wasserstein AE): Enhances SWAE by utilizing a closed-form formula for Wasserstein distance, eliminating the need for prior sampling during training.
  • SCWAE (Sliced Cramer-Wold AE): Utilizes the Cramer-Wold distance as the 1D metric.
  • SCvMAE & SKSAE: These models are based on classical statistical normality tests—Cramér-von Mises and Kolmogorov-Smirnov, respectively—to enforce the latent prior.

Logarithmic Cost Function

A significant innovation is the replacement of the traditional weighted loss function ($Loss = ReconstructionError + \lambda \cdot NormalityIndex$) with a logarithmic formulation:

$$Loss = ReconstructionError + \log(NormalityIndex)$$

This approach makes the optimization invariant to the scale of the normality index, effectively removing the need for the $\lambda$ hyperparameter and simplifying the training process by eliminating tedious grid searches.

Experimental Results

The models were evaluated on MNIST, CIFAR-10, and CelebA datasets. A key finding is the performance gap between the two categories of models. Methods based on classical distances (Wasserstein, Cramer-Wold) generally outperformed those based on statistical normality tests in terms of the rate at which image quality (FID) improved.

Latent space interpolations for SCvMAE and SKSAE models on the CelebA dataset.

Generative Quality and Convergence

All proposed models successfully functioned as generative models, producing clear interpolations and realistic samples. SCFWAE and SCWAE achieved performance comparable to or better than the original SWAE while benefiting from the simplified log-cost formulation. SCFWAE further improved efficiency by removing sampling requirements, leading to more deterministic training.

Randomly generated face samples demonstrating the visual quality achieved by the sliced generative framework.

Conclusion

The "slicing" framework proves to be a robust and efficient approach for generative modeling. By introducing closed-form solutions and a parameter-free log-cost function, the authors have significantly simplified the training of AutoEncoder-based generative models. While distance-based metrics currently offer faster convergence, the success of normality-test-based models like SCvMAE and SKSAE highlights the versatility of the sliced approach. Future research will investigate the applicability of these methods to non-Gaussian priors and more complex architectures.

Summary updated

BibTeX
@inproceedings{knop2018sliced,
  author = {Szymon Knop and Marcin Mazur and Jacek Tabor and Igor T. Podolak and Przemysław Spurek},
  title = {{Sliced Generative Models}},
  booktitle = {Schedae},
  year = {2018},
  doi = {10.4467/20838476si.18.006.10411},
}
Figure