Graph Coarsening Algorithm
A Graph Coarsening Algorithm is a family of metaheuristic algorithms used to reduce the size and complexity of a large graph while preserving its key structural properties. These algorithms form the core of multilevel frameworks, which transform complex optimization problems on massive graphs into smaller, more manageable ones.
The coarsening process involves merging nodes of a graph into clusters called supernodes and aggregating the edges between these clusters to create a new, smaller graph. This process is applied iteratively until the graph is small enough. Then, the original problem is solved on the final small graph, and the solution is progressively mapped back to the larger, original graphs.
Core concepts
The main objective of coarsening is to create a sequence of graphs, where is the input graph, and each graph is a smaller version of, such that the number of nodes decreases significantly:.This process is based on two main operations:
- Formation of Supernodes: In each step, the nodes of graph are partitioned into several groups based on a specific strategy. Each group of nodes becomes a single supernode in the next graph.
- Determination of Superedges: The edges between supernodes in are created based on the edges between their corresponding nodes in. The weight of a superedge is typically the sum of the weights of the edges connecting the two corresponding groups of nodes.
Coarsening strategies
The selection of nodes for merging is the most critical part of the algorithm and directly impacts the quality of the final solution. This selection is usually performed through matching algorithms on the graph.Heavy Edge Matching (HEM)
This is one of the most effective and widely used strategies, implemented in popular software packages like Metis and Scotch. In HEM, priority is given to merging nodes connected by high-weight edges. The rationale is that nodes with strong connections are more likely to belong in the same partition or cluster.The general steps of the HEM algorithm are as follows:
- The graph's nodes are visited in a random order.
- For each unmatched node, the incident edge with the highest weight,, is considered.
- If the node is also unmatched, the two nodes are matched and selected to form a supernode.
- This process continues until no more matches can be made.
Random matching (RM)
In this strategy, nodes are randomly paired with one of their neighbors. This method is very fast but may overlook important structural properties of the graph, as it treats heavy and light edges equally. RM is typically used when speed is prioritized over quality or when the graph is unweighted.Role in the multilevel partitioning framework
Coarsening is rarely used in isolation; it is typically the first phase of a three-stage framework known as multilevel partitioning. This framework is highly effective for solving NP-hard problems like graph partition.- Phase 1: Coarsening: The original graph is iteratively coarsened until it becomes a small, manageable graph.
- Phase 2: Initial Partitioning: The final small graph is partitioned using a precise algorithm. Since the graph is small, this step is computationally fast.
- Phase 3: Uncoarsening and Refinement: The partition is progressively projected back to the larger, original graphs. At each stage of uncoarsening, the partition boundaries are refined using local optimization algorithms like the Kernighan–Lin algorithm to improve the cut quality.