CS6220: DATA MINING TECHNIQUES

Similar documents
CS6220: DATA MINING TECHNIQUES

CS249: ADVANCED DATA MINING

Data and Algorithms of the Web

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

CS246: Mining Massive Datasets Jure Leskovec, Stanford University.

Link Mining PageRank. From Stanford C246

Slides based on those in:

CS345a: Data Mining Jure Leskovec and Anand Rajaraman Stanford University

Slide source: Mining of Massive Datasets Jure Leskovec, Anand Rajaraman, Jeff Ullman Stanford University.

Google PageRank. Francesco Ricci Faculty of Computer Science Free University of Bozen-Bolzano

CS6220: DATA MINING TECHNIQUES

0.1 Naive formulation of PageRank

Thanks to Jure Leskovec, Stanford and Panayiotis Tsaparas, Univ. of Ioannina for slides

Thanks to Jure Leskovec, Stanford and Panayiotis Tsaparas, Univ. of Ioannina for slides

CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University

CS6220: DATA MINING TECHNIQUES

Introduction to Data Mining

Link Analysis. Stony Brook University CSE545, Fall 2016

CS6220: DATA MINING TECHNIQUES

CS6220: DATA MINING TECHNIQUES

Jeffrey D. Ullman Stanford University

CS145: INTRODUCTION TO DATA MINING

CS145: INTRODUCTION TO DATA MINING

A Note on Google s PageRank

Lab 8: Measuring Graph Centrality - PageRank. Monday, November 5 CompSci 531, Fall 2018

CS 277: Data Mining. Mining Web Link Structure. CS 277: Data Mining Lectures Analyzing Web Link Structure Padhraic Smyth, UC Irvine

Online Social Networks and Media. Link Analysis and Web Search

Google Page Rank Project Linear Algebra Summer 2012

Jeffrey D. Ullman Stanford University

Online Social Networks and Media. Link Analysis and Web Search

1998: enter Link Analysis

CS145: INTRODUCTION TO DATA MINING

CS6220: DATA MINING TECHNIQUES

DATA MINING LECTURE 13. Link Analysis Ranking PageRank -- Random walks HITS

CS249: ADVANCED DATA MINING

Machine Learning CPSC 340. Tutorial 12

Data Mining Techniques

PageRank. Ryan Tibshirani /36-662: Data Mining. January Optional reading: ESL 14.10

Data Mining Recitation Notes Week 3

Page rank computation HPC course project a.y

Introduction to Search Engine Technology Introduction to Link Structure Analysis. Ronny Lempel Yahoo Labs, Haifa

Link Analysis Ranking

Graph Models The PageRank Algorithm

Web Structure Mining Nodes, Links and Influence

Uncertainty and Randomization

Web Ranking. Classification (manual, automatic) Link Analysis (today s lesson)

IR: Information Retrieval

Today. Next lecture. (Ch 14) Markov chains and hidden Markov models

Link Analysis. Reference: Introduction to Information Retrieval by C. Manning, P. Raghavan, H. Schutze

Information Retrieval and Search. Web Linkage Mining. Miłosz Kadziński

ECEN 689 Special Topics in Data Science for Communications Networks

MAE 298, Lecture 8 Feb 4, Web search and decentralized search on small-worlds

Computing PageRank using Power Extrapolation

How does Google rank webpages?

Statistical Problem. . We may have an underlying evolving system. (new state) = f(old state, noise) Input data: series of observations X 1, X 2 X t

CS249: ADVANCED DATA MINING

Math 304 Handout: Linear algebra, graphs, and networks.

Data Mining Techniques

Application. Stochastic Matrices and PageRank

CS249: ADVANCED DATA MINING

Pr[positive test virus] Pr[virus] Pr[positive test] = Pr[positive test] = Pr[positive test]

6.207/14.15: Networks Lecture 7: Search on Networks: Navigation and Web Search

PageRank algorithm Hubs and Authorities. Data mining. Web Data Mining PageRank, Hubs and Authorities. University of Szeged.

Link Analysis. Leonid E. Zhukov

Data Mining and Matrices

How works. or How linear algebra powers the search engine. M. Ram Murty, FRSC Queen s Research Chair Queen s University

Learning from Labeled and Unlabeled Data: Semi-supervised Learning and Ranking p. 1/31

