{'fraction_non_alphanumeric': 0.02226027397260274, 'fraction_numerical': 0.0070049813200498134, 'mean_word_length': 5.032394366197183, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Structure analyses of a large-scale transaction network through visualization based on molecular dynamics

We shed light on industrial structure of the economic system in Japan by combining visualization technique and community analysis in this and an accompanying paper. Here we focus on visualization of a production network comprising submillion nodes (firms) and three million links (transaction relations). A network structure is optimized through molecular dynamics simulation with a spring-electrical model in a three-dimensional space. The lowest-energy state in the model, corresponding to a crystalline state in a physical system, is expected to give a comprehensible view on the network. Then we discuss how firms are distributed in the optimized network structure by classifying them according to sectors, sizes or regions. The distributions of firms reflect characteristics of individual classifications. Also propagation of the shock due to a recent economic scandal over the network is visualized.


Introduction
A wide variety of systems as encountered in informational, social, economical, and biological sciences are recognized as complex networks consisting of an enormous number of linked elements [1,2,3,4]. As an example, firms form a complex network through their business transactions for their production activities. A firm obtains materials from suppliers (upstream firms) and sell its products to customers (downstream firms). The business relationship so established between firms may also reflect how close are they geographically, financially, politically, historically, mentally and so on. Fortunately we can have access to an empirical database on production network in which one million firms with four million links in Japan are listed. It virtually encompasses the whole production activities over the nation.
The objective of the present work is to develop a visualization method adapted for drawing such a large-scale network and to apply the method so obtained to the empirical data. Complex networks are highly difficult to analyze all connections because of their multiplicity and complexity. Visualization is one of useful tools to illuminate structural properties of networks.
Of course visualization is not good at everything, but it helps us a lot to delve into complicated structures by stimulating our intuition.
Various algorithms have been developed to visualize networks whose structural elements are nodes (firms) and links (transaction relations between firms) [5]. Here we adopt a springelectrical model in which pairs of firms with direct transaction relations are physically connected with springs and any pairs of firms repel each other through a repulsive Coulomb force [6]. The attractive force due to the spring keeps intimate firms close in a space. On the other hand, the repulsive Coulomb force tends to distribute firms uniformly over the available space and to prevent entanglement of the transaction network. We then take full advantage of a molecular dynamics (MD) method [7,8] for an optimized configuration of nodes in the model. The ground state in the model is a leading candidate for it. The MD simulation works well to reproduce an ordered structure with the lowest energies such as crystals of materials through slow cooling starting from any initial configurations. We expect it is also successful in visualizing the network.
In the accompanying paper [9] we also devote ourselves to development of a method for extracting community structures inherent in such a nationwide economic network. Finding communities in a network is to separate densely connected groups of nodes from the remainder. Then the network can be regarded as consisting of those dense groups sparsely connected to each other. The structural heterogeniety may play an important role in determining dynamics of macroeconomy such as business fluctuations, one of long-standing problems in the economic theory [10]. Maximization of the modularity, a quality function for community detection proposed by Newman and Girvan [11], is one of promising approaches to identifying community structures involved in complex networks [12,13,14,15,16,17,18,19]. We thus demonstrates that combination of the two approaches, visualization and community analysis, to the transaction network possesses potential utility in elucidating the economic structure in Japan.
This paper is organized as follows. In the next section we briefly review the dataset used here. Section 3 explains the MD visualization method for an optimized network structure. In Sec. 4 we show the optimized network structure and give examples of analyses using visualized images based on it. Section 5 summarizes the present results with concluding remarks.

Transaction Relations between Firms
We use a set of data on transactions between firms in Japan, compiled by Tokyo Shoko Research, Inc. It is almost the same dataset as analyzed in Ref. [20], where details of the data are described including how the research agency collected information. Here we just mention the dataset contains information in 2004 on individual firms exceeding one million in Japan and more than four million transactions between firms. The total number of firms in Japan is now estimated to be 2.5 million by the census due to the Ministry of Internal Affairs and Communications. By removing data irrelevant to the production network (isolated firms, incomplete data, etc.), we reduced the original dataset to the one consisting of N = 780, 544 nodes (firms) and M = 3, 196, 282 links (transaction relations).
It has already been established that the connections between firms have characteristics of a scale-free network [20,21]. Namely, the number of links (degree) originating from a node has a power-law distribution; there exists firms acting as hubs with a number of connections at every scale. The scale-free networks are observed in various places, including the topology of web-page links, the collaborative network of Hollywood actors, the power grid of U.S., and so on [1,2,3,4]. Preferential attachment is a possible mechanism for formation of the scale-free networks; probability of linking to a node is proportional to the number of existing links that node has.

Molecular Dynamics Visualization
We carried out MD simulation for an optimized structure of the transaction network in a three-dimensional space. The interaction potential between nodes for the present simulation is explicitly written as where Q i is a Coulomb charge for node i and k ij is a spring constant between nodes i and j which are directly connected. Here we neglect the direction of links (flow of goods or money), and assume that Q i and k ij take identical values for every node and every pair, respectively. We used the velocity Velret algorithm [7,8] for integrating the equation of motion for a system of classical particles interacting through the potential (1). The MD simulation on a system consisting of charged particles of million order is not a simple task because of the long-range nature of the Coulomb force; the computational task is order of N 2 without any tricks. To speed up the computation, we thereby implemented the hierarchical tree algorithm due to Barnes and Hut [22,23] into our MD code. The whole space is divided by cells at hierarchical levels. The interactions of a given particle with other remote particles are replaced by the interactions with the cells to which those particles belong. As the distance between particles is larger, cells at higher level are used. On the other hand, the force on the particle is calculated directly for its neighbors residing in the same cell or the adjacent cells at the lowest level. This trick reduces the computational task to O (N log N ).
The nodes were distributed randomly in a cubic box at the initial time. The given configuration immediately led to a very high temperature state in which all nodes were moving almost freely. Then we gradually decreased temperature of the system through reduction of the kinetic energies of nodes to reach a zero-temperature state. Relative magnitudes of the potential parameters control the final structure obtained, although their absolute magnitudes are totally irrelevant. We confirmed that the final result was essentially independent of initial configurations and cooling processes adopted. We show an example of the relaxation process in figure 1.

Visualized Results and Discussion
The optimized network structure as shown by the rightmost drawing in figure 1 will be a basis for the present study, and will be utilized in the community analysis in the accompanying paper [9].
We first decompose firms into eight large sectors of industry: Construction, Manufacturing, Services, Real Estate, Transport, Wholesales/Retail Trade, Information/Communications and    Also we see that each sector has its own structural characteristics. For instance, the construction sector has brush-like structures. Such a feature indicates that hierarchical relationship (contractors, sub-contractors, sub-sub contractors and so on) prevails in the sector. Firms in the manufacturing sector, in contrast, are tightly connected to each other, forming a dense cluster. The wholesales/retail trade sector is characterized by a number of mushroom- like structures of various sizes. This demonstrates relationship between a wholesaler and many retailers associated with it are popular at every trade scale in Japan. The typical structures of those three sectors are illustrated in figure 3. Properties of partial networks within individual sectors are listed in table 1; the partial networks also possess the scale-free nature. And three of them corresponding to the major sectors are depicted in figure 4. Those network structures were optimized by separate MD runs. The characteristic properties (recall figure 3) that we have remarked as regards the three sectors are illuminated more clearly here. We note the partial network of the manufacturing sector was visualized in advance by Fujiwara and Aoyama [20].   figure 6 shows a coarse-grained network at prefecture level which was derived from the optimized network. Each node is placed at the center of gravity of firms belonging to the prefecture it represents. Since Tokyo occupies a very peculiar position linking over the whole nation, we also prepared a see-through picture, the right one in the figure, by discarding Tokyo. The nodes representing the prefectures are positioned in a similar way to the corresponding geographical location from north (Hokkaido) to south (Okinawa). In passing we note that the construction sector is well separated regionally as seen in figure 4(a).   the size of a firm is represented by its number of employees. We see that larger firms prefer to reside at the center. Recalling that the present visualization method tends to locate nodes of large degree around the center, we calculated the correlation coefficient r between the size and the degree of firms. Certainly the size of firms strongly correlates with their degree as confirmed by the result r = 0.65. Finally figure 8 depicts how a shock due to a scandal over sale of contaminated rice by a food distribution company propagate through the network. The scandal was brought to light in fall, 2008. It was revealed that the distributor illegally sold contaminated rice for human consumption; such rice was only allowed for industrial use. The distributor sold the rice to wholesalers, who sold it to food makers down the production line. As shown in figure 8, the shock is directed to the center of the network indicating amplified impact on the economic system. Actually a number of downstream firms and consumers were affected. Figure 8. Propagation of a shock due to the scandal over sale of contaminated rice by a food distribution company through the production network. The red circle depicts the trigger company.

Concluding Remarks
We optimized the network structure arising from three million transactions between submillion firms using MD simulation, and visualized the network in a three-dimensional space. We then analyzed how firms were distributed in the optimized network from the point of view of sectors, sizes or regions. We thus succeeded in elucidating characteristics of individual classifications through the distributions of firms. Also we ascertained the gravity of the recent economic scandal by displaying propagation of the shock over the network. This paper has just initiated possible applications of the visualization method developed here to analyzing the transaction network. We hope it will serve as a useful tool to study the industrial structure and stability of the economic system in Japan. The accompanying paper will proceed one step further in this direction by emphasizing community detection.