Cycle-Consistent Adversarial Learning as Approximate Bayesian Inference

Louis C. Tiao, Edwin V. Bonilla, Fabio RamosarXiv 2018

Introduction

Unpaired image-to-image translation is a cornerstone of modern computer vision, popularized by the CycleGAN framework. CycleGAN relies on two primary mechanisms: adversarial loss for realism and cycle consistency to preserve content across domains. While empirically successful, CycleGAN was initially motivated by intuition. This work provides a rigorous mathematical foundation by framing CycleGAN as a form of Approximate Bayesian Inference, specifically treating it as a Latent Variable Model (LVM) with implicit priors.

Methodology

The authors introduce Implicit Latent Variable Models (ILVMs), which utilize priors defined by samples rather than explicit parametric forms (e.g., Gaussians). To perform inference, they propose Symmetric Joint-Matching Variational Inference (SJMVI).

Symmetric Joint-Matching

Standard Variational Inference minimizes the reverse KL divergence between posteriors. In contrast, SJMVI minimizes the symmetric KL divergence between the exact joint distribution $p(x, z)$ and a variational joint distribution $q(x, z)$. Since these distributions are implicit, the authors employ density ratio estimation—the "GAN trick"—to approximate the KL divergence.

Theoretical Connection to CycleGAN

A key contribution is the proof that CycleGAN's heuristics are emergent properties of this Bayesian objective. By assuming Gaussian likelihoods and taking the "degenerate" limit (where variance $\sigma^2 \to 0$), the standard Bayesian objectives (ELBO and APLBO) mathematically simplify into the $L_1$ or $L_2$ cycle-consistency losses used in CycleGAN.

Experiments and Results

The framework was validated on several benchmarks, including MNIST and synthetic distributions. In experiments with a complex "banana" distribution, SJMVI successfully recovered the non-Gaussian prior shape, a task where standard VAEs fail due to their reliance on prescribed Gaussian priors.

Quantitative Performance

Quantitative evaluations on MNIST demonstrate the superiority of the SJMVI approach in reconstructing latent codes. As shown in the table below, SJMVI significantly outperforms baseline methods like VAE and Adversarial Variational Bayes (AVB) in latent reconstruction accuracy ($z$), while maintaining comparable data reconstruction accuracy ($x$).

Comparison of reconstruction performance (MSE) on MNIST. SJMVI shows superior latent code recovery (MSE z) compared to VAE and AVB.

Key Insights

  • Cycle-Consistency as Log-Likelihood: Cycle-consistency loss is shown to be the negative log-likelihood of a conditional distribution in the zero-variance limit. It effectively enforces that the model explains the data perfectly.
  • Adversarial Loss as Divergence Minimization: Discriminators in CycleGAN perform density ratio estimation to minimize the KL divergence between the generated data and the implicit prior.
  • Symmetry is Essential: Matching joint distributions $p(x, z)$ and $q(x, z)$ naturally leads to the bidirectional mappings (encoder/decoder or two generators) characteristic of CycleGAN.

Conclusion and Future Work

By providing a theoretical home for CycleGAN, this work opens avenues for principled extensions. While the current derivation assumes a degenerate limit, maintaining non-zero variance could enable robust uncertainty quantification in image translation. Future research may explore different $f$-divergences or apply SJMVI to broader "likelihood-free" generative scenarios where the process is known but the density is not.

Summary updated

BibTeX
@misc{tiao2018cycle,
  author = {Louis C. Tiao and Edwin V. Bonilla and Fabio Ramos},
  title = {{Cycle-Consistent Adversarial Learning as Approximate Bayesian Inference}},
  year = {2018},
  eprint = {1806.01771},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.01771},
}
Figure