Keywords

1 Introduction

PageRank is a classic algorithm for estimating the importance of nodes in a network. It has been considered a success story on applying link analysis information seeking and ranking, and has been listed as one of the ten most influential data-mining algorithms [24]. PageRank has been applied to numerous settings and it has inspired a family of fixed-point computation algorithms, such as, TopicRank [6], TrustRank [8], SimRank [11], and more.

PageRank is defined to be the steady-state distribution of a random walk. As such, it is implied that the underlying network structure is fixed and does not change over time. Even though numerous works have studied the problem of computing PageRank on dynamic graphs, the emphasis has been given on maintaining PageRank efficiently under network updates [12, 19], or on computing PageRank efficiently in streaming settings [22]. Instead there has not been much work on how to incorporate temporal information and network dynamicity in the PageRank definition.

To make the previous claim more clear imagine that starting from an initial network G we observe k elementary updates in the network structure \(e_1,\ldots ,e_k\) (such as edge additions or deletions), resulting on a modified network \(G'\). A typical question is how to compute the PageRank of \(G'\) efficiently, possibly by taking into consideration the PageRank of G, and the incremental updates. Nevertheless, the PageRank of \(G'\) is defined as a steady-state distribution and as the network \(G'\) would “freeze” at that time instance.

Our goal in this paper is to extend PageRank so as to incorporate temporal information and network dynamics in the definition of node importance. The proposed measure, called temporal PageRank, is designed to provide estimates of the importance of a node \(u\) at any given time \(t\). If the network dynamics and the importance of nodes change over time, so does temporal PageRank, and it duly adapts to reflect these changes.

Fig. 1.
figure 1

(a) A static graph, in which hubs a and e have the highest static PageRank score; (b) and (c) represent two different temporal networks: in (b) the temporal PageRank score of nodes a and e are expected to be stable over time; in (c) node e becomes more important than a as the time goes by, and the temporal PageRank scores of a and e are expected to change accordingly.

An example illustrating the concept of temporal PageRank, and presenting the main difference with classic PageRank, is shown in Fig. 1. First, a static (directed) graph is shown in Fig. 1(a). Vertices a and e are the hubs of the graph, and thus, the nodes with the highest static PageRank score. Figures 1(b) and (c) show two temporal networks; the number next to each edge denotes the time-stamp that the edge arrives. In Fig. 1(b) the in-coming edges of nodes a and e are arriving in an interleaving manner, so we expect that the importance of a and e will be stable over time, and that their temporal PageRank scores will be approximately equal to their static PageRank scores. On the other hand, in Fig. 1(c) we are witnessing a concept drift: node a receives its in-coming edges in the initial phase, while node e receives its in-coming edges later on. Due to this change, node e becomes more important than a as time goes by. Accordingly the scores of temporal PageRank for a and e are changing over time reflecting the change in the network dynamics.

Note also that a dynamic algorithm for computing PageRank is required to report the same output (the static PageRank of the graph in Fig. 1(a)) independently of whether it receives its input as in Fig. 1(b) or (c).

As illustrated in the previous example, temporal PageRank is defined for temporal networks [9, 18], i.e., networks with time-stamped edges. We generalize the random-walk interpretation of static PageRank by using temporal random walks, i.e., time-respecting random walks on the temporal network.

We provide a simple update algorithm for computing temporal PageRank. Our algorithm processes the graph edges in order of arrival and it is proven to converge to the correct temporal PageRank scores. We also prove that if the edge distribution remains constant, temporal PageRank converges to the static PageRank of the underlying graph that the edge distribution is drawn.

We conduct extensive experimental evaluation on various real and semi-real datasets, which support our theoretical results and provide empirical evidence that temporal PageRank is a flexible measure that adjusts to changes in the network dynamics.

2 Models

2.1 Static PageRank

Consider a static weighted directed graph \(G_s\) = (\(V\), \(E_s\), \(w\)) with \(n\) nodes. Let \(P\) be the adjacency matrix of \(G_s\), such that each row is normalized to unit sum. To avoid dangling nodes it is typically assumed that the all-zero rows of \(P\) are substituted by rows of \(1/n \).

Given adjacency matrix \(P \in \mathbb {R}^{n \times n}\) and a unit-normalized personalization row vector \({\varvec{h}} \in \mathbb {R}^{n}\), we consider a random walk that visits the nodes of the graph \(G_s\) at discrete steps \(i=1,2,\ldots \,\). At step \(i=1\) the random walk starts at a node \(u \in V \) with probability \(h(u)\). Given that at step i the random walk has visited a node \(u\), at step \(i+1\) it visits a node \(v\) selected as follows: with probability \(1-\alpha \) the node \(v\) is chosen according to the distribution \({\varvec{h}}\), while with probability \(\alpha \) the node \(v\) is chosen according to the distribution specified by the \(u\)-th row of \(P\).

