Susceptible-infected-spreading-based network embedding in static and temporal networks

Link prediction can be used to extract missing information, identify spurious interactions as well as forecast network evolution. Network embedding is a methodology to assign coordinates to nodes in a low-dimensional vector space. By embedding nodes into vectors, the link prediction problem can be converted into a similarity comparison task. Nodes with similar embedding vectors are more likely to be connected. Classic network embedding algorithms are random-walk-based. They sample trajectory paths via random walks and generate node pairs from the trajectory paths. The node pair set is further used as the input for a Skip-Gram model, a representative language model that embeds nodes (which are regarded as words) into vectors. In the present study, we propose to replace random walk processes by a spreading process, namely the susceptible-infected (SI) model, to sample paths. Specifically, we propose two susceptible-infected-spreading-based algorithms, i.e., Susceptible-Infected Network Embedding (SINE) on static networks and Temporal Susceptible-Infected Network Embedding (TSINE) on temporal networks. The performance of our algorithms is evaluated by the missing link prediction task in comparison with state-of-the-art static and temporal network embedding algorithms. Results show that SINE and TSINE outperform the baselines across all six empirical datasets. We further find that the performance of SINE is mostly better than TSINE, suggesting that temporal information does not necessarily improve the embedding for missing link prediction. Moreover, we study the effect of the sampling size, quantified as the total length of the trajectory paths, on the performance of the embedding algorithms. The better performance of SINE and TSINE requires a smaller sampling size in comparison with the baseline algorithms. Hence, SI-spreading-based embedding tends to be more applicable to large-scale networks.


