Learning Latent Variable Models via Jarzynski-adjusted Langevin Algorithm

James Cuin, Davide Carbone, Ömer Deniz Akyıldız · DOI

Abstract

We utilise a sampler originating from nonequilibrium statistical mechanics, termed here Jarzynski-adjusted Langevin algorithm (JALA), to build statistical estimation methods in latent variable models. We achieve this by leveraging Jarzynski's equality and developing algorithms based on a weighted version of the unadjusted Langevin algorithm (ULA) with recursively updated weights. Adapting this for latent variable models, we develop a sequential Monte Carlo (SMC) method that provides the maximum marginal likelihood estimate of the parameters, termed JALA-EM. Under suitable regularity assumptions on the marginal likelihood, we provide a nonasymptotic analysis of the JALA-EM scheme implemented with stochastic gradient descent and show that it provably converges to the maximum marginal likelihood estimate. We demonstrate the performance of JALA-EM on a variety of latent variable models and show that it performs comparably to existing methods in terms of accuracy and computational efficiency. Importantly, the ability to recursively estimate marginal likelihoods - an uncommon feature among scalable methods - makes our approach particularly suited for model selection, which we validate through dedicated experiments.

Introduction

Latent Variable Models (LVMs) are fundamental to statistical modeling, allowing researchers to capture hidden structures within complex datasets, such as document topics or biological states. Training these models typically involves maximizing the marginal likelihood—the probability of observed data averaged over all possible latent states. However, this averaging process often results in intractable integrals, necessitating the use of the Expectation-Maximization (EM) algorithm. Traditional EM variants often rely on computationally expensive Markov Chain Monte Carlo (MCMC) simulations. While recent particle-based methods offer improved scalability, they frequently suffer from slow convergence due to coupled step sizes between latent variables and model parameters. Furthermore, these methods often fail to provide a direct estimate of the marginal likelihood, which is critical for model selection.

The JALA-EM Framework

This paper introduces the Jarzynski-adjusted Langevin Algorithm (JALA), a novel approach that integrates nonequilibrium statistical mechanics into statistical estimation. The core innovation lies in leveraging Jarzynski’s equality, which relates work performed on a system to its free energy change.

JALA-EM employs a population of particles within a Sequential Monte Carlo (SMC) framework. Unlike standard unadjusted Langevin algorithms that introduce bias, JALA-EM uses recursively updated weights (the "Jarzynski factor") to correct this bias without the need for expensive Metropolis-Hastings rejection steps. A significant advantage of JALA-EM is decoupled learning: it allows for independent step sizes for latent variable sampling and parameter updates. This decoupling enhances stability and significantly accelerates convergence compared to state-of-the-art methods like PGD or IPLA.

Experimental Evaluation

The authors evaluated JALA-EM across diverse benchmarks, including:

  • Wisconsin Breast Cancer Dataset: Used for Bayesian logistic regression in binary classification.
  • MNIST: Applied to Bayesian Neural Networks (BNNs) for both binary and multi-class digit classification, scaling to over 400,000 latent variables.
  • Synthetic Regression: Designed to test model selection capabilities by comparing Gaussian vs. Student-t error distributions.

Key Results and Insights

JALA-EM demonstrates superior performance in both speed and estimation quality. On the Wisconsin Breast Cancer task, the algorithm converged to optimal parameters significantly faster than PGD and SOUL.

Comparison of convergence speed (left) and posterior distribution quality (right) for JALA-EM, PGD, and SOUL.

As shown in the figure above, JALA-EM (pink line) reaches the parameter plateau much earlier than its competitors while maintaining a high-quality Kernel Density Estimate (KDE) of the latent variables.

Beyond speed, JALA-EM provides an "on-the-fly" estimate of the marginal likelihood (the evidence) as a byproduct of the training process. This feature enables automated model selection; in synthetic trials, JALA-EM correctly identified the true underlying model structure with near-perfect accuracy (100% for Gaussian trials and 99% for Student-t trials). The method also proved robust to low particle counts, maintaining accuracy with as few as 10 particles, where other methods often fail.

Conclusion and Future Work

JALA-EM represents a significant step forward in training latent variable models, offering a scalable and efficient framework that provides marginal likelihood estimates for free. While the method must manage potential weight degeneracy in extremely high-dimensional spaces—typically addressed through resampling—it offers a robust alternative to existing particle methods. Future research will explore advanced particle filtering techniques, such as tempering, to further enhance performance in high-dimensional latent spaces.

Summary updated

BibTeX
@inproceedings{cuin2025learning,
  author = {James Cuin and Davide Carbone and Ömer Deniz Akyıldız},
  title = {{Learning Latent Variable Models via Jarzynski-adjusted Langevin Algorithm}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=LpY1jgtk8I},
}
Figure