Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... ·...

60
Presenter: Susu Sun Graduate School of Computer Science Saarland University May 29 , 2015 Large–Scale Graph Machine Learning & 1

Transcript of Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... ·...

Page 1: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Presenter: Susu Sun

Graduate School of Computer Science Saarland University

May 29 , 2015

Large–Scale Graph Machine Learning

&

1

Page 2: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties of Graph based machine learning

Big : Data-parallel :Map Reduce

Dependency: Graph-parallel: Pregel

Efficiency: Asychronous Graph- Parallel: GraphLab

PowerLaw Vertex : GraphLab 2.1- PowerGraph

Outline

2

Page 3: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties of Graph based machine learning

Big : Data-parallel :Map Reduce

Dependency: Graph-parallel: Pregel

Efficiency: Asychronous Graph- Parallel: GraphLab

PowerLaw Vertex : GraphLab 2.1- PowerGraph

Outline

3

Page 4: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties: Examples

Graphs are ubiquitous Social media, science , advertising,web… Graphs are big billions of vertices and edges and rich metadata

Dependency is important Graphs encode relationships between People, Facts , Products , Ideas, Interests

Vertices in natural graphs are Power-law

Characteristic of Graphs

Page 5: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Parallel Computation ----Big

MLDM(Machine learning and Data Mining) Algorithm Requires :

Graph Structured Computation ----Dependency

Modeling dependencies between data

Asynchronous Iterative Computation ----Efficiency Asynchronous computation can accelerate convergence

Power-law Vertex ----Power-Law vertex Efficiently compute power-law degree vertex

5

Run the computation in parallel

Page 6: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Big Learning

6

Page 7: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties of Graph based machine learning

Big : Data-parallel :Map Reduce

Dependency: Graph-parallel: Pregel

Efficiency: Asychronous Graph- Parallel: GraphLab

PowerLaw Vertex : GraphLab 2.1- PowerGraph

Outline

7

Page 8: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Data-Parallel

Map Reduce

Feature Extraction Cross

Validation

Computing Sufficient Statistics

Data Parallel ML: MapReduce

8

Page 9: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Data Parallel ML: MapReduce

CPU 1 CPU 2 CPU 3 CPU 4 1 2 . 9

4 2 . 3

2 1 . 3

2 5 . 8

Map phrase:Image Features Extraction

9 cloud.berkeley.edu/data/graphlab

Page 10: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Data Parallel ML: MapReduce

CPU 1 CPU 2 CPU 3 CPU 4

1 2 . 9

4 2 . 3

2 1 . 3

2 5 . 8

2 4 . 1

8 4 . 3

1 8 . 4

8 4 . 4

Map phrase:Image Features Extraction

10 cloud.berkeley.edu/data/graphlab

Page 11: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

CPU 1 CPU 2 CPU 3 CPU 4

1 2 . 9

4 2 . 3

2 1 . 3

2 5 . 8

1 7 . 5

6 7 . 5

1 4 . 9

3 4 . 3

2 4 . 1

8 4 . 3

1 8 . 4

8 4 . 4

Data Parallel ML: MapReduce

No Communication needed!

Map phrase: Embarrassingly Parallel independent computation

11 cloud.berkeley.edu/data/graphlab

Page 12: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Data Parallel ML: MapReduce

CPU 1 CPU 2

1 2 . 9

4 2 . 3

2 1 . 3

2 5 . 8

2 4 . 1

8 4 . 3

1 8 . 4

8 4 . 4

1 7 . 5

6 7 . 5

1 4 . 9

3 4 . 3

22 26 .

26

17 26 .

31

Image Features

Attractive Face Statistics

Ugly Face Statistics

Reduce phrase: Image classification

12 cloud.berkeley.edu/data/graphlab

Page 13: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties: Examples

Graphs are ubiquitous Social media, science , advertising,web… Graphs are big billions of vertices and edges and rich metadata

Dependency is important Graphs encode relationships between People, Facts , Products , Ideas, Interests

Vertices in natural graphs are Power-law

Characteristic of Graphs

Page 14: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

MapReduce: Pros & Cons Pros Cons

Simplicity of the model: Programmers specifies few simple methods that focuses on the functionality not on the parallelism

Restricted programming constructs: only map & reduce

Scalability: Scales easily for large number of clusters with thousands of machines

Does not scale well for dependent tasks: for example Graph problems

Applicability: Applicable to many different systems and a wide variety of problems

Does not scale well for iterative algorithms: iteration is very common in machine learning

