Flow-GAN: Bridging implicit and prescribed learning in generative models

Aditya Grover, Manik Dhar, Stefano ErmonarXiv 2017

Introduction

Generative modeling has traditionally been divided into two distinct paradigms: prescribed models and implicit models. Prescribed models, such as Variational Autoencoders (VAEs) and Autoregressive models, define an explicit probability density function and are typically trained using Maximum Likelihood Estimation (MLE). While they offer rigorous quantitative evaluation through log-likelihood, they often produce blurry or noisy samples.

In contrast, implicit models like Generative Adversarial Networks (GANs) produce high-fidelity, sharp images by learning to sample from a distribution without an explicit density function. However, this "black box" nature makes them difficult to evaluate; researchers often rely on proxy metrics like the Inception Score, which can be misleading if the model suffers from mode collapse or memorization. Flow-GAN seeks to bridge this gap by combining the strengths of both approaches.

The Flow-GAN Framework

The core innovation of Flow-GAN is the replacement of the standard neural network generator with a Normalizing Flow.

Normalizing Flows as Generators

Unlike standard generators, a Normalizing Flow (such as NICE or Real-NVP) consists of a sequence of invertible transformations. Because the mapping from the latent noise ($z$) to the data ($x$) is invertible and differentiable, the change-of-variables formula can be used to calculate the exact probability density $p(x)$ for any given sample. This makes the model's density tractable, a feature usually reserved for prescribed models.

The Hybrid Objective

With a tractable density, Flow-GAN can be trained using a hybrid loss function that combines the standard adversarial minimax loss with a weighted log-likelihood term:

$$L = L_{adv} + \lambda L_{mle}$$

By adjusting the hyperparameter $\lambda$, the model can be tuned to prioritize either visual fidelity (low $\lambda$) or mathematical density modeling (high $\lambda$).

Visual Fidelity and the Likelihood-Sample Quality Trade-off

The authors' experiments on MNIST and CIFAR-10 reveal a significant tension between sample quality and log-likelihood. Models trained purely with adversarial loss (ADV) achieve the sharpest visual results but suffer from extremely poor log-likelihoods—often orders of magnitude worse than MLE-trained models.

Comparison of samples generated using Maximum Likelihood Estimation (MLE) versus Adversarial (ADV) training on MNIST and CIFAR-10.

As seen in the figure above, MLE-trained flows tend to produce recognizable but noisy or "grainy" digits and images. Adversarially trained flows produce much cleaner samples but, as the paper demonstrates, they achieve this by "squishing" the probability distribution into a very narrow volume of the data space.

Key Insights: The "Squashing" Effect

Through an analysis of the singular values of the generator's Jacobian matrix, the authors identified that adversarial training leads to ill-conditioned matrices. This suggests that GANs assign near-zero probability to anything slightly off the narrow manifold they have learned. This explains why they look excellent to the human eye (hitting the "modes") but fail mathematically on held-out data likelihoods.

Interestingly, the paper shows that a simple Gaussian Mixture Model (GMM) can often outperform a standard GAN on both sample quality and likelihood if properly tuned, highlighting the limitations of current GAN evaluation metrics. Furthermore, the authors demonstrate that common approximate evaluation methods like Annealed Importance Sampling (AIS) and Kernel Density Estimation (KDE) can provide misleadingly optimistic estimates for GANs, reinforcing the value of Flow-GAN’s exact likelihoods.

Results and Hybrid Success

Despite the trade-offs, the hybrid approach showed significant promise:

  • MNIST: The hybrid model ($\lambda=0.1$) achieved the highest MODE score (9.37), outperforming both pure MLE and pure ADV models. This suggests the MLE term acts as a regularizer, preventing mode collapse while the ADV term ensures sharpness.
  • CIFAR-10: The trade-off was steeper, but the hybrid model ($\lambda=1$) provided a middle ground, achieving a much better negative log-likelihood (4.21 bits/dim) than the pure ADV model (8.53 bits/dim) while maintaining reasonable visual quality.

Conclusion and Future Work

Flow-GAN provides a powerful lens through which to view the hidden failures of adversarial training. While Normalizing Flows impose certain architectural constraints—such as requiring the latent space to have the same dimensionality as the data—they offer a path toward generative models that are both visually impressive and mathematically sound. Future work may leverage these accurate density estimates for tasks like count-based exploration in Reinforcement Learning, where identifying novel states is critical.

Summary updated

BibTeX
@misc{grover2017flow,
  author = {Aditya Grover and Manik Dhar and Stefano Ermon},
  title = {{Flow-GAN: Bridging implicit and prescribed learning in generative models}},
  year = {2017},
  eprint = {1705.08868},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.08868},
}
Figure