SeGMA: Semi-Supervised Gaussian Mixture Autoencoder

Marek Smieja, Maciej Wolczyk, Jacek Tabor, Bernhard C. Geiger · DOI

TL;DR

This paper introduces SeGMA, a novel semi-supervised generative model that learns a joint distribution of data and classes using a Wasserstein Autoencoder framework. By employing a Gaussian mixture model in the latent space and optimizing with the Cramer-Wold distance, SeGMA efficiently generates class-specific samples and enables continuous style transfer and manipulation of class characteristics.

What Problem Does This Paper Address?

Deep generative models are powerful tools for learning complex data distributions and generating new samples. However, when dealing with data that has distinct classes, a common challenge is to train models that can generate samples from specific classes, especially when labeled data is scarce. Existing semi-supervised generative models often rely on separate discrete latent variables for class and continuous variables for style, which can limit smooth interpolation and style transfer. This paper aims to bridge this gap by proposing a model that implicitly encodes class information within a single continuous latent space, allowing for more flexible and natural manipulation of generated samples.

Methods

SeGMA builds upon the Wasserstein Autoencoder (WAE) framework, specifically using the Cramer-Wold distance for the Maximum Mean Discrepancy (MMD) penalty. This choice is crucial as it provides a closed-form solution for spherical Gaussian mixtures, eliminating the need for sampling during training and improving stability. The core innovation lies in using a Gaussian mixture model as the target distribution in the latent space. Each component of this mixture is associated with a specific class, learned using a small amount of labeled data. A Gaussian classifier, induced by this target distribution, helps connect the Gaussian components to their respective classes. The model is trained by minimizing a combination of reconstruction loss, the Cramer-Wold distance penalty, and a cross-entropy loss for classification.

Datasets

The paper evaluates SeGMA on three standard benchmark datasets:

  • MNIST: A dataset of handwritten digits.
  • SVHN (Street View House Numbers): A dataset of house numbers from real-world images.
  • CelebA: A dataset of celebrity faces, where the authors created four classes by combining "smiling" and "male" attributes.

For training, a small subset of labeled data (100 for MNIST, 1000 for SVHN, and 1000 for CelebA) was used alongside a larger collection of unlabeled data.

Key Insights and Ideas

  • Implicit Class Encoding: SeGMA elegantly encodes class information within a single continuous latent space, unlike many prior methods that use separate discrete variables. This allows for more natural interpolations and style transfers.
  • Continuous Style Transfer: By moving latent representations between Gaussian components (representing classes), SeGMA enables smooth transitions between styles of different classes, a capability not easily achieved by discrete latent variable models.
  • Intensity Control: The model allows for fine-grained control over the intensity of class characteristics by moving latent representations away from or towards specific Gaussian components.
  • Efficient Optimization: The use of the Cramer-Wold distance for MMD penalty bypasses the need for sampling, leading to faster and more stable training compared to methods requiring sampling.
  • Architectural Flexibility: SeGMA's autoencoder structure makes it adaptable to various network architectures, including convolutional networks, which is beneficial for complex image data.

Key Results

  • Generative Performance: SeGMA achieves comparable or better generative performance than state-of-the-art semi-supervised VAE methods (M1+M2, ADGM) on MNIST, SVHN, and CelebA, as measured by FID scores.
  • Classification Accuracy: SeGMA demonstrates superior classification accuracy on SVHN and CelebA compared to M1+M2 and ADGM, especially when using convolutional architectures.
  • Interpolation Quality: Visual inspection and FID scores show that SeGMA produces more realistic and coherent interpolations between samples of different classes compared to ADGM.
  • Style Transfer Effectiveness: Experiments demonstrate that SeGMA can perform continuous style transfer, maintaining the style of the original image while changing its class.
  • Robustness: SeGMA shows good stability with respect to hyperparameter choices, requiring less fine-tuning than some competing methods.

Limitations and Future Work

  • Unimodal Target Distribution Advantage: The paper notes that while SeGMA's mixture of Gaussians allows for class-specific generation, an unsupervised CWAE with a single Gaussian target distribution achieved better FID scores on SVHN. This suggests that training on unimodal distributions might be easier, and the class-specific generation comes at a slight cost in overall sample quality.
  • Potential for More Sophisticated Interpolation: While linear interpolation is used, the authors suggest that more advanced interpolation techniques could further improve results, especially in regions of low data density between Gaussian components.
  • Future Work: The authors suggest that SeGMA can be more easily adapted to different network architectures, implying potential for further exploration with more complex models. The ability to analyze class structures in the latent space also opens avenues for future research in understanding class relationships.

Summary updated

BibTeX
@article{smieja2021segma,
  author = {Marek Smieja and Maciej Wolczyk and Jacek Tabor and Bernhard C. Geiger},
  title = {{SeGMA: Semi-Supervised Gaussian Mixture Autoencoder}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2021},
  doi = {10.1109/tnnls.2020.3016221},
}
Figure