Graph partition explained

In mathematics, a graph partition is the reduction of a graph to a smaller graph by partitioning its set of nodes into mutually exclusive groups. Edges of the original graph that cross between the groups will produce edges in the partitioned graph. If the number of resulting edges is small compared to the original graph, then the partitioned graph may be better suited for analysis and problem-solving than the original. Finding a partition that simplifies graph analysis is a hard problem, but one that has applications to scientific computing, VLSI circuit design, and task scheduling in multiprocessor computers, among others.[1] Recently, the graph partition problem has gained importance due to its application for clustering and detection of cliques in social, pathological and biological networks. For a survey on recent trends in computational methods and applications see .[2] Two common examples of graph partitioning are minimum cut and maximum cut problems.

Problem complexity

Typically, graph partition problems fall under the category of NP-hard problems. Solutions to these problems are generally derived using heuristics and approximation algorithms.[3] However, uniform graph partitioning or a balanced graph partition problem can be shown to be NP-complete to approximate within any finite factor. Even for special graph classes such as trees and grids, no reasonable approximation algorithms exist,[4] unless P=NP. Grids are a particularly interesting case since they model the graphs resulting from Finite Element Model (FEM) simulations. When not only the number of edges between the components is approximated, but also the sizes of the components, it can be shown that no reasonable fully polynomial algorithms exist for these graphs.

Problem

Consider a graph G = (V, E), where V denotes the set of n vertices and E the set of edges. For a (k,v) balanced partition problem, the objective is to partition G into k components of at most size v · (n/k), while minimizing the capacity of the edges between separate components. Also, given G and an integer k > 1, partition V into k parts (subsets) V1, V2, ..., Vk such that the parts are disjoint and have equal size, and the number of edges with endpoints in different parts is minimized. Such partition problems have been discussed in literature as bicriteria-approximation or resource augmentation approaches. A common extension is to hypergraphs, where an edge can connect more than two vertices. A hyperedge is not cut if all vertices are in one partition, and cut exactly once otherwise, no matter how many vertices are on each side. This usage is common in electronic design automation.

Analysis

For a specific (k, 1 + ε) balanced partition problem, we seek to find a minimum cost partition of G into k components with each component containing a maximum of (1 + ε)·(n/k) nodes. We compare the cost of this approximation algorithm to the cost of a (k,1) cut, wherein each of the k components must have the same size of (n/k) nodes each, thus being a more restricted problem. Thus,

maxi|Vi|\le(1+\varepsilon)\left\lceil

|V|
k

\right\rceil.

We already know that (2,1) cut is the minimum bisection problem and it is NP-complete.[5] Next, we assess a 3-partition problem wherein n = 3k, which is also bounded in polynomial time. Now, if we assume that we have a finite approximation algorithm for (k, 1)-balanced partition, then, either the 3-partition instance can be solved using the balanced (k,1) partition in G or it cannot be solved. If the 3-partition instance can be solved, then (k, 1)-balanced partitioning problem in G can be solved without cutting any edge. Otherwise, if the 3-partition instance cannot be solved, the optimum (k, 1)-balanced partitioning in G will cut at least one edge. An approximation algorithm with a finite approximation factor has to differentiate between these two cases. Hence, it can solve the 3-partition problem which is a contradiction under the assumption that P = NP. Thus, it is evident that (k,1)-balanced partitioning problem has no polynomial-time approximation algorithm with a finite approximation factor unless P = NP.

The planar separator theorem states that any n-vertex planar graph can be partitioned into roughly equal parts by the removal of O vertices. This is not a partition in the sense described above, because the partition set consists of vertices rather than edges. However, the same result also implies that every planar graph of bounded degree has a balanced cut with O edges.

Graph partition methods

Since graph partitioning is a hard problem, practical solutions are based on heuristics. There are two broad categories of methods, local and global. Well-known local methods are the Kernighan–Lin algorithm, and Fiduccia-Mattheyses algorithms, which were the first effective 2-way cuts by local search strategies. Their major drawback is the arbitrary initial partitioning of the vertex set, which can affect the final solution quality. Global approaches rely on properties of the entire graph and do not rely on an arbitrary initial partition. The most common example is spectral partitioning, where a partition is derived from approximate eigenvectors of the adjacency matrix, or spectral clustering that groups graph vertices using the eigendecomposition of the graph Laplacian matrix.

Multi-level methods

