alphaFeedback

WorksMathematics

Scalable Bayesian inference for time-discretised Markov jump processes via exchangeable particle Gibbs

AI contributions
Not recorded for this paper
View details
Ancillary data
1 code link
View

Abstract

Inference in stochastic reaction-network models, such as the susceptible-exposed-infectious-recovered (SEIR) epidemic model, is crucial for understanding the dynamics of interacting systems in epidemiology, ecology, and systems biology. These models are typically represented as Markov jump processes (MJPs), with discrete, noisy observations and intractable likelihoods. Particle Markov chain Monte Carlo (PMCMC) offers a natural mechanism for inference on these hidden Markov models, but, even in moderate dimensional state spaces, particle degeneracy typically leads to poor mixing of the PMCMC algorithm. This paper focuses on improving the efficiency of particle Gibbs for inference on reaction networks by addressing the degeneracy problem. Building on recent work on the exchangeable particle Gibbs (xPG) sampler for diffusions, this paper develops a novel version of xPG tailored to discrete-state-space reaction networks, where randomness is driven by Poisson processes rather than Brownian motion. We focus on the ττ-leap discretisation of the MJPs. The proposed method retains the exchangeability framework of xPG while adapting it to the structural and computational challenges specific to reaction networks. The new method is applied to several examples, including four coupled SEIR models, where it substantially improves mixing efficiency compared with standard particle Gibbs. In this example, xPG improves sample efficiency by more than an order of magnitude relative to standard particle Gibbs, making inference feasible in hours rather than weeks. As part of our tuning strategy, we provide a mechanism for tuning the number of particles that is applicable more generally, to any particle Gibbs algorithm.

Introduction

Reaction networks are commonly used to describe dynamic processes in chemistry, epidemiology, ecology and biology. Their evolution can be represented by Markov jump processes (MJPs), which are continuous-time discrete-state stochastic processes. Compared to ordinary differential equations or stochastic differential equations (SDEs), MJPs provide a more realistic description of the evolution of such systems when there is a small number of individuals (or molecules) of each species (or reactant).

Given a sequence of noisy observations of the number of individuals of a subset of the species at a discrete set of times, we focus on performing Bayesian inference for the parameters which control the Markov jump process. In other words, we consider Hidden Markov models (HMMs) whose latent processes are MJPs.

Particle Markov chain Monte Carlo (PMCMC) algorithms [1] enable inference on HMMs. However, a major issue with these algorithms is particle degeneracy, where over successive resampling steps in the internal particle filter most of the ancestor trajectories get discarded leaving very few unique particles to represent the historical path of the system. For particle Gibbs algorithms, particle degeneracy leads to poor mixing of the states of the latent process at early time points. This occurs especially in moderate- or high-dimensional state spaces and/or when the time series of observations is long. We explain particle degeneracy in more detail in § 2.5.

One approach that has been introduced to tackle particle degeneracy is particle Gibbs with backward simulation (PGBS) [21, 22, 12]. This strategy significantly improves the sample efficiency of particle Gibbs, and was extended to particle Gibbs with ancestor sampling (PGAS) by Lindsten et al. [11]. However, PGBS and PGAS are only usable when the transition densities of the MJP are tractable. In addition, they only address the particle degeneracy issue caused by long time series; the issue persists when the dimensionality of the state space is high [7].

Exchangeable particle Gibbs (xPG) [13], iterated random-walk conditional sequential Monte Carlo (i-RW-CSMC) [7] and Particle-MALA and Particle-mGRAD [2] have been introduced to improve the sample efficiency of particle Gibbs in moderate and high-dimensional state spaces. These approaches modify the conditional particle filter, also known as conditional SMC (CSMC), within particle Gibbs to mitigate the particle degeneracy issue. However, i-RW-CSMC, particle-MALA, and particle-mGRAD all require an analytical form of the transition density in the HMM, whereas xPG does not. This represents a significant advantage when the transition density is intractable. For instance, when the latent process evolves as a diffusion in continuous time, the density of the state at a given observation time (conditional on the previous state) typically lacks a closed-form expression. Malory [13] applies xPG to such diffusions. By correlating the proposed particles with those in the reference path, xPG generates particles with higher weights. As a result, it is less likely to resample the same particle excessively, thereby mitigating particle degeneracy.