14

Page 15: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

ML Tasks Beyond Data-Parallelism

Data-Parallel Graph-Parallel

Map Reduce

Feature Extraction Cross

Validation

Computing Sufficient Statistics

Belief Propagation

Label Propagation

Kernel Methods

Deep Belief Networks

Neural Networks

Tensor Factorization

PageRank

Lasso

15

Page 16: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties of Graph based machine learning

Big : Data-parallel :Map Reduce

Dependency: Graph-parallel: Pregel

Efficiency: Asychronous Graph- Parallel: GraphLab

PowerLaw Vertex: GraphLab 2.1- PowerGraph

Outline

16

Page 17: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Graph-Parallel computation?

“Think like a vertex.” -Malewicz et al. [SIGMOD’10]

17

Page 18: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

A user-defined Vertex-Program runs on each vertex Graph constrains interaction along edges

Using messages (e.g. Pregel [PODC’09, SIGMOD’10]) Through shared state (e.g., GraphLab [UAI’10, VLDB’12])

Parallelism: run multiple vertex programs simultaneously

The Graph-Parallel Abstraction

18

Page 19: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

What’s the rank of this user?

rank?

Depends on rank of her followers

Depends on the rank of their followers

PageRank

19

Page 20: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Page Rank Iteration

Iterate until convergence: “My rank is weighted average of my friends’ rank”

Rank of user i

Weighted sum of neighbors’ ranks

αjiw

is the random reset probability Is the prob. transitioning from j to i

20

Page 21: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Pregel Abstraction Vertex-Programs interact by sending messages

i Pregel_PageRank(i, messages) : // Receive all the messages total = 0 foreach( msg in messages) : total = total + msg // Update the rank of this vertex R[i] = 0.15 + total // Send new messages to neighbors foreach(j in out_neighbors[i]) : Send msg(R[i] * wij) to vertex j

21

Page 22: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties: Examples

Graphs are ubiquitous Social media, science , advertising,web… Graphs are big billions of vertices and edges and rich metadata

Dependency is important Graphs encode relationships between People, Facts , Products , Ideas, Interests

Vertices in natural graphs are Power-law

Characteristic of Graphs

Page 23: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Pregel: Bulk Synchronous Parallel(BSP) Model

Barrier

Compute Communicate

Bulk synchronous computation can be highly inefficient

[Malewicz et al. ‘2010] http://graphlab.org/powergraph-presented-at-osdi/ 23

Page 24: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Synchronous vs Asynchronous Synchronous computation can be inefficient

Async vs Sync PageRank

Graph: 25M vertex, 355 edge 16 processors

24

Page 25: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Tradeoffs of the BSP Model

Pros Scales better than Map Reduce for Graphs Relatively easy to build

Cons Inefficient if different regions of the graph converge at different speed Runtime of each phase is determined by the slowest machine Synchronous computation can be inefficient!

25

Page 26: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties of Graph based machine learning

Big : Data-parallel :Map Reduce

Dependency: Graph-parallel: Pregel

Efficiency: Asychronous Graph-Parallel: GraphLab

PowerLaw Vertex : GraphLab 2.1- PowerGraph

Outline

26

Page 27: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Scheduler Consistency Model

Graph Based Data Representation

Update Functions User Computation

GraphLab Framework

27

Page 28: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Data Graph Date Graph: a directed graph G=(V, E, D) Data D refers to model parameters, algorithm states and other related data.

Vertex Data: •User profile text • Current interests estimates

Edge Data: • Similarity weights

Graph: • Social Network

28

Page 29: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Data Graph PageRank : G=(V, E, D) • Each vertex (V) corresponds to a webpage

• Each edge (U,V ) corresponds to a link from (U -> V)

•Vertex data Dv stores the rank of the webpage R(V)

•Edge data DU->V stores the weight of the link (U->V)

29

Page 30: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Update Functions update function : user defined program which when applied to a vertex, transforms the data in the scopeof the vertex

