Download presentation

Presentation is loading. Please wait.

Published bySadie Malson Modified over 2 years ago

1
Carnegie Mellon Joseph Gonzalez Joint work with Yucheng Low Aapo Kyrola Danny Bickson Carlos Guestrin Guy Blelloch Joe Hellerstein David O’Hallaron A New Parallel Framework for Machine Learning Alex Smola

2
A B C D Originates From Is the driver hostile? C Lives

3
Patient presents abdominal pain. Diagnosis? Patient ate which contains purchased from Also sold to Diagnoses with E. Coli infection

4
Cameras Cooking 4 Shopper 1 Shopper 2

5
The Hollywood Fiction… Mr. Finch develops software which: Runs in “consolidated” data-center with access to all government data Processes multi-modal data Video Surveillance Federal and Local Databases Social Networks … Uses Advanced Machine Learning Identify connected patterns Predict catastrophic events

6
…how far is this from reality? 6

7
Big Data is a reality 48 Hours a Minute YouTube 24 Million Wikipedia Pages 750 Million Facebook Users 6 Billion Flickr Photos

8
Machine learning is a reality 8 Machine Learning Machine Learning Understanding Linear Regression x x x x x x x x x x Raw Data

9
Limited to Simplistic Models Fail to fully utilize the data Substantial System Building Effort Systems evolve slowly and are costly 9 Big Data + Large-Scale Compute Clusters + We have mastered: Simple Machine Learning x x x x x x x x x x

10
Advanced Machine Learning 10 Raw Data Machine Learning Machine Learning Understanding Mubarak Obama Netanyahu Abbas Deep Belief / Neural Networks Markov Random Fields Needs Supports Cooperate Distrusts Cameras Cooking Data dependencies substantially complicate parallelization

11
Challenges of Learning at Scale Wide array of different parallel architectures: New Challenges for Designing Machine Learning Algorithms: Race conditions and deadlocks Managing distributed model state Data-Locality and efficient inter-process coordination New Challenges for Implementing Machine Learning Algorithms: Parallel debugging and profiling Fault Tolerance 11 GPUsMulticoreClustersMini CloudsClouds

12
Rich Structured Machine Learning Techniques Capable of fully modeling the data dependencies Goal: Rapid System Development Quickly adapt to new data, priors, and objectives Scale with new hardware and system advances 12 Big Data + Large-Scale Compute Clusters + The goal of the GraphLab project … Advanced Machine Learning

13
Outline Importance of Large-Scale Machine Learning Need to model data-dependencies Existing Large-Scale Machine Learning Abstractions Need for a efficient graph structured abstraction GraphLab Abstraction: Addresses data-dependences Enables the expression of efficient algorithms Experimental Results GraphLab dramatically outperforms existing abstractions Open Research Challenges

14
How will we design and implement parallel learning systems?

15
Threads, Locks, & Messages “low level parallel primitives” We could use ….

16
Threads, Locks, and Messages ML experts repeatedly solve the same parallel design challenges: Implement and debug complex parallel system Tune for a specific parallel platform 6 months later the conference paper contains: “We implemented ______ in parallel.” The resulting code: is difficult to maintain is difficult to extend couples learning model to parallel implementation 16 Graduate students

17
Map-Reduce / Hadoop Build learning algorithms on-top of high-level parallel abstractions... a better answer:

18
CPU 1 CPU 2 CPU 3 CPU 4 MapReduce – Map Phase 18 Embarrassingly Parallel independent computation 12.912.9 42.342.3 21.321.3 25.825.8 No Communication needed

19
CPU 1 CPU 2 CPU 3 CPU 4 MapReduce – Map Phase 19 12.912.9 42.342.3 21.321.3 25.825.8 24.124.1 84.384.3 18.418.4 84.484.4 Image Features

20
CPU 1 CPU 2 CPU 3 CPU 4 MapReduce – Map Phase 20 Embarrassingly Parallel independent computation 12.912.9 42.342.3 21.321.3 25.825.8 17.517.5 67.567.5 14.914.9 34.334.3 24.124.1 84.384.3 18.418.4 84.484.4