In this paper we develop xPG for HMMs whose latent processes are Markov jump processes (MJPs). We focus on the tau-leap method [8], a time discretisation of the continuous-time MJP. The MJP transition density is difficult to evaluate for two main reasons:

  • For some reaction networks, such as the susceptible-infectious-susceptible (SIS) model, there is no one-to-one map between a pair of states and the number of each type of reaction required to move from one state to the other.

  • Even if the count of each type of reaction is uniquely determined when a pair of states is given, evaluating the transition mass function at consecutive observation times requires considering all possible intermediate values between the two states, which can make the computation prohibitively expensive.

We apply xPG to simulated data for different HMMs and compare its performance against PG and, where tractable transitions permit, PGBS and xPG with backward simulation (xPGBS). The mathematical formulation of the models, the particle Gibbs algorithm for MJPs, and the issue of particle degeneracy are introduced in § 2. § 3 presents the construction of xPG for MJPs, together with a tuning strategy and a backward sampling step for our algorithm. We prove that our algorithm satisfies detailed balance with respect to the intended posterior, and describe the properties relevant to tuning. The algorithm has two key parameters: δ\delta, which controls the correlation between the proposed path and the reference path within the CSMC, and MM, the number of proposed paths in the CSMC. We propose a strategy for tuning δ\delta and MM to maximise sample efficiency, defined as the minimum effective sample size (ESS) across all state dimensions and observation time points divided by computational cost. § 3.4.1 explains why we choose this to quantify sample efficiency. In § 4, we compare the sample efficiency of xPG with PG on data simulated from SIS, susceptible-infectious-recovered (SIR), and susceptible-exposed-infectious-recovered (SEIR) models with univariate and multivariate state spaces, and data simulated from the gene autoregulatory model from Golightly and Wilkinson [10]. In the simulation studies of § 4.2 and § 4.3, xPG produces much larger improvements in efficiency compared with PG than backwards sampling does, but xPGBS is the most efficient of the four algorithms. Section 5 concludes the paper and points out some further research directions.

Notation

We employ the standard notation: a:b:={a,a+1,…,b}a:b := \{a, a+1, \ldots, b\} if b≥ab \ge a; otherwise, a:b:=∅a:b := \varnothing; xa:bx_{a:b} is the set {xc:c∈a:b}\{x_c : c \in a:b\}; i.i.d. means independent and identically distributed; Pois⁡(x;μ)\operatorname{Pois}(x;\mu) and Bin⁡(x;n,p)\operatorname{Bin}(x;n,p) are, respectively, the probability mass functions (pmfs) of a Poisson random variable with expectation μ\mu and binomial random variable with nn trials and success probability pp, evaluated at xx. Specific symbols are reserved as follows:

  • η,τ\eta, \tau — Number of time steps in the observation window and length of each step.

  • TT — Total length of the full observation window, T=n×τT = n \times\tau.

  • L,t0:LL, t_{0:L} — Number of observations, start time and observation times; t0=0t_0 = 0, tL=Tt_L = T.

  • MM — Number of proposed paths within each run of the conditional particle filter.

  • δ∈[0,1]\delta\in[0,1]. Tuning parameter. Increasing δ\delta decreases the correlation between the reference and the proposals (xPG with δ=1\delta= 1 is particle Gibbs).

  • NN — Population size.

  • NiterN_{\mathrm{iter}} — Number of iterations.

  • BℓmB_\ell^m — Index of the weighted state at observation time tℓt_\ell in the path traced back from the mm-th particle at the terminal time when running the conditional particle filter, so we have BLm=mB_L^m = m.

  • AℓmA_\ell^m — Index of the weighted, time-tℓt_\ell ancestor of the unweighted particle x~tℓm\tilde{x}_{t_\ell}^m at time point tℓt_\ell; equivalently, index of the weighted time-tℓt_\ell ancestor of the weighted particle xtℓ+1mx_{t_{\ell+1}}^m, when running the conditional particle filter, so we have aℓbℓ+1=bℓa_\ell^{b_{\ell+1}} = b_\ell, ℓ=1,…,L−1\ell= 1,\ldots,L-1.

  • Xt,j(m),iX_{t,j}^{(m),i} — The mm-th particle of the jj-th species at time tt in the ii-th MCMC iteration when running the conditional particle filter.

  • −m-m — The index set {0,…,M}∖{m}\{0,\ldots,M\} \setminus\{m\}.

  • a1:ℓ−1−b2:ℓa_{1:\ell-1}^{-b_{2:\ell}} — Shorthand for the collection a1−b2,a2−b3,…,aℓ−1−bℓa_1^{-b_2}, a_2^{-b_3}, \ldots, a_{\ell-1}^{-b_\ell}.

  • UU — The joint set of the reference path and all the random variables generated in a single run of the conditional particle filter.

  • U−U_- — Random variables UU except for the reference path.

