Elsevier

Computers & Graphics

Volume 47, April 2015, Pages 24-33
Computers & Graphics

Technical Section
An advanced pre-positioning method for the force-directed graph visualization based on pagerank algorithm

https://doi.org/10.1016/j.cag.2014.10.001Get rights and content

Highlights

  • We take the importance degree of the vertices into consideration.

  • We propose a variant of the PageRank algorithm to calculate the importance degree for undirected graphs.

  • We propose a model to calculate the coordinates of center vertices.

  • We preposition the vertices according to the importance degree.

Abstract

Graph visualization techniques aim to help users obtain deep insights about the structure and evolution of graphs through minimizing visual confusion and real-time updating of the drawing. This demands high effectiveness of the drawing algorithms to produce layout of graphs with few edge crossings. However, the classical force-directed algorithms fail to satisfy this requirement. In this paper, we solve this problem by using a novel and heuristic pre-positioning method based on a variant of the PageRank algorithm. In our algorithmic framework, five models are proposed to calculate the importance degree of each vertex, the relation matrix of the vertices, the layer each vertex belongs to, the available placing coordinates and the matching coefficient between a vertex and a position. After the pre-positioning procedure of each layer, the classical force-directed algorithm is used to calculate the final position of each vertex. Experimental results have shown that our approach can reduce the computing time as well as the number of edge crossings.

Introduction

Graphs have become one of the most widely used models to represent structural information as diagrams. In order to communicate information contained in the graph clearly, graph visualization has become a fast growing research area. Typically, graph visualization aims at visualizing the abstract data to reinforce human cognition. It has a broad application domain including scientific computing, network analysis, bioinformatics and network security.

As Purchase et al. described in their literature, the process of human understanding was in close relation to the quality of the final layout [1], [2]. A good layout of graph can show the underlying relationships between the entities clearly, so that the readers can understand the information contained in the graph quickly. In contrast, a bad layout can make the structure of the graph confusing, and the readers will get a poor graph reading experience with more time spent. Empirical experiments performed by Purchase has shown that reducing the number of edge crossings is the key to getting a good layout as well as increasing the understandability of the graph [3].

In order to map the relational data structure as graphs, many graph layout algorithms have been proposed. Due to the ability to produce graphs in an aesthetically pleasing way, the force-directed graph drawing algorithms [4], [5] are the most widely used. A typical force-directed graph drawing algorithm, like Eades’ spring embedder, treats a graph as a mechanical system in which vertices are represented as steel rings and edges are represented as springs [6]. In this system, repulsive forces exist between any two vertices and attractive forces exist between two connected vertices. When the spring length is longer than the natural length, vertices are together; otherwise, vertices are pushed apart. In this way, the repulsive forces nullify the attractive forces so that two connected vertices maintain perfect distance to each other. After the vertices are placed at randomly chosen positions, the repulsive and attractive forces act on these vertices, and they are forced to move in the direction of the total force. However, the force-directed algorithms are very computing expensive because iterations are needed to find a minimal energy state. In addition, the final drawings often have lots of edge crossings which will reduce the readability [7]. Thus, the demand for high effectiveness of the graph drawing algorithms to produce comprehensible graphs in a short time cannot be satisfied.

In addition to the existing online visualization software [8], [9], [10], [11], many algorithms have been proposed to improve the performance of the force-directed algorithms. Koren used the spectral approach to reduce the time consumption and optimize the layout within a small vector space [12]. Tominski et al. combined dynamic filtering, graph lenses, and edge-based navigation to support different visualization tasks so as to improve the interactivity [13]. Shamir and Stolpnik presented the notion of visual queries as a graphical interface to visualize and interact with multivariate graphs [14]. They displayed the result in a pop-up view to promote view consistency. To visualize small world graph, van Ham and van Wijk proposed a method combined with both semantical and geometrical distortions [15]. For large graphs, Hosobe used high-dimensional approach to allow users to focus on interesting parts of graphs [16]. In order to reduce the edge crossings, Six and Tollis proposed an algorithm to produce drawings with low edge crossings first, then they used a postprocessing step to visit each vertex and determine whether the crossings could be reduced by moving that vertex next to one of its neighbors [17].