Consider now a Markov chain with nodes \(V\) as its state space and transition matrix

$$\begin{aligned} P' =\alpha P +(1-\alpha )\mathbf {1} {\varvec{h}}, \end{aligned}$$

where \(\mathbf {1}\) is a unit column vector. This Markov chain models the random walk defined above. Assuming that the matrix \(P'\) is stochastic, aperiodic, and irreducible, by the Perron–Frobenius theorem there exists a unique row vector \(\mathbf {\pi }\), such that \(\mathbf {\pi } P' =\mathbf {\pi } \) and \(\mathbf {\pi } \mathbf {1} =\mathbf {1} \). The vector \(\mathbf {\pi }\) is the stationary distribution of the Markov chain, and it is also known as the PageRank vector. The \(u\)-th coordinate of \(\mathbf {\pi }\) is the PageRank score of node \(u\).

A closed-form expression for \(\mathbf {\pi }\) can be derived as

$$\begin{aligned} \mathbf {\pi } =(1-\alpha ){\varvec{h}} (I-\alpha P)^{-1}= (1-\alpha ){\varvec{h}} \sum _{k=0}^{\infty }\alpha ^kP ^k, \end{aligned}$$

and the PageRank score of a node \(u \) can be written as

$$\begin{aligned} \mathbf {\pi } (u)= & {} \sum _{v \in V}h(v) \sum _{k=0}^{\infty }(1-\alpha )\alpha ^{k}\sum _{\begin{array}{c} z \in Z(v,u) \\ |z | =k \end{array}}\prod _{(i,j)\in z}P (i,j) \nonumber \\= & {} \sum _{v \in V}\sum _{k=0}^{\infty }(1-\alpha )\alpha ^{k}\sum _{\begin{array}{c} z \in Z(v,u) \\ |z | =k \end{array}}h(v) \mathrm {Pr}\left[ z \mid v \right] \nonumber \\= & {} \sum _{v \in V}\sum _{k=0}^{\infty }(1-\alpha )\alpha ^{k}\sum _{\begin{array}{c} z \in Z(v,u) \\ |z | =k \end{array}}\mathrm {Pr}\left[ z \right] , \end{aligned}$$
(1)

where \(Z(v,u)\) is a set of all walks from \(v \) to \(u \), and (ij) is used to denote two consecutive nodes of a certain walk \(z \in Z(v,u) \). The product \(\prod _{(i,j)\in z}P (i,j) =\mathrm {Pr}\left[ z \mid v \right] =\mathrm {Pr}\left[ z \right] /h(v) \) expresses the probability that a random walk reaches node \(u\), provided that it starts at node \(v\) and it follows only graph edges.