Introduction
Real-world systems can be represented as networks, with nodes representing the components and links representing the connections between them [1,2].The study of complex networks pervades in different fields [3].
For example, with biological or chemical networks, scientists study interactions between proteins or chemicals to discover new drugs [4,5].With social networks, researchers tend to classify or cluster users into groups or communities, which is useful for many tasks, such as advertising, search and recommendation [6,7].With communication networks, learning the network structure can help understand how information spreads over the networks [2].These are only a few examples of the important role of analyzing networks.For all these examples, the data may be incomplete.If so, it could be important to be able to predict the link most likely to be missing.If the network is evolving, it could be crucial to forecast the next link to be added.For both of these applications one needs link prediction [8,9,10,11,12].
In link prediction, one estimates the likelihood that two nodes are adjacent to each other based on the observed network structure [13].Methods using similarity-based metrics, maximum likelihood algorithms and probabilistic models are major families of link prediction methods [14].Recently, network embedding, which embeds nodes into a low-dimensional vector space, has attracted much attention in solving the link prediction problem [14,15].The similarity between the embedding vectors of two nodes is used to evaluate whether they would be connected or not.Different algorithms have been proposed to obtain network embedding vectors.
A simplest embedding method is to take the row or column vector in the adjacency matrix, which is called an adjacency vector of the corresponding node, as the embedding vector.Then, the representation space is N -dimensional, where N is the number of nodes.As real-world networks are mostly large and sparse, the adjacency vector of a node is sparse and high-dimensional.In addition, the adjacency matrix only contains the first-order neighborhood information, and therefore the adjacency vector neglects the high-order structure of the network such as paths longer than an edge.These factors limit the precision of network embedding based on the adjacency vector in link prediction tasks.Work in the early 2000s attempted to embed nodes into a low dimension space using dimension reduction techniques [16,17,18].Isomap [16], locally linear embedding (LLE) [17] and Laplacian eigenmap [18] are algorithms based on the k-nearest graph, where nodes i and j are connected by a link in the k-nearest graph if the length of the shortest path between i and j is within the k-th shortest among the length of all the shortest paths from i to any other nodes.Matrix factorization algorithms decompose the adjacency matrix into the product of two low-dimensional rectangular matrices.
The columns of the rectangular matrices are the embedding vectors for nodes.Singular value decomposition (SVD) [19] is one commonly used and simple matrix factorization.However, the computation complexity of most of the aforementioned algorithms is at least quadratic in terms of N , limiting their applicability to large networks with millions of nodes.
Random-walk-based network embedding is a promising family of computationally efficient algorithms.
These algorithms exploit truncated random walks to capture the proximity between nodes [20,21,22] generally via the following three steps [23,24,25]: (1) Sample the network by running random walks to generate trajectory paths.(2) Generate a node pair set from the trajectory paths: each node on the trajectory path is viewed as a center node, the nearby nodes within a given distance are considered as the neighboring nodes.
A node pair in the node pair set is formed by a center node and each of its neighboring nodes.(3) Apply a word embedding model such as Skip-Gram to learn the embedding vector for each node by using the node pair set as input.Skip-Gram assumes nodes that are similar in topology or content tend to have similar representations [22].Algorithms have been designed using different random walks to capture high-order structure on networks.For example, DeepWalk [20] and Node2Vec [23] adopted uniform and biased random walks, respectively, to sample the network structure.In addition, random-walk-based embedding methods have also been developed for temporal networks, signed networks and multilayer networks [26,27,28,29].
In contrast to random-walk-based embedding, here we propose SI-spreading-based network embedding algorithms for static and temporal networks.We deploy the susceptible-infected (SI) spreading process on the given network, either static or temporal, and use the corresponding spreading trajectories to generate the node pair set, which is fed to the Skip-Gram to derive the embedding vectors.The trajectories of an SI spreading process capture the tree-like sub-network centered at the seed node, whereas random walk explores long walks that possibly revisit the same node.We evaluate our static network embedding algorithm, which refer to as SINE, and temporal network embedding, TSINE, via a missing link prediction task in six real-world social networks.We compare our algorithms with state-of-the-art static and temporal network embedding methods.We show that both SINE and TSINE outperform other static and temporal network embedding algorithms, respectively.In most cases, the static network embedding, SINE, performs better than TSINE, which additionally uses temporal network information.In addition, we evaluate the efficiency of SI-spreading-based network embedding via exploring the sampling size for the Skip-Gram, quantified as the sum of the length of the trajectory paths, in relation to its performance on the link prediction task.We show that high performance of SI-spreading-based network embedding algorithms requires a significantly smaller sampling size compared to random-walk-based embeddings.We further explore what kind of links can be better predicted to further explain why our proposed algorithms show better performance than the baselines.
The rest of the paper is organized as follows.We propose our method in Section 2. In Section 2.1, we propose our SI-spreading-based sampling method for static networks and the generation of the node pair set from the trajectory paths.Skip-Gram model is introduced in Section 2.2.We introduce an SI-spreading-based sampling method for temporal networks in Section 2.3.In Section 3, our embedding algorithms are evaluated on a missing link prediction task on real-world static and temporal social networks.The paper is concluded in Section 4.

SI-spreading-based Embedding
This section introduces SI-spreading-based network embedding methods.Firstly, we illustrate our SI-spreadingbased network embedding method for static networks in Sections 2.1 and 2.2.Section 2.3 generalizes the method to temporal network embedding.
Because we propose the network embedding methods for both static and temporal networks, we start with the notations for temporal networks, of which the static networks are special cases.A temporal network is represented as G = (N , L), where N is the node set and L = {l(i, j, t), t ∈ [0, T ], i, j ∈ N } is the set of time-stamped contacts.The element l(i, j, t) in L represents a bidirectional contact between nodes i and j at time t.We consider discrete time and assume that all contacts have a duration of one discrete time step.We use [0, T ] to represent the observation time window, N = |N | is the number of nodes.The aggregated static network G = (N , E) is derived from a temporal network G. Two nodes are connected in G if there is at least one contact between them in G. E is the edge set of G.The network embedding problem is formulated as follows: Given a network G = (N , E), static network embedding aims to learn a low-dimensional representation for each node i ∈ N .The node embedding matrix for all the nodes is given by U ∈ R d×N , where d is the dimension of the embedding vector (d < N ).The i-th column of U, i.e., − → u i ∈ R d×1 , represents the embedding vector of node i.

