{"id":15658528,"url":"https://github.com/shchur/triangular-tpp","last_synced_at":"2026-03-16T15:31:01.858Z","repository":{"id":126713054,"uuid":"302760415","full_name":"shchur/triangular-tpp","owner":"shchur","description":"Implementation of \"Fast and Flexible Temporal Point Processes with Triangular Maps\" (Oral @ NeurIPS 2020)","archived":false,"fork":false,"pushed_at":"2023-12-01T14:26:50.000Z","size":9683,"stargazers_count":23,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T22:32:02.825Z","etag":null,"topics":["normalizing-flows","pytorch","temporal-point-processes"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2006.12631","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shchur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-09T21:50:33.000Z","updated_at":"2024-05-10T02:09:46.000Z","dependencies_parsed_at":"2024-10-23T05:48:20.066Z","dependency_job_id":"b1e81700-9d24-4550-bf8e-5b683c305da0","html_url":"https://github.com/shchur/triangular-tpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchur%2Ftriangular-tpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchur%2Ftriangular-tpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchur%2Ftriangular-tpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchur%2Ftriangular-tpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shchur","download_url":"https://codeload.github.com/shchur/triangular-tpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252535274,"owners_count":21763927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["normalizing-flows","pytorch","temporal-point-processes"],"created_at":"2024-10-03T13:12:44.197Z","updated_at":"2025-10-04T10:04:33.437Z","avatar_url":"https://github.com/shchur.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fast and Flexible Temporal Point Processes with Triangular Maps\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"640\" src=\"https://i.postimg.cc/Y9R38vt6/tritpp-logo.png\"\u003e\n\u003c/p\u003e\n\nThis repository includes a reference implementation of the algorithms described in [\"Fast and Flexible Temporal Point Processes with Triangular Maps\"](https://arxiv.org/abs/2006.12631) by Oleksandr Shchur, Nicholas Gao, Marin Biloš and Stephan Günnemann (Oral, NeurIPS 2020).\n\n- [Video explaining the paper](https://videos.neurips.cc/video/slideslive-38938478)\n\nTemporal point processes (TPPs) allow us to define probability distributions over variable-length event sequences in some time interval `[0, t_max]`.\nIn our paper, we show how to define TPPs using invertible transformations, similar to normalizing flows.\nThe code includes new parametrizations for several existing TPPs as well as a new, more flexible model.\nOur parametrizations allow to both draw samples \u0026 compute likelihood in parallel, which leads to signficant speedups compared to traditional RNN-based models.\n\nThe following models are available in [`ttpp.models`](https://github.com/shchur/triangular-tpp/blob/main/ttpp/models.py):\n- `Inhomogeneous Poisson Process`\n- `Renewal Process`\n- `Modulated Renewal Process`\n- `TriTPP`\n- `Autoregressive` (RNN-based TPP with slow sampling)\n\n## Requirements\n\nThe code is written in Python version 3.7 and was tested on Ubuntu 18.04.\nThe code requires PyTorch version 1.5 with CUDA enabled.\nOther requirements are listed in [`requirements.txt`](requirements.txt).\n\nTo install the library run\n```\npip install -e .\n```\nThe datasets used in the paper can be found in `data/`.\n\n## Usage\nJupyter notebooks reproducing the experimental results can be found in the `notebooks/` folder:\n- [Differentiable relaxation](notebooks/differentiable_relaxation.ipynb)\n- [Scalability](notebooks/scalability.ipynb)\n- [Density estimation](notebooks/density_estimation.ipynb)\n- [Variational inference for MJPs](notebooks/variational_inference.ipynb)\n\n\nYou can also train the model using command line. For example, to train the `TriTPP` model on the `taxi` dataset run\n```\npython scripts/experiment.py taxi TriTPP\n```\nTo see the command line arguments, use\n```\npython scripts/experiment.py --help\n```\n\n## Cite\nPlease cite our paper if you use this code or data in your own work:\n```\n@inproceedings{shchur2020fast,\n  title = {Fast and Flexible Temporal Point Processes with Triangular Maps},\n  author = {Shchur, Oleksandr and Gao, Nicholas and Bilo\\v{s}, Marin and G{\\\"u}nnemann, Stephan},\n  booktitle={Advances in Neural Information Processing Systems (NeurIPS)},\n  year = {2020} \n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchur%2Ftriangular-tpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshchur%2Ftriangular-tpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchur%2Ftriangular-tpp/lists"}