Accelerating coordination in temporal networks by engineering the link order

Social dynamics on a network may be accelerated or decelerated depending on which pairs of individuals in the network communicate early and which pairs do later. The order with which the links in a given network are sequentially used, which we call the link order, may be a strong determinant of dynamical behaviour on networks, potentially adding a new dimension to effects of temporal networks relative to static networks. Here we study the effect of the link order on linear coordination (i.e., synchronisation) dynamics. We show that the coordination speed considerably depends on specific orders of links. In addition, applying each single link for a long time to ensure strong pairwise coordination before moving to a next pair of individuals does not often enhance coordination of the entire network. We also implement a simple greedy algorithm to optimise the link order in favour of fast coordination.


Results
Consider a static and unweighted network having N nodes and M links. We allow multiedges, which are counted as distinct links. We assume that each node carries continuous state x i ( ≤ ≤ i N 1 ) that varies over time according to linear diffusive dynamics. We sequentially apply links, say, i j ( , ), to the network to induce linear diffusive dynamics with a coupling strength of unity, corresponding to a pairwise conversation event towards coordination between the ith and jth nodes. The duration of a link is denoted by τ and takes a common value for all links. The states of the other − N 2 nodes are unchanged in this period. The application of a single link shrinks the distance between x i and x j by a factor of , respectively (Eqs (4,5)). Then, we switch to a next link, which is applied for time τ. This procedure is repeated until all links are used exactly once. The model can be interpreted as the bounded confidence model 21 on networks in which the interaction threshold is equal to zero (i.e., the two nodes interact regardless of the distance between x i and x j ).
The dynamics depend on the link order. There are M! link orders. The actual number of link orders is usually much smaller than M! for at least three reasons. First, multiedges introduce obvious redundancy in the count of link orders. Second, symmetry in the network structure reduces the effective number of link orders. For example, the chain network shown in Fig. 1 has three distinct link orders, whereas = = M! 3! 6. Third, swapping the order of the two links that are subsequently applied does not affect the dynamics afterwards if the corresponding single-link Laplacians commute. In undirected networks, this condition is met if and only if the two links that are subsequently applied are the same (i.e., multiedges) or they do not share a node (see Methods).
Measure of the speed of coordination. We introduce d, which quantifies the level of coordination when all links have been applied just once, i.e., at time τ = t M . We define d as the normalised mean distance between a pair of nodes when the initial state of each node, ), obeys an independent and identical normal distribution with mean zero and standard deviation σ. A practical sufficient condition for full coordination as → ∞ t is the connectedness of the temporal network aggregated over time interval where t i can be selected arbitrarily [22][23][24] . We do not consider asymptotic relaxation time, which is more commonly studied, because the present model is motivated by social settings in which pairwise interaction, i.e., a link, is considered to be costly and would not be used infinitely many times.
Denote the state vector by where ⊤ represents the transposition. We calculate d in terms of matrix T that maps the initial state vector x(0) to the final state vector τ M x( ), where T is explicitly given by Eq. (9). The mean square distance between the states of two nodes is initially equal to σ 2 2 . The mean square distance at τ = t M averaged over all node pairs and normalised by the value at t = 0 is given by  Real temporal networks. We start numerical analysis with two real temporal networks obtained from human interaction data. The first data set was obtained from the SocioPatterns Project and was recorded from participants in a conference 25 . Although the original data have 113 nodes and 20818 links, we have excluded one node and the two links incident to the deleted node because the speed of coordination is very sensitive to the presence or absence of this node 5 . The reduced network has N = 112 and M = 20816 links. We call this data set the conference data set. The second data set was obtained from the Reality Mining Project and was recorded from students, staff and faculty members at the Massachusetts Institute of Technology 26 . Although the original network contains 106 nodes, we use the largest connected component containing N = 104 nodes and M = 782682 links. Both networks contain multiedges. We respect the link orders in the original data sets and calculate d. Because of the finite time resolution in the recording, there are often more than one links appearing in the same time window. In this case, we follow the link order as dictated in the original data.
The d values are plotted against τ for the conference and Reality Mining data sets by the circles in Fig. 2(a,b), respectively. The average and standard deviation of d on the basis of 10 3 randomly generated link orders while the structure of the aggregate (i.e., static) network is kept intact are shown by the error bars in Fig. 2. The figure indicates that coordination occurs on real temporal networks much more slowly than for typical random link orders. This result is consistent with our previous results in which we looked at the spectral gap, an alternative measure of coordination, for the same data sets 5 . The difference between the real temporal networks and random link orders is more significant for larger values of τ. Real temporal networks are slow to coordinate possibly because of temporally correlated appearance of links 27 . In addition, coordination is not enhanced as τ increases when τ is large.
Small networks. Small networks allow us to enumerate the link orders and compare the performance of them. In this section, we consider three small networks with M = 10 links.
We first consider the complete graph, i.e., all node pairs are adjacent by a link. When N = 5, there are M = 10 links and M! = 3628800 link orders. We set τ = 1 and calculate d for all the possible link orders. The cumulative distribution of d is shown in Fig. 3(a). The figure indicates that the link order, in combination with the normally distributed initial states, affects d despite that the underlying network is structureless. The value of d is more than 20 times different between the fastest and slowest link orders. Furthermore, both approximately fastest and approximately slowest cases are attained by some fractions of link orders, i.e., not only by exponentially rare link orders.
The average, standard deviation, minimum and maximum of d calculated on the basis of all M! link orders are shown in Fig. 3(b) for a range of τ. The error bar indicates the average ± standard deviation. First, except when τ is small, d is substantially different between the fastest and slowest link orders, which extends the observation made with Fig. 3(a). Second, a large value of τ indicates that each link is applied for a long time, which might lead one to suspect that a large τ value improves coordination. However, this is not the case. d decreases as τ increases only when τ is small. The fastest coordination is realised between τ = .
0 5 and τ = . 0 7 depending on either the average, minimum or maximum of d is considered. When τ is large, d increases as τ increases, deteriorating coordination. Anecdotally, forcing each pair of individuals to have long discussion to ensure strong pairwise consensus does not necessarily facilitate coordination at the network level.
The average, standard deviation, minimum and maximum of d for all link orders for the cycle with = N 10 nodes are shown in Fig. 3(c). The average of d is the smallest at τ ≈ .
1 5. The d value beyond τ ≈ . 1 5 increases as τ increases just slightly for this network. The difference between the minimal and maximal d values is smaller than in the case of the complete graph. Nevertheless, the results are qualitatively the same as those for the complete graph. The results are similar for a network with = N 7 nodes and = M 10 links generated from the Erdös-Rényi random graph with the probability of link between a pair of nodes equal to 0.4 ( Fig. 3(d)).
Optimising the link order for larger networks. For larger networks, it is prohibitive to determine the best link order. Therefore, we seek to accelerate coordination in terms of d by running a simple greedy algorithm (see Methods). For simplicity, we focus on static and unweighted model and empirical networks in this section.
We first analyse the karate-club network in which a node represents a member of the club and a link represents casual interaction between two members. The network has = N 34 nodes and = M 78 links 28 . The link order optimised with τ = 1 yields = .
d 0 0768. For comparison, we also sample 10 3 random link orders on the same static network and calculate the average and standard deviation of d. Randomly sampled link orders yield = .
± . d 0 1049 0 0045 at τ = 1 (average ± standard deviation). This result indicates that the greedy algorithm can find a link order that by far outperforms most link orders.
It may be difficult to measure τ in real settings. Therefore, we assess how the link order optimised for τ = 1 performs when the dynamics are actually implemented with different τ values. For the link order optimised for τ = 1, d is plotted against τ by the circles in Fig. 4(a). The average and standard deviation for randomly sampled link orders are shown by the error bars in the same figure. Figure 4(a) indicates that the link order optimised for τ = 1 also behaves fairly well for other τ values, in the sense that d is smaller than those for typical random link orders. For the link orders optimised for τ = .
0 2 and τ = 5, d is plotted against τ by the squares and triangles, respectively, in Fig. 4(a). The link orders optimised for these τ values also yield d values significantly smaller than those for typical random link orders for a range of τ. Therefore, up to our numerical efforts, engineering a link order for a certain value of τ accelerates coordination for a range of τ.
We repeated the same analysis for three other networks. The results for a heterogeneous network generated by the Barabási-Albert preferential attachment model (BA model) having = N 100 nodes = M 294 links 29 are shown in Fig. 4(b). We set the initial network to the triangle and the number of links that each new node possesses to three. The results for a network of jazz musicians having = N 198 nodes and = M 2742 links 30 are shown in  Fig. 4(d). The results for the three networks are qualitatively the same as those for the karate-club network.
For all four networks, d for the optimised or random link orders decreases as τ increases when τ is small. However, d would not decrease further as τ increases when τ is large. Therefore, leaving pairs of individuals for a long time to ensure strong pairwise consensus does not accelerate the formation of consensus at a network level. This result is consistent with that for real temporal networks (Fig. 2) and small networks (Fig. 3(b-d)).

