google’s billion dollar eigenvector gerald kruse, phd. associate professor of mathematics and...

35
Google’s Billion Google’s Billion Dollar Eigenvector Dollar Eigenvector Gerald Kruse, PhD. Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Associate Professor of Mathematics and Computer Science Science Juniata College Juniata College Huntingdon, PA Huntingdon, PA [email protected] [email protected] http://faculty.juniata.edu/kruse http://faculty.juniata.edu/kruse

Post on 19-Dec-2015

226 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Google’s Billion Dollar Google’s Billion Dollar EigenvectorEigenvector

Gerald Kruse, PhD.Gerald Kruse, PhD.Associate Professor of Mathematics and Computer ScienceAssociate Professor of Mathematics and Computer Science

Juniata CollegeJuniata CollegeHuntingdon, PAHuntingdon, PA

[email protected]@juniata.eduhttp://faculty.juniata.edu/krusehttp://faculty.juniata.edu/kruse

Page 2: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

But first, a brief mention of the But first, a brief mention of the exchange agreement between Juniata exchange agreement between Juniata

and FH-Muensterand FH-MuensterFacultyFaculty

StudentsStudentsJuniataJuniata FH-MuensterFH-Muenster

Tim AumanTim Auman Robin SegglemannRobin Segglemann

Mike LinkMike Link Frank VolkmerFrank Volkmer

???? Sascha HlusiakSascha Hlusiak

???? Morin OstkampMorin Ostkamp

Page 3: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

A “taste” of Juniata College and its A “taste” of Juniata College and its IT/CS DepartmentIT/CS Department

Juniata College is located Juniata College is located in central Pennsylvania, in in central Pennsylvania, in the eastern U.S., a 3 hour the eastern U.S., a 3 hour drive (this is considered drive (this is considered “close” in America) from: “close” in America) from: Baltimore, Washington, Baltimore, Washington, DC, Philadelphia, and DC, Philadelphia, and Pittsburgh.Pittsburgh.

1500 students, 45% male / 1500 students, 45% male / 55% female, 55% female, predominantly residential predominantly residential campus, Liberal Arts campus, Liberal Arts curriculum, reputation as curriculum, reputation as strong in the sciences.strong in the sciences.

Page 4: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

IT/CS @ JuniataIT/CS @ Juniata

Information Technology at Juniata is multi-disciplinary, with Information Technology at Juniata is multi-disciplinary, with courses and faculty also a part of the Computer Science, courses and faculty also a part of the Computer Science, Business, Communication, Criminal Justice, and Business, Communication, Criminal Justice, and Environmental Sciences departments.Environmental Sciences departments.

Between 10 and 20 IT and CS majors graduate each year, Between 10 and 20 IT and CS majors graduate each year, with many more choosing to minor (8 course sequence).with many more choosing to minor (8 course sequence).

IT at Juniata is characterized by a 3 semester “Innovations IT at Juniata is characterized by a 3 semester “Innovations for Industry” sequence (abbreviated as I4I).for Industry” sequence (abbreviated as I4I).

Page 5: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Brumbaugh AcademicBrumbaugh Academic Center Center

Page 6: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

von Liebig Science Centervon Liebig Science Center

Page 7: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Innovations for Industry Meeting Innovations for Industry Meeting RoomRoom

Page 8: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

C – 102 ClassroomC – 102 Classroom

Page 9: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Digital Media “Green Room”Digital Media “Green Room”

Page 10: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Now, back to Search Engines…Now, back to Search Engines…

What must they do?What must they do?

Crawl the web and locate all public pagesCrawl the web and locate all public pages

Index the “crawled” data so it can be searchedIndex the “crawled” data so it can be searched

Rank the pages for more effective Rank the pages for more effective searchingsearching ( the focus of this talk ) ( the focus of this talk )

Page 11: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

PageRankPageRank is NOT a simple citation is NOT a simple citation indexindex