In the definition of PageRank, it is assumed that the transition probability matrix \(P'\) is given in advance, and it does not change. A number of works address the problem of computing PageRank incrementally, when nodes and edges are added or removed. However, PageRank is still defined by its static version, as the stationary distribution of the graph that contains all nodes and edges that are currently active [4, 5, 12, 19]. Here we propose another view of PageRank, where temporal information and network dynamics are explicitly incorporated in the underlying random walk that defines the PageRank distribution.

2.2 Temporal PageRank

Temporal PageRank extends static PageRank by incorporating temporal information into the random-walk model. Our model uses temporal networks [9, 13, 18, 21]. A temporal network \(G = (V, E)\) consists of a set of \(n\) nodes \(V \) and a set of \(m\) timestamped edges (or interactions) \(E \) between pairs of nodes

$$\begin{aligned} E = \left\{ (u _i, v _i, t _i)\right\} , \text { with } i = 1,\ldots , m, \text { such that } u _i, v _i \in V \text { and } t _i \in \mathbb {R}, \end{aligned}$$

where \(t _i\) represents the timestamp when an interaction between \(u _i\) and \(v _i\) is taking place. For generality we assume that the edges of the temporal graph are directed. We also assume more than one different edge may exist between a given pair of nodes, with different timestamps, representing multiple interactions in time between a pair of nodes.

Following previous studies on temporal networks [9, 18], given a temporal network \(G\), we define a temporal walk on \(G\), or a time-respecting walk, to be a sequence of edges \((u _1, u _2, t _{1})\), \((u _2, u _3, t _{2})\), \(\ldots \), \((u _{j}, u _{j+1}, t _{j})\), such that \(t _{i}\le t _{i+1}\) for all \(1\le i \le {j-1}\).

Our extension of static PageRank to temporal PageRank is based on modifying the PageRank definition of Eq. (1) so that only temporal walks are considered instead of all possible walks.

The intuition behind the idea can be illustrated by the example shown in Fig. 1(c). Node a initially receives many in-links and it should be considered important. After time \(t=8\), however, it does not receive any more in-links and thus, its importance should diminish. By using time-respecting walks one can accurately model the fact that the probability of the random walk being at node a decreases as time increases beyond time \(t=8\). Essentially, the probability that a random walk being at node a after time \(t=8\) corresponds to the probability that the random walk has arrived at node a before time \(t=8\) and it has not left yet. Clearly this probablity decreases as time increases beyond \(t=8\).

We now define temporal PageRank more formally. Let \(Z^T (v,u \mid t)\) be a set of all possible temporal walks that start at node \(v\) and reach node \(u\) before time \(t\). We can compute the probability of a particular walk \(z \in Z^T (v,u \mid t)\) as the number \(c(z \mid t) \) of all such walks (starting at \(v\) and reaching \(u\) before time \(t\)) normalized by a number of all temporal walks that start at node \(v \) and have the same length

$$\begin{aligned} \mathrm {Pr}'\left[ z \in Z^T (v,u \mid t)\right] = \frac{c(z \mid t)}{\sum _{\begin{array}{c} z' \in Z^T (v,x \mid t)\\ x \in V,~|z' | =|z | \end{array}}c(z' \mid t)}. \end{aligned}$$
(2)

To compute the number \(c(z \mid t) \) of temporal walks that start at \(v\) and reach \(u\) before time \(t\) one can consider the unweighted count of all possible temporal walks. Such a count implies that once reaching \(u\) at time \(t _1\) the random walk selects uniformly at random one of the future interactions \((u,x,t _2)\), with \(t _2>t _1\), to move out of \(u\). This model is not very intuitive as it assumes that the random walk has knowledge of the future interations. Instead, once reaching \(u\) by an interaction \((v, u,t _1)\) it is more likely to move out of \(u\) in one of the next interactions \((u, x, t _2)\). Thus, we assume that the probability of taking \((v, u,t _1)\) followed by \((u, x, t _2)\) increases as the time difference \((t _2-t _1)\) decreases.

To model this decreasing probability we consider an exponential distribution. Our motivation for this definition is the exponential-decay model in data-stream processing, which is commonly used. We define the probability that interaction \((v, u,t _1)\) is followed by \((u, x, t _2)\):

