Arabesque A system for distributed graph mining Carlos
Arabesque A system for distributed graph mining Carlos Teixeira, Alexandre Fonseca, Marco Serafini, Georgos Siganos, Mohammed Zaki, Ashraf Aboulnaga
2 2
Graph Mining Algorithms • Finding subgraphs of interest in (labeled) input graphs • Examples: Clique finding, Frequent subgraph mining, Motif Counting 3 3
Applications • Web: • Community detection, link spam detection • Semantic data: • Attributed patterns in RDF • Biology: • Characterize protein-protein or gene interaction 4 4
Challenge • Exponential number of subgraphs # unique subgraphs (log-scale) !!! tial n e on 1. 7 B 117 M p Ex 7. 8 M 335 K 22 K 4 K 1 2 3 4 5 6 Size of subgraphs 5 5
State of the Art: Custom Algorithms Easy to Code Custom Algorithms ✗ Efficient Transparent Implementation Distribution ✓ ✗ 6 6
State of the Art: Think Like a Vertex Easy to Code Custom Algorithms Think Like a Vertex ✗ ✗ Efficient Transparent Implementation Distribution ✓ ✗ ✗ ✓ 7 7
Arabesque • New system & execution model • Think Like an Embedding • Purpose-built for graph mining • Hadoop-based • Contributions: • Simple & Generic API • High performance • Distributed & Scalable by design 8 8
Arabesque Easy to Code Custom Algorithms Think Like a Vertex Arabesque ✗ ✗ ✓ Efficient Transparent Implementation Distribution ✓ ✗ ✓ ✓ 9 9
API Example: Clique finding 1 2 3 4 5 6 7 8 9 10 11 boolean filter(Embedding e) { return is. Clique(e); } void process(Embedding e) { output(e); } State of the Art (Mace, centralized) 4, 621 LOC boolean is. Clique(Embedding e) { return e. get. Num. Edges. Added() == e. get. Number. Of. Vertices() - 1; } 10 10
API Example: Motif Counting 1 2 3 4 5 6 7 8 9 10 11 boolean filter(Embedding e) { return e. get. Num. Vertices() <= MAX_SIZE; } void process(Embedding e) { map. Output(e. get. Pattern(), 1); } State of the Art (GTrie. Scanner, centralized) 3, 145 LOC Pair<Pattern, Integer> reduce. Output(Pattern p, List<Integer> counts) { return new Pair(p, sum(counts)); } 11 11
Arabesque: An Efficient System • As efficient as centralized state of the art Application - Graph Motifs - Mi. Co (MS=3) Centralized Baseline Arabesque 1 thread 50 s 37 s Cliques - Mi. Co (MS=4) 281 s 385 s FSM - Cite. Seer (S=300) 4. 8 s 5 s 12 12
Arabesque: A Scalable System • Scalable to thousands of workers • Hours/days → Minutes Application - Graph Motifs - Mi. Co Centralized Baseline Arabesque 640 cores 2 hours 24 minutes 25 seconds Cliques - Mi. Co 4 hours 8 minutes 1 minute 10 seconds FSM - Patents > 1 day 1 minute 28 seconds • Can process graphs with almost 1 billion edges 13 13
Arabesque Optimizations Avoid • Avoid. Redundant. Work Efficient canonicality checking • Efficient canonicality checking Subgraph • Subgraph. Compression Overapproximating Directed Acyclic Graphs (ODAGs) • Overapproximating Directed Acyclic Graphs (ODAGs) Efficient • Efficient. Aggregation 2 -level pattern aggregation • 2 -level pattern aggregation 14 14
Outline Graph mining exploration Arabesque fundamentals Execution engine Architecture Optimizations Evaluation 15
Graph Mining - Exploration • Iterative expansion • Subgraph size n → Subgraph size n + 1 • Connect to neighbours, one vertex at a time. 1 1 2 2 3 3 4 Input graph 4 Depth 1 1 2 3 1 1 3 3 2 2 1 3 4 2 2 4 4 3 Depth 2 16 16
Graph Mining - Exploration 1 2 3 2 1 3 1 2 4 2 3 1 1 3 2 2 3 4 1 3 4 2 4 3 1 2 3 4 3 1 2 4 2 1 Input graph 3 2 1 4 2 3 3 2 4 4 3 1 3 4 2 4 3 2 Depth 3 17 17
Arabesque: Fundamentals • Subgraphs as 1 st class citizens: • Embedding == Subgraph • Think Like an Embedding model Arabesque responsibilities User responsibilities Graph Exploration Aggregation (Isomorphism) Filter Load Balancing Automorphism Detection Process 18 18
Model - Think Like an Embedding 1 2 1 5 6 Input 1 2 3 1 2 1 4 3 Exploration step 2 Exploration step 1 2 1 3 3 6 Output 6 Input 2 1 6 e 1 3 2 1 3 1 2 2 1 3 6 Output 6 2 1 4 true 3 2 6 Output Input Filter 1 Process false 1 3 2 1 3 1. Start from a set of initial embeddings 2. Candidates: Expand by 1 vertex/edge Save Discard 3. Filter uninteresting candidates 4. Produce outputs User-defined functions 19 19
Aggregation during expansion • Filter might need aggregated values • E. g. : Frequent subgraph mining • Frequency calculation → look at all candidates • Aggregation in parallel with exploration step • Embeddings filtered as soon as aggregated values are ready. 20 20
Arabesque Architecture Worker 1 Output Embeddings size n+1 split 4 split 7 Worker 2 split 5 split 8 Next step Previous step Input Embeddings size n Worker 3 split 6 split 9 21 21
Avoiding redundant work • Problem: Automorphic embeddings • Automorphisms == subgraph equivalences • Redundant work 1 2 Worker 1 3 == 3 2 1 Worker 2 22 22
Avoiding redundant work • Solution: Decentralized Embedding Canonicality • No coordination • Efficient 1 2 Worker 1 is. Canonical(e) → true 3 == 3 2 1 Worker 2 is. Canonical(e) → false 23 23
Handling Exponential growth • Goal: handle trillions+ different embeddings? • Solution: Overapproximating DAGs (ODAGs) • Compress into less restrictive superset • Deal with spurious embeddings Canonical Embeddings 2 3 1 1 4 1 1 5 Input Graph 4 4 4 2 3 5 2 3 4 2 4 5 3 4 5 Embedding List 2 1 2 3 3 3 4 4 5 ODAG 24 24
Evaluation - Setup • 20 servers: 32 threads @ 2. 67 GHz, 256 GB RAM • 10 Gbps network • 3 algorithms: Frequent Subgraph Mining, Counting Motifs and Clique Finding • Input graphs: # Vertices Cite. Seer # Edges # Labels Avg. Degree 3, 312 4, 732 6 3 100, 000 1, 080, 298 29 22 Patents 2, 745, 761 13, 965, 409 37 10 Youtube 4, 589, 876 43, 968, 798 80 19 SN 5, 022, 893 198, 613, 776 0 79 179, 527, 876 887, 390, 802 0 10 Mi. CO Instagram 25 25
Evaluation - Scalability 26 26
Evaluation - Scalability Application - Graph Centralized Baseline Arabesque - Num. Servers (32 threads) 1 5 10 15 20 Motifs - Mi. Co 8, 664 s 328 s 74 s 41 s 31 s 25 s FSM - Citeseer 1, 813 s 431 s 105 s 65 s 52 s 41 s Cliques - Mi. Co 14, 901 s 1, 185 s 272 s 140 s 91 s 70 s Fail 8, 995 s 2, 218 s 1, 167 s 900 s 709 s >19 h 548 s 186 s 132 s 102 s 88 s Motifs - Youtube FSM - Patents 27 27
Evaluation - ODAGs Compression 44 GB 60 MB 4000 vertices 1. 7 billion subgraphs 28 28
Evaluation - Speedup w ODAGs 29 29
Large Graphs Graph SN Instagram Application Motifs-SN (MS=4) Cliques-SN (MS=5) Motifs-Instagram (MS=3) # Vertices # Edges Avg. Degree 5, 022, 893 198, 613, 776 79 179, 527, 876 887, 390, 802 10 Time Embeddings 6 h 18 m 8. 4 trillion 29 m 30 billion 10 h 45 m 5 trillion 30 30
Conclusion Graph mining is complex Existing approaches not ideal Arabesque - facilitate distributed graph mining algorithms General & Simple API Efficient & Scalable Just the beginning!!! 31
http: //arabesque. io ● Open-source (Apache 2. 0) ● Pre-compiled jar ● User guide 32 32
- Slides: 32