260 likes | 418 Views
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)
E N D
5th 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) • Experimental study • Conclusion 1
Part I: Graph Matching Problem • Similarity • Graph Matching Problem • Existing Graph Matching Problems • A generic graph similarity measure
Case-Based Reasoning • Idea: Similar problems have similar solutions • Case-Based Reasoning • Information Retrieval • Image Recognition,… Case Base New Problem Reusable Solutions 1 EvoCOP – Lausanne 2005 Similarity… Measuring the Similarity of Objects Identify and quantify their common features and their differences 1
a 1 3 b 2 c d 4 Component 1 is a beam, its shape is in ‘U’ and is next to the beam 2 and on the wall 5 Component a is a beam, its shape is in ‘I’ and is next to the beam b and on the wall e e 5 f next to a next to 1 :beam,I :beam,U next to b next to 2 next to :beam,I :beam,U next to 3 c :beam,U :beam,I on on on 4 on d :beam,U on :beam,I on e :wall on next to 5 on f :wall : wall 2 EvoCOP – Lausanne 2005 Graph Matching Problem When OBJECTS are modeled by GRAPHS Components Vertices Relations between Components Edges Features Labels Similarity ?? Graph Matching Problem
Next to a:beam b:beam on on c:wall m 1 a 2 c 3 b Next to 1:beam Next to 3:beam 4:beam on on on 2:wall 3 EvoCOP – Lausanne 2005 Existing Graph Matching Problems • Class 1: Exact graph matching (Isomorphism) • Searching for the matching which preserves all vertex and all edge features. • To prove graph equivalence or graph inclusion Sub-graph isomorphism • Usually graphs are not identical (noise, over-segmentation...)
next to a :beam,I next to 1 :beam,U next to :beam,I b next to :beam,U 2 next to next to :beam,U 3 :beam,I c on on on 4 :beam,U on :beam,I d on on e :wall on next to :wall 5 on f : wall 4 EvoCOP – Lausanne 2005 • Class 2: Error-Tolerant Graph Matching Searching for the ‘best’ matching which preserves a maximum number of vertex and edge features. m { (a,1), (b,2), (c,3), (d,4), (f,5) } • 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.
next to a :beam,I next to 1 :beam,U next to :beam,I b next to :beam,U 2 next to next to :beam,U 3 :beam,I c on on on 4 :beam,U on :beam,I d on on e :wall on next to :wall 5 on f : wall 5 EvoCOP – 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 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)
next to a: beam,I next to b: beam,I next to c: beam,I on on d:beam,I on e: wall next to on f: wall 6 EvoCOP – Lausanne 2005 Graph similarity… Graph Features Graph descriptor (descr) Descr(G) = { (a,beam), (b,beam), (c,beam), (d,beam), (a,I), (b,I), (c,I), (d,I), (a,b,next to), (b,c,next to), (c,d,next to), (e,f,next to), (e,wall), (f,wall), (a,e,on), (b,e,on), (c,f,on), (d,f,on)}
Given a mapping m between their vertices, the similarity of G1 and G2 depends on : - All vertex (resp. edge) features from both G1and G2 that are matched by m to at least one similar feature - All split vertices (which are matched with more than one vertex) - All features from both G1and G2 f: used to weigth features and g: used to weigth splits 7 EvoCOP – Lausanne 2005 A Generic similarity measure [Champin & Solnon 03]
next to :beam,I a next to :beam,U 1 next to :beam,I b next to 2 :beam,U next to next to :beam,U 3 c :beam,I on on on 4 :beam,U on :beam,I d on on :wall e on next to 5 :wall on : wall f 8 EvoCOP – Lausanne 2005 Example m { } (d,4), (f,5) (a,1), (b,2), (e,5), (c,3), 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) mdescr(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 descr(G1) mdescr(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) mdescr(G2) { (a,beam), (1,beam), (b,beam), (2,beam), (a,b,next to), (1,2,next to) } descr(G1) mdescr(G2) {(a,beam), (1,beam)} descr(G1) mdescr(G2) { } If we define f and g as cardinality functions simm(G1,G2)=(25-1)/34=0.70 6
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
9 EvoCOP – 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 11
10 EvoCOP – 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 • UntilOptimal mapping is found or Max Cycle is reached 11
11 EvoCOP – 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’ 11
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 } 12 EvoCOP – Lausanne 2005 Mapping construction by an ant m Iteratively add a couple (u,u’) to m • cand { (u,u’) V - m / simm {(u,u’)}> simmor look_ahead (u,u’)> 0 } • Choose (u,u’) cand with a probability pm(u,u’) :
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’)) 13 EvoCOP – Lausanne 2005 , 1 and 2 determine the relative importance of the 3 factors
14 EvoCOP – 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 • Parametersinfluence • Test suite 1: sub-graph isomorphism problems • Test suite 2: multivalent matching problems
Quality of the best matching sim 63% sim 62.5% sim 61% sim 58% 15 EvoCOP – Lausanne 2005 Parameters influence • 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) Number of cycles (logscale)
Next to a:beam b:beam on on c:wall m 1 a 2 c 3 b Next to 1:beam Next to 3:beam 4:beam on on on 2:wall 16 EvoCOP – Lausanne 2005 Test suite 1: sub-graph isomorphism • 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 vertexcouple adding/deleting • 11 Sub-graph isomorphism problems [Foggia & al 01] • Each problem, we consider the 30 first instances, so 330instances (= 11 benchs * 30 instances) are treated • Each instance is run 20 times, so, 6600runs (= 330 instances * 20 runs) are done f and g as cardinality functions
17 EvoCOP – 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) 6
8.5 4.7 18 EvoCOP – Lausanne 2005 Results on sub-graph isomorphism problem [Foggia & al 01] Results obtained by ANT-GM and RTS are rather complementary Global Success Rate ANT-GM: 94.5 363 runs/6600 have failed RTS: 92.4 501 runs/6600 have failed Instance Success Rate ANT-GM: 97.6 7 instances/330 not solved RTS: 99.7 1 instance/330 not solved
19 EvoCOP – Lausanne 2005 Test Suite 2: results on multivalent graph matching Problems
20 EvoCOP – Lausanne 2005 Conclusion • 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 • Further Work: Integrate local search within ANT-GM
Fifth European Conference on Evolutionary Computation of Combinatorial Optimization Problems: EvoCOP 2005 ANT Algorithm for the Graph Matching Problem Olfa Sammoud, Christine Solnon & Khaled Ghédira