Aesthetic Discrimination of Graph Layouts - Moritz...

76
1 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak 26 th International Symposium on Graph Drawing and Network Visualization, Barcelona (2018) Aesthetic Discrimination of Graph Layouts Moritz Klammler · Tamara Mchedlidze · Alexey Pak KIT – The Research University in the Helmholtz Association www.kit.edu

Transcript of Aesthetic Discrimination of Graph Layouts - Moritz...

Page 1: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

1 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

26th International Symposium on Graph Drawing and Network Visualization, Barcelona (2018)

Aesthetic Discrimination of Graph LayoutsMoritz Klammler · Tamara Mchedlidze · Alexey Pak

KIT – The Research University in the Helmholtz Association www.kit.edu

Page 2: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Abstract

2 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

This paper addresses the following basic question: given two layouts of the same graph, which oneis more aesthetically pleasing? We propose a neural network-based discriminator model trainedon a labeled dataset that decides which of two layouts has a higher aesthetic quality. The featurevectors used as inputs to the model are based on known graph drawing quality metrics, classicalstatistics, information-theoretical quantities, and two-point statistics inspired by methods of con-densed matter physics. The large corpus of layout pairs used for training and testing is constructedusing force-directed drawing algorithms and the layouts that naturally stem from the process ofgraph generation. It is further extended using data augmentation techniques. Our model demon-strates a mean prediction accuracy of 96.48%, outperforming discriminators based on stress andon the linear combination of popular quality metrics by a small but statistically significant margin.

Klammler, M. et al. Aesthetic Discrimination of Graph Layouts., 2018

Klammler, M. Aesthetic value of graph layouts: Investigation of statistical syndromes for automatic quantifica-tion., Master’s thesis, Karlsruhe Institute of Technology, 2018

Klammler, M. et al. Source Code for Aesthetic Discrimination of Graph Layouts., 2018

Page 3: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Problem Statement

3 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Given two vertex layouts Γa and Γb for the same simple graph G = (V , E).Is Γa or Γb more aesthetically pleasing?

−1 0 +1

Page 4: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Problem Statement

3 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Given two vertex layouts Γa and Γb for the same simple graph G = (V , E).Is Γa or Γb more aesthetically pleasing?

−1 0 +1

Γ : V → R2

v 7→ (xv , yv )

Page 5: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Problem Statement

3 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Given two vertex layouts Γa and Γb for the same simple graph G = (V , E).Is Γa or Γb more aesthetically pleasing?

−1 0 +1

→ undirected→ no loops→ no multiple edges

Page 6: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Problem Statement

3 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Given two vertex layouts Γa and Γb for the same simple graph G = (V , E).Is Γa or Γb more aesthetically pleasing?

−1 0 +1

Page 7: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Contents

4 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Problem Statement

Related Work

Methodology

Evaluation

Conclusion and Future Work

Page 8: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Related Work

5 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Simple Metricsnumber of edge crossingsminimum crossing angle (cross resolution)minimum angle between incident edges (angular resolution)standard deviation of edge lengths…

COMB(Γi) = ∑M wM zM(Γi) with zM = (M(Γi)− µM) / σM

STRESS(Γ) = ∑n−1i=1 ∑n

j=i+1 kij(distΓ(vi , vj)− L · distG(vi , vj)

)2

Huang, W. et al. J Vis Lang Comput 2013, 24, 262–272

Kamada, T.; Kawai, S. Inf Process Lett 1989, 31, 7–15

Page 9: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Related Work

5 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Simple Metricsnumber of edge crossingsminimum crossing angle (cross resolution)minimum angle between incident edges (angular resolution)standard deviation of edge lengths…

COMB(Γi) = ∑M wM zM(Γi) with zM = (M(Γi)− µM) / σM

STRESS(Γ) = ∑n−1i=1 ∑n

j=i+1 kij(distΓ(vi , vj)− L · distG(vi , vj)

)2

Huang, W. et al. J Vis Lang Comput 2013, 24, 262–272

Kamada, T.; Kawai, S. Inf Process Lett 1989, 31, 7–15

Page 10: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Related WorkCombined Metric (COMB)

6 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

−1 0 +1

COMB

Page 11: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Related WorkCombined Metric (COMB)

6 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

−1 0 +1

COMB

Page 12: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Related Work

7 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Simple Metricsnumber of edge crossingsminimum crossing angle (cross resolution)minimum angle between incident edges (angular resolution)standard deviation of edge lengths…

COMB(Γi) = ∑M wM zM(Γi) with zM = (M(Γi)− µM) / σM

