Skip to content

bigdyl-kaist/Hawkes-Process-Based-on-Controlled-Differential-Equations

 
 

Repository files navigation

Hawkes Process Based on Controlled Differential Equations

GitHub Repo stars arXiv Hits PWCPWCPWCPWC

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.

Introduction

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:

  1. Accurately capturing irregular event dynamics
  2. 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.

Requirements

  • 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.

Installation

  1. 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
    
  2. Create and activate the Conda environment:

    conda env create --file environment.yaml
    conda activate hpcde
    

Data

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.

Usage

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.

Code Structure

  • Main_HPCDE.py: Contains the main training and testing logic
  • transformer/Models.py: Implements the HP-CDE model architecture
  • Utils.py: Utility functions for data processing, evaluation metrics, etc.

Configuration

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.

Citation

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}
}

Star History

Star History Chart

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Shell 1.3%