Abstract
Networks that contain a hierarchical structure—networks in which certain nodes and groups of nodes can be classified through a relation of precedence—are ubiquitous in structures observed in various fields, including domains as different as firm ownership relations, scientific collaboration, and protein interaction chains (Clauset, Moore, and Newman 2008; Girvan and Newman 2002; Grabowski and Kosiński 2004; López, Mendes, and Sanjuán 2002; Mani and Moody 2014; Newman 2006). In this article, we contribute to social network analysis and data visualization in sociology (Correa and Ma 2011; Freeman 2000, 2005; Healy and Moody 2014; Krempel 2009; Moody, McFarland, and BenderdeMoll 2005) through a novel algorithm for visualizing hierarchical networks. In developing this method of visualization, we aim to simultaneously represent the positions of different nodes and the relationships between groups containing the nodes in the network. We illustrate, through substantive examples, that the algorithm we develop is an effective tool in the exploration and presentation of hierarchical networks. Although we focus on the visualization of social networks, the algorithm we develop is general and can be used to study networks outside the domain of sociology.
Our motivation in developing a new method to visualize hierarchical social networks is threefold. First, at the most general level, we believe that visualization is an essential aspect of scientific practice (Arnheim 1969; Taylor 1966) and that it complements measurement as well as algebraic methods (Diestel 2005; Gibbons 1985; Harary 1969; Newman, Barabási, and Watts 2006) in the exploration and explanation of patterns (Brandes, Kenis, and Raab 2006; Crosby 1997; Tufte 2001). Visualization has a long tradition in social network analysis (Freeman 2000), going back to Moreno’s (1932, 1934) work during the 1930s and his use of sociograms to represent connections among various actors. Over the years, visualization has developed in tandem with social network analysis. Some of the most illuminating applications of visualization, such as Kadushin’s (1974) work on intellectual elites and Freeman and White’s (1993) use of Galois lattices, were concerned with simultaneous representation of social positions and social groups. Second, as we illustrate below, the simultaneous visualization of a social network and the hierarchical structure of the network is an effective tool in capturing the complex interplay between social positions, groups, and the relationships among groups. Third, at the most practical level, we aim to understand the structure of financial networks around the world. The method we employ to examine groups and positions of different financial actors is cohesive blocking (Moody and White 2003; White and Harary 2001), which provides a rich set of information on the structural cohesion and embeddedness patterns in financial networks. In our experience, visualization is an indispensable tool in understanding and explaining the multidimensional structure of networks revealed by the cohesive blocking analysis.
The technique we develop in this article builds on a voluminous literature in computer science and social network analysis (Ahajjam, El Haddad, and Badir 2018; Holten 2006; Nikolaev, Razib, and Kucheriya 2015). Harel (1988) is one of the first works to formalize the simultaneous representation of a relation between nodes and structural relations between sets of nodes in a graph. Since then, various authors have offered solutions such as elastic hierarchies (Storey and Muller 1995) and hierarchical multiperspective views (Zhao, McGuffin, and Chignell 2005) to this visualization problem. A recent influential approach is hierarchical edge bundling (Holten 2006), which bends and groups adjacency relations by inclusion relations among sets of nodes in a graph. Edge bundling in radial layouts is particularly effective in representing large graphs, and it has already found sophisticated application in social network analysis (Crnovrsanin et al. 2014). Our contribution differs from these approaches in its emphasis on representing inclusion and exclusion relations that are essential to understanding the structure of a social network without losing sight of the overall distribution of relations among nodes. As we show, the method we offer is particularly effective in visualizing hierarchical graphs produced by techniques such as
Throughout this article, we use several conventions to refer to the various objects under consideration. We define a graph
In analyzing hierarchical networks, we restrict our focus to hierarchies in which the relationship is containment. Thus, the nodes of the hierarchy (i.e., supernodes) in a branch are distinct. For two nodes that are related to each other, one of them is a strict subset of the other. We refer to the primary network as
This article is structured as follows. We first describe the cohesive blocking technique, a network analysis method for which this visualization is particularly helpful. The next section describes the layout algorithm in detail. In the following section we present several examples that illustrate the visualization technique at work. The final section concludes the article with a discussion of the uses of this technique and avenues for further research.
Cohesive Blocking
Social structure as the patterned “crystallization of relationships”—and, once crystallized, a sui generis entity shaping social action—is a fundamental notion in sociology (Durkheim [1893] 1964; Giddens 1979; Lizardo 2010; Martin 2009:1–2; Simmel [1908] 1950:94–95). Cohesive blocking (Moody and White 2003) is a technique to formally analyze social structures through social network data. This technique builds on two concepts with deep roots in sociological thought, social cohesion—the binding of social actors into a collectivity (Durkheim 1964; Fantasia 1988; Hechter 1987; Meyer and Kimeldorf 2015; Simmel [1922] 1964)—and embeddedness (Granovetter 1985; Zukin and DiMaggio 1990). Classical sociologists such as Durkheim (1964), Weber (1978), and Tönnies ([1887] 1957) emphasized the structural, ideational, and affective elements in their approaches to social cohesion. The problem is that these different dimensions of social cohesion are analytically separate and can at times exercise effects in opposite directions. Instead of such an approach, Moody and White (2003) focused on structural cohesion by defining it through the relational togetherness of a group. Apart from gains in analytical precision, such a focus also enables an effective correspondence between the substantive sociological idea (i.e., relational togetherness) and the mathematical formalism used to examine social cohesion. The key to this effective correspondence is Menger’s theorem.
Menger’s theorem states that there is a crucial relationship between the number of nodes separating any two nodes
The mathematical formalism of graph connectivity, encapsulated in Menger’s theorem and its extensions by various authors, offers a rich opportunity to express the concept of social cohesion with reference to the cohesion of a social structure. Namely, as Moody and White (2003:109) suggested, the concept of structural cohesion can be defined with reference to the minimum number of nodes that constitute a cutset and the minimum number of “independent relational paths” connecting any pair of nodes in a social structure. Then, each set of nodes with
It can be shown that the nestedness of such groups, the
The tree structure obtained by the cohesive blocking technique can be illustrated with the karate club social network of Zachary (1977). The karate club social network data come from Zachary’s ethnographic research on the interactions between members of a voluntary karate club. In this network, each tie represents two members who interact on a repeated basis outside the club itself (see Figure 1). In the original study, Zachary studied the conflict within the club between the karate instructor (node 1) and the club president (node 34) by assigning a numerical value (“capacity”) to each tie on the basis of the number of distinct contexts in which two individuals interact. Zachary used the maxflow-mincut algorithm of Ford and Fulkerson (1962) to predict the constituents of each faction after the eventual division of the club. The cohesive blocking technique does not use the flow data, which were crucial in the original study for predicting the different factions of the karate club. Despite this limitation, the cohesive blocking hierarchy generated by this technique can be used profitably to analyze the structural divisions in the karate club. However, such a task requires examining the underlying network data and the density of ties between different members (see Figure 1) in conjunction with the hierarchy tree (see Figure 2). Our goal is to facilitate such analysis by algorithmically combining information from the underlying network data with the information from the hierarchy tree.

