Top Banner
1 Vitaly Osipov, Peter Sanders, Christian Schulz: Engineering Graph Partitioning Algorithms Department of Informatics Institute for Theoretical Computer Science, Algorithmics II Engineering Graph Partitioning Algorithms Vitaly Osipov, Peter Sanders, Christian Schulz KIT – Universit¨ at des Landes Baden-W ¨ urttemberg und nationales Großforschungszentrum in der Helmholtz-Gemeinschaft www.kit.edu
52

Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

May 10, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

1 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

EngineeringGraph Partitioning AlgorithmsVitaly Osipov, Peter Sanders, Christian Schulz

KIT – Universitat des Landes Baden-Wurttemberg undnationales Großforschungszentrum in der Helmholtz-Gemeinschaft www.kit.edu

Page 2: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Overview

2 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

IntroductionMultilevel AlgorithmsAdvanced TechniquesEvolutionary TechniquesExperimentsSummary

Page 3: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Simulation - FEM

3 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Simulation space is discretizedinto a meshSolution of partial differentialequations are approximated bylinear equationsNumber of vertices canbecome quite large→ time and memoryParallel processing required

Page 4: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

The Common Parallel Approach

4 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Mesh partitioned via dual graph1. Each volume (data, calculation) is

represented by a vertex2. Interdependencies are represented by

edges

All PE’s get same amount of workCommunication is expensive

Graph Partitioning Problem:Partition a graph into (almost) equally sized blocks, such that thenumber of edges connecting vertices from different blocks is minimal.

Page 5: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

ε-Balanced Graph Partitioning

5 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Partition graph G = (V ,E , c : V → R>0,ω : E → R>0)into k disjoint blocks s.t.

total node weight of each block ≤ 1 + ε

ktotal node weight

total weight of cut edges as small as possible

Applications:linear equation systems, VLSI design, route planning, . . .

Page 6: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Multi-Level Graph Partitioning

6 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Successful in existing systems:Metis, Scotch, Jostle,. . . , KaPPa, KaSPar, KaFFPa, KaFFPaE

Page 7: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Advanced TechniquesTalk Today

7 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Edge RatingsHigh Quality MatchingsFlow Based RefinementsMore Localized Local SearchF-cycles for Graph Partitioningn-Level Approach

Page 8: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Graph PartitioningMatching Selection

8 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Goals:1. large edge weights sparsify2. large #edges few levels3. uniform node weights “represent” input4. small node degrees “represent” input unclear objective gap to approx. weighted matchingwhich only considers 1.,2.

Our Solution:Apply approx. weighted matching to general edge rating function

input graph

...

contract

match

Page 9: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Graph PartitioningEdge Ratings

9 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

ω(u, v)

expansion(u, v) :=ω(u, v)

c(u) + c(v)

expansion∗(u, v) :=ω(u, v)c(u)c(v)

expansion∗2(u, v) :=ω(u, v)2

c(u)c(v)

innerOuter(u, v) :=ω(u, v)

Out(v) + Out(u)− 2ω(u, v)

expansion∗2−adist(u, v) :=expansion∗2(u, v)

φu,v

where c = node weight, ω =edge weight,Out(u) := ∑u,v∈E ω(u, v)

Page 10: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Flows as Local ImprovementTwo Blocks

10 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

V1V2B

Gs t

∂1B ∂2B

area B, such that each (s, t)-min cut is ε-balanced cut in Ge.g. 2 times BFS (left, right)

stop the BFS, if size would exceed (1 + ε) c(V )2 − c(V2)

⇒ c(V2new) ≤ c(V2) + (1 + ε) c(V )2 − c(V2)

Page 11: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Flows as Local ImprovementTwo Blocks

11 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

s t

B

GV1

V2

obtain optimal cut in Bsince each cut in B yields a feasible partition→ improved two-partitionadvanced techniques possible and necessary

Page 12: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Example100x100 Grid

12 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Page 13: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

ExampleConstructed Flow Problem (using BFS)

13 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Page 14: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

ExampleApply Max-Flow Min-Cut

14 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Page 15: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

ExampleOutput Improved Partition

15 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Page 16: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Local Improvement for k -partitionsUsing Flows?

16 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

on each pair of blocks

input graph

...

initial

...

outputpartition

local improvement

partitioning

match

contract uncontract

Page 17: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 18: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 19: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 20: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 21: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 22: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 23: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 24: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 25: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 26: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 27: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 28: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

More Localized Local Search

17 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Idea: KaPPa, KaSPar ⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryLocalization:

1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅

each node moved at most once

Page 29: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Global SearchIterated Multilevel [Walshaw 2004]

18 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

contract

input graph

match

... ...local improvement

partitioning

initialuncontractcontract

...

uncontract

local improvement...

match

don’t contract cut edgesno new initial partitioning neededrandom tiebreaking neededlocal improvement has to assure ≤ cuts

Page 30: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Global SearchV-Cycles

19 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Co

arse

nin

gU

nco

arsenin

g

Graph not partitioned

Graph partitioned

Page 31: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Global SearchF-Cycles

20 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Un

coarsen

ingC

oar

sen

ing

Graph not partitioned

Graph partitioned

Page 32: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Sequential Graph PartitioningKarlsruhe Sequential Partitioner

21 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

1. Contractioncontract a single edge between two levels

possibly n levelsfinegrained contraction consequtive levels are very similarno matching algorithm required

use of different edge ratings uniform distribution of node weightspriority queue defines the order of edges to be contracted

2. Local Searchefficent stopping criterion avoid quadratic runtime

3. GeneralTrial Trees improve quality by independent trials

Page 33: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

KaSParLocal Search

22 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Nodes unmarked, active, markedactive nodes

compute gains of moving from one block toanotherchoose the maximum gain

when movedactive markedcan’t become active anymoreunmarked neighbours of marked active

v

u

v

u

Page 34: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

KaSParLocal Search - Stopping Criteria

23 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

touching each node on each level leadsto Ω(n2) runtime⇒ need flexible stopping criteriagains in each step identicallydistributed, independent randomvariables

expectation µvariance σ2

compute µ and σ2 from previous stepsstop after p steps if pµ2 > ασ2 + β

v

u

v

u

Page 35: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

KaSParMemory Overhead

24 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

addressable PQ based on pairing heaps used for contractiondynamic graph data structure

1

2

3

4

5

104

105

106

107

108

me

mo

ry o

verh

ea

d

m

Page 36: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Sequential Graph PartitioningKarlsruhe Fast Flow Partitioner

25 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Focus: Local and Global SearchLocal Search:

1. Flow Based Improvement Methods2. More Localized FM Algorithm (inspired by KaSPar)

Global Search:1. V-cycles and F-cycles similar to methods used in multigrid

V1V2B

Gs t

∂1B ∂2B

contract

input graph

match

... ...local improvement

partitioning

initialuncontractcontract

...

uncontract

local improvement...

match

Page 37: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

DistributedEvolutionary Graph Partitioning

26 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Evolutionary Algorithms:highly inspired by biologypopulation of individualsselection, mutation, recombination, ...

Goal: Integrate KaFFPa in an Evolutionary StrategyEvolutionary Graph Partitioning:

individuals ↔ partitionsfitness ↔ edge cut

Parallelization→ quality records in a few minutes for small graphs

Page 38: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Evolutionary AlgorithmsGeneral Structure

27 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

procedure steady-state-EAcreate initial population Pwhile stopping criterion not fulfilled

select parents P1, P2 from Pcombine P1 with P2 to create offspring omutate offspring oevict individual in population using o

return the fittest individual that occurred

Page 39: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Combine

28 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

match

contract

two individuals P1, P2:don’t contract cut edges of P1 or P2

until no matchable edge is leftcoarsest graph↔ Q-graph of overlay→ exchanging good parts is easyinital solution: use better of both parents

Page 40: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

ExampleTwo Individuals P1, P2

29 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Page 41: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

ExampleOverlay of P1, P2

30 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Page 42: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

ExampleMultilevel Combine of P1, P2

31 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

match

contract

Page 43: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Exchanging good parts is easyCoarsest Level

32 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

>> <

>> <

G

v1

v2

v3

v4 >> <

>> <

G

v1

v2

v3

v4

>> large weight, < small weightstart with the better partition (red, P2)move v4 to the opposite blockintegrated into multilevel scheme (+local search on each level)

Page 44: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

ExampleResult of P1, P2

33 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Page 45: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Parallelization

34 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

each PE has its own island (a local population)locally: perform combine and mutation operationscommunicate analog to randomized rumor spreading

1. rumor↔ currently best local partition2. local best partition changed → send it to O(log P) random PEs3. asynchronous communication (MPI Isend)

Page 46: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Experimental ResultsComparison with Other Systems

35 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Geometric mean, imbalance ε = 0.03:11 graphs (78K–18M nodes) ×k ∈ 2,4,8,16,64

Algorithm large graphsBest Avg. t[s]

KaFFPa strong 12 053 12 182 121.22KaSPar strong 12 450 +3% 87.12KaFFPa eco 12 763 +6% 3.82Scotch 14 218 +20% 3.55KaFFa fast 15 124 +24% 0.98kMetis 15 167 +33% 0.83

Repeating Scotch as long as KaSPar strong run and choosing thebest result 12.1% larger cutsWalshaw instances, road networks, Florida Sparse MatrixCollection, random Delaunay triangulations, random geometricgraphs

Page 47: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

QualityEvolutionary Graph Partitioning

36 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

blocks k KaFFPaEimprovement overreps. of KaFFPa

2 0.2%4 1.0%8 1.5%

16 2.7%32 3.4%64 3.3%

128 3.9%256 3.7%

overall 2.5%

2h time, 32 cores per graph and k , geom. mean

Page 48: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Quality

37 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

1 5 20 100 500

7900

8100

8300

k=64

normalized time tn

mea

n m

in c

ut Repetitions

KaFFPaE

Page 49: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Walshaw Benchmark

38 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

runtime is not an issue614 instances (ε ∈ 1%,3%,5%)focus on partition quality

Algorithm < ≤KaPPa 131 189KaSPar 155 238KaFFPa 317 435KaFFPaE 300 470

overall quality records ≤:ε ≤1% 78%3% 92%5% 94%

Page 50: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Summary

39 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

input graph

OutputPartition

contract

... ...

match

distr.evol. Alg.

partitioning

initial

local improvement

uncontract

Cycles a la multigridW−F−V−

[ALENEX12]

+

flows etc.

MultilevelGraph Partitioning

Page 51: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

Outlook

40 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Further Material in the Paper(s)F-cycles, High Quality Matchings, ....Different combine and mutation operatorsSpecialization to road networks (Buffoon)Many more details and experiments ...

Future Workother objective functions

currently via selection criterionconnectivity? f (P) := f (P) + χP not connected · |E |

integrate other partitionersgraph clusteringopen source release

Page 52: Engineering Graph Partitioning Algorithmsalgo2.iti.kit.edu/schulz/collection/talks/talk_dortmund12.pdf · Engineering Graph Partitioning Algorithms Department of Informatics Institute

41 Vitaly Osipov, Peter Sanders, Christian Schulz:Engineering Graph Partitioning Algorithms

Department of InformaticsInstitute for Theoretical Computer Science, Algorithmics II

Thank you!

Contact: [email protected]@kit.edu