Model description¶
FaDIn is a library to perform Multivariate Hawkes Processes Inference. It is a general framework that allows to estimate the intensity function of Hawkes processes with any parametric kernels having finite support. It is based on a gradient-based optimization of the discrete \(\ell_2\) loss.
Contents
1. Hawkes process¶
A Hawkes process is a \(p\)-dimensional counting process \(N(t) = (N_1(t) \cdots N_p(t))\), where each coordinate is a counting process \(N_i(t) = \sum_{n \geq 1} \mathbf 1_{t_{n}^i \leq t}\), with \(t_{1}^i, t_{2}^i, \ldots\) being the ticks or timestamps observed on component \(i\). The intensity function of \(N\) is given by
for \(i = 1, \ldots, p\). Elements \(\mu_i\) are called the baseline parameters. A process \(j\) induces intensity on another process \(i\), with an impact encoded by the kernel function \(\phi_{ij}\). In the the above formula,
\(p\) is the number of processes
\(\mu_i\) are the baseline intensities
\(\phi_{ij}\) are the kernels.
Note that different choices for the shape of the kernels correspond to different models. Usually limited to exponential, neural networks based or non-parametric kernels; FaDIn allows the use of any parametric kernels in an efficient way. Some pre-implemented kernels are given in 4. Kernels.
2. Discretization and finite-support kernels¶
Define \(p\) sets of timestamps \(\mathscr{F}_T^i = \left\{t_1^i, \ldots, t_{N_i}^i \right\}\) on \([0, T]\). Given a discrete grid \(\mathcal{G}\) of size \(G\) such that \(\mathcal{G}=\left\{0, \Delta, \ldots, G \Delta \right\}\), we obtain the discretized version of \(\mathscr{F}_T^i\) by projecting these sets of timestamps onto the grid \(\mathcal{G}\). These projected timestamps are denoted by \(\tilde{\mathscr{F}}_T^i = \left\{\tilde{t}_1^i, \ldots, \tilde{t}_{N_i}^i \right\}\). Therefore, the discrete version of the intensity function defined in 1. Hawkes process:
where \(\phi_{ij}^\Delta[\tau]=\phi_{ij}(\tau \Delta)\) is the discrete kernel and \(L=\lfloor \frac{W}{\Delta}\rfloor\) is the discrete size of the kernels \(\phi_{ij}\) of length \(W\).
3. FaDIn¶
FaDIn is a \(\ell_2\) loss based solver to infer baseline parameters \(\mu_i\) and parameters \(\eta_{ij}\) of any parametric kernels \(\phi_{ij}:=\phi_{ij}^{\eta_{ij}}\). It is based on the discretization and finite-support kernels introduced in 2. Discretization and finite-support kernels. Precisely, the discretized \(\ell_2\) loss minimized by FaDIn is:
where kernels involved in \(\tilde{\lambda}_{i}\) are parametric kernels.
4. Kernels¶
In this package, the three following kernels are implemented:
Raised Cosine kernel
The parameters estimated are then the triplets \(\eta_{ij}=\left(\alpha_{ij}, u_{ij}, \sigma_{ij}\right)\).
Truncated Gaussian kernel
where \(F\) is the cdf of the Gaussian distribution. The parameters estimated are then the triplets \(\eta_{ij}=\left(\alpha_{ij}, m_{ij}, \sigma_{ij}\right)\).
Truncated Exponential kernel
where \(H\) is the cdf of the exponential distribution. The parameters estimated are then the doublets \(\eta_{ij}=\left( \alpha_{ij}, \beta_{ij} \right)\).