Spectral gap.
The relaxation speed of linear diffusive dynamics is usually characterised by the eigenvalue that determines the relaxation time of the dynamics. Because T (Eq. (9)) is a linear map from the initial state vector to the final state vector, the relevant eigenvalue is the second largest eigenvalue of T in terms of the modulus, denoted by λ T ( ) 2 . The largest eigenvalue of T is always equal to unity, corresponding to the perfectly synchronous mode, or the right eigenvector , which corresponds to the spectral gap of the Laplacian dynamics in continuous time under switching dynamics 5 . If the spectral gap calculated for the ordered link sequence e 1 , …, e M is large, coordination occurs fast when we periodically apply links e 1 , …, e M , e 1 , … infinitely many times. We prefer d to the spectral gap because pairwise conversations would not probably repeat periodically in real social situations. Nevertheless, in this section we assess whether minimisation of d also enhances the spectral gap.
We compared the spectral gap for the link orders optimised in terms of d and that for random link orders. The results for the karate-club network, BA model, jazz musician network, and collaboration network are shown in Fig. 5(a-d), respectively. For the karate-club, jazz, and collaboration networks, the link orders optimised in terms of d for the three values of τ yield larger spectral gaps than the mean value for random link orders, in a range of τ. For example, in the karate-club network (Fig. 5(a)), the link order optimised in terms of d at τ = 1 produces the spectral gap values that are larger than the average plus the standard deviation of typical link orders for all the examined values of τ. However, the spectral gap is only slightly larger than in the random case for the link orders optimised with τ = .
0 2 and τ = 5. In the BA model ( Fig. 5(b)), the optimisation in terms of d sometimes makes the spectral gap smaller than that for typical link orders. For this network, the link order optimised with τ = 5 is the only case in which the spectral gap for the optimised link order is larger than that for typical link orders.

