Aesthetic Value of Graph Layouts - Investigation of...
Transcript of Aesthetic Value of Graph Layouts - Investigation of...
1 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Master’s Thesis of Moritz Klammler at the Institute of Theoretical Computer Science
Aesthetic Value of Graph LayoutsInvestigation of Statistical Syndromes for AutomaticQuantification
KIT – The Research University in the Helmholtz Association www.kit.edu
Abstract
2 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Visualizing relational data as drawing of graphs is a technique in very wide-spread use across manyfields and professions. While many graph drawing algorithms have been proposed to automati-cally generate a supposedly high-quality picture from an abstract mathematical data structure, thegraph drawing community is still searching for a way to quantify the aesthetic value of any givensolution in a way that allows one to compare graph layouts created by different algorithms for thesame graph (presumably to automatically choose the better one). We believe that one promisingpath towards this goal could be enabled by combining data analysis techniques that have provenuseful in other scientific disciplines that are dealing with large structures such as astronomy, crys-tallography or thermodynamics. In this work we present an initial investigation of some statisticalproperties of graph layouts that we believe could provide viable syndromes for the aesthetic value.As a proof of concept, we used machine learning techniques to train a neural network with the re-sults of our data analysis and thereby built a model that is able to discriminate between better andworse layouts with an accuracy of 95%. A rudimentary evaluation of the model was performedand is presented. This work primarily provides an infrastructure to enable further experimenta-tion on the topic and will be made available to the public as Free Software.
Contents
3 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
IntroductionMotivationProblem StatementPrevious WorkOur Contribution
MethodologyImplementation
Statistical SyndromesData Generation
GraphsLayouts
Data AugmentationLayout Worsening
Layout InterpolationFeature Extraction
Entropy of HistogramsEntropy of Sliding Averages
Discriminator ModelEvaluation
AccuracyContribution of IndividualProperties
Conclusions & Future WorkSummaryOpen Questions and Future Plans
Bibliography
Contents
4 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
IntroductionMotivationProblem StatementPrevious WorkOur Contribution
Methodology
Statistical Syndromes
Data Generation
Data Augmentation
Feature Extraction
Discriminator Model
Evaluation
Conclusions & Future Work
Bibliography
Motivation
5 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Possible applications:
Run N layout algorithms in parallel, choose the best resultSelect layout algorithm for a given applicationAid the development of domain-specific layout algorithms
Problem Statement
6 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Simple graphs only1
Vertex layouts only2
Two layouts for the same graph givenDecide which one is aesthetically more pleasing3
1undirected, no loops, no multiple edges2vertices are 2D points, edges are straight lines3ideally, we aim for a partial order
Previous Work
7 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Existing Measures:
Energy (from force-directed methods)Purchase (2002)edge crossings, edge bends, symmetry, minimal angles between edges, edge orthogonality,
node orthogonality, consistent flow direction
Binary Stress (Kamada and Kawai 1989; Koren and Çivril 2008)Klapaukh (2014)Combined Metric (Huang et al. 2016)
Problems with these:
Too many a priory assumptionsToo localized / too little contextMight loose valuable information due to oversimplificationSome are unstable with respect to the simplest transformations (scaling)
Our Contribution
8 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Idea: Use data analysis techniques that were successful in other disciplines(crystallography, astronomy, thermodynamics, …)Strategy: Condense this information into a fixed-size feature vector viastatistic analysisQuestion: Can we find syndromes that allow for successful automaticquantification?Guideline: Try to use as few a priori assumptions as possible and detectfeatures from first principles
9 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Contents
10 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
MethodologyImplementation
Statistical Syndromes
Data Generation
Data Augmentation
Feature Extraction
Discriminator Model
Evaluation
Conclusions & Future Work
Bibliography
Methodology
11 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Gather as many graphs as possibleObtain as many (known) good and bad layouts as possibleCompute properties for all of themUse a priori knowledge to label pairs of layoutsUse data to build a discriminator
Implementation
12 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Plug-in infrastructure for unattended experimentationGraph generators, layouts, layout transformations and propertiesimplemented as small programsSiamese neural networkFeature-rich web front-end for data inspection
Technologies:
Open Graph Drawing Framework (OGDF)Keras + TensorFlowC++, Python, SQLite, XSLT, CMake, …
Contents
13 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
Methodology
Statistical Syndromes
Data Generation
Data Augmentation
Feature Extraction
Discriminator Model
Evaluation
Conclusions & Future Work
Bibliography
Statistical Syndromes of Graph Layouts
14 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
We investigated several properties (multisets of scalar events) for a givenlayout.
Principal Components (PRINCOMP1ST and PRINCOMP2ND)Angles Between Incident Edges (ANGULAR)Edge Lengths (EDGE_LENGTH)Pairwise Distances (RDF_GLOBAL and RDF_LOCAL)Tension (TENSION)
Principal Components
15 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Find linear independent axes among which the moment of inertia ismaximizedConsider the distribution of vertex coordinates along those axesCan be computed with O(n) effort
PRINCOMP1ST =[⟨
p(1)∣∣∣Γ(v)⟩ : v ∈ V
]PRINCOMP2ND =
[⟨p(2)
∣∣∣Γ(v)⟩ : v ∈ V]
Principal Components
15 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Find linear independent axes among which the moment of inertia ismaximizedConsider the distribution of vertex coordinates along those axesCan be computed with O(n) effort
PRINCOMP1ST =[⟨
p(1)∣∣∣Γ(v)⟩ : v ∈ V
]PRINCOMP2ND =
[⟨p(2)
∣∣∣Γ(v)⟩ : v ∈ V]
first principal axis
second principal axis
1st Principal Component (PRINCOMP1ST)
16 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
−4 −2 0 2 4x/100
−4 −2 0 2 4x/100
−10 −5 0 5 10 15x/100
2nd Principal Component (PRINCOMP2ND)
17 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
−4 −2 0 2 4x/100
−4 −2 0 2 4x/100
−10 −5 0 5 10 15x/100
Angles Between Incident Edges (ANGULAR)
18 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Enumerate polar angles of incident edges in clockwise orderCompute adjacent differences (of polar angles)Special cases for deg(v) = 1 and degenerate casesConsider distribution of all those anglesCan be computed with O(n+m) effort
ANGULAR =⋃v∈V
φΓ(v)
Angles Between Incident Edges (ANGULAR)
19 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 0.5 1 1.5 2φ/π
0 0.5 1 1.5 2φ/π
0 0.5 1 1.5 2φ/π
Edge Lengths (EDGE_LENGTH)
20 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Consider distribution of edge lengthsCan be computed with O(m) effort
EDGE_LENGTH = [lengthΓ(e) : e ∈ E ]
Edge Lengths (EDGE_LENGTH)
20 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Consider distribution of edge lengthsCan be computed with O(m) effort
EDGE_LENGTH = [lengthΓ(e) : e ∈ E ]
length of edge e in layout Γ
Edge Lengths (EDGE_LENGTH)
21 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 1 2l/100
0 1 2l/100
0 1 2l/100
Pairwise Distances (RDF_GLOBAL)
22 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Compute pairwise distances between all pairs of verticesCan be computed with O(n2) effort
RDF_GLOBAL = [distΓ(v1, v2) : v1, v2 ∈ V ]
Pairwise Distances (RDF_GLOBAL)
22 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Compute pairwise distances between all pairs of verticesCan be computed with O(n2) effort
RDF_GLOBAL = [distΓ(v1, v2) : v1, v2 ∈ V ]
distance between Γ(v1) and Γ(v2)
Pairwise Distances (RDF_GLOBAL)
23 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 5 10 15r/100
0 5 10 15r/100
0 5 10 15 20 25 30 35r/100
Pairwise Distances (RDF_LOCAL(d))
24 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Restrict global RDF to those pairs of vertices that have a graph-theoreticaldistance of at most d ∈ R
Repeat for different values of d = 2i for i ∈ N0 up to the longest finiteshortest path in the graphInterpolates between EDGE_LENGTH and RDF_GLOBALCan be computed with O(n3) effort
RDF_LOCAL(d) = [distΓ(v1, v2) : dist(v1, v2) ≤ d : v1, v2 ∈ V ]
Pairwise Distances (RDF_LOCAL(d))
24 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Restrict global RDF to those pairs of vertices that have a graph-theoreticaldistance of at most d ∈ R
Repeat for different values of d = 2i for i ∈ N0 up to the longest finiteshortest path in the graphInterpolates between EDGE_LENGTH and RDF_GLOBALCan be computed with O(n3) effort
RDF_LOCAL(d) = [distΓ(v1, v2) : dist(v1, v2) ≤ d : v1, v2 ∈ V ]
distance between Γ(v1) and Γ(v2)length of shortest path from v1 to v2
Pairwise Distances (RDF_LOCAL(1))
25 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
Pairwise Distances (RDF_LOCAL(2))
26 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
Pairwise Distances (RDF_LOCAL(4))
27 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
Pairwise Distances (RDF_LOCAL(8))
28 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
Pairwise Distances (RDF_LOCAL(16))
29 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
Pairwise Distances (RDF_LOCAL(32))
30 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
0 5 10 15 20 25r/100
Tension (TENSION)
31 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Consider distribution of quotients of node and graph distancesInspired by stress but has well-behaved response to scalingCan be computed with O(n3) effort
TENSION =|E |
∑e∈E
lengthΓ(e)
[distΓ(v1, v2)dist(v1, v2)
: v1, v2 ∈ V]
Tension (TENSION)
31 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Consider distribution of quotients of node and graph distancesInspired by stress but has well-behaved response to scalingCan be computed with O(n3) effort
TENSION =|E |
∑e∈E
lengthΓ(e)
[distΓ(v1, v2)dist(v1, v2)
: v1, v2 ∈ V]
length of edge e in layout Γ
distance between Γ(v1) and Γ(v2)
length of shortest path from v1 to v2
Tension (TENSION)
32 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
0.7 0.8 0.9 1.0 0.5 1.0 1.5 0.0 0.5 1.0 1.5 2.0 2.5
Contents
33 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
Methodology
Statistical Syndromes
Data GenerationGraphsLayouts
Data Augmentation
Feature Extraction
Discriminator Model
Evaluation
Conclusions & Future Work
Bibliography
Graph Generators
34 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
LINDENMAYER QUASI4D BOTTLE MOSAIC1
GRID TORUS1 TORUS2 MOSAIC2
Graph Import Sources
35 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
ROME NORTH RANDDAG IMPORT
BCSPWR GRENOBLE PSADMIT SMTAPE
Layouts
36 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
NATIVE FMMM STRESS
RANDOM_UNIFORM RANDOM_NORMAL PHANTOM
Contents
37 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
Methodology
Statistical Syndromes
Data Generation
Data AugmentationLayout Worsening
Layout Interpolation
Feature Extraction
Discriminator Model
Evaluation
Conclusions & Future Work
Bibliography
Data Augmentation
38 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout worsening (unary layout transformation)Input: Parent layout Γ and parameter 0 ≤ r ≤ 1Output: Worsened layout Γ′
r
Layout interpolation (binary layout transformation)Input: Parent layouts ΓA and ΓB and parameter 0 ≤ r ≤ 1Output: Interpolated layout Γ′
r
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (PERTURB)
39 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_NODES)
40 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (FLIP_EDGES)
41 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Worsening (MOVLSQ)
42 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (LINEAR)
43 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Layout Interpolation (XLINEAR)
44 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Contents
45 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
Methodology
Statistical Syndromes
Data Generation
Data Augmentation
Feature ExtractionEntropy of HistogramsEntropy of Sliding Averages
Discriminator Model
Evaluation
Conclusions & Future Work
Bibliography
Feature Extraction
46 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Properties are multisets of unbounded sizeWe need to condense them into a fixed-size feature vectorUse histograms to present dataUse sliding averages (Gaussian kernel) for RDF_LOCAL insteadFor each Property:
Arithmetic mean and root mean squared (2 values)Entropy regression of histograms (2 values)Differential entropy in case of RDF_LOCAL (1 value)
Principal components (4 values)(Logarithm of) number of vertices and edges (2 values)
All features are normalized by subtracting the mean and dividing by thestandard deviation.
Feature Extraction
46 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Properties are multisets of unbounded sizeWe need to condense them into a fixed-size feature vectorUse histograms to present dataUse sliding averages (Gaussian kernel) for RDF_LOCAL insteadFor each Property:
Arithmetic mean and root mean squared (2 values)Entropy regression of histograms (2 values)Differential entropy in case of RDF_LOCAL (1 value)
Principal components (4 values)(Logarithm of) number of vertices and edges (2 values)
All features are normalized by subtracting the mean and dividing by thestandard deviation.
Sliding average with kernel f :
Ff (x) =∑n
i=1 f (x , xi)∫ +∞−∞ dy ∑n
i=1 f (y , xi)
Gaussian kernel:
gσ(µ, x) =1
σ√
2πe− 1
2
(x−µ
σ
)2
Feature Extraction
46 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Properties are multisets of unbounded sizeWe need to condense them into a fixed-size feature vectorUse histograms to present dataUse sliding averages (Gaussian kernel) for RDF_LOCAL insteadFor each Property:
Arithmetic mean and root mean squared (2 values)Entropy regression of histograms (2 values)Differential entropy in case of RDF_LOCAL (1 value)
Principal components (4 values)(Logarithm of) number of vertices and edges (2 values)
All features are normalized by subtracting the mean and dividing by thestandard deviation.
Entropy of Histograms
47 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Definition (Discrete Entropy)Let H be a histogram with n ∈ N bins that have the values (relative frequencycounts) H1, . . . ,H2 ∈ R≥0 such that ∑n
i=1 Hi = 1. Then the entropy of H is
S(H) = −n
∑i=1
Hi log2(Hi)
where we use the convention that bins with Hi = 0 shall contribute a zeroterm to the sum.
Depends strongly on the bin width / countEntropy grows exponentially with bin count
Entropy of Histogram
48 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Entropy of Histogram
49 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
2
3
4
5
6
7
8
9
3 4 5 6 7 8 9
S/bit
log2(h)
NATIVE(x) = 0.32+ 0.88xFMMM(x) = −0.34+ 1.02xSTRESS(x) = −0.24+ 1.01xRANDOM_UNIFORM(x) = −0.57+ 1.02xRANDOM_NORMAL(x) = −0.69+ 1.02xPHANTOM(x) = −0.86+ 1.01x
Entropy of Sliding Averages
50 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Definition (Differential Entropy)Let f : R → R≥0 be a non-negative steady function normalized such that∫ +∞−∞ dx f (x) = 1. The differential entropy of f is defined as
S̄(f ) = −∫ +∞
−∞dx x log2(x)
where we use the convention that the integrand shall be zero for those x ∈ R
where f (x) = 0.
Originally proposed by Shannon (1948)Not a measure of information (Jaynes 1963)Can actually be negativeRemotely useful transcendental properties (Cover and Thomas 1991)
Contents
51 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
Methodology
Statistical Syndromes
Data Generation
Data Augmentation
Feature Extraction
Discriminator Model
Evaluation
Conclusions & Future Work
Bibliography
Discriminator Model
52 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Receives two feature vectors of layouts ΓA and ΓB as inputsOutputs a number between −1 and +1
D(ΓA, ΓB) =
< 0, ΓA is considered better> 0, ΓB is considered better= 0, neither layout is considered better
Siamese neural network (Bromley et al. 1994)
Discriminator Model
53 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
lhsin: InputLayerinput:
output:
(None, 58)
(None, 58)
shared: Modelinput:
output:
(None, 58)
(None, 10)
rhsin: InputLayerinput:
output:
(None, 58)
(None, 58)
sub: Subtractinput:
output:
[(None, 10), (None, 10)]
(None, 10)
auxin: InputLayerinput:
output:
(None, 2)
(None, 2)
aux: Denseinput:
output:
(None, 2)
(None, 2)
cat: Concatenateinput:
output:
[(None, 10), (None, 2)]
(None, 12)
out: Denseinput:
output:
(None, 12)
(None, 1)
Discriminator Model
54 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
in: InputLayerinput:
output:
(None, 58)
(None, 58)
do1: Dropoutinput:
output:
(None, 58)
(None, 58)
l1: Denseinput:
output:
(None, 58)
(None, 10)
do2: Dropoutinput:
output:
(None, 10)
(None, 10)
l2: Denseinput:
output:
(None, 10)
(None, 10)
Contents
55 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
Methodology
Statistical Syndromes
Data Generation
Data Augmentation
Feature Extraction
Discriminator Model
EvaluationAccuracyContribution of IndividualProperties
Conclusions & Future Work
Bibliography
Evaluation
56 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Corpora with tens of thousands of labeled pairs (ΓA, ΓB, t)We ensure that t 6≈ 0 (i.e. we don’t use borderline cases)20% (chosen randomly) of this data is set aside for testingD(ΓA, ΓB) = p is considered a success if and only if sign(p) = sign(t)Training and testing are repeated with different partitions (cross validationvia random subsampling)Reproducible success rates in excess of 95% achieved
Accuracy
57 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Cond. Neg. Cond. Pos. Σ
Pred. Neg. 48.31% ± 0.70% 1.25% ± 0.60% 49.56% ± 1.17%Pred. Pos. 1.81% ± 0.65% 48.63% ± 0.68% 50.44% ± 1.17%
Σ 50.12% ± 0.60% 49.88% ± 0.60% 100.00% ± 0.00%
Success Rate: 96.94% ± 0.12%Failure Rate: 3.06% ± 0.12%
Average Number of Tests: ≈ 11 762Number of Repetitions: 10
Contribution of Individual Properties
58 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Property Sole Exclusion Sole Inclusion
RDF_LOCAL 88.77% ±5.34% 96.21% ± 0.37%PRINCOMP2ND 96.69% ±0.24% 58.27% ± 3.55%EDGE_LENGTH 96.85% ±0.20% 71.36% ±10.07%ANGULAR 96.88% ±0.20% 85.70% ± 6.19%RDF_GLOBAL 96.91% ±0.30% 88.09% ± 1.64%TENSION 96.96% ±0.24% 92.07% ± 0.22%PRINCOMP1ST 97.12% ±0.16% 62.91% ± 8.70%
Baseline Using All Properties 96.94% ±0.12%
Contents
59 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
Methodology
Statistical Syndromes
Data Generation
Data Augmentation
Feature Extraction
Discriminator Model
Evaluation
Conclusions & Future WorkSummaryOpen Questions and Future Plans
Bibliography
Summary
60 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Built framework for flexible experimentationDeveloped several graph generatorsExplored ways of data augmentationInvestigated several properties (some of them promising)RDF_LOCAL is most valuable but also most expensiveDemonstrated feasibility by training neural networkAll experiments run fully automatic and can be repeated by anybody whowishes to do soDownload source code at http://klammler.eu/msc/
OpenQuestions and Future Plans
61 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Additional PropertiesProperties involving edgesShapelet analysisMore correlations between graph-theoretical and layout properties
More elaborate data analysisComparison with existing measuresUser studyExtension to more general graph drawingsApplication as a meta-heuristic for a genetic layout algorithm
Contents
62 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Introduction
Methodology
Statistical Syndromes
Data Generation
Data Augmentation
Feature Extraction
Discriminator Model
Evaluation
Conclusions & Future Work
Bibliography
Bibliography I
63 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Bromley, J.; Guyon, I.; LeCun, Y.; Säckinger, E.; Shah, R. In Advances inNeural Information Processing Systems, 1994, pp 737–744.
Cover, T. M.; Thomas, J. A., Elements of information theory, Wiley seriesin telecommunications; Wiley: 1991.
Huang, W.; Huang, M. L.; Lin, C.-C. Information Sciences 2016, 330,444–454.
Jaynes, E. T. In Statistical Physics, Ford, K., Ed.; Brandeis UniversitySummer Institute Lectures in Theoretical Physics 3; Benjamin: NewYork, 1963, pp 181–218.
Kamada, T.; Kawai, S. Information Processing Letters 1989, 31, 7–15.
Klapaukh, R. An Empirical Evaluation of Force-Directed Graph Layout.,Ph.D. Thesis, Victoria University of Wellington, 2014.
Bibliography II
64 April 2018 Moritz Klammler - Aesthetic Value of Graph Layouts Institute of Theoretical Computer Science
Koren, Y.; Çivril, A. In International Symposium on Graph Drawing,Springer: 2008, pp 193–205.
Purchase, H. Journal of Visual Languages and Computing 2002, 13,501–516.
Schaefer, S.; McPhail, T.; Warren, J. In ACM transactions on graphics(TOG), 2006; Vol. 25, pp 533–540.
Shannon, C. E. The Bell System Technical Journal 1948-10, 27, 623–656.
Please refer to the printed thesis for a complete list of references.