Introduction

Complex networks are the leading framework for understanding real-world complex systems, ranging from physical and nervous systems1, biological and chemical reactions2,3, to financial4 and social platforms5,6. The primary entities of a complex network are represented by nodes, whereas links indicate relationships or interactions among nodes. Despite the substantial advances in expressing and analyzing entities with simplex7, multiple8,9 or signed10,11 relationships across various systems, the temporal networks, which characterize the evolutionary process of dynamic systems12,13,14, call for an immediate solution to take into account the precise record when each interaction happens or perishes and analyze the underlying mechanisms that drive the emergence of such structural differences15.

Network comparison16,17, which aims to provide a principled answer to the seemingly simple question of how different two networks are, becomes notably challenging when applied to temporal networks18. One common approach is to aggregate a temporal network into a static one (Fig. 1a−c) and then use static network comparison methodologies19,20. In addition, Researchers have developed methods to compare snapshots of the same temporal network21,22. However, reducing temporal networks to static representations and comparing snapshots neglects the time-ordering of interactions, which can encapsulate rich and meaningful information, such as daily or circadian rhythms12,13. As a consequence, the corresponding comparison methods18,23,24,25,26,27 that are tailored to static networks, therefore, cannot fully capture the dynamical patterns. For example, as shown in Fig. 1, two distinctive temporal networks G1 (Fig. 1a) and G2 (Fig. 1b) have the same static network structure (Fig. 1c). The differences between G1 and G2 will be zero according to static network-based comparison methods. Therefore, to address this problem, it is essential to take into account temporal information to discern slight structural differences and crucial underlying dynamic patterns.

Fig. 1: Illustration of temporal dissimilarity characterization.
figure 1

a, b Visualization of two temporal networks G1 and G2, which share the same number of nodes N and window size T; c The aggregated static network of G1 and G2; d Temporal paths between nodes 1 and 2 in G1. eg Illustration of computing the dissimilarity between G1 and G2. Firstly, we compute the FAD matrix, i.e., the first arrival distance between node pairs, for G1 and G2, respectively. Here, we denote \({l}_{\max }(G)\) to be the maximal FAD among all first arrival paths in temporal network G. When a first arrive path does not exist between two nodes thus the two nodes are not reachable, the corresponding FAD is set as \({l}_{\max }(G)+1\). This happens in G1, and we have \({l}_{\max }({G}_{1})=2\). Secondly, the FAD distribution Hi of node i and \({\mu }_{{G}_{1}}({\mu }_{{G}_{2}})\) of the whole network are computed according to the FAD matrix. Finally, the temporal node dispersion (TNND) and temporal dissimilarity (TD(G1G2)) are given based on Eqs. (1) and (2).

In this work, we explore the first arrival distance (FAD) and spectral entropy based Jensen-Shannon divergence25,26,28 to characterize the dissimilarity of temporal networks (Fig. 1dg). Furthermore, we apply the derived measure to network classification and spreading dynamics to demonstrate its validity. To perform the analysis, we use both synthetic and real-world datasets to evaluate the effectiveness of the proposed measure in discriminating the differences between temporal networks. These detailed datasets allow us to examine the impact of time-varying interactions on diverse temporal paradigms with different network sizes and time scales.

Results

Temporal dissimilarity characterization

For a given temporal network G = (VE) in a time window [0, T], V represents the node set, and E = {(ijt), t [0, T], ij V} is the contact set. An element (ijt) indicates that there is a contact between nodes i and j at time step t. The number of nodes and temporal edges is given by N and C, respectively. The aggregated static network Gs of a temporal network G is the graph with the same node set and an edge between all pairs of nodes that have at least one temporal edge in E. The number of edges in the aggregated network Gs is denoted by M. In Fig. 1ac, we show examples of two temporal networks with five nodes and six timestamps, i.e., G1 and G2, and its corresponding aggregated static network.

