Abstract
This paper introduces Wasserstein Variational Inference (WVI), a new form of approximate Bayesian inference based on optimal transport theory. WVI utilizes a novel family of $c$-Wasserstein divergences that encompasses both $f$-divergences and the Wasserstein distance. By backpropagating through differentiable Sinkhorn iterations, the framework provides a stable, likelihood-free training method suitable for implicit distributions and probabilistic programs. We demonstrate that WVI-based autoencoders exhibit superior robustness and sample quality compared to traditional Variational Autoencoders (VAEs) and adversarial models.
Introduction
Traditional Variational Inference (VI) typically relies on minimizing the Kullback-Leibler (KL) divergence between an approximate posterior and the true posterior. However, KL divergence requires overlapping supports and well-defined densities—conditions often violated in high-dimensional data like natural images, which frequently reside on low-dimensional manifolds. In such cases, the KL divergence can become undefined or infinite.
While adversarial methods like Generative Adversarial Networks (GANs) or Adversarially Learned Inference (ALI) offer a flexible alternative, they are notoriously unstable and prone to mode collapse. WVI seeks a middle ground: a framework as flexible as adversarial training but as mathematically grounded and stable as classical VI.
Methodology
The $c$-Wasserstein Family
The core innovation is the $c$-Wasserstein family of divergences. This generalized framework allows researchers to blend metric-based costs (Wasserstein) with density-based costs (KL) depending on the specific problem.
Joint-Contrastive Inference
Rather than focusing solely on the posterior $p(z|x)$, WVI minimizes the divergence between two joint distributions: the model's joint $p(x, z)$ and the variational joint $q(x, z)$. This approach circumvents the need to evaluate the often intractable marginal likelihood $p(x)$.
Differentiable Sinkhorn Iterations
To address the computational complexity of the Wasserstein distance, the authors employ entropic regularization. This transforms the transport problem into a strictly convex one solvable via Sinkhorn iterations. Crucially, every step of this algorithm is differentiable, allowing for direct backpropagation to compute gradients for neural network training.
Experimental Results
The authors evaluated WVI using three standard benchmarks: MNIST, Fashion-MNIST, and the Quick Drawings dataset. They compared the Wasserstein Variational Autoencoder (WVAE) against standard VAEs and ALI.
Robustness and Stability
A key finding was the framework's robustness. In a "perturbation analysis" involving 30 simulations with randomized loss weights, the WVI model (specifically the "1111" variant) showed remarkably low variance in performance. Unlike VAEs, which showed high sensitivity, WVI consistently produced high-quality results regardless of weight initialization.
Sample Quality and Mode Collapse
Qualitatively, WVI avoids the common pitfalls of adversarial training. While ALI often suffered from mode collapse—producing repetitive or limited variations of digits—WVI maintained diverse and high-quality reconstructions and samples. Quantitatively, on MNIST, WVI achieved a lower latent space deviation (0.877) compared to VAE (3.670) and superior sample quality metrics over ALI.
Discussion and Limitations
While WVI offers significant stability and performance gains, it introduces some computational overhead. Sinkhorn iterations, though efficient, are more demanding than the closed-form KL terms used in standard VAEs. Additionally, the Sinkhorn algorithm requires careful balancing of the regularization parameter ($\epsilon$) to maintain numerical stability.
Despite these challenges, WVI represents a significant step forward for probabilistic programming, offering a robust path for combining flexible implicit models with automated inference.
Summary updated