CS6220: DATA MINING TECHNIQUES

IS4200/CS6200 Informa0on Retrieval. PageRank Con+nued. with slides from Hinrich Schütze and Chris6na Lioma

Outline for today. Information Retrieval. Cosine similarity between query and document. tf-idf weighting

CS246 Final Exam, Winter 2011

Algebraic Representation of Networks

STA141C: Big Data & High Performance Statistical Computing

Web Ranking. Classification (manual, automatic) Link Analysis (today s lesson)

1 Searching the World Wide Web

Wiki Definition. Reputation Systems I. Outline. Introduction to Reputations. Yury Lifshits. HITS, PageRank, SALSA, ebay, EigenTrust, VKontakte

MultiRank and HAR for Ranking Multi-relational Data, Transition Probability Tensors, and Multi-Stochastic Tensors

As it is not necessarily possible to satisfy this equation, we just ask for a solution to the more general equation

Updating PageRank. Amy Langville Carl Meyer

Data science with multilayer networks: Mathematical foundations and applications

Lecture 12: Link Analysis for Web Retrieval

Spectral Graph Theory and You: Matrix Tree Theorem and Centrality Metrics

Lecture: Local Spectral Methods (1 of 4)

eigenvalues, markov matrices, and the power method

Index. Copyright (c)2007 The Society for Industrial and Applied Mathematics From: Matrix Methods in Data Mining and Pattern Recgonition By: Lars Elden

Calculating Web Page Authority Using the PageRank Algorithm

Part A. P (w 1 )P (w 2 w 1 )P (w 3 w 1 w 2 ) P (w M w 1 w 2 w M 1 ) P (w 1 )P (w 2 w 1 )P (w 3 w 2 ) P (w M w M 1 )

Introduction to Machine Learning Midterm Exam

CPSC 540: Machine Learning

Machine Learning, Midterm Exam

Applications. Nonnegative Matrices: Ranking

Conditioning of the Entries in the Stationary Vector of a Google-Type Matrix. Steve Kirkland University of Regina

No class on Thursday, October 1. No office hours on Tuesday, September 29 and Thursday, October 1.

Final Exam, Machine Learning, Spring 2009

Intelligent Systems (AI-2)

IV Course Spring 14. Graduate Course. May 4th, Big Spatiotemporal Data Analytics & Visualization

LINK ANALYSIS. Dr. Gjergji Kasneci Introduction to Information Retrieval WS

Faloutsos, Tong ICDE, 2009

A New Method to Find the Eigenvalues of Convex. Matrices with Application in Web Page Rating

Lecture: Local Spectral Methods (2 of 4) 19 Computing spectral ranking with the push procedure

Transcription:

CS6220: DATA MINING TECHNIQUES Mining Graph/Network Data Instructor: Yizhou Sun yzsun@ccs.neu.edu November 16, 2015

Methods to Learn Classification Clustering Frequent Pattern Mining Matrix Data Decision Tree; Naïve Bayes; Logistic Regression SVM; knn K-means; hierarchical clustering; DBSCAN; Mixture Models; kernel k-means* Text Data PLSA Set Data Apriori; FP-growth Sequence Data HMM GSP; PrefixSpan Time Series Prediction Linear Regression Autoregression Graph & Network Label Propagation* SCAN*; Spectral Clustering* Images Neural Network Similarity Search Ranking DTW P-PageRank PageRank 2

Mining Graph/Network Data Introduction to Graph/Network Data PageRank Personalized PageRank Summary 3

from H. Jeong et al Nature 411, 41 (2001) Graph, Graph, Everywhere Aspirin Yeast protein interaction network Internet Co-author network 4

Graphs are ubiquitous Why Graph Mining? Chemical compounds (Cheminformatics) Protein structures, biological pathways/networks (Bioinformactics) Program control flow, traffic flow, and workflow analysis XML databases, Web, and social network analysis Graph is a general model Trees, lattices, sequences, and items are degenerated graphs Diversity of graphs Directed vs. undirected, labeled vs. unlabeled (edges & vertices), weighted, with angles & geometry (topological vs. 2-D/3-D) Complexity of algorithms: many problems are of high complexity 5

