Reinhart 2018 - Likelihood, EM and Bayesian Estimation

Summary

The likelihood of a point process is : a sum of log-intensities minus the compensator. For self-exciting models, introducing the latent parent indicator yields an EM algorithm (E step = triggering probabilities) and a partitioned posterior that is far easier for MCMC (Ross 2016).

Overview

Direct likelihood evaluation costs (each sums over earlier events) and the surface can be nearly flat, so numerical maximisation can fail (Veen & Schoenberg 2008). Branching structure fixes this.

Main Content

Point-process likelihood (Daley & Vere-Jones, Prop. 7.2.III, 7.3.III)

For a temporal process with conditional intensity , . For the spatio-temporal case on (eq. 8):

With marks: .

Derivation sketch. Start from the Janossy density , with hazards , so and on . Multiplying gives the product-times-exponential form. Spatial locations are treated as marks.

Compensator integral and its approximations

The term is expensive for arbitrary polygons . Schoenberg (2013) replaces it by an integral over (upper bound, exact if excitation stays inside the window; it overestimates, penalising bad ). Lippiello et al. (2014) show the temporal truncation biases more than the spatial one; use the approximation only in space.

EM with branching structure (Veen & Schoenberg 2008)

Let if event is background and if triggered by event . Complete-data log-likelihood:

E step (eqs. 9-10): for (0 otherwise), and . M step: maximise with these weights; repeat until convergence.

Analogy: a mixture model where is the component label. Boundary warning (Zhuang, Ogata & Vere-Jones 2004): unobserved events just outside create “background” events and observed events near the boundary have offspring outside, so is biased downward.

Bayesian approaches (Sec. 3.5)

  • Rasmussen (2013): MCMC on the likelihood (Metropolis-within-Gibbs) or a cluster-structure sampler.
  • Loeffler & Flaxman (2017): HMC in Stan for a crime Hawkes model.
  • Ross (2016): direct likelihood MCMC is per evaluation with strongly correlated parameters; instead sample from eqs. 9-10, then given the events split into sets , each an inhomogeneous Poisson process with intensity (or for ). The log-likelihood partitions, decorrelating parameters.

Examples

Exponential Hawkes: closed-form compensator and O(n) recursion

For the compensator is and with , . Cost instead of .

import numpy as np
def hawkes_ll(t, T, nu, a, b):
    R = np.zeros(len(t))
    for i in range(1, len(t)):
        R[i] = np.exp(-b*(t[i]-t[i-1]))*(1+R[i-1])
    lam = nu + a*b*R
    comp = nu*T + a*np.sum(1-np.exp(-b*(T-t)))
    return np.log(lam).sum() - comp
def hawkes_ll_naive(t, T, nu, a, b):
    ll = 0.
    for i in range(len(t)):
        ll += np.log(nu + a*b*np.exp(-b*(t[i]-t[:i])).sum())
    return ll - (nu*T + a*np.sum(1-np.exp(-b*(T-t))))
t = np.sort(np.random.default_rng(1).uniform(0, 50, 200))
print(hawkes_ll(t,50,.5,.4,2.), hawkes_ll_naive(t,50,.5,.4,2.))

PyMC sketch (untested; use pytensor.scan for the recursion and pm.Potential for the likelihood):

import pymc as pm, pytensor, pytensor.tensor as pt
with pm.Model():
    nu = pm.LogNormal("nu", 0, 1); a = pm.Beta("a", 2, 2); b = pm.LogNormal("b", 0, 1)
    dt = pt.as_tensor(np.diff(t, prepend=t[0]))
    R, _ = pytensor.scan(lambda d, Rprev: pt.exp(-b*d)*(1+Rprev), sequences=dt, outputs_info=pt.zeros(()))
    lam = nu + a*b*R
    pm.Potential("ll", pt.log(lam).sum() - nu*T - a*pt.sum(1-pt.exp(-b*(T-t))))

Prior keeps the branching ratio in (subcritical).

Connections

See Also

Reinhart 2018 - Self-Exciting Spatio-Temporal Point Processes - Overview | Reinhart 2018 - Hawkes Processes and Conditional Intensity