21
CPU 1 CPU 2 MapReduce – Reduce Phase 21 12.912.9 42.342.3 21.321.3 25.825.8 24.124.1 84.384.3 18.418.4 84.484.4 17.517.5 67.567.5 14.914.9 34.334.3 22 26. 26 17 26. 31 Image Features Attractive Face Statistics Ugly Face Statistics U A A U U U A A U A U A Attractive FacesUgly Faces

22
Belief Propagation Label Propagation Kernel Methods Deep Belief Networks Neural Networks Tensor Factorization PageRank Lasso Map-Reduce for Data-Parallel ML Excellent for large data-parallel tasks! 22 Data-Parallel Graph-Parallel Algorithm Tuning Feature Extraction Map Reduce Basic Data Processing Is there more to Machine Learning ?

23
Concrete Example Label Propagation

24
Profile Label Propagation Algorithm Social Arithmetic: Recurrence Algorithm: iterate until convergence Parallelism: Compute all Likes[i] in parallel Sue Ann Carlos Me 50% What I list on my profile 40% Sue Ann Likes 10% Carlos Like 40% 10% 50% 80% Cameras 20% Biking 30% Cameras 70% Biking 50% Cameras 50% Biking I Like: + 60% Cameras, 40% Biking

25
Properties of Graph Parallel Algorithms Dependency Graph Iterative Computation What I Like What My Friends Like Factored Computation

26
? Belief Propagation Label Propagation Kernel Methods Deep Belief Networks Neural Networks Tensor Factorization PageRank Lasso Map-Reduce for Data-Parallel ML Excellent for large data-parallel tasks! 26 Data-Parallel Graph-Parallel Map Reduce Map Reduce? Algorithm Tuning Feature Extraction Basic Data Processing

27
Why not use Map-Reduce for Graph Parallel Algorithms?

28
Data Dependencies Map-Reduce does not efficiently express data dependencies User must code substantial data transformations Costly data replication Independent Data Rows

29
Slow Processor Iterative Algorithms Map-Reduce not efficiently express iterative algorithms: Data CPU 1 CPU 2 CPU 3 Data CPU 1 CPU 2 CPU 3 Data CPU 1 CPU 2 CPU 3 Iterations Barrier

30
MapAbuse: Iterative MapReduce Only a subset of data needs computation: Data CPU 1 CPU 2 CPU 3 Data CPU 1 CPU 2 CPU 3 Data CPU 1 CPU 2 CPU 3 Iterations Barrier

31
MapAbuse: Iterative MapReduce System is not optimized for iteration: Data CPU 1 CPU 2 CPU 3 Data CPU 1 CPU 2 CPU 3 Data CPU 1 CPU 2 CPU 3 Iterations Disk Penalty Startup Penalty

32
Belief Propagation SVM Kernel Methods Deep Belief Networks Neural Networks Tensor Factorization PageRank Lasso Map-Reduce for Data-Parallel ML Excellent for large data-parallel tasks! 32 Data-Parallel Graph-Parallel Cross Validation Feature Extraction Map Reduce Computing Sufficient Statistics Map Reduce? Bulk Synchronous?

33
Barrier Bulk Synchronous Parallel (BSP) Implementations: Pregel, Giraph, … ComputeCommunicate

34
Bulk synchronous computation can be highly inefficient. 34 Problem

35
Problem with Bulk Synchronous Example Algorithm: If Red neighbor then turn Red Bulk Synchronous Computation : Evaluate condition on all vertices for every phase 4 Phases each with 9 computations 36 Computations Asynchronous Computation (Wave-front) : Evaluate condition only when neighbor changes 4 Phases each with 2 computations 8 Computations Time 0 Time 1 Time 2Time 3Time 4

36
36 Real-World Example: Loopy Belief Propagation

37
Loopy Belief Propagation (Loopy BP) Iteratively estimate the “beliefs” about vertices – Read in messages – Updates marginal estimate (belief) – Send updated out messages Repeat for all variables until convergence 37

