mathematical analysis of google pagerank

34
Definition of PageRank Computation of PageRank The effect of new links Choosing PageRank damping factor Reducing the value of c Mathematical Analysis of Google PageRank Konstantin Avrachenkov INRIA Sophia Antipolis, France Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Upload: others

Post on 11-Feb-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Mathematical Analysis of Google PageRank

Konstantin Avrachenkov

INRIA Sophia Antipolis, France

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 2: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Ranking Answers to User Query

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 3: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Ranking Answers to User Query

How a search engine should sort the retrieved answers?

Possible solutions: (a) use the frequency of the searched terms inthe Web page, (b) analyse the log files,... These solutions mightbe not objective.

An original idea of Google is based on two observations:

1 The more pages point to a Web page, the more important thepage is.

2 If more important Web pages point to the page, the page iseven more important.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 4: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Web Graph

Consider the Web as a directed graph:

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 5: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Random surfer PageRank Definition

Consider a random surfer who, with probability c (=0.85) follows arandomly chosen outgoing link, otherwise, with probability 1− cjumps to a completely random page.

Then, PageRank πi of page i is the long run fraction of time thata random surfer spends on page i .

The dynamics of random surfer can be described using Markovchains.

Markov chains definition

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 6: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Formal PageRank Definition

Let n be the total number of pages on the Web (n ≈ 8× 109).

Define the hyperlink matrix P = {pij}ni ,j=1 as follows:

pij = 1/di , if j is one of the di outgoing links of i ,

pij = 1/n, if di = 0 (dangling node),

pij = 0, otherwise.

The transitions of “easily bored surfer” corresponds to thefollowing perturbed Google matrix

P̃ = cP + (1− c)(1/n)E ,

where E is an n × n matrix consisting of one’s, c = 0.85.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 7: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Formal PageRank Definition

Then, the PageRank vector is a solution of

πP̃ = π, π1 = 1,

or, equivalently, in the component form

πi =∑

j → i

c

djπj +

1− c

n,∑

i

πi = 1.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 8: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Example

P =

0 0.5 0.5 0 0

0.2 0.2 0.2 0.2 0.20.2 0.2 0.2 0.2 0.20.5 0 0 0 0.50 0 0 1 0

π =

[0.1982 0.1731 0.1731 0.2573 0.1982

]Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 9: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Power Method

Even though this is a well kept secret, it seems that Google stilluses the simple power iteration method for PageRank computation

π(k+1) = cπ(k)P + (1− c)1

n1T , π(0) =

1

n1T .

It can be easily estimated that using the constant c = 0.85 Googleachieves the tolerance level (measured by the residualπ(k+1) − π(k)) of 10−3 − 10−5 for only 50-100 iterations.

But even this small number of iterations takes Google about aweek to update the PageRank...

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 10: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Monte Carlo Method

Run random surfer process (Xt)t≥0, m times from each page,terminating at each step with probability 1− c . Evaluate πj asπ̄j =[fraction of time spent in j ].

It turns out the one iteration of Monte Carlo method (m = 1) issufficient to estimate well the PageRank of important pages.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 11: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Monte Carlo Method

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 12: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Advantages of MC Method in respect to PI Method

Monte Carlo method has natural parallel implementation;

Monte Carlo method provides good estimation of thePageRank for important pages already after one iteration;

Monte Carlo method allows one to perform continuous updateof the PageRank as the structure of the Web changes.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 13: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Decomposition based on SCC

It is known that the Web Graph consistes of many disjoint StronglyConnected Components (SCCs). This fact implies that thehyperlink matrix has the following form

P =

P1 · · · 0...

. . ....

0 · · · PN

,where the elements of diagonal blocks PI , I = 1, ...,N, correspondto links inside the I -th SCC. Denote by nI the size of the I -th SCC.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 14: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Decomposition based on SCC

For each block I , define the Google matrixP̃I = cPI + (1− c)(1/nI )E ,and let vector πI be the PageRank of SCC I such that

πI P̃I = π, πI 1 = 1.

Then the following theorem holds.

Theorem

The PageRank π is given by

π = ((n1/n)π1, (n2/n)π2, . . . , (nN/n)πN). (1)

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 15: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

To what extend a page can control its PageRank?

Let us give a rough estimation by how much a page can control itsPageRank by modifying its outgoing links.

Define a discrete-time absorbing Markov chain {Xt , t = 0, 1, . . .}with the state space {0, 1 . . . , n}, where transitions between thestates 1, . . . , n are conducted by the matrix cP, and the state 0 isabsorbing.

Let Nj be the number of visits to state j = 1, . . . , n beforeabsorption. Then, denote zij := E(Nj |X0 = i).

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 16: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

To what extend a page can control its PageRank?

Let qji be the probability to reach the state i before absorption ifthe initial state is j .

We have the following decomposition result:

Theorem

The PageRank of page i = 1, . . . , n is given by

πi =1− c

nzii

1 +n∑

j=1j 6=i

qji

, i = 1, . . . , n. (2)

Proof

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 17: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

To what extend a page can control its PageRank?

The decomposition formula (2) represents the PageRank of page ias a product of three multipliers where only the term zii dependson the outgoing links of page i .

Hence, by changing the outgoing links, a page can control itsPageRank up to a multiple factor

zii = 1/(1− qii ) ∈ [1, 1/(1− c2)],

where qii ∈ [0, c2] is a probability to return back to i starting fromi before absorption.

Note that the upper bound 1/(1− c2) (approximately 3.6 forc = .85) is hard or rather not possible to achieve...

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 18: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

To what extend a page can control its PageRank?

