This repository contains the official implementation of "Hawkes Process Based on Controlled Differential Equations" as presented in IJCAI 2023.
💡 To see other papers from BigDyL, please visit BigDyL homepage or awesome-bigdyl to see the list of papers with links to papers and code.
HP-CDE is a novel approach to modeling temporal point processes using neural controlled differential equations (neural CDEs). It addresses two key limitations of existing neural Hawkes process models:
- Accurately capturing irregular event dynamics
- Exactly calculating the log-likelihood without resorting to approximations
By using the continuous nature of neural CDEs, HP-CDE can properly handle irregular time series data and compute exact log-likelihoods, leading to improved performance on event prediction tasks.
- Python 3.7+
- PyTorch 1.4.0+
- CUDA-enabled GPU (recommended for faster training)
We recommend using Anaconda to manage the Python environment and dependencies.
-
Clone this repository:
git clone https://github.com/kookseungji/Hawkes-Process-Based-on-Controlled-Differential-Equations.git cd Hawkes-Process-Based-on-Controlled-Differential-Equations
-
Create and activate the Conda environment:
conda env create --file environment.yaml conda activate hpcde
The MIMIC dataset is provided in the data
folder. For other datasets (MemeTracker, Retweet, StackOverflow), please refer to the paper for information on how to obtain and preprocess them.
To train and evaluate the HP-CDE model, run:
bash run_hpcde.sh
This script sets up the necessary parameters and runs the main training/evaluation loop.
Main_HPCDE.py
: Contains the main training and testing logictransformer/Models.py
: Implements the HP-CDE model architectureUtils.py
: Utility functions for data processing, evaluation metrics, etc.
The run_hpcde.sh
script accepts several command-line arguments to configure the model and training process:
--data
: Path to the dataset--scale
: Coefficient for time prediction loss (α₁ in the paper)--llscale
: Coefficient for log-likelihood loss (α₂ in the paper)--d_model
/--hh_dim
: Size of the embedding hidden vectors--layers
: Number of Neural CDE layers--d_ncde
: Size of the Neural CDE hidden vectors
Refer to the script for additional hyperparameters and their default values.
If you find this work useful in your research, please consider citing our paper:
@inproceedings{jo2023hawkes,
title={Hawkes process based on controlled differential equations},
author={Jo, Minju and Kook, Seungji and Park, Noseong},
booktitle={Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence (IJCAI)},
pages={2151--2159},
year={2023}
}