IPSep-CoLa: The of a new IPSep-CoLa: anchoice Incremental generation Procedure for Separation(of graph visualisation enthusiasts) Constraint Layout of graphs Tim Dwyer – Monash University, Australia Yehuda Koren – AT&T Research Kim Marriott – Monash University.

Download Report

Transcript IPSep-CoLa: The of a new IPSep-CoLa: anchoice Incremental generation Procedure for Separation(of graph visualisation enthusiasts) Constraint Layout of graphs Tim Dwyer – Monash University, Australia Yehuda Koren – AT&T Research Kim Marriott – Monash University.

IPSep-CoLa:
The
of a new
IPSep-CoLa:
anchoice
Incremental
generation
Procedure
for Separation(of graph visualisation
enthusiasts)
Constraint
Layout of
graphs
Tim Dwyer – Monash University, Australia
Yehuda Koren – AT&T Research
Kim Marriott – Monash University
Constraint-based Graph Layout
• Separation constraints: x1+d ≤ x2 , y1+d ≤ y2
can be used with force-directed layout
to impose certain spacing requirements
w1
(x1,y1)
x1+ (w1+w2) ≤ x2
2
w2
(x2,y2)
(x3,y3)
h2
h3
y3+ (h2+h3) ≤ y2
2
• In this talk we present:
– A fast algorithm to perform stress-majorization layout subject to
separation constraints
– Applications of constrained graph layout
Constraint-based Graph Layout
• Constraints are not springies,
they must be satisfied
• Springies are a modification
of the goal function
• Constraints (in the OR sense) are
separate (in)equalities subject
to which the original goal function
is optimised
• Springies:
– Sugiyama and Misue (1995), Ryal et al. (1997), etc…
• Constraints:
– He and Marriott (1998); Dwyer and Koren (2005);
Dwyer, Koren and Marriott (2006)
“Unix” Graph
data From
www.graphviz.org
Constraint-layout in an
interactive system
Downward-pointing
edge constraints
Constraint-layout in an
interactive system
Page-boundary
constraints
Constraint-layout in an
interactive system
Non-overlap
constraints
Constraint-layout in an
interactive system
Alignment
constraints
Stress Majorisation
stress(X ) =
Minimise a quadratic function
in each axis of drawing
stress(X)
f(x) = ½ xTA x + xT b
f(y) = ½ yTA y + yT b
x*
y*x*
y*
X*
Constrained stress
majorization
stress(X)
• Instead of solving unconstrained quadratic
forms we solve subject to separation
constraints
• i.e. Quadratic Programming
x*
y*x*
y*
X*
Gradient projection
g=2Ax+b
x
-g
-sg
x′
gT g
s= T
g Ag
x′ = x – s g
Gradient projection
g=2Ax+b
gT g
s= T
g Ag
x′ = xproject(
– sg x – sg)
x′
-sg
x
Gradient projection
g=2Ax+b
gT g
s= T
g Ag
x′ = project( x – s g )
x′
x′′dαd
x
d = x′ – x
-gT d
α = min( T
, 1)
d Ad
x′′ = x + α d
Gradient projection
g=2Ax+b
gT g
s= T
g Ag
x′ = project( x – s g )
x
x*
d = x′ – x
-gT d
α = min( T
, 1)
d Ad
x′′ = x + α d
Projection operation
• Is itself a quadratic program:
ui
u
subj to: xk+d ≤ xl
a
• Solve with active-set style method:
– Move each xi to ui
– Build blocks of active constraints:
• Find most violated constraint xk+d ≤ xl
• Add to any existing block B involving xk
or xl (and satisfy)
b
d
c
e
Projection operation
• Is itself a quadratic program:
ui
u
subj to: xk+d ≤ xl
a
• Solve with active-set style method:
– Move each xi to ui
– Build blocks of active constraints:
• Find most violated constraint xk+d ≤ xl
• Add to any existing block B involving xk
or xl (and satisfy)
• Move B to average position of
constituent vars:
b
c
d
e
Projection operation
• Is itself a quadratic program:
ui
u
subj to: xk+d ≤ xl
a
• Solve with active-set style method:
– Move each xi to ui
– Build blocks of active constraints:
• Find most violated constraint xk+d ≤ xl
• Add to any existing block B involving xk
or xl (and satisfy)
• Move B to average position of
constituent vars:
b
c
d
e
etc…
Projection operation
• Is itself a quadratic program:
ui
u
subj to: xk+d ≤ xl
a
• Solve with active-set style method:
b
– Move each xi to ui
– Build blocks of active constraints:
• Find most violated constraint xk+d ≤ xl
• Add to any existing block B involving xk
or xl (and satisfy)
• Move B to average position of
constituent vars:
c
d
e
etc…
Projection operation
• Is itself a quadratic program:
ui
u
a
subj to: xk+d ≤ xl
• Solve with active-set style method:
b
– Move each xi to ui
– Build blocks of active constraints:
• Find most violated constraint xk+d ≤ xl
• Add to any existing block B involving xk
or xl (and satisfy)
• Move B to average position of
constituent vars:
c
d
e
etc…
Projection operation: incremental
• Block structure is preserved
between projection operations
• Before each projection previous
blocks are checked for split
points (ensures convergence)
a
b
c
d
e
Projection operation: incremental
• Block structure is preserved
between projection operations
• Before each projection previous
blocks are checked for split
points (ensures convergence)
• In next projection blocks will be
moved as one to new weighted
average desired positions
a
b
c
d
e
Projection operation: special case
• It can happen that the most
violated constraint can have
both ends in the same block!
a
b
c
d
e
Projection operation: special case
• It can happen that the most
violated constraint can have
both ends in the same block!
• Need to split the block before
inserting the violated constraint
a
b
c
d
e
Projection operation: special case
• It can happen that the most
violated constraint can have
both ends in the same block!
• Need to split the block before
inserting the violated constraint
• But you have to be careful…
a
b
c
d
e
Projection operation: special case
• When inserting a constraint, if you don’t
choose the split point carefully cycling can
occur!
…
a
b
…
c
i
h
…
…
d
g
f
e
…
…
Projection operation: special case
• When inserting a constraint, if you don’t
choose the split point carefully cycling can
occur!
…
a
b
…
c
i
h
…
…
d
g
f
e
…
…
Projection operation: special case
• When inserting a constraint, if you don’t
choose the split point carefully cycling can
occur!
…
a
b
…
c
…
i
h
…
d
g
f
e
…
…
Projection operation: special case
• When inserting a constraint, if you don’t
choose the split point carefully cycling can
occur!
…
a
b
…
c
i
h
…
…
d
g
f
e
…
…
Projection operation: special case
• When inserting a constraint, if you don’t
choose the split point carefully cycling can
occur!
…
a
b
…
c
i
h
…
…
d
g
f
e
…
…
Projection operation: special case
• When inserting a constraint, if you don’t
choose the split point carefully cycling can
occur!
…
a
b
…
c
i
h
…
…
d
g
f
e
…
…
Running time
Drawing large directed graphs
Unconstrained
layout
1,142 crossings
Stress=39,954
Drawing large directed graphs
Sugiyama-style
layout
6,148 crossings
Drawing large directed graphs
DiG-CoLa
7,600 crossings
Stress=74,894
Drawing large directed graphs
IPSep-CoLa
3,617 crossings
Stress=49,035
More applications
Non-overlapping
clusters
Original figure,
courtesy
Stephen J.
Brams
Prevent overlaps
between labels
in MDS plots
(DMDS)
Multi-dimensional scaling with clusters
Further work
• Make it faster
– e.g. scaled gradient projection
• Approximating arbitrary linear constraints
with separation constraints
– To straighten bendy edges
• See: Dwyer, Marriott
and Wybrow GD’2006
– To allow convex-hull clusters
Conclusion
• Separation constraints allow us to impose application
specific requirements on stress-majorization layout
• We can do a lot of new things that previously could only
be approximated with potentially unstable springies
• You can download an LGPLed C++ library
implementation (adaptagrams.sf.net), or play with it in
neato (www.graphviz.org) or Inkscape
(www.inkscape.org)
• We’d love to collaborate with you to find more
applications
– contact: [email protected]