We note that even a threefold increase of the PageRank might notbe considered as a significant improvement, since Google measuresthe PageRank on a logarithmic scale.

Next we show how a Web page should use its scarce resources toincrease its PageRank.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 19: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Optimal Linking Strategy

Let us show that there exists in fact an optimal linking strategy.

Consider a page i = 1, . . . , n and assume that i has links to thepages i1, . . . , ik where il 6= i for all l = 1, . . . , k .

Then for the mean return time, we have

µii = 1 +c

k

k∑l=1

µil i +1

n(1− c)

n∑j=1j 6=i

µji , (3)

where µij is the mean first passage time from page i to page j andc is the Google constant.

Since πi = 1/µii , the objective now is to choose k and i1, . . . , iksuch that µii becomes as small as possible.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 20: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Optimal Linking Strategy

From (3) one can see that µi is a linear function of µji ’s.Moreover, outgoing links from i do not affect µji ’s.

Thus, the best what one can do is to link only to one Web page j∗

such thatµj∗i = min

j{µji}.

Note that (surprisingly) the PageRank of j∗ plays no role here.

Still, as was already mentioned, we need to admit that a Web pageowner has very limited control of his/her PageRank.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 21: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

The Bowtie structure of the Web graph

A. Broder et al. 2000 and R. Kumar et al. 2000 have observedthat the Web Graph has a Bowtie structure.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 22: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Maximizing the mass of SCC

One can choose the damping factor c to maximize the totalPageRank mass of SCC:

However, the factor c becomes to close to one. Is it good?

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 23: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

More detailed structure of the Web graph

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 24: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

By renumbering the nodes, the transition matrix P can be thentransformed to the following form

P =

[Q 0R T

], (4)

where

the block T corresponds to the Extended SCC,

the block Q corresponds to the part of the OUT componentwithout dangling nodes and their predecessors,

and the block R corresponds to the transitions from ESCC to thenodes in block Q.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 25: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

As was observed by Moler 2003, the PageRank vector can beexpressed by the following formula

π =1− c

n1T [I − cP]−1. (5)

If we substitute the expression (4) for the transition matrix P into(5), we obtain the following formula for the part of the PageRankvector corresponding to the nodes in ESCC:

πT =1− c

n1T [I − cT ]−1 = α(1− c)uT [I − cT ]−1, (6)

where α = nT/n and nT is the number of nodes in ESCC, andwhere uT is the uniform distribution over all ESCC nodes.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 26: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

First, we note that since matrix T is substochastic, the inverse[I − T ]−1 exists and consequently πT → 0 as c → 1.

Clearly, it is not good to take the value of c too close to one.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 27: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

It follows that the value of c should not be chosen in the criticalregion where the PageRank mass of the ESCC component israpidly decreasing.

Luckily, the shape of the function ||πT (c)||1 is such that itdecreases drastically only when c is really close to one, whichleaves a lot of freedom for choosing c .

In particular, the famous Google constant c = 0.85 is small enoughto ensure a reasonably large PageRank mass of ESCC.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 28: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

However, as we have observed in numerical experiments, evenmoderately large values of c result in an unfairly large PageRankmass of the Pure OUT component.

Now, our goal is to find the values of c that lead to a “fair”distribution of the PageRank mass between the Pure OUT and theESCC components.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 29: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Let v be some probability vector over ESCC. We would like tochoose c = c∗ that satisfies the condition

||πT (c)|| = ||vT ||, (7)

that is, starting from v , the probability mass preserved in ESCCafter one step should be equal to the PageRank of ESCC.

Reasonable choices of v :

1 π̂T , the quasi-stationary distribution of T ,

2 the uniform vector u,

3 the normalized PageRank vector πT (c)/||πT (c)||.

All three criteria indicate that c = 1/2 seems to be quite a goodchoice.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 30: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Experiments with the log files

c PR rank w/o link PR rank with link rank by no. of clicks

Node A

0.5 1648 2307 25880.85 731 2101 25880.95 226 2116 2588

Node B

0.5 1648 4009 36490.85 731 3279 36490.95 226 3563 3649

Table: Comparison between PR and click based rankings.

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 31: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Recommendations for Web Page Design

Now we can suggest the following recommendations for Web PageDesign:

1 The more pages a Web site has, the better.

2 Link all pages inside a Web site to the main page. This waythe main page will have a significant weight.

3 Give hyperlinks to the Departement and Institution Web sites.

4 Do not make inappropriate links.

And, of course, one should not forget that content still matters forGoogle. There is really no substitute for good original content...

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 32: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Thank you!

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 33: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

Markov Chain Definition

Discrete-time discrete-state Markov chain is a stochastic process{Xn}∞n=0 on the set of states S = {1, 2, ..., |S |} such that

P{Xn+1 = j} =∑i∈S

P{Xn+1 = j |Xn = i}P{xn = i}.

We denote pij := P{Xn+1 = j |Xn = i} and call {pij}|S|i ,j=1 the

matrix of transition probabilities.return

Konstantin Avrachenkov Mathematical Analysis of Google PageRank

Page 34: Mathematical Analysis of Google PageRank

Definition of PageRankComputation of PageRank

The effect of new linksChoosing PageRank damping factor

Reducing the value of c

To what extend a page can control its PageRank?

Proof: It follows from (??) that

πi =1− c

n1T [I − cP]−1ei =

1− c

n

n∑j=1

zji . (8)

Next, we note that for any i , j = 1, . . . , n; i 6= j , we have

zji = qjizii ,

and consequently, substituting the last equation in (8) we obtain(2). Q.E.D.

return

Konstantin Avrachenkov Mathematical Analysis of Google PageRank