$$\begin{aligned} \mathrm {Pr}\left[ (v, u,t _1),(u, x, t _2)\right] =\beta ^{|(u, y, t ')\mid t '\in [t _1,t _2],~y \in V |}. \end{aligned}$$

We will refer to \(\beta \) as transition probability. The weighted number of temporal walks is then defined as

$$\begin{aligned} c(z \mid t) = (1-\beta )\prod _{((u _{i-1},u _i,t _i),(u _i,u _{i+1},t _{i+1}))\in z}\beta ^{|(u _{i}, y, t ')\mid t '\in [t _i,t _{i+1}],~y \in V |}, \end{aligned}$$

where \((1-\beta )\) is a normalization term. Note that \(\beta =1\) with omitted normalization corresponds to the unweighted case. In this case we view temporal network as a sequence of samples from some unknown and changing distribution \(P'\).

By combining Eqs. (1) and (2), the temporal PageRank score of a node \(u\) at time \(t\) is defined as

$$\begin{aligned} \begin{aligned} \mathbf {r} (u,t)=\sum _{v \in V}\sum _{k=0}^{t}(1-\alpha )\alpha ^{k}\sum _{\begin{array}{c} z \in Z^T (v,u \mid t)\\ |z | =k \end{array}}\mathrm {Pr}'\left[ z \mid t \right] . \end{aligned} \end{aligned}$$
(3)

Note that according to this definition, the temporal PageRank score of a node \(u\) is a function of time. Thus, although our definition is an adaptation of the path-counting formulation of static PageRank (Eq. (1)), the temporal PageRank is not a limiting distribution as static PageRank.

Also note that the definition of temporal PageRank (Eq. (3)) does not incorporate explicitly a personalization vector \({\varvec{h}}\). Instead, in the temporal PageRank model presented above, the probability of starting a temporal walk at a node \(u\) is proportional to the number of temporal edges that start in \(u\). The vector that contains the starting probabilities for all nodes is referred to as walk starting probability vector and it is denoted by \({\varvec{h}}'\). The vector \({\varvec{h}}'\) is learned from the data, in particular, for each node \(u\), it is \(h'(u)=\frac{|(u, v, t)\in E:~\forall v \in V |}{|E |}\).

On the other hand, given a personalization vector \({\varvec{h}}^*\), the personalized temporal PageRank is defined as

$$\begin{aligned} \begin{aligned} \mathbf {r} (u,t)=\sum _{v \in V}\sum _{k=0}^{t}(1-\alpha )\alpha ^{k}\frac{h^*(v)}{h'(v)}\sum _{\begin{array}{c} z \in Z^T (v,u \mid t)\\ |z | =k \end{array}}\mathrm {Pr}'\left[ z \mid t \right] \end{aligned} \end{aligned}$$
(4)

Equation (4) assumes that the walk starting probability vector \({\varvec{h}}'\) is known. In practice, \({\varvec{h}}'\) can be learned by one scan of the edges of the temporal network.

3 Algorithms

3.1 Computing Temporal PageRank

In order to compute temporal PageRank we need to process the sequence of interactions \(E\) and calculate the weighted number of temporal walks. When a new interaction \((u,v,t)\) arrives it can be used to advance any of the temporal walks that end in \(u \), or it can be the start of a new walk. To keep count of the number of walks ending at each node we use an active mass vector \({\varvec{s}}(t)\in \mathbb {R}^{|V |}\), with \({\varvec{s}}(u,t)\) being equal to the weighted count of walks ending at node \(u\) at time t. We also use a vector \({\varvec{r}}(t)\in \mathbb {R}^{|V |}\) to keep temporal PageRank estimates, where \({\varvec{r}}(u,t)\) stores the value of temporal PageRank (t-pr) of node \(u\) at time t. Algorithm 1 processes a sequence of interactions \(E\), updates the counts \({\varvec{s}}(t)\) and \({\varvec{r}}(t)\) for each new interaction \((u,v,t)\), and outputs \({\varvec{r}}\) as a t-pr estimate.

Proposition 1

Algorithm 1 computes temporal PageRank defined in Eq. (3).

Proof

Algorithm 1 counts explicitly the weighted number of temporal walks. Lines 3 and 4 correspond to initiating a new walk with probability \(1-\alpha \). With probability \(\alpha \) the last interaction is chosen to continue active walks that wait in node \(u \) (line 5). Line 7 (or 10, depending on transition probability \(\beta \)) increments the active walks (active mass) count in the node \(v\) with appropriate normalization \(1-\beta \). Line 8 (or 11) decrements the active mass count in node \(u\). If the transition probability is \(\beta =1\), then the random walk chooses the first suitable arrived interaction to continue the walk.    \(\square \)

figure a

Algorithm 1 processes all interactions \(E \) in one pass and \({\mathcal {O}}(n)\) space. We need \({\mathcal {O}}(1)\) space per node, leading to total \({\mathcal {O}}(n)\) space, while every interaction initiates a constant number of updates, leading to \({\mathcal {O}}(1)\) update time per interaction.

To compute personalized temporal PageRank for a given personalization \({\varvec{h}}^*\) we perform normalization, defined by Eq. (4), and multiply terms \((1-\alpha )\) in lines 3 and 4 by \(\frac{h^*(u)}{h'(u)}\). Unless we know the distribution of temporal edges in advance, we need to learn \({\varvec{h}}'\). Thus, we obtain a 2-pass algorithm to calculate personalized temporal PageRank for a given personalization vector \({\varvec{h}}^*\).

3.2 Temporal Vs. Static PageRank

Temporal PageRank is defined to handle network dynamics and concept drifts. An intuitive property that one may expect is that if the edge distribution of the temporal edges remains constant, then temporal PageRank approximates static PageRank. In this section we show that indeed this is the case.

Consider a weighted directed graph \(G_s =(V, E_s, w)\) and a time period \(\mathcal {T}=[1,..,T]\). Without loss of generality assume \(\sum _{e\in E_s}w (e)=1\) and let \(N_{\mathrm {out}}(u)\) be the out-link neighbors of \(u \). Let edges \(e\in E_s \) be associated with a sampling distribution \(\mathcal {S}_E:p[e=(u,v)]=w (e)\). A temporal graph \(G =(V, E)\) is constructed by sampling T edges from \(G_s \) using \(\mathcal {S}_E\) (probability to pick an edge into \(E\) is proportional to the weight of this edge in the static graph). We will consider a simple case of transition probability \(\beta =1\): a random walk takes the first suitable interaction to continue.

In the setting described above we can prove the following statement.

Proposition 2

The expected values of temporal PageRank on graph \(G =(V, E)\) converge to the values of static PageRank on graph \(G_s =(V, E_s, w)\), with personalization vector \(h(u)=\sum _{v\in N_{\mathrm {out}}(u)}w (e=(u,v))\) (weighted out-degree).

Proof

At any time moment t every vertex \(u\in V\) has PageRank score \({\varvec{r}}(u,t)\) and active mass (number of walkers that wait to continue) equal to \({\varvec{s}}(u,t)\).

The expected value \(\mathbb {E}({\varvec{r}}(v,T))\) of the PageRank count of node v at time T is a sum over expected increments of \({\varvec{r}}(v)\) over time:

$$\begin{aligned} {\mathbb {E}({\varvec{r}}(v,T))=\sum _{t=1}^T \mathbb {E}(\varDelta r(v,t)).} \end{aligned}$$

At time t the increment of \({\varvec{r}}(v)\) can be caused by selecting an edge \(e(t)=(v,q)\) with starting point in v and \(q\in V\). In this case \({\varvec{r}}(v)\) is incremented by \((1-\alpha )\). Another possibility to increment \({\varvec{r}}(v)\) is to select an edge \(e(t)=(q,v)\) with u as an end point and \(q\in V\). In this case \({\varvec{r}}(v)\) is incremented by \(\alpha {\varvec{s}}(q,t)\), where \({\varvec{s}}(q,t)\) is a value of active mass in node q at time t. Let \(p(u)\) be a probability that sampled interaction has \(u \) as its start point. Note, that

$$\begin{aligned} { p(u)=\frac{\sum _{j\in V}{w (e=(u,j))}}{\sum _{i\in V}\sum _{j\in V}{w (e=(i,j))}}, } \end{aligned}$$

that is, the normalized out-degree of \(u\). Thus, \(\mathbb {E}(\varDelta {\varvec{r}}(v,t))\) can be written as

$$\begin{aligned} \mathbb {E}(\varDelta {\varvec{r}}(v,t))=(1-\alpha )p(v) + \alpha \sum _{u\in V}p(u)p(v|u)\mathbb {E}({\varvec{s}}(u,t)). \end{aligned}$$

To calculate expected amount of active mass in \({\varvec{s}}(u,t)\), notice that \({\varvec{s}}(u,t)\) equals to total increments of \({\varvec{r}}(u)\) happened between the time moment, when edge with starting point in u was selected to update, and t:

$$\begin{aligned}&\mathbb {E}({\varvec{s}}(u,t)) = \varDelta {\varvec{r}}(u,t)p(u)+(\varDelta {\varvec{r}}(u,t)+\varDelta {\varvec{r}}(u,t-1))p(u)(1-p(u))+\dots \\&\dots + p(u)(1-p(u))^{t-1}\sum _{t'=0}^{t-1}\varDelta {\varvec{r}}(u,t-t')= \sum _{t'=0}^{t-1}\mathbb {E}(\varDelta {\varvec{r}}(u,t-t'))p(u)\sum _{k=t'}^{t-1}(1-p(u))^k \end{aligned}$$

The inner sum is a geometric progression:

$$\begin{aligned}&\mathbb {E}({\varvec{s}}(u,t))= \sum _{t'=0}^{t-1}\mathbb {E}(\varDelta {\varvec{r}}(u,t-t'))p(u)\frac{1}{p(u)}\big [(1-p(u))^{t'}-(1-p(u))^{t}\big ]. \end{aligned}$$

We sum \(\mathbb {E}({\varvec{s}}(u,t))\) over time and consider the two summations separately:

$$\begin{aligned} \sum _{t=1}^T\mathbb {E}({\varvec{s}}(u,t))=&\sum _{t=1}^T\sum _{t'=0}^{t-1}\mathbb {E}(\varDelta {\varvec{r}}(u,t-t'))(1-p(u))^{t'} \\&- \sum _{t=1}^T\sum _{t'=0}^{t-1}\mathbb {E}(\varDelta {\varvec{r}}(u,t-t'))(1-p(u))^{t}. \end{aligned}$$

The first summation term can be written as:

$$\begin{aligned} \sum _{t=1}^T\sum _{t'=0}^{t-1}\mathbb {E}(\varDelta {\varvec{r}}(u,t-t'))(1-p(u))^{t'}= \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))\sum _{t'=0}^{T-t}(1-p(u))^{t}. \end{aligned}$$

The second summation term is:

$$\begin{aligned} \sum _{t=1}^T\sum _{t'=0}^{t-1}\mathbb {E}(\varDelta {\varvec{r}}(u,t-t'))(1-p(u))^{t}= \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-p(u))^t\sum _{t'=0}^{T-t}(1-p(u))^{t}. \end{aligned}$$

Putting the parts together:

$$\begin{aligned} \sum _{t=1}^T\mathbb {E}(s(u,t))&= \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-(1-p(u))^t)\sum _{t'=0}^{T-t}(1-p(u))^{t} \\&= \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-(1-p(u))^t)\frac{1}{p(u)}(1-(1-p(u))^{T-t+1}). \end{aligned}$$

Now the expected total increment \(\mathbb {E}({\varvec{r}}(v,T))\) can be expressed as:

$$\begin{aligned} \mathbb {E}({\varvec{r}}(v,T))&= (1-\alpha ) \sum _{t=1}^T p(v) \\&+\alpha \sum _{u\in V}p(v|u)\sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-(1-p(u))^t)(1-(1-p(u))^{T-t+1}). \end{aligned}$$

We need to show that

$$\begin{aligned}&\lim _{T\rightarrow \infty }\frac{\mathbb {E}({\varvec{r}}(v,T))}{T}= (1-\alpha )p(v) + \alpha \lim _{T\rightarrow \infty }\sum _{u\in V}p(v|u)\frac{\mathbb {E}({\varvec{r}}(u,T))}{T}. \end{aligned}$$
(5)

Let us upper-bound \(\mathbb {E}(\varDelta {\varvec{r}}(v,t))\). Consider a time moment \(t'\le t\). A value of mass introduced to the system at \(t'\) is \((1-\alpha )\). This mass can arrive to the node v at time moment t through a sequence of \(t-t'\) steps of transmission (when a node u, which currently holds this mass, was chosen for action) or retainment (a node u was not chosen for action and the mass remains in u). Transmission happens with probability \(p(u)\alpha \); the probability of retainment is \(1-p(u)\). Define \(p=\max _{v\in V}\{1-p(v),\alpha p(v)\}\). Then the expected value remained from this mass is upper-bounded by \((1-\alpha )p^{(t-t')}\). The sum of all introduced bits of mass is an upper-bound for the active mass expected to enter node v at time t:

$$\begin{aligned}&\mathbb {E}(\varDelta {\varvec{r}}(v,t))\le \sum _{t'=1}^T(1-\alpha )p^{t'}\le (1-\alpha )\frac{p(1-p^{t})}{1-p}\le \frac{1}{1-p} \end{aligned}$$

Now we need to show that the following limit goes to 0:

$$\begin{aligned} \lim _{T\rightarrow \infty }&\frac{1}{T} \sum _{t=1}^T \mathbb {E}(\varDelta {\varvec{r}}(u,t))((1-p(u))^{T+1}-(1-p(u))^t-(1-p(u))^{T-t+1}) \\ =&\lim _{T\rightarrow \infty }\frac{1}{T} \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-p(u))^{T+1} -\lim _{T\rightarrow \infty }\frac{1}{T} \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-p(u))^t \\&- \lim _{T\rightarrow \infty }\frac{1}{T} \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-p(u))^{T-t+1} \end{aligned}$$

