Skip to content

Menu

WorksMathematics

Metropolized backward sampling for conditional sequential Monte Carlo

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_bmw6h2wh. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Particle Gibbs samplers with backward sampling are widely used for sampling the smoothing distribution of state-space models, but, with few particles, the new trajectory often coincides with the current one at many time steps. A known but rarely used remedy replaces the random selection of the final particle by a Metropolis–Hastings move which avoids the current particle. We show that, with backward sampling, this remedy only helps at the last time steps, because its effect on the update rates decays geometrically with the distance to the final time. We propose instead Metropolized backward sampling, which makes such a move at every step of the backward pass, forcibly switching trajectories whenever possible. Additionally, we introduce a coupled version which prevents proposing the current trajectory, maximizing the chances of an actual switch versus the current trajectory and performing perfect sampling when the state-space model has no observations, a feature not shared by backward sampling. We prove that, at every time step, both methods dominate backward sampling as they update the state more often and have smaller lag-one autocorrelations than it does. Our methods are drop-in replacements for backward sampling, and can be used to improve any particle Gibbs sampler.

Introduction

Particle Gibbs and backward sampling

Particle Gibbs samplers [1] sample the smoothing distribution of a state-space model, or, more generally, the path measure of a Feynman–Kac model [12, 6], by iterating a conditional sequential Monte Carlo (CSMC) update: a particle filter is run with one particle fixed to the current trajectory, the reference, after which a new trajectory is selected among the particles. In the original algorithm, the new trajectory is obtained by drawing a final-time particle and tracing its ancestry back in time, which we refer to as ancestral tracing (AT). Because of path degeneracy, the early states of the reference are then rarely updated when the time horizon TT is large compared with the number of particles NN. Theoretical guarantees are then only obtained when NN grows linearly with TT [2]. Backward sampling (BS) [33, 28], which adapts the backward simulation of Godsill, Doucet and West (2004) to CSMC, redraws the indices of the new trajectory backwards in time, from probabilities which combine the filtering weights with the transition densities. It dominates AT in asymptotic efficiency [8 Theorem 11] and, contrary to AT, remains effective with a number of particles which does not grow with TT [26, 23].

Metropolized Gibbs steps and the forced move

In CSMC, the final index, and, with BS, each earlier index, is drawn by a Gibbs step on the extended space of all the variables generated by the particle filter ([1, 8]), that is, from its conditional distribution, without regard for its current value. However, for discrete variables, Liu [29] proposed the Metropolized Gibbs sampler, which proposes a value different from the current one, with probabilities proportional to the conditional distribution, and accepts it with a Metropolis–Hastings probability. It dominates the Gibbs step in the ordering of Peskun [31], and hence in asymptotic variance ([32, 30]). With two candidates, the Gibbs step is the acceptance rule of Barker [3], whereas the Metropolized Gibbs step is the Metropolis rule. Chopin and Singh [7] applied this construction to the final index of CSMC with AT, under the name of forced move, and showed that the resulting sampler, which we denote by FM-AT (forced move plus ancestral tracing), dominates AT in the Peskun ordering ([31, 32]). The construction extends immediately to BS, which gives FM-BS (forced move plus backward sampling). The forced move does not appear in the published version ([8]), which concentrates on BS. To our knowledge, it is rarely used in practice. There is a simple reason for this: with BS, a forced move at the final time step only changes the final index, while the backward draws at earlier times are exact draws from conditional distributions which forget the final index. We show that, under mixing conditions, the benefit decays geometrically with the distance to the final time (Proposition 2), so that, for even moderately long time series, FM-BS behaves like BS. This is particularly clear when the model factorizes across time, as, in this case, the backward draws are independent of the final index and a forced move at the final time step does not affect any earlier time steps.

Contributions

