Learning Priors for Adversarial Autoencoders

Hui-Po Wang, Wei-Jan Ko, Wen-Hsiao Peng

TL;DR

Deep latent factor models like Adversarial Autoencoders (AAEs) usually rely on simple, manually chosen priors (like Gaussian distributions), which can limit their ability to generate complex data. This paper introduces a "code generator" network to learn a flexible, data-driven prior that better captures the underlying data distribution. The result is sharper generated images, better disentangled representations, and improved stability in high-dimensional latent spaces.

What Problem Does This Paper Address?

In generative models like Variational Autoencoders (VAEs) and AAEs, data is mapped to a compressed latent space. To ensure this latent space is well-structured so we can sample from it to generate new data, it is regularized using a "prior" distribution.

Traditionally, researchers use a standard normal distribution $\mathcal{N}(0, I)$ as the prior because it is mathematically simple and tractable. However, if the generative network (the decoder) has limited capacity, forcing complex, multimodal data into a simple Gaussian shape over-regularizes the model. This mismatch often results in blurry generated images and poor feature disentanglement. The authors tackle this by asking: instead of guessing the right prior, can we train a neural network to learn the optimal prior directly from the data?

Methods

The authors build upon the standard AAE framework but introduce a Code Generator (CG) network. The CG takes a simple noise distribution (and optionally a class label) and transforms it into a complex, learned prior distribution.

Training this architecture requires a novel alternating two-phase approach:

  1. Prior Improvement Phase: The Code Generator is trained to produce latent codes that, when passed through the decoder, generate images that can fool an image-space discriminator. This forces the learned prior to map to realistic data.
  2. AAE Phase: The autoencoder is trained. A latent-space discriminator forces the encoder's output to match the distribution produced by the Code Generator.

A Crucial Tweak: Standard AAEs use pixel-wise Mean Squared Error (MSE) to train the autoencoder, which notoriously produces blurry images. This blurriness conflicts with the adversarial training in phase 1 (which wants sharp, realistic images). To fix this, the authors replace MSE with a perceptual loss (measuring similarity in the feature space of a neural network), ensuring the decoder consistently aims for sharp images in both phases.

The authors also extend this to learn disentangled representations (separating class from style) in both supervised and unsupervised settings by maximizing the mutual information between the code generator's input and the decoder's output, inspired by InfoGAN.

Datasets

  • MNIST: Handwritten digits.
  • SVHN: Street View House Numbers.
  • CIFAR-10: Complex natural images.
  • 102 Category Flower Dataset: Used specifically to demonstrate a cross-domain text-to-image synthesis application.

Key Insights and Ideas

  • Learned Priors Beat Fixed Priors: A neural network-driven prior adapts to the data's complexity, proving that generative models don't need to be constrained by simple mathematical distributions.
  • Perceptual Loss is the Glue: The transition from MSE to perceptual loss is vital. Without it, the autoencoder's desire to create "safe, blurry" averages fights against the code generator's desire to create sharp, realistic GAN images.
  • High-Dimensional Robustness: Standard AAEs break down when the latent space gets too large (e.g., 2000 dimensions), often failing to produce recognizable images. The learned prior naturally adapts to high-dimensional spaces without collapsing.
  • Implicit Clustering: In the unsupervised setting, feeding a random categorical variable into the code generator naturally forces the model to discover and cluster distinct semantic classes (like digit types) without any human labels.

Key Results

  • Quantitative Leap: On CIFAR-10, the proposed model achieved an Inception Score (IS) of 6.52. This massively outperforms the baseline AAE (2.15), standard VAE (3.00), and even VampPrior (2.88), a competing learned-prior method.
  • Ablation Success: The authors proved every component matters. Standard AAE scored 2.15. Adding the learned prior bumped it to 3.04. Swapping MSE for perceptual loss raised it to 3.69. Updating the decoder in both training phases achieved the final 6.52.
  • Qualitative Improvements: The model generates significantly sharper images than baseline AAEs across all datasets.
  • Disentanglement: The model successfully separated "digit type" (class) from "handwriting style" (noise) on MNIST in both supervised and unsupervised setups.
  • Text-to-Image: By feeding sentence embeddings into the code generator, the model successfully generated plausible images of flowers matching text descriptions (e.g., "The flower is pink in color...").

Limitations and Future Work

Because the proposed method relies heavily on adversarial training (utilizing GAN discriminators in both the image space and the latent space), it inherits classic GAN vulnerabilities. The authors explicitly note mode collapse and training instability as the two major issues that require further investigation in future work.

Summary updated

BibTeX
@inproceedings{wang2018learning,
  author = {Hui-Po Wang and Wei-Jan Ko and Wen-Hsiao Peng},
  title = {{Learning Priors for Adversarial Autoencoders}},
  booktitle = {APSIPA},
  year = {2018},
  url = {https://openreview.net/forum?id=o5wGuZ_mmR},
}

Loading related content...

Figure