Consider three limits separately. The first one:

$$\begin{aligned} \lim _{T\rightarrow \infty }\frac{1}{T} \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-p(u))^{T+1}&= \lim _{T\rightarrow \infty }\frac{(1-p(u))^{T+1}}{T} \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t)) \\&\le \lim _{T\rightarrow \infty }\frac{p^{T+1}}{T} \sum _{t=1}^T\frac{1}{1-p}=0 \end{aligned}$$

The second one:

$$\begin{aligned}&\lim _{T\rightarrow \infty }\frac{1}{T} \sum _{t=1}^T\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-p(u))^t\le \lim _{T\rightarrow \infty }\frac{\sum _{t=1}^Tp^t}{T(1-p)} =\lim _{T\rightarrow \infty }\frac{p-p^{T+1}}{T(1-p)^2}=0 \end{aligned}$$

The third one:

$$\begin{aligned} \lim _{T\rightarrow \infty }\frac{1}{T} \sum _{t=1}^T&\mathbb {E}(\varDelta {\varvec{r}}(u,t))(1-p(u))^{T-t+1} \le \lim _{T\rightarrow \infty }\frac{p^{T+1}}{T(1-p)} \sum _{t=1}^Tp^{-t}\\&= \lim _{T\rightarrow \infty }\frac{p^{T+1}}{T(1-p)} \frac{p^{-T}-1}{1-p} \le \lim _{T\rightarrow \infty }\frac{p}{T(1-p)^2}=0 \end{aligned}$$

