Aesthetic Discrimination of Graph Layouts

  • Moritz Klammler
  • Tamara MchedlidzeEmail author
  • Alexey Pak
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11282)


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

The full version of the paper including the appendix with additional illustrations is available at


Graph drawing Graph drawing aesthetics Machine learning Neural networks Graph drawing syndromes 


  1. 1.
    Barbosa, H.J.C., Barreto, A.M.S.: An interactive genetic algorithm with coevolution of weights for multiobjective problems. In: Spector, L., Goodman, E.D., Wu, A., Langdon, W.B., Voigt, H.M. (eds.) An Interactive Genetic Algorithm With Co-evolution of Weights for Multiobjective Problems, GECCO 2001, pp. 203–210. Morgan Kaufmann Publishers Inc. (2001)Google Scholar
  2. 2.
    Boisvert, R.F., Pozo, R., Remington, K., Barrett, R.F., Dongarra, J.J.: Matrix market: a web resource for test matrix collections. In: Boisvert, R.F. (ed.) Quality of Numerical Software: Assessment and enhancement, pp. 125–137. Springer, Heidelberg (1997). Scholar
  3. 3.
    Bromley, J., Guyon, I., LeCun, Y., Säckinger, E., Shah, R.: Signature verification using a “Siamese" time delay neural network. In: Advances in Neural Information Processing Systems, pp. 737–744 (1994). Scholar
  4. 4.
    Dev, K., Villar, N., Lau, M.: Polygons, points, or voxels?: Stimuli selection for crowdsourcing aesthetics preferences of 3d shape pairs. In: Gooch, B., Gingold, Y.I., Winnemoeller, H., Bartram, L., Spencer, S.N. (eds.) Proceedings of the symposium on Computational Aesthetics, CAE 2017, Los Angeles, California, USA, pp. 2:1–2:7. ACM (2017).
  5. 5.
    Eades, P.: A heuristic for graph drawing. Congr. Numer. 24, 149–160 (1984)MathSciNetGoogle Scholar
  6. 6.
    Eades, P., Hong, S., Nguyen, A., Klein, K.: Shape-based quality metrics for large graph visualization. J. Graph Algorithms Appl. 21(1), 29–53 (2017). Scholar
  7. 7.
    Findenegg, G.H., Hellweg, T.: Statistische Thermodynamik, 2nd edn. Springer, Darmstadt (2015). Scholar
  8. 8.
    Fredrickson, B.L.: What good are positive emotions. Rev. Gen. Psychol. 2, 300–319 (1998)CrossRefGoogle Scholar
  9. 9.
    Fruchterman, T.M.J., Reingold, E.M.: Graph drawing by force-directed placement. Softw. Pract. Exper. 21(11), 1129–1164 (1991). Scholar
  10. 10.
    Hachul, S., Jünger, M.: Drawing large graphs with a potential-field-based multilevel algorithm. In: Pach, J. (ed.) GD 2004. LNCS, vol. 3383, pp. 285–295. Springer, Heidelberg (2005). Scholar
  11. 11.
    Hahnloser, R.H.R., Sarpeshkar, R., Mahowald, M.A., Douglas, R.J., Seung, H.S.: Digital selection and analogue amplification coexist in a cortex-inspired silicon circuit. Nature 405, 947–951 (2000). Scholar
  12. 12.
    Huang, W., Eades, P.: How people read graphs. In: Hong, S. (ed.) Asia-Pacific Symposium on Information Visualisation, APVIS 2005, pp. 51–58, Australia, Sydney (2005)Google Scholar
  13. 13.
    Huang, W., Eades, P., Hong, S.H., Lin, C.C.: Improving multiple aesthetics produces better graph drawings. J. Vis. Lang. Comput. 24(4), 262–272 (2013). Scholar
  14. 14.
    Huang, W., Hong, S., Eades, P.: Effects of crossing angles. In: IEEE VGTC Pacific Visualization Symposium 2008, PacificVis 2008, Kyoto, Japan, pp. 41–46 (2008).
  15. 15.
    Huang, W., Huang, M.L., Lin, C.C.: Evaluating overall quality of graph visualizations based on aesthetics aggregation. Inf. Sci. 330, 444–454 (2016)., SI: Visual Info CommunicationCrossRefGoogle Scholar
  16. 16.
    Huang, W., Huang, M.: Exploring the relative importance of crossing number and crossing angle. In: Dai, G., et al. (eds.) Proceedings of the 3rd International Symposium on Visual Information Communication, VINCI 2010, pp. 1–8, ACM (2010).
  17. 17.
    Kamada, T., Kawai, S.: An algorithm for drawing general undirected graphs. Inf. Process. Lett. 31(1), 7–15 (1989). Scholar
  18. 18.
  19. 19.
    Klammler, M.: Aesthetic value of graph layouts: investigation of statistical syndromes for automatic quantification. Master’s thesis, Karlsruhe Institute of Technology (2018).
  20. 20.
    Klammler, M., et al.: Source code for aesthetic discrimination of graph layouts.
  21. 21.
    Kohavi, R.: A study of cross-validation and bootstrap for accuracy estimation and model selection. In: Proceedings of the 14thInternational Joint Conference on Artificial Intelligence, IJCAI 1995, Montréal Québec, Canada, vol. 2, pp. 1137–1145. Morgan Kaufmann (1995)Google Scholar
  22. 22.
    Kwon, O.H., Crnovrsanin, T., Ma, K.L.: What would a graph look like in this layout? A machine learning approach to large graph visualization. IEEE Trans. Vis. Comput. Graph. 24(1), 478–488 (2018). Scholar
  23. 23.
    Masui, T.: Evolutionary learning of graph layout constraints from examples. In: Szekely, P.A. (ed.) Proceedings of the 7th Annual ACM Symposium on User Interface Software and Technology, pp. 103–108. UIST 1994. ACM (1994).
  24. 24.
    Nishiyama, M., Okabe, T., Sato, Y., Sato, I.: Sensation-based photo cropping. In: Gao, W., et al. (eds.) Proceedings of the 17th ACM International Conference on Multimedia. pp. 669–672. MM 2009, ACM (2009).
  25. 25.
    Norman, D.A.: Emotion & design: attractive things work better. Interactions 9(4), 36–42 (2002). Scholar
  26. 26.
    Press, W., Teukolsky, S., Vetterling, W., Flannery, B.: Numerical Recipes: The Art of Scientific Computing, 3 edn. Cambridge University Press (2007)Google Scholar
  27. 27.
    Prusinkiewicz, P., Lindenmayer, A.: The Algorithmic Beauty of Plants. Springer, New York (1990). Scholar
  28. 28.
    Purchase, H.: Which aesthetic has the greatest effect on human understanding? In: DiBattista, G. (ed.) GD 1997. LNCS, vol. 1353, pp. 248–261. Springer, Heidelberg (1997). Scholar
  29. 29.
    Purchase, H.C.: Performance of layout algorithms: comprehension, not computation. J. Vis. Lang. Comput. 9(6), 647–657 (1998). Scholar
  30. 30.
    Purchase, H.C., Cohen, R.F., James, M.: Validating graph drawing aesthetics. In: Brandenburg, F.J. (ed.) GD 1995. LNCS, vol. 1027, pp. 435–446. Springer, Heidelberg (1996). Scholar
  31. 31.
    Purchase, H.C., Hamer, J., Nöllenburg, M., Kobourov, S.G.: On the usability of Lombardi graph drawings. In: Didimo, W., Patrignani, M. (eds.) GD 2012. LNCS, vol. 7704, pp. 451–462. Springer, Heidelberg (2013). Scholar
  32. 32.
    Rosete-Suarez, A., Sebag, M., Ochoa-Rodriguez, A.: A study of evolutionary graph drawing: laboratoire de Recherche en Informatique (LRI), Universite Paris-Sud XI, p. 1228. Technical report (1999)Google Scholar
  33. 33.
    dos Santos Vieira, R., do Nascimento, H.A.D., da Silva, W.B.: The application of machine learning to problems in graph drawing – a literature review. In: Proceedings of the 7th International Conference on Information, Process, and Knowledge Management,eKNOW 2015, Lisbon, Portugal, pp. 112–118 (2015)Google Scholar
  34. 34.
    Schaefer, S., McPhail, T., Warren, J.: Image deformation using moving least squares. ACM Trans. Graph. 25(3), 533–540 (2006). Scholar
  35. 35.
    Scott, D.W.: On optimal and data-based histograms. Biometrika 66(3), 605–610 (1979). Scholar
  36. 36.
    Shannon, C.E.: A mathematical theory of communication. Bell Syst. Tech. J. 27(4), 623–656 (1948). Scholar
  37. 37.
    Spönemann, M., Duderstadt, B., von Hanxleden, R.: Evolutionary meta layout of graphs. In: Dwyer, T., Purchase, H., Delaney, A. (eds.) Diagrams 2014. LNCS (LNAI), vol. 8578, pp. 16–30. Springer, Heidelberg (2014). Scholar
  38. 38.
    Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., Salakhutdinov, R.: Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 15(1), 1929–1958 (2014)MathSciNetzbMATHGoogle Scholar
  39. 39.
    Tamassia, R.: Handbook of Graph Drawing and Visualization. Discrete Mathematics and Its Applications. CRC Press (2013)Google Scholar
  40. 40.
  41. 41.
    Tractinsky, N., Katz, A.S., Ikar, D.: What is beautiful is usable. Interact. Comput. 13(2), 127–145 (2000). Scholar
  42. 42.
    Ware, C., Purchase, H.C., Colpoys, L., McGill, M.: Cognitive measurements of graph aesthetics. Inf. Vis. 1(2), 103–110 (2002). Scholar
  43. 43.
    Welch, E., Kobourov, S.: Measuring symmetry in drawings of graphs. Comput. Graph. Forum 36(3), 341–351 (2017). Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  • Moritz Klammler
    • 1
  • Tamara Mchedlidze
    • 1
    Email author
  • Alexey Pak
    • 2
  1. 1.Karlsruhe Institute of TechnologyKarlsruheGermany
  2. 2.Fraunhofer Institute of Optronics, System Technologies and Image ExploitationKarlsruheGermany

Personalised recommendations