SI-spreading-based static network sampling
The SI spreading process on a static network is defined as follows: each node is in one of the two states at any time step, i.e., susceptible (S) or infected (I); initially, one seed node is infected; an infected node independently infects each of its susceptible neighbors with an infection probability β at each time step; the process stops when no node can be infected further.To derive the node pair set as the input for Skip-Gram, we carry out the following steps: Randomly choose node i as the seed to start the SI spreading 5: Generate spreading trajectory tree T i (β) Randomly choose m i trajectory paths for Choose the first L max nodes from Add the trajectory D * g i to D 11: else 13: Add the trajectory D g i to D 14: end for 17: end while 18: return D

Construction of spreading trajectory paths.
In each run of the SI spreading process, a node i is selected uniformly at random as the seed.The SI spreading process starting from i is performed.The spreading trajectory T i (β) is the union of all the nodes that finally get infected supplied with all the links that have transmitted infection between node pairs.From each of the spreading trajectory T i (β), we construct m i trajectory paths, each of which is the path between the root node i and a randomly selected leaf node in T i (β).The number m i of trajectory paths to be extracted from T i (β) is assumed to be given by where m max is a control parameter and K(i) is the degree of the root node i in the static network (or aggregated network).
The trajectory paths may have different lengths (i.e., number of nodes in the path).For a trajectory path whose length is larger than L max = 20, we only take the first L max nodes on the path.For a randomly chosen seed node i, we can generate m i trajectory paths from T i (β).We stop running the SI spreading process until the sum of the length of the trajectory paths reaches the sampling size B = N X, where X is a control parameter.We consider X ∈ {1, 2, 5, 10, 25, 50, 100, 150, 200, 250, 300, 350}.We compare different algorithms using the same B for fair comparison [26] to understand the influence of the sampling size.We show how to sample the trajectory paths in Algorithm 1.

Node pair set generation.
We illustrate how to generate the node pairs, the input of the Skip-Gram, from a trajectory path in Figure 1.
Consider a trajectory path, 1, 3, 6, 8, 9, 10, 7, 5, starting from node 1 and ending at node 5. We set each node, e.g., node 3, as the center node, and the neighboring nodes of the center node are defined as nodes within ω = 2 hops.The neighboring nodes of node 3 are, 1, 6 and 8.We thus obtain ordered node pairs (3, 1), (3,6), and (3,8).Thus, we use the union of node pairs centered at each node in each of trajectory path as the input to the Skip-Gram model.

Skip-Gram model
We illustrate how the Skip-Gram derives the embedding vector for each node based on the input node pair set.
We denote by N SI (i) the neighboring set for a node i derived from the SI spreading process.A neighboring node j of i may appear multiple times in N SI (i) if (i, j) appears multiple times in the node pair set.
Let p(j|i) be the probability of observing neighboring node j given node i.We model the conditional probability p(j|i) as the softmax unit parametrized by the product of the embedding vectors, i.e., − → u i and − → u j , as follows: Skip-Gram is to derive the set of the N embedding vectors that maximizes the log probability of observing every neighboring node from N SI (i) for each i.Therefore, one maximizes Equation ( 2) can be further simplified to where To compute Z i for a given i, we need to traverse the entire node set N , which is computationally costly.To solve this problem, we introduce negative sampling [22], which randomly selects a certain number of nodes k from N to approximate Z i .To get the embedding vectors for each node, we use the stochastic gradient ascent to optimize Eq. ( 3).
The static network embedding algorithm proposed above from the SI-spreading-based static network sampling and Skip-Gram model is named as SINE.

