Langevin Diffusion Variational Inference

Tomas Geffner, Justin Domke

Introduction

Variational Inference (VI) is a fundamental tool in Bayesian machine learning, yet it frequently struggles to approximate complex, multi-modal distributions. Recent advancements have integrated Markov Chain Monte Carlo (MCMC) kernels—specifically Langevin transitions—to refine simple initial distributions. However, the landscape of Langevin-based VI has remained fragmented, with methods like Unadjusted Langevin Algorithm (ULA), Unadjusted Hamiltonian Annealing (UHA), and Monte Carlo Diffusion (MCD) derived from disparate mathematical foundations.

This paper introduces Langevin Diffusion Variational Inference (LDVI), a unified framework that bridges these gaps. By simulating underdamped Langevin diffusion and its time reversal, LDVI combines the rapid convergence of momentum-based dynamics with learnable score-based augmentations to consistently outperform previous baselines.

A Unified Framework via SDEs

The authors provide a cohesive analysis based on Stochastic Differential Equations (SDEs). They model the transition from a simple prior to a complex target as a forward underdamped Langevin diffusion process. The framework consists of three key components:

  1. Forward/Backward SDEs: Defining the path toward the target and its corresponding time-reversed process.
  2. Score Network Approximation: The time-reversed SDE involves an intractable "score" term (the gradient of the log-density), which LDVI approximates using a learnable neural network, $s(t, z, \rho)$.
  3. Numerical Splitting Schemes: Instead of standard Euler-Maruyama discretization, the authors employ "splitting methods" (akin to leapfrog integrators in physics) to ensure tractable transition ratios, which is essential for calculating the Evidence Lower Bound (ELBO).

By adjusting parameters such as friction ($\gamma$) or the score network, the authors demonstrate that ULA, UHA, and MCD are all special cases of this unified model. This unification simplifies the path to innovation, leading directly to the LDVI algorithm.

Experimental Results

The framework was evaluated across several benchmarks, including logistic regression (Ionosphere, Sonar), time-series models (Brownian motion, Lorenz system), and hierarchical models (Seeds). LDVI consistently achieved the highest ELBO across all tasks and chain lengths ($K$).

ELBO performance on Ionosphere and Sonar datasets. LDVI (bold) consistently outperforms baselines across various chain lengths K.

As shown in the results for the Sonar dataset, LDVI at $K=64$ achieves an ELBO of -109.7, significantly outperforming ULA (-115.3) and the previous state-of-the-art MCD (-111.1). This efficiency allows LDVI to reach superior solutions with fewer steps than simpler methods require with much longer chains; for instance, LDVI with $K=64$ often beats MCD with $K=256$.

The Impact of Discretization

A key insight of the paper is that the numerical simulation scheme is as critical as the underlying dynamics. The authors compared their proposed splitting schemes against the common Euler-Maruyama (EM) discretization.

Comparison of ELBO values using Euler-Maruyama (EM) vs. splitting schemes for UHA and LDVI on Brownian motion and Sonar datasets.

The results indicate that using a splitting scheme yields significantly better ELBO values than EM, even when the underlying SDE remains identical. This highlights that discretization is a "first-class citizen" in the design of diffusion-based VI algorithms.

Conclusion and Future Work

LDVI represents a significant step forward in unifying Langevin-based inference methods. By leveraging momentum and learned score functions, it provides a powerful and flexible tool for Bayesian inference. While the computational cost of training score networks adds overhead, the gains in sample efficiency and approximation quality are substantial. Future work will focus on automating hyperparameter tuning for friction and step sizes, as well as scaling these methods to the high-dimensional spaces typical of deep generative models.

Summary updated

Abstract

Many methods that build powerful variational distributions based on unadjusted Langevin transitions exist. Most of these were developed using a wide range of different approaches and techniques. Unfortunately, the lack of a unified analysis and derivation makes developing new methods and reasoning about existing ones a challenging task. We address this giving a single analysis that unifies and generalizes these existing techniques. The main idea is to augment the target and variational by numerically simulating the underdamped Langevin diffusion process and its time reversal. The benefits of this approach are twofold: it provides a unified formulation for many existing methods, and it simplifies the development of new ones. In fact, using our formulation we propose a new method that combines the strengths of previously existing algorithms; it uses underdamped Langevin transitions and powerful augmentations parameterized by a score network. Our empirical evaluation shows that our proposed method consistently outperforms relevant baselines in a wide range of tasks.
BibTeX
@inproceedings{geffner2023langevin,
  author = {Tomas Geffner and Justin Domke},
  title = {{Langevin Diffusion Variational Inference}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2023},
}
Figure