To address this issue, we propose to make a forced move at every step of the backward pass. We call the resulting sampler Metropolized backward sampling (M-BS). The key observation is that the index drawn at time tt has a natural current value: the ancestor of the particle selected at time t+1t+1, which AT keeps deterministically, and which BS ignores. When the output and the reference differ at time t+1t+1, this ancestor is independent of the index of the reference at time tt, which may therefore be selected again, decreasing efficiency. To fix this, we introduce a coupled Metropolized backward sampling (CM-BS) variant. The index at time tt is then drawn as with BS, but replaced by a forced move away from the index of the reference if it equals the latter. We prove that CSMC remains valid when each index of the backward pass is drawn from a Markov kernel started from the index of the reference, under a symmetry condition which is directly satisfied by AT and BS, and which, when the output and the reference coincide at the next time step, is the reversibility with respect to the backward-sampling probabilities. When the output and the reference differ, the kernels of M-BS draw the index independently of the index of the reference, so that they may be started from the ancestor instead. This generalized backward pass is summarized in Algorithm 1. It is reversible with respect to the target distribution (Proposition 1), which extends the reversibility of CSMC with BS ([8 Proposition 9]). At every time step, CSMC with M-BS or CM-BS has larger update rates and smaller lag-one autocovariances of all univariate functions of the state than BS and FM-BS (Theorem 1). The update rates of the states at two consecutive time steps are ordered in the same way, as are, for M-BS, their autocovariances (Corollary 1). Given the indices of the reference and of the output at time t+1t+1, the probability that the index of the reference is selected again at time tt can only decrease when the draw of FM-BS at time tt is replaced by that of M-BS or CM-BS. At every time t<Tt < T, the update rate of M-BS, or of CM-BS, exceeds that of FM-BS by at least the expectation of this decrease under that rule (Proposition 3). When the model factorizes across time and the particles have equal weights, every state is updated under CM-BS, whereas each state is kept with probability 1/N1/N under BS and, under M-BS, with a probability which tends to 1/(N+1)1/(N+1) as T−tT-t grows. With two particles and a model which factorizes across time, CSMC with CM-BS performs an independent Metropolis–Hastings step at each time step (Proposition 4). Appendix § 10 extends Algorithm 1, its reversibility, and the results of § 4.1 and § 4.2 to potential functions which depend on two states and to any resampling scheme under which the expected number of offspring of each particle is NN times its normalized weight, with ancestor sampling of the reference. § 5 illustrates these results on a linear-Gaussian model and on the nonlinear model of Gordon, Salmond and Smith [20], which Andrieu, Doucet and Holenstein [1] used to illustrate CSMC. The proofs of our results are given in Appendix § 8.

Related work

In particle Gibbs with ancestor sampling, Lindsten, Jordan and Schön [27] (Section 6.1) observed that the ancestor index of the reference may be drawn from any Markov kernel which leaves the ancestor-sampling probabilities invariant. The backward pass of Algorithm 1 applies this idea to backward sampling, with kernels started from the indices of the reference. To reduce the cost of ancestor sampling, Lindsten, Jordan and Schön [27] suggested a Metropolis–Hastings step, which only evaluates the ancestor-sampling weights of the current and proposed indices. They recommended a proposal which never proposes the current index, in the spirit of Liu [29], without specifying it further. Such a kernel is not the Metropolized Gibbs kernel of Liu [29], whose proposal requires all the weights, so that, in general, it does not dominate the Gibbs step in the Peskun ordering. In particle smoothing, Bunch and Godsill [4] also replaced each backward draw by Metropolis–Hastings steps, started from the ancestor of the particle selected at the next time step, to reduce the cost of backward sampling. Dau and Chopin [10] formulated these steps as independent Metropolis–Hastings steps with the filtering weights as proposal. They proved that a single step per draw gives a convergent and stable smoother, at a cost linear in NN (Dau and Chopin [10], Proposition 4). Their validity rests on the same invariance as that of the forced moves of M-BS started from the ancestors: the ancestor is distributed according to the backward-sampling probabilities, which these kernels leave invariant (Dau and Chopin [10], Theorem 2.1; Lemma 4). We use the Metropolized Gibbs kernel instead, whose cost is that of BS, in order to improve the statistical efficiency of the sampler rather than its cost. In the backward pass of CSMC, the steps of Bunch and Godsill [4] would have the opposite effect of M-BS: because they favour the current index, they would reduce the update rates and increase the autocorrelations.

