A Simple Visualization Method for Three-Dimensional (3D) Network

,


Introduction
e network is a vital concept to understand modern society structure and components of the society. e concept of the network has been applied not only to people but also to social network [1][2][3][4][5][6][7], biological network [8][9][10][11][12], metabolic regulation network [13], online social network [14,15], sports social network [16,17], structure of neural network [18][19][20], etc. As a result, the data for storing network information has become complex and diverse. In addition, the need to make complex data more recognizable has been essential, and efforts to meet such demands continue to this day. erefore, a medium called a network diagram has emerged, which has become essential to understand network information. Network diagrams have appeared in various forms in two-dimensional (2D) and three-dimensional (3D) space. In addition, various methods and programs for drawing such diagrams or visualizing network information have appeared and developed. In 2D space, the classical algorithm to draw the network automatically is the force-directed algorithm using the straight edges as springs [21]. is algorithm draws aesthetic graphs using only the information of a given graph. Teja and Yemula [22] modified and improved the force-directed algorithm to solve the limitation of the algorithm. Another algorithm for drawing graphs is stress majorization [23], which is widely used. Recently, the authors in [24] proposed an improved stress majorization method. Moreover, this method has an advantage that there is no need to solve the optimization problem with constraints. However, it is not easy to grasp the network in 2D space, and there are needs for the network plot in 3D space.
ere are various tools and techniques for network visualization in 3D space. e author in [25] used a Javabased tool called CAVALIER (Communication and Activity VisuALIsation for the EnterRprise) to analyze the social network. In addition, the spring-embedding and alternative layout algorithm was introduced for network visualization. Ho et al. [26] studied the interactions between proteins in 3D diagrams. ese visualizations help users to understand the biological process and relationships easily. In [27], the authors proposed a novel visualization tool named Arena3D that could address large scale and complex networks. ey demonstrated the utility of Arena3D using network data relevant to Huntington disease. Paananen and Wong [28] presented a new visualization method based on real-time 3D forcedirected graphs that can be used to discover new knowledge in the data. ey also created and used a software tool which is called FORG3D. By using the given genomic data, they proved the functionality of FORG3D to visualize and explore unified genome-scale data. In [29], the authors developed the evidence network visualization algorithm with the exploration of covariate distribution for network meta-analysis (NMA) in 3D.
is algorithm extended the z-axis to the generic 2D network to display the covariate bars for each trial, placing the covariate bars for each information data at the edge between the nodes involved.
In this article, we present a simple method with weight of information data to visualize the network diagram for 3D, and the rotatable 3D network diagram can be obtained to analyze data more easily. While the proposed method is an extension of the method applied in 2D [30], it is further improved in terms of the simplicity of the algorithm. In general, the problem is solved in a regular structure [31][32][33][34][35][36]; however, we visualized the network using the importance of information and concept of distance in the unstructured place. Furthermore, the position of nodes is relocated by minimizing an objective function which consists of repulsive and attractive energies. e gradient descent method is applied to minimize the objective function.
erefore, an optimal network diagram to the given data is obtained. e proposed method has advantages over other methods for visualizing networks in terms of simplicity. e composition of this paper consists of the following order. Section 2 describes the proposed algorithm in detail. In Section 3, to demonstrate the performance of the proposed algorithm, 3D network diagram visualizations of the relationship of characters in two novels are presented. Finally, conclusions are made in Section 4.

Simple Network Visualization Algorithm.
e purpose of the proposed algorithm for network visualization in 3D is to find optimal node positions X � X 1 , X 2 , . . . , X N which minimize the following objective function: where w ij is the normalized weight of the relationship between nodes X i and X j and Ψ(w) is defined as Ψ(w) � 1 if w > 0; otherwise, Ψ(w) � 0. In addition, c is the strength parameter that keeps X i and X j away from each other. For the simplicity, 0 ≤ w ij ≤ 1 is assumed. e distance function d ij for w ij can be used as follows [30]: where q is a nonnegative constant, and then, d ij ≥ 1. Let D max and D min be the maximum and minimum distances, respectively. en, by the definition of the normalized weight, D min � 1, and for a given D max value, the nonnegative constant q is defined as follows: where min W is the minimum positive value of w ij , i.e., min W � min 1≤i,j≤N For example, if min W � 0.5 and D max � 3, then q is obtained approximately as follows: Figure 1 shows the distance function d ij using given normalized weight w ij and maximum distance D max values.
Let X n 1 , X n 2 , . . . , X n N be the set of positions of given nodes at iteration n. Figure 2 shows the effect of the first term of the objective function E. ere are two possible cases of forces at nodes X n i and X n j : repulsive force when |X n i − X n j | < d ij and attractive force when |X n i − X n j | > d ij . e second term of the objective function E produces the mutual repulsive forces between X n i and X n j , see Figure 3. e effect of this force places nodes with low weight outward in the network. In other words, nodes with small weights are positioned outside the main network diagram. en, we relocate the position of the node points as where Δt is an artificial temporal step and (zE/zX i ) is the differentiation of equation (1) with respect to X i , i.e., Once the positions of the nodes are renewed, then the network diagram is plotted automatically. e iterative process will be terminated if the process reaches an equilibrium state, i.e., for n ≥ N t and for some N t . For example, let us consider four points X 1 , X 2 , X 3 , and X 4 . Furthermore, assume that the weighting matrix W between X i and X j is given as Let the matrix W be redefined by dividing all the elements of W by the largest value among the elements of the given W. at is, Figure 1: Illustration of distance function d ij using the normalized weighting value w ij of the relationship between nodes X i and X j . Here, q � − (ln(D max )/ln(min W)).  Figure 2: Two possible forces at nodes X n i and X n j : (a) repulsive force when Discrete Dynamics in Nature and Society 3 We take D max � 4 and get q � 1.2619 because min W � (1/3): Let X 0 1 � (0, 0, 0), X 0 2 � (1, 0, 0), X 0 3 � (0, 1, 0), and X 0 4 � (0, 0, 1) be the initial positions of four nodes, where the superscript 0 denotes the starting index. We use Δt � 0.2, c � 0.01, and tol � 0.001. In Figure 4, the node markers and edges are depicted by sphere and gray lines, respectively. Here, the red and blue spheres mean initial and after 1 iteration positions, respectively. Figure 4(a) shows the initial state consisting of four points with red spheres and gray edges of linked nodes using scaled W. Note that the values of each element of W are represented by the thickness of connecting lines in the diagram. In Figure 4(b), black arrows indicate the force direction acting on each node. e red arrows in Figure 4(c) are net force vectors F 0 1 , F 0 2 , F 0 3 , and F 0 4 . Using net force vectors, we update the positions of nodes as follows: Figure 4(d) shows the network diagrams after 1 iteration. e nodes are initially located in a tetrahedron, and the network diagram is drawn according to the given weights.
So far we have only considered the positions of nodes, now we discuss the visualization of nodes and edges. In general, nodes and edges are visualized as unit sphere shape and straight lines with a fixed thickness. We visualize the size of the nodes S i and the thickness of edges T ij according to the weight W of each node as follows: where s and t are positive constants. Characters with relatively high activity are indicated by larger nodes; meanwhile, relatively intimate relationships are depicted by thicker edges.