A temporal path P in G is a node sequence \(P={\{{i}_{\nu }\}}_{\nu = 1}^{n+1}\), where (iνiν+1t) E for all ν [1, n]. The length of P, l(P), is defined as the number of contacts in the path. In this work, we shall base our temporal dissimilarity on the concept of first arrival paths, which can capture both topological and temporal proximity between nodes and has been shown to be an effective way to extract temporal network topology28. Given two nodes is and ig, we suppose the first time when is appears is ts. The first arrival path between nodes is and ig is the temporal path from is starting at ts that reaches ig the earliest. Meanwhile, we adopt the first arrival distance (FAD) as the length of the first arrival path between two nodes. The temporal paths between nodes 1 and 2 in G1 are shown in Fig. 1d, i.e., P1,  , P4. According to the definition of the first arrival path, we can obtain that P1 is the first arrival path between nodes 1 and 2, and thus the FAD value between them is l(P1) = 1.

We define the FAD distribution of node i as Hi = {hi(q)}, where hi(q) is the fraction of nodes with an FAD of q from i. There is exactly one node with an FAD of 0 to node i, namely, node i itself, as it can reach itself in zero time. Consequently, we have hi(0) = 1/N for every node i. To construct the FAD distribution for each node, we consider q starting from 1. We use \({l}_{\max }\) to denote the maximal FAD among all first arrival paths in a temporal network. If every node pair is reachable through a first arrival path in a temporal network, the dimension of Hi is \(1\times {l}_{\max }\). If there are node pairs in a network that are not reachable, we define the maximal FAD between reachable node pairs as \({l}_{\max }\) and the infinite FAD is defined as \({l}_{\max }+1\). In this case, the dimension of Hi is \(1\times ({l}_{\max }+1)\). The node specific FAD distribution Hi contains the connectivity heterogeneity of node i. Subsequently, we adopt the Jensen-Shannon divergence to characterize the connectivity heterogeneity of a temporal network based on FAD. The temporal network node dispersion (TNND) reads:

$${{{\rm{TNND}}}}(G)=\frac{J({H}_{1},{H}_{2},\cdots \,,{H}_{N})}{\log ({l}_{\max }+1)},$$
(1)

where \(J({H}_{1},{H}_{2},\cdots \,,{H}_{N})=\frac{1}{N}{\sum }_{i,q}{h}_{i}(q)\log ({h}_{i}(q)/{u}_{q})\) is the Jensen-Shannon divergence29. The term \({\mu }_{q}=\frac{1}{N}\mathop{\sum }_{i = 1}^{N}{h}_{i}(q)\) is the average over {h1(q), h2(q),  , hN(q)}. It represents the fraction of source-destination node pairs with FAD q. The average FAD distribution of a network, i.e., the probability distribution of the FAD of a random source destination pair, is given by μ = {μ1μ2,  , μk,  }. The dimension of μ is either \(1\times {l}_{\max }\) or \(1\times ({l}_{\max }+1)\). Generally, a larger TNND implies higher connection diversity among the nodes.

Finally, for two given networks G1 and G2, their temporal dissimilarity, TD(G1G2), reads

$${{{\rm{TD}}}}({G}_{1},{G}_{2})={\omega }_{1}\sqrt{\frac{J({\mu }_{{G}_{1}},{\mu }_{{G}_{2}})}{\log 2}}+{\omega }_{2}| \sqrt{{{{\rm{TNND}}}}({G}_{1})}-\sqrt{{{{\rm{TNND}}}}({G}_{2})}| ,$$
(2)