STRESS(Γ) = ∑n−1i=1 ∑n

j=i+1 kij(distΓ(vi , vj)− L · distG(vi , vj)

)2

Huang, W. et al. J Vis Lang Comput 2013, 24, 262–272

Kamada, T.; Kawai, S. Inf Process Lett 1989, 31, 7–15

Page 13: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Related Work

7 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Simple Metricsnumber of edge crossingsminimum crossing angle (cross resolution)minimum angle between incident edges (angular resolution)standard deviation of edge lengths…

COMB(Γi) = ∑M wM zM(Γi) with zM = (M(Γi)− µM) / σM

STRESS(Γ) = ∑n−1i=1 ∑n

j=i+1 kij(distΓ(vi , vj)− L · distG(vi , vj)

)2

Huang, W. et al. J Vis Lang Comput 2013, 24, 262–272

Kamada, T.; Kawai, S. Inf Process Lett 1989, 31, 7–15

Page 14: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Stress (STRESS)

8 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

−1 0 +1

STRESS

Page 15: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Stress (STRESS)

8 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

−1 0 +1

STRESS

Page 16: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Contents

9 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Problem Statement

Related Work

Methodology

Evaluation

Conclusion and Future Work

Page 17: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Methodology Overview

10 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Γa Γb

......

Please take this into account for the Bounding Box!

Page 18: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Methodology Overview

10 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Γa Γb

......

Please take this into account for the Bounding Box!

DiscriminatorModel

Page 19: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Methodology Overview

10 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Γa Γb

......

Please take this into account for the Bounding Box!

DiscriminatorModel

f (Γa)

f (Γb)

Feature Extraction

Page 20: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Methodology Overview

10 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

......

Please take this into account for the Bounding Box!

DiscriminatorModel

f (Γa)

f (Γb)

Feature ExtractionLabeled Pairs

Page 21: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Methodology Overview

10 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

......

Please take this into account for the Bounding Box!

DiscriminatorModel

f (Γa)

f (Γb)

Feature ExtractionLabeled Pairs

training

testing

Page 22: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Methodology Overview

10 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

......

Please take this into account for the Bounding Box!

DiscriminatorModel

f (Γa)

f (Γb)

Feature ExtractionLabeled Pairs

Page 23: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & Augmentation

11 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

1. Collect a large number of graphsimported graphs — from public collectionsgenerated graphs — using probabilistic algorithms

2. Compute various layouts for these graphsnative layouts — fall out of the graph generation processproper layouts — using common state-of-the-art algorithmsgarbage layouts — using more or less random placements of vertices

3. Use data augmentation to expand this corpuslayout worsening — degrade proper layout by given ratelayout interpolation — compute layout “between” proper and garbage layout

Page 24: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationImported Graphs

12 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

ROME

Page 25: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationImported Graphs

12 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

ROMENORTH

Page 26: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationImported Graphs

12 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

ROMENORTH

RANDDAG

Page 27: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationImported Graphs

12 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

ROMENORTH

RANDDAG

BCSPWR

Page 28: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationImported Graphs

12 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

ROMENORTH

RANDDAG

BCSPWR

GRENOBLE

Page 29: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationImported Graphs

12 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

ROMENORTH

RANDDAG

BCSPWR

GRENOBLE

PSADMIT

Page 30: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationImported Graphs

12 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

ROMENORTH

RANDDAG

BCSPWR

GRENOBLE

PSADMIT

SMTAPE

Page 31: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationImported Graphs

12 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

ROMENORTH

RANDDAG

BCSPWR

GRENOBLE

PSADMIT

SMTAPEIMPORT

Page 32: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

Page 33: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

Page 34: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2

Page 35: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

Page 36: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

TORUS1

Page 37: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

TORUS1

TORUS2

Page 38: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

TORUS1

TORUS2

QUASI3D

Page 39: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

TORUS1

TORUS2

QUASI3DQUASI4D

Page 40: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

TORUS1

TORUS2

QUASI3DQUASI4D

QUASI5D

Page 41: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

TORUS1

TORUS2

QUASI3DQUASI4D

QUASI5D

QUASI6D

Page 42: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

TORUS1

TORUS2

QUASI3DQUASI4D

QUASI5D

QUASI6D BOTTLE

Page 43: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationGenerated Graphs

13 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

LINDENMAYER

MOSAIC1

MOSAIC2GRID

TORUS1

TORUS2

QUASI3DQUASI4D

QUASI5D

QUASI6D BOTTLE TREE

