Adversarial Latent Autoencoders

Stanislav Pidhorskyi, Donald A. Adjeroh, Gianfranco DorettoCVPR 2020

Introduction

Generative modeling has traditionally been divided into two primary paradigms: Generative Adversarial Networks (GANs) and Autoencoders (AEs). While GANs are celebrated for producing high-fidelity, realistic images, they lack an inherent mechanism to map existing data back into a latent representation. Conversely, AEs and Variational Autoencoders (VAEs) excel at learning these representations but often suffer from "blurry" outputs. This blurriness typically stems from pixel-wise reconstruction losses (like $\ell_2$ distance) that fail to capture the sharp details prioritized by human perception.

Adversarial Latent Autoencoders (ALAE) bridge this gap. By enforcing reciprocity in a learned intermediate latent space rather than raw pixel space, ALAE achieves state-of-the-art $1024 \times 1024$ image generation while simultaneously allowing for the reconstruction and manipulation of real-world images.

The ALAE Framework

The core innovation of ALAE is a structural decomposition of the standard GAN architecture. Instead of treating the Generator and Discriminator as monolithic blocks, the authors decompose them into functional sub-components:

  • Generator ($G$): Composed of a mapping network $F$ (which transforms a noise vector $z$ to an intermediate latent space $W$) and a synthesis network $G$ (which maps $W$ to the image space $X$).
  • Discriminator ($D$): Composed of an encoder $E$ (mapping an image $X$ to the latent space $W$) and a discriminator head $D$ (mapping $W$ to a real/fake scalar).
The ALAE architecture during training and inference. Training focuses on latent reciprocity, while inference allows for direct image-to-latent encoding.

The "magic" happens in the latent space $W$. Instead of calculating reconstruction loss in the high-dimensional pixel space, ALAE enforces latent reciprocity: the model is trained so that if you take a latent vector $w$, generate an image, and then encode it back, you should recover the original $w$. This avoids the "blurriness" trap of $\ell_2$ losses because the latent space is lower-dimensional and more semantically meaningful.

StyleALAE and Architectural Symmetry

For their flagship implementation, StyleALAE, the authors leveraged the StyleGAN generator architecture. To complement it, they designed a novel encoder that mirrors the generator's structure. While the generator uses hierarchical "styles" to synthesize images, the encoder uses Instance Normalization (IN) layers to extract these same styles from an input image. These extracted styles are then combined into the latent vector $w$ via a multilinear map.

Detailed architecture of the StyleALAE encoder and generator, highlighting the symmetric flow of style information through the latent space $W$.

Key Insights

  • Learning the Prior: Unlike VAEs, which often force the latent space to follow a fixed Gaussian distribution, ALAE allows the mapping network $F$ to learn a distribution that better fits the underlying data. This leads to superior disentanglement.
  • Symmetric Style Extraction: The encoder acts as a "mirror" to the generator. By using IN layers to strip away content and isolate style, the model creates a highly efficient feedback loop for representation learning.
  • Efficiency: StyleALAE achieved impressive results with significantly less training (1M images) compared to the original StyleGAN (up to 25M images).

Results and Performance

The authors evaluated ALAE on high-resolution benchmarks including FFHQ ($1024 \times 1024$) and CelebA-HQ.

  • High-Resolution Generation: StyleALAE is the first autoencoder-based architecture to produce megapixel images with quality comparable to pure GANs.
  • Superior Disentanglement: Using the Perceptual Path Length (PPL) metric, ALAE's latent space was shown to be more linear and less entangled than standard GANs. On FFHQ, StyleALAE achieved a PPL of 134.5, significantly outperforming StyleGAN's 231.5.
  • Real Image Manipulation: Because ALAE includes a built-in encoder, it can take a real photo, encode it into $W$, and then modify specific style layers. This allows for changing attributes like hair color or age while preserving the subject's identity—a task that is notoriously difficult for standard GANs without complex optimization.

Conclusion and Future Work

ALAE successfully combines the best of both worlds: the generative power of GANs and the representational utility of Autoencoders. While there remains a slight gap in Fréchet Inception Distance (FID) scores compared to the most heavily trained GANs (e.g., 13.09 vs 4.40 on FFHQ), the model's efficiency and manipulation capabilities mark a significant step forward. Future work may explore the generalization of this symmetric style-based architecture to more irregular datasets beyond faces and bedrooms.

Summary updated

BibTeX
@inproceedings{pidhorskyi2020adversarial,
  author = {Stanislav Pidhorskyi and Donald A. Adjeroh and Gianfranco Doretto},
  title = {{Adversarial Latent Autoencoders}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.01411},
}
Figure