• Aucun résultat trouvé

Graph Edit Distance

N/A
N/A
Protected

Academic year: 2022

Partager "Graph Edit Distance"

Copied!
19
0
0

Texte intégral

(1)

Exact Parallel

Graph Edit Distance

Zeina Abu-Aisheh, Romain Raveaux, Jean-Yves Ramel and Patrick

Martineau

(2)

Content

• Introduction

• GED problem

• Solving GED with Branch and Bound

• State of the art on Parallel Branch and Bound

• GED computation through Parallel Branch and Bound

• Results and Demo

• Conclusion

(3)

Introduction

• Motivation

– GED is a NP-Hard problem

– There are no parallel algorithms for GED solving – Exact methods can help to assess accuracy of

heuristics

– Hypothesis : Parallel = fast convergence to optimal

solution

(4)

GED problem

Transforming G1 into G2 by means of edit operations : Insertion, Deletion

and substitution.

(5)

Solving GED with Branch and Bound

• Solution space organised as an ordered tree search

• Decision variables

• 𝑦 𝑖𝑘 = 1 𝑠𝑖 𝑖 𝑎𝑛𝑑 𝑘 𝑎𝑟𝑒 𝑚𝑎𝑡𝑐ℎ𝑒𝑑.

• ∀𝑖 ∈ 𝑉 1 ∪ 𝜀, 𝑘 ∈ 𝑉 2 ∪ 𝜀

j i

l k

Matching cost = c(i,j,k,l)

G1 G2

Graph matching

(6)

Solving GED with Branch and Bound

 B&B algorithm: [Abu-Aisheh 2015]

 p : partial solution

 g(p) : total cost of p

 h(p) : estimated cost of p

 f=g+h (a lower bound)

 Branching Scheme o Depth-first search

 Selection strategy

o Choose minimum cost p

 Initial upper bound o d_ub

A B

A’ B’

C D

C’

A-A’ A-B’ A-C’ A-ϵ

root

B-A’ B-C’ B-ϵ

C-C’ C-ϵ

D--ϵ

g=1 h=4 f=5 g=2

h=5 f=7

g=3 h=2 f=5 g=1

h=5 f=6 g=1

h=5 f=6 g=1.5

h=4 f=5.5

g=3 h=3 f=6 g=1.5

h=4 f=5.5

g=2 h=3.8 f=5.8 g=5.7

h=0*

f=5.7*

(7)

Solving GED with Branch and Bound

 B&B algorithm: [Abu-Aisheh 2015]

 p : partial solution

 g(p) : total cost of p

 h(p) : edtimated cost of p

 f=g+h

 Branching Scheme o Depth-first search

 Selection strategy

o Choose minimum cost p

 Reduction Strategy o Prune

A B

A’ B’

C D

C’

A-A’ A-B’ A-C’ A-ϵ

root

B-A’ B-C’ B-ϵ

C-C’ C-ϵ

D--ϵ

g=1 h=4 f=5 g=2

h=5 f=7

g=3 h=2 f=5 g=1

h=5 f=6 g=1

h=5 f=6 g=1.5

h=4 f=5.5

g=3 h=3 f=6 g=1.5

h=4 f=5.5

g=2 h=3.8 f=5.8 g=5.7

h=0*

f=5.7*

 Then

 expand p

 Else

 choose another p

(8)

Solving GED with Branch and Bound

 B&B algorithm: [Abu-Aisheh 2015]

 p : partial solution

 g(p) : total cost of p

 h(p) : estimated cost of p

 f=g+h

 Branching Scheme o Depth-first search

 Selection strategy

o Choose minimum cost p

 Bounding Strategy o Prune

A B

A’ B’

C D

C’

A-A’ A-B’ A-C’ A-ϵ

root

B-A’ B-C’ B-ϵ

C-C’ C-ϵ

D--ϵ

g=1 h=4 f=5 g=2

h=5 f=7

g=3 h=2 f=5 g=1

h=5 f=6 g=1

h=5 f=6 g=1.5

h=4 f=5.5

g=3 h=3 f=6 g=1.5

h=4 f=5.5

g=2 h=3.8 f=5.8 g=5.7

h=0*

f=5.7*

 Then

 Update UB

 Else

 Do nothing

(9)

State of the art on Parallel Branch and Bound

• What can be parallelized ?

– g(p) computation [Chakroun 2013]

– h(p) computation [Chakroun 2013]

– Search tree exploration [Rao 1987] [Neary 2005]

• Exploration of partial solutions is more time consuming than g(p) and h(p)

