array based betweenness centrality
play

Array Based Betweenness Centrality Eric Robinson Northeastern - PowerPoint PPT Presentation

Array Based Betweenness Centrality Eric Robinson Northeastern University MIT Lincoln Labs Jeremy Kepner MIT Lincoln Labs Vertex Betweenness Centrality Which Vertices are Important? Vertex Betweenness Centrality Which Vertices are


  1. Array Based Betweenness Centrality Eric Robinson Northeastern University MIT Lincoln Labs Jeremy Kepner MIT Lincoln Labs

  2. Vertex Betweenness Centrality Which Vertices are Important?

  3. Vertex Betweenness Centrality Which Vertices are Important? Slower Communication Loss Of Communication

  4. Vertex Betweenness Centrality How do we Measure Importance? 0 8 8 9 0 1 50 32 45 0 9 Number of Shortest Paths Through Node

  5. Vertex Betweenness Centrality Traditional Algorithm 0 8 8 9 0 50 32 45 1 0 9 σ ( v ) ∑ = C ( v ) st B σ ≠ ≠ ∈ s t v V st

  6. Traditional Algorithm Theoretical Time and Space 0 8 8 9 0 50 32 45 1 0 9 Time: O(N 3 ) Storage: O(N 2 )

  7. Vertex Betweenness Centrality Updating Algorithm ● For each starting node: ● Once you know: ● The depth of each node in the BFS, D ● The centrality updates for nodes at depth d, u ● The shortest path counts from the root, s ● Can determine centrality of nodes at depth d-1: ● For each node, v, at depth d-1, it's update is the sum: u v = ∑ ∀ v ,w ∈ E ,w ∈ D  d  ,  1  u d ∗ s v / s w

  8. Updating Algorithm An Example 1 5 6 9 1 2 4 7 8 11 10 3 Find Single Source Shortest Path Counts O(N + M)

  9. Updating Algorithm An Example 1 1 5 6 9 1 2 4 7 8 11 10 1 3 Find Single Source Shortest Path Counts O(N + M)

  10. Updating Algorithm An Example 1 1 5 6 9 1 2 4 7 8 11 2 10 1 3 Find Single Source Shortest Path Counts O(N + M)

  11. Updating Algorithm An Example 1 2 1 5 6 9 1 2 4 7 8 11 2 2 10 1 3 Find Single Source Shortest Path Counts O(N + M)

  12. Updating Algorithm An Example 1 2 2 1 5 6 9 1 2 4 7 8 11 2 2 2 10 1 3 Find Single Source Shortest Path Counts O(N + M)

  13. Updating Algorithm An Example 2 1 2 2 1 5 6 9 1 2 4 7 8 11 2 2 2 2 10 1 3 Find Single Source Shortest Path Counts 2 O(N + M)

  14. Updating Algorithm An Example 1 2 3 4 5 6 7 8 9 10 11 Shortest Paths: 2 2 2 2 2 2 2 2 1 1 1 1 0 5 6 9 2 4 7 8 11 0 10 3 Perform Updates in Reverse Depth Order 0 O(N + M)

  15. Updating Algorithm An Example 1 2 3 4 5 6 7 8 9 10 11 Shortest Paths: 2 2 2 2 2 2 2 2 1 1 1 1 0 0 5 6 9 2 4 7 8 11 0 3 10 3 Perform Updates in Reverse Depth Order 0 O(N + M)

  16. Updating Algorithm An Example 1 2 3 4 5 6 7 8 9 10 11 Shortest Paths: 2 2 2 2 2 2 2 2 1 1 1 1 0 1 0 5 6 9 2 4 7 8 11 0 3 4 10 3 Perform Updates in Reverse Depth Order 0 O(N + M)

  17. Updating Algorithm An Example 1 2 3 4 5 6 7 8 9 10 11 Shortest Paths: 2 2 2 2 2 2 2 2 1 1 1 1 0 1 0 5 6 9 2 4 7 8 11 0 3 4 7 10 3 Perform Updates in Reverse Depth Order 0 O(N + M)

  18. Updating Algorithm An Example 1 2 3 4 5 6 7 8 9 10 11 Shortest Paths: 2 2 2 2 2 2 2 2 1 1 1 1 0 1 4 0 5 6 9 2 4 7 8 11 0 3 4 7 10 4 3 Perform Updates in Reverse Depth Order 0 O(N + M)

  19. Updating Algorithm Theoretical Time and Space 1 5 6 9 2 4 7 8 11 10 3 Time: O(N 2 +NM) Storage: O(N+M)

  20. Updating Algorithm Single Processor Variables: Storage: V : set of vertices O(M+N) d : depth of vertices O(N) Q : BFS queue O(N) P : shortest path parents O(M+N) sig : number of paths O(N) S : order seen O(N) del : centrality update O(N) Storage: O(M+N) Time: O(MN + N 2 )

  21. Updating Algorithm P processors For each vertex, in parallel Variables: Storage: V : set of vertices O(PM+PN) d : depth of vertices O(PN) Q : BFS queue O(PN) P : shortest path parents O(PM+PN) sig : number of paths O(PN) S : order seen O(PN) del : centrality update O(PN) Storage: O(PM+PN) Time: O((MN + N 2 )/P)

  22. Updating Algorithm Array Based Version Variables: Storage: A : sparse adjacency matrix B S(NxN) O(M+N) Z S(N) f : sparse fringe vector O(N) Z N p : shortest path vector O(N) B S(NxN) S : sparse depth matrix O(N) R N u : centrality update vector O(N) Storage: O(M+N) Time: O(MN + N 2 )

  23. Updating Algorithm Array Based Version Variables: A : sparse adjacency matrix f : sparse fringe vector p : shortest path vector S : sparse depth matrix u : centrality update vector Discover Paths: f = fA f = f .* ¬p p = p + f S d = boolean(f)

  24. Updating Algorithm Array Based Version Variables: A : sparse adjacency matrix f : sparse fringe vector p : shortest path vector S : sparse depth matrix u : centrality update vector Update Centralities: w = S d .* (1+u) ./ p w = Aw w = w .* S d-1 .* p u = u + w

  25. Array Based Version Single Processor Performance Data Courtesy of Prof. David Bader & Kamesh Madduri (Georgia Tech) SSCA#2 Kernel 4 (Betweenness Centrality on Kronecker Graph) N edge =8M N vert =1M N approx =256 Matlab achieves Matlab • 50% of C • 50% of sparse matmul • No hidden gotchas (Traversed Edges Per Second)

  26. Array Based Version Why is it Useful? ● Linear Performance within: Factor of 2 of C code ● Fewer Lines of Code (More work behind-the-scenes) ● Natural Implementation in: ● Matlab ● Maple ● ... ● Processes full depth at a time: ● Low-level parallelism

  27. Array Based Version P Processors Storage: O(M+N) Time: O((MN + N 2 )/P) Discover Paths in Parallel Update Centralities in Parallel

  28. Array Based P Processor Version Why is it Useful? ● Performance Currently Untested ● Memory per machine Scales as Expected ● Fewer Lines of Code (More work behind-the-scenes) ● Natural Implementation in: ● PMatlab ● StarP ● ...

  29. Matrix Based Version How does it work? Choose a vertex block size V (Optimal Size in tests, V = 16) Variables: Storage: A : sparse adjacency matrix B S(NxN) O(M+N) Z S(VxN) f : sparse fringe vector O(VN) Z (VxN) p : shortest path vector O(VN) B S(VxNxN) O(VN) S : sparse depth matrix R (VxN) u : centrality update vector O(VN) O(N 2 +MN) Time: Storage: O(VN+M)

  30. Acknowledgements ● Original Updating Algorithm: Ulrik Brandes ● Parallel Updating Algorithm: David Bader Kamesh Madduri ● Collaboration at Lincoln Labs: Jeremy Kepner ● LA Graph Algorithms: Jeremy Fineman Crystal Kahn

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend