Abstract
Bayesian inference in state-space models is challenging due to high-dimensional state trajectories. A viable approach is particle Markov chain Monte Carlo, combining MCMC and sequential Monte Carlo to form "exact approximations" to otherwise intractable MCMC methods. The performance of the approximation is limited to that of the exact method. We focus on particle Gibbs and particle Gibbs with ancestor sampling, improving their performance beyond that of the underlying Gibbs sampler (which they approximate) by marginalizing out one or more parameters. This is possible when the parameter prior is conjugate to the complete data likelihood. Marginalization yields a non-Markovian model for inference, but we show that, in contrast to the general case, this method still scales linearly in time. While marginalization can be cumbersome to implement, recent advances in probabilistic programming have enabled its automation. We demonstrate how the marginalized methods are viable as efficient inference backends in probabilistic programming, and demonstrate with examples in ecology and epidemiology.
Introduction
State-space models (SSMs) are fundamental tools for modeling dynamic systems across various scientific domains. However, Bayesian inference in these models is often hampered by the high dimensionality of latent state trajectories and their strong coupling with static parameters. Particle Markov chain Monte Carlo (PMCMC) methods, such as Particle Gibbs (PG), have emerged as powerful solutions by using Sequential Monte Carlo (SMC) to propose state trajectories within an MCMC framework.
Despite their utility, standard PMCMC methods face a "performance ceiling": they are exact approximations of a Gibbs sampler and thus cannot exceed the mixing performance of the exact Gibbs sampler they mimic. In many practical scenarios, the Gibbs sampler itself mixes slowly due to parameter-state dependencies, leading to highly autocorrelated samples.
Marginalized Particle Gibbs
To break this performance bottleneck, we propose marginalized versions of Particle Gibbs (mPG) and Particle Gibbs with Ancestor Sampling (mPGAS). By analytically integrating out static parameters—a process known as marginalization—we can significantly improve the mixing of the Markov chain.
Maintaining Linear Complexity
A common drawback of marginalization in SSMs is the loss of the Markov property, which typically increases computational complexity from $O(T)$ to $O(T^2)$ for a trajectory of length $T$. We identify a "restricted exponential family" class of models where the joint state-observation likelihood and the parameter prior are conjugate. In these cases, by tracking sufficient statistics of the parameters, the importance weights in the particle filter can be updated in constant time. This ensures that mPG and mPGAS maintain the efficient $O(T)$ scaling required for long time-series data.
The Blocking Strategy
One challenge with marginalization is sensitivity to "diffuse" or uninformative priors. In the early steps of a trajectory, a diffuse prior can lead to a marginalized particle filter that explores the state space too broadly, resulting in poor proposal quality. To mitigate this, we introduce a two-block Gibbs strategy. This approach uses standard updates for the initial segment of the sequence and marginalized updates for the remainder, balancing stability and efficiency.
Experimental Evaluation
We evaluated the proposed methods on a variety of models, including a non-linear toy model, a Dengue outbreak model (epidemiology), and a Song Sparrow population model (ecology).
Breaking the Performance Ceiling
The most striking result is the dramatic reduction in autocorrelation. In our toy model benchmarks, mPGAS with only 50 particles achieved lower autocorrelation than standard PGAS using 5000 particles. While standard PGAS converges to the performance of a Gibbs sampler as the number of particles $N$ increases, mPGAS converges toward an independent sampler.
Real-World Applications
In the Dengue outbreak model, marginalizing the reporting rate parameter led to a substantial drop in the Autocorrelation Function (ACF), allowing for much faster exploration of the parameter space. Furthermore, the computational overhead of marginalization was found to be minimal, with the gains in sample quality far outweighing the slight increase in per-iteration time.
Conclusion and Implementation
The marginalized methods are implemented in the Birch probabilistic programming language. Birch utilizes "delayed sampling" to automate the complex mathematical derivations required for marginalization, making these advanced inference techniques accessible to non-experts. Future work aims to further automate the selection of blocking strategies within the PPL framework to provide a truly "plug-and-play" experience for efficient Bayesian inference in state-space models.
Summary updated