Background

Hidden Markov model

The Hidden Markov model (HMM) is a mathematical framework modelling cases where there are noisy and/or partial observations of an underlying Markov process. The underlying Markov process is referred to as the state process or latent process, while the observations are referred to as the observation process.

If the state process evolves in continuous time, the observations can be made at any time t∈[0,T]t \in[0,T]. We assume there are LL observations, denoted by {y1,…,yL}\{y_1,\ldots,y_L\}, which occur at time t1,…,tLt_1,\ldots,t_L where t1>0t_1>0 and tL=Tt_L=T. The mathematical formulation of a time-homogeneous HMM in continuous time is given by X0∼p0(⋅∣θ)X_0 \sim p_0(\cdot\mid\theta),

X(tℓ−1,tℓ]∣(x[0,tℓ−1],y1:ℓ−1,θ)∼p(⋅∣xtℓ−1,θ),X_{(t_{\ell-1},t_\ell]} \mid\left(x_{[0,t_{\ell-1}]},y_{1:\ell-1},\theta\right) \sim p\left(\cdot\mid x_{t_{\ell-1}},\theta\right),
Yℓ∣(x[0,tℓ],y1:ℓ−1,θ)∼g(⋅∣xtℓ,θ).Y_\ell\mid\left(x_{[0,t_\ell]},y_{1:\ell-1},\theta\right) \sim g\left(\cdot\mid x_{t_\ell},\theta\right).

where ℓ=1,…,L\ell=1,\ldots,L. The initial state of the state process follows a prior distribution p0p_0 parameterised by some vector, θ\theta. The latent state at time (tℓ−1,tℓ](t_{\ell-1},t_\ell] follows a conditional distribution pp, conditional on the latent state at the previous observation time tℓ−1t_{\ell-1} and parameterised by θ\theta. Conditional on the state value xtℓx_{t_\ell}, each observation has a distribution, gg, again parameterised by θ\theta. The observations are, thus, conditionally independent given the hidden states at the corresponding time points.

Reaction networks

Reaction networks have applications across a variety of settings. For generality, they will be explained in terms of computational biology, using the terms “molecule” and “species”. For an epidemic model, these could become “individual” and “infection status”.

Suppose there are uu reactant species and vv types of reactions in a dynamical system. The general form of reaction Ri\mathcal{R}_i is given by:

∑j=1uaijXj→hi∑j=1ubijXj,i=1,…,v.\sum_{j=1}^{u} a_{ij}X_j \xrightarrow{h_i} \sum_{j=1}^{u} b_{ij}X_j,\qquad i=1,\ldots,v.

Here, Xj\mathcal{X}_j denotes a molecule of species jj, and aija_{ij} and bijb_{ij} are non-negative integers known as stoichiometric coefficients, representing the number of molecules of Xj\mathcal{X}_j consumed and produced, respectively, in reaction Ri\mathcal{R}_i. The term hih_i refers to the hazard rate, which governs the frequency at which individual events of reaction Ri\mathcal{R}_i occur. If an event of reaction Ri\mathcal{R}_i occurs at time tt, the change of the number of species Xj\mathcal{X}_j is bij−aijb_{ij}-a_{ij}, j=1,…,uj=1,\ldots,u. The state updates according to Xt=Xt−+ΓiX_t=X_{t-}+\Gamma^i, where Xt−X_{t-} denotes the state immediately before tt, and Γi=(bi1−ai1,…,biu−aiu)T\Gamma^i=(b_{i1}-a_{i1},\ldots,b_{iu}-a_{iu})^T. The u×vu \times v matrix Γ\Gamma, whose ii-th column is Γi\Gamma^i, is the stoichiometry matrix of the reaction network. We now describe the specific reaction networks that will be used in this article; the corresponding stoichiometry matrices are provided in Appendix A.

