ant algorithm for the graph matching problem
DESCRIPTION
5 th European Conference on Evolutionary Computation in Combinatorial Optimization Problems: EvoCOP 2005. ANT Algorithm for the Graph Matching Problem. Olfa Sammoud, Christine Solnon & Khaled Ghédira. EvoCOP – Lausanne 2005. Outline. Graph Matching Problem ANT- Graph Matching (ANT-GM) - PowerPoint PPT PresentationTRANSCRIPT
ANT Algorithm for the Graph Matching Problem
Olfa Sammoud, Christine Solnon & Khaled Ghédira
5th European Conference on Evolutionary Computation in Combinatorial Optimization Problems: EvoCOP 2005
1
Outline
EvoCOP – Lausanne 2005
Graph Matching Problem
ANT- Graph Matching (ANT-GM)
Experimental study
Conclusion
Part I:
Graph Matching Problem
• Similarity
• Graph Matching Problem
• Existing Graph Matching Problems
• A generic graph similarity measure
Measuring the Similarity of Objects
Identify and quantify their common features and their differences
1
Similarity…
1EvoCOP – Lausanne
2005
Case-Based Reasoning
Idea: Similar problems have similar solutions
New Problem
Case Base
Reusable Solutions
Case-Based Reasoning
Information Retrieval
Image Recognition,…
2EvoCOP – Lausanne
2005
Graph Matching ProblemWhen OBJECTS are modeled by GRAPHS
e f
a b c d
5
1 2 3 4
Similarity ??
a
b
c
d e
f
1
2
3
4
5
Components VerticesRelations between Components EdgesFeatures Labels
Graph Matching Problem
Component a is a beam, its shape is in ‘I’ and is next to the beam b and
on the wall e
Component 1 is a beam, its shape is in ‘U’ and is next to the beam 2 and
on the wall 5next to
on
:beam,I
:beam,I
:wall
next to
next to
onon
on
next to
next to
next to
on on
on
:beam,I
:beam,I
: wall
:beam,U
:beam,U
next to
on
:beam,U
:beam,U
:wall
Class 1: Exact graph matching (Isomorphism)
Usually graphs are not identical (noise, over-segmentation...)
Searching for the matching which preserves all vertex and all edge features.
To prove graph equivalence or graph inclusion
Existing Graph Matching Problems
3EvoCOP – Lausanne
2005
a:beam
c:wall
b:beam
onon
Next to
1:beam
2:wall
3:beam
onon
Next to
4:beam
Next to
on
m1 a2 c3 b
Sub-graph isomorphism
4EvoCOP – Lausanne
2005
Class 2: Error-Tolerant Graph Matching
Searching for the ‘best’ matching which preserves a maximum number of vertex and edge features.
next to
next to
next toon
onon
on
next to
next to
next to
on on
on
next to
on
a
b
c
d e
f
1
2
3
4
5
:beam,I
:beam,I
:beam,I
:beam,I :wal
l : wall
:beam,U
:beam,U :beam,
U :beam,
U
:wall
The role of one vertex may be played by a set of vertices
Univalent mapping (associating each vertex with at most one vertex in the other graph) becomes insufficient.
m { (a,1), (b,2), (c,3), (d,4), (f,5) }
5EvoCOP – Lausanne
2005
Class 3: Multivalent Graph Matching
Searching for the ‘best’ matching which preserves a maximum number of features
Possibility to map one vertex to a set of vertices
next to
next to
next toon
onon
on
next to
next to
next to
on on
on
next to
on
a
b
c
d e
f
1
2
3
4
5
:beam,I
:beam,I
:beam,I
:beam,I :wal
l : wall
:beam,U
:beam,U :beam,
U :beam,
U
:wall
m { (a,1), (b,2), (c,3), (d,4), (f,5), (e,5) }
Idea: Similarity of two graphs depends on their common features,
Graph features Graph descriptor (descr)
Graph similarity…
6EvoCOP – Lausanne
2005
a: beam,I
b: beam,I
c: beam,I
d:beam,Ie:
wall f:
wall
Graph Features Graph descriptor (descr)
on
onon
on
next to
next to
next to
next to
Descr(G) = { (a,beam), (b,beam), (c,beam), (d,beam),
(e,wall), (f,wall), (a,b,next to), (b,c,next to),
(c,d,next to), (e,f,next to), (a,e,on), (b,e,on), (c,f,on), (d,f,on) }
(a,I), (b,I),
(c,I), (d,I),
A Generic similarity measure [Champin & Solnon 03]
7EvoCOP – Lausanne
2005
- All split vertices (which are matched with more than one vertex)
- All vertex (resp. edge) features from both G1 and G2 that are matched by m to at least one similar feature
- All features from both G1 and G2
Given a mapping m between their vertices, the similarity of G1 and G2 depends on :
f: used to weigth features and g: used to weigth splits
6
Example
8EvoCOP – Lausanne
2005
next to
next to
next toon
onon
on
next to
next to
next to
on on
on
next to
on
a
b
c
d e
f
1
2
3
4
5
:beam,I
:beam,I
:beam,I
:beam,I :wal
l : wall
:beam,U
:beam,U :beam,
U :beam,
U
:wall
descr(G1) descr(G2) { (a,beam), (b,beam), (c,beam), (d,beam), (a,I), (b,I), (c,I), (d,I), (1,beam), (2,beam), (3,beam), (4,beam), (a,U), (2,U), (3,U), (4,U), (e,wall), (f,wall), (5,wall), (a,b,next to), (b,c,next to), (c,d,next to), (a,e,on), (b,e,on), (c,f,on), (d,f,on), (1,2,next to), (2,3,next to), (3,4,next to), (1,5,on), (2,5,on), (3,5,on), (4,5,on) , (e,f,next to) } 34 Features
descr(G1) m descr(G2) { }descr(G1) m descr(G2) { (a,beam), (1,beam) }descr(G1) m descr(G2) { (a,beam), (1,beam), (b,beam), (2,beam), (a,b,next to), (1,2,next to) }
descr(G1) m descr(G2) { (a,beam), (1,beam), (b,beam), (2,beam), (a,b,next to), (1,2,next to), (e,wall), (5,wall), (a,e,on), (b,e,on), (1,5,on), (2,5,on) }
descr(G1) m descr(G2) { (a,beam), (1,beam), (b,beam), (2,beam), (a,b,next to), (1,2,next to), (e,wall), (5,wall), (a,e,on), (b,e,on), (1,5,on), (2,5,on) , (c,beam), (3,beam), (b,c,next to), (2,3,next to), (d,beam), (4,beam), (c,d,next to), (3,4,next to),(f,wall), (c,f,on), (d,f,on), (3,5,on), (4,5,on) } 25 common features + 1 split
m } { ( a,1,) (b,2 ,) (e,5 ,) (c,3 ,) (d,4 ,) (f,5 )
If we define f and g as cardinality functions
simm(G1,G2)=(25-1)/34=0.70
Part II:
ANT-GM : Ant-Graph Matching
• ANT-GM: basic idea
• ANT-GM: algorithm
Define construction graph
Construction of mapping by an ant
Pheromone update
119EvoCOP – Lausanne
2005
ANT-GM: basic idea
Use Ant Colony Optimization (ACO) to improve the quality of the constructed matchings
Use Pheromone to keep track of the most promising components when constructing new matchings
Problem to solve search for a ‘Best’ path in a graph called Construction Graph
Use artificial ants search for ‘Good’ paths
Probabilistic construction of paths guided by pheromone
Pheromone laying on best paths
Pheromone evaporation
1110EvoCOP – Lausanne
2005
ANT-GM : algorithm
• Define a construction graph
• Initialize pheromone trails of the construction graph to 0
• Repeat
Each ant constructs a mapping
Update pheromone trails
•Until Optimal mapping is found or Max Cycle is reached
1111EvoCOP – Lausanne
2005
Construction graph
For measuring the similarity of two graphs G1 =(V1,E1) and
G2 =(V2,E2), we define the construction graph G=(V,E) :
• Complete and non-directed graph
• V = V1 V2
(u,u’) selected by an ant she prefers to
match vertex u of G1 with the vertex u’ of G2
• <(u,u’), (v,v’)> pheromone trail between (u,u’) and (v,v’)
learnt desirability of matching
together u with u’ and v with v’
m
Iteratively add a couple (u,u’) to m
12EvoCOP – Lausanne
2005
Mapping construction by an ant
cand { (u,u’) V - m /
simm {(u,u’)}> simm or look_ahead (u,u’)> 0 }
simm {(u,u’)}> simm: adding (u,u’) to m increases the similarity
look_ahead (u,u’)> 0: may allow edge features to be added in next iterations }
Choose (u,u’) cand with a probability pm(u,u’) :
13EvoCOP – Lausanne
2005
m(u,u’): Pheromone factor reflects the learnt desirability of adding (u,u’) to m m(u,u’)= (v,v’) m <(u,u’), (v,v’)>
h1(u,u’): heuristic factor How much (u,u’) increases the similarity h1(u,u’)= simm{(u,u’)} - simm
h2(u,u’) : second heuristic factor Look ahead the potential edge features that could be added by (u,u’) h2(u,u’) = f(look_ahead(u,u’))
, 1 and 2 determine the relative importance of the 3 factors
14EvoCOP – Lausanne
2005
Pheromone update
Evaporation
For each edge <(u,u’),(v,v’)> in E,
<(u,u’), (v,v’)> . <(u,u’), (v,v’)>
Where is the pheromone evaporation rate (0 1)
Reward
let mk = the best matching built during the current cycle
mbest = the best matching built since the beginning of run
For each edge <(u,u’),(v,v’)> in mk
<(u,u’), (v,v’)> 1 /[1+ sim(mbest)-sim(mk) ]
Part III:
Experimental Study
• Parameters influence
• Test suite 1: sub-graph isomorphism problems
• Test suite 2: multivalent matching problems
Parameters influence
15EvoCOP – Lausanne
2005
• Pheromone weight =1
• Evaporation rate = 0.01
• Max number of cycles Maxcycle = 1000
• Heuristic Inf. weights 1 = 8 ; 2 = 3
• Number of ants NbAnts = 10
• Initial Pheromone 0 = 6
without pheromone (alpha=0, rho=1)
small influence of pheromone (alpha=1, rho=0.01)
strong influence of pheromone (alpha=2, rho=0.02)sim 58%
sim 61%
sim 63%
sim 62.5%
Number of cycles (logscale)
Qu
alit
y o
f th
e b
est
matc
hin
g
16EvoCOP – Lausanne
2005
• Considered algorithms Our ACO algorithm: ANT-GM Greedy Search: GS [Champin & Solnon 03] Reactive Tabu Search: RTS [Sorlin & Solnon 05]
We fix a same number of moves for each algorithm where :
a move in ANT-GM/GS vertex couple adding
a move in RTS vertex couple adding/deleting
Test suite 1: sub-graph isomorphism
• 11 Sub-graph isomorphism problems [Foggia & al 01]
Each problem, we consider the 30 first instances,
so 330 instances (= 11 benchs * 30 instances) are treated
Each instance is run 20 times,
so, 6600 runs (= 330 instances * 20 runs) are done
a:beam
c:wall
b:beam
onon
Next to
1:beam
2:wall
3:beam
onon
Next to
4:beam
Next to
on
m1 a2 c3 b
f and g as cardinality functions
617EvoCOP – Lausanne
2005
• Comparison criteria
Global Success Rate (GSR): percentage of successful runs over the 6600 runs
Instance Success Rate (ISR): percentage of instance that have been solved at least once over the 20 runs over the 33O instances
Number of moves (Mv) (average on successful runs)
time (t in second) (average on successful runs)
Results on sub-graph isomorphism
problem [Foggia & al 01]
18EvoCOP – Lausanne
2005
Bench name
ANT-GM GS [Champin & Solnon 03] RTS [Sorlin & Solnon 05]
GSR ISR Mv t GSR ISR Mv t GSR ISR Mv t
si2r001s100 76.8 86.7 40492 33.2 33.3 33.3 89 0.2 67.5 100 9758 6.6
si2r001s80 93.3 100 42240 10.1 33.3 33.3 37 0.0 90.0 100 5585 2.4
si2r001s60 99.7 100 22164 2.8 46.7 46.7 15 0.0 99.2 100 1590 0.4
si4r001s80 81.3 90.0 110818 44.1 23.3 23.3 507 0.5 85.7 100 8292 7.5
si4r001s60 99.2 100 44539 9.0 40.0 40.0 49 0.1 93.2 100 5066 2.5
si4r001s40 100 100 48634 0.7 53.3 53.3 41 0.0 99.7 100 1759 0.4
si4r001s20 100 100 166 0.0 83.3 83.3 9 0.0 100 100 219 0.0
si4r005s40 89.7 96.7 34996 4.4 6.7 6.7 67 0.0 88.0 96.7 4647 1.0
si6r001s60 99.7 100 79738 21.0 63.3 63.3 110 0.1 94.5 100 6964 5.2
si6r001s40 100 100 16547 1.9 86.7 86.7 44 0.0 98.3 100 31.0 1.0
si6r001s20 100 100 352 0.0 93.3 93.3 24 0.0 100 100 266 0.0
Average 94.5 97.6 36424 11.6 51.2 51.2 89 0.1 92.4 99.7 4295 2.45
Bench name
ANT-GM RTS [Sorlin & Solnon 05]
GSR ISR Mv t GSR ISR Mv t
Average 94.5 97.6 36424 11.6 92.4 99.7 4295 2.45
Global Success Rate
ANT-GM: 94.5 363 runs/6600 have failed
RTS: 92.4 501 runs/6600 have failedInstance Success Rate
ANT-GM: 97.6 7 instances/330 not solved
RTS: 99.7 1 instance/330 not solved
8.5
4.7
Results obtained by ANT-GM and RTS are rather complementary
Test Suite 2: results on multivalent graph matching Problems
19EvoCOP – Lausanne
2005
Problem name
ANT-GM RTS
Similarity degree
Mv t Similarity degree
Mv t
hom-v20-e60 0.795 303167 30.9 0.798 17747 2.2
hom-v30-e90 0.863 512746 155.0 0.865 14187 4.4
hom-v40-e120 0.885 685155 477.9 0.895 24801 13.7
hom-v45-e135 0.895 717767 709.5 0.904 60085 40.5
hom-v50-e150 0.804 847699 1075.6 0.913 53922 47.9
Average 0.848 613307 489.8 0.875 34149 21.7
• Further Work: Integrate local search within ANT-GM
ACO improves the quality of matchings
Results obtained by ANT-GM and RTS are rather complementary
For multivalent graph matching, ANT-GM is outperformed by RTS
Conclusion
20EvoCOP – Lausanne
2005
ANT Algorithm for the Graph Matching Problem
Olfa Sammoud, Christine Solnon & Khaled Ghédira
Fifth European Conference on Evolutionary Computation of Combinatorial Optimization Problems: EvoCOP 2005