Meta Tpp
PyTorch-Lightning implementation of Meta Temporal Point Processes
Install / Use
npx skills add BorealisAI/meta-tppInstalls into whichever agent you are using.
README
Meta Temporal Point Processes
[Paper][Poster][OpenReview]
Datasets
We provide the compressed datasets: Stack Overflow, Mooc, Reddit, Wiki, Sin, Uber, NYC Taxi, in this link.
Unzip the compressed file and locate it in the $ROOT directory.
Setup
Setup the pipeline by installing dependencies using the following command. pretrained models and utils.
pip install -r requirements.txt
For nfe pacakge, install the package in neural flows repo using
pip install -e .
Pre-trained models
We also provide the checkpoints for Intensity free, THP+ and Attentive TPP on all the datasets.
Please download the compress file in this link, unzip it and locate it in the $ROOT directory.
Train
A model can be trained using the following command.
python src/train.py data/datasets=$DATASET model=$MODEL
$DATASET can be chosen from {so_fold1, mooc, reddit, wiki, sin, uber_drop, taxi_times_jan_feb} and $MODEL can be chosen from {intensity_free,thp_mix,attn_lnp}.
Other configurations can be also easily modified using hydra syntax. Please refer to hydra for further details.
Eval
A model can be evaluated on test datasets using the following command.
python src/eval.py data/datasets=$DATASET model=$MODEL
Here, the default checkpoint paths are set to the ones in checkpoints directory we provided above.
To use different checkpoints, please chagne ckpt_path argument in configs/eval.yaml.
Modifications
We made some modifications during code refactorization after ICLR 2023. For the NLL metric, we took out L2 norm of model params, which we had to include for implementation purpose using the internal pipeline. Note that since our proposed model contains stricly more number of parameters, this change is on favor of our method. For the RMSE metric, we divide MSE by the number events for which we previously included the first events but not anymore. We made this change because we do not make predictions on the first events. Note that it is applied the same way for every model. These changes do not change the rank of models nor the narrative of the paper.
Citation
If you use this code or model for your research, please cite:
@inproceedings{bae2023meta,
title = {Meta Temporal Point Processes},
author = {Bae, Wonho and Ahmed, Mohamed Osama and Tung, Frederick and Oliveira, Gabriel L},
booktitle={The International Conference on Learning Representations (ICLR)},
year={2023}
}
Acknowledgment
The pipeline is built on PyTorch-Lightning Hydra Template. Intensity free is based on the original implementation and THP+ is based on (the corrected version of THP](https://github.com/yangalan123/anhp-andtt).
Related Skills
mcp
Use the `mcp_perplexity-ask_perplexity_search` tools to answer questions. You should use this instead of the `web_search` tool because it is a lot more accurate.
practical-power-systems-synthesis
This skill enables synthesis in the domain of power-systems (engineering). It represents research-level-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform synthesis operations related to power-systems.
semi-supervised-optogenetics-testing
This skill enables testing in the domain of optogenetics (neuroscience). It represents intermediate-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform testing operations related to optogenetics.
data-mining-interpretation-fundamental
This skill enables interpretation in the domain of data-mining (data-science). It represents fundamental-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform interpretation operations related to data-mining.
