{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/temporal-gillespie-algorithm-fast-simulation","title":"Temporal Gillespie algorithm: Fast simulation of contagion processes on time-varying networks","arxiv_id":"1504.01298","date":"2015-04-03","proceeding":null,"authors":["Christian L. Vestergaard","Mathieu Génois"],"abstract":"Stochastic simulations are one of the cornerstones of the analysis of\ndynamical processes on complex networks, and are often the only accessible way\nto explore their behavior. The development of fast algorithms is paramount to\nallow large-scale simulations. The Gillespie algorithm can be used for fast\nsimulation of stochastic processes, and variants of it have been applied to\nsimulate dynamical processes on static networks. However, its adaptation to\ntemporal networks remains non-trivial. We here present a temporal Gillespie\nalgorithm that solves this problem. Our method is applicable to general Poisson\n(constant-rate) processes on temporal networks, stochastically exact, and up to\nmultiple orders of magnitude faster than traditional simulation schemes based\non rejection sampling. We also show how it can be extended to simulate\nnon-Markovian processes. The algorithm is easily applicable in practice, and as\nan illustration we detail how to simulate both Poissonian and non-Markovian\nmodels of epidemic spreading. Namely, we provide pseudocode and its\nimplementation in C++ for simulating the paradigmatic\nSusceptible-Infected-Susceptible and Susceptible-Infected-Recovered models and\na Susceptible-Infected-Recovered model with non-constant recovery rates. For\nempirical networks, the temporal Gillespie algorithm is here typically from 10\nto 100 times faster than rejection sampling.","url_abs":"http://arxiv.org/abs/1504.01298v3","url_pdf":"http://arxiv.org/pdf/1504.01298v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"temporal-gillespie-algorithm-fast-simulation","repo_url":"https://github.com/CLVestergaard/TemporalGillespieAlgorithm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}