• Aucun résultat trouvé

Graph Matching Methods

N/A
N/A
Protected

Academic year: 2022

Partager "Graph Matching Methods"

Copied!
104
0
0

Texte intégral

(1)

Graph Matching Methods

Jean-Yves Ramel – Romain Raveaux

Laboratoire Informatique de Tours - FRANCE Presented by :

Romain Raveaux

(2)

Content

1.  Forewords and preliminary tools

2.  Graph matching

1.  Exact

1.  Graph Isomorphism

1.  Node invariants

2.  Canonical label (Set method)

2.  SubGraph Isomorphism 1.  Tree search

1.  Corneil and Gotlieb 2.  Ullman

3.  Cordella (vf) 4.  LAD

2.  The planar graph case 3.  Maximum common subgraph 2.  Inexact

1.  Substitution-tolerant subgraph isomorphism 1.  Spectral Theory

2.  Inexact SubGraph Isomorphism 1.  Spectral methods

2.  Probabilistic propagation 3.  Network based approaches 4.  Integer Linear Programming 3.  Graph isomorphism

3.  Multivalent matching 1.  Similarity function

2.  Search into solution space

(3)

Part 1

•  Forewords and preliminary tools

(4)

Aim of the talk

- Graph based methods in Pattern Recognition - What we won't talk about :

- Graph for image segmentation (Normalized Cut Graph, ...)

- Graph for knowledge representation (Ontology, RDF, ...)

(5)

Introduction

• 

Terminology and notation

(6)

Adjacency matrix

(7)

Incidence Matrix

(8)

Degree matrix

(9)

Laplacian Matrix

(10)

Clique

•  Clique of size n.

(11)

Wrong beliefs

• 

« In computer vision, all graphs are planars. »

• 

Planar :

• 

« In graph theory, a planar graph is a graph that can be embedded in the plane, i.e., it can be drawn on the plane in such a way that its edges

intersect only at their endpoints.» Wikipedia

(12)

Part 2

•  Graph Comparison

•  Section 1 : Graph Matching

(13)

Graph comparison (Structural Pattern Recognition)

• 

Overview

(14)

Overview

(15)

Overview

(16)

Overview

• 

Exact graph isomorphism (GI)

• 

Formalism :

Graphs G

1

(V

1

,E

1

) and G

2

(V

2

,E

2

) Iff it exists a bijection f : V

1

→ V

2

∀ a,b ∈ V

1

,

(a,b) ∈ E

1

(f(a),f(b)) ∈ E

2

• 

Complexity :

• 

NP-hard problem in general

(GI ∈ NP, GI ∈ P, GI ∈ NP-complet)

• 

Certain classes of graphs GI ∈ P (Polynomial algorithm)

(17)

Complexity

Type of graph Complexity Reference

Planar O(n) [Hopcroft, Tarjan, 1972]

[Hopcroft, Wong, 1974]

General Exp(n

1/2+O(1)

) [Babai, Luks, 1983]

(18)

Graph Isomorphism

• 

Node invariant

• 

Canonical adjacency matrix

• 

Automorphism

(19)

Graph Isomorphism

• 

Node invariant

• 

Used in most approaches

• 

The number i(v) associated to a given node such as if an isomorphism mapps v and v’ then :

i(v) = i(v’)

• 

degree

• 

twopaths : # Nodes at distance 2 from v

• 

k-cliques : # Cliques of size k containing v

• 

independant k-sets : # Independent set of size k containing v

• 

distances : # Nodes at every distance 1,…,n from v

• 

Heavy cost (excepted degree) : To solve the isomorphism is often faster than to compute every invariant

(20)

Graph Isomorphism

(21)

Graph Isomorphism

• 

Canonical label (C(G) ):

• 

Example 1 :

• 

Compute all automorphisms of G

• 

Automorphism search equal isomorphism search

b

a c

a b c a

b c

0 1 0 0 0 0 1 1

1

c a b c

a b

0 0 1 0 1 0 0 1

1

a c b a

c b

0 0 1 0 1 0 0 1

1 Automorphism c→a, a →b, b →c

C(G) = 001001110

(22)

SubGraph Isomorphism

(23)

