Improving variational autoencoder with deep feature consistent and generative adversarial training

Xianxu Hou, Ke Sun, Linlin Shen, Guoping QiuNeurocomputing 2019 · DOI

Abstract

We present a new method for improving the performance of Variational Autoencoders (VAEs). In addition to enforcing the deep feature consistent principle—ensuring the VAE output and its corresponding input images share similar deep features—we implement a generative adversarial training mechanism to force the VAE to output realistic and natural images. Experimental results demonstrate that the VAE trained with our new method outperforms the state-of-the-art in generating face images with significantly clearer and more natural features, such as eyes, teeth, and hair textures. Furthermore, our method learns powerful embeddings for facial attribute manipulation and achieves state-of-the-art performance in facial attribute prediction through a proposed multi-view feature extraction strategy.

Introduction

Generative modeling has historically been divided between two dominant frameworks: Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs). VAEs are prized for their stable training and well-structured latent spaces, which allow for smooth interpolation between data points. However, they are notorious for producing blurry outputs due to their reliance on pixel-wise loss functions like Mean Squared Error (MSE). Conversely, GANs produce high-fidelity, sharp images by using a discriminator to distinguish real from fake data, but they often suffer from training instability and "mode collapse."

This paper introduces a hybrid VAE-WGAN model designed to bridge this gap. By combining deep feature consistency (perceptual loss) with Wasserstein GAN training, we create a model that generates sharp, realistic images while retaining the interpretable and manipulatable latent space of a VAE.

Methodology

The proposed architecture consists of three integrated components designed to optimize both structural accuracy and visual realism.

1. The VAE Core

The foundation is a standard residual convolutional network that maps input images to a 100-dimensional latent vector. This bottleneck ensures the model learns a compressed, meaningful representation of the data.

2. Deep Feature Consistency (DFC)

To move beyond the limitations of pixel-wise comparisons, we utilize a pre-trained VGGNet to calculate reconstruction loss. Instead of comparing raw pixels, the model compares the hidden layer features of the original and reconstructed images. This "perceptual loss" ensures that the output is structurally and texturally consistent with the input, prioritizing features that human vision recognizes as important.

3. Generative Adversarial Training (WGAN)

To further refine image sharpness, we incorporate a Discriminator based on the Wasserstein GAN (WGAN) framework. The VAE's decoder acts as the Generator. To stabilize this adversarial process, the authors introduced a novel "twist": the Discriminator does not receive raw pixels. Instead, it is fed the output of the first layer of the VGGNet. This provides the Discriminator with low-level structural information while preventing the adversarial loss from overwhelming the reconstruction objective. Additionally, the authors utilized "relaxed" labels (10 and -10) to maintain an equilibrium between reconstruction accuracy and sharpness.

Experimental Results

The model was evaluated on the CelebA dataset (200,000+ celebrity faces) and CIFAR-10 (60,000 general category images).

Visual Fidelity and Quantitative Metrics

The VAE-WGAN produced significantly clearer facial features—specifically teeth, hair textures, and eyes—compared to standard VAEs and DFC-only models. Quantitatively, the model achieved an Inception Score of 2.25 on CelebA, outperforming DCGAN (2.05) and previous VAE/GAN hybrids (1.90). On CIFAR-10, it reached 3.66, the highest in its comparison group at the time of study.

Latent Space Arithmetic

The research demonstrates that the learned latent space is linear and highly organized. By calculating attribute vectors (e.g., a "smiling vector" derived from the difference between the average latent codes of smiling and non-smiling faces), we can perform facial attribute manipulation. Adding these vectors to a neutral face's latent code successfully transforms the generated image (e.g., adding a smile or changing hair color) while preserving the subject's identity.

Attribute Prediction

We proposed a multi-view feature extraction strategy, training different VAEs on different layers of the VGG network to capture a range of features from low-level edges to high-level concepts. By concatenating these latent vectors, we achieved an average accuracy of 88.88% across 40 facial attributes, establishing a new state-of-the-art for attribute recognition.

Conclusion

The VAE-WGAN framework successfully addresses the "blurriness" problem in variational models without sacrificing the stability of the latent space. By shifting the focus from pixel-level accuracy to deep feature consistency and adversarial realism, the model provides a robust tool for both high-quality image synthesis and complex attribute manipulation. Future work will explore deeper architectures and alternative perceptual networks to further refine fine-grained textures and subtle facial expressions.

Summary updated

BibTeX
@inproceedings{hou2019improving,
  author = {Xianxu Hou and Ke Sun and Linlin Shen and Guoping Qiu},
  title = {{Improving variational autoencoder with deep feature consistent and generative adversarial training}},
  booktitle = {Neurocomputing},
  year = {2019},
  doi = {10.1016/j.neucom.2019.03.013},
}
Figure