MetFlow: A New Efficient Method for Bridging the Gap between Markov Chain Monte Carlo and Variational Inference

Achille Thin, Nikita Kotelevskii, Jean-Stanislas Denain, Léo Grinsztajn, Alain Durmus, Maxim Panov, Eric MoulinesarXiv 2020

Introduction

In Bayesian machine learning, approximating complex posterior distributions remains a fundamental challenge. Practitioners typically choose between Variational Inference (VI), which is fast but often lacks expressivity, and Markov Chain Monte Carlo (MCMC), which is theoretically exact but computationally slow. MetFlow introduces a hybrid framework that bridges this gap by using Normalizing Flows (NFs) as flexible proposal kernels within a Metropolis-Hastings (MH) framework.

Methodology: Metropolized Flows

MetFlow treats Normalizing Flows not as simple deterministic transformations, but as a proposal mechanism for MCMC. By integrating flows into the MH framework, the target distribution is guaranteed to be invariant. This "safety net" ensures that even if the flow is imperfect, the MCMC steps will refine the samples toward the true distribution.

A significant hurdle in previous hybrid methods was the need to learn "reverse kernels" to compute the Evidence Lower Bound (ELBO), which added substantial computational overhead. MetFlow bypasses this by introducing a new, computationally tractable auxiliary ELBO ($\mathcal{L}_{aux}$). This formulation allows for optimization using the reparameterization trick without requiring a second model to guess the chain's history.

Experimental Evaluation

The authors evaluated MetFlow on benchmarks designed to test specific failure modes, such as mode-seeking in multi-modal distributions and scaling to high dimensions.

MetFlow performance on synthetic 2D distributions, illustrating mode recovery and handling of complex geometries.

Key benchmarks included:

  • Synthetic 2D Distributions: Testing mode-seeking capabilities (e.g., 8-Gaussian mixture) and handling narrow geometries (e.g., Neal’s Funnel).
  • High-Dimensional Scaling: Testing performance on Gaussian mixtures in up to 100 dimensions.
  • Binarized MNIST: Applying MetFlow to Variational Autoencoder (VAE) posteriors and image inpainting tasks.

Key Results and Discussion

MetFlow demonstrates superior performance in capturing multi-modal distributions where standard flows often fail. In the 8-Gaussian mixture test, standard models like Real-NVP frequently collapsed to a subset of modes, whereas MetFlow successfully recovered all eight.

Comparison of target distributions against standard RNVP and MetFlow variants, showing MetFlow's superior expressivity across multiple toy datasets.

In high-dimensional settings (100D), MetFlow outperformed state-of-the-art methods like Neural Autoregressive Flows (NAF) and the No-U-Turn Sampler (NUTS), maintaining sample diversity where others collapsed. For MNIST inpainting, MetFlow produced sharper, more varied completions, reflecting its ability to explore multiple plausible hypotheses for a partial image (e.g., identifying that a partial "3" could also be a "5" or "9").

Conclusion

MetFlow offers a powerful middle ground between VI and MCMC. By leveraging the speed of flows and the robustness of MH steps, it achieves high expressivity without the overhead of reverse kernels. Future work may involve integrating more advanced flow architectures to further enhance its sampling capabilities in large-scale generative models.

Summary updated

BibTeX
@misc{thin2020metflow,
  author = {Achille Thin and Nikita Kotelevskii and Jean-Stanislas Denain and Léo Grinsztajn and Alain Durmus and Maxim Panov and Eric Moulines},
  title = {{MetFlow: A New Efficient Method for Bridging the Gap between Markov Chain Monte Carlo and Variational Inference}},
  year = {2020},
  eprint = {2002.12253},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.12253},
}
Figure