SubGraph Isomorphism

• 

Approach: Exhaustive Tree search [Corneil, Gotlieb,70]

(24)

SubGraph Isomorphism

• 

G1 G2

a

d c

b

a b c

0 1 1 0 1 0 1 1

1

1 0 0 d 1 0 0 0 b

a c

a b c a

b c

0 1 0 0 0 0 1 1

1

? ? ?

?

?

?

0 1 0 0 0 0 1 1

1

?

?

?

?

? ? ? ? ? a b c

a b c

0 1 0 0 0 0 1 1

1

a b c d

(25)

SubGraph Isomorphism

• 

Approach: Tree search with backtracking [Corneil, Gotlieb,70]

• 

Row-Column representation of the adjacency matrix

(26)

SubGraph Isomorphism

• 

Method :

• 

Build all matrix permutations of G.

(27)

SubGraph Isomorphism

• 

Method :

• 

Build all matrix permutations of G

1

•  Build the decision tree of all matrix permutations

(28)

SubGraph Isomorphism

(29)

(30)

(31)

(32)

(33)

Tree construction

• 

Method :

• 

Build all matrix permutations of G

1

•  Build the decision tree of all matrix permutations Non-directed and unlabel graph : O(3

n

)

n : #nodes G

1

(34)

Isomoprhism search into the tree

• 

Isomoprhism search of G

2

with a subgraph of G

1

→ Decision automate

(35)

Isomorphism search

1

2 3

1 2

0 101 000

11011 10001 01010

a1 = 0

a2 =

101

(36)

Isomorphism search

1

2 3

1 2

0

101 000

11011 10001 01010

a1 = 0

a2 = 101

(37)

Isomorphism search

1

2 3

1 2

0 101 000

11011 10001 01010

a1 = 0

a2 = 101

(38)

Isomorphism search

1

2 3

1 2

0 101 000

11011 10001 01010

a1 = 0 a2 = 101

1

2 3

a1 = 0

a2 = 101

a3 = 11011

(39)

Isomorphism search

•  Isomorphism search of G

2

with a subgraph from G

1

Decision automate :

Un-directed, unlabel graphs : O(m

2

)

m : # nodes G

2

(40)

SubGraph Isomorphism

• 

Exact Matching

• 

Ullmann’s Algorithm [J.R. Ullmann 1976]

• 

Tree-Search algorithm (Depth-Search-First)

• 

Uses adjacency matrices and additional constraints for matching and pruning.

• 

Application for graph isomorphism, subgraph isomorphism and monomorphism, also for MCS problem

(41)

SubGraph Isomorphism

(42)

Ullmann’s Algorithm

(43)

Ullmann’s Algorithm

(44)

Ullmann’s Algorithm

(45)

Ullmann’s Algorithm

(46)

Ullmann’s Algorithm

(47)

Ullmann’s Algorithm

(48)

Ullmann’s Algorithm

(49)

SubGraph Isomorphism

• 

Improvements :

• 

Ullman O(m

2

n

2

) [Ullman, 76]

• 

Forward-checking and looking-ahead [Haralick, Elliot, 80]

• 

Discrete Relaxation [Kim, Kack, 91]

• 

Maximal clique detection [Blake, 94]

(50)

The Planar Graph Case (1)

A Polynomial Algorithm for Subisomorphism of Open Plane Graphs [Damiand et al., 2009].

- Searching for a pattern in a plane graph

- To model plane graphs with 2-dimensional combinatorial maps

o 

data structures for modelling the topology of a subdivision of a plane into nodes, edges and faces.

- A polynomial algorithm for this problem Refs:

- http://dtai.cs.kuleuven.be/ilp-mlg-srl/papers/MLG09-11.pdf -http://hal-ujm.ccsd.cnrs.fr/docs/00/38/97/63/PDF/map-

isomorphism.pdf

(51)

The Planar Graph Case (2)

Planar Graphs may be drawn in the plane, but even more specically just one of the possible planar embeddings is

relevant as it actually models the image topology, that is, the

order in which faces are encountered when turning around a

node.

(52)

Error-tolerant isomorphism

(53)

Inexact graph matching

(54)

Inexact graph matching