See main article: Multi-level technique. A multi-level graph partitioning algorithm works by applying one or more stages. Each stage reduces the size ofthe graph by collapsing vertices and edges, partitions the smaller graph, then maps back and refines this partition of the original graph.[6] A wide variety of partitioning and refinement methods can be applied within the overall multi-level scheme. In many cases, this approach can give both fast execution times and very high quality results. One widely used example of such an approach is METIS,[7] a graph partitioner, and hMETIS, the corresponding partitioner for hypergraphs.[8] An alternative approach originated from [9] and implemented, e.g., in scikit-learn is spectral clustering with the partitioning determined from eigenvectors of the graph Laplacian matrix for the original graph computed by LOBPCG solver with multigrid preconditioning.

Spectral partitioning and spectral bisection

Given a graph

G=(V,E)

with adjacency matrix

A

, where an entry

Aij

implies an edge between node

i

and

j

, and degree matrix

D

, which is a diagonal matrix, where each diagonal entry of a row

i

,

dii

, represents the node degree of node

i

. The Laplacian matrix

L

is defined as

L=D-A

. Now, a ratio-cut partition for graph

G=(V,E)

is defined as a partition of

V

into disjoint

U

, and

W

, minimizing the ratio
|E(G)\cap(U x W)|
|U||W|
of the number of edges that actually cross this cut to the number of pairs of vertices that could support such edges. Spectral graph partitioning can be motivated[10] by analogy with partitioning of a vibrating string or a mass-spring system and similarly extended to the case of negative weights of the graph.[11]

Fiedler eigenvalue and eigenvector

In such a scenario, the second smallest eigenvalue (

λ2

) of

L

, yields a lower bound on the optimal cost (

c

) of ratio-cut partition with

c\geq

λ2
n
. The eigenvector (

V2

) corresponding to

λ2

, called the Fiedler vector, bisects the graph into only two communities based on the sign of the corresponding vector entry. Division into a larger number of communities can be achieved by repeated bisection or by using multiple eigenvectors corresponding to the smallest eigenvalues.[12] The examples in Figures 1,2 illustrate the spectral bisection approach.

Modularity and ratio-cut

Minimum cut partitioning however fails when the number of communities to be partitioned, or the partition sizes are unknown. For instance, optimizing the cut size for free group sizes puts all vertices in the same community. Additionally, cut size may be the wrong thing to minimize since a good division is not just one with small number of edges between communities. This motivated the use of Modularity (Q)[13] as a metric to optimize a balanced graph partition. The example in Figure 3 illustrates 2 instances of the same graph such that in (a) modularity (Q) is the partitioning metric and in (b), ratio-cut is the partitioning metric.

Applications

Conductance

Another objective function used for graph partitioning is Conductance which is the ratio between the number of cut edges and the volume of the smallest part. Conductance is related to electrical flows and random walks. The Cheeger bound guarantees that spectral bisection provides partitions with nearly optimal conductance. The quality of this approximation depends on the second smallest eigenvalue of the Laplacian λ2.

Immunization

Graph partition can be useful for identifying the minimal set of nodes or links that should be immunized in order to stop epidemics.[14]

Other graph partition methods

Spin models have been used for clustering of multivariate data wherein similarities are translated into coupling strengths.[15] The properties of ground state spin configuration can be directly interpreted as communities. Thus, a graph is partitioned to minimize the Hamiltonian of the partitioned graph. The Hamiltonian (H) is derived by assigning the following partition rewards and penalties.

Additionally, Kernel-PCA-based Spectral clustering takes a form of least squares Support Vector Machine framework, and hence it becomes possible to project the data entries to a kernel induced feature space that has maximal variance, thus implying a high separation between the projected communities.[16]

Some methods express graph partitioning as a multi-criteria optimization problem which can be solved using local methods expressed in a game theoretic framework where each node makes a decision on the partition it chooses.[17]

For very large-scale distributed graphs classical partition methods might not apply (e.g., spectral partitioning, Metis) since they require full access to graph data in order to perform global operations. For such large-scale scenarios distributed graph partitioning is used to perform partitioning through asynchronous local operations only.

Software tools

scikit-learn implements spectral clustering with the partitioning determined from eigenvectors of the graph Laplacian matrix for the original graph computed by ARPACK, or by LOBPCG solver with multigrid preconditioning.[9]

METIS[7] is a graph partitioning family by Karypis and Kumar. Among this family, kMetis aims at greater partitioning speed, hMetis,[8] applies to hypergraphs and aims at partition quality, and ParMetis[7] is a parallel implementation of the Metis graph partitioning algorithm.

KaHyPar[18] [19] [20] is a multilevel hypergraph partitioning framework providing direct k-way and recursive bisection based partitioning algorithms. It instantiates the multilevel approach in its most extreme version, removing only a single vertex in every level of the hierarchy. By using this very fine grained n-level approach combined with strong local search heuristics, it computes solutions of very high quality.