where TNND(G1) and TNND(G2) represent the temporal network node dispersion, and \({\mu }_{{G}_{1}}\) and \({\mu }_{{G}_{2}}\) are the average FAD distribution of G1 and G2, respectively. And ω1, ω2 [0, 1] (satisfying ω1 + ω2 = 1) are tunable parameters to measure the contribution of the average FAD distribution and TNND difference, respectively. For the sake of simplification, we use ω1 = ω2 = 0.5 in the following analyses unless otherwise specified. Generally, TD falls in [0, 1] and the larger TD is, the more dissimilar the networks will be. For the extreme cases, TD = 1 suggests the two networks are completely different from each other, and vice versa for TD = 0. The detailed procedure of computing the dissimilarity between two exampled temporal networks G1 (Fig. 1a) and G2 (Fig. 1b) is shown in Fig. 1e–g. For the two temporal networks, G1 and G2, which have the same number of nodes and timestamps, the dissimilarity between them, denoted as TD(G1G2) = 0.0569, indicates a relatively similar temporal structure. However, the dissimilarity value between them is zero based on static network comparison methods because they share the identical aggregated static network structure (Fig. 1c). Therefore, it is of vital importance and urgent necessity to consider network temporality when conducting the comparisons. Regarding computational complexity, we observe that the algorithm’s primary computational cost arises from calculating the first arrival paths between nodes, with a complexity of O(T (C + N)).

Comparisons on synthetic temporal networks

To verify the validity of the temporal dissimilarity (TD) metric, we perform comparisons on temporal synthetic networks. The objective is to explore whether the temporal dissimilarity could distinguish synthetic networks with different parameters/properties. The activity driven model30 (see Methods) is used to generate a collection of temporal networks \(G(F(a),m)={\{{G}^{t}\}}_{t = 0}^{T}\) via the tunable function F(a) and parameter m. The function F(a) controls the node activity distribution, and m determines the number of contacts that every active node releases at each discrete time step t. Larger m shall result in a temporal network with more contacts. The distribution of F(a) determines the heterogeneity of activation rates of nodes. In this work, we select two representative types of activity distribution, i.e., (i) the uniform distribution \(F(a)=1/{a}_{\max }\), for \(0\le a\le {a}_{\max }\le 1,\) where a is the active rate of a node and here we choose to use \({a}_{\max }=1\), and (ii) the power-law distribution F(a) = (r − 1)ar, where r > 2, 0 < a < 1.

Figure 2a shows the comparison results on synthetic temporal networks generated by the uniform activity distribution for different values of m. It indicates that the temporal dissimilarity tends to be small for the networks generated with similar m, suggesting that networks generated with similar m would be more akin to each other and vice versa. Comparatively, Fig. 2b shows the temporal dissimilarities of temporal networks generated by different heterogeneity parameters r. It shows that the temporal dissimilarity between temporal networks with closer r are inclined to be smaller, suggesting that networks with closer r tend to be similar. Here, the network size N is 300, and the time window size T is 30,000. We can also see similar patterns for different network sizes, time window sizes, as well as other parameters (see Figs. S1−S6 in Supplementary Note 1).

Fig. 2: Comparisons on synthetic temporal networks.
figure 2

a Temporal dissimilarity between synthetic networks generated by the activity driven model with node activity following the uniform distribution and different m. b Temporal dissimilarity TD between synthetic networks generated by the activity driven model with node activity following the power-law distribution and different r. Here, we set m = 3. Temporal dissimilarity TD between networks generated by the uniform activity distribution and those generated by a power-law activity distribution as a function of r when m is set as 3 and 5 for (c, d), respectively. Different curves indicate we choose different combinations of ω1 and ω2 for the calculation of temporal dissimilarity values. Here, each dissimilarity value in every sub-figure is the averaged over 100 realizations. The network size and time scale are set as N = 300, T = 30,000, respectively.

In addition to the analysis in the main text, we compare the temporal dissimilarities between networks derived from uniform and power-law distributions in Fig. 2c, d and also Figs. S7S9 in Supplementary Note 1. It shows that networks generated by the power-law activity distribution with a higher r are more similar to those generated by the uniform activity distribution. This is because a higher r can result in networks with more homogeneous activity distribution, hence are more similar to the networks generated by uniform activity distribution. These observations in synthetic networks suggest TD to be a powerful index to discriminate the synthetic temporal networks. Meanwhile, the different curves in the figures represent various combinations of ω1 and ω2, all of which exhibit similar trends: as r increases, networks generated by a power-law activity distribution become increasingly similar to those generated by a uniform activity distribution. This suggests that the dissimilarity between temporal networks is not significantly affected by the choice of weights, aligning with findings by Schieber et al.26 in their comparison of static networks. Consequently, we adopt ω1 = ω2 = 0.5 for most of the experiments.