(55)

Inexact graph matching

(56)

Inexact graph matching

(57)

Inexact graph matching

(58)

Inexact graph matching

(59)

Graph matching

(60)

Inexact isomorphism (1)

• 

Univalent matching

• 

Probabilistic propagation

• 

Network based approach

• 

Multivalent matching

• 

Solnon and Champin

• 

Similarity measure based on the notion of mapping between graph vertices.

• 

A complete approach, and then describe an efficient greedy algorithm.

(61)

Probabilist Relaxation

(62)

•  Probabilist Relaxation [Hummel, Zucker, 1983] :

•  Principle :

•  Similarity measure ρ between nodes (attributes comparison)

u

u’

ρ(u,u’) = 0,7 Impossible decision

(63)

•  Probabilist Relaxation [Hummel, Zucker, 1983] :

•  Principle :

•  Similarity measure ρ between nodes.

•  Contextual information is used to improve node similarity based on attributes

u

u’

ρ(u,u’) = 0,7 Impossible decision

Neighborhood information Similarity ?

(64)

Complete bipartite graph of neighbours nodes.

u

i

u’

j

Weights on edges w(u

i

,u’

j

) = ρ (u

i

,u’

j

)

u

u’

(65)

Complete bipartite graph of neighbours nodes.

u

i

u’

j

Maximal linkage

Neighbours similarity

u

u’

(66)

•  Re-enforcing similarity between node pair in function of the neighbourhood :

γ (u,u’) = ρ (u,u’) * sim(N(u), N(u’))

•  Recursive procedure

γ

0

(u,u’) = ρ (u,u’)

γ

i+1

(u,u’) = γ

i

(u,u’) * sim

i

(N(u), N(u’))

•  Heuristic : Assignations

•  If γ (u,u’) > threshold

•  If no more potential candidate

N(node) = neighbourhood of a node.

(67)

•  Problems :

•  Convergence

•  Sub-optimal

•  Does not take into account the global structure of the graph

•  Advantages :

•  Provide a one to one matching. Univalent.

•  An efficient method.

(68)

Inexact graph matching (2)

• 

A network based approach to exact and inexact graph matching

• 

B.T. Messmer and H. Bunke

• 

1993

(69)

A network based approach to exact and inexact graph matching

Models = Graph data set

Input graph = query graph

(70)

(71)

- Cost

evaluated by

partial match

- Network

search by A*

(72)

Messmer 93

• 

Depends on the sub-graph insertion into the network.

(Network compilation is the problem)

(73)

Inexact graph matching

• 

Integer Linear Programming

• 

[Lebodic 2009] ICDAR

(74)

Integer Linear Programming Variables

(75)

Integer Linear Programming Constraints

Every vertex of VS must be matched to a unique vertex of VG

Every edge of ES must be matched to a unique edge of EG

Every vertex of VG must be matched to at most an edge of ES

(76)

If two vertices are matched together, an edge originating one of these two vertices must be matched with an edge originating the other vertex :

If two vertices are matched together, an edge targeting one of these two

vertices must be matched with an edge targeting the other vertex :

(77)

Integer Linear Programming

Constraints

(78)

Integer Linear Programming Function to minimize

(79)

Graph Edit Distance (ED) [Bunke 99]

(80)

Graph Edit Distance (ED)

(81)

Maximum Common Subgraph (MCS)

ED = Edit Distance

Relation between MCS and Edit Distance :

(82)

Graph edit distance

(83)

Graph edit distance

(84)

Inexact Graph Matching Subgraph assignement

• 

Inexact Graph Matching can be reformulated into a simpler problem :

• 

An assignement problem

• 

Node assignement problem

• 

But it is an approximation of the problem

(85)

SubGraph decomposition and matching

(86)

SubGraph decomposition and matching

(87)

SubGraph decomposition and matching [Raveaux10]

- Subgraph distance

- Bi-partite graph

matching

(88)

Integer Projected Fixed Point (IPFP)

•  Leordeanu et al. (2009)

•  Delta : is edge dissimilarity matrix

•  c : node dissimilarity cost (vector form)

•  x : permutation matrix (vector form)

(89)

Integer Projected Fixed Point (IPFP)

