Monte Carlo Approximation of Monte Carlo Filters Adam M. Johansen - - PowerPoint PPT Presentation

monte carlo approximation of monte carlo filters
SMART_READER_LITE
LIVE PREVIEW

Monte Carlo Approximation of Monte Carlo Filters Adam M. Johansen - - PowerPoint PPT Presentation

Monte Carlo Approximation of Monte Carlo Filters Adam M. Johansen et al. Collaborators Include: Arnaud Doucet, Axel Finke, Anthony Lee, Nick Whiteley 7th January 2014 Introduction Monte Carlo Approximationof Monte Carlo Filters Approximating


slide-1
SLIDE 1

Monte Carlo Approximation

  • f Monte Carlo Filters

Adam M. Johansen et al. Collaborators Include: Arnaud Doucet, Axel Finke, Anthony Lee, Nick Whiteley 7th January 2014

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-2
SLIDE 2

Context & Outline

Filtering in State-Space Models:

◮ SIR Particle Filters [GSS93] ◮ Rao-Blackwellized Particle Filters [AD02, CL00] ◮ Block-Sampling Particle Filters [DBS06]

Exact Approximation of Monte Carlo Algorithms:

◮ Particle MCMC [ADH10] ◮ SMC2 [CJP13]

Approximating the RBPF

◮ Approximated Rao-Blackwellized Particle Filters [CSOL11] ◮ Exactly-approximated RBPFs [JWD12]

Approximating the BSPF

◮ Local SMC [JD14]

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-3
SLIDE 3

Particle MCMC

◮ MCMC algorithms which employ SMC proposals [ADH10] ◮ SMC algorithm as a collection of RVs

◮ Values ◮ Weights ◮ Ancestral Lines

◮ Construct MCMC algorithms:

◮ With many auxiliary variables ◮ Exactly invariant for distribution on extended space ◮ Standard MCMC arguments justify strategy ◮ SMC2 employs the same approach within an SMC setting.

◮ What else does this allow us to do with SMC?

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-4
SLIDE 4

Ancestral Trees

t=1 t=2 t=3

a1

3 =1

a4

3 =3

a1

2 =1

a4

2 =3

b2

3,1:3 =(1, 1, 2)

b4

3,1:3 =(3, 3, 4)

b6

3,1:3 =(4, 5, 6)

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-5
SLIDE 5

SMC Distributions

We’ll need the SMC Distribution: ψM

n,L

  • an−L+2:n, xn−L+1:n, k; xn−L
  • =

M

  • i=1

q(xi

n−L+1

  • xn−L)
  • n
  • p=n−L+2
  • r(ap|wp−1)

M

  • i=1

q

  • xi

p|x ai

p

p−1

  • r(k|wn)

and the conditional SMC Distribution:

  • ψM

n,L

  • a⊖k

n−L+2:n,

x⊖k

n−L+1:n; xn−L

  • bk

n−L+1:n−1, k,

xk

n−L+1:n

  • =

ψM

n,L(

an−L+2:n, xn−L+1:n, k; xn−L) q

  • x
  • bk

n,n−L+1

n−L+1 |xn−L n

  • p=n−L+2

r

  • bk

n,p|

wp−1

  • q
  • x
  • bk

n,p

p

| x

  • bn

n,p−1

p−1

  • r(k|

wn)

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-6
SLIDE 6

A (Rather Broad) Class of Hidden Markov Models

x1 x2 x3 z1 z2 z3 y1 y2 y3

◮ Unobserved Markov chain {(Xn, Zn)} transition f. ◮ Observed process {Yn} conditional density g. ◮ Density:

p(x1:n, z1:n, y1:n) = f1(x1, z1)g(y1|x1, z1)

n

  • i=2

f(xi, zi|xi−1, zi−1)g(yi|xi, zi).

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-7
SLIDE 7

Formal Solutions

◮ Filtering and Prediction Recursions:

p(xn, zn|y1:n) = p(xn, zn|y1:n−1)g(yn|xn, zn)

  • p(x′

n, z′ n|y1:n−1)g(yn|x′ n, z′ n)d(x′ n, z′ n)

p(xn+1, zn+1|y1:n) =

  • p(xn, zn|y1:n)f(xn+1, zn+1|xn, zn)d(xn, zn)

◮ Smoothing:

p((x, z)1:n|y1:n) ∝ p((x, z)1:n−1|y1:n−1)f((x, z)n|(x, z)n−1)g(yn|(x, z)n)

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-8
SLIDE 8

A Simple SIR Filter

Algorithmically, at iteration n:

◮ Given {W i n−1, (X, Z)i 1:n−1} for i = 1, . . . , N: ◮ Resample, obtaining { 1 N , (

X, Z)i

1:n−1}.

◮ Sample (X, Z)i

n ∼ qn(·|(

X, Z)i

n−1)

◮ Weight W i

n ∝ f((X,Z)i

n|(

X, Z)i

n−1)g(yn|(X,Z)i n)

qn((X,Z)i

n|(

X, Z)i

n−1)

Actually:

◮ Resample efficiently. ◮ Only resample when necessary. ◮ . . .

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-9
SLIDE 9

A Rao-Blackwellized SIR Filter

Algorithmically, at iteration n:

◮ Given {W X,i n−1, (Xi 1:n−1, p(z1:n−1|Xi 1:n−1, y1:n−1)} ◮ Resample, obtaining { 1 N , (

Xi

1:n−1, p(z1:n−1|

Xi

1:n−1, y1:n−1))}. ◮ For i = 1, . . . , N:

◮ Sample Xi

n ∼ qn(·|

Xi

n−1)

◮ Set Xi

1:n ← (

Xi

1:n−1, Xi n).

◮ Weight W X,i

n

p(Xi

n,yn|

Xi

n−1)

qn(Xi

n|

Xi

n−1)

◮ Compute p(z1:n|y1:n, Xi

1:n).

Requires analytically tractable substructure.

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-10
SLIDE 10

An Approximate Rao-Blackwellized SIR Filter

Algorithmically, at iteration n:

◮ Given {W X,i n−1, (Xi 1:n−1,

p(z1:n−1|Xi

1:n−1, y1:n−1)} ◮ Resample, obtaining { 1 N , (

Xi

1:n−1,

p(z1:n−1| Xi

1:n−1, y1:n−1))}. ◮ For i = 1, . . . , N:

◮ Sample Xi

n ∼ qn(·|

Xi

n−1)

◮ Set Xi

1:n ← (

Xi

1:n−1, Xi n).

◮ Weight W X,i

n

  • p(Xi

n,yn|

Xi

n−1)

qn(Xi

n|

Xi

n−1)

◮ Compute

p(z1:n|y1:n, Xi

1:n).

Is approximate; how does error accumulate?

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-11
SLIDE 11

Exactly Approximated Rao-Blackwellized SIR Filter

At time n = 1

◮ Sample, Xi 1 ∼ qx (·| y1). ◮ Sample, Zi,j 1

∼ qz ·| Xi

1, y1

  • .

◮ Compute and normalise the local weights

wz

1

  • Xi

1, Zi,j 1

  • := p(Xi

1, y1, Zi,j 1 )

qz

  • Zi,j

1

  • Xi

1, y1

, W z,i,j

1

:= wz

1

  • Xi

1, Zi,j 1

  • M

k=1 wz 1

  • Xi

1, Zi,k 1

  • define

p(Xi

1, y1) := 1

M

M

  • j=1

wz

1

  • Xi

1, Zi,j 1

  • .

◮ Compute and normalise the top-level weights

wx

1

  • Xi

1

  • :=

p(Xi

1, y1)

qx Xi

1|y1

, W x,i

1

:= wx

1

  • Xi

1

  • N

k=1 wx 1

  • Xk

1

. At times n ≥ 2, resample and do essentially the same again. . .

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-12
SLIDE 12

Toy Example: Model

We use a simulated sequence of 100 observations from the model defined by the densities: µ(x1, z1) =N x1 z1

  • ;

1 1

  • f(xn, zn|xn−1, zn−1) =N

xn zn

  • ;

xn−1 zn−1

  • ,

1 1

  • g(yn|xn, zn) =N
  • yn;

xn zn

  • ,

σ2

x

σ2

z

  • Consider IMSE (relative to optimal filter) of filtering estimate of

first coordinate marginals.

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-13
SLIDE 13

Approximation of the RBPF

10 10

1

10

2

10

−2

10

−1

Number of Lower−Level Particles, M Mean Squared Filtering Error N = 10 N = 20 N = 40 N = 80 N = 160

For σ2

x = σ2 z = 1.

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-14
SLIDE 14

Computational Performance

10

1

10

2

10

3

10

4

10

5

10

−3

10

−2

10

−1

10 Computational Cost, N(M+1) Mean Squared Filtering Error N = 10 N = 20 N = 40 N = 80 N = 160

For σ2

x = σ2 z = 1.

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-15
SLIDE 15

Computational Performance

10

1

10

2

10

3

10

4

10

5

10

1.6

10

1.7

10

1.8

10

1.9

Computational Cost, N(M+1) Mean Squared Filtering Error N = 10 N = 20 N = 40 N = 80 N = 160

For σ2

x = 102 and σ2 z = 0.12.

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-16
SLIDE 16

What About Other HMMs / Algorithms?

Returning to:

x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6

◮ Unobserved Markov chain {Xn} transition f. ◮ Observed process {Yn} conditional density g. ◮ Density:

p(x1:n, y1:n) = f1(x1)g(y1|x1)

n

  • i=2

f(xi|xi−1)g(yi|xi).

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-17
SLIDE 17

Block Sampling: An Idealised Approach

At time n, given x1:n−1; discard xn−L+1:n−1:

◮ Sample from q(xn−L+1:n|xn−L, yn−L+1:n). ◮ Weight with

W(x1:n) = p(x1:n|y1:n) p(x1:n−L|y1:n−1)q(xn−L+1:n|xn−L, y1:n−L+1:n)

◮ Optimally,

q(xn−L+1:n|xn−L, yn−L+1:n) =p(xn−L+1:n|xn−L, yn−L+1:n) W(x1:n) ∝ p(x1:n−L|y1:n) p(x1:n−L|y1:n−1) =p(yn|x1:n−L, yn−L+1:n−1)

◮ Typically intractable; auxiliary variable approach in [DBS06].

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-18
SLIDE 18

Local Particle Filtering: Current Trajectories

2 4 6 8 10 12 14 16 −4 −3 −2 −1 1 2 3 4

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-19
SLIDE 19

Local Particle Filtering: First Particle

2 4 6 8 10 12 14 16 −4 −3 −2 −1 1 2 3 4

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-20
SLIDE 20

Local Particle Filtering: SMC Proposal

2 4 6 8 10 12 14 16 −4 −3 −2 −1 1 2 3 4

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-21
SLIDE 21

Local Particle Filtering: CSMC Auxiliary Proposal

2 4 6 8 10 12 14 16 −4 −3 −2 −1 1 2 3 4

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-22
SLIDE 22

Local SMC

◮ Propose from:

U⊗n−1

1:M

(b1:n−2, k)p(x1:n−1|y1:n−1)ψM

n,L(an−L+2:n, xn−L+1:n, k; xn−L)

  • ψM

n−1,L−1

  • a⊖k

n−L+2:n−1,

x⊖k

n−L+1:n−1; xn−L ||bn−L+2:n−1, xn−L+1:n−1

  • ◮ Target:

U⊗n

1:M(b1:n−L,¯

b

¯ k n,n−L+1:n−1, ¯

k)p(x1:n−L, x

b

¯ k n,n−L+1:n

n−L+1:n |y1:n)

  • ψM

n,L

  • a⊖k

n−L+2:n, x⊖k n−L+1:n; xn−L

  • ¯

b

¯ k n,n−L+1:n, x b

¯ k n,n−L+1:n

n−L+1:n

  • ψM

n−1,L−1 (

an−L+2:n−1, xn−L+1:n−1, k; xn−L) .

◮ Weight: ¯

Zn−L+1:n/ Zn−L+1:n−1.

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-23
SLIDE 23

Stochastic Volatility Bootstrap Local SMC

◮ Model:

f(xi|xi−1) =N

  • φxi−1, σ2

g(yi|xi) =N

  • 0, β2 exp(xi)
  • ◮ Top Level:

◮ Local SMC proposal. ◮ Stratified resampling when ESS< N/2.

◮ Local SMC Proposal:

◮ Proposal:

q(xt|xt−1, yt) = f(xt|xt−1)

◮ Weighting:

W(xt−1, xt) ∝ f(xt|xt−1)g(yt|xt) f(xt|xt−1) = g(yt|xt)

◮ Resample residually every iteration. Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-24
SLIDE 24

SV Exchange Rata Data

100 200 300 400 500 600 700 800 900 −4 −3 −2 −1 1 2 3 4 5 Exchange Rate Data n Observed Values

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-25
SLIDE 25

SV Bootstrap Local SMC: M=100

100 200 300 400 500 600 700 800 900 10 20 30 40 50 60 70 80 90 100 n Average Number of Unique Values N = 100, M = 100 L = 2 L = 4 L = 6 L = 10

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-26
SLIDE 26

SV Bootstrap Local SMC: M=1000

100 200 300 400 500 600 700 800 900 10 20 30 40 50 60 70 80 90 100 n Average Number of Unique Values N = 100, M = 1000 L = 2 L = 4 L = 6 L = 10 L = 14 L = 18

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-27
SLIDE 27

SV Bootstrap Local SMC: M=10000

100 200 300 400 500 600 700 800 900 10 20 30 40 50 60 70 80 90 100 n Average Number of Unique Values N=100, M=10,000 L = 2 L = 4 L = 6 L = 10 L = 14 L = 18 L = 22 L = 26

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-28
SLIDE 28

Some Heuristics

Recent calculations suggest that, under appropriate assumptions, at fixed cost (2L − 1) · M · N:

◮ Optimal L is determined solely by the mixing of the HMM. ◮ Optimal M is a linear function of L. ◮ N can then be obtained from M, L and available budget.

In practice:

◮ L can be chosen using pilot runs, ◮ and M fine-tuned once L is chosen.

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-29
SLIDE 29

In Conclusion

◮ SMC can be used hierarchically. ◮ Software implementation is not difficult [Joh09, Zho13]. ◮ The Rao-Blackwellized particle filter can be approximated

exactly

◮ Can reduce estimator variance at fixed cost. ◮ Attractive for distributed/parallel implementation. ◮ Allows combination of different sorts of particle filter. ◮ Can be combined with other techniques for parameter

estimation etc..

◮ The optimal block-sampling particle filter can be

approximated exactly

◮ Requiring only simulation from the transition and evaluation of

the likelihood

◮ Easy to parallelise ◮ Low storage cost Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-30
SLIDE 30

References I

[AD02]

  • C. Andrieu and A. Doucet. Particle filtering for partially observed Gaussian state space models. Journal
  • f the Royal Statistical Society B, 64(4):827–836, 2002.

[ADH10]

  • C. Andrieu, A. Doucet, and R. Holenstein. Particle Markov chain Monte Carlo. Journal of the Royal

Statistical Society B, 72(3):269–342, 2010. [CJP13]

  • N. Chopin, P. Jacob, and O. Papaspiliopoulos. SMC2. Journal of the Royal Statistical Society B,

75(3):397–426, 2013. [CL00]

  • R. Chen and J. S. Liu. Mixture Kalman filters. Journal of the Royal Statistical Society B,

62(3):493–508, 2000. [CSOL11]

  • T. Chen, T. Sch¨
  • n, H. Ohlsson, and L. Ljung. Decentralized particle filter with arbitrary state
  • decomposition. IEEE Transactions on Signal Processing, 59(2):465–478, February 2011.

[DBS06]

  • A. Doucet, M. Briers, and S. S´

en´

  • ecal. Efficient block sampling strategies for sequential Monte Carlo
  • methods. Journal of Computational and Graphical Statistics, 15(3):693–711, 2006.

[GSS93]

  • N. J. Gordon, S. J. Salmond, and A. F. M. Smith. Novel approach to nonlinear/non-Gaussian Bayesian

state estimation. IEE Proceedings-F, 140(2):107–113, April 1993. [JD14]

  • A. M. Johansen and A. Doucet. Hierarchical particle sampling for intractable state-space models.

CRiSM working paper, University of Warwick, 2014. In preparation. [Joh09]

  • A. M. Johansen. SMCTC: Sequential Monte Carlo in C++. Journal of Statistical Software, 30(6):1–41,

April 2009. [JWD12]

  • A. M. Johansen, N. Whiteley, and A. Doucet. Exact approximation of Rao-Blackwellised particle filters.

In Proceedings of 16th IFAC Symposium on Systems Identification, Brussels, Belgium, July 2012. IFAC, IFAC. [Zho13]

  • Y. Zhou. vSMC: Parallel sequential Monte Carlo in C++. Mathematics e-print 1306.5583, ArXiv, 2013.

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References

slide-31
SLIDE 31

Key Identity

ψM

n,L(an−L+2:n, xn−L+1:n, k; xn−L)

p(xn−L+1:n|xn−L, yn−L+1:n) ψM

n,L(a⊖k n−L+2:n, x⊖k n−L+1:n, k; xn−L ||. . . )

= q

  • x

bk

n,n−L+1

n−L+1 |xn−L n

  • p=n−L+2

r

  • bk

n,p|wp−1

  • q
  • x

bk

n,p

p

|x

bn

n,p−1

p−1

  • r(k|wn)

p(xn−L+1:n|xn−L, yn−L+1:n) = Zn−L+1:n/p(yn−L+1:n|xn−L)

Monte Carlo Approximationof Monte Carlo Filters Adam M. Johansen , Introduction Approximating the RBPF Block Sampling Particle Filters References