Page 44: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & Augmentation

14 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

1. Collect a large number of graphsimported graphs — from public collectionsgenerated graphs — using probabilistic algorithms

2. Compute various layouts for these graphsnative layouts — fall out of the graph generation processproper layouts — using common state-of-the-art algorithmsgarbage layouts — using more or less random placements of vertices

3. Use data augmentation to expand this corpuslayout worsening — degrade proper layout by given ratelayout interpolation — compute layout “between” proper and garbage layout

Page 45: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & Augmentation

14 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

1. Collect a large number of graphsimported graphs — from public collectionsgenerated graphs — using probabilistic algorithms

2. Compute various layouts for these graphsnative layouts — fall out of the graph generation processproper layouts — using common state-of-the-art algorithmsgarbage layouts — using more or less random placements of vertices

3. Use data augmentation to expand this corpuslayout worsening — degrade proper layout by given ratelayout interpolation — compute layout “between” proper and garbage layout

Page 46: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationLayouts

15 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

prop

er

NATIVE FMMM STRESS

garbage

RANDOM_UNIFORM RANDOM_NORMAL PHANTOM

Page 47: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & Augmentation

16 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

1. Collect a large number of graphsimported graphs — from public collectionsgenerated graphs — using probabilistic algorithms

2. Compute various layouts for these graphsnative layouts — fall out of the graph generation processproper layouts — using common state-of-the-art algorithmsgarbage layouts — using more or less random placements of vertices

3. Use data augmentation to expand this corpuslayout worsening — degrade proper layout by given ratelayout interpolation — compute layout “between” proper and garbage layout

Page 48: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & Augmentation

16 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

1. Collect a large number of graphsimported graphs — from public collectionsgenerated graphs — using probabilistic algorithms

2. Compute various layouts for these graphsnative layouts — fall out of the graph generation processproper layouts — using common state-of-the-art algorithmsgarbage layouts — using more or less random placements of vertices

3. Use data augmentation to expand this corpuslayout worsening — degrade proper layout by given ratelayout interpolation — compute layout “between” proper and garbage layout

Page 49: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationLayout Worsening

17 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Page 50: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationLayout Worsening

18 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PERTURB FLIP_NODES FLIP_EDGES MOVLSQ

r=

10%

r=

20%

r=

50%

Page 51: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Data Acquisition & AugmentationLayout Interpolation

19 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

r = 0% r = 20% r = 40%

r = 60% r = 80% r = 100%

Page 52: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Methodology Overview

20 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

......

Please take this into account for the Bounding Box!

DiscriminatorModel

f (Γa)

f (Γb)

Feature ExtractionLabeled Pairs

Page 53: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction Overview

21 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PRINCOMP1

PRINCOMP2

ANGULAR

EDGE_LENGTH

TENSION

RDF_GLOBAL

RDF_LOCAL(d)

Page 54: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction Overview

21 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PRINCOMP1

PRINCOMP2

ANGULAR

EDGE_LENGTH

TENSION

RDF_GLOBAL

RDF_LOCAL(d)

Page 55: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction Overview

21 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PRINCOMP1

PRINCOMP2

ANGULAR

EDGE_LENGTH

TENSION

RDF_GLOBAL

RDF_LOCAL(d)

{x1, x2, . . . . . .}

{x1, x2, . . . . . .}

{x1, x2, . . .}

{x1, x2, . . .}

{x1, x2, . . .}

{x1, x2, . . . . . . . . .}

{x1, x2, . . . . . . . . .}(d)

Page 56: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction Overview

21 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PRINCOMP1

PRINCOMP2

ANGULAR

EDGE_LENGTH

TENSION

RDF_GLOBAL

RDF_LOCAL(d)

{x1, x2, . . . . . .}

{x1, x2, . . . . . .}

{x1, x2, . . .}

{x1, x2, . . .}

{x1, x2, . . .}

{x1, x2, . . . . . . . . .}

{x1, x2, . . . . . . . . .}(d)

Page 57: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Statistical Syndromes of Graph Layouts

22 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PRINVEC1 and PRINVEC2 — first and second principal axis of vertexcoordinatesPRINCOMP1 and PRINCOMP2 — projections of vertex coordinates ontoprincipal axesANGULAR — angles between incident edgesEDGE_LENGTH — edge lengthsTENSION – ratios of Euclidean and graph-theoretical distances computedfor all vertex pairsRDF_GLOBAL — pairwise distances between vertex coordinatesRDF_LOCAL(d) — pairwise distances between vertex coordinates where thegraph-theoretical distance between them is bounded by d ∈ N

