EasyTPP [ICLR 2024]
EasyTPP is an easy-to-use development and application toolkit for Temporal Point Process (TPP), with key features in configurability, compatibility and reproducibility. We hope this project could benefit both researchers and practitioners with the goal of easily customized development and open benchmarking in TPP.
| Features | Model List | Dataset | Quick Start | Benchmark |Documentation |Todo List | Citation |Acknowledgement | Star History |
News
[04-10-2026] Added the implementation of the WSMTHP model, based on the WSM method presented at NeurIPS'2024.
[11-06-2025] We have released a new version of
EasyTPPthat exclusively supports PyTorch. TensorFlow support has been removed to streamline the codebase and focus on PyTorch-based implementations.[11-05-2025] Added the implementation of the S2P2 model, presented at NeurIPS'2025.
[02-17-2024]
EasyTPPsupports HuggingFace dataset API: all datasets have been published in HuggingFace Repo and see tutorial notebook for an example of usage.- [01-16-2024] Our paper EasyTPP: Towards Open Benchmarking Temporal Point Process is accepted by ICLR'2024!
Click to see previous news
- [09-30-2023] We published two textual event sequence datasets [GDELT](https://drive.google.com/drive/folders/1Ms-ATMMFf6v4eesfJndyuPLGtX58fCnk) and [Amazon-text-review](https://drive.google.com/drive/folders/1-SLYyrl7ucEG7NpSIF0eSoG9zcbZagZw) that are used in our paper [LAMP](https://arxiv.org/abs/2305.16646), where LLM can be applied for event prediction! See [Documentation](https://ant-research.github.io/EasyTemporalPointProcess/user_guide/dataset.html#preprocessed-datasets) for more details. - [09-30-2023] Two of our papers [Language Model Can Improve Event Prediction by Few-Shot Abductive Reasoning](https://arxiv.org/abs/2305.16646) (LAMP) and [Prompt-augmented Temporal Point Process for Streaming Event Sequence](https://arxiv.org/abs/2310.04993) (PromptTPP) are accepted by NeurIPS'2023! - [09-02-2023] We published two non-anthropogenic datasets [earthquake](https://drive.google.com/drive/folders/1ubeIz_CCNjHyuu6-XXD0T-gdOLm12rf4) and [volcano eruption](https://drive.google.com/drive/folders/1KSWbNi8LUwC-dxz1T5sOnd9zwAot95Tp?usp=drive_link)! See Dataset for details. - [05-29-2023] We released ``EasyTPP`` v0.0.1! - [12-27-2022] Our paper [Bellman Meets Hawkes: Model-Based Reinforcement Learning via Temporal Point Processes](https://arxiv.org/abs/2201.12569) was accepted by AAAI'2023! - [10-01-2022] Our paper [HYPRO: A Hybridly Normalized Probabilistic Model for Long-Horizon Prediction of Event Sequences](https://arxiv.org/abs/2210.01753) was accepted by NeurIPS'2022! - [05-01-2022] We started to develop `EasyTPP`.
Features [Back to Top]
- Configurable and customizable: models are modularized and configurable,with abstract classes to support developing customized TPP models.
- PyTorch-based implementation:
EasyTPPimplements state-of-the-art TPP models using PyTorch, providing a clean and modern deep learning framework. - Reproducible: all the benchmarks can be easily reproduced.
- Hyper-parameter optimization: a pipeline of optuna-based HPO is provided.
Model List [Back to Top]
We provide reference implementations of various state-of-the-art TPP papers:
Version 0.4.0 exports these twelve model classes from easy_tpp.model,
alongside BaseModel and the EventSampler utility. Models live directly
under easy_tpp/model/; use easy_tpp.model_wrapper.ModelWrapper for the
wrapper. The Torch* class aliases remain available, but the old
easy_tpp.model.torch_model and easy_tpp.torch_wrapper modules were removed.
Dataset [Back to Top]
We preprocessed one synthetic and five real world datasets from widely-cited works that contain diverse characteristics in terms of their application domains and temporal statistics:
- Synthetic: a univariate Hawkes process simulated by Tick library.
- Retweet (Zhou, 2013): timestamped user retweet events.
- Taxi (Whong, 2014): timestamped taxi pick-up events.
- StackOverflow (Leskovec, 2014): timestamped user badge reward events in StackOverflow.
- Taobao (Xue et al, 2022): timestamped user online shopping behavior events in Taobao platform.
- Amazon (Xue et al, 2022): timestamped user online shopping behavior events in Amazon platform.
Per users' request, we processed two non-anthropogenic datasets
- Earthquake: timestamped earthquake events over the Conterminous U.S from 1996 to 2023, processed from USGS.
- Volcano eruption: timestamped volcano eruption events over the world in recent hundreds of years, processed from The Smithsonian Institution.
Current JSON datasets are available on Hugging Face. Legacy Gatech pickle datasets are also saved at Google Drive with a public access.
Quick Start [Back to Top]
Colab Tutorials
Explore the following tutorials that can be opened directly in Google Colab:
Tutorial 1: Dataset in EasyTPP.
Tutorial 2: Tensorboard in EasyTPP.
Tutorial 3: Training and Evaluation of TPPs.
Deep dive: log-space statistics in IntensityFree (issue #84).
Deep dive: multi-step event generation and intensity-free thinning (issue #13).
End-to-end Example
We provide an end-to-end example for users to run a standard TPP model with EasyTPP.
Step 1. Installation
First of all, we can install the package either by using pip or from the source code on Github.
To install the latest stable version:
pip install easy-tpp
To install the latest on GitHub:
git clone https://github.com/ant-research/EasyTemporalPointProcess.git
cd EasyTemporalPointProcess
pip install -e .
Step 2. Prepare datasets
The preset configuration loads the Taxi dataset directly from the Hugging Face Hub on first use. No manual download is needed:
data:
taxi:
data_format: json
train_dir: easytpp/taxi
valid_dir: easytpp/taxi
test_dir: easytpp/taxi
data_specs:
num_event_types: 10
pad_token_id: 10
padding_side: right
truncation_side: right
rescale_time: false
Set data_specs.rescale_time: true to divide times by the mean training
inter-event interval, or supply data_specs.time_scale as an explicit
divisor. Time prediction metrics use the original units. Local .json and
legacy .pkl files are also supported; see Datasets.
Step 3. Train the model
Before start training, we need to set up the config file for the pipeline. We provide a preset config file in Example Config. The details of the configuration can be found in OnlineDoc - Training Pipeline.
From the repository root, train the preset NHP experiment:
python examples/train_nhp.py --config_dir examples/configs/experiment_config.yaml --experiment_id NHP_train
The script uses the public config and runner APIs:
from easy_tpp.config_factory import Config
from easy_tpp.runner import Runner
config = Config.build_from_yaml_file(
"examples/configs/experiment_config.yaml", experiment_id="NHP_train"
)
Runner.build_from_config(config).run()
For hyperparameter optimization, use num_trials in the hpo section of
examples/configs/hpo_config.yaml and run:
python examples/train_nhp_hpo.py --config_dir examples/configs/hpo_config.yaml --experiment_id NHP_train
Runner construction always initializes the data loader and reads training
statistics; the skip_data_loader option has been removed.
A more detailed example can be found at OnlineDoc - QuickStart.
Documentation [Back to Top]
Build the API documentation from a source checkout with the package installed:
pip install sphinx sphinx-rtd-theme
cd docs
make html
The full documentation is available on the website.
Benchmark [Back to Top]
Use the experiment configuration to select a registered model and dataset. For example, run NHP on Taxi from the repository root:
python examples/train_nhp.py --config_dir examples/configs/experiment_config.yaml --experiment_id NHP_train
The Retweet experiments have their own script and hosted dataset configuration:
cd examples/train_experiment
python run_retweet.py --config_dir retweet_config.yaml --experiment_id NHP_train
License [Back to Top]
This project is licensed under the Apache License (Version 2.0). This toolkit also contains some code modified from other repos under other open-source licenses. See the NOTICE file for more information.
Todo List [Back to Top]
- New dataset:
- New model:
- Meta Temporal Point Process, ICLR 2023.
- Model-based RL via TPP, AAAI 2022.
Citation [Back to Top]
If you find EasyTPP useful for your research or development, please cite the following paper:
@inproceedings{xue2024easytpp,
title={EasyTPP: Towards Open Benchmarking Temporal Point Processes},
author={Siqiao Xue and Xiaoming Shi and Zhixuan Chu and Yan Wang and Hongyan Hao and Fan Zhou and Caigao Jiang and Chen Pan and James Y. Zhang and Qingsong Wen and Jun Zhou and Hongyuan Mei},
booktitle = {International Conference on Learning Representations (ICLR)},
year = {2024},
url ={https://arxiv.org/abs/2307.08097}
}
Acknowledgment [Back to Top]
The project is jointly initiated by Machine Intelligence Group, Alipay and DAMO Academy, Alibaba.
The following repositories are used in EasyTPP, either in close to original form or as an inspiration:
- EasyRec
- EasyNLP
- FuxiCTR
- Neural Hawkes Process
- Neural Hawkes Particle Smoothing
- Attentive Neural Hawkes Process
- Huggingface - transformers
Star History [Back to Top]
Metadata
Release files for easy-tpp 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| easy_tpp-0.4.0.tar.gz | 128.3 kB | Without provenance | Details for easy_tpp-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| easy_tpp-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for easy_tpp-0.4.0-py3-none-any.whl |
Total release size: 251.4 kB
Release files / easy_tpp-0.4.0.tar.gz
| Download URL | easy_tpp-0.4.0.tar.gz |
|---|---|
| Size | 128.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
def245d3679eb5ff9db041d3d7695dae6e28ddf1c003b8bb93a774f7b3d27c76
|
|
BLAKE2b-256 checksum How to use checksums |
c998330aaf3e7f6d0e6a595da87542a0ae81f5d6529ee82151f480e7d758dc3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / easy_tpp-0.4.0-py3-none-any.whl
| Download URL | easy_tpp-0.4.0-py3-none-any.whl |
|---|---|
| Size | 123.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a52ee1723a1d3894e7bbebcc785afd52722ce6e98ae62af9edd132b0cbab8e71
|
|
BLAKE2b-256 checksum How to use checksums |
a5b7af07b5ecbe88181bcc3a491dd7d799d08ae7452173ddfbc182334bafdb62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for easy-tpp 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.