Skip to main content
QUICK REVIEW

[Paper Review] A Contrastive Divergence for Combining Variational Inference and MCMC

Francisco J. R. Ruiz, Michalis K. Titsias|arXiv (Cornell University)|May 10, 2019
Generative Adversarial Networks and Image SynthesisComputer Science24 citations
TL;DR

This paper introduces the Variational Contrastive Divergence (VCD), a novel divergence that enables tractable optimization of variational inference by combining it with Markov Chain Monte Carlo (MCMC) sampling. By using MCMC steps to refine an initial variational distribution and optimizing the VCD objective, the method achieves better predictive performance than standard variational inference and prior MCMC-variational hybrids on latent variable models like VAEs and logistic matrix factorization.

ABSTRACT

We develop a method to combine Markov chain Monte Carlo (MCMC) and variational inference (VI), leveraging the advantages of both inference approaches. Specifically, we improve the variational distribution by running a few MCMC steps. To make inference tractable, we introduce the variational contrastive divergence (VCD), a new divergence that replaces the standard Kullback-Leibler (KL) divergence used in VI. The VCD captures a notion of discrepancy between the initial variational distribution and its improved version (obtained after running the MCMC steps), and it converges asymptotically to the symmetrized KL divergence between the variational distribution and the posterior of interest. The VCD objective can be optimized efficiently with respect to the variational parameters via stochastic optimization. We show experimentally that optimizing the VCD leads to better predictive performance on two latent variable models: logistic matrix factorization and variational autoencoders (VAEs).

Motivation & Objective

  • To address the challenge of optimizing variational inference when the improved posterior distribution is defined implicitly after MCMC sampling.
  • To develop a tractable, differentiable objective that enables stochastic optimization of variational parameters despite the intractable density of MCMC-refined distributions.
  • To improve predictive performance in latent variable models by leveraging MCMC refinement while retaining the efficiency and amortization benefits of variational inference.
  • To provide a principled divergence that asymptotically converges to the symmetrized KL divergence and supports unbiased gradient estimation for optimization.

Proposed method

  • Proposes the Variational Contrastive Divergence (VCD), a divergence that measures discrepancy between the initial variational distribution and its MCMC-improved version, rather than between the variational and true posterior.
  • Uses a fixed number of MCMC steps (e.g., HMC) to refine the initial variational proposal, producing an implicit, improved distribution with intractable density.
  • Derives an unbiased Monte Carlo estimator of the VCD gradient using samples from the MCMC chain, enabling stochastic optimization of the variational parameters.
  • Optimizes the VCD objective via stochastic gradient descent, where MCMC samples provide feedback to update the variational parameters.
  • Employs a contrastive training strategy: the VCD objective is minimized with respect to the variational parameters while the MCMC chain is run from the current variational distribution.
  • Applies the method in amortized inference settings, where a global variational family is used to quickly approximate posteriors over local latent variables per observation.

Experimental results

Research questions

  • RQ1Can a principled divergence be defined that allows optimization of variational parameters when the improved posterior is implicitly defined by MCMC sampling?
  • RQ2Does combining MCMC refinement with variational inference via the VCD objective lead to better predictive performance than standard variational inference or prior MCMC-variational hybrids?
  • RQ3How does the number of MCMC steps affect the performance and computational cost of the VCD-based inference?
  • RQ4Can the VCD support stable and efficient optimization across different models and datasets, even with a small number of MCMC steps?
  • RQ5Is the VCD a valid divergence that asymptotically converges to the symmetrized KL divergence, ensuring consistency with standard variational inference in the limit?

Key findings

  • Optimizing the VCD objective leads to significantly better test log-likelihood performance on both MNIST and Fashion-MNIST datasets compared to standard variational inference and the method of Hoffman (2017).
  • Even with only 2 MCMC steps, the VCD-based method achieves higher test log-likelihood than standard variational inference, demonstrating immediate gains from MCMC refinement.
  • Performance improves monotonically with increasing numbers of MCMC steps, with the best results achieved at 8 steps, confirming the benefit of longer chains.
  • The computational cost of the VCD algorithm increases linearly with the number of MCMC steps, but optimization remains stable and slightly faster than the method of Hoffman (2017), despite additional computations.
  • The VCD supports unbiased gradient estimation, enabling reliable stochastic optimization, and the method is robust across different models and datasets.
  • The VCD converges asymptotically to the symmetrized KL divergence between the initial variational distribution and the true posterior, ensuring theoretical consistency in the limit of infinite MCMC steps.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.