Mining Graphs with Constrains on Symmetry and Diameter
Natalia VanetikDeutsche Telecom Laboratories at
Ben-Gurion University
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China1
Graph mining (2)Motivation• Graphs are everywhere
– Chemical compounds (Cheminformatics)– Protein structures, biological pathways/networks (Bioinformactics)– Program control flow, traffic flow, and workflow analysis – XML databases, Web, and social network analysis
• Graph is a general model– Trees, lattices, sequences, and items are degenerated graphs
• Diversity of graphs– Directed vs. undirected, labeled vs. unlabeled (edges & vertices), weighted, with
angles & geometry (topological vs. 2-D/3-D)
• Complexity of algorithms: many problems are of high complexity (NP complete or even P-SPACE !)
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China3
Graphs, graphs, everywhere
Aspirin Yeast protein interaction network
from
H.
Jeon
g e
t al N
atu
re 4
11
, 4
1
(20
01
)
Internet Co-author network
Constraints: diameter
• Diameter d(G) of a graph G is the maximum among minimal distances between pairs of its vertices.
• d(G)=1 implies that G is complete.• d(G)= implies that G is not connected.
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China5
d(G)=1 d(G)=2 d(G)=2 d(G)=
Constraints: symmetry• Symmetries of a graph G are determines by its automorphism
group Aut(G).• Aut(G) is a permutation group.• Largest possible automorphism group for a graph of size n is
Sn, which has order n!
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China6
Aut(G)=S5 Aut(G)=S3 Aut(G)=D5 Aut(G)=S5
Measuring symmetry and diameter (1)
• Graph diameter is computable in polynomial time.• Automorphism group of a graph is not likely to be
computable in polynomial time.– Best known algorithm: Nauty by B. McKay, outputs a set of generators
of Aut(G).
• Intuitively, graphs with smaller diameter and higher symmetry are more interesting.
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China7
d(G)=2 d(G)=3
Measuring symmetry and diameter (2)
• Symmetry is harder to measure.• Observation: maximum symmetry of a graph is achieved
when is automorphism group is the symmetric group of order equal to the size of a graph.
• Suggestion: measure symmetry of G as
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China8
| |
( )( )
G
Aut Gs G
S
s(G)=|S5|/|S5|=1 s(G)=|S3|/|S5|= 1/20 s(G)=|D5|/|S5|= 1/12
Tree decomposition of a graph
• Let G=(V,E) be a graph. Tree T is called a tree decomposition of G if– Nodes of T are subsets X1,…,Xn V such that X1…Xn=V
– If node vXiXj , then every node Xk of T on the path from Xi to Xj contains v as well.
– For every edge e=(v,u) there exists i so that u,v Xi.
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China9
1 2
4 3
G
1 23 4
1 2 4
2 34
T1={{1,2,3,4}, } T2={{1,2,4},{2,3,4}},}(} 1,2,4},{2,3,4{{){
Minimal tree decomposition
• Width of a tree decomposition T is (max i |Xi|)-1.
• Minimum width among all tree decomposition is called tree width of a graph.
• Tree width equals maximum clique size minus 1.• Tree decomposition of minimum width is called minimal tree
decomposition.• Computing minimal tree decomposition is NP-hard problem
as it contains the problem of finding all maximum cliques in a graph.
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China10
Different tree decompositions
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China11
1 2 3
5
4
67
8
1 2 8
2 46 8
2 3 4
8 7 6
4 5 6
1 2 8
8 7 6
2 6 8
2 46
2 3 4
4 5 6
Minimal tree decomposition
Non-minimal tree decomposition
Intuition behind the proposed algorithm1. Compute the finest tree decomposition possible for every DB
transaction under given time constraints.2. Use basic pattern growing algorithm, such as FSG or gSpan to
extend instances of frequent patterns.3. Every time an instance of a frequent pattern is extended by an
edge of a nodea. Compute its diameter and symmetry estimates based on pattern’s
position within tree decomposition of a DB transaction;b. if one of the estimates is lower than user-specified symmetry or
diameter constraints, remove patterns instance from instance list,c. otherwise, keep the instance in the list.d. If the count of instances is higher than support bound, this is a
frequent pattern.
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China12
How does it work?
• Let T be tree decomposition of DB graph transaction t.• Let Gt be an instance of a candidate pattern.• Let TG=(VG,EG)T be minimal subtree of T containing G.
Claim 1. d(G)d(TG).
Claim 2. s(G)≤(|LAut(TG)|X VG|X\EG|!e EG
|e|!)/|G|!
where LAut is automorphism group of TG viewed as
tree where each node X is labeled by |X|.
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China13
Example (1)
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China14
1 2 3
5
4
67
8
1 2 8
8 7 6
2 6 8
2 46
2 3 4
4 5 6
Pattern instance and corresponding subtree of minimal Tree decomposition
Diameter is at least 1Diameter is at least 2
Example (2)
IWGD10 workshop July 14th, 2010 Jiuzhaigou, China15
1 2 3
5
4
67
8
1 2 8
8 7 6
2 6 8
2 46
2 3 4
4 5 6
Pattern instance and corresponding subtree of minimal Tree decomposition
Symmetry is at most 1Symmetry is at most 2*2!*1!*1!/4!=1/6