Variational inference for diffusion modulated Cox processes

1 INTRODUCTION . Cox processes ( Cox , 1955 ; Cox & Isham , 1980 ) , also known as doubly-stochastic Poisson processes , are a class of stochastic point processes wherein the point intensity is itself stochastic and , conditional on a realization of the intensity process , the number of points in any subset of space is Poisson distributed . These processes are widely used in the natural and physical sciences , engineering and operations research , and form useful models of a wide array of phenomena . We model the intensity by a diffusion process that is the solution of a stochastic differential equation ( SDE ) . This is a standard assumption across a range of applications ( Susemihl et al. , 2011 ; Kutschireiter et al. , 2020 ) . The measure induced by the solution of the SDE serves as a prior measure over sample paths , and our objective is to infer a posterior measure over the paths of the underlying intensity process , given realizations of the Poisson point process observations over a fixed time horizon . This type of inference problem has been studied in the Bayesian filtering literature ( Schuppen , 1977 ; Bain & Crisan , 2008 ; Särkkä , 2013 ) , where it is of particular interest to infer the state of the intensity process at any past time given all count observations till the present time instant ( the resulting posterior is called the smoothing posterior measure ) . In a seminal paper , Snyder ( 1972 ) derived a stochastic partial differential equation ( SPDE ) describing the dynamics of the corresponding posterior density for Cox processes . The solution of this smoothing SPDE requires the computation of an Itô stochastic integral with respect to the counting process . It has long been recognized ( Clark , 1978 ; Davis , 1981 ; 1982 ) that for stochastic smoothing ( and filtering ) theory to be useful in practice , it should be possible to compute smoothing posteriors conditioned on a single observed sample path . However , Itô integrals are not defined pathwise and deriving a pathwise smoothing density is remarkably hard . 30 years after Synder ’ s original work Elliott & Malcolm ( 2005 ) derived a pathwise smoothing SPDE in the form of a coupled system of forward and backward pathwise SPDEs . Nonetheless , solving the system of pathwise SPDEs , or sampling from the corresponding SDE , is still challenging and intractable in general . It is well known , for example , that numerical techniques for solving these SPDEs , such as the finite element method ( FEM ) , suffers from the curse of dimensionality ( Han et al. , 2018 ) . Therefore , it is of considerable interest to find more efficient methods to solve the smoothing SPDE . We take a variational inference approach to computing an approximate smoothing posterior measure . Variational representations of Bayesian posteriors in stochastic filtering and smoothing theory have been developed in considerable generality ; see ( Mitter & Newton , 2003 ) for a rigorous treatment . There are a number of papers that consider the computation of an approximate posterior distribution over the paths of the underlying intensity process that is observed with additive Gaussian noise ( Archambeau et al. , 2007 ; 2008 ; Cseke et al. , 2013 ; Susemihl et al. , 2011 ; Sutter et al. , 2016 ) . Susemihl et al . ( 2011 ) studied Bayesian filtering of Gaussian processes by deriving a differential equation characterizing the evolution of the mean-square error ( MSE ) in estimating the underlying Gaussian process . On the other hand , Sutter et al . ( 2016 ) compute a variational approximation to the smoothing posterior density when the underlying diffusion intensity is observed with additive Brownian noise . They choose their variational family to be a class of SDEs with an analytically computable marginal density . This setting is considerably different from our setting , where the observed process is a point process . Nonetheless , Sutter et al . ( 2016 ) provides methodological motivation for our current study . In the context of the computation of approximate smoothing/filtering posteriors for point process observations , Harel et al . ( 2015 ) developed an analytically tractable approximation to the filtering posterior distribution of a diffusion modulated marked point processes under specific modeling assumptions suited for a neural encoding/decoding problem . In general , however , analytical tractability can not be assured without restrictive assumptions . We present a stochastic variational inference ( SVI ) ( Hoffman et al. , 2013 ) method for computing a variational approximation to the smoothing posterior density . Our approach fixes an approximating family of path measures to those induced by a class of parametrized SPDEs . In particular , we parametrize the drift function of the approximating SPDEs by a neural network with input and output variables matching the theoretical smoothing SPDE . Thereafter , using standard stochastic analysis tools we compute a tractable lower bound to the evidence of observing a sample path of count observations , the so-called evidence lower bound ( ELBO ) . A sample average approximation ( SAA ) to the ELBO is further computed by simulating sample paths from the stochastic differential equation ( SDE ) corresponding to the approximating SPDE . Finally , by maximizing the ELBO , the neural network is trained using stochastic gradient descent ( SGD ) utilizing multiple batches of sample paths of count observations . Note that each sample path of the count observations entails the simulation of a separate SDE . We note that there are many problems in the natural and physical sciences , engineering and operations research where multiple paths of a point process ( over a finite time horizon ) may be obtained . For instance , we present an example in Section 5 modeling the demand for bikes rented during a 24 hour , one day time period in a bike-sharing platform , where the underlying driving intensity is subject to stochastic variations , and demand information is collected over multiple days . In contrast to the variational algorithm developed in Sutter et al . ( 2016 ) , where the variational lower bound must be re-optimized for new sample paths of the observation process , our variational method is more general and our approximation to the smoothing posterior can be used as a map for another ( unobserved ) sample path of count observations . Our computational approach can also be straightforwardly adapted to solve the problem of interest in Sutter et al . ( 2016 ) . In the subsequent sections , we describe our problem and method in detail and demonstrate the utility of our method with the help of numerical experiments . In particular , we show how the choice of approximating family enables us to use the trained neural network and in turn , the variational Bayesian smoothing posterior ( VBSP ) , to compute smoothing SPDE in almost ( 3/4 ) th of the computational time required to compute the original smoothing SPDE using FEM . Moreover , we also efficiently generate Monte Carlo samples from the learned VBSP and use them for inference on the bike-sharing dataset , whereas FEM failed to compute either VBSP or the true smoothing density for the given time-space discretization . 2 PROBLEM DESCRIPTION . Let Nt be a Cox process with unknown stochastic intensity { zt ∈ R+ , t ∈ [ 0 , T ] } . We use Nt′ , t to denote a sample path realization of Nt restricted to the interval [ t′ , t ] , and useNt to denoteNt−N0 ; recall that N0 = 0 by definition . As noted before , a Cox process conditioned on the intensity is a Poisson process . Therefore , given a realized sample path { zt , t ∈ [ 0 , T ] } of the intensity , and for any 0 ≤ t′ < t ≤ T , the marginal likelihood of observing Nt −Nt′ ∈ N counts in ( t′ , t ] is Nt −Nt′ ∼ L ( Nt −Nt′ = Nt −Nt′ | { zs } t′ < s≤t ) : = ( ∫ t t′ zsds ) Nt−Nt′ e− ∫ tt′ zsds ( Nt −Nt′ ) ! , ( 1 ) where L denotes the Poisson likelihood . Rather than directly modeling the intensity z , we will bring a little more flexibility to our setting , and assume that zt is a deterministic transformation of an another stochastic process xt through a known mapping h : Rd 7→ R+ : is zt = h ( xt ) . Note that the non-negative range of h ensures that the Poisson intensity zt = h ( xt ) is non-negative . Unless xt ∈ R+ , the mapping h can not be an identity function . We use the term intensity process to refer to either zt or xt . We model the intensity process { xt ∈ Rd , ∀t ∈ [ 0 , T ] } with the following SDE , dxt = b ( xt ) dt+ σ ( xt ) dBt , ∀t ≤ T and x0 = 0 , ( 2 ) where b : Rd 7→ Rd is the drift function , σ ( · ) : Rd 7→ Rd×d is the diffusion coefficient , and Bt is the d−dimensional Brownian motion ( or Wiener process ) . We assume that there exists a strong solution to the SDE above ( Oksendal , 2013 , Chapter 5 ) . Moreover , we assume that b ( · ) , h ( · ) , and σ ( · ) are fixed by the modeler apriori , and we are interested in inferring the unknown intensity process with their fixed definitions . Incorporating them will obscure our main contribution , and we leave it for future work . The model of the count observations above forms a diffusion modulated Cox process . Diffusion modulated Cox processes are widely used to model the arrival process in various service systems such as call centers , hospitals , airports etc . ( Zhang et al. , 2014 ; Wang et al. , 2020 ) . Zhang & Kou ( 2010 ) use a Gaussian process modulated Cox-process to infer proteins ’ conformation , in particular , they model the arrival rates of the photons collected from a laser excited protein molecule as a Gaussian process . Schnoerr et al . ( 2016 ) model spatio-temporal stochastic systems from systems biology and epidemiology using Cox process where intensity is modelled with diffusions . As stated in the introduction , we seek to infer the smoothing posterior measure over the unknown intensity process { xt , t ∈ [ 0 , T ] } using the count observations upto time T . Following terminology from the Bayesian filtering theory ( Särkkä , 2013 ) , we use smoothing to refer to inferring the unobserved intensity process at any past time given the observations upto the current time . Mathematically , the smoothing posterior is defined using the conditional expectation of the form E [ f ( xt ) |s ( Nu , u ∈ [ 0 , T ] ) ] , where s ( Nu , u ∈ [ 0 , T ] ) is the smallest sigma algebra ( or filtration ) generated by the Cox process { Nt } from time 0 to T . For brevity we write E [ f ( xt ) |s ( Nu , u ∈ [ 0 , T ] ) ] as E [ f ( xt ) |N0 , T ] . Interested readers may refer to Kutschireiter et al . ( 2020 ) for more details on non-linear filtering theory . We now provide a formal derivation of the smoothing posterior using Bayes ’ theorem ( Bain & Crisan ( 2008 ) ; Elliott & Malcolm ( 2005 ) ) . Observe the conditional expectation satisfies E [ f ( xt ) |N0 , T ] = E† [ Λ0 , T f ( xt ) |N0 , T ] E† [ Λ0 , T |N0 , T ] ( 3 ) for any measurable function f ( · ) and Λs , t : = L ( Ns , t ) L† ( Ns , t ) for any 0 ≤ s < t ≤ T , where L † is the unit intensity Poisson likelihood and E† [ · ] denotes the expectation with respect to L† . Note that L† does not depend on the stochastic intensity process x and forms a reference measure . The marginal smoothing posterior density is defined as pt ( x|N0 , T ) : = P ( xt ∈ dx|N0 , T ) , ( 4 ) which can be formally obtained from equation 3 by setting f ( xt ) = I { A } ( xt ) for any A ∈ Rd , where I { A } ( y ) is an indicator function that equals 1 when y ∈ A , otherwise 0 . Now , define the unnormalized filtering density function q̄t ( x ) as the function satisfying P ( xt ∈ dx|N0 , t ) = q̄t ( x ) dx∫ Rd q̄t ( ξ ) dξ , ( 5 ) and also define v̄t ( x ) : = E† [ Λt , T |N0 , T ] . Then , it can be shown ( Elliott & Malcolm ( 2005 ) ) that for any measurable function f , E [ f ( xt ) |N0 , T ] = E† [ Λ0 , T f ( xt ) |N0 , T ] E† [ Λ0 , T |N0 , T ] = ∫ Rd f ( ξ ) q̄t ( ξ ) v̄t ( ξ ) dξ∫ Rd q̄t ( ξ ) v̄t ( ξ ) dξ . ( 6 ) Next , recalling that h ( · ) is the mapping to ensure the intensity process is positive , define the function Ψt for a given sample path of count observations ( i.e. , pathwise ) as Ψt : = Ψ ( h ( x ) , t , Nt ) = exp [ ( 1− h ( x ) ) t+Nt log h ( x ) ] , ∀x ∈ Rd . Following Elliott & Malcolm ( 2005 , Theorem 4 ) one may use Ψt to derive a coupled system of pathwise SPDEs that characterize q̄t ( x ) and v̄t ( x ) . In particular , they show that qt = Ψ−1t q̄t is a solution to the following SPDE ∂tqt ( x ) = Ψ −1 t L ∗ [ Ψtqt ( x ) ] , ∀t ≤ T , q0 ( x ) = δx0 ( x ) , ( 7 ) where L∗ is the adjoint of L [ F ( x ) ] = 12 ∑ i , j ai , j ( x ) ∂xixjF ( x ) + ∑ i bi ( x ) ∂xiF ( x ) , which is the infinitesimal generator of the prior process for any twice-differentiable , continuous , and bounded function F : Rd 7→ R and a ( x ) = σ ( x ) σ ( x ) T , and δx0 ( x ) is the Dirac delta distribution at x0 . Moreover , they also show that vt ( x ) = Ψtv̄t ( x ) satisfies the following backward parabolic equation ∂tvt ( x ) = −ΨtL [ Ψ−1t vt ( x ) ] , ( 8 ) with terminal condition vT ( x ) = ΨT ( x ) . Now it follows from equation 6 that using the solution of these two SPDEs , the marginal smoothing posterior density for any t ∈ [ 0 , T ] satisfies pt ( x|N0 , T ) = qt ( ξ ) vt ( ξ ) dξ∫ Rd qt ( ξ ) vt ( ξ ) dξ . ( 9 ) Using the SPDEs in equation 7 , and 8 , together with 9 , it can be shown that the marginal smoothing posterior density pt ( x|N0 , T ) satisfies its own SPDE : for any t ∈ [ 0 , T ] , ∂tpt ( x|N0 , T ) = − ∑ i ∂xi [ { ( a ( x ) [ ∇ log ( Ψ−1t vt ( x ) ) ] ) i + bi ( x ) } pt ( x|N0 , T ) ] + 1 2 ∑ i , j ∂xixjai , j ( x ) pt ( x|N0 , T ) ( 10 ) and pt ( x|N0 , T ) = δx0 ( x ) with x0 = 0 . We present a detailed derivation in Appendix A.1 . Corresponding to this SPDE , there exists a smoothing posterior SDE , defined as dx̄t = { a ( x̄t ) [ ∇ log ( Ψ−1t vt ( x̄t ) ) ] + b ( x̄t ) } dt+ σ ( x̄t ) dB̄t and x̄0 = 0 , ( 11 ) where { x̄t } is a modification of the process { xt } such that B̄t is independent of the Cox process Nt ( and thus Bt ) . Observe that the entire sample path of the count observations N0 , T is summarized through the pathwise function Ψt and vt together in the drift term of this SDE . Also note that the diffusion coefficient of the smoothing posterior SDE is precisely the same as that of the prior SDE . The computation of the drift term in the smoothing posterior SDE requires the solving equation 8 for vt ( x ) which , in turn , makes the posterior computation challenging and computationally intractable in general . Consequently , the computation of the marginal posterior density ( and hence the path measure ) . Therefore , we propose a variational inference-based method to compute an approximation to the solution of the smoothing posterior SPDE , by computing an approximate solution to the smoothing posterior SDE in equation 11 .

Summary: The paper under review proposes a variational inference procedure for a specific class of Cox processes whose intensity is derived from a stochastic differential equation. The methodology relies on a restriction of candidate solutions the the subset for which the drift depends on $x_t$, $N_t$ and $t$; the drift is then modelled with a neural network. By simulating from the candidate model, a sample average approximation of the ELBO is used to compute a stochastic gradient descent algorithm, optimize the bound and thus estimate non-parametrically the drift.