The Zachary karate club network.

Cohesive blocks tree for the Zachary karate club.
Layout Algorithm
Our goal is to simultaneously visualize both the hierarchical structure of
Under certain circumstances, these two layout goals, representing the hierarchical structure as well as the underlying network, can conflict. A hierarchy tree in which nodes are related to one another through subset or superset relationship can be directly represented on the Cartesian plane. However, nodes of the underlying network
In these cases, we opt to duplicate nodes that fall into multiple blocks, placing a copy into each block along with that node’s connections to the rest of the network. Admittedly, we are motivated primarily by the cohesive blocking technique, where the cutset nodes are key determinants of structural cohesion (Moody and White 2003). However, we also believe that this approach is sufficiently general because it emphasizes that such nodes play an important bridging role in the network, helping bind otherwise distant branches of the hierarchy. Nonetheless, it should be noted that this approach would break down for networks where such nodes are the rule rather than the exception.
We combine three techniques to simultaneously represent the hierarchical structure as well as the underlying network. First, we use a standard hierarchy visualization algorithm—the “squarified treemap” algorithm (Bruls, Huizing, and Van Wijk 2000)—to partition the visual area for the hierarchy. Second, we use a nesting offset (Johnson and Shneiderman 1991), geometric subsets, and shading to represent hierarchy. Third, we construct and optimize an energy function to lay out network nodes within these partitions. The combination of these techniques produces graphs that reveal how network structure interacts with the hierarchical structure. Below, we discuss the algorithmic details of our approach.
Hierarchy Layout: Treemap
Visualizing complex and multidimensional information such as a hierarchical network requires close attention to several issues. First, space should be used efficiently, which implies that empty areas of the visual representation should be minimized without compromising informational accuracy. Second, the chosen method should offer means to represent the order relationship among the different components of the network in an unequivocal manner. Third, it is often desirable to represent the importance of different components (e.g., size of a network component) in a way that does not hinder the representation of the hierarchical structure.
Meeting all the three requirements is surprisingly hard. The most common way of representing trees as a directed graph growing in a single direction starting from a root node is space inefficient, as can be seen in Figure 2. Furthermore, it is difficult to parse when the tree is large.
Treemaps (Johnson and Shneiderman 1991; Shneiderman 1992; Shneiderman and Wattenberg 2001; Wood and Dykes 2008) offer a solution that meets all of these requirements. Since their introduction (Johnson and Shneiderman 1991), treemaps have become a standard tool for illustrating hierarchically structured information (e.g., file sizes within a hierarchy such as folders on a hard drive), and the popularity of the original algorithm has generated a family of algorithms inspired by the treemap approach. This family of algorithms take as input a tree and recursively partition a visual area into regions whose areas are proportional to the size of their corresponding subtrees. The key idea is to map “the display space into a collection of rectangular bounding boxes representing the tree structure” (Johnson and Shneiderman 1991:284). The most important advantage of the treemap family of algorithms is that they are space filling: these algorithms use all the available two-dimensional space (Shneiderman 1992).
The most basic version of the treemap family of algorithms partitions areas into rectangles. However, such an approach results in rectangles with large aspect ratios: a common problem is the representation of various nodes in the tree as rectangles that are too thin. The “squarified treemap” variant (Bruls et al. 2000) avoids this problem. Squarified treemap algorithm attempts to make the rectangles as square as possible. 3 The advantage of the squarified treemap algorithm is that the bounded rectangles representing tree nodes are much easier to parse and compare.
To represent the hierarchy and thus nestedness of a child supernode in parent supernodes, we go back to the method of nested treemaps in the original study of Johnson and Shneiderman (1991). Nested treemaps represent hierarchy by placing nodes into regions corresponding to the deepest level of the hierarchy in which the nodes occur. A nesting offset and geometric subset relationship become the instruments to mark hierarchy and separation between nodes: deeper levels of the hierarchy are laid out strictly inside the boundaries of their parents. Furthermore, shading of deeper blocks can emphasize hierarchical depth. Although a nesting offset and shading are not strictly necessary for small networks, they become crucial tools as the network grows in size and complexity. Thus, we combine the squarified treemap algorithm with nesting and shading in our visualization algorithm; we place duplicated nodes once at the deepest level of each branch in which they occur.
One disadvantage of the nested offset approach is that nodes deep in the hierarchy have less space assigned to them than nodes near the root. In extreme cases, the offset can reduce the space available to position these nodes to zero. As such we augment the nested treemap algorithm by increasing the “weight” of deeper nodes. By making deep nodes take up more space in the tree, we can ensure that nodes throughout the hierarchy have an equal amount of room available to them in the final layout.
Algorithm 1 gives the general description of our procedure.
4
In the situation presented here, we use the squarified treemap algorithm to lay out
Layout of
Finally, we ensure that all nodes have an equal amount of space after nesting by repeating LAYOUT to calculate appropriate weights
Network Layout: Energy Minimization
Armed with partitions of the display area, we proceed to lay out individual nodes using a modification of a force-directed graph layout algorithm (Davidson and Harel 1996; Fruchterman and Reingold 1991; Kamada and Kawai 1989). We construct an energy function representing two components: the first, repulsion by the boundaries of the partition; the second, forces reflecting the structure of the network.
Formally, energy is a function of node positions in the display area. We denote the position of node
Partition Energy
Each node
This function pushes nodes to the center of the rectangle. Partition energy for the overall graph is the sum of node energies:
Although we define the energy function only for rectangles, the partition energy function trivially extends to other shapes such as circles or toroids. Nonconvex shapes such as toroids, however, perform poorly under stochastic gradient descent.
Network Energy
The second energy component represents the energy embedded in the attractive and repulsive forces of the network. We choose to adopt the Kamada-Kawai energy formulation (Kamada and Kawai 1989). In this model, a spring connects each pair of nodes in the network, with the ideal length of the spring proportional to the shortest-path distance between the nodes and the force of each spring given by Hooke’s law. Writing the position of node
As before, network energy for the overall graph is the sum of node energies:
The two constants
Relative to the Kamada-Kawai algorithm, this adjustment lengthens springs in fully connected and completely connected partitions in the network. This allows dense regions of the network to take up more space.
The overall energy function can then be written as the sum of the energy contributions of each vertex:
To reiterate, energy is a function of the positions of each vertex in
Stochastic Gradient Descent with Backtracking Line Search.
In our experience, backtracking line search is necessary to ensure that nodes do not wander outside of their partitions. Backtracking line search looks for a minimum in the direction of the gradient, looking for the furthest point at which the gradient still approximates the energy function. Starting from an optimistically large step, the algorithm checks whether the decrease in energy is close to that expected by extrapolating the gradient; if it is not, the algorithm checks a closer point. Because the energy function becomes infinite if nodes leave their partitions, backtracking line search avoids putting nodes near boundaries.
Examples
We present four examples of the algorithm at work. In each of these examples, we represent the embeddedness level and cohesion (in that order) on the lower right corner of each cohesive block. First, Figure 3 presents a visualization of cohesive blocks in the karate club network (Zachary 1977). This figure reveals the nested structure of blocks. The highest level block, at depth 0, contains a single unique member (node 12), and all other nodes fall into subblocks. The main branch (see the left half of Figure 2) falls into three blocks along the upper left of the figure, while the smaller branch falls into two blocks along the right of the figure. Notably, node 1, highlighted in green, is part of both branches.