SI-spreading-based temporal network sampling
We generalize SINE to the SI-spreading-based temporal network embedding by deploying SI spreading processes on the given temporal network, namely, TSINE.For a temporal network G = (N , L), SI spreading follows the time step of the contacts in G. Initially, node i is chosen as the seed of the spreading process.At every time step t ∈ [0, T ], an infected node infects each of its susceptible neighbor in the snapshot through the contact between them with probability β.The process stops at time T .We construct the spreading trajectory starting from node i as T i (β), which records the union of nodes that get infected together with the contacts through which these nodes get infected.We propose two protocols to select the seed node of the SI spreading.In the first protocol, we start by selecting uniformly at random a node i as the seed.Then, we select uniformly at random a time step from all the times of contacts made by node i as the starting point of the spreading process, i.e., the time when i gets initially infected.We refer to this protocol as TSINE1.In the second protocol, we choose a node i uniformly at random as the seed and start the spreading at the time when node i has the first contact.We refer to this protocol as TSINE2.
Both TSINE1 and TSINE2 generate the node pair set from the spreading trajectory T i (β) in the same way as described in Section 2.1.The node pairs from the node pair set is the input of of Skip-Gram for calculating the embedding vector for each node.The SI-spreading-based temporal network embedding uses the information on the time stamps of contacts in addition to the information used by the static network embedding.

Results
For the link prediction task in a static network, we remove a certain fraction of links from the given network and predict these missing links based on the remaining links.We apply our static network embedding algorithm to the remaining static network to derive the embedding vectors for the nodes, which are used for link prediction.For a temporal network, we select a fraction of node pairs that have at least one contact.We remove all the contacts between the selected node pairs from the given temporal network.Then, we attempt to predict whether the selected node pairs have at least one contact or not based on the remaining temporal network.We use the area under the curve (AUC) score to evaluate the performance of the algorithms on the link prediction task.The AUC quantifies the probability of ranking a random node pair that is connected or has at least a contact higher than a random node pair that is not connected or has no contact.

Empirical Networks
We consider temporal networks, each of which records the contacts and their corresponding time stamps between every node pair.For each temporal network G, one can obtain the corresponding static network G by aggregating the contacts between each node pair over time.In other words, two nodes are connected in static network G if there is at least one contact between them in G.The static network G derived from G is unweighted by definition.We consider the following temporal social network data sets.
• HT2009 [30] is a network of face-to-face contacts between the attendees of the ACM Hypertext 2009 conference.
• Manufacturing Email (ME) [31] is an email contact network between employees in a mid-sized manufacturing company.
• Haggle [32] records the physical contacts between individuals via wireless devices.
• Fb-forum [33] captures the contacts between students at University of Califonia, Irvine, in a Facebooklike online forum.
• DNC [34] is an email contact network in the 2016 Democratic National Committee email leak.
• CollegeMsg [35] records messages between the users of an online community of students from the University of California, Irvine.
Table 1 provides some properties of the empirical temporal networks.In the first three columns we show the properties of the temporal networks, i.e., the number of nodes (N ), timestamps (T ) and contacts (|L|).
In the remaining columns, we show the properties of the corresponding aggregate static networks, including the number of links (|E|), link density, average degree, and clustering coefficient.The temporal networks are considerably different in size, which ranges from hundreds to thousands of nodes, as well as in the network density and clustering coefficient.Choosing networks with different properties allows us to investigate whether the performance of our algorithms can be consistent across networks.

Baseline algorithms
We consider three state-of-the-art network embedding algorithms based on Skip-Gram.These baseline algorithms and the algorithms that we proposed differ only in the method to sample trajectory paths, from which the node pair set, i.e., the input to the Skip-Gram, is derived.DeepWalk [20] and Node2Vec [23] are static network embedding algorithms based on random walks.CTDNE [26] is a temporal network embedding algorithm based on random walks.
• DeepWalk [20] deploys classic random walks on a given static network.
• Node2vec [23] deploys biased random walks on a given static network.The biased random walk gives a trade-off between breadth-first-like sampling and depth-first-like sampling of the neighborhood, which is controlled via two hyper-parameters p and q.We use a grid search over p, q ∈ {0.01, 0.25, 0.5, 1, 2, 4} to obtain embeddings that achieve the largest AUC value for link prediction.
• CTDNE [26]: CTDNE is a temporal network embedding algorithm based on temporal random walks.
The main idea is that the timestamp of the next temporal contact on the walk should be larger than the timestamps of previously traversed contacts.Given a temporal network G = (N , L), the starting contact for the temporal random walk is selected uniformly at random.Thus, every contact has probability 1/|L| to be selected as the starting contact.Assume that a random walker visits node i at time step t.
We define Γ t (i) as the set of nodes that have contacted node i after time t allowing duplicated elements.

