Coupling Particle Systems Pierre E. Jacob (Harvard) joint work with Fredrik Lindsten and Thomas Schön (Uppsala) CRiSM Workshop on Estimating Constants April 20, 2016 Pierre E. Jacob Coupling Particle Systems 1/ 56 Outline 1 Motivation for coupling particle filters 2 How to couple two particle filters 3 A new smoothing algorithm Pierre E. Jacob Coupling Particle Systems 1/ 56 Hidden Markov models X0 X1 X2 ... XT θ y2 y1 ... yT Figure: Graph representation of a general hidden Markov model. (Xt ): initial µθ , transition fθ . (Yt ) given (Xt ): measurement gθ . Pierre E. Jacob Coupling Particle Systems 2/ 56 Hidden Markov models How to estimate/predict the latent process (Xt ) given the observations (Yt ) and a fixed parameter θ? How to estimate the parameter θ? Pierre E. Jacob Coupling Particle Systems 3/ 56 Example: Hidden Autoregressive Hidden process Xt = AXt−1 + εt , where εt ∼ Nd (0, I), X0 ∼ Nd (0, I). Aij = θ|i−j|+1 for i, j ∈ 1 : d. Observations Yt = Xt + ηt , where ηt ∼ Nd (0, I). taken from Guarniero, Johansen & Lee, 2015. Pierre E. Jacob Coupling Particle Systems 4/ 56 Example: Phytoplankton–Zooplankton ● 40 observations ● 30 ● ● ● 20 ● ● ● ● ● ● ● ● ● ● ● 10 ● ● ● ● ● ● ● ● ● ● ● ● 0 0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 100 200 time 300 Figure: A time series of 365 observations generated according to a phytoplankton–zooplankton model. Pierre E. Jacob Coupling Particle Systems 5/ 56 Example: Phytoplankton–Zooplankton Hidden process (Xt ) = (αt , pt , zt ). At each (integer) time, αt ∼ N (µα , σα2 ). Given αt , dpt = αt pt − cpt zt , dt dzt = ecpt zt − ml zt − mq zt2 . dt Observations: log Yt ∼ N (log pt , σy2 ). Initial distribution: (log p0 , log z0 ) ∼ N (µ0 , σ02 ). Unknown parameters: θ = (µ0 , σ0 , µα , σα , σy , c, e, ml , mq ). Pierre E. Jacob Coupling Particle Systems 6/ 56 Particle filter X0 X1 X2 ... XT θ y2 y1 Pierre E. Jacob ... Coupling Particle Systems yT 7/ 56 Particle filter X0 X1 X2 ... XT θ y2 y1 Pierre E. Jacob ... Coupling Particle Systems yT 7/ 56 Particle filter X0 X1 X2 ... XT θ y2 y1 Pierre E. Jacob ... Coupling Particle Systems yT 7/ 56 Particle filter X0 X1 X2 ... XT θ y2 y1 Pierre E. Jacob ... Coupling Particle Systems yT 7/ 56 Particle filter X0 X1 X2 ... XT θ y2 y1 Pierre E. Jacob ... Coupling Particle Systems yT 7/ 56 Particle filter X0 X1 X2 ... XT θ y2 y1 Pierre E. Jacob ... Coupling Particle Systems yT 7/ 56 Particle filter X0 X1 X2 ... XT θ y2 y1 Pierre E. Jacob ... Coupling Particle Systems yT 7/ 56 Particle filter At step t = 0, 1 Sample xk0 ∼ µθ (dx0 ), for all k ∈ 1 : N . 2 Set w0k = N −1 , for all k ∈ 1 : N . At step t ≥ 1, 1 1:N ). Sample ancestors a1:N ∼ r(da1:N | wt−1 t 2 t Sample xkt ∼ fθ (dxt | xt−1 ), for all k ∈ 1 : N . 3 Compute wtk = gθ (yt | xkt ), for all k ∈ 1 : N . ← resampling ak Pierre E. Jacob Coupling Particle Systems 8/ 56 Particle filter, rewritten At step t = 0, 1 k , compute xk = M (U k , θ), for all k ∈ 1 : N . Sample UM 0 M 2 Set w0k = N −1 , for all k ∈ 1 : N . At step t ≥ 1, 1 1:N ). Sample ancestors a1:N ∼ r(da1:N | wt−1 t 2 k , compute xk = F (x t , U k , θ), for all k ∈ 1 : N . Sample UF,t t t−1 F,t 3 Compute wtk = gθ (yt | xkt ), for all k ∈ 1 : N . ← resampling ak Pierre E. Jacob Coupling Particle Systems 9/ 56 Output Approximation of the filtering distributions ∀t ∈ {1, . . . , T } p(dxt |y1:t , θ) by ∀t ∈ {1, . . . , T } pN (dxt |y1:t , θ) = N X wtk δxk (dxt ). t k=1 Approximation of the likelihood function L(θ) = p(y1:T |θ) by N T Y 1 X wtk . pN (y1:T |θ) = N t=1 k=1 Pierre E. Jacob Coupling Particle Systems 10/ 56 Idea Particle filters are increasingly used as parts of encompassing algorithms. e.g. Particle MCMC, Iterated Filtering Some of these algorithms compare the outputs of multiple particle filters. Better algorithms can be obtained by correlating particle filters. i.e. correlation helps comparison. Pierre E. Jacob Coupling Particle Systems 11/ 56 Example: approximation of the likelihood independent common −190 transport ● ● log−likelihood ● ● −195 −200 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.2 0.3 0.4 0.5 0.2 0.3 θ 0.4 0.5 0.2 0.3 0.4 0.5 Figure: Estimates of the log-likelihood obtained by particle filters, in a hidden auto-regressive model, T = 100 observations, N = 64 particles. See Pitt & Malik, 2011, Lee 2008. Pierre E. Jacob Coupling Particle Systems 12/ 56 Example: finite difference A simple estimator of ∇`(θ) = ∇ log L(θ) is: c ∇`(θ) = log p̂N (y1:T | θ + h) − log p̂N (y1:T | θ − h) . 2h The two log-likelihood estimators can be obtained using independent particle filters given θ + h and θ − h. . . . . . but if we could positively correlate the two log-likelihood c estimators, the variance of ∇`(θ) would be smaller. Pierre E. Jacob Coupling Particle Systems 13/ 56 Example: finite difference standard deviation 100 98.1 19.1 18.6 9.8 10 5.1 4.6 3.8 2.9 2.7 2.4 2.2 2.3 2.2 2.4 2.2 1 0.01 0.05 0.1 h method: indep. common sorted index−matching transport c Figure: Standard deviation of ∇`(θ), for some θ, in a hidden auto-regressive model, T = 100 observations, N = 128 particles. Pierre E. Jacob Coupling Particle Systems 14/ 56 Example: finite difference 292.7 100 99.6 95.3 standard deviation 58.1 39.8 37.6 30.5 24.6 23.3 19.5 16.9 16 15.8 14.6 14.4 10 1 0.01 0.05 0.1 h method: indep. common sorted index−matching transport Figure: Same but in dimension 5. Pierre E. Jacob Coupling Particle Systems 15/ 56 Example: finite difference 671.9 252.3264.2 116.3109.1 136.1 standard deviation 100 61.8 64.7 70.8 54.5 51.8 43 43.9 41.4 41.3 10 1 0.01 0.05 0.1 h method: indep. common sorted index−matching transport Figure: Same but in dimension 10. Pierre E. Jacob Coupling Particle Systems 16/ 56 Example: Metropolis-Hastings Assume we can compute the target density π(θ|y1:T ) pointwise. Set some θ(1) . 2: for i = 2 to M do 3: Propose θ? ∼ q(·|θ(i−1) ). 4: Compute the ratio: 1: ! q(θ(i−1) |θ? ) π(θ? )p(y1:T |θ? ) . α = min 1, π(θ(i−1) )p(y1:T |θ(i−1) ) q(θ? |θ(i−1) ) Set θ(i) = θ? with probability α, otherwise set θ(i) = θ(i−1) . 6: end for 5: Pierre E. Jacob Coupling Particle Systems 17/ 56 Example: particle Metropolis-Hastings Assume we can run a particle filter to get pN (y1:T |θ). Set some θ(1) and sample pN (y1:T |θ(1) ). 2: for i = 2 to M do 3: Propose θ? ∼ q(·|θ(i−1) ) and sample pN (y1:T |θ? ). 4: Compute the ratio: 1: ! q(θ(i−1) |θ? ) π(θ? )pN (y1:T |θ? ) . α = min 1, π(θ(i−1) )pN (y1:T |θ(i−1) ) q(θ? |θ(i−1) ) Set θ(i) = θ? with probability α, otherwise set θ(i) = θ(i−1) . 6: end for 5: Andrieu, Doucet & Holenstein, 2010. Pierre E. Jacob Coupling Particle Systems 18/ 56 Example: particle Metropolis-Hastings The acceptance ratio involves a ratio of particle filter estimators: ! π(θ? )pN (y1:T |θ? ) q(θ(i−1) |θ? ) α = min 1, . π(θ(i−1) )pN (y1:T |θ(i−1) ) q(θ? |θ(i−1) ) If we positively correlate pN (y1:T |θ? ) and pN (y1:T |θ(i−1) ), the ratio of estimators becomes more precise. Deligiannidis, Doucet, Pitt & Kohn, 2015: epic improvements for the case large T / small N . Pierre E. Jacob Coupling Particle Systems 19/ 56 Outline 1 Motivation for coupling particle filters 2 How to couple two particle filters 3 A new smoothing algorithm Pierre E. Jacob Coupling Particle Systems 19/ 56 Coupled particle filter By coupled particle filters we mean . . . k k N two particle systems, (wtk , xkt )N k=1 and (w̃t , x̃t )k=1 , conditioned on θ and θ̃ respectively, using common random numbers UM and UF for the initial and propagation steps. One still has the freedom to choose a “coupled resampling” scheme. Pierre E. Jacob Coupling Particle Systems 20/ 56 Coupled particle filter At step t = 0, 1 k , and compute, for all k ∈ 1 : N , Sample UM k k xk0 = M (UM , θ) and x̃k0 = M (UM , θ̃). 2 Set w0k = N −1 and w̃0k = N −1 , for all k ∈ 1 : N . At step t ≥ 1, 1 Sample ancestors: 1:N 1:N (at , ãt ) ∼ r̄(·|wt−1 , w̃t−1 ). 2 ← coupled resampling k , and compute, for all k ∈ 1 : N , Sample UF,t ak ãk k k t t xkt = F (xt−1 , UF,t , θ) and x̃kt = F (x̃t−1 , UF,t , θ̃). 3 Compute wtk = g(yt | xkt , θ) and w̃tk = g(yt | x̃kt , θ̃). Pierre E. Jacob Coupling Particle Systems 21/ 56 Coupled resampling k k N Given two particle systems, (wk , xk )N k=1 and (w̃ , x̃ )k=1 . . . We want (?) to sample a1:N and ã1:N in {1, . . . , N }N such that ∀k ∀j P(ak = j) = wj and P(ãk = j) = w̃j . Equivalently, we want to sample (ak , ãk )N k=1 from a probability matrix P such that P1 = w and P T 1 = w̃. Independent resampling corresponds to P = w w̃T . What else? Pierre E. Jacob Coupling Particle Systems 22/ 56 Transport resampling Suppose that we want to sample a couple (a, ã), from some probability matrix P , such that the resampled particles, xa and x̃ã , are as similar as possible. Similarity can be encoded by a distance d on the space of x. The expected distance between xa and x̃ã , conditional upon the particles, is given by h i E d(xa , x̃ã ) = N X N X Pij d(xi , x̃j ). i=1 j=1 Pierre E. Jacob Coupling Particle Systems 23/ 56 Transport resampling Introduce J (w, w̃), the set of matrices satisfying P1 = w and P T 1 = w̃. 2 Compute D = (d(xi , x̃j ))N i,j=1 , for a cost of O(N ). Optimal transport problem: solving P? = inf N X N X P ∈J (w,w̃) Pierre E. Jacob Pij Dij . i=1 j=1 Coupling Particle Systems 24/ 56 Transport resampling Sampling from the optimal P ? minimizes the expected distance between the two sets of particles, under the marginal constraint. (Which is not exactly the same as maximizing the correlation between e.g. likelihood estimators). Computing P ? requires O(N 3 ) operations, but efficient approximations have been proposed (Cuturi 2013 and following work) in O(N 2 ). The cost is linear in the dimension of x, and independent of the model. Pierre E. Jacob Coupling Particle Systems 25/ 56 Index-matching resampling At the initial step, k k xk0 = M (UM , θ) and x̃k0 = M (UM , θ̃). so that particles with the same index are similar (if M is continuous in θ). At subsequent steps, the same random numbers UFk are k k used to propagate xa and x̃ã . Standard resampling breaks the correspondence between k k similarity and indices: xa and x̃ã might not be similar. Pierre E. Jacob Coupling Particle Systems 26/ 56 Index-matching resampling To preserve the correspondence between indices, we want to maximize the probability of drawing couples of ancestors such that a = ã. . . . i.e. we want P in J (w, w̃) with maximum trace. We can define: P = diag(min{w, w̃}) + (1 − α)r r̃T , with α= N X min{wk , w̃k }, k=1 r = (w − min{w, w̃})/(1 − α), r̃ = (w̃ − min{w, w̃})/(1 − α). P has maximum trace in J (w, w̃): we cannot augment its diagonal without violating the marginal constraints. Pierre E. Jacob Coupling Particle Systems 27/ 56 Index-matching resampling 1000 particle 750 500 250 0 0 50 100 150 time 200 # consecutive matching 0 Pierre E. Jacob 30 60 90 Coupling Particle Systems 28/ 56 Index-matching resampling Distance between 1, 000 pairs of particles, sampled independently and then propagated with common random numbers. distance 15 10 5 0 0 5 10 time 15 20 Hidden AR, θ = 0.30, θ̃ = 0.31. Pierre E. Jacob Coupling Particle Systems 29/ 56 Index-matching resampling Distance between 1, 000 pairs of particles, sampled independently and then propagated with common random numbers. distance 15 10 5 0 0 5 10 time 15 20 Hidden AR, θ = 0.30, θ̃ = 0.40. Pierre E. Jacob Coupling Particle Systems 30/ 56 Sorting and resampling Univariate setting: x is of dimension 1. k N Sort the two systems (xk )N k=1 and (x̃ )k=1 . Perform e.g. systematic resampling on each sorted system, using the same random numbers. Thus if ak selects xj in the first system, ãk is likely to select a x̃i close to xj . This can be extended to multivariate settings by sorting the particles according to the Hilbert space-filling curve. See Deligiannidis, Doucet, Pitt & Kohn, 2015, and Pitt & Malik, 2011, Gerber & Chopin, 2015. Pierre E. Jacob Coupling Particle Systems 31/ 56 Outline 1 Motivation for coupling particle filters 2 How to couple two particle filters 3 A new smoothing algorithm Pierre E. Jacob Coupling Particle Systems 31/ 56 Who cares about unbiased estimators? Coupled resampling leads to a practical unbiased estimator Hu of the smoothing quantity Z h(x0:T ) p(dx0:T |y1:T , θ), for a test function h (for fixed θ). (1) (R) Computing Hu , . . . , Hu H̄u = in parallel, we obtain R 1 X H (r) , R r=1 u along with a CLT-based error estimate. By contrast, for existing smoothing techniques, parallelism is not trivial, nor is the construction of error estimates. Pierre E. Jacob Coupling Particle Systems 32/ 56 Proposed estimator Use Rhee & Glynn (2014) trick to turn a Conditional Particle Filter kernel into an unbiased estimator of smoothing functionals. Coupled resampling schemes are instrumental in this construction. Instead of two particle systems given θ and θ̃, we consider two particle systems with same θ but different “reference trajectories”. Pierre E. Jacob Coupling Particle Systems 33/ 56 Trajectories from particle filters Upon running a particle filter, we get trajectories x1:N 0:T with weights wT1:N . 4 paths 2 0 −2 0 25 50 time 75 100 Figure: Hidden auto-regressive model, T = 100 observations, N = 128. Pierre E. Jacob Coupling Particle Systems 34/ 56 Conditional particle filter Input: a trajectory x̌0:T . At step t = 0, 1 Sample xk0 ∼ µθ (dx0 ), for all k ∈ 1 : N − 1, set xN 0 = x̌0 . 2 Set w0k = N −1 , for all k ∈ 1 : N . At step t ≥ 1, 1 2 3 −1 1:N ), set aN = N . Sample ancestors a1:N ∼ r(da1:N −1 | wt−1 t t ak t Sample xkt ∼ fθ (dxt | xt−1 ), for all k ∈ 1 : N − 1, set N xt = x̌t . Compute wtk = gθ (yt | xkt ), for all k ∈ 1 : N . Output: sample a trajectory, xk0:T with probability wTk . Pierre E. Jacob Coupling Particle Systems 35/ 56 Conditional particle filter paths 2.5 0.0 −2.5 0 25 50 time 75 100 Figure: M = 100 paths, for the hidden auto-regressive model, T = 100 observations, N = 128. Pierre E. Jacob Coupling Particle Systems 36/ 56 Conditional particle Filter x0 1 0 −1 0 25 50 iteration 75 100 Figure: M = 100 samples for x0 , for the hidden auto-regressive model, T = 100 observations, N = 128. Pierre E. Jacob Coupling Particle Systems 37/ 56 Conditional particle Filter x100 1 0 −1 −2 0 25 50 iteration 75 100 Figure: M = 100 samples for x100 , for the hidden auto-regressive model, T = 100 observations, N = 128. Pierre E. Jacob Coupling Particle Systems 38/ 56 Unbiased estimators Von Neumann & Ulam (∼ 1950), Kuti (∼ 1980), Rychlik (∼ 1990), McLeish (∼ 2010), Rhee & Glynn (2012, 2013, 2014). Introduce a sequence of random variables (H (n) ) with E[H (n) ] −−−→ Z n→∞ h(x0:T ) p(dx0:T |y1:T , θ), e.g. H (n) = h(X (n) ), with (X (n) ) generated by CPF, a sequence (∆(n) ) such that E[∆(n) ] = E[H (n) − H (n−1) ], E "∞ X # |∆(n) | < ∞, n=0 with H (−1) = 0 by convention. Pierre E. Jacob Coupling Particle Systems 39/ 56 Unbiased estimators Then E ∞ X ∆(n) = n=0 ∞ X E[∆(n) ] = n=0 ∞ X E[H (n) − H (n−1) ] n=0 = lim E[H (n) n→∞ Z ]= h(x0:T ) p(dx0:T |y1:T , θ). Thus, consider Hu = K X ∆(n) , P (K ≥ n) n=0 where K is an integer-valued random variable. Then E[Hu ] = E[ ∞ X ∆(n) 1(K ≥ n) n=0 P (K ≥ n) Pierre E. Jacob Z ]= h(x0:T ) p(dx0:T |y1:T , θ). Coupling Particle Systems 40/ 56 Unbiased estimators Idea from Rhee & Glynn, 2014. Write X (n) = ϕn (X (n−1) ) = ϕn ◦ ϕn−1 ◦ . . . ◦ ϕ1 (X (0) ). Introduce ∆ X̃ (0) = X (0) , X̃ (1) = ϕ2 (X̃ (0) ), ..., X̃ (n) = ϕn+1 ◦. . .◦ϕ2 (X (0) ). Then ∆(n) = h(X (n) ) − h(X̃ (n−1) ) is such that E[∆(n) ] = E[H (n) − H (n−1) ] and we might have E "∞ X # |∆ (n) | < ∞. n=0 Pierre E. Jacob Coupling Particle Systems 41/ 56 Unbiased estimators based on CPF chains Start from X (0) and X̃ (0) generated by two particle filters. Apply one step of CPF kernel to X (0) , to get X (1) . For n ≥ 2, apply the CPF kernel to both X (n−1) and X̃ (n−2) , with the same random numbers, to get X (n) and X̃ (n−1) . We can see each step as a joint CPF acting on pairs of trajectories, and use coupled resampling ideas. Can we expect ∆(n) = h(X (n) ) − h(X̃ (n−1) ) to decrease to zero in average? Pierre E. Jacob Coupling Particle Systems 42/ 56 Norm of ∆(n) with independent resampling 8 Norm of ∆ 6 4 2 0 0 25 50 iteration 75 100 Hidden auto-regressive model, T = 20 observations, N = 32. Pierre E. Jacob Coupling Particle Systems 43/ 56 Norm of ∆(n) with independent resampling Norm of ∆ 10 5 0 0 25 50 iteration 75 100 T = 100 observations, N = 128. Pierre E. Jacob Coupling Particle Systems 44/ 56 Norm of ∆(n) with index-matching resampling Norm of ∆ 6 4 2 0 0 25 50 iteration 75 100 T = 20 observations, N = 32. Pierre E. Jacob Coupling Particle Systems 45/ 56 Norm of ∆(n) with index-matching resampling Norm of ∆ 12 8 4 0 0 25 50 iteration 75 100 T = 100 observations, N = 128. Pierre E. Jacob Coupling Particle Systems 46/ 56 Coupled conditional particle Filter We consider coupled conditional particle filters, acting on pairs of trajectories: (X (n) , X̃ (n−1) ) = ϕ̄n (X (n−1) , X̃ (n−2) ) A coupled CPF kernel uses common random numbers for both systems, and a coupled resampling scheme. We focus on index-matching resampling. We see that after a number of coupled CPF steps, X (n) = X̃ (n) exactly, and thus ∆(n) = 0. We can thus stop early in the computation of Hu = K X ∆(n) . P (K ≥ n) n=0 Pierre E. Jacob Coupling Particle Systems 47/ 56 Proposed estimator Case h = Id: we estimate the smoothing means. Sample an integer-valued random variable K. Sample ϕ1 , draw X (0) and set X (1) = ϕ1 (X (0) ). Compute ∆(0) = X (0) , set Hu ← ∆(0) . ∆ Sample X̃ (0) = X (0) , compute ∆(1) = X (1) − X̃ (0) . Set Hu ← Hu + ∆(1) /P(K ≥ 1). For n = 2, . . . , K, Sample ϕ̄n , set (X (n) , X̃ (n−1) ) = ϕ̄n (X (n−1) , X̃ (n−2) ). Compute ∆(n) = X (n) − X̃ (n−1) . Stop if ∆(n) = 0. Set Hu ← Hu + ∆(n) /P(K ≥ n). Return Hu . Pierre E. Jacob Coupling Particle Systems 48/ 56 Example: Phytoplankton–Zooplankton count 100 50 0 1 10 iteration Geometric 100 1000 Time to merge Figure: Phytoplankton–Zooplankton model, T = 365, N = 1, 024, R = 1, 000 estimators, with a Geometric truncation with mean 100. Pierre E. Jacob Coupling Particle Systems 49/ 56 P smoothing means Example: Phytoplankton–Zooplankton 30 20 10 0 0 100 time 200 300 Figure: Smoothing means of P , T = 365, N = 1, 024, R = 1, 000 estimators, with a Geometric truncation with mean 100. The bars represent ±2σ around the estimated means. The blue line is obtained from a long CPF run. Pierre E. Jacob Coupling Particle Systems 50/ 56 Example: Phytoplankton–Zooplankton Z smoothing means 15 10 5 0 0 100 time 200 300 Figure: Smoothing means of Z, T = 365, N = 1, 024, R = 1, 000 estimators, with a Geometric truncation with mean 100. The bars represent ±2σ around the estimated means. The blue line is obtained from a long CPF run. Pierre E. Jacob Coupling Particle Systems 51/ 56 Example: Phytoplankton–Zooplankton Z smoothing means 8 6 4 2 0 0 20 time 40 60 Figure: Smoothing means of Z, first 65/365 time steps, N = 1, 024, R = 1, 000 estimators, with a Geometric truncation with mean 100. Pierre E. Jacob Coupling Particle Systems 52/ 56 Example: Phytoplankton–Zooplankton Z smoothing means 10.0 7.5 5.0 2.5 300 320 time 340 360 Figure: Smoothing means of Z, last 65/365 time steps, N = 1, 024, R = 1, 000 estimators, with a Geometric truncation with mean 100. Pierre E. Jacob Coupling Particle Systems 53/ 56 trace of relative variance Example: Phytoplankton–Zooplankton 0.100 0.010 0.001 0 100 200 time 300 Figure: Trace of relative variance of the smoothing mean estimator, T = 365, N = 1, 024, R = 1, 000 estimators, with a Geometric truncation with mean 100. Pierre E. Jacob Coupling Particle Systems 54/ 56 Discussion Coupled resampling schemes can be used to improve a variety of particle-based algorithms. New estimator of smoothing functionals, easy to parallelize and with error estimates. Benefits greatly from ancestor sampling: variance 1.00 0.01 0 100 200 time 300 400 256 Coupling 1024 Particle 4096Systems Pierre E. Jacob 500 55/ 56 The End Thank you for listening! Soon on arXiv. . . PJ, Fredrik Lindsten, Thomas Schön, Coupling Particle Filters. Pitt & Malik, 2011, Particle filters for continuous likelihood evaluation and maximisation, J. of Econometrics. Rhee & Glynn, 2014, Exact estimation for markov chain equilibrium expectations, arXiv. Deligiannidis, Doucet, Pitt & Kohn, 2015, The correlated pseudo-marginal method, arXiv. Pierre E. Jacob Coupling Particle Systems 56/ 56