title: Temporal Gillespie Algorithm: Fast Simulation of Contagion Processes on Time-Varying Networks.
abstract: Stochastic simulations are one of the cornerstones of the analysis of dynamical processes on complex networks, and are often the only accessible way to explore their behavior. The development of fast algorithms is paramount to allow large-scale simulations. The Gillespie algorithm can be used for fast simulation of stochastic processes, and variants of it have been applied to simulate dynamical processes on static networks. However, its adaptation to temporal networks remains non-trivial. We here present a temporal Gillespie algorithm that solves this problem. Our method is applicable to general Poisson (constant-rate) processes on temporal networks, stochastically exact, and up to multiple orders of magnitude faster than traditional simulation schemes based on rejection sampling. We also show how it can be extended to simulate non-Markovian processes. The algorithm is easily applicable in practice, and as an illustration we detail how to simulate both Poissonian and non-Markovian models of epidemic spreading. Namely, we provide pseudocode and its implementation in C++ for simulating the paradigmatic Susceptible-Infected-Susceptible and Susceptible-Infected-Recovered models and a Susceptible-Infected-Recovered model with non-constant recovery rates. For empirical networks, the temporal Gillespie algorithm is here typically from 10 to 100 times faster than rejection sampling.
authors.affiliation: Aix Marseille Université, Université de Toulon, CNRS, CPT, UMR 7332, Marseille, France.
authors.forename: Christian L
authors.initials: CL
authors.lastname: Vestergaard
authors.affiliation: Aix Marseille Université, Université de Toulon, CNRS, CPT, UMR 7332, Marseille, France.
authors.forename: Mathieu
authors.initials: M
authors.lastname: Génois
mesh_terms: D000465:Algorithms; D003198:Computer Simulation; D016358:Contact Tracing / Q000379:methods* / Q000706:statistics & numerical data*; D018562:Disease Transmission, Infectious / Q000706:statistics & numerical data*; D058872:Epidemics / Q000706:statistics & numerical data*; D006801:Humans; D015233:Models, Statistical; D018570:Risk Assessment / Q000379:methods; D062211:Spatio-Temporal Analysis; D013269:Stochastic Processes