Representation of a Graph G =< V, E > V = {u 1,, u n }: node set E V V: edge set Adjacency matrix A = a ij, i, j = 1,, n a ij = 1, if < u i, u j > E a ij = 0, if < u i, u j > E Undirected graph vs. Directed graph A = A T vs. A A T Weighted graph Use W instead of A, where w ij represents the weight of edge < u i, u j > 6

Mining Graph/Network Data Introduction to Graph/Network Data PageRank Personalized PageRank Summary 7

The History of PageRank PageRank was developed by Larry Page (hence the name Page-Rank) and Sergey Brin. It is first as part of a research project about a new kind of search engine. That project started in 1995 and led to a functional prototype in 1998. Shortly after, Page and Brin founded Google.

Ranking web pages Web pages are not equally important www.cnn.com vs. a personal webpage Inlinks as votes The more inlinks, the more important Are all inlinks equal? Recursive question! 9

Simple recursive formulation Each link s vote is proportional to the importance of its source page If page P with importance x has n outlinks, each link gets x/n votes Page P s own importance is the sum of the votes on its inlinks 10

Matrix formulation Matrix M has one row and one column for each web page Suppose page j has n outlinks If j -> i, then M ij =1/n Else M ij =0 M is a column stochastic matrix Columns sum to 1 Suppose r is a vector with one entry per web page r i is the importance score of page i Call it the rank vector r = 1 11

Eigenvector formulation The flow equations can be written r = Mr So the rank vector is an eigenvector of the stochastic web matrix In fact, its first or principal eigenvector, with corresponding eigenvalue 1 12

Example Yahoo y a m y 1/2 1/2 0 a 1/2 0 1 m 0 1/2 0 Amazon M soft y = y /2 + a /2 a = y /2 + m m = a /2 r = Mr y 1/2 1/2 0 y a = 1/2 0 1 a m 0 1/2 0 m 13

Power Iteration method Simple iterative scheme (aka relaxation) Suppose there are N web pages Initialize: r 0 = [1/N,.,1/N] T Iterate: r k+1 = Mr k Stop when r k+1 - r k 1 < x 1 = 1 i N x i is the L1 norm Can use any other vector norm e.g., Euclidean 14

Power Iteration Example Yahoo y a m y 1/2 1/2 0 a 1/2 0 1 m 0 1/2 0 Amazon M soft y a = m 1/3 1/3 1/3 1/3 1/2 1/6 5/12 1/3 1/4 3/8 11/24 1/6... 2/5 2/5 1/5 r 0 r 1 r 2 r 3 r

Random Walk Interpretation Imagine a random web surfer At any time t, surfer is on some page P At time t+1, the surfer follows an outlink from P uniformly at random Ends up on some page Q linked from P Process repeats indefinitely Let p(t) be a vector whose i th component is the probability that the surfer is at page i at time t p(t) is a probability distribution on pages 16

The stationary distribution Where is the surfer at time t+1? Follows a link uniformly at random p(t+1) = Mp(t) Suppose the random walk reaches a state such that p(t+1) = Mp(t) = p(t) Then p(t) is called a stationary distribution for the random walk Our rank vector r satisfies r = Mr So it is a stationary distribution for the random surfer 17

Existence and Uniqueness A central result from the theory of random walks (aka Markov processes): For graphs that satisfy certain conditions, the stationary distribution is unique and eventually will be reached no matter what the initial probability distribution at time t = 0. 18

Spider traps A group of pages is a spider trap if there are no links from within the group to outside the group Random surfer gets trapped Spider traps violate the conditions needed for the random walk theorem 19

Microsoft becomes a spider trap Yahoo y a m y 1/2 1/2 0 a 1/2 0 0 m 0 1/2 1 Amazon M soft y a = m 1/3 1/3 1/3 1/3 1/6 1/2 1/4 1/6 7/12 5/24 1/8 2/3... 0 0 1 20

Random teleports The Google solution for spider traps At each time step, the random surfer has two options: With probability, follow a link at random With probability 1-, jump to some page uniformly at random Common values for are in the range 0.8 to 0.9 Surfer will teleport out of spider trap within a few time steps 21

Random teleports ( = 0.8) 0.2*1/3 Yahoo 1/2 0.8*1/2 1/2 0.8*1/2 0.2*1/3 0.2*1/3 Amazon M soft y y 1/2 a 1/2 m 0 0.8* y 1/2 1/2 0 1/2 1/2 0 0.8 1/2 0 0 + 0.2 0 1/2 1 + 0.2* y 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 y 7/15 7/15 1/15 a 7/15 1/15 1/15 m 1/15 7/15 13/15 22

