Generative models with kernel distance in data space

Szymon Knop, Marcin Mazur, Przemyslaw Spurek, Jacek Tabor, Igor T. PodolakNeurocomputing 2020 · DOI

TL;DR

This paper introduces the Latent Cramer-Wold (LCW) generator, a novel generative model that bridges the gap between autoencoders and GANs by using kernel distances instead of adversarial training. The LCW generator achieves state-of-the-art FID scores on benchmark datasets, producing sharp, high-quality images without the instability or mode collapse issues common in GANs.

What Problem Does This Paper Address?

Generative models aim to learn the underlying data distribution to create new, realistic samples. Two dominant approaches are Generative Adversarial Networks (GANs) and autoencoder-based models. GANs excel at generating sharp images but are notoriously difficult to train, prone to instability, and can suffer from "mode collapse" (failing to capture the full data distribution). Autoencoders, on the other hand, are more stable and can model data manifolds effectively, but often produce blurry images and struggle with direct density estimation. This paper seeks to create a generative model that combines the strengths of both – sharp image generation and stable training – while avoiding their respective weaknesses.

Methods

The core innovation is the LCW generator, which is trained in two stages:

  1. CW² Model: This is a generative autoencoder that uses the Cramer-Wold (CW) distance as a kernel measure. Unlike traditional autoencoders that use Mean Squared Error (MSE) for reconstruction, CW² uses CW distance in both the latent space (to match a prior distribution like Gaussian) and the data space (as a reconstruction error). This stage models the data manifold.
  2. Latent Trick: This is a crucial addition. After the CW² model is trained, a new "Latent generator" neural network is introduced. This network is trained to transform a standard Gaussian noise distribution into the latent space distribution learned by the CW² model. Essentially, it learns to map simple noise to the complex latent representations that capture the data manifold. The final LCW generator is formed by concatenating this Latent generator with the decoder from the CW² model.

This two-stage approach separates the task of modeling the data manifold (Stage 1) from modeling the probability distribution of the data (Stage 2), leading to improved generative capabilities.

Datasets

The models were trained and evaluated on the following datasets:

  • MNIST
  • Fashion-MNIST
  • CelebA

Key Insights and Ideas

  • Kernel Distance as a Unified Metric: The paper demonstrates that kernel distances, specifically the Cramer-Wold distance, can effectively serve as both a reconstruction error and a measure for matching latent distributions, unifying objectives in generative modeling.
  • Decoupling Manifold and Density Modeling: The two-stage approach, particularly the "Latent Trick," effectively decouples the learning of the data manifold from the learning of the data's probability distribution. This separation is key to achieving high-quality generation.
  • Latent Trick for General Improvement: The "Latent Trick" is presented as a general method that can be applied to any pre-trained autoencoder model to enhance its generative capabilities, not just the CW² model.
  • Avoiding Adversarial Training: By replacing the discriminator with a kernel distance metric, the LCW generator bypasses the inherent instability and mode collapse issues associated with adversarial training in GANs.

Key Results

  • State-of-the-Art FID Scores: The LCW generator achieved state-of-the-art Fréchet Inception Distance (FID) scores among autoencoder-based models on MNIST, Fashion-MNIST, and CelebA datasets. For CelebA, it achieved an FID of 33, significantly outperforming other autoencoders and closing the gap with GANs.
  • Sharp Image Generation: Qualitative results (Figure 3 and 5) show that the LCW generator produces sharp and realistic images, comparable to GANs, which is a significant improvement over traditional autoencoders.
  • Improved Interpolations: The "Latent Trick" enables more meaningful and density-aware interpolations in the latent space, allowing for smooth transitions between generated samples (Figure 7).

Limitations and Future Work

  • Comparison to GANs: While the LCW generator significantly reduces the gap between autoencoders and GANs, the authors acknowledge that GAN models still obtain "essentially better results" in terms of generative quality. Their goal was to improve non-adversarial AE models, not necessarily to outperform GANs directly.
  • Generalizability of Latent Trick: The paper suggests the Latent Trick can be applied to other autoencoder models, but further empirical validation across a wider range of architectures and datasets would be beneficial.
  • Open Question on AE+LT Performance: The paper notes that while the Latent Trick improves standard autoencoders (AE), the performance gains are less pronounced than when applied to CW² or CWAE. They hypothesize this might be due to the AE's latent representation not being as well-constrained, leaving room for future investigation.

Summary updated

BibTeX
@article{knop2020generative,
  author = {Szymon Knop and Marcin Mazur and Przemyslaw Spurek and Jacek Tabor and Igor T. Podolak},
  title = {{Generative models with kernel distance in data space}},
  journal = {Neurocomputing},
  year = {2020},
  doi = {10.1016/j.neucom.2022.02.053},
}
Figure