Cohesive blocks in Zachary’s karate club network.
The figure reveals two aspects of the conflict between the instructor and the club president (nodes 1 and 34). First, it reveals the split of the karate club into two factions around nodes 1 and 34. Apart from the most cohesive block at the core of the network, almost all the members are connected to the rest of the network through paths that are structured around either node 1 or node 34. Second, as a corollary, the figure suggests that the instructor and club president have distinct bases of support: while the club president has extensive ties to members just outside the deepest block, the instructor has extensive ties to blocks outside of the main branch of the cohesive block tree.
To be sure, some of the structural divisions in the karate club network can be captured through the simultaneous analysis of the network (see Figure 1) and the hierarchy tree (see Figure 2). For instance, it is clear from Figures 1 and 2 that members 5, 6, 7, 11, 12, and 17 are connected to the rest of the network mainly through the instructor. However, recognizing this pattern requires comparing the different branches of the hierarchy tree to identify the members who belong solely to a single branch of the tree. Furthermore, such a comparison is not always fruitful. For instance, members 13, 18, and 22 belong to the instructor faction and remained with the instructor after the split of the club. Yet this pattern can be identified only by looking into the network involvement of members 13, 18, and 22. Visualization in Figure 3 fills precisely this gap by simultaneously representing network involvement and the hierarchical structure of the network.
Our second and third examples are concerned with the social positions and groups in equity capital markets (ECMs). We use a commercial data set provided by Dealogic, one of the leading firms in financial data collection and dissemination. In ECMs, we focus on initial public offerings, follow-on issues, and transactions pertaining to debt instruments convertible to shares. Our analysis pertains to relations financial intermediaries build during underwriting activities in ECMs. 6 One of our main objectives is to understand the social positions of different types of financial actors and how these positions change across financial centers and over time. Thus, we are interested in understanding social groups in ECMs and which groups are at the core of financial networks in ECMs. Cohesive blocking is a powerful tool in probing these issues.
Figure 4 presents the visualization of cohesive blocks in Singapore ECMs between 2008 and 2010. Although one of the largest global financial centers, Singapore is not a leading market in equity issues (Lee and Vertinsky 2011; Woo 2016). As a result, the network structure we observe is relatively simple, compared with other financial centers such as Hong Kong (see Figure 5). The social groups we observe here and the relations among them, however, is much richer than in the karate club network (Figure 3). Figure 4 reveals a number of interesting patterns. First, we find predominantly local and regional small institutions at the periphery of the network, comprising blocks at embeddedness levels 0 and 1. Second, as we get to the core of the financial network in Singapore (block at embeddedness level 2), we find a combination of Singaporean, Malaysian, Korean, Chinese, and Japanese financial institutions. Many of these financial intermediaries are midmarket or large firms taking advantage of dense trade and investment ties between Singapore and the rest of Asia. However, it can be seen that their network involvement depends on the core of the network. This is not surprising, as these firms often play a subsidiary role to transactions led by global or regional powerhouses that dominate the market. Finally, the deeply nested blocks at the core of the network are global bulge bracket banks (e.g., Citibank, Credit Suisse, and Goldman Sachs) and regional behemoths such as Singapore’s DBS and Malaysia’s Commerce International Merchant Bankers. At the core of the Singapore’s ECM financial network, we find prominent institutions such as DBS, UBS, Citibank, and Credit Suisse (in green) taking the lion’s share and binding much of the ECMs. Overall, Figure 4 shows that in financial markets such as ECMs cumulative advantage effects are quite strong (Poon 2003) and financial institutions from advanced industrialized countries dominate the market. Nonetheless, regional institutions play a substantial role in Singapore ECMs. This is a pattern that differs from a mature market such as Japan and many emerging markets, as we explore in other parts of our work.

