Langevin dynamcs MCMC
August 17, 2020 — September 5, 2024
Sampling using the particular SDE that is the Langevin equation. It can be rather close to optimising, via SDE representations of SGD.
1 Langevin dynamics
2 Metropolis-adjusted Langevin algorithm (MALA)
3 Continuous time
See log concave distributions for a family of distributions where this works especially well because implcit (more nearly continuous-time exact) solutions are available Hodgkinson, Salomone, and Roosta (2019).
Left-field, Max Raginsky, Sampling Using Diffusion Processes, from Langevin to Schrödinger:
the Langevin process gives only approximate samples from \(\mu\). I would like to discuss an alternative approach that uses diffusion processes to obtain exact samples in finite time. This approach is based on ideas that appeared in two papers from the 1930s by Erwin Schrödinger in the context of physics, and is now referred to as the Schrödinger bridge problem.
4 Annealed
TBC Jolicoeur-Martineau et al. (2022);Song and Ermon (2020a);Song and Ermon (2020b).
Yang Song, Generative Modeling by Estimating Gradients of the Data Distribution
5 Incoming
Holden Lee, Andrej Risteski introduce the connection between log-concavity and convex optimisation.
\[ x_{t+\eta} = x_t - \eta \nabla f(x_t) + \sqrt{2\eta}\xi_t,\quad \xi_t\sim N(0,I). \]
Below are some implementations I explored. I do not recommend them necessarily; if it is a simple unadjusted Langevin sample, the algorithm is simple enough implement from scratch. Better, the ChatGPT version comes out right first time in my experience.
- Stochastic gradient Markov chain Monte Carlo - lyndonduong.com
- alisiahkoohi/Langevin-dynamics: Sampling with gradient-based Markov Chain Monte Carlo approaches
- langevin-monte-carlo/ula.py at master · abdulfatir/langevin-monte-carlo
- PYSGMCMC – Stochastic Gradient Markov Chain Monte Carlo Sampling — pysgmcmc documentation
- Stochastic gradient Langevin dynamics - Wikipedia