FastSIR algorithm: A fast algorithm for the simulation of the epidemic spread in large networks by using the susceptible–infected–recovered compartment model
Introduction
Complex networks represent the structure of communication networks [3], [7] or social contact interactions [23], [27] very well. Therefore, it is reasonable to study computer virus propagation or epidemic spreading on complex networks [2], [28], [15]. Modeling the spread of an epidemic in a population is usually done by dividing individuals in the population into subdivisions with some common characteristic features called compartments. The SIR model is a good model for many infectious diseases where each individual in a population can be in one of three different compartments. Those who are susceptible to the disease are in the susceptible compartment, those who are infected and can transmit the disease to others are in the infected compartment and those who have recovered and are immune and those who are removed from the population are in the recovered compartment. Some infectious diseases are described with a different number of compartment models, e.g. SIS model (susceptible-infected-susceptible) where individuals cannot have long lasting immunity and therefore the recovered compartment does not exist.
Different mathematical frameworks have been used to study epidemic spreading. We can divide them into two big categories based upon assumptions they make: the homogeneous mixing framework and the heterogeneous mixing framework.
The homogeneous mixing framework assumes that all individuals in a population have equal probability of contact. This is a traditional mathematical framework [21], [19], [31], where differential equations can be applied to understand epidemic dynamics. The models in this framework predict the epidemic threshold which divides the healthy and the infective phase of the SIR and the SIS models.
In reality, each individual has contact with only a small fraction of individuals in a population. As the assumption of the homogeneous mixing fails to describe a realistic scenario of disease spreading, the heterogeneous mixing is described by using a network structure. The small world network property [39] and the scale-free network property [4], [16] have a great impact on the outcome of an epidemic spreading. The SIR and the SIS models in the heterogeneous mixing framework imply that a disease will always spread for certain power-law degree distributions [30]. We can also make a further division in this framework by assumptions they make: the bond percolation, the mean-field and the particle network approach.
The bond percolation approach applies the percolation theory to describe epidemic processes on networks [26], [18], [24]. The percolation theory predicts the mean epidemic size, but neglects epidemic dynamics. Analytical solutions of a mean outbreak size for the configuration network models have also been derived [9]. In order to show isomorphism of epidemic models to bond percolation processes [20], the epidemic percolation networks were introduced as a valuable tool for studying of the stochastic epidemic models.
The mean-field approach assumes that all nodes in a network with the same degree k with respect to an epidemic process are statistically equivalent [10], [30]. This method enables us to write the epidemic time evolution equations for a network with an arbitrary degree distribution. By solving them, the relation of topology dependent features and the epidemic threshold have been discovered [38]. Recently, heterogeneous mean-field methodology [32] for epidemic spreading on interconnected complex networks has also been developed.
The particle network approach assumes that individuals are represented by particles which diffuse along edges on a network and each node contains some non-negative integer number of particles (reaction–diffusion processes). Some studies [11], [12] used the contact network models between urban cities (cities are connected through airline transportation network) and the homogeneous mixing model inside urban cities and examined the influence of interventions (antiviral drugs and containments) to a worldwide spread of a pandemic.
Realistic epidemic simulations (GLEaMviz [8], EpiFast [6], EpiSims [5] and EpiSindemics [17]) have become a very important application of high-performance computing in epidemic predictions. Recently, predictions of the epidemic spread by using Global Epidemic and Mobility Model [34] has been validated on a public health study of 2009 H1N1 influenza. Optimal distribution of a vaccine supply can have a significant impact on an epidemic spreading outcome [33].
The large-scale fluctuations in network topology suggest that the role of each node in an epidemic process cannot be disregarded [35], [37]. Our paper makes a contribution to the development in the field of SIR simulation algorithms on complex networks. These algorithms have an important role in the research of epidemic processes in the heterogeneous mixing framework.
In this paper, we propose the Naive SIR algorithm and the FastSIR algorithm for simulating spreading process with the SIR model on an arbitrary network structure. The Naive SIR algorithm simulates full epidemic dynamics of the SIR model on a network. The name “naive” suggests that the Naive SIR algorithm is the straightforward approach but nevertheless it uses data structures very efficiently. We use the Naive SIR algorithm as a baseline algorithm for comparison with the FastSIR algorithm. The main contribution of this paper is the FastSIR algorithm that uses probability distributions over the number of infected nodes which speeds up the process of recovery of infected nodes in a simulation, thus reducing the overall running time. Although the FastSIR algorithm does not follow epidemic dynamics in time, it still captures all infection transfers.
In Section 2 we formally define the epidemic simulation problem and other concepts used in this paper. Section 3 describes our implementation of the Naive SIR algorithm along with the running time and space complexity analysis. In Section 4 we describe the FastSIR algorithm along with the running time and space complexity analysis. By using a four-step proof, equivalence of the Naive SIR algorithm and the FastSIR algorithm regarding the number of infected nodes was shown. We also described how to efficiently implement probability distributions of the number of infected nodes by a recursive method. In Section 5 we described the results of the performance analysis of our algorithms on five empirical complex networks. In Sections 6 Application, 7 Discussion and conclusions we described possible applications of our algorithms along with a discussion of results and a conclusion.
Section snippets
The epidemic simulation problem
We define the contact-network as an undirected and non-weighted graph G(N, L) (N-set of nodes, L-set of links). A link (u, v) exists only if two nodes u and v are in contact during the epidemic time. We also assume that the contact-network during the epidemic process is a static one. To simulate epidemic propagation through a contact-network, we use the standard stochastic SIR model. In this model each node at some time can be in one of the following states: susceptible (S), infected (I) or
The Naive SIR algorithm
Algorithm 1 The Naive SIR algorithm Input: (G, λ) where G is the contact network and λ represents the initial conditions. Initial conditions consist of p, q, I a queue of initially infected nodes and S is an indicator variable array of susceptible nodes. Output: indicator variable array of recovered nodes R(v) while I is not empty do dequeue (u, I) for each contact v of node u do if S(v) is equal to 1 then let transmission of infection u ⇒ v occur with probability p if u ⇒ v does occur then update S (v) and R(v) enqueue (
The FastSIR algorithm
One of the main goals of this work is to find a fast algorithm for determining the total number of infected nodes for an epidemic process. We achieve this goal by developing the FastSIR algorithm (Algorithm 2) that is based on precalculated probability distributions over the number of infected nodes and non-explicit treatment of dynamics. Since we know how to calculate the probability distributions for the number of infected nodes [22] (see Appendix Section A.1), the idea is to choose that
Experimental results
In this section, we describe detailed performance profiling and the analysis of implementations of the FastSIR algorithm and the Naive SIR algorithm on our test server. The server has 4 Quad Core 2.4 GHz Intel E5330 processors and 50 GB of RAM memory. For test purposes, we use only one core for each test. Algorithms are implemented in C using igraph [14] and gmp libraries [1].
The analysis was performed on several empirical networks: the network of 2003 condensed matter collaborations (cond-mat
Application
The Naive SIR algorithm models full epidemic spreading dynamics, has a low average case running time and represents a core algorithm that models epidemic spreading. This algorithm has wide areas of application in the virus propagation, epidemic or information spreading with the SIR model. The FastSIR algorithm uses precalculated probability distributions of the number of infected nodes to reduce the average case running time by a constant factor. The FastSIR algorithm has been used in the study
Discussion and conclusions
In this paper we presented new efficient epidemic spreading simulation algorithms based on SIR spreading model that are capable of simulating spreading processes on arbitrary networks. The running time of the Naive SIR algorithm was reduced through the use of two data structures (queue and array) for storing node states. The upper bound of the average case running time of the Naive SIR algorithm on m-arry tree has been analytically derived.
We proposed the FastSIR algorithm that reduces the
Acknowledgements
The work of M.Š. is financed by the Ministry of Education Science and Sports of the Republic of Croatia under Contract No. 036-0362214-1987, 098-1191344-2860 and by BMRC of A∗STAR, Republic of Singapore. The work of H.Š. is supported by the Ministry of Education Science and Sports of the Republic of Croatia under Contract No. 098-0352828-2863. The authors thank Tomislav Šmuc for proofreading the manuscript.
References (39)
- et al.
Graph structure in the Web
Computer Networks
(2000) On the critical behavior of the general epidemic process and dynamical percolation
Mathematical Biosciences
(1983)- et al.
Phase diagram of epidemic spreading – unimodal vs. bimodal probability distributions
Physica A: Statistical Mechanics and its Applications
(2011) - et al.
Predicting epidemics on directed contact networks
Journal of Theoretical Biology
(2006) - et al.
Extending the sir epidemic model
Physica A: Statistical Mechanics and its Applications
(2004) - et al.
Effective vaccination policies
Information Sciences
(2010) - T.G. et al., GNU Multiple Precision Arithmetic Library 5.0.2., unpublished....
- et al.
Statistical mechanics of complex networks
Reviews of Modern Physics
(2002) - et al.
Internet: diameter of the world-wide Web
Nature
(1999) - et al.
Emergence of scaling in random networks
Science
(1999)
The gleamviz computational tool, a publicly available software to explore realistic epidemic spreading scenarios at the global scale
BMC Infectious Diseases
Network robustness and fragility: percolation on random graphs
Physical Review Letters
Modeling the worldwide spread of pandemic influenza: baseline case and containment interventions
PLoS Medicine
The role of the airline transportation network in the prediction and predictability of global epidemics
Proceedings of the National Academy of Sciences of the United States of America
Introduction to Algorithms
The igraph software package for complex network research
Interjournal Complex Systems
Cited by (18)
Spatial network disintegration based on kernel density estimation
2024, Reliability Engineering and System SafetyStructured multiagent decision-making in information diffusion: The model and dynamics
2023, Knowledge-Based SystemsEffects of official information and rumor on resource-epidemic coevolution dynamics
2022, Journal of King Saud University - Computer and Information SciencesCitation Excerpt :They established time-varying weighted public transit (PT) encounter networks, and they found that shutting down some transportation routes would effectively control the spread of the epidemics. Researchers of various disciplines are working on how to effectively contain the development of epidemics (Wan et al., 2008; Antulov-Fantulin et al., 2013; Li et al., 2020; Vhatkar and Bhole, 2022; Nie et al., 2022). Among them, the allocation of resources is the most important way to effectively slow down the spreading of epidemics (Zhao et al., 2019; Preciado et al., 2013; Watkins et al., 2018; Emanuel et al., 2020).
Incentive rate determination in viral marketing
2021, European Journal of Operational ResearchCitation Excerpt :Studies in epidemic dynamics range from the spread of infectious diseases to the spread of information, rumor, cultural norms, computer viruses, social behavior, and disasters (Hu & Sheng, 2015; Kiss et al., 2017; Urena, Kou, Dong, Chiclana, & Herrera-Viedma, 2019; Van Mieghem et al., 2009a; Yang, Li, & Giua, 2020; Yu et al., 2015). Although the underlying mechanisms of each phenomenon are different, their mathematical description often leads to similar constitutive equations that can be conceptually modeled as a contagion process based on classic epidemic models such as the susceptible-infected-susceptible (SIS) and susceptible-infected-recovered (SIR) models (Antulov-Fantulin, Lančić, Štefančić, & Šikić, 2013; Kiss et al., 2017). While network-related frameworks are extensively utilized to study the viral marketing strategies and influence maximization problems, to the best of our knowledge, dynamic epidemic models are not considered in the context of incentive rate determination.
A microscopic-view Infection model based on linear systems
2020, Information SciencesCitation Excerpt :A clear trade-off occurs between the two approaches in the sense that the macroscopic loses important individual information but its description is amenable whereas the microscopic view focuses on the particular nodes but has an exponential state-space on the number of nodes. Efforts to analyze the Markov model and simplify the computation needed to check the steady-state of this large state space model have also been investigated in [18]. In [16] it is first computed the probability that each node is infected by any neighbors before computing relationships between the parameters that render a full infection or a disease-free network.
An environment aware epidemic spreading model and immune strategy in complex networks
2015, Applied Mathematics and ComputationCitation Excerpt :The SIR model is a cornerstone model in epidemic spreading modeling where each individual in a population can be in one of three different compartments. There are extensive studies on the epidemic spreading in networks based on the SIR model [7–10]. In this paper, we focus on epidemic models of the susceptible-infectious-susceptible SIS type [11–20].