Backward sampling and forced moves

Feynman–Kac models and conditional SMC

Let XX be a measurable space, equipped with a σ\sigma-finite measure dxdx. We consider a Markov chain on XX with initial density m1(x1)m_1(x_1) and transition densities mt(xt−1,xt)m_t(x_{t-1},x_t), 2≤t≤T2 \le t \le T, with respect to dxdx, and potential functions gt ⁣:X→(0,∞)g_t\colon X \to(0,\infty), t∈[T]:={1,…,T}t \in[T] := \{1,\ldots,T\}. The target distribution has density

π(x1:T)=m1(x1)g1(x1)Z∏t=2Tmt(xt−1,xt)gt(xt),(1)\pi(x_{1:T}) = \frac{m_1(x_1)g_1(x_1)}{Z} \prod_{t=2}^{T} m_t(x_{t-1},x_t)g_t(x_t), \tag*{(1)}

where we assume that Z∈(0,∞)Z \in(0,\infty). For a state-space model with transition densities mtm_t and observation densities ht(yt∣xt)h_t(y_t \mid x_t), the choice gt(xt)=ht(yt∣xt)g_t(x_t) = h_t(y_t \mid x_t) makes π\pi the smoothing distribution and the particle filter below the bootstrap filter. The particle filter uses N≥2N \ge2 particles xt1,…,xtNx_t^1,\ldots,x_t^N at each time step, with the normalized weights Wti:=gt(xti)/∑j=1Ngt(xtj)W_t^i := g_t(x_t^i)/\sum_{j=1}^{N}g_t(x_t^j), which form the probability vector Wt:=(Wt1,…,WtN)\mathbf{W}_t := (W_t^1,\ldots,W_t^N). We denote by at−1n∈[N]a_{t-1}^n \in[N] the index of the ancestor at time t−1t-1 of the particle xtnx_t^n. For t∈[T−1]t \in[T-1] and i,j∈[N]i,j \in[N], we define the backward-sampling probabilities

Bt(i∣j):=Wtimt+1(xti,xt+1j)∑k=1NWtkmt+1(xtk,xt+1j).(2)B_t(i \mid j) := \frac{W_t^i m_{t+1}(x_t^i,x_{t+1}^j)}{\sum_{k=1}^{N} W_t^k m_{t+1}(x_t^k,x_{t+1}^j)}. \tag*{(2)}

Algorithm 1 (CSMC with a general backward pass). Given the reference trajectory x1:Tx_{1:T} and Markov kernels on [N][N] which are functions of the particle positions only: KTK_T, reversible with respect to WTW_T, and, for t∈[T−1]t \in[T-1] and j,j′∈[N]j,j' \in[N], Kt,j,j′K_{t,j,j'}, such that, for all i,i′∈[N]i,i' \in[N],

Bt(i∣j)Kt,j,j′(i,i′)=Bt(i′∣j′)Kt,j′,j(i′,i).(3)B_t(i \mid j)K_{t,j,j'}(i,i') = B_t(i' \mid j')K_{t,j',j}(i',i). \tag*{(3)}

(a) Draw b1,…,bTb_1,\ldots,b_T independent uniforms on [N][N].

(b) Set x1b1:=x1x_1^{b_1}:=x_1 and draw x1n∼m1x_1^n \sim m_1 for n≠b1n \ne b_1. For t=2,…,Tt=2,\ldots,T, set at−1bt:=bt−1a_{t-1}^{b_t}:=b_{t-1} and xtbt:=xtx_t^{b_t}:=x_t, then, for n≠btn \ne b_t, draw at−1n∼Wt−1a_{t-1}^n \sim W_{t-1} and xtn∼mt(xt−1at−1n,⋅)x_t^n \sim m_t(x_{t-1}^{a_{t-1}^n},\cdot).