NOTE:NOTE: While While PageRankPageRank is an important part of Google’s is an important part of Google’s search results, it is not the sole means used to rank pages.search results, it is not the sole means used to rank pages.

A B

Which is the more popular page below, A or B?Which is the more popular page below, A or B?

What if the links to A were from unpopular pages, and the What if the links to A were from unpopular pages, and the one link to B was from one link to B was from www.yahoo.comwww.yahoo.com ? ?

Page 12: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Intuitively Intuitively PageRankPageRank is analogous is analogous to popularityto popularity

The web as a graph: each page is a The web as a graph: each page is a vertexvertex, each , each hyperlink a directed hyperlink a directed edgeedge..A page is popular if a few very popular pages point (via A page is popular if a few very popular pages point (via hyperlinks) to it.hyperlinks) to it.A page could be popular if many not-necessarily A page could be popular if many not-necessarily popular pages point (via hyperlinks) to it.popular pages point (via hyperlinks) to it.

1BNPage A Page B

Page C

2AN

1CN

Which of these three would have the highest page rank?

Page 13: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

So what is the mathematical So what is the mathematical definition of definition of PageRankPageRank??

In particular, a page’s rank is equal to the sum In particular, a page’s rank is equal to the sum of the ranks of all the pages pointing to it. of the ranks of all the pages pointing to it.

note the scaling of each page ranknote the scaling of each page rank

vfromlinksofnumberN

utolinkswithpagesofsetB

N

vRankuRank

v

u