Scotch[21] is graph partitioning framework by Pellegrini. It uses recursive multilevel bisection and includes sequential as well as parallel partitioning techniques.

Jostle[22] is a sequential and parallel graph partitioning solver developed by Chris Walshaw. The commercialized version of this partitioner is known as NetWorks.

Party[23] implements the Bubble/shape-optimized framework and the Helpful Sets algorithm.

The software packages DibaP[24] and its MPI-parallel variant PDibaP[25] by Meyerhenke implement the Bubble framework using diffusion; DibaP also uses AMG-based techniques for coarsening and solving linear systems arising in the diffusive approach.

Sanders and Schulz released a graph partitioning package KaHIP[26] (Karlsruhe High Quality Partitioning) that implements for example flow-based methods, more-localized local searches and several parallel and sequential meta-heuristics.

The tools Parkway[27] by Trifunovic andKnottenbelt as well as Zoltan[28] by Devine et al. focus on hypergraphpartitioning.

References

  1. Book: Andreev . Konstantin . Räcke . Harald . Proceedings of the sixteenth annual ACM symposium on Parallelism in algorithms and architectures . Balanced graph partitioning . 2004 . Barcelona, Spain . 120–124 . 10.1145/1007912.1007931 . 978-1-58113-840-5 . 10.1.1.417.8592 .
  2. Buluc . Aydin . Meyerhenke . Henning . Safro . Ilya . Sanders . Peter . Peter Sanders (computer scientist) . Schulz . Christian . 1311.3144 . Recent Advances in Graph Partitioning . 2013 . cs.DS .
  3. Feldmann . Andreas Emil . Foschini . Luca . Balanced Partitions of Trees and Applications . Proceedings of the 29th International Symposium on Theoretical Aspects of Computer Science . 2012 . 100–111 .
  4. Book: Feldmann, Andreas Emil . Fast Balanced Partitioning is Hard, Even on Grids and Trees . Proceedings of the 37th International Symposium on Mathematical Foundations of Computer Science . 2012 . 2011arXiv1111.6745F . 1111.6745 .
  5. Book: Garey . Michael R. . Johnson . David S. . Computers and intractability: A guide to the theory of NP-completeness . registration . 1979 . 978-0-7167-1044-8 . W. H. Freeman & Co..
  6. A multilevel algorithm for partitioning graphs . Hendrickson . B. . Leland . R. . Proceedings of the 1995 ACM/IEEE conference on Supercomputing . 28 . 1995 . ACM.
  7. A fast and high quality multilevel scheme for partitioning irregular graphs . Karypis . G. . Kumar . V. . SIAM Journal on Scientific Computing . 20 . 1 . 359 . 1999 . 10.1137/S1064827595287997. 10.1.1.39.3415 . 3628209 .
  8. Multilevel hypergraph partitioning: application in VLSI domain . Karypis . G. . Aggarwal . R. . Kumar . V. . Shekhar . S. . Proceedings of the 34th annual Design Automation Conference . 526–529 . 1997.
  9. Multiscale Spectral Graph Partitioning and Image Segmentation . Knyazev . Andrew V. . Workshop on Algorithms for Modern Massive Data Sets Stanford University and Yahoo! Research . 2006.
  10. J. Demmel, https://people.eecs.berkeley.edu/~demmel/cs267/lecture20/lecture20.html, CS267: Notes for Lecture 23, April 9, 1999, Graph Partitioning, Part 2
  11. Andrew . Knyazev . 2018 . On spectral partitioning of signed graphs . Eighth SIAM Workshop on Combinatorial Scientific Computing, CSC 2018, Bergen, Norway, June 6–8 . 10.1137/1.9781611975215.2. free . 1701.01394 .
  12. M. . Naumov . T. . Moon . 2016 . Parallel Spectral Graph Partitioning . NVIDIA Technical Report . nvr-2016-001 .
  13. Newman . M. E. J. . 2006 . Modularity and community structure in networks . PNAS . 103 . 23 . 8577–8696 . 10.1073/pnas.0601602103 . 16723398 . 1482622. physics/0602124 . 2006PNAS..103.8577N . free .
  14. Y. Chen, G. Paul, S. Havlin, F. Liljeros, H.E. Stanley . Finding a Better Immunization Strategy . Phys. Rev. Lett. . 2009 . 101 . 5 . 058701. 10.1103/PhysRevLett.101.058701 . 18764435 .
  15. Statistical mechanics of community detection . July 2006 . 10.1103/PhysRevE.74.016110 . 16907154 . Reichardt . Jörg . Bornholdt . Stefan . 1 . Phys. Rev. E . 016110 . 74. cond-mat/0603718. 2006PhRvE..74a6110R. 792965 .
  16. Carlos . Alzate . Johan A. K. . Suykens . Multiway Spectral Clustering with Out-of-Sample Extensions through Weighted Kernel PCA . IEEE Transactions on Pattern Analysis and Machine Intelligence . 32 . 0162-8828 . 2010 . 335–347 . 10.1109/TPAMI.2008.292 . 2 . 20075462. 200488 .
  17. Kurve, A.; Griffin, C.; Kesidis G. (2011) "A graph partitioning game for distributed simulation of networks", Proceedings of the 2011 International Workshop on Modeling, Analysis, and Control of Complex Networks: 9–16
  18. Book: 2016 Proceedings of the Eighteenth Workshop on Algorithm Engineering and Experiments (ALENEX). Schlag. S.. Henne. V.. Heuer. T.. Meyerhenke. H.. Sanders. P.. Schulz. C.. 2015-12-30. Society for Industrial and Applied Mathematics. 53–67. 10.1137/1.9781611974317.5. K-way Hypergraph Partitioning via n-Level Recursive Bisection. 1511.03137 . 978-1-61197-431-7. 1674598.
  19. Book: 2017 Proceedings of the Nineteenth Workshop on Algorithm Engineering and Experiments (ALENEX). Akhremtsev. Y.. Heuer. T.. Sanders. P.. Schlag. S.. 2017-01-01. Society for Industrial and Applied Mathematics. 28–42. 10.1137/1.9781611974768.3. Engineering a direct k-way Hypergraph Partitioning Algorithm. 978-1-61197-476-8.
  20. Book: Heuer. Tobias. Schlag. Sebastian. 2017. Iliopoulos. Costas S.. Pissis. Solon P.. Puglisi. Simon J.. Raman. Rajeev. Improving Coarsening Schemes for Hypergraph Partitioning by Exploiting Community Structure. 16th International Symposium on Experimental Algorithms (SEA 2017). Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. 75. 21:1–21:19. 10.4230/LIPIcs.SEA.2017.21. free . 978-3-95977-036-1.
  21. C. . Chevalier . F. . Pellegrini . PT-Scotch: A Tool for Efficient Parallel Graph Ordering . Parallel Computing . 34 . 6 . 318–331 . 2008 . 10.1016/j.parco.2007.12.001 . 0907.1375 . 10433524 .
  22. C. . Walshaw . M. . Cross . Mesh Partitioning: A Multilevel Balancing and Refinement Algorithm . Journal on Scientific Computing . 22 . 1 . 63–80 . 2000 . 10.1137/s1064827598337373 . 2000SJSC...22...63W . 10.1.1.19.1836 .
  23. R. . Diekmann . R. . Preis . F. . Schlimbach . C. . Walshaw . Shape-optimized Mesh Partitioning and Load Balancing for Parallel Adaptive FEM . Parallel Computing . 26 . 12 . 1555–1581 . 2000 . 10.1016/s0167-8191(00)00043-0 . 10.1.1.46.5687 .
  24. H. . Meyerhenke . B. . Monien . T. . Sauerwald . A New Diffusion-Based Multilevel Algorithm for Computing Graph Partitions . Journal of Parallel Computing and Distributed Computing . 69 . 9 . 750–761 . 2008 . 10.1016/j.jpdc.2009.04.005 . 9755877 . 10.1.1.702.7275 .
  25. H. . Meyerhenke . Shape Optimizing Load Balancing for MPI-Parallel Adaptive Numerical Simulations. . 10th DIMACS Implementation Challenge on Graph Partitioning and Graph Clustering . 67–82 . 2013 .
  26. Peter Sanders (computer scientist) . P. . Sanders . C. . Schulz . Engineering Multilevel Graph Partitioning Algorithms . Proceedings of the 19th European Symposium on Algorithms (ESA) . 6942 . 469–480 . 2011 .
  27. A. . Trifunovic . W. J. . Knottenbelt . Parallel Multilevel Algorithms for Hypergraph Partitioning . Journal of Parallel and Distributed Computing . 68 . 5 . 563–581 . 2008 . 10.1016/j.jpdc.2007.11.002 . 10.1.1.641.7796 .
  28. K. . Devine . E. . Boman . R. . Heaphy . R. . Bisseling . Ü. . Catalyurek . Parallel Hypergraph Partitioning for Scientific Computing . Proceedings of the 20th International Conference on Parallel and Distributed Processing . 124 . 2006 .

Further reading