Langevin dynamcs MCMC
August 17, 2020 — November 15, 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, I think (?), implicit (more nearly continuous-time exact) solutions are available (Hodgkinson, Salomone, and Roosta 2019).
4 Via bridges
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.
5 Annealed
TBC
See Jolicoeur-Martineau et al. (2022), Song and Ermon (2020a) and Song and Ermon (2020b)
6 Score diffusions
See score diffusions for a useful generalization/alternate use of these dynamics.
7 Non-Gaussian innovation process
Works as well, I believe. I don’t have results about this, but see Ikeda and Watanabe (2014) for some quick-and-dirty results which look like they might help.
8 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 to 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