Comparisons on real-world temporal networks

Here, we introduce 17 representative temporal networks31,32,33,34,35,36,37,38, including five email networks and 12 physical contact networks, to further validate the effectiveness of the proposed method (for details of datasets (Table 1), see Methods). We begin by comparing a temporal network with its aggregated static network. Given a static network, different from the temporal network, we alternatively use the shortest path distance distribution (\({H}_{i}^{s}=\{{h}_{i}^{s}(q)\}\), where \({h}_{i}^{s}(q)\) is denoted as the fraction of nodes that connect to i at shortest path distance q instead of FAD distribution. We then substitute the FAD distribution (Hi) by shortest path distance distribution (\({H}_{i}^{s}\)) in Eq. (1) for the aggregated static network, and then update Eq. (2) accordingly (see Supplementary Note 2 for details).

Table 1 Basic statistics of real-world temporal networks

The resulting dissimilarity between an empirical temporal network and its aggregated static network is shown in Fig. 3a. The nonzero value of the dissimilarity between a temporal network and its static counterpart suggests that insights and regularities may be overlooked when using a static network to address time-varying interactions, particularly if the rich temporal information is ignored.

Fig. 3: Comparisons on real temporal networks.
figure 3

a Dissimilarity between a temporal network and its aggregated static network. b Temporal dissimilarity between the original data and the temporal networks derived from null models. c Temporal dissimilarity between the original and perturbed temporal networks. f denotes the fraction of contacts added (f  > 0) or deleted (f < 0) from the original temporal network (f = 0). Each data point is averaged over 100 realizations. d, e Temporal dissimilarity between different daily divided sub-networks, e.g., sub1 and sub2 represent the temporal sub-networks of the first and second day, respectively. sub1-2 represents the cumulative temporal sub-network for the first two days. f The ratio of nodes and edges of different sub-networks. bf show comparisons on HS2013, for more results of other networks, see Figs. S11S13 in Supplementary Note 2.

Comparisons based on temporal null models

We compare each of the empirical temporal networks with their null models39,40,41, which are obtained by specific reshuffled methods (see Methods). For each null model, topological and temporal correlations are in various degrees of destruction (Table 2). For EWLSS, TS and URT, all topological correlations are preserved, while the temporal correlations are destroyed to different extents. For CM and RN, the temporal and topological correlations are both eliminated in varying degrees. Take HS2013 as an example, Fig. 3b shows that the temporal dissimilarities between the original temporal network and the null models are very small for EWLSS, while the dissimilarities are much larger for TS, URT, CM and RN. It can be found that, although TS only eliminates one more number of properties than EWLSS, it shall lead to higher dissimilarity as it destroys the temporal information (sorted sequence list on each link) other than static topology correlation (weight). Comparatively, even though RN discards the most number of properties, the resulting network does not show significantly different from that derived by CM, suggesting that degree-degree correlation may not be a primary factor in a time-varying environment. Similar patterns can also be found for other datasets in Fig. S11 in Supplementary Note 2.

Table 2 Properties that are preserved () and destroyed (✗) in the corresponding null models, including three topological properties, degree distribution (DD), static configuration (SC) and weight correlation (WR), and three temporal properties, global timestamp sequence (GTS), the sorted contact sequence list on each link (LCS) and the whole contact sequence (WCS)

Comparisons based on network perturbation and evolution

We then assess the discriminative ability of the proposed measure by network perturbation method. That is to say, for a given temporal network, we randomly add or delete a fraction of contacts (f) and then compare the differences. Figure 3c shows the temporal dissimilarity between the original data and gradually perturbed network for HS2013. The negative f corresponds to the deletion process, and vice versa. Large f indicates that more contacts are added (f > 0) or deleted (f  < 0), resulting in larger differences with respect to the original network (f = 0). Note that, for networks with many contacts (large C/N in Table 1), the disparity will even be reduced rather than increased, when adding new contacts (see Fig. S12 in Supplementary Note 2), suggesting that the ceiling effect42 of time-varying interactions governs the structural differences of temporal networks.

Furthermore, we examine the temporal dissimilarity from the perspective of network evolution. We divide a temporal network into sub-networks according to the time order of contacts. Take HS2013 for instance, we separate it into five distinct sub-networks where each contains all the contacts in one single day as the observation window is five days. We then use sub1 and sub2 to respectively represent the temporal sub-networks of the first and second day, and sub1-2 to represent the temporal sub-network of the first two days. Similar symbols are also described for other sub-networks. Figure 3d shows that, in general, sub-networks that are closer in time are more similar to each other, e.g., the temporal dissimilarity between sub1 and sub2 (TDsub1,sub2) is much smaller than those between sub1 and others. This is further enhanced in Fig. 3e that a sub-network that forms earlier is quite different from the whole temporal network (sub1-5) which cumulatively considers all the contacts. It is worth noting that, the short-term temporal dissimilarities (TDsub1,sub3 = 0.062 and TDsub2,sub3 = 0.059) are relatively high, indicating that temporal interactions have undergone subtle but noticeable changes in the short run. Figure 3f shows that, although the number of nodes (N) are the same in sub1-4 and sub1-5, the number of links (M) are still slightly different with each other, which can be further captured by our proposed temporal dissimilarity mesure (TDsub1-4,sub1-5 = 0.0036 in Fig. 3e).

Applications of temporal network comparison

Temporal network classification

In general, the 17 empirical temporal networks used in this work can be classified into four categories according to the contact type and venues where they were recorded (see Table 1). We first construct a dissimilarity matrix where each element represents the value of temporal dissimilarity of the corresponding two temporal networks (for the full matrix, see Table S1 in Supplementary Note 2). We then adopt multidimensional scaling map43 to show the distance between them in a geometric space (Fig. 4a). It shows that the four categories are spontaneously clustered into two major regions, upper right and lower left (gray shadow). In general, networks from the same category are more likely to be clustered geometrically in the two-dimensional space, except for EEU3 and ME, two essential email networks yet now are situated in the left corner with those of schools and conferences. To obtain a deep understanding, we further study the topological and temporal properties, including (i) link density; (ii) average node degree in the corresponding static networks; (iii) coefficient of variation of the node lifespan CVt), defined as the δΔt/ξΔt where Δt is the time difference of a node’s first and last occurrence, δ and ξ are respectively the standard deviation and mean; (iv) fraction of reachable node pairs via temporal paths (\(\tilde{R}=\frac{R}{N(N-1)}\), where R is the number of reachable node pairs and N is the number of nodes); and (v) fraction of nodes \({\tilde{N}}_{p}\) in an evolutionary time window [0, p*T], where p [0, 1]. Results in Fig. 4be show that the networks in the same region (gray shadowed or not) in Fig. 4a tend to have similar topological and temporal properties. It is observed that networks clustered in the upper region of Fig. 4a show low link density, average degree, \(\tilde{R}\) but high CVt), and vice versa for lower region (gray shadowed) in Fig. 4a. It also clearly shows that EEU3 and ME have similar topological and temporal properties with those of schools and conferences, which is additionally demonstrated by the evolutionary process of \({\tilde{N}}_{p}\) in Fig. 4f. This suggests that those two virtually connected data may have coincident interaction patterns with the physical contact networks.