• Task = Exploration of a tree node (p).

• One thread can have many tasks

(10)

Parallel Graph Edit Distance (PDFS)

G

1

G

2

Generate N tree nodes

Thread

1

(BnB)

Thread

2

(BnB)

Thread

M

(BnB) Branch and

Bound Search Tree Decomposition

10

A-A’ A-B’ A-C’ A-ϵ

root

B-A’ B-C’ B-ϵ B-A’ B-B’ B-ϵ

g=1 h=4 f=5 g=2

h=5 f=7

g=3 h=2 f=5 g=1

h=5 f=6

g=4 h=2 f=6

g=4 h=3 f=7

g=4 h=3 f=7 g=1

h=5 f=6 g=1.5

h=4 f=5.5

g=3 h=3

f=6 B-B’

g=4 h=3 f=7

Tree node to be given

to a thread

(11)

The Parallel Branch and Bound issue

– Expanding a partial solution can be more or less time consuming :

Is p close to a leaf node (a complete solution) ? Close to the end.

Is p far from the upper bound ? f(p) ≈ UB  Easy to cut.

– Search tree is irregular

Thread1 Thread2 Thread3

Thread 2 has nothing left to do

How to keep all threads busy ?

(12)

The Parallel Branch and Bound issue

• How to keep all threads busy ?

Answer : Ensure that at anytime t all threads endorse the same amount of work.

– How to estimate to work load of a partial solution ?

• w(p) = g(p)+h(p)

• w(p) = distance to a leaf node

– How to assign partial solutions to threads ?

• Answer : Minimizing the gap between the maximum load of a thread and the average workload of the threads (Wmax –

Wmean)

• This problem is NP-Hard [ref] when the number of threads is >=

2.

• Good heuristics exist : The greedy algorithm called "Graham's

Rule"

(13)

Parallel Graph Edit Distance (PDFS)

G

1

G

2

Generate N tree nodes

Thread

1

(BnB)

Thread

2

(BnB)

Thread

M

(BnB) Branch and

Bound Search Tree

Decomposition

Tree nodes assignement :

Static load balancing

Dynamic load balancing

(14)

Demo

PDF convergence

(15)

Demo

PDF vs BP

(16)

Results

PDF vs DF

(17)

Conclusion

• A first attempt toward parallel graph edit distance.

• Exploring different parts of the search tree

• It can help to assess accuracy of heuristics

• From parallel to distributed GED

(18)

Bibliography

• Imen Chakroun and Nordine Melab. Operator-level gpu- accelerated branch and bound algorithms. In ICCS, volume 18, 2013.

• V N Rao and V Kumar. Parallel depth-rst search on

multiprocessors part i : Implementation. International journal on Parallel Programming, 16(6), 1987.

• Michael O. Neary and Peter R. Cappello. Advanced eager scheduling for java-based adaptive parallel computing.

Concurrency - Practice and Experience, 17 :797819, 2005.

• Zeina Abu-Aisheh, Romain Raveaux, Jean-Yves Ramel,

Patrick Martineau: An Exact Graph Edit Distance Algorithm for Solving Pattern Recognition Problems. ICPRAM (1) 2015:

271-278

(19)

Static load balancing formulation

Références

Documents relatifs

Serratosa, A general model to define the substitu- tion, insertion and deletion graph edit costs based on an embedded space, Pattern Recognition Let- ters 138 (2020) 115 –

GEDLIB: A C++ Library for Graph Edit Distance Computation 7 Figure 6 shows the abstract class template ged::MIPBasedMethod , which provides the interface for GED algorithms that use

walks is that rings can model general edit costs, avoid redundancies due to multiple node or edges inclusions, and allow to define a fine-grained distance measure between the

Five values of N were chosen: -1, 100, 250, 500 and 1000, where N =-1 represents the decomposition of the first floor in the search tree with all possible branches, N = 100 and

Solving the graph edit distance problem with variable partitioning local search.. Mostafa Darwiche, Donatello Conte, Romain Raveaux,

The aim of this paper is to bring the potentialities of Machine Learning to the Graph Edit Distance problem presenting a general framework in which this kind of algorithms are used

Five values of N were chosen: -1, 100, 250, 500 and 1000, where N =-1 represents the de- composition of the first floor in the search tree with all possible branches, N = 100 and

After running all algorithms, we computed a joint score s LB (ALG) ∈ [0, 1] for all algorithms that yield lower bounds and a joint score s UB (ALG) ∈ [0, 1] for all algorithms