Local Refinement for Graph Partitioning Based on Level Structure

. Graph partitioning is a fundamental problem in several scientific and engineering applications. In this paper, we propose a heuristic local refinement algorithm for graph partitioning, which seeks to improve the quality of separators by reducing the width of the level structure. The experiments reported in this paper show that the use of our local refinement algorithm results in a considerable improvement in the quality of partitions over conventional graph partitioning scheme based on level structure.


Introduction
Graph partitioning is an important problem that has extensive applications in many areas, including VLSI design, parallel task scheduling, image segmentation, sparse matrix factorization, etc.
Given an undirected graph G=(V, E), where V is the set of vertices, with |V|=n, and E the set of edges that determines the connectivity among the vertices.Without loss of generality, let the graph G be connected.A node separator is a node subset S v (S v ⊂V) whose removal divides V-S v into k disconnected parts V 1 , V 2 , … , V k , so that V i ∩V j =∅ for all i≠j.An edge separator is an edge subset S E (S E ⊂E) whose removal divides V into k disconnected parts V 1 , V 2 , … , V k , so that V i ∩V j =∅ for all i≠j.
The graph partitioning problem is to find a minimal node or edge separator which divides the graph into k roughly equal parts.Specially when k=2, it becomes the well-known graph bisection problem which is only considered in this paper without loss of generality.Unfortunately, graph partitioning problem, even the bisection problem, is NP-complete [1].So, many algorithms have been developed to find reasonably good separators.
It is difficult to quantify good separators.Generally speaking, they are small subsets of nodes or edges whose removal divides the graph approximately in half.For different classes of problems, the size of what is regarded as good separators varies.Lipton and Tarjan [2] show that any planar graph can be divided into components of no more than 2n/3 vertices by removing a set of no more than 8n vertices.Moreover, such a separator can be found in O(n) time.
In this paper, we propose a heuristic local refinement algorithm, based on successively optimizing level structure, for the graph partition problem.
The outline of this paper is as follows: In section 2, we present a partitioning scheme based on level structures.Section 3 introduces a new local refinement algorithm to improve the quality of separators.In section 4, we provide some comparative experimental results, which show considerable improvement in the quality of partitions.

Partitioning Scheme based on level structure
Let G=(V, E) be a connected graph, where V is the set of vertices with |V|=n, and E the set of edges with |E|=m.Given a node v∈V, the level structure L v (G)(or L(G) for short) rooted at v is defined to be the subset sequence where L 0 ={v}, and for level i=1,…,h, The essential properties of L(G) are that all nodes adjacent to nodes in L 0 are in either L 0 or L 1 ; all nodes adjacent to nodes in L h are in either L h or L h-1 ; for 0<i<h, all nodes adjacent to nodes in L i are in either L i-1 , L i or L i+1 .The number of levels h is the length of a longest path from the node v 0 to other nodes in the graph, which is called length of the level structure.Correspondingly, w i (L)=|L i |(the number of nodes in L i ) is called the width of L i , and w(L)=max{w i (L)}(i=0,…,h) is the width of the level structure L(G).
In the level structure, any level L i (0<i<h) is a node separator and any E i (1≤i≤h) is an edge separator by defining E i = {(v p ,v q )|v p ∈L i-1 , v q ∈L i , and (v p ,v q )∈E}.In order to divide the graph into roughly equal parts, the separator is required choosing appropriately.We can choose the level L j as a node separator such that j = max{i: Or choose E j as a edge separator such that The size of separator is also of great importance.Intuitively, we hope the level structure is as long and narrow as possible, which is, however, a NP-complete problem.Generally speaking, level structures of small width are usually among those of maximal length.Increasing the number of levels always decreases the average number of vertices in each level, and tends to reduce the width of the level structures as well.Ideally, generating level structures rooted at endpoints of a diameter is the best.However, there is no known efficient algorithm which can always finds such vertices.A heuristic scheme is given by Gibbs [14] to obtain the endpoints of a pseudo-diameter, which are a pair of vertices that are at nearly maximal distance apart.The pair of vertices are called pseudoperipheral nodes.After finding a pseudo-diameter, two long level structures L u and L v are constructed, which rooted at the pseudoperipheral nodes u and v respectively.These two level structures can be combined into a new level structure whose width is usually less than that of either of the original ones.According to the above mentioned procedure, we can construct a long and narrow level structure.The following problem is whether we can further reduce the width of the level structures.In next section, a local refinement algorithm is proposed to reduce the width of the level structures, which can further improve the quality of partitioning.

A New Local Refinement Algorithm
As mentioned above, reducing the width of level structures can further improve the quality of separators.In this section, we present a local refinement algorithm to narrow the level structures and thus to reduce the size of separators.
The basic idea of our algorithm is: find the levels that have the most nodes and move the nodes in these levels successively into other levels.There are two basic operations performed by the algorithm: lifting a node and dropping a node.
According to the definition in section 2, given a node v∈L k , the basic operation LIFT(v, h) moves v into L k-h .Before v is lifted, all nodes in Adj G (v) can exist only in three levels: L k-1 , L k and L k+1 .While after lifted, in order to ensure the integrality and validity of the level structure, some nodes in Adj G (v)

258
Emerging Engineering Approaches and Applications need being lifted accordingly.Specifically, operation LIFT(u, max{k-1+α, 0}) should be performed to each u∈Adj G (v) in L k+α (α=-1, 0, 1).Then, operation should be performed to Adj G (Adj G (v)).This pattern continues until the new level structure is built completely.Obviously, the operation LIFT(v, h) is a recursive process, which is described in Fig. 1

(level[v] is level number of node v).
Given a node v∈L k , the operation DROP(v, h) moves v into L k+h , which can be defined in the similar way.Fig. 2 shows our algorithm by making use of the operations LIFT and DROP.
Local Refinement Algorithm: 1 calculate the length l and width d of the current level structure 2 find level L k which has the most nodes in all levels 3 for each vertex v∈L k do if the width is reduced and the length is not shortened then 7 set it to the current level structure 8 go to 1 if the width is reduced and the length is not shortened then 12 set it to the current level structure 13 go to 1 Fig. 2 Local refinement algorithm.
In step 2, there are perhaps more than one levels which have the most nodes.Optimization can be performed level by level for this case.Also, we tend to choose the vertex first whose degree is minimal in step 3. A practical approach is ordering all the nodes in L k by degrees and operating them from minimum degree to maximum degree.

Experimental Results and Conclusions
In this section, we present experimental results on the quality of partitioning generated by our algorithm.The experiments are based on the set of real-world graphs from Matrix Market [15].The main characteristics of the graphs that we have used in our experiments are shown in Table 1.But the algorithm also has some disadvantages and limitations.Firstly, it is only a heuristic which cannot ensure a minimum separator.Further, it is not appropriate to partition some undirected graphs by level structure, such as disconnect graphs, etc.In this case, it could not achieve good quality of separators, even if the above local refinement algorithm is used.

Table 1
Characteristics of the graphs that we use in the experiment.

Table 2
compares the quality of partitioning with and without local refinement.W(L) is the width of the level structure L. |NS| and |ES| represent the sizes of node separator and edge separator respectively while N 1 /N 2 and M 1 /M 2 represent the ratio of the two parts of bisection accordingly.It is shown clearly that our algorithm is effective in narrowing the level structures from about 10% to 40%, thus reducing the size of separators to a certain extent.Correspondently, more balanced partitions can be achieved due to the reduction of separators.

Table 2
Comparison of the partitioning quality with and without local refinement.