It follows that Expression (5) is true. Now, if we define \(pr(v)=\lim _{T\rightarrow \infty }\frac{1}{T}\mathbb {E}(r(v,T))\), then Expression (5) can be written as personalized PageRank in a steady state:

$$\begin{aligned}&pr(v)=(1-\alpha )p(v)+\alpha \sum _{u\in V}p(v|u)pr(u) \end{aligned}$$

   \(\square \)

Fig. 2.
figure 2

Convergence of temporal PageRank to static PageRank. The first row (a, b, c) corresponds to degree personalization, the second row (d, e, f) corresponds to random personalization, given a priori.

4 Experimental Evaluation

To further support our theoretical analysis, we provide an empirical evaluation of temporal PageRank. The implementation of all algorithms and scripts are publicly available.Footnote 1 We first describe our experimental setup.

Datasets. We consider semi-real temporal networks, constructed by using real-world directed networks with edge weights equal to the frequency of corresponding interaction. In particular, we consider the following networks: Facebook, Twitter and Students. For each such network we extract static subgraphs \(G_s =(V,E_s,w)\) with \(n=100\) nodes, obtained by BFS from a random node. We normalize edge weights \(w \) to sum to 1. Then we sample a sequence of temporal edges \(E \), such that each edge \(e\in E_s \) is sampled with probability proportional to its weight \(w (e)\); the distribution of sampled edges is denoted by \(\mathcal {S}_{E (w)}\). The number of temporal edges \(E\) is set to \(m=100\,\)K.