Discussion
The present study may be extended in the following aspects. First, we provided a simple heuristic greedy algorithm to search for a link order to accelerate coordination in terms of d. The search space is composed of all permutations on M links. Although multiedges, symmetry in the network structure and commuting single-link Laplacians reduce the search space, the effective search space is generally huge even for a network with a small number of links. The current problem is a permutation-based combinatorial optimisation problem, whose famous examples include the travelling salesman problem and the quadratic assignment problem. Such a problem is typically NP-hard. The optimised solutions found in the present study may be local optimums. However, various approximate algorithms can find nearly optimal solutions for famous permutation-based problems 32 . It may be possible to build heuristic algorithms for the present model that provide better solutions than those obtained in the Results section.
Second, we only allowed isolated pairwise communications in each time period, corresponding to single-link Laplacians. In real situations, communications towards consensus may occur in a group [33][34][35] . It is straightforward to extend the current framework to the case of group conversation. For single-link Laplacians, we used Eq. (6) to transform the linear diffusive dynamics in continuous time to that in discrete time to simplify the computation of T, the mapping from the initial state vector to the final state vector. Otherwise, the calculation of T requires computationally burdening matrix exponentials. A group conversation corresponds to a clique in the network. If cliques do not overlap in each snapshot and are of the same size within and across snapshots, a relation similar to Eq. (6) holds true 27 , facilitating the computation of T.
Third, we imposed the condition that all links are used exactly once. In real situations, it may be allowed to use the same link multiple times, and some links may not have to be used. Burstiness of links and other higher-order temporal and structural correlation as present in empirical data 1 may impact the speed of coordination. In this situation, a plausible constraint may be to fix the total number of times that single links are applied. Then, the structure of the aggregate network composed of the actually used links varies across link orders. The structure of the static network is generally a strong determinant of the level of coordination (i.e., synchronisation) [36][37][38] . Therefore, the structure of the aggregate network, such as community structure and different levels of heterogeneity in the node's degree, may have a larger impact on d than the link order.
Fourth, we assumed that the initial states of the nodes, ), are independently and identically distributed. If the information about the initial or intermediate states is available, it is probably possible to devise a link order to accelerate coordination. For example, if the states of all nodes are monitored, always forcing the most distant pair of nodes in terms of x t ( ) i to communicate may considerably hasten coordination of the entire network.
Fifth, we assumed the linear diffusion dynamics for simplicity. Extening the present framework to nonlinear synchronisation dynamics and other types of dynamics is straightforward. In fact, effects of temporal networks on collective dynamics have been investigated with various models 3 . Examples include nonlinear coupled dynamics towards synchronisation 4 , the voter model [6][7][8] , the naming game 9,10 , the information cascade model 11 , dynamics of triangular social balance 12 , evolutionary game dynamics 13 , and, above all, epidemic processes 14,15 . The link order may add another dimension to the impact of temporal networks on these and other dynamics.

