Built independently by an author, for readers. Read the story and support ChapterPal

keyword

Pathfinder algorithm

The Pathfinder algorithm is a variational inference method designed to quickly generate approximate samples from continuous, differentiable probability distributions, such as posterior densities in Bayesian statistics. Starting from a random initialization point, the algorithm explores the probability space along a quasi-Newton optimization trajectory to construct local Gaussian approximations, using the optimizer inverse Hessian estimates to determine local covariance structure. It evaluates each candidate along the path to select the normal distribution that minimizes the estimated Kullback-Leibler divergence to the true target distribution, subsequently generating sample draws from that optimal approximation. Designed for high computational efficiency with minimal gradient and log-density evaluations, Pathfinder can also be executed in parallel across multiple independent trajectories combined with importance resampling to improve sample diversity and avoid local optimization traps.

1 item

Pathfinder: Parallel quasi-Newton variational inference

Pathfinder: Parallel quasi-Newton variational inference

Lu Zhang, Bob Carpenter, Andrew Gelman, Aki Vehtari

OrganizationsAalto UniversityColumbia UniversityFlatiron InstituteUniversity of Southern California

Why you should read this

Introduces Pathfinder, a parallel variational inference algorithm that constructs normal approximations along quasi-Newton optimization trajectories to produce high-quality posterior draws with one to two orders of magnitude fewer gradient evaluations than standard methods.

We propose Pathfinder, a variational method for approximately sampling from differentiable probability densities. Starting from a random initialization, Pathfinder locates normal approximations to the target density along a quasi-Newton optimization path, with local covariance estimated using the inverse Hessian estimates produced by the optimizer. Pathfinder returns draws from the approximation with the lowest estimated Kullback-Leibler (KL) divergence to the target distribution. We evaluate Pathfinder on a wide range of posterior distributions, demonstrating that its approximate draws are better than those from automatic differentiation variational inference (ADVI) and comparable to those produced by short chains of dynamic Hamiltonian Monte Carlo (HMC), as measured by 1-Wasserstein distance. Compared to ADVI and short dynamic HMC runs, Pathfinder requires one to two orders of magnitude fewer log density and gradient evaluations, with greater reductions for more challenging posteriors. Importance resampling over multiple runs of Pathfinder improves the diversity of approximate draws, reducing 1-Wasserstein distance further and providing a measure of robustness to optimization failures on plateaus, saddle points, or in minor modes. The Monte Carlo KL divergence estimates are embarrassingly parallelizable in the core Pathfinder algorithm, as are multiple runs in the resampling version, further increasing Pathfinder’s speed advantage with multiple cores.

Added

2026-09-26