•  Relaxed Problem

(90)

Integer Projected Fixed Point (IPFP)

•  S is linearly approximated by its 1st-order expansion around the current solution

•  Keeping x fixed, the minimization of S (b ) is approximatively

equivalent to a relaxed LSAP (b >=0 ).

(91)

Graduated NonConvexity and Concativity Procedure (GNCCP)

•  (Liu and Qiao, 2014)

(92)

Graduated NonConvexity and Concativity Procedure (GNCCP)

•  a convex-concave relaxation through the modified quadratic function

•  no initial mapping is required

•  algorithm smoothly interpolates convex and concave relaxations by iteratively decreasing \zeta from 1 to -1

•  Convergence is reached when x is a permutation

•  Note that the minimum of the concave relaxation is a

permutation

(93)

Inexact graph matching

• 

Multivalent matching :

• 

Many to many

• 

Champin and Solnon

[Champin / Solnon] (2003-2005)

(94)

Multivalent matching

[Champin / Solnon] (2003-2005)

(95)

Similarity with Respect to a Mapping

Score function with split operation

Find the mapping m that maximizes the score function

- m ⊆ V

1

x V

2

How to choose the

similarity function ?

(96)

Solution Space

This problem is highly combinatorial

Search space = all different mappings —all subsets of V1 × V2— and it contains 2

|V1|∗|V2|

states.

This search space can be structured in a lattice by the set inclusion relation

It can be explored in an exhaustive way with a “branch and bound” approach.

How to explore the solution space : - Complete search

- Lattice - Heuristic

- Greedy algorithm - Taboo search

- …

(97)

Literature

• 

D.Conte, Thirty Years Of Graph Matching in Pattern

Recognition, International Journal of Pattern Recognition and Artificial Intelligence, Vol. 18, No. 3, p.265-298, (2004)

• 

Riesen K. Jiang X., Bunke H., Exact and Inexact Graph

Matching: Methodology And Applications, Managing and Mining Graph Data, p.217-247, Springer Verlag (2010)

(98)

Conclusion

•  5 problems

(99)

Conclusion

•  Exact problems : problems 1 and 2

•  Many methods to solve this problem :

•  Ullman, VF, LAD

•  Large graphs can be tackeled (>200 nodes)

(100)

Conclusion

•  Exact problems

(101)

Conclusion

•  Substitution tolerant problem :

•  Recently re-expressed as an ILP formulation

(102)

Conclusion

•  Inexact graph matching

•  Exact graph edit distance computation algorithm Exact based on the well-known A* algorithm.

•  Exact is only able to compute the edit distances of graphs

typically containing 12 vertices at most in practice.

(103)

Conclusion

•  Inexact graph matching

(104)

Conclusion

•  The definition of an error model is strongly application- dependent.

•  Inexact Graph matching provides :

•  Node mapping

•  Similarity or dissimilarity measure

•  Graph matching cannot be directly applied to vectorial machine learning techniques :

•  Classification : MLP, SVM, Bayesian classifiers …

•  Clustering : K-means, …

•  Graph matching can be directly applied to dissimilarity-based machine learning techniques :

•  Classification: K-NN

•  Clustering : PAM, hierarchical clustering, …

Références

Documents relatifs

Let us consider for example the extended graph edit distance (EGED) defined in [14]. This distance extends GE D by adding two edit operations for splitting and merging nodes.

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 –

The literature on learning similarity/dissimilarity matching functions can be roughly categorized into two parts according to whether the objective is to minimize an error rate on

As we will see in the next section, this hypothesis testing problem on a pair of random trees is related to our original graph alignment problem much as the so-called

Concretely, the search for correspondences is cast as a hypergraph matching problem using higher-order constraints instead of the unary or pairwise ones used by previous

This type of approach ignores the structural information that can be observed at a high level. This structural information can for example concern spatial relationships

Two limitations can be put forward (i) attributes must be numeric vectors and (ii) the method aimed at.. From the same authors, in [17], the graph matching process is formulated in

Therefore, the DFS strategy seems to correspond to a sim- ple and efficient approach for converting an optimal GM algo- rithm into an anytime one that offers a trade-off between