Link Graph Encyclopedia

PageRank in depth

PageRank as a linear system

PageRank is also the solution of a sparse system of linear equations. That view brings faster solvers such as Gauss–Seidel, explains why the problem is well conditioned, and makes PageRank linear in the teleport vector.

Power iteration treats PageRank as an eigenvector problem: find the vector that one surfer step leaves unchanged. The same vector is the solution of a sparse linear system. Del Corso, Gullì and Romani, and Langville and Meyer, worked out the connection in the mid-2000s. The linear view matters for three reasons: it opens the door to faster iterative solvers, it shows that the problem is numerically easy, and it makes PageRank linear in the teleport vector, the property behind personalized PageRank mixtures and spam mass.

From eigenvector to linear system

Let PP be the row-normalised adjacency matrix with empty rows for dangling nodes, and vv the teleport distribution (uniform: v=1⊤/nv = \mathbf{1}^\top / n). Consider the system

x (I−αP)=(1−α) v.x\, (I - \alpha P) = (1 - \alpha)\, v .

Its solution xx is the pseudo-PageRank: probability that reaches a dangling node leaks away instead of jumping, so xx sums to less than 1. Normalising it,

p=xx1,p = \frac{x}{x \mathbf{1}},

gives exactly the PageRank vector in which dangling nodes jump according to vv. In the running example, the pseudo-PageRank sums to 0.42, and dividing by 0.42 recovers the PageRank of C, A, G, B, D, F and E to every digit shown elsewhere in this encyclopedia. Nothing about dangling nodes needs special handling in the solver: they simply contribute nothing to anyone.

A well-behaved system

The matrix I−αPI - \alpha P is about as friendly as a sparse matrix can be:

All classical stationary methods converge on such a system, and the convergence rate is again governed by α\alpha.

Jacobi, Gauss–Seidel and friends

Writing the system node by node gives x(v)=(1−α) vv+α∑u→vx(u)/d+(u)x(v) = (1-\alpha)\,v_v + \alpha \sum_{u \to v} x(u) / d^+(u). The solvers differ in which values of x(u)x(u) they use on the right-hand side:

On the running example, solving to a total change below 10−1210^{-12}:

Method Sweeps
Jacobi on the linear system 61
Gauss–Seidel, nodes in order A to G 26
Gauss–Seidel, nodes in order G to A 39
Power iteration with dangling jumps 43

Gauss–Seidel’s advantage depends on visiting a node’s in-neighbours before the node itself when possible. A good order follows the direction of the links.

Parallel Gauss–Seidel at web scale

Common Crawl computes PageRank with the LAW library’s PageRankParallelGaussSeidel, run on the transposed graph so that each node reads its in-links. The parallel version splits the nodes among threads, and each thread updates its nodes in place, reading whatever values its neighbours currently hold, including values other threads have just written. It is not the sequential Gauss–Seidel method; it mixes old and new values in an order that depends on scheduling. Because the system is diagonally dominant, such asynchronous iterations still converge, and in practice they keep most of Gauss–Seidel’s advantage while using every core.

Linearity and its uses

The linear form makes xx a linear function of the teleport vector: x=(1−α) v (I−αP)−1x = (1 - \alpha)\, v\, (I - \alpha P)^{-1}. Consequences:

References

Edit this entry on GitHub