Fig. 4: Temporal network classification and spreading dynamics.
figure 4

a Multidimensional scaling map of temporal dissimilarity between 17 empirical temporal networks. The colors represent different categories of networks in Table 1. be Topological and temporal properties of every empirical temporal network. Gray shadows indicate the same networks at the lower left corner in (a). Link density (b) and average node degree (c) of the aggregated static networks. Coefficient of variation of node lifespan (d) and fraction of reachable node pairs via temporal paths (e) for each temporal network. f The fraction of nodes as the function of network evolution (p). g Spreadability differences as the function of temporal dissimilarity between 17 temporal networks. h Pearson correlation between spreadability differences and temporal dissimilarity as the function of infection probability β.

Temporal network spreadability

The spreading process is one of the most important dynamics of complex networks44. Here, we conduct the Susceptible-Infected (SI) spreading process in temporal networks45. Initially, an arbitrary node i is randomly chosen as the infected seed (I-state), and all the remaining nodes are set as the susceptible individuals (S-state). The subsequent spreading process shall follow the time step of the contacts. That is to say, at every time step t [0, T], an I-state node will only infect its neighbors through the temporal contacts exactly existing at t with infection probability β. The spreading process comes to the end at time step T. The fraction of final infected nodes is averaged by setting every node as the seed: \(\langle I\rangle =\frac{1}{N}{{{\Sigma }}}_{i = 1}^{N}{I}_{i}\), where Ii is the final fraction of infected nodes by setting i as the seed. As a consequence, the spreadability difference can be immediately obtained as ΔI = IG1〉 − 〈IG2, where 〈IG1〉 and 〈IG1〉 are respectively the average fraction of final infected nodes of two temporal networks G1 and G2. Figure 4g shows the correlation between ΔI and temporal dissimilarity for every two temporal networks for β = 1. The Pearson correlation coefficient (PCC) is high at 0.919 (p < 0.0001). That is, in time-varying interaction structures, networks with close temporal dissimilarity tend to exhibit similar spreadability when the spreading probability β is equal to 1. Figure 4h further demonstrates that such correlation is becoming more and more obvious as β increases. Actually, when β = 1, the SI spreading process becomes deterministic, while for β < 1, the process is stochastic. Specifically, when β = 1, an infected node will infect all its neighboring nodes at each time step. Consequently, the SI spreading tree for β = 1 is identical to the first arrival tree when a given node is designated as the seed or source, as illustrated in Fig. S16 of Supplementary Note 2. In contrast, for β < 1, the spreading trees differ significantly from the first arrival tree, leading to a relatively lower correlation for β < 1, as shown in Fig. 4h. Despite the SI model, we also evaluate our method’s performance on other diffusion processes, such as the Linear Threshold (LT) model, within temporal networks. Figure S15 in Supplementary Note 2 presents the PCC values between diffusion differences using the LT model and temporal network dissimilarity across various time resolutions. All PCC values exceed 0.5, indicating a strong correlation.

