Prior Learning in Introspective VAEs

Ioannis Athanasiadis, Fredrik Lindsten, Michael Felsberg

Abstract: Variational Autoencoders (VAEs) are a popular framework for unsupervised learning and data generation. A plethora of methods have been proposed focusing on improving VAEs, with the incorporation of adversarial objectives and the integration of prior learning mechanisms being prominent directions. When it comes to the former, an indicative instance is the recently introduced family of Introspective VAEs aiming at ensuring that a low likelihood is assigned to unrealistic samples. In this study, we focus on the Soft-IntroVAE (S-IntroVAE), one of only two members of the Introspective VAE family, the other being the original IntroVAE. We select S-IntroVAE for its state-of-the-art status and its training stability. In particular, we investigate the implication of incorporating a multimodal and trainable prior into this S-IntroVAE. Namely, we formulate the prior as a third player and show that when trained in cooperation with the decoder constitutes an effective way for prior learning, which shares the Nash Equilibrium with the vanilla S-IntroVAE. Furthermore, based on a modified formulation of the optimal ELBO in S-IntroVAE, we develop theoretically motivated regularizations, namely (i) adaptive variance clipping to stabilize training when learning the prior and (ii) responsibility regularization to discourage the formation of inactive prior modes. Finally, we perform a series of targeted experiments on a 2D density estimation benchmark and in an image generation setting comprised of the (F)-MNIST and CIFAR-10 datasets demonstrating the effect of prior learning in S-IntroVAE in generation and representation learning.

Introduction

Variational Autoencoders (VAEs) are highly effective at learning structured latent spaces, yet they frequently encounter two significant hurdles. First is the "Prior Hole" problem: most VAEs rely on a simple standard Gaussian prior, which is often too restrictive for complex, high-dimensional data. This leads to regions in the latent space where the decoder has not learned to generate meaningful content. Second, standard VAEs often produce blurry generations, struggling to match the sharpness and fidelity of Generative Adversarial Networks (GANs).

The Soft-IntroVAE (S-IntroVAE) was developed to address the latter issue by introducing an "introspective" mechanism where the encoder doubles as a discriminator, guiding the decoder toward more realistic samples. However, S-IntroVAE typically maintains a fixed, simple prior. This research explores the integration of a trainable, multimodal prior—specifically a Mixture of Gaussians (MoG)—within the adversarial S-IntroVAE framework to resolve both the prior hole and the generation quality issues simultaneously.

Methodology: The Three-Player Game

The core of the proposed approach is a prior–decoder cooperation scheme. In this framework, the training process is conceptualized as a three-player game. The encoder acts as a discriminator, attempting to distinguish between real data and synthetic samples. Conversely, the decoder and the learnable prior act as teammates, working in tandem to "fool" the encoder by generating realistic data that aligns with the prior's distribution.

Overview of the S-IntroVAE framework with prior learning, illustrating the updates for the encoder, decoder, and the multimodal prior.

To ensure stability in this volatile adversarial environment, the authors introduced two critical technical innovations:

  1. Adaptive Variance Soft-Clipping: Adversarial dynamics can cause the prior's variance to explode. The authors developed a mathematically grounded clipping method for log-variance that adapts to the specific range of each latent dimension, ensuring training stability across diverse datasets.
  2. Responsibilities Regularization: To prevent "mode collapse" in the Mixture of Gaussians prior—where certain components become inactive—an entropy-based penalty was added. This ensures the model utilizes its full latent capacity by encouraging the use of all prior modes.

Theoretically, the authors demonstrate that this three-player formulation converges to the same Nash Equilibrium as the original S-IntroVAE, confirming that the addition of a learnable prior preserves the model's underlying logic while enhancing its flexibility.

Experimental Evaluation

The researchers evaluated the model using 2D synthetic benchmarks (such as 8Gaussian and Checkerboard) to visualize density estimation, as well as image generation tasks on MNIST, Fashion-MNIST (FMNIST), and CIFAR-10.

Key Results

  • Enhanced Image Generation: On MNIST and FMNIST, the learnable prior (IP) achieved superior FID scores compared to standard S-IntroVAE. For instance, on MNIST, the FID improved from 1.414 to 1.309.
  • Superior Representation Learning: The most significant improvements were observed in the organization of the latent space. Using a k-Nearest Neighbor (k-NN) classifier on latent codes, accuracy on MNIST rose from 76.3% to 95.7%, indicating a much more interpretable and well-clustered representation.
  • Qualitative Clarity: t-SNE visualizations confirmed that while standard S-IntroVAE produces a single undifferentiated "blob" in the latent space, the proposed method creates distinct, well-separated clusters corresponding to different data classes.

Discussion and Future Work

While the approach showed dramatic gains on MNIST and FMNIST, the improvements on CIFAR-10 were less pronounced. This suggests that for datasets closer to a unimodal distribution, a complex MoG prior may be less critical. Additionally, the responsibility entropy parameter requires careful tuning to balance mode separation and overlap.

Future research could explore scaling these techniques to high-resolution datasets like CelebA-HQ to further test the robustness of adaptive variance clipping and the scalability of multimodal prior learning in even more complex adversarial settings.

Summary updated

BibTeX
@inproceedings{athanasiadis2025prior,
  author = {Ioannis Athanasiadis and Fredrik Lindsten and Michael Felsberg},
  title = {{Prior Learning in Introspective VAEs}},
  booktitle = {Greeks in AI},
  year = {2025},
  url = {https://openreview.net/forum?id=2P56Kh9kFK},
}
Figure