pagerank(i, scope){ // Get Neighborhood data (R[i], Wij, R[j]) scope; // Update the vertex data // Reschedule Neighbors if needed if R[i] changes then reschedule_neighbors_of(i); }

[ ][ ] (1 ) [ ]ij

j N iR i W R jα α

← + − ×∑

30

Page 31: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Scheduling The scheduler determines the order that vertices are updated.

Only Requirement :All vertex in T are eventually executed

GraphLab Execution Model (i, messages) : Input: Data Graph G=(V,E,D) Input: Update Function Input: Initial vertex set While T is not Empty do (1) (2) (3) Output: Modified Data Graph

{ }1 2, ,...v vΤ =

Re ( )( , ) ( , )v v

v moveNext TT S f v S

T T T

←′ ←

′← ∪

( ), ,G V E D′=

f

31

Page 32: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Ensuring Race-Free Code How much can computation overlap?

32

Page 33: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Consistency Models Guarantee sequential consistency for all update functions User –defined consistency models: Full consistency Vertex Consistency Edge Consistency

Vertex v

33

Page 34: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

D1 D2 D3 D4 D5 D1↔2 D2↔3 D3↔4 D4↔5

1 2 3 4 5

D1 D2 D3 D4 D5 D1↔2 D2↔3 D3↔4 D4↔5

1 2 3 4 5

Read Write

Read Write

D1 D2 D3 D4 D5 D1↔2 D2↔3 D3↔4 D4↔5

1 2 3 4 5

Read Write

Full

Con

sist

ency

M

odel

Edg

e C

onsi

sten

cy

Mod

el

Vert

ex

Con

sist

ency

M

odel

Consistency Model in GraphLab

34

Page 35: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Consistency vs Parallelism

Figure 2: Consistency and Parallelism

Full

Con

sist

ency

M

odel

Edg

e C

onsi

sten

cy

Mod

el

Vert

ex

Con

sist

ency

M

odel

35

Page 36: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

GraphLab System Evaluation

36

Page 37: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Experiments---Netflix Movie Recommendation Task: collaborative filtering Recommend movies based on the ratings of similar user. Algorithm: Alternating Least Squares Matrix Factorization(ALS) GraphLab Model: R: bipartite graph connecting each user and the moves they rated. Edge: rating for a movie-user pair Vertex: user and movie data corresponding to row in U and column in V Update Function: recompute the d length vector for each each vertex by reading the d length vectors on adjacent vertices and predict the edge value

37

Page 38: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Experiments---Netflix Movie Recommendation

Netflix comparisions Dynamic Netflix GraphLab outperforms Hadoop by 40~60 times and is comparable to MPI implementation

Dynamic computation can converge to equivalent test error in about half the number of updates

38

Page 39: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Experiments---Video Co-segmentation(CoSeg)

Coseg Vedio Frame

Task: Joint co-segmentation Identify and cluster spatio -temporal segments with similar texture in video. Algorithm: Gaussian Misture Model (GMM) Loopy Belief Propagation (LBP) GraphLab Model: Graph: a grid of 120*50 rectangular super-pixels Edge: indicating the neighboring super-pixel Vertex: super-pixel, stores the color and texture statistics for all the raw pixels in its domain Update Function: alternating GMM and LBP to predict the best label for each super-pixel. Schedule: adaptive update schedule

39

Page 40: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Experiments---Video Co-segmentation(CoSeg)

Coseg Weak Scaling

GraphLab provides nearly optimal weak scaling

GraphLab can achieve scalability and performance on large vertex graph

Coseg Scalability

40

Page 41: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Summary of GraphLab

An abstraction tailored to Machine Learning Targets Graph-Parallel Algorithms

Naturally expresses Data/computational dependencies

Dynamic iterative computation

Simplifies parallel algorithm design

Automatically ensures data consistency

Achieves state-of-the-art parallel performance on a variety of problems

But, GraphLab is not sufficient to handle Natural Graphs!

41

Page 42: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties of Graph based machine learning

Big : Data-parallel :Map Reduce

Dependency: Graph-parallel: Pregel

Efficiency: Asychronous Graph- Parallel: GraphLab

PowerLaw Vertex: GraphLab 2.1- PowerGraph

Outline

42

Page 43: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Natural Graph

Natural Graphs Graphs derived from natural phenomena Problems: Existing distributed graph computation systems perform poorly on Natural Graphs.

The Internet Human Brain LinkedIn Social Network

43

Page 44: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Natural Graph Properties

Power-Law Degree Distribution

More than 108 vertices have one neighbor.

Top 1% of vertices are adjacent to

50% of the edges!

High-Degree Vertices

Power-law Degree Distribution

AltaVista WebGraph 1.4B Vertices, 6.6B Edges

44

Page 45: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Natural Graph Properties

Power-Law Degree Distribution “Star Like” Motif

President Obama Followers

45 https://www.usenix.org/conference/osdi12

Page 46: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Natural Graph Properties

Power-Law Graphs are Difficult to Partition

CPU 1 CPU 2

Power-Law graphs do not have low-cost balanced cuts [Leskovec et al. 08, Lang 04] Traditional graph-partitioning algorithms perform poorly on Power-Law Graphs. [Abou-Rjeili et al. 06]

46

Page 47: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Asynchronous Execution requires heavy locking (GraphLab)

Pregel and GraphLab for High-Degree Vertices

Touches a large fraction of graph

(GraphLab)

Sequentially process edges

Sends many messages (Pregel)

Edge meta-data too large for single

machine

Synchronous Execution prone to stragglers (Pregel)

47

Page 48: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Machine 1 Machine 2

Graph & Pregel: Random Partitioning

Both GraphLab and Pregel resort to random (hashed) partitioning on natural graphs

10 Machines 90% of edges cut 100 Machines 99% of edges cut!

48 https://www.usenix.org/conference/osdi12

Page 49: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

PowerGraph is Needed

GraphLab and Pregel are not well suited for natural graphs Challenges of high-degree vertices Low quality partitioning

49

Page 50: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

PowerGraph

GAS Decomposition: distribute vertex-programs

Parallelize high-degree vertices

Vertex Partitioning:

Efficiently distribute large power-law graphs.

50

Page 51: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Y

+ … +

Y

Parallel Sum

User Defined: Gather( ) Σ Y

Σ1 + Σ2 Σ3

Y

Gather (Reduce) Apply the accumulated value to center vertex

Apply Update adjacent edges

and vertices.

Scatter Accumulate information

about neighborhood

Y

+

User Defined: Apply( , Σ) Y

’ Y

Y

Σ Y’

Update Edge Data & Activate Neighbors

User Defined: Scatter( ) Y’

Y’

GAS Decomposition

51 https://www.usenix.org/conference/osdi12

Page 52: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

GAS for PageRank

GraphLab_PageRank (i) // Compute sum over neighbors total = 0 foreach( j in in_neighbors(i)): total = total + R[j] * wji // Update the PageRank R[i] = 0.1 + total // Trigger neighbors to run again if R[i] not converged then foreach( j in out_neighbors(i)) signal vertex-program on j

Gather: gather information about neighborhood

Apply: update vertex

Scatter: signal neighbors

52

Page 53: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Graph partition Rather than cut edges:

PowerGraph cut vertices:

CPU 1 CPU 2

Y Y Must synchronize

many edges

CPU 1 CPU 2

Y Y Must synchronize a single vertex

Percolation theory suggests that power law graphs have good vertex cuts. [Albert et al. 2000]

53

Page 54: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Constructing Vertex-Cut

Machine 2 Machine 1 Machine 3

Evenly assign edges to machines

Y Y Y Y Z Y Y Y Y Z Y Z

Vertex spans according to its adjacent edges

54 https://www.usenix.org/conference/osdi12

Page 55: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Vertex-Cut vs Edge-Cut

1

10

100

0 50 100 150

Red

uctio

n in

C

omm

. and

Sto

rage

Number of Machines

Order of Magnitude Improvement

Expected improvement from vertex-cuts:

Page 56: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

PowerGraph System Evaluation

56

Page 57: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

PowerGraph vs GraphLab & Pregel PageRank on Synthetic Power-Law Graphs: α: Power-Law Constant,higher α imply lower density (majority of vertices are low degree)

PowerGraph is robust to high-degree vertices Runtime Communication

57

High-degree vertices High-degree vertices

Page 58: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Properties: Examples

Graphs are ubiquitous Social media, science , advertising,web… Graphs are big billions of vertices and edges and rich metadata

Dependency is important Graphs encode relationships between People, Facts , Products , Ideas, Interests

Vertices in natural graphs are Power-law

Characteristic of Graphs

Page 59: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Problem: Computation on Natural Graphs is challenging High-degree vertices Low-quality edge-cuts

Solution: PowerGraph System

GAS Decomposition: split vertex programs Vertex-partitioning: distribute natural graphs

PowerGraph theoretically and experimentally outperforms existing

graph-parallel systems.

Summary of PowerGraph

59

Page 60: Large–Scale Graph Machine Learningresources.mpi-inf.mpg.de/d5/teaching/ss15/msga/ss... · Large–Scale Graph Machine Learning & 1 ... billions of vertices and edges and rich metadata

Future work

60

Time evolving graphs Support structural changes during computation

Out-of-core storage (GraphChi) Support graphs that don’t fit in memory

Thank you!

Question?