Random teleports ( = 0.8) Yahoo 1/2 1/2 0 0.8 1/2 0 0 + 0.2 0 1/2 1 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 Amazon y a = m M soft y 7/15 7/15 1/15 a 7/15 1/15 1/15 m 1/15 7/15 13/15 23

Matrix formulation Suppose there are N pages Consider a page j, with set of outlinks O(j) We have M ij = 1/ O(j) when j->i and M ij = 0 otherwise The random teleport is equivalent to adding a teleport link from j to every other page with probability (1- )/N reducing the probability of following each outlink from 1/ O(j) to / O(j) Equivalent: tax each page a fraction (1- ) of its score and redistribute evenly 24

PageRank Construct the N-by-N matrix A as follows A ij = M ij + (1- )/N Verify that A is a stochastic matrix The page rank vector r is the principal eigenvector of this matrix satisfying r = Ar Equivalently, r is the stationary distribution of the random walk with teleports 25

Dead ends Pages with no outlinks are dead ends for the random surfer Nowhere to go on next step 26

Microsoft becomes a dead end Yahoo 1/2 1/2 0 0.8 1/2 0 0 + 0.2 0 1/2 0 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 Amazon M soft y 7/15 7/15 1/15 a 7/15 1/15 1/15 m 1/15 7/15 1/15 y a = m 1/3 1/3 1/3 1/3 0.2 0.2... 0 0 0 Nonstochastic! 27

Teleport Dealing with dead-ends Follow random teleport links with probability 1.0 from dead-ends Adjust matrix accordingly Prune and propagate Preprocess the graph to eliminate dead-ends Might require multiple passes Compute page rank on reduced graph Approximate values for deadends by propagating values from reduced graph 28

Computing PageRank Key step is matrix-vector multiplication r new = Ar old Easy if we have enough main memory to hold A, r old, r new Say N = 1 billion pages We need 4 bytes for each entry (say) 2 billion entries for vectors, approx 8GB Matrix A has N 2 entries 10 18 is a large number! 29

Rearranging the equation r = Ar, where A ij = M ij + (1- )/N r i = 1 j N A ij r j r i = 1 j N [ M ij + (1- )/N] r j = 1 j N M ij r j + (1- )/N 1 j N r j = 1 j N M ij r j + (1- )/N, since r = 1 r = Mr + [(1- )/N] N where [x] N is an N-vector with all entries x 30

Sparse matrix formulation We can rearrange the page rank equation: r = Mr + [(1- )/N] N [(1- )/N] N is an N-vector with all entries (1- )/N M is a sparse matrix! 10 links per node, approx 10N entries So in each iteration, we need to: Compute r new = Mr old Add a constant value (1- )/N to each entry in r new 31

Sparse matrix encoding Encode sparse matrix using only nonzero entries Space proportional roughly to number of links say 10N, or 4*10*1 billion = 40GB still won t fit in memory, but will fit on disk source node degree 0 3 1, 5, 7 1 5 17, 64, 113, 117, 245 2 2 13, 23 destination nodes 32

Basic Algorithm Assume we have enough RAM to fit r new, plus some working memory Store r old and matrix M on disk Basic Algorithm: Initialize: r old = [1/N] N Iterate: Update: Perform a sequential scan of M and r old to update r new Write out r new to disk as r old for next iteration Every few iterations, compute r new -r old and stop if it is below threshold Need to read in both vectors into memory 33

Mining Graph/Network Data Introduction to Graph/Network Data PageRank Personalized PageRank Summary 34

Personalized PageRank Query-dependent Ranking For a query webpage q, which webpages are most important to q? The relative important webpages to different queries would be different 35

Calculation of P-PageRank Recall PageRank calculation: r = Mr + [(1- )/N] N or r = Mr + (1- ) r 0, where r 0 = 1/N 1/N 1/N For P-PageRank Replace r 0 with r 0 = 0 0 1 0 qth webpage 36

Mining Graph/Network Data Introduction to Graph/Network Data PageRank Personalized PageRank Summary 37

Summary Ranking on Graph / Network PageRank Personalized PageRank 38