Bayesian CycleGANs: A Probabilistic Framework
- Bayesian CycleGANs are generative adversarial networks enhanced by a Bayesian framework that employs explicit Gaussian priors, MAP estimation, and latent variable marginalization to mitigate mode collapse.
- Their dual-generator architecture and integrated cyclic losses enable stable inter-domain mapping by enforcing adversarial constraints on both direct and reconstructed outputs.
- Empirical evaluations demonstrate significant improvements in per-pixel accuracy and output diversity, outperforming classical CycleGAN models on benchmarks like Cityscapes.
Bayesian CycleGANs implement cycle-consistent generative adversarial networks in a full Bayesian framework, combining maximum a posteriori (MAP) estimation with latent variable marginalization and providing mechanisms for mitigating mode collapse and enabling output diversity. These models formalize inter-domain mapping with unpaired datasets as inference in latent variable models, exploring the full posteriors over generator and discriminator weights as well as latent inputs. Bayesian CycleGANs incorporate explicit Gaussian priors, augment adversarial objectives with latent-conditioned and reconstruction-based losses, and leverage customized training protocols to achieve improved stability and diversity relative to classical CycleGANs (You et al., 2018, Tiao et al., 2018).
1. Model Structure and Integrated Cyclic Losses
Bayesian CycleGAN employs a dual-generator architecture, and , with each generator parameterized as a ResNet comprising two convolutional downsampling layers, six residual blocks, two upsampling layers, and instance normalization. Two Patch-GAN discriminators, and , respectively classify real versus generated samples in each domain.
An integrated cyclic framework augments the standard adversarial losses: in addition to adversarial objectives on direct generated samples ( vs.\ real ), adversarial losses are placed on reconstructions ( vs.\ real ), controlled by a tunable balance factor . This bipartite structure explicitly involves the reconstructed cycle-mappings in the adversarial dynamics, in contrast to original CycleGAN which applies adversarial loss only to the direct generative mapping and cycle-consistency only as an reconstruction term (You et al., 2018).
2. Bayesian Formulation and Posterior Objectives
The Bayesian framework assigns Gaussian priors to all network parameters: and standard normal priors to per-sample latent variables . For advanced diversity, "statistic feature maps" (SFMs) drawn from a lightweight VAE-style encoder regularized by can be introduced during training.
The full posteriors over parameters, with latent variable marginalization, yield generator and discriminator objectives that integrate over sampled latent input maps. The canonical loss minimized during MAP estimation is: where the weight decay arises from the Gaussian parameter priors. Losses for and the joint generator include additional weighting by and marginalization over latent variable samples (You et al., 2018).
3. Latent Variable Marginalization and Training Algorithm
Bayesian CycleGAN avoids weight-space Monte Carlo sampling (as in traditional Bayesian GANs), instead performing marginalization over latent variables by concatenating multiple noise maps () with each input sample, forming "stitched" inputs
and similarly for . The expected losses are approximated as sums over these sampled latent variable instantiations.
A typical mini-batch SGD iteration proceeds as:
- Sample and latent maps for each and .
- Concatenate and forward through generators to produce direct and reconstructed outputs.
- Update generator parameters (including SFM encoder if present) via gradients of the log-posterior (MAP, equivalent to negative total generator loss).
- Update discriminators via their log-posterior gradients (negative total discriminator loss).
If using SFM, a term is added to the generator update to encourage compact, informative latent encoding (You et al., 2018).
4. Mechanisms for Stability and Mode Collapse Mitigation
Bayesian CycleGANs stabilize training through two key mechanisms. First, latent-conditioned sampling smears generator output distributions, preventing rapid discriminator convergence and reducing pressure toward mode collapse. Second, the balance factor places adversarial constraints directly on reconstructed (cycled) images, meaning that the discriminator learns from a wider pool of fakes, further discouraging collapse.
At equilibrium, the adversarial game is structured to achieve: so that optimality is achieved when for both mapped and reconstructed domains.
Empirical results on Cityscapes demonstrate resilience against collapse at high : for , vanilla CycleGAN yields identical label-maps for every input (mode collapse), while Bayesian CycleGAN maintains per-pixel accuracy (CycleGAN: ) (You et al., 2018).
5. Output Diversification via Latent Variables
Bayesian CycleGAN enables output diversity by restricting the latent space during training to a subspace formed by "statistic feature maps" generated from a VAE-like encoder. The strong cycle-consistency constraint empirically forces the trained model to ignore the SFM unless it is within the training subspace. At inference time, arbitrary noise or alternative SFMs can be substituted, producing visually diverse outputs for a fixed input. This is not possible in original CycleGAN due to the absence of explicit latent variable conditioning (You et al., 2018).
6. Relation to Approximate Bayesian Inference and CycleGAN Specialization
Cycle-consistent adversarial learning can be recovered as a special case of variational Bayesian inference in implicit latent variable models. Introducing an implicit prior over the latent space (e.g., drawn empirically from the target domain), and employing a symmetric KL optimization between a generative joint model and variational joint , the adversarial and cycle-consistency losses arise as specializations:
- The adversarial losses correspond to lower bounds on density ratio KL-divergences.
- Cycle-consistency losses are interpreted as log-likelihood terms in degenerate (zero-variance) Gaussian models.
- The relative weighting of generative and cycle-consistency terms corresponds to the variances in these approximations (Tiao et al., 2018).
Consequently, Bayesian CycleGANs provide a principled probabilistic semantics for each network component, and the adversarial and cycle-consistency objectives become interpretable in terms of variational inference with sample-based implicit priors. This synthesis suggests flexible extensions, such as learned hyperpriors or robust cycle-consistency costs (Tiao et al., 2018).
7. Experimental Evaluation and Comparative Results
Empirical studies demonstrate consistent performance improvements over both original and "integrated" CycleGANs. Selected results include:
- On Cityscapes, Bayesian CycleGAN elevates per-pixel accuracy from (CycleGAN, ) to (Bayesian, ). Under integrated losses (), Bayesian achieves versus CycleGAN's (mode collapse regime).
- On Maps Aerial, Bayesian CycleGAN yields FID (Aerial) , and Inception score at .
- On Monet2Photo, Inception scores increase in both directions (e.g., MonetPhoto from ).
- Ablation analyses indicate clear superiority of Bayesian latent marginalization over Dropout and buffer heuristics for stabilizing training and enabling diversity (You et al., 2018).
These results confirm that Bayesian CycleGANs offer improved resilience to adversarial imbalance, maintain stability under challenging regime, and enable sample diversity through explicit latent variable modeling.
Key References:
- "Bayesian Cycle-Consistent Generative Adversarial Networks via Marginalizing Latent Sampling" (You et al., 2018)
- "Cycle-Consistent Adversarial Learning as Approximate Bayesian Inference" (Tiao et al., 2018)