The Facebook dataset is a 3-month subset of Facebook activity in a New Orleans regional community [23]. The dataset contains an anonymized list of wall posts (interactions). The Twitter dataset tracks activity of Twitter users in Helsinki during 08.2010–10.2010. As interactions we consider tweets that contain mentions of other users. The Students datasetFootnote 2 is an activity log of a student online community at the University of California, Irvine. Nodes represent students and edges represent messages.

Measures. To evaluate the settings in which temporal PageRank is expected to converge to the static PageRank of a corresponding graph, we compare temporal and static PageRank using three different measures: we use (i) Spearman’s \(\rho \) to compare the induced rankings, we also use (ii) Pearson’s correlation coefficient r, and (iii) Euclidean distance \(\epsilon \) on the PageRank vectors.

All the reported experimental results are averaged over 100 runs. Damping parameter is set of \(\alpha =0.85\). Waiting probability \(\beta \) for temporal PageRank is set to 0 unless specified otherwise.

Fig. 3.
figure 3

Comparison of temporal PageRank ranking with static PageRank ranking, degree personalization is used.

Fig. 4.
figure 4

Rank quality (Pearson corr. coeff.) and transition probability \(\beta \).

4.1 Results

Convergence. In the first set of experiments we test how fast the temporal PageRank algorithm converges to corresponding static PageRank. In this setting we process datasets with m temporal edges and compare the temporal PageRank ranking with the corresponding static PageRank ranking. In the plots of Fig. 2 we report Pearson’s r, Spearman’s \(\rho \) and Euclidean error \(\epsilon \). The first column corresponds to the calculation of temporal PageRank without any a priori knowledge of personalization vector. Thus, the resulting temporal PageRank corresponds to the static PageRank with out-degree personalization: \({\varvec{h}}(u)=\sum _{v \in N_{\mathrm {out}}(u)}w {(u,v)}\), where \(N_{\mathrm {out}}(u)\) are out-link neighbors of \(u \). The second column shows convergence in the case when the personalization vector \({\varvec{h}}^*\) is given and appropriate renormalization of t-pr counts is taking place.

The plots in Fig. 2 show that in both variants of personalization the behavior is similar: in most cases the correlation of the PageRank counts reaches high values already after \(20\,\)K temporal edges. Pearson’s r is remarkably high, while Spearman’s \(\rho \) is typically lower. This can be explained by the large number of discordant pairs in the tail of ranking — due to producing a power-law distribution PageRank is known to give robust rankings only at the top of the ranking list. The Euclidean error \(\epsilon \) also decreases to near-zero values fast.