Bv vu

)()(

Page 14: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Writing out the equation for each Writing out the equation for each web-page in our example gives:web-page in our example gives:

1BNPage A Page B

Page C

2AN

1CN

01

)(

2

)()(

002

)()(

1

)(00)(

BRankARankCRank

ARankBRank

CRankARank

Page 15: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Even though this is a circular definition we can Even though this is a circular definition we can calculate the ranks.calculate the ranks.Re-write the system of equations as a Matrix-Re-write the system of equations as a Matrix-Vector product.Vector product.

)(

)(

)(

012

1

002

1

100

)(

)(

)(

CRank

BRank

ARank

CRank

BRank

ARank

The The PageRankPageRank vector is simply an eigenvector of the vector is simply an eigenvector of the coefficient matrix, with coefficient matrix, with xAx

1

Page 16: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

1BNPage A Page B

Page C

2AN

1CN

PageRank = 0.4

PageRank = 0.4

PageRank = 0.2

Note: we choose the eigenvector with Note: we choose the eigenvector with 11x

Page 17: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Note that the coefficient matrix is Note that the coefficient matrix is column-stochasticcolumn-stochastic**

1

10,

211

321

2232221

1131211

njjj

n

iij

ij

nnnnn

n

n

aaaa

a

aaaa

aaaa

aaaa

Every column-stochastic matrix has 1 as an eigenvalue.Every column-stochastic matrix has 1 as an eigenvalue.

** As long as there are no “dangling nodes” and the graph is As long as there are no “dangling nodes” and the graph is connected.connected.

Page 18: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

In Page, Brin, et. al. [1], they suggest dangling nodes most likely In Page, Brin, et. al. [1], they suggest dangling nodes most likely would occur from pages which haven’t been crawled yet, and so would occur from pages which haven’t been crawled yet, and so they “simply remove them from the system until all the they “simply remove them from the system until all the PageRankPageRanks are calculated.”s are calculated.”

It is interesting to note that a column-substochastic does have a It is interesting to note that a column-substochastic does have a positive eigenvalue and corresponding eigenvector with positive eigenvalue and corresponding eigenvector with non-negative entries, which is called the Perron eigenvector, as non-negative entries, which is called the Perron eigenvector, as detailed in Bryan and Leise [2].detailed in Bryan and Leise [2].

Dangling Nodes have no outgoing linksDangling Nodes have no outgoing links

Page B

Page A

Page C

02/12/1

002/1

02/10In this example, Page C is a In this example, Page C is a dangling node. Note that its dangling node. Note that its associated column in the associated column in the coefficient matrix is all 0. coefficient matrix is all 0. Matrices like these are called Matrices like these are called column-substochasticcolumn-substochastic..

1

Page 19: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

In this example, the eigenspace assiciated with In this example, the eigenspace assiciated with eigenvalue is two-dimensional. Which eigenvalue is two-dimensional. Which eigenvector should be used for ranking? eigenvector should be used for ranking?

A disconnected graph could lead to A disconnected graph could lead to non-unique rankingsnon-unique rankings

Page D

Page C

Page E

Page B

Page A

00000

2/10100

2/11000

00001

00010Notice the block Notice the block diagonal structure diagonal structure of the coefficient of the coefficient matrix. matrix. Note:Note: Re-ordering Re-ordering via permutation via permutation doesn’t change the doesn’t change the ranking, as in [2].ranking, as in [2].

1

Page 20: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Add a “random-surfer” term to the Add a “random-surfer” term to the simple simple PageRankPageRank formula. formula.

This models the behavior of a real web-surfer, who might jump to another This models the behavior of a real web-surfer, who might jump to another page by directly typing in a URL or by choosing a bookmark, rather than page by directly typing in a URL or by choosing a bookmark, rather than clicking on a hyperlink. Originally, clicking on a hyperlink. Originally, m=0.15m=0.15 in Google, according to [2]. in Google, according to [2].

can also be written as:can also be written as:

mSAmM )1(

Let Let SS be an be an nn x x nn matrix with all entries matrix with all entries 1/n1/n. . SS is column- is column-stochastic, and we consider the matrix stochastic, and we consider the matrix M M , which is a , which is a weighted average of weighted average of AA and and SS. .

smxAmx )1(xMx

Important NoteImportant Note: : We will use this formulation with We will use this formulation with AA when computing when computing x x ,,

and and ss is a column vector with all entries is a column vector with all entries 1/n1/n, where if , where if sxS 1ix

Page 21: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

The eigenspace associated with is one-The eigenspace associated with is one-dimensional, and the normalized eigenvector isdimensional, and the normalized eigenvector is

MM for our previous disconnected for our previous disconnected graph, with graph, with m=0.15m=0.15

Page D

Page C

Page E

Page B

Page A

03.003.003.003.003.0

455.003.088.003.003.0

455.088.003.003.003.0

03.003.003.003.088.0

03.003.003.088.003.0

1

So the addition of the random surfer term permits So the addition of the random surfer term permits comparison between pages in different subwebs.comparison between pages in different subwebs.

)03.0,285.0,285.0,2.0,2.0(

Page 22: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

By many estimates, the web currently contains at least 8 billion By many estimates, the web currently contains at least 8 billion pages. How does Google compute an eigenvector for pages. How does Google compute an eigenvector for something this large?something this large?

One possibility is the power method.One possibility is the power method.

In [2], it is shown that every positive (all entries are > 0) In [2], it is shown that every positive (all entries are > 0) column-stochastic matrix column-stochastic matrix MM has a unique vector has a unique vector qq with positive with positive

components such that components such that MqMq = = qq, with , and it can be, with , and it can be

computed as , for any initial guess withcomputed as , for any initial guess with

positive components and .positive components and .

Iterative CalculationIterative Calculation

11q

0lim xMq k

k

0x

110 x

Page 23: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Rather than calculating the powers of M directly, we could use Rather than calculating the powers of M directly, we could use the iteration, .the iteration, .

Since M is positive, would be an calculation. Since M is positive, would be an calculation.

As we mentioned previously, Google uses the equivalent As we mentioned previously, Google uses the equivalent expression in the computation:expression in the computation:

These products can be calculated without explicitly creating These products can be calculated without explicitly creating the huge coefficient matrix, since the huge coefficient matrix, since AA contains mostly 0’s. contains mostly 0’s.

The iteration is guaranteed to converge, and it will converge The iteration is guaranteed to converge, and it will converge quicker with a better first guess, so the previous quicker with a better first guess, so the previous PageRankPageRank vector is used as the initial vector. vector is used as the initial vector.

Iterative Calculation continuedIterative Calculation continued

1 kk xMx

1kxM

)( 2nO

smxAmx kk

1)1(

Page 24: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

““Google-ing” GoogleGoogle-ing” Google

Page 25: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Results in an early paper from Page, Brin et. al. Results in an early paper from Page, Brin et. al. while in graduate schoolwhile in graduate school

Page 26: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Attempts to Manipulate Search ResultsAttempts to Manipulate Search Results Via a “Google Bomb”Via a “Google Bomb”

Page 27: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Liberals vs. Conservatives!Liberals vs. Conservatives!

Page 28: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Juniata’s own “Google Bomb”Juniata’s own “Google Bomb”

Page 29: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

At Juniata, CS 315 is my “Analysis and At Juniata, CS 315 is my “Analysis and Algorithms” courseAlgorithms” course

Page 30: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

““Ego Surfing”Ego Surfing”Be very careful…Be very careful…

Page 31: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

More than one Gerald Kruse…More than one Gerald Kruse…

Page 32: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Miscellaneous pointsMiscellaneous pointsTry a search in Google on “PigeonRank.”Try a search in Google on “PigeonRank.”

What types of sites would Google NOT give good results What types of sites would Google NOT give good results on?on?

PageRankPageRank is not the only means Google uses to order is not the only means Google uses to order search results.search results.

This exchange has been a wonderful opportunity for me This exchange has been a wonderful opportunity for me professionally and personally with my family (wife Lisa, professionally and personally with my family (wife Lisa, children Olivia, Peter, and Isabel)children Olivia, Peter, and Isabel)

Page 33: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

BibliographyBibliography

[1] S. Brin, L. Page, et. al., [1] S. Brin, L. Page, et. al., The PageRank Citation Ranking: Bringing The PageRank Citation Ranking: Bringing Order to the WebOrder to the Web, , http://dbpubs.stanford.edu/pub/1999-66http://dbpubs.stanford.edu/pub/1999-66 , Stanford , Stanford Digital Libraries Project (January 29, 1998).Digital Libraries Project (January 29, 1998).

[2] K. Bryan and T. Leise, [2] K. Bryan and T. Leise, The $25,000,000,000 Eigenvector: The The $25,000,000,000 Eigenvector: The Linear Algebra behind GoogleLinear Algebra behind Google, SIAM Review, 48 (2006), pp. 569-581., SIAM Review, 48 (2006), pp. 569-581.

[3] G. Strang, [3] G. Strang, Linear Algebra and Its ApplicationsLinear Algebra and Its Applications, Brooks-Cole, , Brooks-Cole, Boston, MA, 2005.Boston, MA, 2005.

[4] D. Poole, [4] D. Poole, Linear Algebra: A Modern IntroductionLinear Algebra: A Modern Introduction, Brooks-Cole, , Brooks-Cole, Boston, MA, 2005.Boston, MA, 2005.

Page 34: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

Any Questions?Any Questions?

Slides available at Slides available at http://faculty.juniata.edu/krusehttp://faculty.juniata.edu/kruse

Page 35: Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. Associate Professor of Mathematics and Computer Science Juniata College Huntingdon, PA kruse@juniata.edu

This gives a regular matrixThis gives a regular matrix

In matrix notation we haveIn matrix notation we have

Since Since we can rewrite as we can rewrite as

The new coefficient matrix is regular, so we can calculate The new coefficient matrix is regular, so we can calculate the eigenvector iteratively.the eigenvector iteratively.

This iterative process is a series of matrix-vector products, This iterative process is a series of matrix-vector products, beginning with an initial vector (typically the previous beginning with an initial vector (typically the previous PageRankPageRank vector). These products can be calculated vector). These products can be calculated without explicitly creating the huge coefficient matrix. without explicitly creating the huge coefficient matrix.

EARR

11R

REEnoteREAR )1(:,))1((