Training and test sets
In this section, we illustrate how to generate the training and test sets in the link prediction task in temporal and static networks.We run the network embedding algorithms on the corresponding training set and obtain embedding vector for each node, and use the AUC to evaluate the link prediction performance in the test set.
Given a temporal network G, we select uniformly at random 75% node pairs among the node pairs that have at least one contact between them in G as the training set for temporal embedding algorithms, including all the contacts and their timestamps.The training set for static network embedding algorithms is the aggregation of the training set for temporal embedding algorithms.In other words, for every node pair, there is a link between the two nodes in the training set for static network embedding if and only if they have at least one contact in the training set for temporal embedding algorithms.
We use the remaining 25% node pairs among the node pairs that have at least one contact of G as the positive links in the test set.We label these node pairs 1.Then, we uniformly randomly sample an equal number of node pairs in G which have no contact between them.These node pairs are used as negative links in the test set, which we label 0. The same test set is used for the link prediction task in both temporal and static networks.
For each temporal network data set, we randomly split the network to obtain the training and test set according to the procedures given above five times.Both random walks and SI spreading processes are stochastic.For each split data, we run each algorithm on the training set and perform the link prediction on the test set for ten realizations.Therefore, we obtain ten AUC scores for each splitting of the data into the training and test sets, evening the randomness stemming from stochasticity of the random walk or SI spreading processes.We obtain the AUC score for each algorithm with a given parameter set as an average over 50 realizations in total.

Evaluation Results
Table 2: AUC scores for link prediction.All the results shown are the average over 50 realizations.Bold indicates the optimal AUC among the embedding algorithms, * indicates the optimal AUC among all the algorithms.L2, L3, L4 are the short for link prediction metrics which counts the number of l = 2, 3, 4 paths, respectively.We summarize the overall performance of the algorithms on missing link prediction in Table 2.For each algorithm, we tune the parameters and show the optimal average AUC score.Among the static network embedding algorithms, SINE significantly outperforms DeepWalk and Node2Vec.The improvement in the AUC score is up to 30% on the CollegeMsg dataset.Embedding algorithms CTDNE, TSINE1 and TSINE2

