Practical and scalable simulations of non-Markovian stochastic processes and temporal networks with individual node properties
Aurelien Pelissier, Miroslav Phan, Didier Le Bail, Niko Beerenwinkel, Maria Rodriguez Martinez
Code Available — Be the first to reproduce this paper.
ReproduceCode
- github.com/aurelien-pelissier/regirOfficialIn papernone★ 2
- github.com/oist/nextnetnone★ 1
Abstract
Discrete stochastic processes are prevalent in natural systems, with applications in physics, biochemistry, epidemiology, sociology, and finance. While analytic solutions often cannot be derived, existing simulation frameworks can generate stochastic trajectories compatible with the dynamical laws underlying the random phenomena. Still, most simulation algorithms assume the system dynamics are memoryless (Markovian assumption), under which assumption, future occurrences only depend on the system's present state. This enables efficient and exact simulation via the Gillespie algorithm. However, many real-world systems are inherently non-Markovian and exhibit memory effects. Such systems are difficult to study analytically, and current numerical methods are often computationally expensive or limited by strong simplifying assumptions that conflict with empirical data. To address these limitations, we introduce the Rejection-based Gillespie algorithm for non-Markovian Reactions (REGIR), a general and scalable framework for simulating non-Markovian stochastic systems with arbitrary inter-event time distributions. REGIR provides user-defined accuracy while preserving the same asymptotic computational complexity as the classical Gillespie algorithm. We derive a lower bound on REGIR's approximation accuracy and demonstrate its capabilities across three representative classes of non-Markovian systems: (1) reaction channels with delays, (2) stochastic processes driven by individual reactant properties, and (3) temporal networks governed by node activity. In all cases, REGIR accurately captures memory-dependent dynamics and outperforms existing approaches in terms of flexibility and efficiency.