(c) Draw lT∼KT(bT,⋅)l_T \sim K_T(b_T,\cdot).

(d) For t=T−1,…,1t=T-1,\ldots,1, draw lt∼Kt,bt+1,lt+1(bt,⋅)l_t \sim K_{t,b_{t+1},l_{t+1}}(b_t,\cdot).

(e) Return x~1:T:=(x1b1,…,xTlT)\tilde{x}_{1:T}:=(x_1^{b_1},\ldots,x_T^{l_T}).

References

  1. [1]Andrieu, C., Doucet, A. and Holenstein, R. (2010). Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 72 269–342. With discussion. https://doi.org/10.1111/j.1467-9868.2009.00736.x
  2. [2]Andrieu, C., Lee, A. and Vihola, M. (2018). Uniform ergodicity of the iterated conditional SMC and geometric ergodicity of particle Gibbs samplers. Bernoulli 24 842–872. https://doi.org/10.3150/15-BEJ785
  3. [3]Barker, A. A. (1965). Monte Carlo calculations of radiative distribution functions for a proton–electron plasma. Australian Journal of Physics 18 119–134. https://doi.org/10.1071/PH650119
  4. [4]Bunch, P. and Godsill, S. (2013). Improved particle approximations to the joint smoothing distribution using Markov chain Monte Carlo. IEEE Transactions on Signal Processing 61 956–963. https://doi.org/10.1109/TSP.2012.2229277
  5. [5]Cappé, O., Moulines, E. and Rydén, T. (2005). Inference in Hidden Markov Models. Springer Series in Statistics. Springer, New York. https://doi.org/10.1007/0-387-28982-8
  6. [6]Chopin, N. and Papaspiliopoulos, O. (2020). An Introduction to Sequential Monte Carlo. Springer Series in Statistics. Springer, Cham. https://doi.org/10.1007/978-3-030-47845-2
  7. [7]Chopin, N. and Singh, S. S. (2013). On the particle Gibbs sampler. arXiv:1304.1887v1. First version of Chopin and Singh (2015).
  8. [8]Chopin, N. and Singh, S. S. (2015). On particle Gibbs sampling. Bernoulli 21 1855–1883. https://doi.org/10.3150/14-BEJ629
  9. [9]Corenflos, A. and Finke, A. (2024). Particle-MALA and Particle-mGRAD: Gradient-based MCMC methods for high-dimensional state-space models. arXiv:2401.14868v1.arxiv.org/abs/2401.14868
  10. [10]Dau, H.-D. and Chopin, N. (2023). On backward smoothing algorithms. The Annals of Statistics 51 2145–2169. https://doi.org/10.1214/23-AOS2324
  11. [11]Dean, T. A., Singh, S. S., Jasra, A. and Peters, G. W. (2014). Parameter estimation for hidden Markov models with intractable likelihoods. Scandinavian Journal of Statistics 41 970–987. https://doi.org/10.1111/sjos.12077
  12. [12]Del Moral, P. (2004). Feynman–Kac Formulae: Genealogical and Interacting Particle Systems with Applications. Probability and its Applications. Springer, New York. https://doi.org/10.1007/978-1-4684-9393-1
  13. [13]Dobrushin, R. L. (1956). Central limit theorem for nonstationary Markov chains. I. Theory of Probability and Its Applications 1 65–80. https://doi.org/10.1137/1101006
  14. [14]Doucet, A., Godsill, S. and Andrieu, C. (2000). On sequential Monte Carlo sampling methods for Bayesian filtering. Statistics and Computing 10 197–208. https://doi.org/10.1023/A:1008935410038
  15. [15]Finke, A. (2015). On extended state-space constructions for Monte Carlo methods, PhD thesis, University of Warwick.
  16. [16]Finke, A. and Thiery, A. H. (2023). Conditional sequential Monte Carlo in high dimensions. The Annals of Statistics 51 437–463. https://doi.org/10.1214/22-AOS2252
  17. [17]Finke, A., Johansen, A. M., Lee, A. and Murray, L. M. (2026). Resampling in conditional SMC algorithms. arXiv:2606.25603v1.arxiv.org/abs/2606.25603
  18. [19]Goldstein, S. (1979). Maximal coupling. Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete 46 193–204. https://doi.org/10.1007/BF00533259
  19. [20]Gordon, N. J., Salmond, D. J. and Smith, A. F. M. (1993). Novel approach to nonlinear/non-Gaussian Bayesian state estimation. IEE Proceedings F (Radar and Signal Processing) 140 107–113. https://doi.org/10.1049/ip-f-2.1993.0015
  20. [21]Jasra, A., Singh, S. S., Martin, J. S. and McCoy, E. (2012). Filtering via approximate Bayesian computation. Statistics and Computing 22 1223–1237. https://doi.org/10.1007/s11222-010-9185-0
  21. [22]Karjalainen, J., Lee, A., Singh, S. S. and Vihola, M. (2023). On the forgetting of particle filters. arXiv:2309.08517v4.arxiv.org/abs/2309.08517
  22. [23]Karjalainen, J., Lee, A., Singh, S. S. and Vihola, M. (2026). Mixing time of the conditional backward sampling particle filter. Journal of the Royal Statistical Society Series B: Statistical Methodology 88 1087–1106. https://doi.org/10.1093/jrsssb/qkaf078
  23. [24]Karppinen, S., Singh, S. S. and Vihola, M. (2024). Conditional particle filters with bridge backward sampling. Journal of Computational and Graphical Statistics 33 364–378. https://doi.org/10.1080/10618600.2023.2231514
  24. [25]Kitagawa, G. (1996). Monte Carlo Filter and Smoother for Non-Gaussian Nonlinear State Space Models. Journal of Computational and Graphical Statistics 5 1–25. https://doi.org/10.1080/10618600.1996.10474692
  25. [26]Lee, A., Singh, S. S. and Vihola, M. (2020). Coupled conditional backward sampling particle filter. The Annals of Statistics 48 3066–3089. https://doi.org/10.1214/19-AOS1922
  26. [27]Lindsten, F., Jordan, M. I. and Schön, T. B. (2014). Particle Gibbs with ancestor sampling. Journal of Machine Learning Research 15 2145–2184.arxiv.org/abs/1401.0604
  27. [28]Lindsten, F. and Schön, T. B. (2013). Backward simulation methods for Monte Carlo statistical inference. Foundations and Trends in Machine Learning 6 1–143. https://doi.org/10.1561/2200000045
  28. [29]Liu, J. S. (1996). Peskun’s theorem and a modified discrete-state Gibbs sampler. Biometrika 83 681–682. https://doi.org/10.1093/biomet/83.3.681
  29. [30]Mira, A. (2001). Ordering and improving the performance of Monte Carlo Markov chains. Statistical Science 16 340–350. https://doi.org/10.1214/ss/1015346319
  30. [31]Peskun, P. H. (1973). Optimum Monte-Carlo sampling using Markov chains. Biometrika 60 607–612. https://doi.org/10.1093/biomet/60.3.607
  31. [32]Tierney, L. (1998). A note on Metropolis–Hastings kernels for general state spaces. The Annals of Applied Probability 8 1–9. https://doi.org/10.1214/aoap/1027961031
  32. [33]Whiteley, N. (2010). Contribution to the discussion on ‘Particle Markov chain Monte Carlo methods’ by Andrieu, C., Doucet, A., and Holenstein, R. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 72 306–307. https://doi.org/10.1111/j.1467-9868.2009.00736.x

Machine contribution statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How machine contributions are recorded

Paper details

Citation

Cite
Published
Version
Latest

Data & code

Code, data, proofs and workflows the authors linked for testing, review and reproduction. These links are part of this work’s metadata and are released under the same license as the rest of that metadata. Valency doesn’t host the files; each keeps the license set where it’s hosted.

Table 1

1 / 3
Contents

Pick where to look, or just type