Link Graph Encyclopedia

PageRank in depth

The random surfer

The story behind PageRank. A surfer clicks random links, never presses Back, and now and then jumps to a random page; the share of time spent on each page is its PageRank.

Brin and Page explained PageRank with a story. Imagine a surfer who starts on a random page and keeps clicking links chosen at random, never pressing Back. Every so often the surfer gets bored and jumps to a page chosen at random from the whole web. Over a long session, some pages get visited far more often than others. A page’s PageRank is the fraction of time the surfer spends on it. The story is a random walk with one addition, the random jump or teleport, and that addition is what makes the mathematics work on the real web.

The surfer’s rules

At every step, the surfer on page uu:

  1. with probability α\alpha (the damping factor, typically 0.85), clicks one of uu’s d+(u)d^+(u) out-links, each with probability 1/d+(u)1/d^+(u);
  2. with probability 1−α1 - \alpha, teleports to a page chosen uniformly from all nn pages;
  3. if uu has no out-links at all, teleports (see dangling nodes).

The probability of being on page vv after the next step is then

pt+1(v)=1−αn+α∑u→vpt(u)d+(u)+α∑u:d+(u)=0pt(u)n,p_{t+1}(v) = \frac{1 - \alpha}{n} + \alpha \sum_{u \to v} \frac{p_t(u)}{d^+(u)} + \alpha \sum_{u : d^+(u) = 0} \frac{p_t(u)}{n},

and PageRank is the distribution that this step leaves unchanged.

Why the surfer needs to teleport

Without teleportation the walk fails in two ways. On a page with no out-links the surfer is stuck, and on a group of pages that link only to each other it is trapped forever. In the long run, all the probability would collect in such traps: the OUT side of the bow tie, link farms that link only internally, and dead ends. Every other page, including the most popular ones, would end with PageRank zero.

Teleportation repairs both failures. Every page is reachable from every other in one jump, so the chain is irreducible, and the chance of staying put through a jump makes it aperiodic. The Perron–Frobenius theorem then guarantees a unique, strictly positive PageRank vector. It also sets a floor: a page that nothing links to still receives (1−α)/n(1-\alpha)/n from teleports, plus its share of the jumps out of dangling pages.

The number of clicks between two teleports is geometrically distributed: the surfer clicks again with probability α\alpha. With α=0.85\alpha = 0.85, the mean run is α/(1−α)≈5.7\alpha / (1 - \alpha) \approx 5.7 clicks, and a run of 20 or more clicks happens with probability 0.8520≈4%0.85^{20} \approx 4\%. PageRank therefore mostly reflects the link structure within about half a dozen steps of each page. Links far upstream still matter, but their influence fades by a factor of α\alpha per step.

Simulating the surfer

The story is also an algorithm. Release many surfers, let each take a random number of clicks, and count where they end. The counts estimate PageRank, accurately for popular pages after surprisingly few walks. That is Monte Carlo PageRank, and it suits distributed systems and graphs that change constantly. The lab on the PageRank page solves the equations instead, but the scores are the same.

A model, not a user

Real people do not browse this way. They press Back, use bookmarks and search boxes, click prominent links more than footer links, and leave. The random surfer is a modelling device that turns “important pages are linked by important pages” into a well-posed problem, not a description of traffic.

Two lines of work took the user more seriously:

Both keep the stationary-distribution machinery and change only the transition probabilities.

What the story explains about link value

The surfer model gives intuitive answers to practical questions:

These are the intuitions behind most link-building advice, and the reasons a single link from a strong, focused page can outweigh hundreds from link lists (see backlinks).

References

Edit this entry on GitHub