Page 58: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Statistical Syndromes of Graph Layouts

22 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PRINVEC1 and PRINVEC2 — first and second principal axis of vertexcoordinatesPRINCOMP1 and PRINCOMP2 — projections of vertex coordinates ontoprincipal axesANGULAR — angles between incident edgesEDGE_LENGTH — edge lengthsTENSION – ratios of Euclidean and graph-theoretical distances computedfor all vertex pairsRDF_GLOBAL — pairwise distances between vertex coordinatesRDF_LOCAL(d) — pairwise distances between vertex coordinates where thegraph-theoretical distance between them is bounded by d ∈ N

RDF_LOCAL( 1 ) = EDGE_LENGTH

RDF_LOCAL(∞) = RDF_GLOBAL

Page 59: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Angles Between Incident Edges (ANGULAR)

23 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

0 0.5 1 1.5 2φ/π

0 0.5 1 1.5 2φ/π

0 0.5 1 1.5 2φ/π

Page 60: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Radial Distribution Function (RDF_GLOBAL)

24 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

0 5 10 15r/100

0 5 10 15r/100

0 5 10 15 20 25 30 35r/100

Page 61: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction Overview

25 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PRINCOMP1

PRINCOMP2

ANGULAR

EDGE_LENGTH

TENSION

RDF_GLOBAL

RDF_LOCAL(d)

{x1, x2, . . . . . .}

{x1, x2, . . . . . .}

{x1, x2, . . .}

{x1, x2, . . .}

{x1, x2, . . .}

{x1, x2, . . . . . . . . .}

{x1, x2, . . . . . . . . .}(d)

(y1, y2, y3, y4, y5, y6)

(y1, y2, y3, y4, y5, y6)

(y1, y2, y3, y4)

(y1, y2, y3, y4)

(y1, y2, y3)

(y1, y2, y3, y4)

(y1, y2, y3)(d)

Page 62: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction Overview

25 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

PRINCOMP1

PRINCOMP2

ANGULAR

EDGE_LENGTH

TENSION

RDF_GLOBAL

RDF_LOCAL(d)

{x1, x2, . . . . . .}

{x1, x2, . . . . . .}

{x1, x2, . . .}

{x1, x2, . . .}

{x1, x2, . . .}

{x1, x2, . . . . . . . . .}

{x1, x2, . . . . . . . . .}(d)

(y1, y2, y3, y4, y5, y6)

(y1, y2, y3, y4, y5, y6)

(y1, y2, y3, y4)

(y1, y2, y3, y4)

(y1, y2, y3)

(y1, y2, y3, y4)

(y1, y2, y3)(d)

FeatureVector

Page 63: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction

26 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

We need to condense syndromes into a feature vector of fixed size.

arithmetic meanroot mean squared (RMS)

entropy of distributionProblem: depends on data aggregation (histogram bin / filter width)→ Compute entropy for several histograms with different bin widths→ Perform linear regression→ Use regression parameters instead of entropy

Page 64: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction

26 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

We need to condense syndromes into a feature vector of fixed size.

arithmetic meanroot mean squared (RMS)

entropy of distributionProblem: depends on data aggregation (histogram bin / filter width)→ Compute entropy for several histograms with different bin widths→ Perform linear regression→ Use regression parameters instead of entropy

0 0.5 1 1.5 2φ/π

0 0.5 1 1.5 2φ/π

Page 65: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction

26 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

We need to condense syndromes into a feature vector of fixed size.

arithmetic meanroot mean squared (RMS)

entropy of distributionProblem: depends on data aggregation (histogram bin / filter width)→ Compute entropy for several histograms with different bin widths→ Perform linear regression→ Use regression parameters instead of entropy

Page 66: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction

26 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

We need to condense syndromes into a feature vector of fixed size.

arithmetic meanroot mean squared (RMS)

entropy of distributionProblem: depends on data aggregation (histogram bin / filter width)→ Compute entropy for several histograms with different bin widths→ Perform linear regression→ Use regression parameters instead of entropy

Page 67: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Feature Extraction

26 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

We need to condense syndromes into a feature vector of fixed size.

arithmetic meanroot mean squared (RMS)

entropy of distributionProblem: depends on data aggregation (histogram bin / filter width)→ Compute entropy for several histograms with different bin widths→ Perform linear regression→ Use regression parameters instead of entropy−1

0

1

2

3

4

5

6

7

8

3 4 5 6 7 8 9