Susceptible-Infectious-Susceptible (SIS) model

The SIS model assumes two categories of individuals in a population: susceptible (S) and infectious (I). There are two reaction constants, β>0\beta>0 and γ>0\gamma>0 and two reactions:

R1:S+I→βSI/N2I(Infection),R2:I→γIS(Recovery),\mathcal{R}_1:\mathrm{S}+\mathrm{I}\xrightarrow{\beta SI/N}2\mathrm{I}\quad\text{(Infection)},\qquad\mathcal{R}_2:\mathrm{I}\xrightarrow{\gamma I}\mathrm{S}\quad\text{(Recovery)},

where SS and II are, respectively, the current S and I frequencies.

Susceptible-Infectious-Removed (SIR) model

The SIR model incorporates a third species: recovered (R), and has two reaction types:

R1:S+I→βSI/N2I(Infection),R2:I→γIR(Recovery).\mathcal{R}_1:\mathrm{S}+\mathrm{I}\xrightarrow{\beta SI/N}2\mathrm{I}\quad\text{(Infection)},\qquad\mathcal{R}_2:\mathrm{I}\xrightarrow{\gamma I}\mathrm{R}\quad\text{(Recovery)}.

Susceptible-Exposed-Infectious-Recovered (SEIR) model

The SEIR model includes an additional species, exposed (E) individuals, who are infected but not yet infectious:

R1:S+I→βSI/NE+I(Infection),R2:E→ηEI(Progression to infectious),\mathcal{R}_1:\mathrm{S}+\mathrm{I}\xrightarrow{\beta SI/N}\mathrm{E}+\mathrm{I}\quad\text{(Infection)},\qquad\mathcal{R}_2:\mathrm{E}\xrightarrow{\eta E}\mathrm{I}\quad\text{(Progression to infectious)},
R3:I→γIR(Recovery).\mathcal{R}_3:\mathrm{I}\xrightarrow{\gamma I}\mathrm{R}\quad\text{(Recovery)}.

Coupled epidemic models

Suppose a pandemic is spreading across dd regions, with the epidemiological dynamics in each region described by a separate epidemic model. Infectious individuals from region jj may infect susceptible individuals from region ii if either travels to the other’s region. Therefore, we need to couple the epidemic models via a d×dd \times d connectivity matrix, CC, where CijC_{ij} is the proportion of individuals in region jj travelling to region ii (i,j=1,…,di,j=1,\ldots,d). So the hazard rate of the infection reaction in region ii becomes

