Hawkes Process Based on Controlled Differential Equations

Minju Jo, Seungji Kook, Noseong Park

Abstract

Hawkes processes are a popular framework to model the occurrence of sequential events in fields like social diffusion. However, real-world event sequences often feature irregular inter-arrival times that existing neural models struggle to capture. Furthermore, these models typically rely on heuristics to calculate event log-likelihoods. We propose the Hawkes Process based on Controlled Differential Equations (HP-CDE). By leveraging Neural CDEs, our model treats event sequences as continuous-time processes, allowing for the proper treatment of irregular temporal spaces and the exact computation of log-likelihoods via ODE solvers. Experiments on four real-world datasets demonstrate that HP-CDE significantly outperforms state-of-the-art methods.

TL;DR

HP-CDE is a novel framework that models event sequences as continuous-time paths. By using Neural Controlled Differential Equations, it naturally handles irregular time intervals and enables the first-ever exact calculation of Hawkes process log-likelihood using an ODE solver, leading to substantial performance gains over heuristic-based discrete models.

The Challenge: Irregularity and Integrals

Hawkes processes model "self-exciting" dynamics where past events influence the probability of future ones. Applying deep learning to these processes faces two primary hurdles:

  1. Temporal Irregularity: Real-world events occur at uneven intervals. Standard discrete neural networks (RNNs, Transformers) are ill-suited for this, often requiring "hacks" like time-decay functions that fail to capture true continuous dynamics.
  2. The Integral Problem: Training requires calculating the log-likelihood, which involves an integral over "non-events" (periods where nothing happened). Discrete models must approximate this using noisy heuristics like Monte Carlo sampling, which introduces instability.

Methodology: HP-CDE

HP-CDE addresses these issues by replacing discrete hidden states with a continuous hidden path $h(t)$ governed by a Neural Controlled Differential Equation.

The HP-CDE architecture: from discrete event sequences to continuous hidden representations and exact log-likelihood calculation.

The process involves:

  • Continuous Path Generation: Discrete events (type and time) are embedded and then interpolated (using linear or cubic splines) to create a continuous path $Z(t)$.
  • Neural CDE Layer: The model solves a Riemann-Stieltjes integral to update the hidden state $h(t)$ continuously. This allows the model to "read" the data at any point in time, preserving the exact temporal spacing.
  • Exact Log-Likelihood: Instead of approximating the non-event integral, the authors formulate it as an ODE. By adding this integral to the system of equations solved by the ODE solver, they compute the exact log-likelihood alongside the hidden state.

For datasets with very long sequences, the authors propose HP-CDE-AT, which adds a self-attention layer before the CDE to better capture long-range dependencies.

Experimental Evaluation

The model was evaluated on four diverse real-world datasets: MIMIC (electronic health records), MemeTracker (meme propagation across web articles), Retweet (Twitter sequences), and StackOverflow (user award history).

Key Results

HP-CDE consistently outperformed state-of-the-art baselines (RMTPP, NHP, SAHP, and THP) across nearly all metrics:

  • Log-Likelihood (LL): On the MIMIC dataset, HP-CDE achieved an LL of 2.573, while the best baseline (THP) trailed at -0.233.
  • Accuracy: On the highly complex MemeTracker dataset (5,000 classes), HP-CDE's accuracy was 0.151, a massive improvement over THP's 0.015.
  • Time Prediction: The model showed superior Root Mean Square Error (RMSE) in predicting when the next event would occur, particularly on datasets with shorter average sequence lengths.

Key Insights: Robustness and Diversity

One of the most striking findings is how well HP-CDE handles imbalanced data. Traditional attention-based models (like SAHP or THP) often overfit to the most frequent event types. HP-CDE, by contrast, predicts a much more diverse range of event types.

Comparison of prediction diversity on MemeTracker: HP-CDE correctly predicts a much wider variety of event classes compared to baselines.

This reinforces that for temporal point processes, the "continuous-time" inductive bias of differential equations is fundamentally more suited to the data than the "discrete-step" bias of standard RNNs.

Limitations and Future Work

Solving ODEs is computationally more expensive than simple matrix multiplications in a standard RNN. While the authors use the memory-efficient adjoint sensitivity method, training time and memory usage are higher than some simpler baselines. Additionally, while HP-CDE-AT helps with long sequences, further refining how CDEs handle extremely long-range dependencies remains an open area. Finally, as the number of event types ($K$) grows, the complexity of the intensity function calculation increases, which could challenge the scalability of the exact ODE approach for even larger datasets.

Summary updated

BibTeX
@inproceedings{jo2023hawkes,
  author = {Minju Jo and Seungji Kook and Noseong Park},
  title = {{Hawkes Process Based on Controlled Differential Equations}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.24963/ijcai.2023/239},
}
Figure