Link Graph Encyclopedia

PageRank in depth

Monte Carlo PageRank

Estimate PageRank by actually running random surfers and counting their visits. A few walks per node rank the important nodes well, the walks parallelise trivially, and they can be updated as links change.

The random surfer story can be run literally. Launch surfers, let each follow random links until it decides to teleport, and count how often each node is visited. The visit frequencies estimate PageRank. Avrachenkov, Litvak, Nemirovsky and Osipova analysed such estimators in 2007 and found, as their title put it, that “one iteration is sufficient”: a single short walk from every node already ranks the important nodes well. Monte Carlo methods trade precision on unimportant nodes for simplicity, trivial parallelism and cheap updates, and they are the standard way to compute personalized PageRank for many seeds at once.

The estimators

Each walk starts at a node, and at every step it stops with probability 1−α1 - \alpha; otherwise it follows a random out-link, or jumps to a random node if it stands on a dangling node. The number of steps is geometric, with mean α/(1−α)≈5.7\alpha/(1 - \alpha) \approx 5.7 for α=0.85\alpha = 0.85.

Both estimators are unbiased. The complete-path method with walks from every node is the one Avrachenkov and colleagues recommended.

Worked example

On the running example, with RR walks from each of the 7 nodes:

Walks per node Total steps C A G B Largest error
1 48 0.292 0.188 0.208 0.104 0.034
10 453 0.294 0.181 0.203 0.135 0.026
100 4,456 0.302 0.211 0.168 0.144 0.010
1,000 46,939 0.297 0.202 0.179 0.138 0.003
10,000 466,370 0.297 0.205 0.177 0.139 0.001
exact 0.298 0.205 0.177 0.138

One walk per node, 48 steps in all, already identifies C as the top node. The error shrinks like 1/R1/\sqrt{R}: a hundred times more walks buy ten times more precision. Exact power iteration needs about 43 passes over 10 arcs to reach 10−1210^{-12}, so on this tiny graph sampling is no bargain. On a graph of billions of arcs, where one pass is expensive and only the top of the ranking matters, it can be.

Why the top is easy and the tail is hard

For a node with PageRank pp, the number of visits among NN total steps is roughly Poisson with mean NpNp, so the relative error is about 1/Np1/\sqrt{Np}. A node with ten times the average PageRank gets ten times the visits and 10\sqrt{10} times better relative precision. With one walk per node on a graph of nn nodes, each walk makes 1/(1−α)≈6.71/(1-\alpha) \approx 6.7 visits counting its start, so N≈6.7nN \approx 6.7n and a node at the average score 1/n1/n gets about 7 visits, a relative error near 40%. A node at a thousand times the average gets 6,700 visits and an error near 1.2%. This matches what rankings need: precise positions at the top, rough positions in the tail.

Advantages

Disadvantages

Where it is used

Monte Carlo methods power personalised recommendation and “who to follow” systems on social graphs, where millions of seeds each need their own personalised ranking and the graph changes every second. For a static global ranking of a crawl, like Common Crawl’s, deterministic solvers remain the norm because every node gets a precise and reproducible score.

References

Edit this entry on GitHub