38
Bulk Synchronous Loopy BP Often considered embarrassingly parallel – Associate processor with each vertex – Receive all messages – Update all beliefs – Send all messages Proposed by: – Brunton et al. CRV’06 – Mendiburu et al. GECC’07 – Kang,et al. LDMTA’10 –…–… 38

39
Sequential Computational Structure 39

40
Hidden Sequential Structure 40

41
Hidden Sequential Structure Running Time: Evidence Time for a single parallel iteration Time for a single parallel iteration Number of Iterations 41

42
Optimal Sequential Algorithm Forward-Backward Bulk Synchronous 2n 2 /p p ≤ 2n Running Time 2n Gap p = 1 n p = 2 42

43
The Splash Operation Generalize the optimal chain algorithm: to arbitrary cyclic graphs: ~ 1)Grow a BFS Spanning tree with fixed size 2)Forward Pass computing all messages at each vertex 3)Backward Pass computing all messages at each vertex 43

44
Data-Parallel Algorithms can be Inefficient Optimized in Memory Bulk Synchronous Asynchronous Splash BP

45
Summary of Work Efficiency Bulk Synchronous Model Not Work Efficient! Compute “messages” before they are ready Increasing processors increase the overall work Costs CPU time and Energy! How do we recover work efficiency? Respect sequential structure of computation Compute “message” as needed: asynchronously

46
Belief Propagation SVM Kernel Methods Deep Belief Networks Neural Networks Tensor Factorization PageRank Lasso The Need for a New Abstraction Map-Reduce is not well suited for Graph-Parallelism 46 Data-Parallel Graph-Parallel Cross Validation Feature Extraction Map Reduce Computing Sufficient Statistics Bulk Synchronous

47
Outline Importance of Large-Scale Machine Learning Need to model data-dependencies Existing Large-Scale Machine Learning Abstractions Need for a efficient graph structured abstraction GraphLab Abstraction: Addresses data-dependences Enables the expression of efficient algorithms Experimental Results GraphLab dramatically outperforms existing abstractions Open Research Challenges

48
What is GraphLab?

49
The GraphLab Abstraction Scheduler Consistency Model Graph Based Data Representation Update Functions User Computation 49

50
Data Graph 50 A graph with arbitrary data (C++ Objects) associated with each vertex and edge. Vertex Data: User profile text Current interests estimates Edge Data: Similarity weights Graph: Social Network

51
Implementing the Data Graph Multicore Setting In Memory Relatively Straight Forward vertex_data(vid) data edge_data(vid,vid) data neighbors(vid) vid_list Challenge: Fast lookup, low overhead Solution: Dense data-structures Fixed Vdata & Edata types Immutable graph structure Cluster Setting In Memory Partition Graph: ParMETIS or Random Cuts Cached Ghosting Node 1 Node 2 A A B B C C D D A A B B C C D D A A B B C C D D

52
The GraphLab Abstraction Scheduler Consistency Model Graph Based Data Representation Update Functions User Computation 52

