knowledge discovery toolbox
play

Knowledge Discovery Toolbox kdt.sourceforge.net Our - PowerPoint PPT Presentation

Adam Lugowski Knowledge Discovery Toolbox kdt.sourceforge.net Our users: Domain Experts 2 1 4 Build 3 Cull input Interpret relevant graph


  1. Adam ¡Lugowski ¡ Knowledge ¡ Discovery ¡ Toolbox ¡ kdt.sourceforge.net ¡

  2. Our ¡users: ¡Domain ¡Experts ¡ 2 ¡ 1 ¡ 4 ¡ Build ¡ 3 ¡ Cull ¡ input ¡ Interpret ¡ relevant ¡ graph ¡ Analyze ¡ results ¡ data ¡ graph ¡ Data ¡ Graph ¡ filtering ¡ viz ¡ KDT ¡ technologies ¡ engine ¡

  3. Example ¡workflow ¡ 7-,2'(.#",/( 3"#4*5( )12&'%#6-$( .#",/(*0( )12&'%#&( !"#$%&'( )*+,*-%-'(

  4. How ¡to ¡target ¡Domain ¡Experts? ¡ • Conceptually ¡simple ¡ • Customizable ¡ • High ¡Performance ¡

  5. Domain ¡Experts ¡ Algorithm ¡Experts ¡ HPC ¡Experts ¡

  6. Complex ¡methods ¡ centrality(‘approxBC’) ¡ cluster(‘Markov’) ¡ . ¡. ¡. ¡ pageRank ¡ contract ¡ Building ¡blocks ¡ DiGraph ¡ Mat ¡ Vec ¡ • bfsTree,neighbor ¡ • SpMV ¡ • max, ¡norm,sort ¡ • SpGEMM ¡ • abs, ¡any, ¡ceil ¡ ¡ • degree,subgraph ¡ • load,UFget ¡ • load, ¡eye ¡ • range, ¡ones ¡ • +, ¡-­‑, ¡sum, ¡scale ¡ • reduce, ¡scale ¡ • +,-­‑,*,/,>,==,&,[] ¡ • +, ¡[] ¡ Underlying ¡infrastructure ¡(Combinatorial ¡BLAS) ¡ • SpMV, ¡SpMV_SemiRing ¡ Sparse-­‑matrix ¡classes/methods ¡ • SpGEMM, ¡SpGEMM_SemiRing ¡ ( e.g. , ¡Apply, ¡EWiseApply, ¡Reduce) ¡

  7. Why ¡(sparse) ¡adjacency ¡matrices? ¡ TradiHonal ¡graph ¡ Graphs ¡in ¡the ¡language ¡of ¡ computaHons ¡ linear ¡algebra ¡ Data ¡driven, ¡ Fixed ¡communicagon ¡paherns ¡ unpredictable ¡communicagon ¡ Irregular ¡and ¡unstructured, ¡ Operagons ¡on ¡matrix ¡blocks ¡ poor ¡locality ¡of ¡reference ¡ exploit ¡memory ¡hierarchy ¡ Fine ¡grained ¡data ¡accesses, ¡ Coarse ¡grained ¡parallelism, ¡ dominated ¡by ¡latency ¡ bandwidth ¡limited ¡

  8. Example ¡workflow ¡ 7-,2'(.#",/( 3"#4*5( )12&'%#6-$( .#",/(*0( )12&'%#&( !"#$%&'( )*+,*-%-'(

  9. # ¡the ¡variable ¡bigG ¡contains ¡the ¡input ¡graph ¡ # ¡find ¡and ¡select ¡the ¡giant ¡component ¡ comp ¡= ¡bigG.connComp() ¡ giantComp ¡= ¡comp.hist().argmax() ¡ 1. ¡Largest ¡ G ¡= ¡bigG.subgraph(comp==giantComp) ¡ Component ¡

  10. 2. ¡Markov ¡ # ¡cluster ¡the ¡graph ¡ Clustering ¡ clus ¡= ¡G.cluster(’Markov’) ¡

  11. 3. ¡Graph ¡ # ¡contract ¡the ¡clusters ¡ of ¡Clusters ¡ smallG ¡= ¡G.contract(clus) ¡

  12. Example ¡workflow ¡KDT ¡code ¡ # ¡the ¡variable ¡bigG ¡contains ¡the ¡input ¡graph ¡ # ¡find ¡and ¡select ¡the ¡giant ¡component ¡ comp ¡= ¡bigG.connComp() ¡ giantComp ¡= ¡comp.hist().argmax() ¡ G ¡= ¡bigG.subgraph(comp==giantComp) ¡ # ¡cluster ¡the ¡graph ¡ clus ¡= ¡G.cluster(’Markov’) ¡ # ¡contract ¡the ¡clusters ¡ smallG ¡= ¡G.contract(clus) ¡

  13. BFS ¡on ¡a ¡Scale ¡29 ¡RMAT ¡graph ¡ (500M ¡vergces, ¡8B ¡edges) ¡ )" (" '" GTEPS � &" %" *+," $" -./01234" #" !" #$$'" $'!!" '!&#" Number of cores � Machine: ¡NERSC’s ¡Hopper ¡

  14. Breadth-­‑First ¡Search ¡ G ¡ 1 ¡ 2 1 1 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 4 5 7 1 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 6 3

  15. Breadth-­‑First ¡Search ¡ G ¡ f in ¡ 1 ¡ 2 1 1 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 4 5 7 1 ¡ 1 ¡ 1 ¡ 1 ¡ 1 ¡ 7 ¡ 6 3 distance ¡1 ¡from ¡vertex ¡7 ¡

  16. Breadth-­‑First ¡Search ¡ G ¡ f in ¡ f out ¡ 1 ¡ 2 1 1 ¡ 1 ¡ 1 ¡ 1 ¡ 7 ¡ × ¡ = ¡ 1 ¡ 1 ¡ 7 ¡ 4 5 7 1 ¡ 1 ¡ 7 ¡ 1 ¡ 1 ¡ 1 ¡ 7 ¡ 6 3 distance ¡1 ¡from ¡vertex ¡7 ¡

  17. Breadth-­‑First ¡Search ¡ G ¡ f in ¡ 1 ¡ 2 1 1 ¡ 1 ¡ 1 ¡ 1 ¡ 3 ¡ 1 ¡ 1 ¡ 4 ¡ 4 5 7 1 ¡ 1 ¡ 5 ¡ 1 ¡ 1 ¡ 1 ¡ 6 3 distance ¡2 ¡from ¡vertex ¡7 ¡

  18. Breadth-­‑First ¡Search ¡ G ¡ f in ¡ f out ¡ 1 ¡ 4 ¡ 2 1 1 ¡ 1 ¡ 1 ¡ 1 ¡ 3 ¡ 4 ¡ × ¡ = ¡ 1 ¡ 1 ¡ 4 ¡ 4 5 7 1 ¡ 1 ¡ 5 ¡ 1 ¡ 1 ¡ 5 ¡ 1 ¡ 6 3 distance ¡2 ¡from ¡vertex ¡7 ¡

  19. KDT ¡BFS ¡rougne ¡ # initialization � parents = Vec(self.nvert(), -1, sparse=False) frontier = Vec(self.nvert(), sparse=True) parents[root] = root frontier[root] = root # 1 st frontier is just the root # the semiring mult and add ops simply return the 2 nd arg � semiring = sr(( lambda x,y: y), ( lambda x,y: y)) � # loop over frontiers � while frontier.nnn() > 0: frontier.spRange() # frontier[i] = i self.e.SpMV(frontier, semiring=semiring, inPlace=True) # remove already discovered vertices from the frontier. frontier.eWiseApply(parents, op=( lambda f,p: f), � doOp=( lambda f,p: p == -1), inPlace=True) # update the parents parents[frontier] = frontier

  20. BFS ¡comparison ¡with ¡PBGL ¡ Problem ¡Size ¡ Core ¡Count ¡ Code ¡ (Machine) ¡ Scale ¡19 ¡ Scale ¡22 ¡ Scale ¡24 ¡ PBGL ¡ 3.8 ¡ 2.5 ¡ 2.1 ¡ 4 ¡ (Neumann) ¡ KDT ¡ 8.9 ¡ 7.2 ¡ 6.4 ¡ PBGL ¡ 8.9 ¡ 6.3 ¡ 5.9 ¡ 16 ¡ (Neumann) ¡ KDT ¡ 33.8 ¡ 27.8 ¡ 25.1 ¡ PBGL ¡ 25.9 ¡ 39.4 ¡ 128 ¡ (Carver) ¡ KDT ¡ 237.5 ¡ 262.0 ¡ PBGL ¡ 22.4 ¡ 37.5 ¡ 256 ¡ (Carver) ¡ KDT ¡ 327.6 ¡ 473.4 ¡ Performance ¡comparison ¡of ¡KDT ¡and ¡PBGL ¡breadth-­‑first ¡search. ¡The ¡reported ¡ numbers ¡are ¡in ¡MegaTEPS, ¡or ¡10 6 ¡traversed ¡edges ¡per ¡second. ¡The ¡graphs ¡are ¡ Graph500 ¡RMAT ¡graphs ¡with ¡2 scale ¡vergces ¡and ¡16*2 scale ¡edges. ¡

  21. Plain ¡graph ¡ Connecgvity ¡only. ¡

  22. Edge ¡Ahributes ¡(semangc ¡graph) ¡ ¡ (T, F, 0) (T, F, 3) (F, T, 1) (T, F, 2) (T, T, 3) (T, F, 0) (T, T, 1) (T, F, 2) (F, F, 0) (F, T, 1) class edge_attr: isText (F, T, 4) isPhoneCall weight (T, T, 5)

  23. Edge ¡Ahribute ¡Filter ¡ G.addEFilter( lambda e: e.weight > 0) (T, F, 3) (F, T, 1) (T, F, 2) (T, T, 3) (T, T, 1) (T, F, 2) (F, T, 1) class edge_attr: isText (F, T, 4) isPhoneCall weight (T, T, 5)

  24. Edge ¡Ahribute ¡Filter ¡Stack ¡ G.addEFilter( lambda e: e.weight > 0) G.addEFilter( lambda e: e.isPhoneCall) (F, T, 1) (T, T, 3) (T, T, 1) (F, T, 1) class edge_attr: isText (F, T, 4) isPhoneCall weight (T, T, 5)

  25. Filter ¡implementagon ¡details ¡ • Filter ¡defined ¡as ¡a ¡unary ¡predicate ¡ – operates ¡on ¡edge ¡or ¡vertex ¡value ¡ – wrihen ¡in ¡Python ¡ – predicates ¡checked ¡in ¡order ¡they ¡were ¡added ¡ • Each ¡KDT ¡object ¡maintains ¡a ¡stack ¡of ¡filter ¡ predicates ¡ – all ¡operagons ¡respect ¡filter ¡ • enables ¡filter-­‑ignorant ¡algorithm ¡design ¡ • enables ¡algorithm ¡designers ¡to ¡use ¡filters ¡

  26. Two ¡filter ¡modes ¡ • On-­‑The-­‑Fly ¡filters ¡ – predicate ¡checked ¡each ¡gme ¡an ¡operagon ¡touches ¡ vertex ¡or ¡edge ¡ • Materialized ¡filters ¡ – make ¡copy ¡of ¡graph ¡which ¡excludes ¡filtered ¡ elements ¡ • predicate ¡checked ¡only ¡once ¡for ¡each ¡element ¡

  27. Performance ¡of ¡On-­‑The-­‑Fly ¡filter ¡ vs. ¡Materialized ¡filter ¡ • For ¡restricgve ¡filter ¡ – OTF ¡can ¡be ¡cheaper ¡since ¡fewer ¡edges ¡are ¡touched ¡ • corpus ¡can ¡be ¡huge, ¡but ¡only ¡traverse ¡small ¡pieces ¡ • For ¡non-­‑restricgve ¡filter ¡ – OTF ¡Saves ¡space ¡(no ¡need ¡to ¡keep ¡two ¡large ¡copies) ¡ – OTF ¡Makes ¡each ¡operagon ¡more ¡computagonally ¡ expensive ¡

  28. texts ¡and ¡phone ¡calls ¡ # ¡draw ¡graph ¡ draw(G) ¡ # ¡Each ¡edge ¡has ¡this ¡a:ribute: ¡ class ¡edge_ahr: ¡ ¡ ¡ ¡ ¡isText ¡ ¡ ¡ ¡ ¡isPhoneCall ¡ ¡ ¡ ¡ ¡weight ¡

  29. Betweenness ¡Centrality ¡ bc ¡= ¡G.centrality(“approxBC”) ¡ # ¡draw ¡graph ¡with ¡node ¡sizes ¡ # ¡propor=onal ¡to ¡BC ¡score ¡ draw(G, ¡bc) ¡

  30. Betweenness ¡Centrality ¡on ¡texts ¡ # ¡BC ¡only ¡on ¡text ¡edges ¡ G.addEFilter( ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡lambda ¡e: ¡e.isText) ¡ bc ¡= ¡G.centrality(“approxBC”) ¡ # ¡draw ¡graph ¡with ¡node ¡sizes ¡ # ¡propor=onal ¡to ¡BC ¡score ¡ draw(G, ¡bc) ¡

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