Temporal Gillespie Algorithm: Fast Simulation of Contagion Processes on Time-Varying Networks

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.

[1]  Michael A. Gibson,et al.  Efficient Exact Stochastic Simulation of Chemical Systems with Many Species and Many Channels , 2000 .

[2]  S. Havlin,et al.  Scaling laws of human interaction activity , 2009, Proceedings of the National Academy of Sciences.

[3]  Petter Holme,et al.  Model Versions and Fast Algorithms for Network Epidemiology , 2014, 1403.1011.

[4]  Alessandro Vespignani,et al.  Real-time numerical forecast of global epidemic spreading: case study of 2009 A/H1N1pdm , 2012, BMC Medicine.

[5]  D. Gillespie Exact Stochastic Simulation of Coupled Chemical Reactions , 1977 .

[6]  Jari Saramäki,et al.  Temporal Networks , 2011, Encyclopedia of Social Network Analysis and Mining.

[7]  Alessandro Vespignani,et al.  Dynamical Processes on Complex Networks , 2008 .

[8]  D. Kendall An Artificial Realization of a Simple “Birth-And-Death” Process , 1950 .

[9]  Franco Bagnoli,et al.  Modeling ant battles by means of a diffusion-limited Gillespie algorithm. , 2014, Theoretical biology forum.

[10]  Jari Saramäki,et al.  Small But Slow World: How Network Topology and Burstiness Slow Down Spreading , 2010, Physical review. E, Statistical, nonlinear, and soft matter physics.

[11]  Heinz Koeppl,et al.  Uncoupled Analysis of Stochastic Reaction Networks in Fluctuating Environments , 2014, PLoS Comput. Biol..

[12]  Giancarlo Mauri,et al.  The Interplay of Intrinsic and Extrinsic Bounded Noises in Biomolecular Networks , 2012, PloS one.

[13]  J. Doob Topics in the theory of Markoff chains , 1942 .

[14]  Timoteo Carletti,et al.  The Stochastic Evolution of a Protocell: The Gillespie Algorithm in a Dynamically Varying Volume , 2011, Comput. Math. Methods Medicine.

[15]  R. Pastor-Satorras,et al.  Activity driven modeling of time varying networks , 2012, Scientific Reports.

[16]  Zhi-Xi Wu,et al.  Behavior of susceptible-vaccinated-infected-recovered epidemics with diversity in the infection rate of individuals. , 2013, Physical review. E, Statistical, nonlinear, and soft matter physics.

[17]  Maurice S. Bartlett,et al.  Stochastic Processes or the Statistics of Change , 1953 .

[18]  A. Barabasi,et al.  Impact of non-Poissonian activity patterns on spreading processes. , 2006, Physical review letters.

[19]  Raúl Toral,et al.  Simulating non-Markovian stochastic processes. , 2013, Physical review. E, Statistical, nonlinear, and soft matter physics.

[20]  J Hasty,et al.  Cellular growth and division in the Gillespie algorithm. , 2004, Systems biology.

[21]  David F Anderson,et al.  A modified next reaction method for simulating chemical systems with time dependent propensities and delays. , 2007, The Journal of chemical physics.

[22]  Gerd Zschaler,et al.  Largenet2: an object-oriented programming library for simulating large adaptive networks , 2012, Bioinform..

[23]  Piet Van Mieghem,et al.  Epidemic processes in complex networks , 2014, ArXiv.

[24]  Alessandro Vespignani,et al.  Multiscale mobility networks and the spatial spreading of infectious diseases , 2009, Proceedings of the National Academy of Sciences.

[25]  Ramon Huerta,et al.  Contact tracing and epidemics control in social networks. , 2002, Physical review. E, Statistical, nonlinear, and soft matter physics.

[26]  A L Lloyd,et al.  Realistic distributions of infectious periods in epidemic models: changing patterns of persistence and dynamics. , 2001, Theoretical population biology.

[27]  Lauren Ancel Meyers,et al.  EpiFire: An open source C++ library and application for contact network epidemiology , 2012, BMC Bioinformatics.

[28]  D. Gillespie A General Method for Numerically Simulating the Stochastic Time Evolution of Coupled Chemical Reactions , 1976 .

[29]  M. Keeling,et al.  Integrating stochasticity and network structure into an epidemic model , 2008, Journal of The Royal Society Interface.

[30]  Rossano Schifanella,et al.  On the Dynamics of Human Proximity for Data Diffusion in Ad-Hoc Networks , 2011, Ad Hoc Networks.

[31]  A. Barrat,et al.  Simulation of an SEIR infectious disease model on the dynamic contact network of conference attendees , 2011, BMC medicine.

[32]  A-L Barabási,et al.  Structure and tie strengths in mobile communication networks , 2006, Proceedings of the National Academy of Sciences.

[33]  Romualdo Pastor-Satorras,et al.  Epidemic thresholds of the Susceptible-Infected-Susceptible model on networks: A comparison of numerical and theoretical results , 2012, Physical review. E, Statistical, nonlinear, and soft matter physics.

[34]  Esteban Moro Egido,et al.  The dynamical strength of social ties in information spreading , 2010, Physical review. E, Statistical, nonlinear, and soft matter physics.

[35]  Alessandro Vespignani,et al.  Time varying networks and the weakness of strong ties , 2013, Scientific Reports.

[36]  Julie Fournet,et al.  Data on face-to-face contacts in an office building suggest a low-cost vaccination strategy based on community linkers , 2014, Network Science.

[37]  J. Doob Markoff chains—denumerable case , 1945 .

[38]  Ciro Cattuto,et al.  Activity clocks: spreading dynamics on temporal networks of human contact , 2013, Scientific Reports.

[39]  Alain Barrat,et al.  Contact Patterns among High School Students , 2014, PloS one.

[40]  Petter Holme,et al.  Birth and death of links control disease spreading in empirical contact networks , 2013, Scientific Reports.

[41]  D. Cummings,et al.  Strategies for mitigating an influenza pandemic , 2006, Nature.

[42]  Ciro Cattuto,et al.  Dynamics of Person-to-Person Interactions from Distributed RFID Sensor Networks , 2010, PloS one.