Exploring the convergence of the algorithms is also an important aspect of the force-directed methods. Gansner et al. introduced the majorization approach in the framework of graph layout [18]. They combined three extensions to the stress function of Kamada and Kawai [19] and speeded up the convergence rate by monotonically decreasing the stress until convergence. Hua et al. proposed a pre-positioning method to reduce the convergence time [20]. They precalculated the position of all the vertices according to the number of edge crossings each vertex had with other vertices before applying a force-directed algorithm.

In this paper, we propose an advanced pre-positioning method to reduce the time consumption and the number of edge crossings. In our algorithmic framework, we use a variant of the PageRank link analysis algorithm, which is called VertexRank, to calculate the weight of the vertices in the graph. The center vertices, which have local maximal weight, are positioned first. The other vertices are classified into different layers depending on the number of connecting edges to the upper layer. Then, the relation matrix of the vertices is calculated. After that, the available positions for the vertices in each layer are calculated and the layer vertices are placed according to their matching coefficient with these positions. At last, the classical force-directed algorithm is applied to determine the final position of the vertices in each layer. Experimental results have shown that our approach can reduce both the number of edge crossings and time consumption. In addition, the number of edge crossings of our approach is more stable than the classical method.

The rest of this paper is organized as follows. In Section 2, we briefly review the related work about the graph drawing algorithms. Section 3 describes our pre-positioning approach, followed by Section 4, where experimental results are shown. In Section 5, we present the conclusion of this paper with topics for future work.

Section snippets

Related work

The force-directed algorithm has a long history of development. In addition to its simplicity, it has good flexibility as well as strong theoretical foundations.

The first graph drawing algorithm was proposed by Tutte [21]. The objective of this algorithm is to produce crossings-free drawings for graphs. Though the positions for vertices can be easily found by solving a system of linear functions, the resulting drawings often have poor vertex resolution. After that, Eades proposed a more

Our approach

This section describes the details of our approach. Fig. 1 illustrates our algorithmic framework. First, we calculate the importance degree for each vertex in the Weight Calculating Model. Then, in the Center Vertices Selecting Model, we sort the center vertices by the weight scores. Next, in the Layer Vertices Selecting Model, the other vertices are classified into different layers, and their relationships are calculated in the Relation Matrix Calculating Model. At last, the final positions

Experimental results

This section contains several examples that demonstrate the advantages of our pre-positioning method. Experiments are carried out using Windows 7 on an Intel Core i5-2400 at 3.10 GHz and 2.00G RAM. We use the source code provided by the University of Chicago2 to present the results of the classical method [22]. Our purpose is to produce layout of graphs with less edge

Conclusions and future work

In this paper, we have presented an advanced pre-positioning approach for the force-directed graph layout algorithm, and it can be used by visual analysis tools to visualize graphs. First, we use a variant of the PageRank algorithm to pre-calculate the position for each vertex, then, the classical force-directed graph layout algorithm is used to produce the final layout. The experimental results have proved that our approach can reduce the computing time as well as the number of edge crossings.

Acknowledgments

This work was supported in part by the National Natural Science Foundation of China under Grant 61163059 as well as the National High Technology Research and Development Program of China under Grant 2012AA011005. The authors would like to thank the reviewers for their helpful comments and constructive suggestions.

References (39)

  • S. Brin et al.

    The anatomy of a large-scale hypertextual web search engine

    Comput Netw ISDN Syst

    (1998)
  • H.C. Purchase et al.

    Empirical evaluation of aesthetics-based graph layout

    Empir Softw Eng

    (2002)
  • Purchase HC. Which aesthetic has the greatest effect on human understanding? In: Proceedings of symposium on graph...
  • Kobourov SG. Spring embedders and force directed graph drawing algorithms. arXiv preprint arxiv:hepth/12013011,...
  • H. Gibson et al.

    A survey of two-dimensional graph layout techniques for information visualization

    Inf Vis

    (2013)
  • P. Eades

    A heuristic for graph drawing

    Congr Numer

    (1984)
  • V. Batagelj et al.

    Pajek—analysis and visualization of large networks

    Graph Draw

    (2002)
  • J. Ellson et al.

    Graphviz—open source graph drawing tools

    Graph Draw

    (2002)
  • Heer J, Boyd D. Vizster: visualizing online social networks. In: Proceedings of IEEE symposium on information...
  • Cited by (0)

    This article was recommended for publication by Prof. M. Chen.

    1

    The first author and the second author contributed equal to this paper.

    View full text