We consider stochastic, individual-level susceptible–infected–susceptible models for the spread of disease, opinion, or information on dynamic graphs and hypergraphs. We set up “snapshot” models where the interactions at any time are independently and identically sampled from an underlying distribution that represents a typical scenario. In the hypergraph case, this corresponds to a new Gilbert-style random hypergraph model. After justifying this modeling regime, we present useful mean field approximations. With an emphasis on the derivation of spectral conditions that determine long-time extinction, we give computational simulations and accompanying theoretical analysis for the exact models and their mean field approximations.
Humans typically interact in groups, not just in pairs. Moreover, interactions may vary over time. For these reasons, it has recently been argued that the spread of information, opinion, or disease should be modeled over dynamic graphs or hypergraphs rather than a fixed graph. The use of hyperedges naturally allows for a nonlinear rate of transmission in terms of both the group size and the number of affected group members. In the context of opinion dynamics, an individual may be affected differently if multiple members of the same group (such as a workplace or household) express a view than if the same number of contacts from different groups express that view; this is an example of a majority effect. Similarly, in the spread of a disease, having multiple infected contacts in the same group may lead to a different infection rate than having the same number of contacts across independent groups. In this work, we develop and study mathematical models for processes that spread over graphs and hypergraphs, and we consider the case where interactions vary over time, allowing for the dynamic nature of typical encounters in, for example, offices, schools, retail and leisure outlets, public transport, and entertainment events. Our overall aim in this work is to develop new mathematical models, derive useful conditions that predict when a process (such as a disease) will die out, and to test our theory with computational experiments.
I. INTRODUCTION
We consider a susceptible–infected–susceptible (SIS) disease spread on a dynamically evolving graph, where the dynamic edges represent interactions between individuals in a population over time. We also consider a generalization to the case where a disease spreads on a dynamically evolving hypergraph, where individuals interact in groups of size larger than two. Several previous works have considered SIS spreading on a dynamically evolving graph.1–12 There, some general conditions were found, which guarantee that the disease will vanish asymptotically. However, in several of those works, these conditions require full exact knowledge of the dynamic graph evaluated at all times. In this work, we motivate and study the case where the dynamic graph is a sequence of i.i.d. random graphs, sampled from a static underlying expected graph, and we show how this assumption allows us to derive simple and practical vanishing conditions. Based on a mean field approximation, we find that, in this setting, the spread of the disease on the underlying expected graph provides an accurate description of the spread of the disease on the dynamically evolving graph. We provide both numerical evidence and theoretical analysis to support this observation. We then extend our investigation to the case of a dynamically evolving hypergraph. There too, we proceed via a mean field approximation, in order to derive a static hypergraph on which the spread of the disease is accurately predicted. We illustrate this approximation through numerical simulations.
The main contributions of this paper can be summarized as follows:
We compare two different models of an SIS disease spreading on a (fixed or dynamic) graph and identify the one, which is more amenable for extension to the hypergraph case. In particular, we formulate and justify a new model, (18), for the spread of disease over a dynamic hypergraph.
We propose mean field approximations (14), (17), (20), and (22) to these exact models and illustrate their accuracy via numerical experiments. We also show that these mean field approximations provide spectral conditions, which, if satisfied, guarantee the asymptotic vanishing of the disease in the population—see Theorems V.3 and V.4 and the discussion in Sec. VI.
We contribute further to the theoretical analysis by estimating the difference between the infection rate of dynamic and static exact and mean field models—see Lemma 5.8.
In developing the new dynamic hypergraph model, in Sec. III B 1, we set up and analyze a hypergraph analog of the classical Gilbert random graph model.
As mentioned in more detail in Section II B, concepts and results in this area are relevant to many scenarios concerning the spread of information, opinion, or disease; however, to be concrete, we describe the models and analysis in the language of epidemiology.
II. REVIEW OF PREVIOUS MODELS FOR THE SPREAD OF AN SIS DISEASE
A. SIS on static graphs
We first consider a population of individuals for which we have a nonnegatively weighted, undirected graph represented by a symmetric matrix that characterizes pairwise affinity. Here, represents the strength of the connection between and and, therefore, will be used when we quantify the likelihood of transmission of the infection. In this graph setting, it is natural to have no self-loops; that is, for , but we note that self-loops will arise when we consider flattening of a hypergraph—see the discussion after Definition 2.3.
The SIS modeling framework places every individual in exactly one of two categories: susceptible or infected. Associated with these categories are a parameter , which quantifies the overall virulence of the disease, and a parameter , which quantifies the recovery rate. We will assume throughout that recovery of an infected individual is independent of the state of the system.
In describing various SIS models, to avoid an excess of notation, we will use to denote both the exact probability that individual is infected at time , according to a discrete- or continuous-time process, and an approximation to this quantity arising from, for example, a mean field assumption. By referring to specific models, we hope that the precise meaning of is clear at each point in the paper.
In the literature, there are two main approaches to modeling an SIS disease spreading on a graph. One common approach, initiated in Ref. 13, considers the parameters and to be, respectively, the probability that an infected individual infects a neighbor during one unit of time and the probability that an infected individual recovers from the disease during one unit of time. One can then derive a model as follows. Let denote the time between two consecutive steps of the process. The probability that node is susceptible at time can be expressed as the probability that it was infected at time but recovered at time , plus the probability that it was susceptible at time and did not get infected by any neighbor at time . This gives the following equation for all :
In Ref. 13, spectral conditions were found, which concern the asymptotic vanishing of the disease. These conditions were derived by linearizing the system, keeping only first order terms, yielding
We could also move to a continuous-time setting by subtracting , dividing by and taking the limit , yielding
We note that (2) may be viewed as an Euler approximation to (3). Use of (1) or (2) or (3) may be regarded as a mean field approach, where we directly consider the probabilities for the nodes to be infected, rather than keeping track of the individual states of the nodes themselves.
Analyzing the linearized model (2) with , it was shown in Ref. 13 that the disease asymptotically vanishes; that is, for all , we have if , where denotes the spectral radius. Hence, may be viewed as a graph-level analog of the classical basic reproduction number.
The authors of Ref. 14 consider an alternative approach based on Markov chains. There, we regard the state of each individual as a stochastic process taking values in , with for susceptible and for infected. To this two-state valued process, we associate a rate of the transition matrix, where the transition rates between and are given as follows. If , the rate of infection is given by
Here, in a very similar manner to (2), the overall chance of a new infection is taken to be linearly proportional to the number of currently infected neighbors using the affinity weights. If , the rate of recovery is given by . Thus, for every , the stochastic process satisfies the Markov property. It is not a Markov process; however, the rates of infection are random variables. In order to use Markov theory to analyze the model further, the authors in Ref. 14 effectuate a mean field approximation by considering instead the expected infection rate , where We can now associate with the process the transition rate matrix
which makes into a continuous-time Markov process. Using Markov theory for continuous-time Markov processes (e.g., Chap. 10 in Ref. 15), we can then deduce that satisfies the differential equation
Let us note that (5) is very similar to the linearized model in (3), but for the factor, which, when multiplied with , induces some second order terms. It is argued in Ref. 14 how the simplification in Ref. 13 of (1) to the linear system (2) does not provide a rigorous mean field approximation of the underlying exact processes . Nonetheless, we are primarily interested, in this paper, in the derivation of sufficient spectral conditions to guarantee the asymptotic vanishing of the disease. To this end, it is sufficient to consider a linear ODE, which dominates the processes in order to find sufficient spectral conditions. We note furthermore that the spectral vanishing conditions found in Ref. 13 were identical to those found in Ref. 14.
B. SIS on static hypergraphs
Another important difference to note between (1) and (5), which is of particular relevance when we wish to capture higher-order interactions between individuals, is that only the Markov chain approach (5) naturally extends to a hypergraph setting. Indeed, the rate of infection defined in (4) does not restrict us to pairwise interactions. The model in (1) on the other hand, via the product term in the equation, directly uses the assumption that individuals interact pairwise, an assumption that ceases to hold in the hypergraph setting. Thus, previous works, which studied epidemic spreading on hypergraphs (e.g., Refs. 16–20), consider a Markov chain approach, extending model (5). We refer to Refs. 21–23 for further details of recent work on deterministic and stochastic models for dynamics on hypergraphs.
To set up our hypergraph regime, we begin with some definitions.
Let be a finite set, and let be a set of subsets of . We call the tuple a hypergraph, where denotes the set of nodes and denotes the set of hyperedges.
In particular, if all hyperedges have size two, then the hypergraph is a standard graph with nodes and edge set . From now on, let and .
Given a hypergraph with and , the incidence matrix is such that for every , if node belongs to hyperedge and otherwise.
Given a hypergraph and incidence matrix , we define the weighted clique expansion matrix . Here, records the number of hyperedges containing both nodes and .
We note that in the graph case, where two nodes can be involved in at most one edge, the off-diagonal elements of the clique expansion matrix reduce to those of the affinity matrix and the diagonal elements of contain the node degrees—these diagonal entries may be interpreted as weighted self-loops.
In Ref. 16, the authors introduced a nonlinear function according to which individuals within a hyperedge may propagate the disease in a nonlinear fashion; here, the likelihood for an individual to become infected is not linearly proportional to the number of infected neighbors. Similar models were further investigated in Refs. 17 and 18. The introduction of the nonlinear function marks a significant departure from the linearity assumption that is used in typical graph-based models, and it allows us to capture features, such as the majority effect24 in opinion dynamics and the viral load effect25 in disease spreading. We refer to Refs. 16–20 for further justification, noting that there is particular interest in the collective suppression case,19,20 where the function is assumed to be concave, and the collective contagion case,17,18,26 where a virus spreads in a hyperedge only if at least a threshold number of individuals in the hyperedge are infected. Given any such function , we can define the rate of infection of a node by
In the special case of a graph, the rate in (4) is recovered when is the identity map. As in the graph setting, we wish to make the rates deterministic in order to apply Markov theory to this process, yielding a mean field approximation model. Two mean field approximations have been proposed and studied in Refs. 17, 19, and 20. In Refs. 19 and 20, spectral conditions were found that guarantee the asymptotic vanishing of an SIS disease spreading on a hypergraph for the different mean field models. One of the insights of Ref. 20 is that the two mean field models, while having slightly different vanishing conditions, provide very similar approximations of the exact model. Hence, we shall only focus on one of the two models, the behavior of the other mean field model being conjectured to provide comparable approximations. We consider the mean field approximation obtained by replacing the infection rate (6) with a deterministic rate involving the processes given in to obtain
This ensures that is a Markov process, and as in the graph setting, we can apply Markov theory to find an ODE system for . We have
This mean field approximation and the exact model were studied in Theorems 6.5, 8.1, and 9.1 of Ref. 19 where it was found that the disease asymptotically vanishes if
where is a constant depending on the choice of [for instance, if is concave, is a valid choice].
We note that the internal sum in (6) runs from to and, therefore, includes . Removing the term from this sum would not have any effect since the infection rate for node is only relevant when node is uninfected; that is, . However, when we move to mean field models, such as (7), removing the term from the sum would make a difference. In this work, in keeping with previous works, we use the full sum, and we note that computational tests suggest that specifying produces very similar results.
C. SIS on dynamic graphs
We are interested in analyzing an SIS disease spread on dynamically evolving graphs and hypergraphs. Several settings for dynamic graphs have been investigated.
In Refs. 1–3, 5–8, 27, and 28, the setting consists of a dynamic graph generated from a finite number of graphs, a typical example being a periodic graph , where there exists such that for each , Then, and in other cases where the dynamic graph is generated by finitely many graphs, a spectral condition for the vanishing of the disease was given as
In Ref. 8, the authors derive spectral conditions for the asymptotic vanishing of an SIS disease spreading on a dynamic graph under various assumptions ensuring that the dynamic graph is generated by finitely many affinity matrices . They argue that a vanishing condition can be found to be generally related to a weighted average of the spectral radii of the finitely many matrices generating the dynamic graph, the weights being proportional to the frequency of occurrence of each affinity matrix in the dynamic evolution of the graph. For instance, if the graph is periodic, cycling through each affinity matrix one by one following a fixed order, the vanishing condition they derive is given by
We note that the authors in Ref. 8 claim that this sufficient condition can be replaced by the more compact condition
However, since it is not true that the sum of the spectral radii is bounded above by the spectral radius of the sum, but rather that it is bounded below by the spectral radius of the sum when the matrices are Hermitian (the spectral radius then being a norm), which is the case here, we do not see how (11) arises.
From (10), we may derive a simple spectral vanishing condition that was also obtained in Theorem of Ref. 6,
In general, we note that the vanishing conditions derived in these works require full exact knowledge of the dynamic graph, which is not a realistic assumption in many settings.
Alternatively, one can model a dynamic graph as a family of random graphs indexed by time. This is the approach considered in Refs. 4 and 9–11, and the relationship between discrete- and continuous-time network propagation is discussed in Ref. 29. In Ref. 10, the random edges of the graphs evolve according to a Markov process. There, the authors argue that the spectral vanishing condition provided by the static aggregated graph, for which the affinity matrix can be regarded as the long-time average of the affinity matrices of the random graphs, is less informative about the disease-free state of the process than another condition proved in Theorem of Ref. 10. This may suggest, although this was not tested by the authors of Ref. 10, that the mean field approximation induced by the static aggregated graph does not provide an accurate prediction of the exact dynamic model. This observation is an interesting contrast but is not in contradiction with the results of this paper, where we show that the mean field model induced by the static underlying expected graph (which could be regarded as the analog of the static aggregated graph) provides an accurate approximation of the exact dynamic model in a different dynamic setting (see Secs. III A 2 and V and Fig. 1), and where the associated spectral vanishing condition is sharp.
Dynamic snapshot graph computation. Proportion of infected individuals in the population after and time step for various values of . Here, the blue crosses represent the exact model, averaged over runs, and the red asterisks represent the mean field approximation. The green vertical line represents the expected spectral threshold for extinction of the disease.
Dynamic snapshot graph computation. Proportion of infected individuals in the population after and time step for various values of . Here, the blue crosses represent the exact model, averaged over runs, and the red asterisks represent the mean field approximation. The green vertical line represents the expected spectral threshold for extinction of the disease.
III. SETTING AND MAIN RESULTS
A. Dynamic graphs
We define our dynamic graph with a different approach to Refs. 1–3 and 5–8. Similarly to Refs. 4 and 9–11, we suppose that the dynamic graph is generated by random graphs. The main difference in our setting is that we assume independence of the random graphs from one time step to the other. We assume the existence of a static underlying expected graph, from which we sample at each time step, identically and independently, a new random sample matrix to represent the interactions of the individuals of the population. Intuitively, the expected graph contains information about all potential interactions a person may have over that time period (of a time step), each interaction carrying a probability weight proportional to the likelihood of this interaction occurring. To simulate a typical day (or some other relevant time period), we, therefore, draw a random sample using the expected graph, which yields random interactions between individuals based on the expected potential interactions, which could occur. We will refer to this as a snapshot modeling regime for the dynamic interactions.
1. A Gilbert graph model
Let be the affinity matrix of the static underlying expected graph. In practice, in order to build synthetically, we will draw the entries of at random, after which they will be treated as fixed in the model. We assume that is a real symmetric matrix, and for all , . It is reasonable to assume that interactions are sparse in any time period; e.g., we do not expect that a person has an equal probability to visit any place in a city, but rather that they will focus a small number of places, typically in a limited neighborhood. To keep sparse, we use a Gilbert graph model. Recall the Gilbert graph distribution , where every (undirected) edge of a random graph on nodes, has independent probability to exist.30 We can view as a sparsity parameter, tuned as a function of , which allows us to control the expected degree of each node, , and to ensure that the generated graph does not have too many connections, which could also make related computations too costly to perform. Let such that , and let
The dynamic graph is then generated as an i.i.d. sequence of random graphs, sampled independently and identically from as follows. Letting be the time domain, for each , we sample independently if , and we let if . Informally, we toss a biased coin, with bias determined by , to decide whether the undirected edge is created. We set for all . This gives us a dynamic graph . We summarize this construction by writing that each random graph was sampled independently as . In particular, if all the entries of are equal to , then . To each node , we associate a stochastic process , where . In practice, is assumed to be discrete, while may be discrete or continuous but must contain as a subset. We can naturally extend the definition of to the possibly larger time domain , where for all , letting , we let
2. Mean field approximations
Motivated by (4), in this dynamic setting, we consider the infection rate of the process to be
This rate may be approximated as before by
where , from which we derive the following ODE system to approximate the expected processes:
In a discrete-time setting, for instance, with constant time increment equal to , we have the corresponding recurrence
This last model, (15), is studied in previous work on dynamic graphs.8 In Theorems V.3 and V.4, we show that , where is a random sample independent from , is sufficient to ensure that , almost surely (a.s.) for all in the continuous case (14) and the discrete case (15), respectively.
yielding the following ODE system for the associated mean field approximation in a continuous-time setting:
This approximation has the advantage that it summarizes the spread of the disease using a static graph. Such models are better understood (see Sec. II A), and it is known that if , then the disease vanishes asymptotically. From a computational point of view, running a simulation of the spread of a disease on a dynamically evolving graph can be very costly when we work at the scale of a whole city, with a very high number of nodes and interactions. The mean field approximation (17) suggests that we can obtain an accurate prediction of the disease evolution by considering the spread on a static graph, understood as the underlying expected graph of the model, where weighted edges represent the probabilities for an interaction between two individuals to occur. This mean field model, therefore, provides us with an efficient computational method to simulate the spread of disease when the dynamically changing graph is too large to handle directly.
We compare in Sec. V the spectral vanishing conditions and the infection rates associated with the two mean field models (14) and (17).
Under the assumption that the sparsity parameter satisfies , we show in Lemma 5.8 that for a random sample , we have , and we show in Lemma 5.7 that where .
In Sec. IV, we verify numerically that the mean field model (17) induced by provides us indeed with an accurate approximation of the behavior of the exact processes , thus allowing us to approximate our exact model with a disease spreading on a static graph. We do not show the other mean field approximation (14) in the figures below since the results were visually indistinguishable from those with the more simple mean field model (17).
B. Dynamic hypergraphs
As discussed in Sec. II, modeling the spread of an SIS disease via a Markov process provides us with a more flexible setting, where we can consider interaction within a hyperedge, i.e., where individuals can interact in groups of size larger than two and contaminate each other in a nonlinear fashion. This more general and realistic setting has already been studied in various works16,17,19,20,22,26,31 in the case where the higher-order structure remains static in time.
Here, we investigate instead the setting where the disease spreads on a dynamically evolving hypergraph. This poses an important prior problem: which model should we use to generate a random hypergraph? Indeed, based on the various requirements, one may want to impose on the hypergraph (hyperedges sizes, degree distributions, etc.), various models can be used. Here, we develop what we feel is a natural extension of the Gilbert graph model that we used in Sec. III A 1 to generate the random graphs.
1. A Gilbert hypergraph model
Recalling that represents the number of nodes (i.e., the number of individuals in the population), we now regard as the targeted number of hyperedges (i.e., the number of places where individuals can interact). We will assign nodes at random to each available hyperedge.
This definition is similar in construction to the Gilbert graph model. For instance, if , the incidence matrix of a random hypergraph in corresponds to the affinity matrix of a random directed graph in The motivation to use this model is similar to the intuition behind the model described in Sec. III A at the graph level. We assume that each individual has a list of potential places to visit on any given day, with a certain probability. Drawing a new random incidence matrix independently and identically at each time step simulates a typical day of people visiting places in their neighborhood.
Just as in Sec. III A 1, it is more realistic here to consider that the probabilities for a node to be in a hyperedge (i.e., for an individual to visit a place) vary for every pair so that visits can focus on a subset of locations. We also wish to keep the connections sparse. We, therefore, let , be a sparsity parameter, and set
We, therefore, consider a weighted incidence matrix , which, similarly to being the affinity matrix of the underlying expected graph in Sec. III A, can be thought of as the incidence matrix of the underlying expected hypergraph from which we sample independently and identically an incidence matrix at every time .
Our sampling procedure of from is similar to the sampling procedure of from in Sec. III A 1. At each time step and for each node and hyperedge , we draw independently We can observe that this model does not fix a specific configuration of hyperedges of various sizes, the size of a hyperedge being unknown a priori.
As in the graph case, we then consider the Markov processes , and we can naturally extend the time domain of to the possibly larger domain by letting for all , , where Following our discussion of hypergraph models in Sec. II, let be a nonlinear function representing the manner in which the virus spreads in a hyperedge and define the infection rate of a node at time by
Generating the random graphs in Sec. III A 1 as random Gilbert graphs sets all diagonal entries to . On the other hand, note that the sum index spans through all values in , including in (18). Assuming that , we recover the infection rate (12) of a dynamic graph, but the induced graph here would be given by ; hence, the diagonal entries would be nonzero, indicating the degree of each node instead. As discussed at the end of Sec. II B, we could, for instance, modify our infection rate (12) by restricting the inner sum to , leading to slightly different mean field models. Such a change was found to have negligible impact on the final plots in the numerical experiments in Sec. IV and would not affect the spectral vanishing conditions derived in Sec. V.
2. Comparison with the Gilbert graph model
Note that also induces a probability space on the set of weighted graphs with nodes. From Definition 2.3, given the incidence matrix of a hypergraph , there corresponds a graph represented by , which we could call the weighted clique expansion of the hypergraph. Every entry of this matrix is a random variable defined by
Thus, the entries of the induced affinity matrix take random values in . Little seems to be known about how the choice of the parameters in can affect properties of the induced random graph associated with . In practice, it is important to know, for instance, how the sparsity parameter can be tuned to control the expected degree of the nodes and ensure that the graph is connected with high probability. In the case of a random Gilbert graph, it is known that connectivity of the graph holds with high probability if for .32 One may ask whether knowledge about the well-studied properties of random Gilbert graphs leads to results about the random Gilbert hypergraphs described above and their induced random graph.
Let , where , and let be a random Gilbert graph.
By independence, we have
while . Turning to the variance, we have
while
Equating the expected values, which is equivalent to equating the expected nodal degree of the two random graphs, we would choose . Hence, we see that for an equal expected value, the variance of the entries of is larger than the variance of the entries of but remains finite and contained in . We may then argue heuristically that by equating the two expected degrees of the two graph models, the variance does not differ greatly; hence, the connectivity properties of the two graphs should remain similar. We have, therefore, chosen , for some , to sparsify the -induced graph while making sure that it remains connected with high probability. Let us emphasize that this is just a rule of thumb to derive a sensible value for the sparsity parameter and should not be regarded as a rigorous argument.
3. Mean field approximation
The function in (18) represents the nonlinearity of the infection rate: specifying how the probability for a node to get infected depends on the number of infected group members. A typical choice for is a concave function; e.g., or . Another classic choice is to consider a collective suppression model, where has the form , .
As in Sec. III A, we can consider a mean field approximation with the expected processes and the deterministic infection rate at node ,
yielding
Following Sec. III A, we propose to further approximate this rate of infection by substituting by its expected value for all , thus making the infection rate completely deterministic, yielding at node ,
which corresponds to the rate of infection for a disease spreading on a static hypergraph, a setting that was already studied in Refs. 16 and 19, yielding the ODE system
There, it was shown that this model satisfied a similar spectral condition for the vanishing of the disease to the graph-based model. Specifically, if , then for all , where . We check the accuracy of this mean field approximation in Sec. IV.
IV. COMPUTATIONAL EXPERIMENTS
A. Simulation algorithm for dynamic graphs
Let us first summarize our approach to simulating the exact individual-level SIS model and its mean field approximation on a dynamic graph. In the simulations, we chose . We used i.i.d. weights , where , sampled uniformly at random in , a sparsity parameter , and we let be i.i.d. random variables where with probability and otherwise. We then built the symmetric matrix , where . The sparsity parameter controls the amount of connectivity between the nodes of the graph. Choosing too small will make the graph disconnected, while choosing too large will make the graph behave like a complete graph, increasing the computational cost and failing to capture the levels of interaction that typically arise. We know from the study of random Gilbert graphs32 that the asymptotic connectivity threshold of these random graphs occurs at . Here, we choose so that the connectivity threshold is satisfied even for small .
The weights of the matrix indicate the probability for any two individuals and in the population to meet at any given time . We let , where we choose the final time step to be so that at every time , we draw an i.i.d. random sample from , where is symmetric, and such that for every , with probability and otherwise.
We then proceed with a standard time discretization of the stochastic processes . We fix a small time step and advance from time to time at each iteration. As explained in Sec. II C, we extend the definition of over this finer time partition by setting , where We choose a vector of i.i.d. uniformly random values in , and for every node ,
- when , we set ifand set otherwise;
- when , we set ifand set otherwise.
In Sec. II C, we proposed a mean field model (17) to approximate and simplify the above exact individual-based model. This allows us to consider the spread of a disease on the static underlying expected graph from which we draw the random dynamic graph , a setting which is well-understood and investigated in previous works (see Sec. II A). We simulated this system of ODE using Euler’s method with time step and tested numerically how accurately it matches the behavior of the exact process described above.
B. Simulation algorithm for dynamic hypergraphs
We simulated the exact individual-level SIS model on a dynamic hypergraph similarly, following Sec. III B. We chose nodes, hyperedges, and following the heuristic in Sec. II B and our choice of in Sec. IV A, we chose the sparsity parameter as . We then created the incidence matrix . As in Sec. IV A, we chose i.i.d. weights sampled uniformly at random in . Then, we let with probability and otherwise, and we let for all
As in the graph setting, we then discretized the stochastic processes with time step The construction of the processes is the same than in Sec. IV A; therefore, we do not repeat it here.
C. Computational results
1. Dynamic graphs
In these simulations, we fixed the recovery parameter to and varied the value of the infection parameter , taking all the values in . The plots in Fig. 1 show the proportion of infected individuals after a large time as a function of the infection rate parameter . The blue crosses represent the proportion of infected individuals given by the exact model, averaged over runs. The red asterisks represent the proportion of infected individuals predicted by our mean field model (17). We observe from Fig. 1 that our mean field model (17) provides a very accurate approximation of the exact model. The vertical line in Fig. 1 intersects the abscissa at . In the case where an SIS disease is spreading on a fixed graph with affinity matrix , represents a threshold value in the sense that if , then the disease vanishes asymptotically from the population (e.g., Refs. 14 and 33). Here, the mean field model is defined on a fixed graph with affinity matrix ; hence, we can expect that the vertical line in Fig. 1 serves as a threshold value for extinction of the disease, i.e., that the red asterisks will be set to for but not necessarily for . On the other hand, there is no such theory available to analyze SIS diseases spreading on dynamic graphs (blue crosses in Fig. 1). We observe nonetheless that due to the close approximation of the exact model by the mean field model (17), can also serve as a useful threshold value for extinction for the exact model spreading on the dynamic graph .
2. Dynamic hypergraphs
We also find that the mean field model (22) provides an accurate approximation of the exact individual-based model induced by (18), as shown in Figs. 2–4. Here, as in Sec. IV C 1, we fixed the recovery parameter to and varied the value of the infection parameter , taking all the values in . The plots show the proportion of infected individuals as a function of after a large time . The blue crosses represent the proportion of infected individuals given by the exact model, averaged over runs. The red asterisks represent the proportion of infected individuals predicted by our mean field approximation (22). For the nonlinear function , according to which the disease spreads in a hyperedge, we used (Fig. 2) and (Fig. 3). We also tested the collective contagion model, where we apply for edges, and for each hyperedge of size , we apply (Fig. 4). Here, we chose for all hyperedges of size . Choosing too large, e.g., , would prevent the disease from spreading in the hyperedge even for large values of unless the initial proportion of infected individuals is higher than , which would cause the plotted functions in Fig. 4 to remain flat. On the other hand, choosing too small would produce a collective contagion model similar to a linear graph-based contagion model. We can observe a discontinuity in the plots shown in Fig. 4, both for the mean field approximation and the exact model, indicating that the predicted long-time proportion of infected individuals in the population is not a continuous function of the infectiousness parameter, . This discontinuity is only observed in the case of collective contagion and contrasts with Figs. 2 and 3, where the nonlinear functions representing the rate of contagiousness in the hyperedges are, respectively, and , and where the plots appear to be continuous functions of . In the case of the collective contagion model, the nonlinear functions used to represent the contagiousness of the hyperedges are step functions, with sharply discontinuous changes of value. This implies that a small perturbation in the value of or can induce a large change of value in the resulting probability for node to get infected at time . By the construction of the exact model, or by the relation describing the mean field approximation (20), we, therefore, see that a small change in the value of can recursively induce a large change in the value of the and, hence, a large change in the final proportion of infected individuals. This effect is the same as the one inducing bistability and hysteresis found in Ref. 17 for the collective contagion model. The effect does not occur in Figs. 2 and 3, however, since the concave functions used in the models are smooth. The spectral vanishing condition in Fig. 4, represented by the green vertical line, is given by , where , with being the incidence matrix of the sub-hypergraph consisting only of hyperedges of size . We can observe that this condition is less sharp than those in Figs. 2 and 3, which are given by . A possible explanation for this difference is that and are concave functions, which can be dominated by a simple linear expression, . For the collective contagion analysis, we used the bound , which replaces discontinuous step functions by smoother concave functions and is likely to introduce greater inaccuracies. We leave for future work the issue of deriving better vanishing conditions for non-concave functions, such as those in the collective contagion model.
Dynamic snapshot hypergraph computation. Proportion of infected individuals in the population after and time step for various values of . Here, the blue crosses represent the exact dynamic hypergraph model, where the nonlinearity function is , averaged over runs, and the red asterisks represent the hypergraph mean field approximation. The green vertical line represents the expected spectral threshold for extinction of the disease.
Dynamic snapshot hypergraph computation. Proportion of infected individuals in the population after and time step for various values of . Here, the blue crosses represent the exact dynamic hypergraph model, where the nonlinearity function is , averaged over runs, and the red asterisks represent the hypergraph mean field approximation. The green vertical line represents the expected spectral threshold for extinction of the disease.
Dynamic snapshot hypergraph computation. Proportion of infected individuals in the population after and time step for various values of . Here, the blue crosses represent the exact dynamic hypergraph model, where the nonlinearity function is , averaged over runs, and the red asterisks represent the hypergraph mean field approximation. The green vertical line represents the expected spectral threshold for extinction of the disease.
Dynamic snapshot hypergraph computation. Proportion of infected individuals in the population after and time step for various values of . Here, the blue crosses represent the exact dynamic hypergraph model, where the nonlinearity function is , averaged over runs, and the red asterisks represent the hypergraph mean field approximation. The green vertical line represents the expected spectral threshold for extinction of the disease.
Dynamic snapshot hypergraph computation. Proportion of infected individuals in the population after and time step for various values of . Here, the blue crosses represent the exact dynamic hypergraph model with a collective contagion model of propagation in hyperedges, averaged over runs, and the red asterisks represent the hypergraph mean field approximation. The green vertical line represents the expected spectral threshold for extinction of the disease.
Dynamic snapshot hypergraph computation. Proportion of infected individuals in the population after and time step for various values of . Here, the blue crosses represent the exact dynamic hypergraph model with a collective contagion model of propagation in hyperedges, averaged over runs, and the red asterisks represent the hypergraph mean field approximation. The green vertical line represents the expected spectral threshold for extinction of the disease.
V. SUPPORTING ANALYSIS FOR THE DYNAMIC GRAPH CASE
In this section, we provide theoretical analysis to support the observations made in our numerical experiments. In previous works on disease spreading on dynamic graphs (Refs. 2, 7, and 8), the analysis focused on the discrete-time mean field approximation (15). We analyze this model and its continuous counterpart (14) with regard to our specific assumptions on the interaction dynamics. In Sec. V A, we derive spectral conditions, which guarantee the asymptotic vanishing of the disease in the population. A corresponding result for the hypergraph case is given in Sec. VI.
In Sec. V B, we provide a comparison between the two mean field approximations (14) and (17), in order to justify why their plots closely match numerically. The latter model has the advantage of considering a static graph , instead of a dynamic graph , leading to a more straightforward analysis, and as we have seen in Sec. IV, nonetheless provides an accurate prediction of the behavior of the exact model on a dynamic graph.
A. Spectral vanishing condition
Here, we derive spectral conditions, which guarantee the asymptotic vanishing of the disease for the mean field approximations (14) and (15). Since we focus on deriving sufficient conditions for the vanishing of the disease, it suffices to find such conditions on a simpler system that dominates the original version. This approach was also used in previous works, as described in Sec. II, where, for instance, the authors of Ref. 13 chose to linearize their ODE system to make it more amenable to analysis. To this end, we appeal to the following result from Ref. 20, which follows as a corollary from Ref. 34.
(Ref. 20)
We also use the following lemma.
Consider the model described in (14). For all initial conditions, if then a.s., for all , , where is a random sample independent from and identically distributed.
Note that there is nothing specific about constructing as a matrix of binomial random variables in the above proof; i.e., . A similar result holds for any other random matrix sampled with respect to a fixed expected matrix .
A similar argument yields to the same spectral vanishing condition in the discrete-time setting.
Consider the model described in (15). For all initial conditions, if , then a.s., for all , where is a random sample independent from and identically distributed.
B. Comparison of the mean field approximation models
It was numerically observed that the mean field approximation model in (14) and the more simple model proposed in (17) closely matched. In this section, we compare the two mean field models by relating their respective infection rates (13) and (16) and by comparing the vanishing spectral conditions found in each case.
Let us fix and . We are interested in comparing the infection rate in (13) given by , where , with the infection rate in (16) given by . It thus suffices to estimate the right hand side in
Let , where independently for all .
Note that estimating (29) is equivalent to estimating To this end, we shall make use of Hoeffding’s inequality, which states here that for all and all ,
Recall from Sec. II C that we build the weights of the underlying static graph as follows. We let , where we let be such that , a sparsity parameter to be chosen and where for all .
The following lemma is a direct application of Hoeffding’s inequality.
The condition in (30) is a natural requirement that applies to most models in practice. For instance, asking that the are uniformly bounded away from for all , which is natural for non-zero probability weights, implies (30). Our specific construction in Sec. IV, where for all , also satisfies this condition a.s.
From now on, we shall assume that condition (30) holds.
Recall that in Theorems V.3 and V.4, we have found the following spectral vanishing condition for the mean field approximation given by (14):
where is a random sample. On the other hand, the more simple mean field model proposed in (17) has the spectral vanishing condition
We can also compare these two spectral vanishing conditions, which comes down to comparing with .
VI. ANALYSIS FOR THE DYNAMIC HYPERGRAPH CASE
The mean field approximation in (22) was noted in Sec. III B to be similar to the model studied in Ref. 19. where a vanishing spectral condition was shown to be
where depends on the choice of the function .
We note furthermore that the mean field approximation in (20) can similarly be analyzed. Using Corollary 5.1, we can find a linear ODE system to dominate (20), given by
where is chosen such that for all , .
As noted in Ref. 20 for the collective suppression case, where is concave and , we may take , and for a collective contagion model of the form , we may take . In (31), we have . We will define , and likewise, Then, we can invoke Theorem 5.3, noting that the specific construction of there is not required and that any other random matrix construction yields the same result. Let , and let . By Theorem 5.3, if , then a.s. for all ,
VII. DISCUSSION
Interactions between individuals are typically structured but dynamic—at any given time, we may be likely to engage with a small subset of the population and very unlikely to engage with the rest. Our aim in this work was, therefore, to develop and analyze SIS spread in a snapshot-style dynamic graph framework that accounts for such interactions. Moreover, hyperedges can be used to capture the group-level interactions that take place in, for example, workplaces, schools, retail and leisure outlets, public transport, and entertainment events. We, therefore, extended the graph-based modeling and analysis to a new dynamic hypergraph setting.
The main take-home message from our work is that a useful spectral threshold for the infection rate parameter, below which infection dies out, can be expressed in terms of an overall static expected affinity matrix (or expected clique expansion in the hypergraph case). One implication is that computationally expensive, dynamic, and individual-level stochastic simulations can be replaced by cheaper deterministic mean field versions. A further implication is that in a practical scenario, we can draw useful conclusions by asking individuals about their expected, or typical, interactions—this type of information is much easier to gather than more detailed microscale descriptions.
In terms of future directions, we note that our work has focused on the fundamental question of disease extinction. It would also be of interest to study more general properties of these new dynamic models, for example, along the lines developed in Refs. 16, 17, 21, 22, 26, and 31 for the static hypergraph case. With access to appropriate real data, it would, of course, be of interest to develop methods to calibrate model parameters, compare functional forms of the infection rate, and test the predictive power of the modeling frameworks.
ACKNOWLEDGMENTS
Both authors were supported by the Engineering and Physical Sciences Research Council under Grant No. EP/P020720/1, and D.J.H. was also supported under Grant No. EP/W011093/1.
AUTHOR DECLARATIONS
Conflict of Interest
The authors have no conflicts to disclose.
Author Contributions
Desmond John Higham Conceptualization (equal); Formal analysis (equal); Investigation (equal); Methodology (equal); Writing – original draft (equal); Writing – review and editing (equal). Henry-Louis de Kergorlay: Conceptualization (equal); Formal analysis (equal); Investigation (equal); Methodology (equal); Software (lead); Writing – original draft (equal); Writing – review and editing (equal).
DATA AVAILABILITY
Code for the experiments conducted for this work is available at https://www.maths.ed.ac.uk/∼dhigham/algfiles.html.