Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen Monte Carlo Filtering of Piecewise-Deterministic Processes Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Adam M. Johansen with Nick Whiteley and Simon J. Godsill Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples University of Warwick, Dept. of Statistics a.m.johansen@warwick.ac.uk Object Tracking Rate Estimation: Shot Noise Cox Processes Summary EPSRC Workshop on MCMC and Related Methods 1 Monte Carlo Filtering of PiecewiseDeterministic Processes Outline A. M. Johansen Background I Background I I I Methodology I I I Piecewise Deterministic Processes (PDPs) Sequential Monte Carlo (Samplers) “Particle Filtering” of PDPs “Auxiliary Particle Filtering” of PDPs Examples I I Object Tracking Rate Estimation: Shot Noise Cox Processes Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary 2 Motivation: Observing a Manoeuvering Object Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) I For t ∈ R+ 0 , consider object with position st , velocity vt and acceleration at I Summarise state by ζt = (st , vt , at ) I From initial condition ζ0 , state evolves until random time τ1 , at which acceleration jumps to a new random value, yielding ζτ1 Examples I From ζτ1 , evolution until τ2 , state becomes ζτ2 , etc. Summary I Observation times, (tn )n∈N , at each tn a noisy measurement of the object’s position is made Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Object Tracking Rate Estimation: Shot Noise Cox Processes 3 Monte Carlo Filtering of PiecewiseDeterministic Processes Example Trajectory 30 A. M. Johansen Background 25 Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) 20 Methodology sy/km 15 Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs 10 Examples Object Tracking Rate Estimation: Shot Noise Cox Processes 5 Summary 0 −5 −10 0 5 10 15 20 25 30 35 sx/km 4 An Abstract Formulation Monte Carlo Filtering of PiecewiseDeterministic Processes I Pair Markov chain (τj , θj )j∈N , τj ∈ R+ , θj ∈ Θ Background I p(d(τj , θj )|τj−1 , θj−1 ) = q(dθj |θj−1 , τj , τj−1 )f (dτj |τj−1 ), P Count the jumps νt := j I[τj ≤t] Deterministic evolution function F : R+ 0 × Θ → Θ, s.t. ∀θ ∈ Θ, F (0, θ) = θ Methodology I I Signal process (ζt )t∈R+ , 0 A. M. Johansen Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary ζt := F (t − τνt , θνt ) I This describes a piecewise deterministic process. I It’s partially observed via observations (Yn )n∈N , with likelihood function gn (yn |ζtn ) 5 Sequential Importance Resampling For a sequence, πn , of distributions over spaces E n : I I I I Sample X1i ∼ q1 . Calculate W1i ∝ π1 (X1i )/q1 (X1i ). Iterate: n ← n + 1 I I i i i Resample (Wn−1 , Xn−1 ) to obtain (1/N, Xn,1:n−1 ). For i = 1 : N I I A. M. Johansen Background Set n = 1 For i = 1 : N I Monte Carlo Filtering of PiecewiseDeterministic Processes i Xn,n Sample Calculate Wni ∝ ∼ i qn (·|Xn,1:n−1 ). Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary i πn (Xn,1:n ) i i i |X i πn−1 (Xn,1:n−1 )qn (Xn,n n,1:n−1 ) In a filtering context, can use πn (x1:n ) = p(x1:n |y1:n ). 6 The Variable Rate Particle Filter The VRPF iteration: I A. M. Johansen i i i Resample (Wn−1 , (kn−1 , τ1:k i n−1 I i , θ1:k i )). n−1 For i = 1 : N I i While τn, < tn kn I I I i i Sample τn,k ∼ f (·|τn,k ). n +1 n kni ← kni + 1. i i Sample θn,k ). i ∼ h(·|τn , θn,ki n I n−1 Calculate Wni ∝ Monte Carlo Filtering of PiecewiseDeterministic Processes Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes i g(yn |xin )f (θkn−1 ) i |θk i +1:kn n−1 Summary i i h(θki i +1:ki |τn,1:k , θn,k ) i i n n−1 n−1 n−1 Something like the bootstrap filter. 7 Monte Carlo Filtering of PiecewiseDeterministic Processes SMC Samplers SMC can be used to sample from any sequence of distributions (Del Moral et al., 2006). I Given target distributions, ηn , on En . . . , I construct a synthetic sequence ηen on spaces I n N A. M. Johansen Background Ep p=1 by introducing Markov kernels, Lp from Ep+1 to Ep : ηen (x1:n ) = ηn (xn ) n−1 Y Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Lp (xp+1 , xp ) , p=1 I Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Object Tracking Rate Estimation: Shot Noise Cox Processes Summary These distributions I I have the target distributions as time marginals, have the correct structure to employ SMC techniques. 8 Inference and PDPs I Consider the spaces (En )n∈N , En = ∞ ] A. M. Johansen Background {k} × Tn,k × Θk+1 k=0 Tn,k ={τ1:k : 0 < τ1 < τ2 < ... < τk ≤ tn }. I Define kn := νtn and Xn = (ζ0 , kn , τ1:kn , θ1:kn ) ∈ En I Sequence of posterior distributions (ηn )n∈N ηn (xn ) ∝q(ζ0 ) × Monte Carlo Filtering of PiecewiseDeterministic Processes kn Y f (τj |τj−1 )q(θj |θj−1 , τj , τj−1 ) Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary j=1 n Y gp (yp |ζtp )S(τkn , tn ) p=1 9 Particle Filtering of PDPs Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen Background I I Can use SMC sampler to target ηn for n = 1, . . . . This allows more sophisticated proposals: I I I Use of observations. Explicit dimension-changing proposals. No sampling into the future. I Often interested only in p(ζtn |y1:n ). I Consequently, need only keep track of (kn , τkn , θkn ). I Many techniques from particle filtering can be used. Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary 10 Algorithmic Details Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen I Use a mixture of moves: I I I Augment with MCMC moves if required: I I Birth moves. Refinement moves. Can include RJMCMC moves. Use observations to obtain good proposals. Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary I Recover the VRPF under certain circumstances. 11 Auxiliary Particle Filtering of PDPs Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen Background I Can construct an analogue of discrete time APF: I I I I Use n + 1st observation at time n. Prevents resampling eliminating promising particles. Pre-weighting is then corrected for by later weights. Interpretation: I I Approximate p̂(·|y1:n+1 ) at time n. Correct with weights p(·|y1:n )/p̂(·|y1:n+1 ). Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary 12 Algorithmic Details Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen I An auxiliary PDP particle filter comprises: I I I SMC sampler for auxiliary sequence(µn )n≥1 , fn ) between Sequence of importance weights, (W (µn )n≥1 and (ηn )n≥1 . We use auxiliary distributions of the following form: Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples µn (xn ) ∝ Vn (τn,kn , θn,kn , yn+1 )ηn (xn ) with Vn : R+ × Ξ → (0, ∞). I Object Tracking Rate Estimation: Shot Noise Cox Processes Summary Vn approximates predictive likelihood. 13 Back to the motivating example. . . A. M. Johansen I Observation interval, ∆ = 5 s. I Changepoint intervals are a priori Gamma(a, b) with: a =10 Monte Carlo Filtering of PiecewiseDeterministic Processes b =5∆/a Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology I Used a mixture of birth and adjustment moves (in proportion 2:1). I Observations are noisy range/bearing pairs. I Model linearisation used to approximate optimal kernels. I Stratified resampling when ESS < N/2. I Can also consider a Rao-Blackwellised version. Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary 14 Monte Carlo Filtering of PiecewiseDeterministic Processes The final sample set 30 A. M. Johansen 25 Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) 20 15 sy/km Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs 10 5 Examples Object Tracking Rate Estimation: Shot Noise Cox Processes 0 Summary −5 −10 −15 0 5 10 15 20 25 30 35 sx/km 15 Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen N 50 100 250 500 1000 2500 5000 Godsill et al. 2007 RMSE / km CPU / s 42.62 0.24 33.49 0.49 22.89 1.23 17.26 2.42 12.68 5.00 6.18 13.20 3.52 28.79 Whiteley et al. 2007 RMSE / km CPU / s 0.88 1.32 0.66 2.62 0.54 6.56 0.51 12.98 0.50 26.07 0.49 67.32 0.48 142.84 Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary Root mean square filtering error and CPU time — over 200 runs. 16 Monte Carlo Filtering of PiecewiseDeterministic Processes 4 A. M. Johansen log RMSE Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) 2 Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples 0 Object Tracking Rate Estimation: Shot Noise Cox Processes Summary −2 0 20 40 60 CPU/s 80 100 120 17 Estimation of Insurance Event Rates The model is specified by the following distributions: f (τj |τj−1 ) =λτ exp(−λτ (τj − τj−1 )) × I[τj−1 ,∞) (τj ), Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen Background q(ζ0 ) = exp(−λθ ζ0 ) × I[0,∞) (ζ0 ), q(θj |θj−1 , τj , τj−1 ) =λθ exp(−λθ (θj − ζτ−j )) × I[ζτ− ,∞) (θj ), j Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs where ζτ−j =θj−1 exp(−κ(τj − τj−1 )), and F (t − τ, θ) =θ exp(−κ(t − τ )). Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary The likelihood function is given by: Z g(yn |ζ(tn−1,tn ] ) = exp − ! tn ζs ds tn−1 Y ζyn,i i where yn,i is the time of the ith event observed in (tn−1 , tn ]. 18 Implementation Details Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen Background I Proposal step: simple birth proposal. Kn (xn−1 , dxn ) = δkn−1 +1 (kn )δτn−1,1:kn−1 (dτn,1:kn −1 ) × δθn−1,1:kn−1 (dθn,1:kn −1 )hn (dτn,kn ) × πn (dθn,kn |xn \ θn,kn ), I Systematic resampling applied when ESS < 0.4N . I RJMCMC move applied. Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary 19 Monte Carlo Filtering of PiecewiseDeterministic Processes Unique Particles 500 400 A. M. Johansen 300 n Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) 200 100 Methodology 0 1000 1200 1400 1600 1800 2000 t Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples 500 Object Tracking Rate Estimation: Shot Noise Cox Processes 400 Summary n 300 200 100 0 1000 1200 1400 1600 1800 2000 t 20 SMCTC: A C++ Template Class Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen I Implementing SMC algorithms in C/C++ isn’t hard. Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) I Software for implementing general SMC algorithms. I C++ element largely confined to the library. I Available (under a GPL-3 license from) www2.warwick.ac.uk/fac/sci/statistics/staff/ academic/johansen/smctc/ Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary or type “smctc” into google. I Particle filters can also be implemented easily. 21 Conclusions Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen I SMC sampler-type approaches allow efficient online algorithms to be developed. I The proposed approach can dramatically outperform existing algorithms. I This approach allows a class of piecewise deterministic models to be used when online inference is required. I The VRPF can be interpreted within this framework, allowing existing convergence results to be applied to it. Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary I Possible extensions: I Parameter estimation via PMCMC. 22 References P. Del Moral, A. Doucet, and A. Jasra. Sequential Monte Carlo samplers. Journal of the Royal Statistical Society B, 63(3):411–436, 2006. S. J. Godsill, J. Vermaak, K.-F. Ng, and J.-F. Li. Models and algorithms for tracking of manoeuvring objects using variable rate particle filters. Proceedings of IEEE, 95(5):925–952, 2007. A. M. Johansen. SMCTC: Sequential Monte Carlo in C++. Research Report 08:16, University of Bristol, Department of Mathematics – Statistics Group, University Walk, Bristol, BS8 1TW, UK, July 2008. N. Whiteley, A. M. Johansen, and S. Godsill. Efficient Monte Carlo filtering for discretely observed jumping processes. In Proceedings of IEEE Statistical Signal Processing Workshop, pages 89–93, Madison, WI, USA, August 26th–29th 2007. IEEE. Monte Carlo Filtering of PiecewiseDeterministic Processes A. M. Johansen Background Piecewise Deterministic Processes Sequential Monte Carlo (Samplers) Methodology Particle Filtering of PDPs Auxiliary Particle Filtering of PDPs Examples Object Tracking Rate Estimation: Shot Noise Cox Processes Summary N. Whiteley, A. M. Johansen, and S. Godsill. Monte Carlo filtering of piecewise-deterministic processes. In revision., 2008. 23