MCMC-Interactive Variational Inference

Quan Zhang, Huangjie Zheng, Mingyuan Zhou

Introduction

In Bayesian inference, researchers frequently encounter a fundamental trade-off between computational speed and posterior accuracy. Markov Chain Monte Carlo (MCMC) methods are considered the gold standard for accuracy due to their asymptotic convergence to the true posterior. However, they are often computationally prohibitive on large-scale datasets and require significant manual tuning of hyperparameters, such as step sizes. Conversely, Variational Inference (VI) offers a faster, optimization-based alternative but typically suffers from systematic bias. Specifically, VI often underestimates uncertainty by fitting a simple, tractable distribution (e.g., a Gaussian) to a complex, multi-modal posterior.

This paper introduces MCMC-Interactive Variational Inference (MIVI), a hybrid framework designed to bridge this gap. MIVI allows VI and MCMC to interact dynamically, leveraging the speed of variational methods to initialize the inference process and the flexibility of MCMC to refine the results.

The MIVI Framework

MIVI operates through a structured "relay race" approach to posterior estimation. The process is divided into three primary stages:

  1. Initialization: The process begins with a standard variational distribution, which provides an initial set of samples.
  2. Refinement: These samples are passed through a short, parameterized Markov chain (the "refiner"). Unlike traditional MCMC, which may require thousands of iterations to converge, MIVI uses a very small number of transitions (e.g., $T=5$).
  3. Joint Optimization: The parameters of the variational distribution and the MCMC transitions (such as step sizes in Langevin dynamics or neural network weights in a Gibbs sampler) are learned simultaneously.

Overcoming Intractability with Adversarial Learning

A significant challenge in training such a hybrid model is that the exact mathematical density of the samples after MCMC refinement is often unknown. To address this, the authors employ a discriminator—a technique borrowed from Generative Adversarial Networks (GANs). The discriminator is trained to distinguish between the initial variational samples and the refined MCMC samples. This provides a training signal that allows the model to maximize the Evidence Lower Bound (ELBO) through a three-player game involving the variational distribution, the MCMC transitions, and the discriminator.

Key Insights and Innovations

Mutual Improvement and Extrapolation

One of the most significant findings of the MIVI framework is the synergy between the two methods. VI assists MCMC by placing initial samples in high-density regions, effectively bypassing the lengthy "burn-in" phase. Simultaneously, MCMC provides the flexibility needed for VI to capture complex correlations and multiple modes.

Furthermore, the authors demonstrate a unique extrapolation property. Because the Markov chain is optimized to move toward the true posterior, the chain can be run for more steps during inference than were used during training. For instance, a model trained with only 5 MCMC steps can be run for 100 steps at test time, resulting in even higher accuracy and better posterior approximation.

Automated MCMC Design

MIVI also serves as a tool for automated algorithm design. In complex samplers like Gibbs sampling, certain conditional transitions may be analytically intractable. MIVI can replace these unknown transitions with neural networks, learning the optimal transition functions automatically from the data.

Experimental Results

The authors evaluated MIVI across a diverse range of benchmarks, demonstrating its versatility:

  • Generative Modeling: On the Fashion-MNIST dataset, MIVI-based Variational Autoencoders (VAEs) outperformed several state-of-the-art implicit VI methods, including SIVI and UIVI, achieving superior marginal log-likelihoods.
  • Uncertainty Quantification: In experiments using Negative Binomial models, MIVI successfully captured negative correlations between parameters—a feat that standard Mean-Field VI failed to achieve.
  • Bayesian Regression: In Bayesian bridge regression tasks using the Diabetes dataset, MIVI produced posterior estimates comparable to manually-derived, complex Gibbs samplers but with significantly lower implementation complexity.

Limitations and Future Directions

Despite its advantages, MIVI introduces new challenges. The use of a discriminator introduces adversarial instability, making training sensitive to hyperparameters. The authors recommend a pre-training phase to stabilize the distributions before introducing the discriminator. Additionally, MIVI is more computationally demanding than vanilla VI due to the overhead of running MCMC steps and a discriminator during each training epoch.

Future research may explore extending MIVI to more sophisticated MCMC strategies, such as Hamiltonian Monte Carlo (HMC), or applying the framework to larger-scale deep generative models where traditional inference remains a bottleneck.

Summary updated

BibTeX
@misc{zhang2020mcmc,
  author = {Quan Zhang and Huangjie Zheng and Mingyuan Zhou},
  title = {{MCMC-Interactive Variational Inference}},
  year = {2020},
  eprint = {2010.02029},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.02029},
}
Figure