Cohesive blocks in the Singapore equity capital market financial network, 2008 to 2010.

Cohesive blocks in the Hong Kong equity capital market financial network, 2013 to 2015.
Figure 5 presents the Hong Kong ECM financial network for the period from 2013 to 2015. Compared with Singapore, the financial network in Hong Kong ECMs are much denser, driven by Hong Kong’s role as the main platform for Chinese firms to raise capital (Lee and Vertinsky 2011). Although the Hong Kong financial network has substantially less branching than that in Singapore, its cohesive block tree is much deeper. This network is much more hierarchical than either of the prior examples, with a core of institutions that operate in the deepest, most cohesive part of the network, and a series of institutions that are less and less affiliated with this central core. Because the hierarchy in this network features substantial depth but little branching, relatively few institutions serve as bridges within the network. Although we do not discuss it here, the Hong Kong ECM financial network reveals a highly competitive market in which the Chinese financial intermediaries play an increasingly larger role compared with global bulge bracket banks.
Last, Figure 6 presents an application of this visualization to a different network analysis technique and a larger network. The figure shows a hierarchy of friendship groups within a 2,587 member community in the National Longitudinal Study of Adolescent to Adult Health data set (Moody 2001), with the hierarchy derived through

Discussion and Conclusion
The algorithm we describe in this article is inspired by a long tradition in social network analysis that focuses on visualization as a crucial tool in capturing social positions and social groups (Freeman 2005; Freeman and White 1993; Krempel 2009). It represents a novel approach to the visual representation of hierarchical networks—networks that contain a hierarchical structure. Our method emphasizes the dual aspect of such networks—the positions of different nodes and the relationships between groups containing the nodes in the network—and highlights how these two aspects interact. As such, the method we develop demonstrates how network structure manifests within hierarchical bounds and shows how a hierarchy constrains network interactions. Perhaps most important, our visualization approach makes clear how network ties cut across hierarchical boundaries, showing both how social relations bind social groups and how certain nodes act as bridges and articulation points, binding different parts of the hierarchy together.
An important application of our technique lies in the interpretation and exploration of results following from methods that identify hierarchies within networks. For instance, cohesive blocking (Moody and White 2003; White and Harary 2001) provides a powerful tool for analyzing social structures by focusing on social cohesion and embeddedness of groups. This method yields rich, multidimensional results that particularly benefit from visualization. However, the algorithm we develop is equally applicable to various methods that identify groups and subgroups in networks (Alba and Moore 1978; Alvarez-Hamelin et al. 2005; Girvan and Newman 2002; Richards and Rice 1981; Wasserman and Faust 1994:260–90). Although there are many techniques for the visualization of clusters and communities in networks, our approach offers a tool for researchers examining the nested structure of networks.
Our algorithm makes a number of principled decisions, some consequential, some less so. Our focus on embeddedness and bridge nodes underlies many of our design decisions about the layout algorithm. We use the squarified treemap algorithm to lay out elements of the hierarchy. Alternatives exist, including cushion (van Wijk and van de Wetering 1999) and Voronoi treemaps (Balzer and Deussen 2005). Although we use Kamada and Kawai’s (1989) spring model to lay out the nodes within elements of the hierarchy, any network model that can be expressed in an energy formulation easily plugs into the existing algorithm. In our own experiments, energy formulations of Fruchterman and Reingold’s (1991) and Davidson and Harel’s (1996) force-directed layouts performed well. We note that various aspects of our algorithm are open to easy modification in future work. As such, we believe the visualization algorithm we offer in this article provides a new tool to network researchers, a tool that is particularly tuned to the visual representation of hierarchical networks.
