Scalable Analytics: Chapter 6
Overview of Large Graph Analysis and Analytics
Graph data analytics is a critical component of information retrieval and data mining, sitting alongside topics such as high-dimensional data, clustering, and stream processing.
Applications of graph analytics include:
PageRank and SimRank for node and similarity ranking.
Community detection for identifying social or functional groups.
Spam detection.
Scalable machine learning (SVM, Decision Trees, kNN).
Recommender systems and association rules.
Varieties of Graph Data
Social Networks: Represented by the Facebook social graph, mapping connections between individuals.
Media Networks: Illustrated by connections between political blogs, showing how information and influence flow through media outlets.
Information Networks: Includes citation networks and "maps of science." These display the overlap and relationships between diverse disciplines such as:
Hard Sciences: Chemistry, Physics, Math, Computer Science, and Electrical Engineering.
Applied Sciences: Chemical Engineering (ChE), Mechanical Engineering (ME), Civil Engineering (CivE), and Biotechnology.
Life/Earth Sciences: Biology, Infectious Diseases, Brain Research, Medical Specialties, and Earth Sciences.
Humanities and Social Sciences.
Communication Networks: Visualized as routers connecting different domains (e.g., Domain 1, Domain 2, Domain 3).
Technological Networks: A classic example is the Seven Bridges of Königsberg, analyzed by Euler in 1735.
The Web as a Directed Graph
The World Wide Web is modeled as a directed graph where:
Nodes: Represent individual webpages.
Edges: Represent hyperlinks between pages.
Nodes exhibit massive diversity in connectivity. For instance, a site like
www.stanford.edumay have over incoming links, whereas a personal site likewww.joe-schmoe.commight have only .Challenge of Web Search:
The web contains an immense variety of information sources.
Finding the "best" answer for generic queries (e.g., "newspaper") requires ranking pages by importance rather than just keyword match.
PageRank: The "Flow" Formulation
Links as Votes: A page is considered more important if it has more incoming links (in-links). However, not all in-links are equal; links from important pages carry more weight.
Recursive Definition: A page is important if it is pointed to by other important pages.
The Model:
Each link's vote is proportional to the importance of its source page.
If page has importance and out-links, each link confers votes.
The importance of page () is the sum of votes from its in-links:
Example Flow Equations: For a small graph with nodes , , and :
To find a unique solution, an additional constraint is added such that the sum of all ranks equals ().
Matrix Formulation of PageRank
Stochastic Adjacency Matrix ():
If page has out-links, and there is a link from to , then . If no link exists, .
is column-stochastic—its columns sum to .
Rank Vector (): A vector where is the importance score of page , and .
Stationary Distribution: The flow equations are expressed as a matrix-vector multiplication:
This indicates that is an eigenvector of the matrix with a corresponding eigenvalue of .
Power Iteration Method
Power iteration is an iterative scheme to solve for the rank vector in web-scale graphs:
Initialize: Set where is the number of pages.
Iterate: Calculate .
Converge: Stop when the L1 norm of the difference between successive vectors is less than a threshold :
|r^{(t+1)} - r^{(t)}|_1 < \epsilon
Random Walk Interpretation: A random surfer starts at a page and follows out-links uniformly at random. The vector , where the -th coordinate is the probability the surfer is at page at time , eventually reaches the stationary distribution .
Problems and The Google Formulation
Spider Traps: A group of pages whose out-links only point within the group. In power iteration, the random surfer gets stuck, and these pages eventually absorb all the PageRank.
Dead Ends: Pages with no out-links. These cause the total PageRank in the system to leak out toward zero during iteration, as the matrix is no longer column-stochastic.
The Teleportation Solution: Google uses "teleports" to solve these issues. At each step, a surfer has two options:
With probability , follow a link at random.
With probability , jump (teleport) to a random page in the entire web.
A typical value for is to .
The Google Equation:
The Google Matrix ():
Scalable Computation of PageRank
For billion pages, the matrix is too dense to fit in memory. However, the calculation can be rearranged to utilize the sparsity of :
Sparse Matrix Encoding: $M$ is encoded using only non-zero entries. Each entry consists of a source node, its out-degree, and a list of destination nodes.
Block-Stripe Update Algorithm: To handle cases where the rank vector does not fit in RAM:
Divide the vector into blocks.
Divide the matrix into stripes such that each stripe contains only destination nodes corresponding to a specific block of .
This reduces the cost per iteration to approximately .
Topic-Specific PageRank
Standard PageRank measuring generic popularity is biased against topic-specific authorities.
Goal: Evaluate pages based on proximity to a particular topic.
Method: Modify the teleportation behavior. Instead of jumping to any page with equal probability, the user teleports only to a specific "teleport set" of relevant pages.
Matrix Adjustment:
Topic vectors can be determined by user bookmarks, query context, or manual menus.
Web Spam and TrustRank
Term Spam: Spammers add irrelevant keywords (e.g., "movie") thousands of times or use invisible text to fool early search engines that relied on word frequency.
Link Spam: Spammers create "link farms"—complex topographies of owned pages linking to a target page to artificially boost its PageRank.
TrustRank: A specialized version of topic-specific PageRank designed to combat spam.
Seed Set: A small subset of pages is manually identified as "trusted" (good) pages.
Propagation: Perform PageRank with the teleport set equal to the trusted set.
Trust Attenuation: Trust decreases as the distance from the trusted seed increases.
Trust Splitting: Trust is diluted as the number of out-links from a page increases.
Pages with a TrustRank score below a certain threshold are classified as spam.