References

  1. [1]Andrieu, C., A. Doucet, and R. Holenstein (2010, May). Particle markov chain monte carlo methods. Journal of the Royal Statistical Society Series B: Statistical Methodology 72(3), 269–342.DOI
  2. [2]Corenflos, A. and A. Finke (2024). Particle-MALA and Particle-mGRAD: Gradient-based MCMC methods for high-dimensional state-space models. arXiv preprint arXiv:2401.14868.arxiv.org/abs/2401.14868
  3. [3]Doucet, A., M. K. Pitt, G. Deligiannidis, and R. Kohn (2015, 06). Efficient implementation of markov chain monte carlo when using an unbiased likelihood estimator. Biometrika 102(2), 295–313.arxiv.org/abs/1210.1871
  4. [4]Fearnhead, P., C. Nemeth, C. J. Oates, and C. Sherlock (2025a). Background. In Scalable Monte Carlo for Bayesian Learning, Institute of Mathematical Statistics Monographs, Chapter 1, pp. 1–38. Cambridge: Cambridge University Press.
  5. [5]Fearnhead, P., C. Nemeth, C. J. Oates, and C. Sherlock (2025b). Reversible MCMC and its scaling. In Scalable Monte Carlo for Bayesian Learning, Institute of Mathematical Statistics Monographs, Chapter 2, pp. 39–61. Cambridge: Cambridge University Press.DOI
  6. [6]Fearnhead, P. and C. Sherlock (2026). MCMC for state space models. In R. V. Craiu, D. Vats, G. L. Jones, S. Brooks, A. Gelman, and X.-L. Meng (Eds.), Handbook of Markov Chain Monte Carlo (2 ed.)., Chapter 13, pp. 338–367. Abingdon: Chapman and Hall/CRC.
  7. [7]Finke, A. and A. H. Thiery (2023). Conditional sequential Monte Carlo in high dimensions. The Annals of Statistics 51(2), 437–463.arxiv.org/abs/2108.10277
  8. [8]Gillespie, D. T. (1977, December). Exact stochastic simulation of coupled chemical reactions. The Journal of Physical Chemistry 81(25), 2340–2361.DOI
  9. [9]Gillespie, D. T. (2001). Approximate accelerated stochastic simulation of chemically reacting systems. The Journal of Chemical Physics 115(4), 1716–1733.DOI
  10. [10]Golightly, A. and D. J. Wilkinson (2005). Bayesian inference for stochastic kinetic models using a diffusion approximation. Biometries 61(3), 781–788.pubmed.ncbi.nlm.nih.gov/16135029
  11. [11]Lindsten, F., M. I. Jordan, and T. B. Schön (2014, 06). Particle gibbs with ancestor sampling. Journal of Machine Learning Research 15, 2145–2184.arxiv.org/abs/1401.0604
  12. [12]Lindsten, F. and T. B. Schön (2013). Backward simulation methods for Monte Carlo statistical inference. Foundations and Trends in Machine Learning 6(1), 1–143.
  13. [13]Malory, S. J. (2021). Bayesian inference for stochastic processes. Ph. D. thesis, Lancaster University.DOI
  14. [14]Roberts, G. O., A. Gelman, and W. R. Gilks (1997). Weak convergence and optimal scaling of random walk Metropolis algorithms. The Annals of Applied Probability 7(1), 110 – 120.DOI
  15. [15]Roberts, G. O. and J. S. Rosenthal (2001). Optimal scaling for various Metropolis-Hastings algorithms. Statistical Science 16(4), 351 – 367.DOI
  16. [16]Sherlock, C., P. Fearnhead, and G. O. Roberts (2010, May). The random walk metropolis: Linking theory and practice through a case study. Statistical Science 25(2), 172–190.DOI
  17. [17]Sherlock, C. and A. Golightly (2023). Exact bayesian inference for discretely observed markov jump processes using finite rate matrices. Journal of Computational and Graphical Statistics 32(1), 36–48.arxiv.org/abs/2001.02168
  18. [18]Sherlock, C. and G. Roberts (2009). Optimal scaling of the random walk metropolis on elliptically symmetric unimodal targets. Bernoulli 15(3), 774–798.
  19. [19]Sherlock, C., A. H. Thiery, G. O. Roberts, and J. S. Rosenthal (2015). On the efficiency of pseudo-marginal random walk Metropolis algorithms. The Annals of Statistics 43(1), 238–275.DOI
  20. [20]Tjelmeland, H. (2004). Using all Metropolis–Hastings proposals to estimate mean values. Technical Report Statistics No. 4/2004, Norwegian University of Science and Technology, Trondheim, Norway.
  21. [21]Whiteley, N. (2010). Discussion on particle markov chain monte carlo methods. Journal of the Royal Statistical Society: Series B 72(3), 306–307.
  22. [22]Whiteley, N., C. Andrieu, and A. Doucet (2010). Efficient bayesian inference for switching state-space models using discrete particle markov chain monte carlo methods. Technical Report 10:04, Bristol Statistics Research Report.

Paper details

vlnc:W_sk6mwfna
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Mathematics

Not recorded for this paper · View statement →

Looking for related papers…
Contents