Fig. 5.
figure 5

Adaptation for the change of sampling distribution.

Fig. 6.
figure 6

Convergence to static PageRank with increasing number of random scans of edges.

In Fig. 3 we show direct comparison between rankings, obtained by static and temporal PageRanks after processing all temporal edges. We observe that the rank correlation is high for top-ranked nodes and decreases towards the tail of ranking.

Transition probability \(\beta \) . In this experiment we evaluate the dependence of the resulting ranking and the speed of convergence on the transition probability \(\beta \). The plots in Fig. 4 show that lower transition probability \(\beta \) corresponds to slower convergence rate. On the other hand, smaller values of \(\beta \) produce better correlated rankings. This behavior is intuitive, as a lower value for \(\beta \) implies accumulation of more information regarding the possible walks, which in turn implies a slower convergence rate.

Adaptation to concept drifts. In this experiment we test whether temporal PageRank is adaptive to concept drifts. We start with a temporal network sampled from some static network \(G_s ^1=(V,E_s,w _1)\). After sampling m temporal edges \(E _1\), we change the weights of the static graph and sample another m temporal edges \(E _2\) from \(G_s ^2=(V,E_s,w _2)\). A final sequence of m edges \(E _3\) is sampled from \(G_s ^3=(V,E_s,w _3)\). We run our algorithm on the concatenated sequence \(E =\langle E _1,E _2,E _3\rangle \), without a priori personalization. On Figure 5 we report correlation with the corresponding ground-truth static PageRank. The transition probability \(\beta \) is set to 0.5. In all cases, temporal PageRank is able to adapt to the changing distribution quite fast. Note however, that the previous history is not completely eliminated and for each change of the distribution an increasing number of edges is required to reach a certain correlation level.

Random scans. In the last experiment, given a static graph \(G_s =(V,E_s,w)\) we generate a sequence of temporal \(E\) by scanning the edges \(E_s\) in random order several times. Figure 6 shows that as the number of scans increasing, our estimate for temporal PageRank converges to the static PageRank of the graph. We see that the correlation obtains high values even after a few (around 10) scans. This experiments suggests a very simple and efficient algorithm to compute the static PageRank of a graph, by running our algorithm on a small number of linear scans (randomly ordered) on the graph edges.

5 Related Work

PageRank is one of the most popular measures for ranking the nodes of a network according to their importance. The original idea was introduced by Page and Brin [20] for application to web search, and since then it is widely used as a graph-mining tool. As the size of typical networks has increased significantly over the last years, and as networks tend to grow and evolve fast, research on designing scalable algorithms for computing PageRank is still active [16].

A different line of research is dedicated to efficient approaches for updating PageRank in dynamic and/or online scenarios [4, 5, 12, 19, 22]. The term “dynamic” is typically used to refer to the model of edge additions and deletions. However, we discussed in the introduction, even in these dynamic settings PageRank is defined as a stationary distribution over a static graph (the current graph). Another research direction uses temporal information to calculate weights of edges of a static graph [10, 17].

On the contrary, temporal PageRank intends to capture the continuous interaction between individuals. Temporal PageRank is defined over temporal networks [9, 18], where each edge has an associated time-stamp recording an interaction at that point. To our knowledge there is no published work, which considers temporal generalization of PageRank. The closest work is dedicated to Bonacich’s centrality [15]. It focuses on empirical study of a citation network with coarse snapshots, aggregated over a year. In contrast, we are interested in theoretical relation between temporal and static PageRanks and test our methods on several networks with fine granularity.

The static Pagerank definition has multiple interpretations, extensively discussed in a survey by Langville et al. [14]. Our definition of temporal PageRank has a random walk-based interpretation inspired by the one given for static PageRank [3]. Methodologically, the closest papers to our work, are Monte-Carlo simulation algorithms [2] and PageRank calculation by local updates [1, 7].

6 Concluding Remarks

We proposed a generalization of static PageRank for the case of temporal networks. The novelty of our approach relies on the fact that we explicitly take into account the exact time that nodes interact, which leads to more accurate ranking. The main feature of the generalization is that it takes into account structural network changes, and models the fact that the importance of nodes may change during the lifetime of the network, according to changes in the distribution of edges. Additionally, we showed that if the distribution of edges remains stable, the temporal PageRank converges to the static PageRank. We provided an efficient algorithm to calculate temporal PageRank and demonstrated its quality and convergence rate through multiple experiments on diverse datasets.