Skip to main content
QUICK REVIEW

[Paper Review] Hamiltonian Variational Auto-Encoder

Anthony L. Caterini, Randal Douc|arXiv (Cornell University)|May 29, 2018
Model Reduction and Neural NetworksPhysics and Astronomy19 references5 citations
TL;DR

This paper proposes the Hamiltonian Variational Auto-Encoder (HVAE), a method that uses time-inhomogeneous Hamiltonian dynamics to construct a target-informed normalizing flow for variational inference. By leveraging Hamiltonian Importance Sampling and the reparameterization trick, HVAE achieves low-variance, unbiased estimators of the ELBO and its gradients, significantly improving posterior approximation and log-likelihood performance over standard VAEs and normalizing flows on benchmark datasets like MNIST.

ABSTRACT

Variational Auto-Encoders (VAEs) have become very popular techniques to perform inference and learning in latent variable models as they allow us to leverage the rich representational power of neural networks to obtain flexible approximations of the posterior of latent variables as well as tight evidence lower bounds (ELBOs). Combined with stochastic variational inference, this provides a methodology scaling to large datasets. However, for this methodology to be practically efficient, it is necessary to obtain low-variance unbiased estimators of the ELBO and its gradients with respect to the parameters of interest. While the use of Markov chain Monte Carlo (MCMC) techniques such as Hamiltonian Monte Carlo (HMC) has been previously suggested to achieve this [23, 26], the proposed methods require specifying reverse kernels which have a large impact on performance. Additionally, the resulting unbiased estimator of the ELBO for most MCMC kernels is typically not amenable to the reparameterization trick. We show here how to optimally select reverse kernels in this setting and, by building upon Hamiltonian Importance Sampling (HIS) [17], we obtain a scheme that provides low-variance unbiased estimators of the ELBO and its gradients using the reparameterization trick. This allows us to develop a Hamiltonian Variational Auto-Encoder (HVAE). This method can be reinterpreted as a target-informed normalizing flow [20] which, within our context, only requires a few evaluations of the gradient of the sampled likelihood and trivial Jacobian calculations at each iteration.

Motivation & Objective

  • To address the limitation of standard VAEs in approximating complex posterior distributions due to mean-field assumptions.
  • To develop a scalable, low-variance estimator of the ELBO and its gradients using MCMC techniques without relying on learned reverse kernels.
  • To combine the strengths of Hamiltonian Monte Carlo and normalizing flows by constructing a target-informed, inhomogeneous flow that leverages gradient information from the likelihood.
  • To enable the use of the reparameterization trick in an MCMC-based variational inference framework, ensuring efficient and unbiased gradient estimation.
  • To improve generalization and reduce model complexity by replacing overparametrized normalizing flows with dynamics informed by the target posterior.

Proposed method

  • The method uses time-inhomogeneous Hamiltonian dynamics to evolve base samples through a sequence of transformations, forming a flow that depends explicitly on the target posterior.
  • It applies Hamiltonian Importance Sampling (HIS) to construct an unbiased estimator of the ELBO and its gradients using a forward Markov chain with optimal reverse kernels.
  • The reverse kernels are derived from the time-reversed Hamiltonian dynamics, minimizing variance in the importance sampling estimator without requiring learned transition models.
  • The approach enables the use of the reparameterization trick by ensuring that the gradient of the log-likelihood is differentiable through the flow, allowing for efficient stochastic optimization.
  • The method only requires a few evaluations of the gradient of the log-likelihood per data point and trivial Jacobian calculations, making it scalable to high-dimensional data.
  • The resulting HVAE is interpreted as a normalizing flow where the transformation dynamics are informed by the target distribution, improving posterior expressivity.

Experimental results

Research questions

  • RQ1Can Hamiltonian dynamics be used to construct a low-variance, unbiased estimator of the ELBO and its gradients in a VAE framework without relying on learned reverse kernels?
  • RQ2How does incorporating target-informed dynamics improve posterior approximation and log-likelihood estimation compared to standard VAEs and normalizing flows?
  • RQ3To what extent can the reparameterization trick be applied in an MCMC-based variational inference scheme to enable efficient gradient-based optimization?
  • RQ4What is the impact of inhomogeneous dynamics (e.g., varying leapfrog step sizes or tempering schemes) on the performance of the resulting model?
  • RQ5Can a target-informed flow achieve better performance with fewer parameters than standard normalizing flows?

Key findings

  • The HVAE achieves a test NLL of 82.62 on MNIST using free tempering and varying leapfrog step sizes across layers, outperforming the base VAE (83.20) and standard normalizing flows.
  • Increasing the number of leapfrog steps to K=15 under free tempering yields the best performance, indicating that longer dynamics improve posterior approximation.
  • Varying the leapfrog step size ε across layers improves performance, suggesting that inhomogeneous dynamics enhance model expressivity.
  • The method reduces the need for overparametrized flows by using dynamics informed by the target posterior, leading to more efficient and generalizable models.
  • The use of optimal reverse kernels derived from time-reversed Hamiltonian dynamics significantly reduces variance in the ELBO estimator compared to prior MCMC-based approaches.
  • The HVAE framework allows for unbiased gradient estimation via the reparameterization trick, enabling efficient stochastic optimization despite the use of MCMC-based sampling.

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.