Numerical Results
Numerical simulations are conducted to demonstrate the performance of the proposed algorithm and to visualize the relationship examples of characters in two novels in the 3D network diagram. e first example is " e Venice Merchant" and the second example is "Romeo and Juliet," which are William Shakespeare's representative plays. e elements of the weighting matrix are set based on the number of conversations between the characters in each novel.
In the first novel, let N � 19 of the characters to make the weighting matrix W, which is provided in Appendix. Each element w ij of W means the cumulative number of dialogues between characters X i and X j . e parameters are given as Δt � 0.2, c � 0.01, D max � 5, and tol � 0.001. en, q ≈ 0.4363 is obtained. As shown in Figure 5, the motion of nodes and edges can be observed from the initial state where the nodes are randomly located until the optimal network diagram is found by applying the proposed algorithm repeatedly. e proposed algorithm for " e Venice Merchant" data reached the equilibrium state at 828 iterations. Figure 6 shows a diagram of the network in the equilibrium of the iterative algorithm for " e Venice Merchant" dataset.
e equilibrium state means that all nodes are properly located according to the weights of a given network.    Assortativity refers to the tendency of nodes in a network being connected with similar sized nodes. erefore, highly assortativity networks are clearly shown to have a core periphery structure between nodes with large and small sizes. ese characteristics mean that the basic structure of the interaction that makes up the story of the novel is centered on the main characters. Figure 6, therefore, shows that " e Venice Merchant" has a high assortativity, that is, a novel property that revolves around the main character. As the nodes move, we can confirm that the objective function E decreases, as shown in Figure 7. As a second example, let N � 26 of the characters to set the weighting matrix W which is based on the number of conversations between 26 characters in "Romeo and Juliet." is data is provided in Appendix. e parameters are given as D max � 5 and tol � 0.001, and then, the value of q is about 0.3652. In addition, time step Δt � 0.2 and c � 0.01 are used. Figure 8 shows the process of finding the optimal network plot by applying the proposed algorithm. e proposed algorithm for "Romeo and Juliet" data reached the equilibrium state at 617 iterations. Figure 9 shows the network plot of the equilibrium state of the iterative algorithm for the "Romeo and Juliet" dataset. From the results, we can quickly and easily grasp the relationship among characters and see the high assortativity. Furthermore, we can confirm that the objective function E decreases and converges during the process of finding the optimal position for all nodes. Figure 10 depicts the decreasing of the objective function.

Conclusion
We proposed a simple method for 3D network diagrams in this article. e proposed method had the advantage of being drawn only with information from a given network. We used the distance function based on the network information and objective function. To minimize the proposed objective function, we used the gradient descent method and confirmed the energy dissipation. According to the given relationship, the network diagrams own various characteristics: (i) different sizes of nodes and (ii) different thickness of edges. rough specific examples, we have known that these features help us to grasp network information at a glance. Furthermore, our algorithm is simple to understand and implement. Finally, the MATLAB source code of our algorithm is provided for the interested readers to try.
Social distancing and contact tracing can contribute to curbing the spread of the COVID-19 virus. Research on   Discrete Dynamics in Nature and Society SARS-COV-2 transmission control strategies in actual social networks using GPS or mobile data is actively being conducted. In future works, we plan to use the proposed algorithm to present a contact network diagram. Using this diagram, we can visualize the contact network for the dynamics of the COVID-19 spreading.

Appendix
In this appendix, we provide the MATLAB source codes of the proposed algorithm for novel data as " e Merchant of Venice" and "Romeo and Juliet," and Table 1 describes each character name and corresponding node number. e source code is available on the following website: http:// elie.Korea.ac.kr/∼cfdkim/codes/.

Data Availability
We have released the code and data of this paper in the Appendix and the corresponding author's homepage.

Conflicts of Interest
e authors declare that they have no conflicts of interest.