Conclusion

In this work, we propose to use the first arrival distance (FAD) and spectral entropy based Jensen-Shannon divergence to characterize the temporal dissimilarity of temporal networks. To evaluate the proposed measure, we performed comprehensive analyses on both synthetic and empirical temporal networks. Experimental results show that the proposed temporal dissimilarity can successfully discriminate temporal networks known to have different structures. Furthermore, its good performance in temporal network classification and spreadability discrimination suggests that the proposed measure could be a good indicator of the functional differences of various temporal networks with various network sizes and time scales by detecting subtle structural distinctions.

Our temporal dissimilarity method falls under the category of using graph distances and Jensen-Shannon divergence for network comparison26. The proposed framework is versatile and can be applied to various types of networks, including multi-layer and signed networks. Additionally, it is suitable for comparing different time slices within the same temporal network. In this case, the FAD distribution can be substituted with the shortest path distance distribution within the method for effective comparison. The temporal aspect of a network allows for the definition of paths28 between nodes in various ways, thereby capturing different topological structures when comparing two temporal networks. We initially employed the shortest path distance28, which identifies the path that requires the least overall traversal time between nodes i to j, as input for our framework. However, this approach demonstrated inferior performance compared to FAD. Therefore, future work could explore alternative distance distributions as inputs to our framework to more effectively characterize the differences between temporal networks. We limit ourselves to use first arrival path for network comparison as it has relatively lower computation complexity compared to the other time respecting paths defined in the literature28. However, first arrival path only considers the earliest paths between node pairs, a better definition of time respecting distance between nodes can potentially offer further improvements for network comparison. In validating our proposed method, we utilize a fundamental temporal network generation model, namely, the activity driven model to generate a temporal network, disregarding memory effects in the interactions46. However, memory effects are pervasive in real-world systems and can significantly impact interaction dynamics. Additionally, the temporal networks used in our experiments are based on the finest temporal resolution. Using different resolutions may result in varying contact weights between nodes. Thus, designing a temporal dissimilarity method that accounts for memory effects and edge weights presents a compelling direction for future research.

