Abstract
Human social interactions tend to vary in intensity over time, whether they are in person or online. Variable rates of interaction in structured populations can be described by networks with the time-varying activity of links and nodes. One of the key statistics to summarize temporal patterns is the inter-event time, namely the duration between successive pairwise interactions. Empirical studies have found inter-event time distributions that are heavy-tailed, for both physical and digital interactions. But it is difficult to construct theoretical models of time-varying activity on a network that reproduce the burstiness seen in empirical data. Here we develop a spanning-tree method to construct temporal networks and activity patterns with bursty behavior. Our method ensures any desired target inter-event time distributions for individual nodes and links, provided the distributions fulfill a consistency condition, regardless of whether the underlying topology is static or time-varying. We show that this model can reproduce burstiness found in empirical datasets, and so it may serve as a basis for studying dynamic processes in real-world bursty interactions.
Similar content being viewed by others
Introduction
Temporal networks have been recognized as a powerful tool to model complex systems with time-varying interactions1,2,3. A large body of literature concentrates on analyzing the activation dynamics of nodes and links in such networks. The inter-event time (the waiting time between two consecutive interaction events, IET) is a canonical measure of temporal patterns, and it is known to have profound effects on individual behavior4,5,6,7 and dynamical processes occurring on networks8,9,10,11,12. A variety of empirical datasets, such as email and mobile communications13,14,15, epidemic transmission16,17,18, and human mobility19,20, exhibit non-Poisson activity patterns, known as burstiness4,21,22. These IET patterns are characterized by periods of frequent activation interleaved with long periods of silence. Empirical networks often exhibit burstiness in both the activity of individuals (nodes) as well as interactions (edges)23,24,25.
It has proven difficult to construct synthetic temporal networks whose properties are similar to the bursty behavior seen in empirical temporal networks26. Previous approaches can be divided into two categories: structure-based modeling, and contact-based modeling. The former approach applies dynamical processes to static underlying topologies, such as random walks27,28, link dynamics29, and inhomogeneous Poisson processes30. For example, Barrat et al. used random itineraries on weighted underlying networks to generate time-extended structures with bursty behavior28. The latter approach uses a stream of contacts generated by certain realistic mechanisms, such as social appeal31, individual resource32, and memory33. For example, Perra et al. proposed the activity-driven model34, in which each node, isolated in the beginning, becomes active with a probability proportional to its own activity potential and forms links with other nodes. Several related models have been proposed based on the activity-driven framework35,36. Despite a large body of studies in constructing temporal networks, they usually fail to reproduce the same level of burstiness as empirical datasets, and they lack mathematical guarantees for the behavior of the synthetic network. These goals require a model to generate bursty behavior simultaneously in the activity of both nodes and links, while the level of burstiness in nodes and links is allowed to be easily modified in a reasonable parameter space.
In this study, we provide an analytical framework to systematically construct temporal networks on both static and time-varying underlying topologies. Our construction algorithm can reproduce the burstiness of both nodes and edges in four empirical datasets, including social interactions in rural Malawi, colleague relationships in an office building over two years, and friendship relations in a high school. The assumptions of our model can also be tested in the empirical datasets. Our construction thus serves as an efficient method to generate realistic temporal networks that can then be used to investigate dynamical processes (such as evolutionary dynamics, social contagion, or epidemics) on temporal networks.
Our approach to constructing temporal networks uses a spanning-tree method. Spanning trees are widely recognized as an important family of sparse sub-graphs since they tend to govern dynamical processes on full graphs37,38,39,40. For example, in social networks, the backbone of an aggregated communication topology is often constructed as the union of shortest-path spanning trees, on which information flows fastest39. As a result, a large portion of directed edges are bypassed by faster indirect routes in the tree. In studies of food webs40, spanning trees are defined as the flows from the environment to every species. The links in or out of the tree are denoted as ‘strong’ or ‘weak’ links, related to delivery efficiency or system robustness and stability.
Results
We introduce a spanning-tree method for constructing temporal networks on any underlying topology, which restricts the interaction pattern between pairs of individuals. The activity of every single node and link is a binary-state process, switching between active and inactive. We use inter-event time (IET) distribution, which measures the time intervals between consecutive activations, to quantify the activity patterns of nodes and edges.
Our method allows for both static and time-varying underlying topologies. The underlying topology represents physical limitations on pairwise interactions, where an interaction between two individuals is possible only when there is a link between them in the underlying topology. Here we first consider static underlying topologies, in which the activation dynamics on a given topology is much faster than the evolution of the underlying topologies, such as the time-varying traffic flow on a relatively stable road network. We consider three classes of topologies in order of increasing complexity: two-node topologies, tree topologies, and finally arbitrary structured topologies. After studying static topologies, we will subsequently consider cases when the underlying topology itself also changes over time.
Two-node systems
We begin with a basic unit of a networked system – a two-node system, which is composed of nodes x and y and a link z between them (see Fig. 1a). The nodes and edges are either active or inactive at each discrete time step. We assume that the state updating of x follows a renewal process \({\{{X}_{n}\}}_{n\ge 0}\) and assigns x a probability mass function F(Δt) as its target IET distribution (see Supplementary Information section 1). The random variable Xn equals 1 if x is active at time n, otherwise Xn = 0. Likewise for node y and edge z, which have respective target IET distributions G(Δt) and H(Δt), and respective renewal processes \({\{{Y}_{n}\}}_{n\ge 0}\) and \({\{{Z}_{n}\}}_{n\ge 0}\). The initial state of x, y, z is active (i.e., X0 = Y0 = Z0 = 1). The goal is to construct a two-node temporal network that satisfies the target IET distributions of x, y, and z.
By definition, we say that edge z is active when x, y are both active (i.e., Zn = XnYn). Furthermore, we assume that, given the trajectory of x until n, the probability of x being active at time n + 1 is independent of the trajectory of y until n, that is,
where X(n) is a random vector of length n + 1, equal to \({({X}_{0},{X}_{1},...,{X}_{n})}^{{{{{{{{\rm{T}}}}}}}}}\). The vector X(n) records the whole history of states of x through time n, and so does Y(n). Given these assumptions, we can show that when all targeted distributions are identical (i.e., F = G = H) the system must be completely synchronous, that is, all of x, y, z are either active or inactive at each time step (see Supplementary Information section 2).
Given the state of the first n times (from time 0 to n − 1), the conditional probability that node x is active at time n is given by
where \({{{{{{{{\bf{w}}}}}}}}}_{x}^{(n-1)}={({w}_{x}^{(0)},...,{w}_{x}^{(n-1)})}^{{{{{{{{\rm{T}}}}}}}}}\in {\{0,1\}}^{n}\) records all historical states of node x before time n, called x’s trajectory, and \(m=\max \{k\le n:w_x^{(k)}=1\}\) represents the last activation time of x. Analogous conditional probabilities apply to y and z, and it is straightforward to show that each element of \({{{{{{{{\bf{w}}}}}}}}}_{z}^{(n-1)}\) equals the product of the corresponding elements of \({{{{{{{{\bf{w}}}}}}}}}_{x}^{(n-1)}\) and \({{{{{{{{\bf{w}}}}}}}}}_{y}^{(n-1)}\).
We propose an algorithm to construct two-node temporal networks such that the IET distributions of x, y, z will match the desired targeted distributions F, G, H and the desired total time duration ttol. At each time step t = n + 1 (0 ≤ n ≤ ttol − 1), we calculate four probabilities with Eq. (2),
These four probabilities represent the conditional probabilities for the four possible states of nodes x and y, given the previous states of nodes x and y (i.e., \({{{{{{{{\bf{w}}}}}}}}}_{x}^{(n-1)}\) and \({{{{{{{{\bf{w}}}}}}}}}_{y}^{(n-1)}\)). Specifically, p1 represents the probability that edge z is active at time t = n + 1; p2 (or p3) represents the probability that z, y are inactive but x is active; p3 represents the probability that z, x are inactive but y is active; and p4 represents the probability that x, y, z are all inactive at time t. Next, we determine the state of x and y at t, in order. The probability that x is active is \({p}_{x}({{{{{{{{\bf{w}}}}}}}}}_{x}^{(n)},1)\). If x is active, the probability of y being active is \({p}_{1}/{p}_{x}({{{{{{{{\bf{w}}}}}}}}}_{x}^{(n)},1)\). Otherwise, the probability becomes \({p}_{3}/(1-{p}_{x}({{{{{{{{\bf{w}}}}}}}}}_{x}^{(n)},1))\). Finally, we update the trajectory of z by the relation \({w}_{z}^{(t)}={w}_{x}^{(t)}{w}_{y}^{(t)}\). The construction stops when t = ttol. Algorithm 1 in Supplementary Information outlines the above procedure. It is worth noting that the activation order of x and y does not affect the IET distributions of x, y, z.
Although the algorithm is specified for an arbitrary combination of target IET distributions (F, G, H), these distributions must satisfy an implicit condition in order to guarantee the consistency of the construction. For example, if the target distributions specify that the link z is activated more frequently than the nodes x and y, then no construction is possible, because the link is active only when both nodes are active. This would result in at least one of the probabilities pi (i = 1, 2, 3, 4) in Eq. (3) being less than 0 during the construction. We say that the combination (F, G, H) of target distributions is consistent if pi (i = 1, 2, 3, 4) belong to [0, 1] for all possible trajectories \({{{{{{{{\bf{w}}}}}}}}}_{x}^{(n)}\) and \({{{{{{{{\bf{w}}}}}}}}}_{y}^{(n)}\) with any length n. When a two-node system is consistent, the algorithm is well-defined, and it ensures that the IET distributions of x, y, z will satisfy the targets F, G, H, respectively (see Supplementary Information section 2).
Tree systems
The construction for two-node systems can be naturally extended to tree systems, which consist of a number of interconnected two-node systems (Fig. 1b). We randomly select a node as the root r and classify the remaining nodes (i.e., leaves) according to their distance from r. We choose a desired target IET distribution for each node and link. At each time step, we first determine the state of r, which is only related to its own trajectory. Then, every leaf one step away from r (a1 and a2 in Fig. 1b) forms a two-node system with r, and the states of these leaves are determined by Algorithm 1. Next, all leaves one step away from r form two-node systems with their corresponding leaves two steps away from r [(a1, b1) and (a2, b2) in Fig. 1b]. Analogously, the states of all leaves are updated within a two-node system in order of their distance from r. Algorithm 2 in Supplementary Information summarizes this procedure.
This procedure requires an additional assumption of conditional independence – that for a pair of two-node systems sharing a node, if the state of the common node is given then the activity of the other two nodes is independent. As shown in Fig. 1b, we present two examples, (r, a1, a2) and (r, a1, b1), fulfilling this condition. The former indicates that the activity of nodes with the same distance from r (i.e., a1, a2) is independent given the state of their common node (i.e., r), which is closer to the root. The latter indicates that the activity of a node (i.e., b1) is not affected by the node that is more than one step away (i.e., r), given the state of the intervening node (i.e., a1).
It is straightforward to show that a tree system is consistent if all two-node systems in the tree are consistent. When a tree system is consistent, the IET distribution of every single node/link generated by this construction is guaranteed to match its corresponding target distribution (see Supplementary Information section 2).
Spanning-tree based construction
For any static (but arbitrary) underlying topology, we can always find a spanning tree (Fig. 1c). A link is called a trunk if it is in the spanning tree, and it is called a branch otherwise. In our construction, we first randomly select a spanning tree and the root of the tree, and then choose a target IET distribution for each node and trunk. Next, we execute Algorithm 2 on the spanning tree, so that all nodes and trunks will update their states to achieve the targeted IETs. The state of each branch is then active when the nodes on both ends are active. As a result, the activity of the entire system is determined by its spanning tree. Algorithm 3 in Supplementary Information summarizes this procedure. We say that the system is consistent when its spanning tree system is consistent.
Synthetic temporal networks
To test our algorithm, we construct temporal networks with one of two activity patterns—bursty activity patterns and Poisson activity patterns. Bursty patterns arise when there is a simultaneous bursty activity in node and links activity, and Poisson pattern arises in settings such as bank queuing systems41 and spreading dynamics42. In particular, we choose target IET distributions of nodes and trunks that are power-law distributions for bursty activity patterns, given by
And we choose discrete exponential distributions for Poisson-like activity patterns, given by
where Δt represents the inter-event time and α the exponent. The respective survival functions are given as
with exponent α − 1 and
with exponent α.
In the main text, we focus on a simple case when all nodes (trunks) have a common exponent αpmf (βpmf), and we use the aggregated IET distribution21,22,23, which counts the IETs of all nodes or links, to quantify the intensity of activity. In Supplementary Information, we also consider the IET distributions of every single node and link (Supplementary Fig. 1) and we investigate the relationship with the aggregated IET distributions. We also explore a more general case in which the exponents of nodes and trunks are sampled independently from a distribution (Supplementary Fig. 2).
We begin our analysis by constructing temporal networks with bursty activity patterns. We derive a necessary and sufficient condition for system consistency, which applies to any network length ttol (see Methods Eq. (14) and Supplementary Information for details). As examples, we consider two pairs of exponent setups, (αpmf, βpmf) = (2.00, 1.90) and (αpmf, βpmf) = (1.80, 1.30), and we execute Algorithm 3 over two classes of static underlying topologies, Barabási-Albert scale-free networks43 and Watts-Strogatz small-world networks44. Figure 2a shows the aggregated IET distributions of nodes and links. For both underlying topologies and both parameter setups, the probability mass functions \({\mathbb{P}}({{\Delta }}t)\) and the corresponding survival functions \({\mathbb{P}}(T > \, {{\Delta }}t)\) are well fit by power-law distributions, showing simultaneous burstiness in nodes and links. The best-fit exponent for nodes matches the exponent of the target IET distribution, and the exponent for links is slightly lower than the target exponent, due to the impact of branches (edges outside the spanning tree, where the algorithm is guaranteed to work).
Next, we construct temporal networks with Poisson-like activity patterns. If the target distributions for nodes and trunks are Poisson distributions, then we can prove that the system is never consistent (see Supplementary Information section 2). However, it is possible to construct consistent systems when the target IET follows discrete exponential distributions. In this case, we derive a necessary and sufficient condition for system consistency—namely, that the difference of αpmf and βpmf lies in \([0,\ln 2]\), meaning that the activity of nodes must be more frequent than links but not too frequent (see Methods and Supplementary Information for details). Figure 2b shows the aggregated IET distributions along with the exponents of the target distributions (αpmf, βpmf) = (2.50, 2.00) and (1.80, 1.30). All the distributions follow the expected exponential decay.
Comparing the results for the two topologies, we find that the exponents produced by the algorithmic construction are sensitive to the choice of target IET distribution, but are stable to the choice of network topology. To examine this observation more generally, we investigated a wide range of random regular underlying topologies with different average degrees, ranging from 5 to the well-mixed case (i.e., each node linked to all other nodes, see Supplementary Figs. 3 and 4). We find that we can robustly match target IET distributions across all these topologies: the relative deviation between the largest and smallest exponent in algorithmically constructed networks is within 4%.
We can understand why the algorithmic construction for producing a desired IET distribution is not significantly dependent on topology by analyzing the activity of branches. In particular, we prove that the IET distribution of every single branch is approximately a power-law distribution (respectively a discrete exponential distribution) in bursty activity patterns (respectively Poisson-like activity patterns) with uniform upper and lower bounds related only to the target distributions (see Supplementary Information section 3). This is also why the performance of our method is stable with respect to the choice of spanning tree (Supplementary Fig. 5).
Empirical temporal networks
We tested the ability of our algorithm to reproduce the burstiness of activity patterns observed in four empirical datasets, collected by the SocioPatterns collaboration. These four datasets record pairs of face-to-face interactions from different social contexts, ranging from a village in rural Malawi, to an office building and a high school in France. Each dataset is comprised of contact events with timestamps, represented by triplets (t, i, j)—indicating the occurrence of an interaction between individual i and individual j at time t.
It is worth noting that the empirical data record only the communication moments, so that only the active nodes with at least one active neighbor can be detected. In other words, the empirical data are observations of the inter-communication times (ICTs), rather than the IETs of nodes. Nevertheless, we demonstrate that the ICT distribution of single nodes converges exponentially to the IET distribution as the number of neighbors on the underlying topology increases (see Supplementary Information section 4). Since empirical datasets often originate from highly connected populations, the ICT distributions approximate the statistical properties of the corresponding IET distributions.
Before applying our algorithm, we first test whether the assumptions underlying the algorithmic construction are consistent with the empirical datasets. The assumption that the activity of nodes and links is a renewal process is reasonable, compared to the empirical data (Supplementary Fig. 6). However, the strong form of the conditional independence (Eq. (1)) assumed by our construction is rejected for the empirical data (Supplementary Fig. 7). Nonetheless, the empirical data satisfy a weaker form of conditional independence (Supplementary Fig. 8, see Supplementary Information section 5 for details).
After pre-processing the datasets (see Methods), we obtain four empirical temporal networks with population sizes ranging from N = 84 to N = 327 and length from ttol = 7, 375 to ttol = 43, 436 time-steps. For all of these temporal networks, the empirical ICT distributions of nodes and links both exhibit heavy tails, with different decay rates, showing simultaneous burstiness in activity. We fit these empirical ICTs with power-law distribution (Eq. (4)) by maximum likelihood estimation45,46, and we use the fitted distributions as targets for constructing synthetic temporal networks. Figure 3 shows the comparison between the empirical and algorithmically constructed ICT distributions of nodes and links. Our algorithm successfully replicates the qualitative patterns of burstiness observed in empirical datasets. Supplementary Fig. 9 shows the comparison between the IET and ICT distributions of nodes. Since the average degree of these empirical underlying topologies is large, the IET distribution collapses onto the ICT distribution.
Combination with network evolution
Although some underlying topologies are static, a variety of real-world systems also exhibit topology changes over timescales that are comparable to the activation dynamics on the network. For example, in online social networks, new users can enter the network and engage in new interactions with existing users; or users can switch between online and offline states. As a consequence, temporal changes in activity originate not only from the states of existing nodes and links, but also from the addition and subtraction of nodes and links in the underlying structure. In these cases, the underlying topology (i.e., physical limitations on interactions) is no longer static, but time-varying.
With this as a backdrop, we extend our algorithm from static to dynamic underlying topologies, starting first with networks that grow in size. We introduce a new model that combines our algorithm for constructing temporal networks with the Barabási-Albert model43, which we call the temporal Barabási-Albert model. The construction process is as follows. An underlying topology is initialized with m0 nodes, and the spanning tree is selected randomly. At each time step, the activity state of the existing network updates once with Algorithm 3, then one adds a new node with m ≤ m0 links connected to m different existing nodes following the preferential attachment rule43. All the newly added elements are set to be active, and the states of the older pre-existing elements are updated accordingly. The spanning tree is then updated by adding the new node and a link randomly selected from m new links. At some time point, the underlying topology stops growing, and the construction process continues with g ≥ 0 more steps on the final state of the underlying topology. Figure 4a shows a schematic illustration of the above procedure. Figure 4b shows numerical simulations of the temporal Barabási-Albert model in bursty and Poisson-like activity patterns. We find that the IET distributions of nodes and links are stable with respect to the duration time g, which means that the activity pattern is established during the evolution of the underlying topology, and it is then preserved after the topology is fixed.
Aside from overall growth in system size, some systems change underlying topologies without increasing in size, but rather by changes in the links between individuals, even if the total number of links is stable over time. We show that our model is also applicable in this case (see Supplementary Figs. 10 and 11). In addition to changing the location of edges, nodes, and links may also be removed over time, due to aging or other recessionary impacts, which is a counterpart of system growth; a straightforward example is the reverse process of the temporal Barabási-Albert model.
To model these various kinds of network evolution, we have developed a more general procedure for constructing temporal networks on time-varying underlying topologies (see Supplementary Information Algorithm 4). The key to this algorithm is to update the spanning tree in accordance with the evolution of the underlying topology.
Topology of aggregated static networks
In addition to bursty in inter-event times, real-world temporal networks exhibit several other characteristic and distinguishing features28,47. One important feature, distinct from the IET distribution, is the topology of the weighted network generated by integrating snapshots of activity over time. In particular, we can consider the weighted network produced by aggregating active nodes and edges from time t = 1 to time t = tagg (Fig. 5a). The aggregated network is weighted, and we characterize its topology by considering the distribution of weighted node degree, which is a generalization of the node degree distribution.
Our algorithm for constructing a temporal network with desired IET distributions also can reproduce the stationary property of the associated weighted node degree distribution. In particular, if the node degree distribution of the (unweighted) static underlying topology follows d(x), and if all links have the same activity pattern specified by parameter β, then for a sufficiently large aggregation time tagg we can prove that the weighted node degree distribution produced by our algorithm will satisfy
Here v(β) is a function of the parameter β that governs activity patterns (see Supplementary Information section 7 for detailed derivations). Equation (8) shows that, when the underlying topology is a scale-free network (i.e., d(x) follows a power-law distribution), then \({p}_{{t}_{agg}}(x)\) will also follow a power-law distribution with the same exponent as d(x), regardless of the aggregation duration tagg. Figure 5b shows an example of this general mathematical result in the case of a Barabási-Albert scale-free underlying topology.
For an arbitrary (unweighted) node degree distribution d(x), we can still find a normalization method such that the aggregated distribution is insensitive to the duration tagg. The normalization proceeds as follows: First, an aggregated network of aggregation time tbase is selected as the baseline. Then for any aggregated network of aggregation time tagg > tbase, we multiply tbase/tagg by each node strength. When tbase is sufficiently large, the normalized survival function for any tagg > tbase will collapse onto the survival function for tbase (see Supplementary Information section 7 for detailed derivations). We have verified this result on a network with a small-world topology (Fig. 5c).
Finally, we have applied this normalization procedure to the aggregated activity patterns of the four empirical datasets shown in Fig. 3. This analysis verifies that our construction of temporal networks to match empirical IET distributions also matches the stationary property of the weighted node degree in empirical data (Supplementary Fig. 12).
Discussion
Simple models that neglect temporal variation in individual behavior do not suffice to describe the dynamics of many real-life complex systems. A large and growing body of studies suggest that state switching of individuals and interactions plays a significant role in diverse dynamical processes, such as face-to-face communication25, evolutionary dynamics12,48, and network control49. We have proposed an analytical framework and corresponding spanning-tree method to construct temporal networks with specific activity patterns, including bursty and Poisson-like activity patterns. Unlike prior constructions of temporal networks in the literature5,35,36, our algorithm is able to reproduce the simultaneous burstiness of both nodes and edges observed in empirical datasets, from diverse social contexts (Supplementary Fig. 13).
The central ingredient in our construction algorithm—the spanning tree—has been widely recognized as a significant feature in both theoretical50,51,52 and real-world applications of network science53. For example, in path-finding algorithms such as Dijkstra’s algorithm54 and the A* search algorithm55, the shortest paths from a given source node to all other nodes, together with the source node, form a shortest-path tree. These algorithms are widely used in mobile robot covering problems56, for tracking the establishment of oil pipelines57, and for vehicle routing58. The tree structure is the backbone of these networked systems. Other examples include telecommunication networks, including the Internet, where the Spanning Tree Protocol59 and Augmented tree-based routing60 are used to avoid routing loops, to solve the scalability problem, and gain resilience against node failure and link instability. In social networks, spanning tree-based algorithms have been proven effective in detecting communities, one of the most widely studied issues in network science61. Thus our spanning tree-based method for generating specific activity patterns might have implications in several areas of application, which remain to be investigated.
Our analysis of activity patterns on different underlying topologies shows that the algorithmic IET distribution of nodes or edges does not significantly depend on the underlying topology, for a given spanning tree. This result indicates that the macroscopic activity pattern of a general network can be largely determined by the dynamics of its key components, such as its spanning tree. Branches from the spanning tree will cause only small perturbations to the activity pattern, regardless of their number and location, akin to the effects of ’weak links’ in food webs40. As a result, we can construct a temporal network with a desired consistent activity pattern, even if the underlying topology is not precisely known, or even changing in time.
Another straightforward way to measure the burstiness and memory of temporal networks is to calculate the burstiness parameter26 and the auto-correlation function (see Supplementary Information section 8). A larger burstiness parameter means a higher level of burstiness, and a lower absolute value of the auto-correlation function means a weaker dependence on memory. Our results show that our synthetic bursty activity patterns have strong auto-correlation and a positive and high burstiness parameter, while the Poisson-like activity patterns are memoryless and have a negative burstiness parameter (Supplementary Tables 1 and 2, Supplementary Fig. 14).
The past ten years have shown increasing interest in understanding the effects of group interactions and higher-order interactions62,63,64,65,66, meaning behavioral activities that are not limited to just pairs of individuals. A recent study has shown that higher-order interactions in empirical datasets display similar bursty behaviors to pairwise interactions67. And so a natural extension of this work is to study the activity of higher-order interactions in temporal networks. Our approach may provide a method to decompose networks into several elementary components, analogs of spanning trees in the context of hyper-graphs, which remains a direction for future research on the temporal dynamics in groups of interacting agents.
Methods
Mathematical formalization
Here we provide a mathematical model of the two-node temporal network construction, which is a stochastic process \({\{{S}_{m}\}}_{m\ge 0}\) coupling the activity of every unit. Complete mathematical details about the existence of \({\{{S}_{m}\}}_{m\ge 0}\) and the modeling of other systems are provided in the Supplementary Information.
We follow the notation in the Two-node systems section. According to the constraint Zn = XnYn, we construct a stochastic process \({\{{S}_{m}\}}_{m\ge 0}\), which for arbitrary sets of \({t}_{1},...,{t}_{k}\in {\mathbb{N}},k\in {{\mathbb{Z}}}^{+}\) satisfies
and S0 = S1 = 1. Here \({\mu }_{{X}_{{t}_{1}},...,{X}_{{t}_{k}}}\) represents the finite dimensional distribution of \({\{{S}_{m}\}}_{m\ge 0}\) at the time slice (t1,...,tk). \({\{{S}_{m}\}}_{m\ge 0}\) can be viewed as composing of the following sequence
and Zn = S2nS2n+1. \({\{{S}_{m}\}}_{m\ge 0}\) follows the activation order in the main text (i.e., the state of x is determined first). If we exchange the order, the corresponding indexes in Eq. (9) and the sequence of Xn and Yn in Eq. (10) are also swapped.
System consistency
The consistency of the two-node system is equivalent to the existence of \({\{{S}_{m}\}}_{m\ge 0}\). If \({\{{S}_{m}\}}_{m\ge 0}\) is well-defined, the algorithmically produced IET distributions of x, y, z will satisfy the target distributions F, G, H.
We derive the equivalence of the consistency condition for bursty and Poisson-like activity patterns in a two-node system. Let \({p}_{x}^{(n)}={p}_{x}({{{{{{{{\bf{0}}}}}}}}}^{(n-1)},1)\) denote the conditional probability that x is active for the first time at n, where
is a trajectory with length m and only one active state occurring at the initial time. For a power-law distribution with exponent α,
and for a discrete exponential distribution with exponent α,
From the definition of the distribution consistency, the equivalence is given as
for bursty activity patterns and
for Poisson-like activity patterns. Note that these consistency conditions ensure that the algorithm works for any length ttol.
Construction of empirical temporal networks
We generate an unweighted underlying topology \({{{{{{{\mathcal{S}}}}}}}}\) and a temporal network \({{{{{{{\mathcal{T}}}}}}}}\) for each empirical dataset. We first determine the length of \({{{{{{{\mathcal{T}}}}}}}}\) by counting the number of timestamps in the dataset. Then, the snapshot at time t is formed by all contact events with the corresponding timestamps. Finally, we obtain \({{{{{{{\mathcal{S}}}}}}}}\) by aggregating all snapshots, that is, link (i, j) exists on \({{{{{{{\mathcal{S}}}}}}}}\) if individuals i and j interact at least once.
Data availability
All the empirical datasets used in this paper are freely and publicly available at http://www.sociopatterns.org.
Code availability
Code has been deposited into the publicly available GitHub repository at https://github.com/anzhisheng/Temporal-networks-by-spanning-trees68.
References
Holme, P. & Saramäki, J. Temporal networks. Phys. Rep. 519, 97–125 (2012).
Holme, P. Modern temporal network theory: a colloquium. Eur. Phys. J. B 88, 1–30 (2015).
Masuda, N., Lambiotte, R. A guide to temporal networks (World Scientific, 2016).
Karsai, M. et al. Bursty human dynamics (Springer, 2018).
Karsai, M., Kaski, K., Barabási, A.-L. & Kertész, J. Universal features of correlated bursty behaviour. Sci. Rep. 2, 1–7 (2012).
Gernat, T. et al. Automated monitoring of behavior reveals bursty interaction patterns and rapid spreading dynamics in honeybee social networks. Proc. Natl. Acad. Sci. USA 115, 1433–1438 (2018).
Choi, S. H. et al. Individual variations lead to universal and cross-species patterns of social behavior. Proc. Natl. Acad. Sci. USA 117, 31754–31759 (2020).
Karsai, M. et al. Small but slow world: How network topology and burstiness slow down spreading. Physical Review E 83, 025102 (2011).
Jo, H.-H., Perotti, J. I., Kaski, K. & Kertész, J. Analytically solvable model of spreading dynamics with non-Poissonian processes. Physical Review X 4, 011041 (2014).
Lambiotte, R., Tabourier, L. & Delvenne, J.-C. Burstiness and spreading on temporal networks. The European Physical Journal B 86, 1–4 (2013).
Mancastroppa, M., Vezzani, A., Muñoz, M. A. & Burioni, R. Burstiness in activity-driven networks and the epidemic threshold. Journal of Statistical Mechanics: Theory and Experiment 2019, 053502 (2019).
Li, A. et al. Evolution of cooperation on temporal networks. Nat. Commun. 11, 1–9 (2020).
Onnela, J.-P. et al. Structure and tie strengths in mobile communication networks. Proc. Natl. Acad. Sci. USA 104, 7332–7336 (2007).
Malmgren, R. D., Stouffer, D. B., Motter, A. E. & Amaral, L. A. N. A Poissonian explanation for heavy tails in e-mail communication. Proc. Natl. Acad. Sci. USA 105, 18153–18158 (2008).
Malmgren, R. D., Stouffer, D. B., Campanharo, A. S. L. O. & Amaral, L. A. N. On universality in human correspondence activity. Science 325, 1696–1700 (2009).
Vazquez, A. Polynomial growth in branching processes with diverging reproductive number. Phys. Rev. Lett. 96, 038702 (2006).
Vazquez, A., Racz, B., Lukacs, A. & Barabasi, A.-L. Impact of non-Poissonian activity patterns on spreading processes. Phys. Rev. Lett. 98, 158702 (2007).
Unicomb, S., Iñiguez, G., Gleeson, J. P. & Karsai, M. Dynamics of cascades on burstiness-controlled temporal networks. Nat. Commun. 12, 1–10 (2021).
Song, C., Koren, T., Wang, P. & Barabási, A.-L. Modelling the scaling properties of human mobility. Nat. Phys. 6, 818–823 (2010).
Schläpfer, M. et al. The universal visitation law of human mobility. Nature 593, 522–527 (2021).
Barabasi, A.-L. The origin of bursts and heavy tails in human dynamics. Nature 435, 207–211 (2005).
Vázquez, A. et al. Modeling bursts and heavy tails in human dynamics. Phys. Rev. E 73, 036127 (2006).
Karsai, M., Kaski, K. & Kertész, J. Correlated dynamics in egocentric communication networks. PLoS One 7, e40612 (2012).
Saramäki, J. & Moro, E. From seconds to months: an overview of multi-scale dynamics of mobile telephone calls. The European Physical Journal B 88, 1–10 (2015).
Génois, M. & Barrat, A. Can co-location be used as a proxy for face-to-face contacts? EPJ Data Sci. 7, 1–18 (2018).
Goh, K.-I. & Barabási, A.-L. Burstiness and memory in complex systems. Europhys. Lett. 81, 48002 (2008).
Starnini, M., Baronchelli, A., Barrat, A. & Pastor-Satorras, R. Random walks on temporal networks. Phys. Rev. E 85, 056115 (2012).
Barrat, A., Fernandez, B., Lin, K. K. & Young, L.-S. Modeling temporal networks using random itineraries. Phys. Rev. Lett. 110, 158702 (2013).
Holme, P. Epidemiologically optimal static networks from temporal network data. PLoS Comput. Biol. 9, e1003142 (2013).
Hiraoka, T., Masuda, N., Li, A. & Jo, H.-H. Modeling temporal networks with bursty activity patterns of nodes and links. Phys. Rev. Res. 2, 023073 (2020).
Starnini, M., Baronchelli, A. & Pastor-Satorras, R. Modeling human dynamics of face-to-face interaction networks. Phys. Rev. Lett. 110, 168701 (2013).
Aoki, T., Rocha, L. E. C. & Gross, T. Temporal and structural heterogeneities emerging in adaptive temporal networks. Phys. Rev. E 93, 040301 (2016).
Vestergaard, C. L., Génois, M. & Barrat, A. How memory generates heterogeneous dynamics in temporal networks. Phys. Rev. E 90, 042805 (2014).
Perra, N., Gonçalves, B., Pastor-Satorras, R. & Vespignani, A. Activity driven modeling of time varying networks. Sci. Rep. 2, 1–7 (2012).
Ubaldi, E., Vezzani, A., Karsai, M., Perra, N. & Burioni, R. Burstiness and tie activation strategies in time-varying social networks. Sci. Rep. 7, 46225 (2017).
Le Bail, D., Génois, M. & Barrat, A. Modeling framework unifying contact and social networks. Phys. Rev. E 107, 024301 (2023).
Newman, C. M. & Stein, D. L. Spin-glass model with dimension-dependent ground state multiplicity. Phys. Rev. Lett. 72, 2286 (1994).
Barabási, A.-L. Invasion percolation and global optimization. Phys. Rev. Lett. 76, 3750 (1996).
Kossinets, G., Kleinberg, J., Watts, D., The structure of information pathways in a social communication network. In: Proceedings of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 435–443 (2008).
Garlaschelli, D., Caldarelli, G. & Pietronero, L. Universal scaling relations in food webs. Nature 423, 165–168 (2003).
Ross, S. M. et al. Stochastic processes (Wiley New York, 1996).
Barthélemy, M., Barrat, A., Pastor-Satorras, R. & Vespignani, A. Velocity and hierarchical spread of epidemic outbreaks in scale-free networks. Phys. Rev. Lett. 92, 178701 (2004).
Barabási, A.-L. & Albert, R. Emergence of scaling in random networks. Science 286, 509–512 (1999).
Watts, D. J. & Strogatz, S. H. Collective dynamics of ’small-world’ networks. Nature 393, 440–442 (1998).
Clauset, A., Shalizi, C. R. & Newman, M. E. J. Power-law distributions in empirical data. SIAM Rev. 51, 661–703 (2009).
Alstott, J., Bullmore, E. & Plenz, D. powerlaw: a Python package for analysis of heavy-tailed distributions. PLoS One 9, e85777 (2014).
Gautreau, A., Barrat, A. & Barthélemy, M. Microdynamics in stationary complex networks. Proc. Natl. Acad. Sci. USA 106, 8847–8852 (2009).
Sheng, A., Li, A. & Wang, L. Evolutionary dynamics on sequential temporal networks. PLoS Comput. Biol. 19, e1011333 (2023).
Li, A., Cornelius, S. P., Liu, Y.-Y., Wang, L. & Barabási, A.-L. The fundamental advantages of temporal networks. Science 358, 1042–1046 (2017).
Wang, X., Wang, X. & Wilkes, D. M. A divide-and-conquer approach for minimum spanning tree-based clustering. IEEE Trans. Knowl. Data Eng. 21, 945–958 (2009).
Xiao, F. & Wang, L. State consensus for multi-agent systems with switching topologies and time-varying delays. Int. J. Control 79, 1277–1284 (2006).
Xiao, F. & Wang, L. Asynchronous consensus in continuous-time multi-agent systems with switching topology and time-varying delays. IEEE Trans. Automat. Contr. 53, 1804–1816 (2008).
Parsakhoo, A. & Jajouzadeh, M. Determining an optimal path for forest road construction using Dijkstra’s algorithm. J. For. Sci. 62, 264–268 (2016).
Dijkstra, E. W. A note on two problems in connexion with graphs. Numer. Math. 1, 269–271 (1959).
Hart, P. E., Nilsson, N. J. & Raphael, B. A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Man. Cybern. 4, 100–107 (1968).
Gabriely, Y. & Rimon, E. Spanning-tree based coverage of continuous areas by a mobile robot. Ann. Math. Artif. Intell. 31, 77–98 (2001).
Baeza, D., Ihle, C. F. & Ortiz, J. M. A comparison between ACO and Dijkstra algorithms for optimal ore concentrate pipeline routing. J. Clean. Prod. 144, 149–160 (2017).
Imran, A., Salhi, S. & Wassan, N. A. A variable neighborhood-based heuristic for the heterogeneous fleet vehicle routing problem. Eur. J. Oper. Res. 197, 509–518 (2009).
Braem, B., Latre, B., Moerman, I., Blondia, C., Demeester, P. The wireless autonomous spanning tree protocol for multihop wireless body area networks. In: 2006 Third Annual International Conference on Mobile and Ubiquitous Systems: Networking & Services, 1–8 (2006).
Caleffi, M., Ferraiuolo, G., Paura, L. Augmented tree-based routing protocol for scalable ad hoc networks. In: 2007 IEEE International Conference on Mobile Adhoc and Sensor Systems, 1–6 (2007).
Basuchowdhuri, P., Anand, S., Srivastava, D. R., Mishra, K. & Saha, S. K. Detection of communities in social networks using spanning tree. Adv. Comput. Netw. Inform. 2, 589–597 (2014).
Mayfield, M. M. & Stouffer, D. B. Higher-order interactions capture unexplained complexity in diverse communities. Nat. Ecol. Evol. 1, 1–7 (2017).
Paul, S., Haldar, S., von Malottki, S. & Heinze, S. Role of higher-order exchange interactions for skyrmion stability. Nat. Commun. 11, 1–12 (2020).
Battiston, F. et al. The physics of higher-order interactions in complex systems. Nat. Phys. 17, 1093–1098 (2021).
Alvarez-Rodriguez, U. et al. Evolutionary dynamics of higher-order interactions in social networks. Nat. Hum. Behav. 5, 586–595 (2021).
Lambiotte, R., Rosvall, M. & Scholtes, I. From networks to optimal higher-order models of complex systems. Nat. Phys. 15, 313–320 (2019).
Cencetti, G., Battiston, F., Lepri, B. & Karsai, M. Temporal properties of higher-order interactions in social networks. Sci. Rep. 11, 1–10 (2021).
Sheng, A., Su, Q., Li, A., Wang, L. & Plotkin, J. B. Constructing temporal networks with bursty activity patterns. Temporal-networks-by-spanning-trees 10, 5281 (2023).
Ozella, L. et al. Using wearable proximity sensors to characterize social contact patterns in a village of rural Malawi. EPJ Data Sci. 10, 46 (2021).
Génois, M. et al. Data on face-to-face contacts in an office building suggest a low-cost vaccination strategy based on community linkers. Netw. Sci. 3, 326–347 (2015).
Mastrandrea, R., Fournet, J. & Barrat, A. Contact patterns in a high school: a comparison between data collected using wearable sensors, contact diaries and friendship surveys. PLoS One 10, e0136497 (2015).
Acknowledgements
A.S. acknowledges support from the China Scholarship Council (no. 202206010147). A.L. and L.W. acknowledge support from the National Key Research and Development Program of China (no. 2022YFA1008400), National Natural Science Foundation of China (no. 62036002 and 62173004), and the Beijing Nova Program (Z211100002121105). Q.S. acknowledges support from Shanghai Pujiang Program (no. 23PJ1405500). J.B.P. acknowledges support from the John Templeton Foundation (grant number 62281).
Author information
Authors and Affiliations
Contributions
Conceptualization: A.S., A.L., L.W., and J.B.P.; Methodology: A.S.; Analysis and interpretation of data: A.S., Q.S., A.L., L.W., and J.B.P.; Writing the manuscript: A.S., Q.S., A.L., L.W., and J.B.P.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Sheng, A., Su, Q., Li, A. et al. Constructing temporal networks with bursty activity patterns. Nat Commun 14, 7311 (2023). https://doi.org/10.1038/s41467-023-42868-1
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41467-023-42868-1
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.