E/

bit

log2(β)

f (x) = −1.97+ 0.60 xf (x) = −2.18+ 0.74 xf (x) = −2.25+ 0.91 xf (x) = −1.94+ 0.98 xf (x) = −1.44+ 0.99 x

Page 68: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Methodology Overview

27 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

......

Please take this into account for the Bounding Box!

DiscriminatorModel

f (Γa)

f (Γb)

Feature ExtractionLabeled Pairs

Page 69: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Siamese Neural Network

28 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

drop

out

dens

e

drop

out

dens

e57 57 15 15 11

~v ~σ

conc

aten

ation

dens

e

dens

e

11

2 2

13 1~σa −~σb

~vG

t

Bromley, J. et al. Adv Neural Inf Process Syst 1994, ed. by Jiang, X.; Wang, P. S. P., 737–744

Page 70: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Contents

29 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Problem Statement

Related Work

Methodology

Evaluation

Conclusion and Future Work

Page 71: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Comparison With Other Metrics

30 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Metric Success Rate Advantage

DISC_MODEL ( 96.48 ± 0.85 )% ( 0.00 ± 0.00 )%STRESS ( 93.49 ± 0.86 )% ( 2.99 ± 1.01 )%COMB ( 92.76 ± 1.03 )% ( 3.71 ± 1.22 )%

10-fold Cross validation via random sub-samplingSTRESS was compared for best scaleCOMB weights were fitted to training data set

Welch, E.; Kobourov, S. Comput Graph Forum 2017, 36, 341–351

Huang, W. et al. J Vis Lang Comput 2013, 24, 262–272

Page 72: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Comparison With Other Metrics

31 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

−1 0 +1

COMBSTRESS

Page 73: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Significance of Individual Syndromes

32 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Property Sole Exclusion Sole Inclusion

PRINCOMP1 ( 96.37 ± 0.84 )% ( 55.51 ± 6.50 )%PRINCOMP2 ( 96.20 ± 0.76 )% ( 61.08 ± 5.24 )%EDGE_LENGTH ( 96.33 ± 0.59 )% ( 71.65 ± 3.38 )%ANGULAR ( 96.40 ± 0.34 )% ( 77.79 ± 6.06 )%RDF_GLOBAL ( 95.92 ± 0.94 )% ( 86.37 ± 3.43 )%TENSION ( 96.83 ± 0.31 )% ( 89.78 ± 0.95 )%RDF_LOCAL ( 90.04 ± 2.04 )% ( 94.78 ± 1.60 )%

Baseline Using All Properties ( 96.48 ± 0.85 )%

Note that RDF_LOCAL refers to a whole set of syndromes.

Page 74: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Contents

33 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Problem Statement

Related Work

Methodology

Evaluation

Conclusion and Future Work

Page 75: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Conclusion and Future Work

34 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Binary discrimination instead of absolute aesthetic measureAvoid a priori assumptions about influence on aestheticsUse of statistical syndromes inspired by Statistical Physics andCrystallographyData driven approach (machine learning)Accuracy usually outperforms other metricshttps://github.com/5gon12eder/msc-graphstudy

Identification of necessary and sufficient syndromesOptimization of the neural networkValidation against human-labeled data

Page 76: Aesthetic Discrimination of Graph Layouts - Moritz ...klammler.eu/data/computer-science/kit/msc/slides-gd18.pdf · 1 September2018 -AestheticDiscriminationofGraphLayouts M.Klammler

Bibliography

35 September 2018 - Aesthetic Discrimination of Graph Layouts M. Klammler · T. Mchedlidze · A. Pak

Bromley, J.; Guyon, I.; LeCun, Y.; Säckinger, E.; Shah, R. Adv Neural Inf Process Syst1994, ed. by Jiang, X.; Wang, P. S. P., 737–744.

Huang, W.; Eades, P.; Hong, S.-H.; Lin, C.-C. J Vis Lang Comput 2013, 24, 262–272.

Kamada, T.; Kawai, S. Inf Process Lett 1989, 31, 7–15.

Klammler, M. Aesthetic value of graph layouts: Investigation of statisticalsyndromes for automatic quantification., Master’s thesis, Karlsruhe Institute ofTechnology, 2018.

Klammler, M. et al. Source Code for Aesthetic Discrimination of Graph Layouts.,2018.

Klammler, M.; Mchedlidze, T.; Pak, A. Aesthetic Discrimination of Graph Layouts.,2018.

Welch, E.; Kobourov, S. Comput Graph Forum 2017, 36, 341–351.