PageRank

A page is important if important pages point at it, which is circular. The circle closes if you guess and then iterate. What the paper printed, and what the paper says about what it printed, are two different things.

A graph, iterated, and the total at the end

1 A handful of pages pointing at each other

Four pages, chosen by searching every four-page graph for one where the answer disagrees with counting links. A has three pages pointing at it and B has two, and B still wins, because A hands its whole rank to B while A's three backlinks are all split shares from pages that point elsewhere as well.

2 Each shares what it has, split between its links

This is the C(T) in the formula: the number of links going out of a page. A page does not give its whole rank to everything it points at, it divides it. Pointing at everything is therefore worth less per link than pointing at one thing.

    3 Run it again until the numbers stop moving

      Settled after 39 rounds, when no page moved by more than 1e-12. The order stopped changing long before the numbers did.

      4 The published formula against the one everyone writes

      The only difference between the two is the constant term: the paper prints (1−d), and every implementation since writes (1−d)/N. Watch the totals rather than the ranks.

      pages 4d 0.85paper total 4.000000corrected total 1.000000

      The paper's formula totals 4.000000 on 4 pages. Its own next sentence says the total will be one. The form everyone writes instead totals 1.000000. Both put the pages in the same order, so what the paper printed is not a worse ranking, it is the same ranking scaled by 4.

      Checked on this graph: both forms rank the pages identically, and every page's paper value divided by its corrected value is 4.000000, the same for all 4 of them to within 4.4e-12. That is why the discrepancy went unnoticed: it is a scale factor, not an error in the ranking.

      Checked when this page loaded, on a graph of 4 pages with no dead end: the formula as printed in the paper sums to 4.000000, 4.000000, 4.000000 at d = 0.5, 0.85 and 0.99, which is 4 every time and does not depend on d at all. The form everyone writes instead sums to 1.000000. The paper's own next sentence says the total will be one, so the formula printed above that sentence is not the formula the sentence describes.

      What the paper says, in the paper's own words

      Brin and Page, The Anatomy of a Large-Scale Hypertextual Web Search Engine, at the seventh World Wide Web conference in Brisbane in April 1998. Section 2.1.1 defines the thing, and this is the definition as printed:

      PR(A) = (1-d) + d (PR(T1)/C(T1) + ... + PR(Tn)/C(Tn))

      Note that the PageRanks form a probability distribution over web pages, so the sum of all web pages’ PageRanks will be one.

      Take the sum of that formula over every page. Each page contributes a constant (1−d), and there are N pages, so the constants alone contribute N(1−d). The other term redistributes rank that already exists without creating or destroying any of it, so it contributes d times the total. Writing S for the total: S = N(1−d) + dS, which rearranges to S = N. Not one, and not approximately one. Exactly the number of pages, for any d below 1, which is why moving the slider above does not move the total.

      Replace the constant with (1−d)/N and the same arithmetic gives S = 1, which is what the sentence says. That is the form in every textbook and every implementation, and it is almost never presented as a correction to the paper.

      Why this is not a mistake anybody noticed

      Because it does not change a single ranking. The two forms differ by a factor of exactly N on every page at once, so they sort in the same order, and a search engine only ever needed the order. The page checks this rather than claiming it: the line above reports every page's paper value divided by its corrected value, and they are all the same number.

      So the honest statement is narrow, and worth being careful about. The formula as printed does not compute a probability distribution. It computes something proportional to one, which is all the surrounding system used. What is wrong is the sentence, not the ranking.

      The second reason the sum is not one

      Press the button above and D stops pointing anywhere. A page with no outgoing links has nothing to divide its rank between, so its share does not go anywhere at all: it leaves the graph. Now neither form totals what it should, and the corrected one falls under one.

      Real crawls are full of these. A PDF, an image, a page that only gets linked to. The paper does not say what to do about them, and the usual answers are to pretend a dead end links to every page, or to drop dead ends and reinstate them afterwards. Both are choices, and neither is in the document this page is reading.

      What is real here, and what is not

      This is not a claim that PageRank is wrong

      It is a claim about one sentence. The formula as printed ranks pages exactly as the corrected version does, because the two differ by a constant factor across every page at once, and the page checks that on whatever graph is on screen rather than asserting it. If the check ever fails, the line says so and the rest of this page should be distrusted. What the printed formula does not do is produce numbers that sum to one, which is what the sentence beneath it promises.

      The paper contradicts itself a second time, about d itself

      Section 2.1.2 says:

      And, the d damping factor is the probability at each page the "random surfer" will get bored and request another random page.

      In the formula, d multiplies the term that follows links, and the constant that does not follow links is (1−d). So in the formula d is the probability of following a link, and the sentence describes it as the probability of not following one. With the paper's own value of 0.85 the sentence would mean a reader who abandons the page they are on 85% of the time. This one is a description that does not match the arithmetic beside it, and unlike the total it changes nothing if you read the formula and ignore the prose.

      Four pages are not the web

      The paper reports computing PageRank for 26 million pages in a few hours on a workstation of the day, and describes a crawl of 24 million. This page iterates a graph of four in a browser, which makes the arithmetic checkable by hand and makes nothing about scale demonstrable. Nothing here is sparse-matrix work, nothing is distributed, and the convergence behaviour of a four-node graph says little about a web-sized one.

      d = 0.85 is empirical, and the paper says so

      The paper's words are “The parameter d is a damping factor which can be set between 0 and 1. We usually set d to 0.85.” There is no derivation offered and none is implied. The slider here runs 0.05 to 0.95 so the value can be moved, and the thing worth noticing is that moving it changes every rank and does not change the total at all.

      Iterating to a fixed point is not what a search engine does

      This page runs until no page moves by more than 1e-12, which is a definition of done chosen because it is checkable, and then reports how many rounds that took. A production system stops far earlier, because the order settles long before the values do. The paper also notes that PageRank corresponds to the principal eigenvector of the normalised link matrix, so there are direct methods that do not iterate at all; none of them is here.

      PageRank was never the ranking on its own

      The paper describes it as one signal among several, combined with anchor text, proximity, font size and other page-level factors. A page that ranked purely on PageRank is not the system the paper describes, and treating this page's four numbers as an account of how Google works would have been wrong in 1998 and is much more wrong now.

      The paper was read, not read about

      Unlike two other machines on this roster, the primary source is free and was fetched and read: the PDF hosted by the Stanford InfoLab. Both quotations above were taken from the text of that PDF rather than from a secondary account of it, which matters here more than usual, because the entire subject of this page is what the document actually says.

      Sources