Furthermore, we deem that other network comparison methodologies, such as network portraits19, communicability47, Laplacian spectral48, persistent homology49, can also be promising methods for temporal network comparison with appropriate definition, hence may boost the studies of temporal structures and functions, e.g., network topology variation identification50, node similarity characterization51, vital node identification52, community detection53 and network synchronization54.

Methods

Description of empirical temporal networks

The descriptions of the temporal network datasets are provided below, and the properties of these temporal networks are summarized in Table 1. Additionally, the FAD distributions of the empirical networks are illustrated in Fig. S10 of Supplementary Note 2.

Email-EU-core temporal networks (EEU)31 are email contact networks between members in a large European research institution. We have four respective networks, i.e., EEU1, EEU2, EEU3, EEU4, representing the email contacts between members of four different departments at the institution.

Manufacturing Email (ME)32 is an email contact network between individuals in a manufacturing company.

Gallery networks33 are physical proximity networks of visitors of a science gallery during 69 days. A contact represents two visitors being within 1–1.5 m during a 20 s interval. We restrict ourselves to the six first days of this data set—Gallery1 through Gallery6.

High School datasets34,35 contain proximity events between high school students in Marseille, France. The datasets are recorded by sensors at 20 s intervals and contain data in the year of 2011, 2012 and 2013. Therefore, we can form three different temporal networks, i.e., High School 2011 (HS2011), High School 2012 (HS2012), High School 2013 (HS2013).

Primary School (PS)36 contains physical contacts between the children and teachers in a primary school.

Hypertext 2009 (HT2009)37 contains physical contacts between attendees in the ACM Hypertext 2009 conference.

SFHH conference data (SFHH)38 contains physical contacts between attendees in the 2009 SFHH conference in Nice, France.

Activity driven model

Given N nodes, we assign every node i with an active probability ai, which is defined as the probability of creating a new contact with another node at time step t. We assume ai is extracted from an activity distribution F(a), and the window of the network is [0, T]. The temporal network is then generated by the following steps:

  • At each time step t, we assume a network Gt having N nodes and no contact.

  • Every node i is activated with probability ai and connects to m randomly selected nodes. All the new contacts at time step t are added to Gt.

Following these procedures, we can obtain a temporal network \(G(F(a),m)={\{{G}^{t}\}}_{t = 1}^{T}\), in which F(a) controls the node activity and m determines the number of contacts that every active node releases.

Temporal null models

In this work, we adopt six representative temporal null models as follows (Table 2 shows the static and temporal properties that are preserved or destroyed for each null model)39,40,41:

  • The equal-weight Link-sequence shuffled model (EWLSS) The link time sequences are exchanged uniformly at random between links with the same number of contacts.

  • Time shuffled model (TS) For all the contacts in a temporal network, the timestamps are randomly reshuffled.

  • Uniformly random times (URT) The timestamp of every contact is obtained uniformly at random from the given observation time window [0, T].

  • Configuration model (CM) A connected random static network \({G}^{\prime}\) is generated via the configuration model based on the given degree sequence of static network aggregated from the corresponding temporal network G, of which the timestamps are then randomly assigned on each link of \({G}^{\prime}\).

  • Random network (RN) A connected Erdős-Rényi network is generated based on the given number of nodes and links of the aggregated static network of a temporal network, of which the timestamps are then randomly assigned on each link of the obtained Erdős-Rényi network.