Dataset
are for temporal networks.The SI-spreading-based algorithms (i.e., TSINE1 and TSINE2) also show better performance than random-walk-based one (CTDNE).Additionally, TSINE2 is slightly better than TSINE1 on all data sets.Therefore, we will focus on TSINE2 in the following analysis.In fact, SINE shows better performance than temporal network embedding methods including TSINE2 on all data sets except for HT2009.
It has been shown that temporal information is important for learning embeddings [26,36,37].However, up to our numerical efforts, SINE outperforms the temporal network algorithms although SINE deliberately neglects temporal information.
To get insights into the different performance among the embedding algorithms, we further investigate the distribution of the dot product of node embedding vectors.Given a link (i, j) in the test set, we compute the dot product of the two end nodes' embedding vectors, i.e., − → u i • − → u j T .We show the dot product distribution for the positive links and negative links in the test set separately.For each embedding algorithm, we consider only the parameter set that maximizes the AUC, i.e., the parameter values with which the results are shown in Table 2.We show the distribution of the dot product for Haggle in Figure 2 and for the other data sets in Figure S1-S5 in the Appendix.Compared to the random-walk-based algorithms, TSINE2 and SINE yield more distinguishable distributions between the positive (grey) and the negative links (pink).This result supports the better performance of SI-spreading-based embeddings than random-walk-based ones.
The embedding algorithms differ only in the sampling method to generate the node pair set.These algorithms use the same Skip-Gram architecture, which takes the node pair set as input, to deduce the embedding vector for each node.We explore further how the algorithms differ in the node pair sets that they sampled.
The objective is to discover the relation between the properties of the sampled node pairs and the performance of an embedding method.We represent the node pair set generated by an embedding method as a network G S = (N , E S ), so called the sampled network.Two nodes are connected in G S if they form a node pair in the node pair set.It should be noted that G S is an unweighted network.For each algorithm, with the parameter set that maximizes the AUC, we show the cumulative degree distribution of its sampled network G S in Figure 3.The cumulative degree distribution of the training set for static network is also given.Compared to the cumulative degree distribution of the training set, the sampled networks tend to have a higher node degree.Zhang et al. and Gao et al. [25,38] have shown that when the degree distribution of G S is closer to that of the training set, the prediction performance of a random-walk-based algorithm tends to be better.
Even though SI-spreading based algorithms perform the best across the data sets, we have not found a direct relation between the performance of the embedding algorithm and similarity between the degree distribution of the sampled network and that of the training set.
Figure 4: Illustration of l paths between a pair of nodes i and j.Here we show l = 2, 3, 4.
Similarity-based methods such as the number of l = 2, 3, 4 paths have been used for link prediction problem [9].A l path between two nodes refers to a path that contains l links.We show examples of l = 2, 3, 4 path between a node pair i and j in Figure 4. Kovács et al. [39] have shown that l paths (l = 3, 4) outperform existing link prediction methods in predicting protein interaction.Cao et al. [40] found that network embedding algorithms based on random walks sometimes perform worse in link prediction than the number of l = 2 paths or equivalently the number of common neighbors.This result suggests a limit of random-walk-based embedding in identifying the links between node pairs that have many common neighbors.Therefore, we explore further whether our SI-spreading-based algorithms can overcome this limitation, thus possibly explain their outperformance.
We investigate what kind of network structure surrounding links makes them more easily be predicted.
For every positive link in the test set, we study its two end nodes' topological properties (i.e., the number of l = 2, l = 3 and l = 4 paths) and the dot product of the embedding vectors of its two end nodes.Given a network, the parameters of each embedding algorithm are tuned to maximize the AUC, as given in Table 2.We take the data set Haggle as an example.Figure 5 show the relation between the dot product of the embedding vectors and the number of l = 2, 3, 4 paths of the two end nodes of a positive link in the test set for all the embedding methods.The Pearson correlation coefficient (PCC) between the two variables for all the networks and algorithms is given in Table S1 in the Appendix.Figure 5 and Table S1 together show that the dot product of the embedding vectors constructed from TSINE2 and SINE is more strongly correlated with the number of l paths, where l = 2, 3 or 4, than the random-walk-based embeddings.This result suggests that SI-spreading-based algorithms may better predict the links whose two end nodes have many l-paths, thus overcoming the limit of random-walk-based embedding algorithms.
The number of l = 2, 3 paths has been used to predict links in [9,39,40].The observation and the limit of random-walk-based embedding algorithms motivate us to use the number of l = 2, 3, 4 paths between a node pair to predict the missing links.Take l = 2 paths as an example.For every link in the test set, the number of l = 2 paths between the two end nodes in the training set is used to estimate the likelihood of connection between them.In the networks we considered, two end nodes of a link tend to be connected by l = 2, l = 3 and l = 4 paths (see Figures 5).Next, we study the effect of the sampling size, B, on the performance of each algorithm.The sampling size is quantified as the the total length of the trajectory paths as defined in Section 2.1.Given a network, we set B = N X, where N is the size of the network and X ∈ {1, 2, 5, 10, 25, 50, 100, 150}.We evaluate our SIspreading-based embedding algorithms SINE and TSINE2, and one random-walk-based embedding algorithm CTDNE, because CTDNE performs mostly the best among all random-walk-based algorithms.The result is shown in Figure 6.For each X, we tune the other parameters to show the optimal AUC in the figure.Both SINE and TSINE2 perform better than CTDNE and are relatively insensitive to the sampling size.This means that they achieve a good performance even when the sampling size is small, even with X = 1.The randomwalk-based algorithm, CTDNE, however, requires a relatively large sampling size to achieve a comparable performance with SINE and TSINE2.
Finally, the AUC as a function of the infection probability, β, is shown in Figure 7.For each β, we tune the other parameters to show the optimal AUC.The SI-spreading-based algorithms achieve high performance with a small infection probability (0.001 ≤ β ≤ 0.1) for all the data sets.The high performance of SIspreading-based embedding algorithms with the small value of X and β across different networks motivates the further study whether one can optimize the performance by searching a smaller range of the parameter values.

