1 / 25

A modification of the Fiduccia-Mattheyses hypergraph bipartitioning algorithm

A modification of the Fiduccia-Mattheyses hypergraph bipartitioning algorithm. Rusakov A. S. (IPPM RAS), Sheblaev M. Motivation. Let H(V, E) - hypergraph with V — nodes, Е – hyperedges,

chaz
Download Presentation

A modification of the Fiduccia-Mattheyses hypergraph bipartitioning algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A modification of the Fiduccia-Mattheyseshypergraphbipartitioning algorithm Rusakov A. S. (IPPM RAS), Sheblaev M.

  2. Motivation • Let H(V, E) - hypergraph with V — nodes, Е– hyperedges, • are edge and node weights. The problem of the balanced hypergraph bipartitioning is to find sets of nodes A and B to minimize sum of edges weights belong to cut : • Balance constrain must be satisfied:

  3. Motivation • Graph and hypergraph partitioning — wide application area. • Spectral method, simulated annealing, genetic algorithms • Iterative improvement. KL method. FM algorithm. • State of the art: multilevel iterative improvement algorithms. • Metis, Hmetis, Scotch, MLPART, PaToH… • FM algorithm does not perform well on graphs with largely varied node weights w(vi) or multiple node weight for node. • We address FM algorithm weakness as part of multilevel bipartition algorithm.

  4. Multilevel Partitioning Clustering Refinement

  5. Fiduccia-Mattheyses pass. • FM algorithm: • One FM pass: given inital bipartition of the hypergraph G(v,e) Initialize node gains, bucket. while ( !bucket.empty() ) { take best gain node satisfying balance constrain vi Move vi Lock vi, remove vi from bucket update gains in the vi neighbourhood • } • Choose best solution seen in the pass. • «Gain bucket» data structure is used. It allows to update bucket and take best node at O(1) if max gain move is balanced. • One FM pass takes O(n)

  6. Moves are made based on object gain. Object Gain: The amount of change in cut crossings that will occur if an object is moved from its current partition into the other partition • FM Partitioning: -1 2 0 - each object is assigned a gain - objects are put into a sorted gain list - the object with the highest gain from the larger of the two sides is selected and moved. - the moved object is "locked" - gains of "touched" objects are recomputed - gain lists are resorted 0 -1 0 -2 0 0 -2 -1 1 -1 1

  7. FM Partitioning: -1 2 0 0 -1 0 -2 0 0 -2 -1 1 -1 1

  8. -1 -2 -2 0 -1 -2 -2 0 0 -2 -1 1 -1 1

  9. -1 -2 -2 0 -1 -2 -2 0 0 -2 -1 1 1 -1

  10. -1 -2 -2 0 -1 -2 -2 0 -2 -2 1 -1 -1 -1

  11. -1 -2 -2 1 -2 -2 0 -2 -2 -2 1 -1 -1 -1

  12. -1 -2 -2 1 -2 -2 0 -2 -2 -2 1 -1 -1 -1

  13. -1 -2 -2 1 -2 -2 0 -1 -2 -2 -2 -3 -1 -1

  14. -1 -2 -2 -1 -2 -2 -2 -1 -2 -2 -2 -3 -1 -1

  15. Cut During One Pass (Bipartitioning) Cut Moves

  16. Gain Bucket Data Structure +pmax Max Gain Cell # Cell # -pmax 2 n 1

  17. FM with largely varied weights • Classic bucket *cell = max_gain_cell while( cell != NULL) { if ( IsBalancedMove(cell) return cell; Remove cell from bucket(cell) cell = cell->next } return NULL Fast. O(1) • Bucket with restart *cell = max_gain_cell while( cell != NULL) { if ( IsBalancedMove(cell) return cell; cell = cell->next } return cell; Gives much better cut size

  18. Gain Bucket Data Structure +pmax Max Gain Cell # Cell # -pmax 2 n 1

  19. FM with largely varied weights • Our modification of bucket. Introduce a new pointer to first balanced cell: GetBestMove() { *cell = max_gain_cell If (first_balanced) cell = first_balanced; while( cell != NULL) { if ( IsBalancedMove(cell) { first_balanced = cell->next; return cell; } cell = cell->next } return NULL } Starts search from the “good” cell. Good tradeoff of runtime and cut size • Update of the gain cell. Reset • UpdateGainCell(new gain) { • ... If(new_gain > first_balanced_gain) first_balance = NULL … • }

  20. FLAT FM results. 2% imbalance

  21. Application to Multilevel Bipartitioning • runs with 5 clusterization scheme (FC, MHEC, HEM, HEC, PinHEM). Choose best • V cycle

  22. Multilevel Results Achieve almost the same cut size with 30% speeding up

  23. Applying LIFO* [*] • Implemented LIFO*. • Evaluated [*] on our benchmarks set. Pure LIFO* did not show improvement. • Combination of LIFO and LIFO* passes improved cut and runtime. Each 3th pass uses LIFO*. [*] - Yourim Yoon, Yong-Hyuk Kim, New Bucket Managements in Iterative Improvement Partitioning Algorithms

  24. Combination of LIFO and LIFO* Results on ISPD98 hypergraph benchmarks. Multilevel bipartition. LIFO* on each 3th pass

  25. Conclusion • Classic FM performs suboptimal on graps/hypergraphs with varied node weights. • Bucket with restarts provides best cut value. No crucial runtime penalty in multilevel FM. • Propose new algorithm modification. Good quality/runtime tradeoff

More Related