53
label_prop(i, scope){ // Get Neighborhood data (Likes[i], W ij, Likes[j]) scope; // Update the vertex data // Reschedule Neighbors if needed if Likes[i] changes then reschedule_neighbors_of(i); } Update Functions 53 An update function is a user defined program which when applied to a vertex transforms the data in the scope of the vertex

54
The GraphLab Abstraction Scheduler Consistency Model Graph Based Data Representation Update Functions User Computation 54

55
The Scheduler 55 CPU 1 CPU 2 The scheduler determines the order that vertices are updated. e e f f g g k k j j i i h h d d c c b b a a b b i i h h a a i i b b e e f f j j c c Scheduler The process repeats until the scheduler is empty.

56
Choosing a Schedule GraphLab provides several different schedulers Round Robin: vertices are updated in a fixed order FIFO: Vertices are updated in the order they are added Priority: Vertices are updated in priority order 56 The choice of schedule affects the correctness and parallel performance of the algorithm Obtain different algorithms by simply changing a flag! --scheduler=roundrobin --scheduler=fifo --scheduler=priority Optimal Splash BP Algorithm

57
CPU 1CPU 2CPU 3CPU 4 Implementing the Schedulers Multicore Setting Challenging! Fine-grained locking Atomic operations Approximate FiFo/Priority Random placement Work stealing Cluster Setting Multicore scheduler on each node Schedules only “local” vertices Exchange update functions Queue 1 Queue 2 Queue 3 Queue 4 Node 1 CPU 1CPU 2 Queue 1 Queue 2 Node 2 CPU 1CPU 2 Queue 1 Queue 2 v1v1 v1v1 v2v2 v2v2 f(v 1 ) f(v 2 )

58
The GraphLab Abstraction Scheduler Consistency Model Graph Based Data Representation Update Functions User Computation 58

59
Ensuring Race-Free Code How much can computation overlap?

60
Importance of Consistency Many algorithms require strict consistency or perform significantly better under strict consistency. Alternating Least Squares

61
Importance of Consistency Machine learning algorithms require “model debugging” Build Test Debug Tweak Model

62
GraphLab Ensures Sequential Consistency 62 For each parallel execution, there exists a sequential execution of update functions which produces the same result. CPU 1 CPU 2 Single CPU Single CPU Parallel Sequential time

63
CPU 1 CPU 2 Common Problem: Write-Write Race 63 Processors running adjacent update functions simultaneously modify shared data: CPU1 writes:CPU2 writes: Final Value

64
Consistency Rules 64 Guaranteed sequential consistency for all update functions Data

65
Full Consistency 65

66
Obtaining More Parallelism 66

67
Edge Consistency 67 CPU 1 CPU 2 Safe Read

68
Consistency Through R/W Locks Read/Write locks: Full Consistency Edge Consistency Write Canonical Lock Ordering ReadWrite Read Write

69
Multicore Setting: Pthread R/W Locks Distributed Setting: Distributed Locking Prefetch Locks and Data Allow computation to proceed while locks/data are requested. Node 2 Consistency Through R/W Locks Node 1 Data Graph Partition Lock Pipeline

70
Consistency Through Scheduling Edge Consistency Model: Two vertices can be Updated simultaneously if they do not share an edge. Graph Coloring: Two vertices can be assigned the same color if they do not share an edge. Barrier Phase 1 Barrier Phase 2 Barrier Phase 3

71
The GraphLab Abstraction Scheduler Consistency Model Graph Based Data Representation Update Functions User Computation 71

72
The Code API Implemented in C++: Pthreads, GCC Atomics, TCP/IP, MPI, in house RPC Multicore API Matlab/Java/Python support Available under Apache 2.0 License Cloud API Built and tested on EC2 No Fault Tolerance http://graphlab.org

73
Anatomy of a GraphLab Program: 1) Define C++ Update Function 2) Build data graph using the C++ graph object 3) Set engine parameters: 1) Scheduler type 2) Consistency model 4) Add initial vertices to the scheduler 5) Run the engine on the graph [Blocking C++ call] 6) Final answer is stored in the graph

74
Carnegie Mellon Bayesian Tensor Factorization Gibbs Sampling Dynamic Block Gibbs Sampling Matrix Factorization Lasso SVM Belief Propagation PageRank CoEM K-Means SVD LDA …Many others…

75
Startups Using GraphLab Companies experimenting with Graphlab Academic projects Exploring Graphlab 1600++ Unique Downloads Tracked (possibly many more from direct repository checkouts) 1600++ Unique Downloads Tracked (possibly many more from direct repository checkouts)

76
GraphLab Matrix Factorization Toolkit Used in ACM KDD Cup 2011 – track1 5 th place out of more than 1000 participants. 2 orders of magnitude faster than Mahout Testimonials: “The Graphlab implementation is significantly faster than the Hadoop implementation … [GraphLab] is extremely efficient for networks with millions of nodes and billions of edges …” -- Akshay Bhat, Cornell “The guys at GraphLab are crazy helpful and supportive … 78% of our value comes from motivation and brilliance of these guys.” -- Timmy Wilson, smarttypes.org “I have been very impressed by Graphlab and your support/work on it.” -- Clive Cox, rumblelabs.com

77
Outline Importance of Large-Scale Machine Learning Need to model data-dependencies Existing Large-Scale Machine Learning Abstractions Need for a efficient graph structured abstraction GraphLab Abstraction: Addresses data-dependences Enables the expression of efficient algorithms Experimental Results GraphLab dramatically outperforms existing abstractions Open Research Challenges

78
Shared Memory Experiments Shared Memory Setting 16 Core Workstation 78

79
Loopy Belief Propagation 79 3D retinal image denoising Data Graph Update Function: Loopy BP Update Equation Scheduler: Approximate Priority Consistency Model: Edge Consistency Vertices: 1 Million Edges: 3 Million

80
Loopy Belief Propagation 80 Optimal Better SplashBP 15.5x speedup

81
CoEM (Rosie Jones, 2005) Named Entity Recognition Task the dog Australia Catalina Island ran quickly travelled to is pleasant Hadoop95 Cores7.5 hrs Is “Dog” an animal? Is “Catalina” a place? Vertices: 2 Million Edges: 200 Million

82
Better Optimal GraphLab CoEM CoEM (Rosie Jones, 2005) 82 GraphLab16 Cores30 min 15x Faster!6x fewer CPUs! Hadoop95 Cores7.5 hrs

83
Experiments Amazon EC2 High-Performance Nodes 83

84
Video Cosegmentation Segments mean the same Model: 10.5 million nodes, 31 million edges Gaussian EM clustering + BP on 3D grid

85
Video Coseg. Speedups

86
Prefetching Data & Locks

87
Matrix Factorization Netflix Collaborative Filtering Alternating Least Squares Matrix Factorization Model: 0.5 million nodes, 99 million edges Netflix Users Movies d

88
Netflix Speedup Increasing size of the matrix factorization

89
Distributed GraphLab

90
The Cost of Hadoop

91
Outline Importance of Large-Scale Machine Learning Need to model data-dependencies Existing Large-Scale Machine Learning Abstractions Need for a efficient graph structured abstraction GraphLab Abstraction: Addresses data-dependences Enables the expression of efficient algorithms Experimental Results GraphLab dramatically outperforms existing abstractions Open Research Challenges

92
Storage of Large Data-Graphs Fault tolerance to machine/network failure Can I remove (re-task) a node or network resources without restarting dependent computation? Relaxed transactional consistency Can I eliminate locking and approximately recover when data corruption occurs? Support rapid vertex and edge addition How can I allow graphs to continuously grow while computation proceeds? Graph partitioning for “natural graphs” How can I balance the computation while minimizing communication on a power-law graph?

93
Event driven graph computation Trigger computation on data and structural modifications Exploit small neighborhood effects

94
Summary Importance of Large-Scale Machine Learning Need to model data-dependencies Existing Large-Scale Machine Learning Abstractions Need for a efficient graph structured abstraction GraphLab Abstraction: Addresses data-dependences Enables the expression of efficient algorithms Experimental Results GraphLab dramatically outperforms existing abstractions Open Research Challenges

95
Carnegie Mellon Checkout GraphLab http://graphlab.org 95 Documentation… Code… Tutorials… Questions & Comments jegonzal@cs.cmu.edu

96
Conclusions 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 96

Similar presentations

OK

Data Summit 2016 H104: Building Hadoop Applications Abhik Roy Database Technologies - Experian LinkedIn Profile:

Data Summit 2016 H104: Building Hadoop Applications Abhik Roy Database Technologies - Experian LinkedIn Profile:

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on subsoil investigation Free ppt on brain machine interface research Gastric anatomy and physiology ppt on cells Ppt on history of indian constitution Ppt on stock market in india Animated ppt on magnetism video Ppt on web designing software Ppt on regional transport office Ppt on shell scripting in linux Ppt on resource allocation in software project management