Adapting Multi-Objective Meta-Heuristics for Graph Partitioning R. Ba˜ nos1 , C. Gil1 , M.G. Montoya1 , and J. Ortega2 1
2
Dept. Arquitectura de Computadores y Electr´ onica, Universidad de Almer´ıa, La Ca˜ nada de San Urbano s/n, 04120 Almer´ıa (Spain) (rbanos,cgil,mari)@ace.ual.es Dept. Arquitectura y Tecnolog´ıa de Computadores, Universidad de Granada, Periodista Daniel Saucedo s/n, 18071 Granada (Spain)
[email protected]
Summary. Real optimization problems often involve not one, but multiple objectives, usually in conflict. In single-objective optimization there exists a global optimum, while in the multi-objective case no optimal solution is clearly defined, but rather a set of solutions, called Pareto-optimal front. Thus, the goal of multiobjective strategies is to generate a set of non-dominated solutions as an approximation to this front. This paper presents a novel adaptation of some of these metaheuristics to solve the multi-objective Graph Partitioning problem.
Key words: Multi-Objective Optimization, Graph Partitioning, Simulated Annealing, Tabu Search
1 Introduction Most real-life optimization problems require taking into account, not one, but multiple objectives simultaneously. In most cases, these objectives are in conflict, i.e., the improvement of some objectives imply the deterioration of others. Recently, the Pareto optimality concept [8] has been used to solve multi-objective optimization (MOO) problems. Graph Partitioning is an important optimization problem that appears in many real life applications. It consist of obtaining a partition of the vertices of a graph into a given number of roughly equal parts, whilst ensuring that the number of edges connecting vertices in different sub-graphs is minimized. As the problem is NP-complete [4], efficient procedures providing high quality solutions in reasonable runtimes are very useful. Most of the proposed algorithms to solve the GPP are single-objective, i.e., the objective is to minimize the number of edges connecting vertices of different sub-graphs, while the imbalance is considered a constraint. Thus far, there exist few works related to GPP from the multi-objective perspective. This paper describes
124
R. Ban˜os et al.
how to solve the graph partitioning problem by using Multi-Objective MetaHeuristics (MOMHs). Section 2 provides a more precise definition of the GPP, and offers a brief survey of the current state of the art. Section 3 describes the Pareto-based MOMHs we have adapted to solve the problem. Section 4 presents the results obtained by the different MOMHs in several test graphs, and the metrics used in the comparison. Finally, Section 5 contains the conclusions here obtained.
2 The Graph Partitioning Problem The Graph Partitioning Problem (GPP) occurs in many real applications, as load balancing [18], VLSI design [6], task scheduling [1], etc. Let G=(V, E ) be a undirected graph, where V is the set of vertices, |V|=n, and E the set of edges which determines the connectivity of V. The GPP consists of dividing V into SG balanced sub-graphs, V1 ,V2 ,..., VSG , such that the number of edges that connect vertices belonging to different sub-graphs SG (cutsize) is minimized, verifying that Vi ∩Vj =φ, ∀ i=j ; and sg=1 |Vsg | = |V|. The balance constraint is defined by the maximum sub-graph weight, M=max(|Vsg |), ∀sg ∈ [1,SG]. In single-objective GPP, the objective is to minimize the cutsize, while the imbalance defined by M is considered a constraint. There exist many algorithms to solve the GPP in the single-objective perspective [9]. Most of them use the multilevel paradigm [11] in combination with any optimization technique. The main handicap of this model is the dependency on the imbalance constraint. Figure 1(a) shows a partition s, and Figure 1(b) other s*, which has been obtained by moving a boundary vertex from a sub-graph to the other. In Figure 1(c) both solutions are represented in the solution space. Thus, if the maximum allowed imbalance is x=30%, the solution s is selected as the best. However, if the maximum imbalance is x=20%, the best would be s*, due to s has a forbidden imbalance, despite having less cutsize. Thus far, the number of works deal with the GPP is very limited [14, 15]. A typical approach is based on creating a mathematical multi-objective function as the weighting sum of the solution objective functions [15]. The main weakness of these approaches is the difficulty of assigning priorities to the objectives. An interesting way to overcome this disadvantage is to use the Pareto-dominance concept. Nevertheless, few works have focused on solving the multi-objective GPP by using the Pareto-dominance approach. We can reference [14], where authors adapted the SPEA multi-objective evolutionary algorithm [19] to the GPP. They tested the performance of this adaptation, obtaining unsatisfactory results. Their experimental results indicated that the use of a local search procedure allows for improvement in the quality of the solutions in comparison with the SPEA adaptation. This is the reason why we use MOMHs, discarding the MOEAs.
Adapting Multi-Objective Meta-Heuristics for Graph Partitioning
(a)
s
25%
s*
%imbalance
12,5%
(b)
125
0
6
8
#cutsize
(c)
Fig. 1. Movement of s (a) to s* (b), and their representation in the solution space.
3 Adapting Local Search MOMHs for GPP Let P be a MOO problem, with K ≥2 objectives. Instead of giving a scalar value to each solution, a partial order is defined based on Pareto-dominance relations. A solution s 1 is said to dominate another s 2 (s 1 ≺s 2 ) when it is better in at least one objective, and not worse in the others. A solution is said to be non-dominated if no solution can be found that dominates it. The set of non-dominated solutions is called Pareto optimal set. Since there is no single scalar decision, this set normally contains not one solution, but several. As all the objectives are equally important, the aim of multi-objective optimization is to induce this entire set. Previous experiments [5, 2] have demonstrated the good behaviour of Simulated Annealing and Tabu Search in the single-objective GPP. These metaheuristics have been sucesfully applied in the multi-objective context. This section details the adaptation of some of these MOMHs to the multi-objective formulation of the GPP. 3.1 Serafini’s Multi-Objective Simulated Annealing (SMOSA) One of the first proposed MOMHs was Serafini’s Multi-Objective Simulated Annealing (SMOSA) [16]. In single-objective Simulated Annealing (SA) [12] better neighboring solutions are always accepted, whereas worsening solutions are accepted by using the Metropolis function [13]. This mathematical function accepts new solutions with a certain probability, which is dependent on a parameter, called temperature. In a multi-objective context, it can be seen as always accepting a new solution (s* ) if it dominates the current one (s), i.e. (s*≺s); and to accept s* with a given probability if it is dominated by s, i.e. (s≺s*). However, there is a special case to consider when both solutions are indifferent, i.e., neither s dominates s*, nor s* dominates s (s∼s*). Serafini suggested different transition probabilities for this case: some of these rules
126
R. Ban˜os et al.
are used for the strong acceptance case, in which only dominating neighbors should be accepted with probability one, while other rule is used for the weak acceptance case, in which only dominated neighboring solutions should be accepted with a probability of less than one. Serafini demonstrated that the best choice is to combine strong and weak rules. The adaptation of SMOSA for the GPP is provided in Algorithm 1. Algorithm 1 : Serafini’s Multi-Objective Simulated Annealing (SMOSA) Input: G,RULE, Ti ,Tf actor ,Tstop ; s←GGA(G); cutsize[s]←eval cutsize(s); imb[s]←eval imbalance(s); ND←φ; t←Ti ; While (t>Tstop ) do s*←movement(s); probability←Apply RULE(s*); If (Metropolis (probability,t)=1) then s←s*; Update ND; t←t*Tfactor ; Return ND;
3.2 Ulungu’s Multi-Objective Simulated Annealing (UMOSA) Another important SA-based MOMH is Ulungu’s Multi-Objective Simulated Annealing (UMOSA) [17]. UMOSA executes separate runs by using fixed weights for each objective (see parameter λ in UMOSA algorithm). All the non-dominated sets obtained in each separate run are joined in a global set. Algorithm 2 provides the pseudo-code of UMOSA for GPP. Algorithm 2 : Ulungu’s Multi-Objective Simulated Annealing (UMOSA) Input: G, Ti , Tf actor , Tstop , Nruns ; For (∀r ∈ [1,Nruns ]) do s←GGA(G); cutsize[s]←eval cutsize(s); imb[s]←eval imbalance(s); λcutsize ←τ cutsize , λimb ←τ imb ; λcutsize , λimb ∈[0,1], λcutsize +λimb =1.0; NDr ←φ; t←Ti ; While (t>Tstop ) do s*←movement(s); ∆s← (λcutsize (cutsize[s*]-cutsize[s]) + λimb (imb[s*]-imb[s])); If (Metropolis (∆s,t)=1) then s←s*; Update NDr (s); t←t*Tfactor ; runs NDr ); GlobalN D ← ND(∪N r=1 Return GlobalN D ;
Adapting Multi-Objective Meta-Heuristics for Graph Partitioning
127
3.3 Czyzak’s Pareto Simulated Annealing (PSA) The third SA-based MOMH we have adapted is the Czyzak’s Pareto Simulated Annealing (PSA) [3]. PSA is based on accepting neighboring solutions with a certain probability, which depends on the temperature parameter, as in UMOSA and SMOSA. However, while SMOSA and UMOSA use only a solution, PSA uses a set of solutions in the optimization process. In PSA, each solution dynamically modifies its weights in the objective function, which tries to assure adequate dispersion of the non-dominated solutions. It is important to indicate that a high weight associated with a given objective implies a lower probability of accepting new solutions that decrease the quality in this objective. Pseudocode of PSA is provided in Algorithm 3. Algorithm 3 : Czyzak’s Pareto Simulated Annealing (PSA) Input: G, Population Size (ps), Ti ,Tf actor ,Tstop , α; For (∀s ∈S) do s←GGA(G); cutsize[s]←eval cutsize(s); imb[s]←eval imbalance(s); ND←φ; ←Ti ; For (∀s ∈S) do Update ND(s); While (t>Tstop ) For (∀s ∈S) do s*← movement(s); If (s≺s*) then Update ND(s*); s’←closest solution to s, such that f(s)≺f(s’), s’∈S; If ( ∃s’) then λcutsize ← τ cutsize , λimb ← τ imb ; λcutsize , λimb ∈[0,1], λcutsize +λimb =1.0; Else then If (cutsize[s]≺cutsize[s’]) then λcutsize ←αλcutsize ; If (cutsize[s’]≺cutsize[s]) then λcutsize ←α/λcutsize ; If (imb[s]≺imb[s’]) then λimb ←αλimb ; If (imb[s’]≺imb[s]) then λimb ←α/λimb ; K λ =1.0; Normalize λ such that k=1 k ∆s← (λcutsize (cutsize[s*]-cutsize[s]) + λimb (imb[s*]-imb[s])); If (Metropolis (∆s,t)=1) then s←s*; Update NDi ; Ncount ←0; t←t*Tfactor ; Return ND;
128
R. Ban˜os et al.
3.4 Hansen’s Multi-Objective Tabu Search (MOTS) Tabu Search (TS) [7] is other local search-based optimization method which repeatedly moves from a current solution to the best in the neighborhood, while trying to avoid being trapped in local optimum by maintaining a list of tabu moves. Hansen proposed Multi-Objective Tabu Search (MOTS) [10], which works with a set of solutions which are improved by using a TS acceptance criterion. In MOTS, the weighting values are adaptively modified during the search process. The number of solutions changes according to the dominance rank of each solution. Thus, if the rank is high, the solutions overlap each other in the objective space, and then the number of solutions is decreased. However, a low average rank indicates that the non-dominated solutions are well-spread. The adaptation of MOTS is showed in Algorithm 4. Algorithm 4 : Hansen’s Multi-Objective Tabu Search (MOTS) Input: G, Initial Population Size (ps), Nstop ; For (∀s ∈S) do s←GGA(G); cutsize[s]←eval cutsize(s); imb[s]←eval imbalance(s); TLs ←φ; ND←φ; Ncount ←0; π cutsize ←π imb ←0.5; While (Ncount cutsize[s*]) do λcutsize ←λcutsize +π cutsize w; If(imb[s]>imb[s*]) do λimb ←λimb +π imb w; If (λcutsize =λimb =0) then λcutsize ← τ cutsize , λimb ← τ imb ; λcutsize , λimb ∈[0,1], λcutsize +λimb =1.0; Find s* which maximizes λf(s*), s*∈Neighborhood(s), movement(s,s*)∈TL / s; If (TLs is full) then remove oldest element of TL s ; s←s*; TLs ←TLs ∪movement(s,s*); If ( ∃s’∈ND such as s’≺s) then ND←ND∪s, and update π; Ncount ←Ncount +1 ; Return ND;
4 Experimental Results The executions have been performed by using a 2.4 GHz processor. The graphs used to evaluate the MOMHs (Table 1) belong to a public domain set [9] frequently used to compare single-objective graph partitioning algorithms.
Adapting Multi-Objective Meta-Heuristics for Graph Partitioning
129
This table details the number of vertices and edges, maximum connectivity (max ), minimum connectivity (min), and average connectivity (avg). Table 1. Test Graphs graph add20 3elt uk add32 crack wing nodal
|V| 2395 4720 4824 4960 10240 10937
|E| 7462 13722 6837 9462 30380 75488
min 1 3 1 1 3 5
max 123 9 3 31 9 28
avg 6.23 5.81 2.83 3.82 5.93 13.80
4.1 Parameter Setting As we commented above, SMOSA and UMOSA use a single solution to perform the search process, while PSA y MOTS use a set of solutions. In both cases, the population size has been set to |P|=35. The initial solutions are obtained by using the Graph Growing Algorithm (GGA) [11]. The maximum size of the non-dominated set has also been set to |ND|=35. The annealing parameters for SMOSA, UMOSA, and PSA are Ti=100, and Tfactor=0.999. In UMOSA, the number of runs with different weighting values has been set to 10 (λcutsize =1.0 ... λcutsize =0.0). Note that λimb =1.0-λcutsize . The number of iterations has been set to 11500. This value corresponds to the number of iterations needed by the SA-based MOMHs to fall below t=0.01 with these annealing values. The results here shown correspond to the partitioning of the test graphs into SG=16 sub-graphs. In this work, we have considered an additional constraint in order to discard those solutions with an imbalance greater than 5% (i.e., M ≤1.05). 4.2 Metrics used to evaluate the quality of the solutions As the GPP is NP-complete, the exactly location of the Pareto-optimal set cannot be determined. In order to compare the quality of the non-dominated solutions, we propose four metrics we describe in what follows: • Metric M1 : size of the non-dominated set. M1 ←|ND| (1) • Metric M2 : average area under the non-dominated solutions, taking as reference the maximum cutsize of the initial solutions. |N D| #cutsize[s] #imbalance[s] M2 ← s=1 ( #max cutsize ∗ #max imbalance )/|N D|; ∀s∈ND (2)
130
R. Ban˜os et al.
• Metric M3 : extension of the non-dominated set. M3 ← max{distance(s,s’)}; ∀ s,s’ ∈ ND, s=s’ (3) • Metric M4 : penalty associate to the crowding degree. |N D| |N D| M4 ← s=1 distance(s, s ) ; ∀s,s’∈ND,s’ =nearest to s (4)
4.3 Analysis of the results Table 2 shows the results obtained by the MOMHs in the partitioning of the graphs described in Table 1 into SG=16 subgraphs. In reference to the metric M1, PSA often obtain the non-dominated sets with a greater number of solutions than the other MOMHs. The smallest average area under the non-dominated set (metric M2 ) is obtained by UMOSA. This indicates that the quality of the solutions obtained by UMOSA is superior in most cases to the other MOMHs. SMOSA obtains (in average) non-dominated sets more extensive than the other MOMHs (metric M3 ). This table also shows that the dispersion of non-dominated sets (M4 ) is clearly better in UMOSA. Finally, last column shows that SA-based MOMHs obtain similar runtimes, although in PSA it is higher because it optimizes a set of solutions (as MOTS). Thus, we can conclude that, although the population based MOMHs obtain larger non-dominated sets, the quality of them is higher in SMOSA and UMOSA. 0.05 SMOSA UMOSA PSA MOTS
0.045 0.04
% imbalance
0.035 0.03 0.025 0.02 0.015 0.01 0.005 0 2000
2500
3000
3500
4000
4500
5000
# cutsize
Fig. 2. Evaluating the MOMHs in add20
In addition to the numerical analysis, Figure 2 shows the non-dominated solutions obtained by the MOMHs in the partitioning of add20 into SG=16 sub-graphs. PSA obtains the greater non-dominated set, while UMOSA obtains the non-dominated set with the lowest average enclosed area. On the other hand, PSA and SMOSA obtain the more extensive non-dominated sets. Finally, the smaller average crowding degree is obtained by UMOSA.
Adapting Multi-Objective Meta-Heuristics for Graph Partitioning
131
Table 2. Comparing MOMHs: SMOSA,MOSA,PSA,MOTS graph
Algorithm M1
SMOSAM UMOSA add20 PSA MOTS SMOSAM UMOSA 3elt PSA MOTS SMOSAM UMOSA uk PSA MOTS SMOSAM UMOSA add32 PSA MOTS SMOSAM UMOSA crack PSA MOTS SMOSAM UMOSA wing nodal PSA MOTS SMOSAM UMOSA average PSA MOTS
8 7 11 6 6 2 4 6 4 3 10 4 4 5 15 12 3 2 13 4 9 3 6 6 5.66 3.67 9.83 6.33
M2
M3
0.319 0.228 0.359 0.325 0.047 0.005 0.065 0.195 0.043 0.039 0.144 0.101 0.003 0.045 0.377 0.291 0.036 0.004 0.100 0.023 0.058 0.010 0.185 0.299 0.084 0.055 0.205 0.206
0.660 0.420 0.683 0.439 0.682 0.614 0.252 0.734 0.599 0.476 0.492 0.253 0.703 0.706 0.892 0.522 0.257 0.026 0.314 0.069 0.416 0.521 0.260 0.494 0.553 0.461 0.482 0.419
M4 runtime (secs.) 0.050 0.101 0.056 0.082 0.060 0.614 0.057 0.065 0.072 0.054 0.050 0.077 0.079 0.093 0.050 0.047 0.083 0.026 0.025 0.023 0.013 0.020 0.020 0.013 0.06 0.151 0.043 0.050
125 606 400 11194 185 316 457 5250 143 258 309 5352 137 315 453 7822 539 565 915 23522 1003 662 2083 41841 355 454 770 15830
5 Conclusions In this paper, we have presented a novel adaptation of MOMHs for the multiobjective GPP. This is one of the few papers that compare these techniques, and the first one which applies them to this problem. Previous adaptations of MOEAs, like SPEA, to this problem have obtained dissapointing results. The results obtained by these MOMHs over several test graphs indicate that the population-based MOMHs (MOTS and PSA) obtain the most extensive sets of non-dominated solutions. On the other hand, UMOSA and SMOSA often obtain high quality solutions in comparison with the other techniques. Aspects to analyze are the hybridization of some of these MOMHs, and the parallelization of the population-based versions.
Acknowledges Work supported by the Spanish MCyT under contracts TIC2002-00228. Authors appreciate the support of the ”Structuring the European Research Area” programme, R113-CT-2003-506079, funded by the European Commission.
132
R. Ban˜os et al.
References 1. Aleta A, Codina JM, Sanchez J, Gonzalez A (2001) Graph-Partitioning Based Instruction Scheduling for Clustered Processors. Proc. 34th ACM/IEEE International Symposium on Microarchitecture, pp 150-159 2. Ba˜ nos R, Gil C, Ortega J, Montoya FG (2004) Parallel Multilevel Metaheuristic for Graph Partitioning, J. of Heuristics, 10(3):315-336 3. Czyzak P, Jaszkiewicz A (1998) Pareto Simulated Annealing - a Metaheuristic Technique for Multiple-objective Combinatorial Optimization, J. of MultiCriteria Decision Analysis 7:34-47 4. Garey MR, Johnson DS (1979) Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman & Company, San Francisco 5. Gil C, Ortega J, Montoya MG, Ba˜ nos R (2002) A Mixed Heuristic for Circuit Partitioning, Computational Optimization and Applications J. 23(3):321-340 6. Gil C, Ortega J, Montoya MG (2000) Parallel VLSI Test in a Shared Memory Multiprocessors, Concurrency: Practice and Experience, 12(5):311-326 7. Glover F, Laguna M (1993) Tabu Search. In: C.R. Reeves (eds) Modern Heuristic Techniques for Combinatorial Problems. Blackwell, London, pp. 70-150 8. Goldberg DE (1989) Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley 9. Graph Partitioning Arch. http://staffweb.cms.gre.ac.uk/∼c.walshaw/partition/ 10. Hansen PH (1997) Tabu Search for Multiobjective Optimization: MOTS. Proc. of the 13th International Conference on Multiple Criteria Decision Making 11. Karypis G, Kumar V (1998) A Fast High Quality Multilevel Scheme for Partitioning Irregular Graphs. Tech. Report TR-95-035, University of Minnesota 12. Kirkpatrick S, Gelatt CD, Vecchi MP, (1983) Optimization by Simulated Annealing. Science 220(4598):671-680 13. Metropolis N, Rosenbluth A, Rosenbluth M, Teller A, Teller E, (1953) Equation of State Calculations by Fast Computing Machines. J. of Chemical Physics, 21(6):1087-1092 14. Rummler A, Apetrei A (2002) Graph Partitioning Revised - a Multiobjective Perspective. Proc. of 6th MultiConf. On Syst., Cybern. and Informatics 15. Selvakkumaran N, Karypis G (2003) Multi-Objective Hypergraph Partitioning Algorithms for Cut and Maximum Subdomain Degree Minimization. Proc. Int. Conference on Computer Aided Design, pp 726-733 16. Serafini P. (1993) Simulated Annealing for Multi-Objective Optimization problems. In G.H. Tzeng et al. (eds) Multiple Criteria Decision Making. Expand and Enrich the Domains of Thinking and Application, Springer Berlin, pp. 283-292 17. Ulungu E, Teghem J, Fortemps P, Tuyytens D (1999) MOSA Method: A Tool for Solving Multiobjective Combinatorial Optimization Problems. J. of MultiCriteria Decision Analysis 8(4):221-236 18. Walshaw C, Cross M, Everett MG (1999) Mesh Partitioning and Loadbalancing for Distributed Memory Parallel Systems. In: B. Topping (eds) Parallel & Distributed Proc. for Computational Mechanics: Systems and Tools, pp. 110-123 19. Zitzler E, Thiele L (1999) Multiobjective Evolutionary Algorithms: A Comparative Case Study and the Strength Pareto Approach. IEEE Transactions on Evolutionary Computation 3(4):257-271