Methods
Model. The model for linear coordination dynamics is the same as that considered in our previous work, in which links are sequentially sampled without replacement 5 . Assume a static, undirected and unweighted network having N nodes and M links. Multiedges (i.e., multiple links connecting the same pair of nodes) are allowed and are counted as distinct unweighted links. The following formulation can be generalised to the case of directed and weighted networks.
Denote the state of the ith node by ∈ ). The network undergoes a sequence of Laplacian dynamics in continuous time in which each link is sequentially applied for time τ. The dynamics for period τ ≤ ≤ t 0 during which link i j ( , ) is applied are described by The states of the other − N 2 nodes are not altered during this period. The states after the application of link In short, the application of the link lessens the distance between x i and x j by factor of τ − e 2 . Then, we apply the next link for τ τ ≤ ≤ t 2 and so forth. The dynamics terminate at τ = t M , when all M links are applied exactly once.
To describe the entire switching dynamics, we introduce the N × N single-link Laplacian matrix for link i j ( , ), denoted by L ij ( ) . The matrix is defined by . The other elements of L ij ( ) are equal to zero. Equations (4,5) are rewritten as 2 Therefore, for the sequence of links e 1 , …, e M , the final state of the network is determined by mute for consecutively used links ij ( ) and  k ( ). In this case, exchanging the order of ij ( ) and  k ( ) does not affect the d value. Regardless of the value of ε, this condition is equivalent to ] is the Lie bracket, also called the commutator. Equation (10) is satisfied when two links ij ( ) and  k ( ) do not share a node or when they are identical. If the two links share just one node, i.e., = i k and ≠  j , we obtain contains three elements equal to + 1 at i j ( , ),  j ( , ),  i ( , ), three elements equal to − 1 at  i ( , ), j i ( , ),  j ( , ), and zero everywhere else. Although the main text focuses on undirected networks, the framework is also applicable to directed networks. As in the case of undirected networks, the d value does not change after swapping the order of two directed links that are successively applied if the corresponding single-link Laplacians commute (i.e., the Lie bracket is equal to zero). However, the calculation of the Lie bracket for undirected networks does not generalise to the case of directed networks. We denote by → L ij ( ) is an asymmetric matrix. As in the case of the undirected network, the directed single-link Laplacian matrices commute if the two directed links do not share a node. If the two links share one or two nodes, we obtain Greedy algorithm. The greedy algorithm aims at finding a link order that makes d as small as possible. For a given network and the value of τ, we proceeded as follows. First, we randomly ordered the M links and calculated d. Second, we swapped the order of a pair of randomly selected links. The order of the other − M 2 links was unchanged. Third, we calculated d for the new link order. Fourth, if d decreased by the proposed link swapping, we adopted it. Otherwise, we discarded it. We repeated this procedure . × 1 5 10 5 times. We verified that d did not notably decrease near the end of the repetition in all runs.