Conclusions
In this paper, we proposed network embedding algorithms based on SI spreading processes in contrast to the previously proposed embedding algorithms based on random walks [41,42].We further evaluated the embedding algorithms on the missing link prediction task.The key point of an embedding algorithm is how to design a strategy to sample trajectories to obtain embedding vectors for nodes.We used the SI model to this end.The algorithms that we proposed are SINE and TSINE, which use static and temporal networks, respectively.
On six empirical data sets, the SI-spreading-based network embedding algorithm on the static network, i.e., SINE, gains much more improvement than state-of-the-art random-walk-based network embedding algorithms across all the data sets.The SI-spreading-based network embedding algorithms on the temporal network, TSINE1 and TSINE2, also show better performance than the temporal random-walk-based algorithm.Temporal information provides additional information that may be useful for constructing embedding vectors [26,36,37].However, we find that SINE outperforms TSINE, which uses timestamps of the contacts.This result suggests that temporal information does not necessarily improve the embedding for missing link prediction.Moreover, when the sampling size of the Skip-Gram is small, the performance of the

Algorithm 1 1 :
Generation of trajectory paths from SI spreading Input: G = (N , E), B, L max , β, m i Output: node trajectory path set D Initialize number of context windows C = 0 2: Initialize node trajectory path set D = ∅ 3: while B − C > 0 do 4:

Figure 2 :
Figure 2: The dot product distribution of the two end nodes' embedding vectors of the positive and negative links in the test set.We show the result of the Haggle data set.For each algorithm, we use the same parameter settings as that of Table 2 to obtain the embeddings.Dot products of positive links are shown in grey.Negative links are shown in pink.The results are shown for algorithms (a) DeepWalk; (b) Node2Vec; (c) CTDNE; (d) TSINE2 and (e) SINE.

Figure 3 :
Figure 3: Cumulative degree distribution of the static network derived from the training set and that of the sampled networks G S from different algorithms.We show the results for (a)HT2009; (b)ME; (c)Haggle; (d)Fb-forum; (e)DNC; (f)CollegeMsg.

Figure 5 :
Figure 5: Relation between the dot product of the two end nodes' embedding vectors and the number of l = 2, 3, 4 paths between the two end nodes of the positive links in the test set for Haggle data set.(a1-a5), (b1-b5) and (c1-c5) are the results for the number of l = 2, 3, 4 paths, respectively.16

Figure 6 :
Figure 6: Influence of the sampling size B = N X on the link prediction performance, i.e., AUC score.The error bar shows the standard deviation of the AUC score calculated on the basis of 50 realizations.We show the results for (a)HT2009; (b)ME; (c)Haggle; (d)Fb-forum; (e)DNC; (f)CollegeMsg.17

Table 1 :
Properties of the empirical temporal networks.The number of nodes (N ), timestamps (T ), and contacts (|L|) are shown.In addition, the number of links (|E|), link density, average degree, and clustering coefficient of the corresponding static network are shown.
node may appear multiple times in Γ t (i) because it may have multiple contacts with node i over the course of time.The next node to walk to is uniformly selected from Γ t (i), i.e., every node in Γ t (i) is chosen with probability 1/|Γ t (i)|.Nguyen et al. [26]generalized the starting contact and the successor node of a temporal walk to other distributions beyond the uniform distribution illustrated here.When we compare the performance of the algorithms on link prediction, we explore the embeddings that give the largest AUC value for link prediction of CTDNE by taking into account all possible generalizations proposed by Nguyen et al.

Table 2 (
L2, L3, L4 shown in the table correspond to the method of using the number of l = 2, 3, 4 path for link prediction) shows that in such networks, the similarity-based methods do not evidently outperform the SI-spreading-based embedding.Actually, the SI-spreading-based embedding performs better in two out of six networks.