A Unified f-divergence Framework Generalizing VAE and GAN

Jaime Roquero Gimenez, James Y. ZouarXiv 2022 · DOI

Abstract

Generative modeling has long been divided between Variational Auto-Encoders (VAEs), known for stability and data coverage, and Generative Adversarial Networks (GANs), known for sample sharpness but prone to instability. We present $f$-GM, a unified framework that bridges these paradigms using $f$-divergences and Fenchel-Young duality. This approach allows a single architecture to exhibit VAE or GAN characteristics simply by varying the divergence function, providing a theoretically grounded method to balance sample quality and diversity.

Introduction

Deep generative modeling typically forces a choice between two distinct methodologies: VAEs and GANs. VAEs minimize the Kullback-Leibler (KL) divergence, resulting in stable training and broad data coverage at the cost of blurry samples. Conversely, GANs often utilize Jensen-Shannon (JS) divergence to produce sharp images, but suffer from training instability and "mode collapse." Historically, these families were treated as mathematically separate. The $f$-GM framework addresses this fragmentation by providing a tractable objective that encompasses both, allowing researchers to explore the spectrum of $f$-divergences within a single model.

Methodology: The $f$-GM Framework

The proposed $f$-divergence Generative Model ($f$-GM) jointly optimizes three components: a Generator ($p_\theta$), an Inference Network ($q_\phi$), and a Density Estimator ($p_\eta$).

The core innovation lies in applying the Fenchel-Young inequality to derive a variational lower bound for the $f$-divergence between the model's joint distribution and the true data distribution. While standard GANs use this inequality to replace likelihood ratios with discriminators, $f$-GM applies it specifically to bound the unknown true data density $p^*$. This preserves the model's status as a lower bound of the true objective, enhancing theoretical stability. Notably, $f$-GM simplifies to a standard VAE when using KL-divergence and approximates $f$-GAN behavior under other divergences.

Experimental Results

The authors evaluated $f$-GM across MNIST, Fashion-MNIST, and synthetic Mixture of Gaussians datasets to observe the trade-offs between different divergence measures.

Sharpness vs. Diversity

A primary finding is the stark contrast in output quality based on the chosen divergence. Using the same architecture, switching from KL to JS divergence shifted the model from "blurry but diverse" to "sharp but collapsed" outputs.

Comparison of generated samples using Jensen-Shannon vs. Kullback-Leibler divergences on MNIST and Fashion-MNIST.

On the MNIST dataset, the JS-divergence variant produced sharp digits but frequently collapsed to only a few modes (e.g., only digits '0' and '1'), whereas the KL variant covered all ten digits with lower visual fidelity.

Visualizing Mode Collapse

To further diagnose mode collapse, the authors utilized a 2D Mixture of Gaussians. The explicit density estimator ($p_\eta$) in $f$-GM serves as a diagnostic tool, identifying regions of the data space that the generator fails to cover.

Visualization of mode collapse in a Mixture of Gaussians experiment over 400 epochs.

As shown in the synthetic experiments, the generator trained with JS-divergence eventually "loses" modes of the true distribution, while the density estimator correctly flags these missing areas.

Discussion and Limitations

$f$-GM offers significant theoretical advantages, such as decoupling the density estimator's optimal parameters from the generator's state, potentially stabilizing training compared to traditional adversarial setups. However, several challenges remain. The framework's proofs rely on the "infinite capacity" of neural networks, which is rarely met in practice. Additionally, the simultaneous training of three networks increases computational overhead and introduces sensitivity to hyperparameters like learning rates.

Future research may explore intermediate $f$-divergences, such as Pearson $\chi^2$ or squared Hellinger, to find a superior balance between the sharpness of GANs and the diversity of VAEs.

Summary updated

BibTeX
@misc{gimenez2022unified,
  author = {Jaime Roquero Gimenez and James Y. Zou},
  title = {{A Unified f-divergence Framework Generalizing VAE and GAN}},
  year = {2022},
  eprint = {2205.05214},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.05214},
}
Figure