This repository contains the code for the paper Particle-MALA and Particle-mGRAD: Gradient-based MCMC methods for high-dimensional state-space models by Adrien Corenflos and Axel Finke, see also the attached preprint. It contains both a general implementation of the algorithms considered and the code to reproduce the experiments.
State-of-the-art methods for Bayesian inference in state-space models are (a) conditional sequential Monte Carlo (CSMC) algorithms; (b) sophisticated ‘classical’ MCMC algorithms like MALA, or mGRAD from Titsias and Papaspiliopoulos (2018).
The former propose
We introduce methods which combine the strengths of both approaches.
The first, Particle-MALA, spreads
We similarly extend other ‘classical’ MCMC approaches like auxiliary MALA, aGRAD, and preconditioned Crank–Nicolson–Langevin (PCNL) to
Scaling of the methods with the dimension | Scaling of the methods with the number of time steps | Scaling for informative vs. uninformative dynamics |
Create a clean environment using your favourite environment manager.
Run pip install .
(or if you use poetry
follow their instructions) in the root folder of the repository.
The following methods are given in order of decreasing generality: 1.
applies to all the models, 2.
does not apply to 1.
, 3.
does not apply to 1.
and 2.
, etc.
- The system is simply defined as a product of bi-variate potential functions. This is the most general case, the user can use one of the following methods:
rw_csmc.py
for the Particle-RWM algorithm.al_csmc_f.py
(auxiliary Langevin CSMC with filtering gradients) named Particle-aMALA in the paperal_csmc_s.py
(auxiliary Langevin CSMC with smoothing gradients) named Particle-aMALA+ in the paperl_csmc_f.py
(marginal MALA CSMC with filtering gradients) named Particle-MALA in the paper
- The system is given as a generic Feynman–Kac model. In this case, should simply use the
csmc.py
file. - The system is given as a Feynman–Kac model with conditionally Gaussian dynamics. In this case, the user can use
atp_csmc_f.py
(auxiliary Titsias–Papaspiliopoulos CSMC with filtering gradients) named Particle-aGRAD in the paperatp_csmc_s.py
(auxiliary Titsias–Papaspiliopoulos CSMC with smoothing gradients) named Particle-aGRAD+ in the paper. Note that this recovers Particle-aGRAD if the potentials are univariate.tp_csmc_f.py
(marginal Titsias–Papaspiliopoulos CSMC with filtering gradients) named Particle-mGRAD in the paper
- The system is given as a Feynman–Kac model with fully Gaussian dynamics. In this case, the user can use
t_atp_csmc_f.py
(twisted auxiliary Titsias–Papaspiliopoulos CSMC with filtering gradients) named twisted Particle-aGRAD in the paper
Additionally to these, a MALA algorithm (potentially with multiple proposals) is given in mala.py
and an aGRAD algorithm (potentially with multiple proposals) is given in grad.py
.
For a description of the algorithms, we refer to our article, and for a description of the arguments of each method, to the corresponding file.
Details are given in the README
file in the corresponding folder.