Multiscale planar graph generation

The study of network representations of physical, biological, and social phenomena can help us better understand their structure and functional dynamics as well as formulate predictive models of these phenomena. However, due to the scarcity of real-world network data owing to factors such as cost and effort required in collection of network data and the sensitivity of this data towards theft and misuse, engineers and researchers often rely on synthetic data for simulations, hypothesis testing, decision making, and algorithm engineering. An important characteristic of infrastructure networks such as roads, water distribution and other utility systems is that they can be (almost fully) embedded in a plane, therefore to simulate these system we need realistic networks which are also planar. While the currently-available synthetic network generators can model networks that exhibit realism, they do not guarantee or achieve planarity. In this paper we present a flexible algorithm that can synthesize realistic networks that are planar. The method follows a multi-scale randomized editing approach generating a hierarchy of coarsened networks of a given planar graph and introducing edits at various levels in the hierarchy. The method preserves the structural properties with minimal bias including the planarity of the network, while introducing realistic variability at multiple scales. Reproducibility: All datasets and algorithm implementation presented in this work are available at https://bit.ly/2CjOUAS


Introduction
A network is a representation of a set of entities and the relationships between them.The network paradigm is often used to represent physical, biological, engineered and social systems [1].Networks can help us better understand the structural and functional dynamics of these systems and formulate predictive models.However, collecting real-world network data often requires time and can be expensive.Also, for many applications, the sensitivity of real-world data towards theft and misuse further adds to the cost of protection and security of the data, which sharply limits its availability.
The problem of data scarcity can be tackled by using synthetic data which can mimic both the properties and diversity of real world networks.Such synthetic data can be used for simulations, analysis, and performance/quality verification of algorithms -a crucial task in algorithm engineering.Synthetic network generation is one of the most important fields in network science from both theoretical and practical perspectives.We refer the reader for an in-depth discussion to recent reviews in [2,3].

Planar Graph Generation
Planar graphs are the class of graphs that can be embedded in a two-dimensional plane without edge crossings.Designing efficient algorithms for planar graphs is an important subfield in the area of algorithm development and optimization [4].From the practical perspective, the planarity is also an important characteristic of many physical networks such as roads, utilities, water distribution systems, and some circuit designs.Many of these networks are, in fact, almost planar, that is, one can remove typically small fraction of edges to make them exactly planar.The wide range of real-world applications of planar networked systems has created a demand for planar graph generators.Although the planar graphs share the property that they can be embedded in a plane, a planar graph generator should also be able to replicate other properties exhibited in a real-world networks.However, the currently available synthetic network generators can either generate networks that exhibit realism with no planarity guarantees, or give planar networks with otherwise random structure that lack the structural characteristics of real-world networks.Also, most of the existing research in general purpose network generation covers models related to scale-free networks, heavy-tailed degree distributions, and relatively high clustering coefficient that are not typical to real-world (almost) planar networks.

Our Contribution
In this paper, we present a flexible algorithm that can synthesize realistic planar replicas of a known planar graph that can be rescaled to much larger graphs.The method follows the multi-scale editing approach [2] in which a given graph is projected into a hierarchy of its coarsened representations (coarse graphs) that are then perturbed by edits at various scales of coarseness in the hierarchy.The method preserves the structural properties including the planarity with controllable bias, while introducing realistic variability at multiple scales of coarseness.Because the method belongs to the family of multiscale editing approaches, it generates planar graphs that attempt to replicate properties of the original graph at all levels of its coarse-grained resolutions which is the main property of the multiscale editing approach.
Throughout this paper we refer to the term "realistic" network multiple times.Realism of a generated similar network is not a uniquely defined notion as its meaning obviously depends on the application in which generating a similar to the original network is required.The question of realism definition is beyond the scope of this paper.We refer the reader to a discussion in [2] and its preliminary extended version [5].Intuitively, the multiscale generative method suggests that a realistic network is the one that replicates some properties of the original network at multiple scales of coarseness (in contrast to many different methods that generate similar networks with predefined properties such as clustering coefficient and degree distribution only at the finest scale).We advocate that preserving them at multiple scales is at least as important for a variety of applications as at the finest scale.Technically, in many cases, preserving just a couple of such properties as the degree and second shortest distance distributions, will imply preservation of many path-based metrics such as betweenness and diameter which does not necessarily happen at the finest level only methods.

Network Generation Algorithms
The field of network science and, in particular, network synthesis is vast and cannot be comprehensively reviewed here.Hence, we focus on several particularly illuminating approaches for modeling realistic networks that presumably may be applied as or changed to the first step in realistic planar graph generator.In contrast to the different versions of random planar graph generators, there is an obvious lack [6] of planar graph generators that generate graphs that are similar to the original planar graphs.This is the reason, why practitioners and decision makers use other graph generators in combination with planarization postprocessing to generate planar and hopefully realistic graphs.This is also a reason for our comparison with these algorithms in the next sections.These approaches fall into categories, namely, sampling models, generative models and editing models.

Sampling models
Sampling models are typically used for large scale networks.In this technique we pick a subset of vertices and/or edges from original graph and calculate the distribution of various graph properties such as degree distribution or link probabilities.The network is then generated by sampling from estimated distribution.One of the important examples of this model is the Exponential Random Graph Models (ERGM) model.
The ERGM models [7] are a class of statistical models, earlier called p-star models, that are popular in the study of large-scale social networks.To build a network, the ERGM first estimates certain parameters by fitting an observed social network and then constructs new networks by sampling from the estimated distribution.For example, in the Bernoulli and Erdös-Rényi ERGM models which generate homogeneous networks, the parameter space is based on same probabilities for each added connection, whereas the Chung-Lu ERGM model [8] for large random graph with given degree distribution, the probability of connection of two nodes is proportional to the product of the degree of the nodes.The model can generate large graphs which depict some of the behaviors of massive realistic graphs and also predict the size and number of large components in the graph.ERGM models are successful in generating social networks and exhibit realistic degree distributions and small world structures.Also there are several ERGMs with community structure [9], [10], [11] but none of them give any planarity guarantees, and normally violate planarity.While potentially, this model could serve as the first step in planar network generation (the planarity could be one of the properties or it can be applied with subsequent planarization of synthesized network), we emphasize that it is extremely slow and cannot be applied even on medium size networks, so we cannot experiment with it and compare to our generator.

Generative models
Generative models typically construct a network starting with an empty or small seed network and then iteratively add network elements (such as nodes and edges) to match some properties of a network that have to be preserved.These algorithms attempt to preserve the real network properties over the evolution and growth of the synthetic network.Important examples of generative models are the following.
BTER Block Two-Level Erdös-Rényi model (BTER) [12] is based on the idea that a network contains communities that are Erdös-Rényi graphs in which each pair of vertices is independently connected with some probability.BTER graphs contain dense Erdös-Rényi communities that are found in real-world networks.The algorithm is two-phased.In the first phase, a collection of blocks or Erdös-Rényi communities with specified degree distribution is created.Then the blocks made interconnected and excess degree nodes are removed based on Chung-Lu (CL) model [13] such that each subnetwork is well modeled by CL.BTER has been shown to model realistically a variety of network properties, but as with ERGM, it gives no guarantees of planarity.Also, whether communities in (almost) planar networks have hierarchical and connectedness structure similar to BTER model or not is not explored.

RMAT and Stochastic Kronecker Graphs
The Recursive Matrix graph generator introduced by Chakrabarti et al. [14] and its extensions AutoMAT-fast [14] can generate large-scale complex realistic networks.The generator is based on a recursive algorithm that operates on the adjacency matrix of the graph by dividing it into four equal-sized partitions and distributing edges to each partition based on fitting a set of parameters.The Stochastic Kronecker Graphs (SKG) [15] extends the methods of RMAT.Similarly to RMAT it is a recursive model, which starts with a small initiator matrix and recursively produces large graphs by applying Kronecker products.SKG can be interpreted as network which is a hierarchy of communities which grow recursively to create copies of themselves and every node has unique set of attributes values.The model can generate graphs with static patterns such as degree distribution as well as temporal patterns such as diameter over time.As before, planarity is not guaranteed as well as the community structure similarity with real-world networks that have one.
Multifractal Network Generator In 2010, Pallaa et al. [16] introduced the multifractal network generator which can generate realistic networks with specified statistical features.The method starts with defining a generative measure on a single fractal or unit square and calculating link probability.The network is then scaled to the infinite limit by recursively dividing the fractal into a number of rectangles and introducing connections between them based on the link probability.Although this method was able to generate small scale realistic graphs the recursive method was slow for large complex networks.It is unknown if the generated networks can be constructed to have planar or quasi-planar structure, but the random nature of the construction suggests that planarity would be uncommon even in small graphs.However, the backbone networks generated by this model could be planar and thus possibly relevant to some infrastructure networks (for example, see major gas pipes in [17]).Unfortunately, these networks have layers of fractals and do not exhibit properties of infrastructure networks such as small diameters, shortcut edges and redundancy in paths.Thus making comparison of these networks with infrastructure networks impossible.

Editing models
The editing models approach starts with a given (real or empirical) network and controllably introduces random changes to its elements (such as nodes and edges) until the network becomes sufficiently different from the original network.These changes are designed to introduce variability while preserving key structural properties during the random editing.Such methods are a promising direction for a relatively more realistic modeling of networks, and that includes properties such as planarity or near-planarity.
Edge-swapping The edge-swapping method [18,19] is perhaps the first important algorithm in the class of editing models, and it is based on the insight that the degree distribution of a graph is preserved under a chain of edge-swapping operations.Such a chain of edge swaps can even asymptotically achieve important mixing properties giving high variability.Despite these successes, edge-swapping operations can be very disruptive to planarity and other global properties of the graph, and there are no good post-selection methods for achieving planarity.
Multiscale Network Generation In [2], several of us proposed a strategy termed MUS-KETEER (Multiscale Entropic Network Generator) for realistic graph generation.The main idea was based on the observation that the properties of real networks that should be preserved during generation are not only those measured at the finest resolution but also those that can be measured at the coarse resolutions.Multiscale generation leverages coarsening schemes used in highly-accurate multiscale solvers for combinatorial optimization such as linear arrangement, compression and partitioning [20][21][22][23][24].In such coarsening schemes, nodes in a network are assigned into aggregates (or, typically, very small communities) which are themselves parts of larger aggregates and so on in a hierarchical manner.The algorithm was successful in generating a number of replicas for several real-world original networks, but did not guarantee planarity.This paper continues this line of research and offers an implementation of the multiscale strategy that actually produces planar networks.
ReCoN Staudt et al. [3] later used principles similar to those of multiscale method and developed a fast network generator that could generate large-scale replicas of real complex network that are structurally similar to original network.Instead of leveraging multiscale coarsening schemes, ReCoN generated synthetic networks by randomizing the edges between communities which were detected by the community detection methods while keeping the same degrees of nodes.ReCoN is built on top of the LFR generator implemented in [25].

Planar Network Generators
Planar networks with underling graphs have attracted a lot of attention since a landmark paper by Tutte [26].Most of the research was dedicated on the study of structural properties (including their generation) of random planar graphs or uniform random planar graphs such as triangulations, and meshes.However, the currently available planar graph generators usually generate uniform random graphs by interpolation of planar subgraphs or generate planar subgraphs of a non-planar graph.Unfortunately, they are very far from being practically important for such tasks as generating graphs underlying infrastructure networks since they fail to present most other properties that are viewed as significant in this area, such as the degree distribution, the community structure and others.Some important available planar graph generators are discussed below.
Plantri and Fullgen software.Plantri [27] can generate triangulations, quadrangulations, and convex polytopes using recursive algorithm which is efficient and fast.Fullgen [28] generates fullereness which are planar cubic graphs with 5 or 6 faces.The important characteristic of this software is that it generates only one graph as output from a family of isomorphic graphs saving the space needed to store them.The software also offers the user the option to restrict adjacent pentagons using an input parameter.
Markov Chain Planar Graph Generator.This algorithm was proposed by Denise et al. [29] and is based on Markov Chain that generates planar subgraphs from a non-planar graph.The algorithm defines a Markov Chain on the state space of all subgraphs of the original graph and transitions as follows.If an edge exists in space, it is deleted.If it is not present it is added in case it maintains planarity otherwise it is discarded.The method can successfully generate a planar subgraph in polynomial time.
Delaunay Triangulation and refinement method.This method has been widely used by researchers to generate mesh networks.In [30], Shewchuk presented an implementation of 2-dimensional constraint Delaunay triangulation and Ruppert's [31] Delaunay refinement algorithm for mesh generation.
Geometric graphs.Gilbert [32] proposed a model to construct random plane networks by first selecting points in infinite plane based on Poisson process with a specific density and then connecting points based on their distance (a parameter) from each other.The random geometric graphs closely represent the graphs generated by percolation process through various porous materials and therefore these graphs are extensively utilized by physicists to study continuum percolation models.Random geometric graphs also have application in communication networks [6].
Planar Erdös-Rényi graph.In 1959, Erdös and Rényi [33] introduced a method to generate a random graph with N nodes and m edges by connecting the edges randomly with independent probability p.The Erdos-Renyi planar graph generator generates random planar graph with uniform probability [29] by rejecting the non planar edges thereby preserving planarity [6,29,34,35].This is the most basic planar model which cannot be directly used for practical replication purposes.

Domain Specific Planar Network Generation
Important applications of planar networks are infrastructure networks such as roads, water distribution systems and power grids.There is a shortage of data for these networks owing to various reasons such as time and cost involved for collecting the data.Also the available data for infrastructure networks such as water distribution systems, and other utilities cannot be published due to confidentiality issues.As a result, the study of these networks and their simulation is highly dependent on the creation of high-fidelity synthetic data.
In [36], Cura et al. proposed a unified framework called StreetGen that works on real Geographic Information System (GIS) data and modeling hypothesis which automatized street reconstruction and generated a street network model which was coherent to realworld street model.StreetGen required parameters for specific street objects and needed specialization for different objects.
In order to generate a simulation data for grid networks, Wang et al. [37] proposed an algorithm that generates random but realistic topology power grid networks that could be used as test power grids.The generator used probability distribution for defining for number of nodal locations, then the parameters for distance was used to generate simple topology which was connected.
There is a similar shortage for data on water distribution systems (WDS) and the researchers typically need to rely on synthetic data to run simulation, test hypothesis and decision-making.The earlier methods for synthetic network generation involved manually creating realistic networks based on real data.Sitzenfrei [38] developed a software package DynaVIBe-Web that automated the generation of synthetic WDS networks.The generator used street networks, GIS data and real data from more than one network.Murano et al. [39] developed an interactive application WaterNetGen as an extension to well-known WDS optimization tool EPANET [40], which could generate network topologies, which is based on user-defined parameters and constraints.
Though, the above network generators produce realistic networks, they are specialized to specific domain and do not follow a generic approach to planar network generation.Also, replicating structural properties of a given network is not among the features of such generators.To our knowledge no work exists on cross-domain graph generators that generate realistic planar graphs that attempt to create graphs that are controllably similar to the given instances.

Notation
Throughout the paper, we will use the notation G = (V, E) for a graph, where V is a set of n nodes, and E is a set of m edges.We consider simple, undirected graphs, where ij ∈ E is an edge connecting nodes i and j, and the weight of ij is denoted as w(ij) and node volume (total weight of aggregated nodes) is denoted by v(i).Both weight of edge and node are non-negative.(Although,our generator is not expected to work with weighted graphs, the weights will be used at the coarse levels to reflect aggregated nodes and edges.) The subscript (such as G i ) used with a variable denotes the number of level in multiscale hierarchy.We denote an edited network in the hierarchy at level i using superscript and subscript (such as G d i ).A finally generated network at the level i is denoted by G g i .

Multiscale Planar Graph Generation
Multiscale network generation (MNG) introduced in [2] is an editing model that generates realistic networks.The proposed multiscale planar graph generator follows the main ideas of MNG and makes them applicable on planar graphs.For the completeness of the paper we also overview basic components of the original method.MNG follows a multilevel coarsening/uncoarsening scheme shown in Figure 1.We start with an input graph G and generate a hierarchy of next coarser graphs, where k is the number of coarsest level.The number of coarsened levels depends on the structure and size of G, and user input, which is a vector where each value determines the required edit or growth rate at each level of the hierarchy, and the length of vector determines the number of desired coarsening levels.The hierarchy construction (coarsening) is terminated if the graph is too small or too dense (density of graph > 0.9) at some level (i.e., the coarsest level is reached).The coarse level construction is generic and based on the weighted aggregation method for combinatorial optimization problems [20,23].Currently, it does not depend on the application predefined aggregates in the network such as knowledge about real communities.However, this process can be adjusted as we did in [41].
In order to generate a synthetic graph, during the uncoarsening stage, we introduce a series of local randomizations at different levels whose amounts can be specified by user's input.As mentioned previously, the user can control the number of levels coarsening and amount of edits or perturbations at each of these levels using parameters edge edit rate and edge growth rate.If user is interested in only local changes without destroying the global structure of the network, only fine levels are specified for randomizations.Otherwise, any realistic changes in global structure will require randomizations at coarse levels.During the uncoarsening, these randomizations are carried forward to the next finer level in the hierarchy.In Algorithm 1, we describe the sequence of steps in generating planar graph.We will now discuss each phase and notation in detail and our approach to generate planar graphs using the multiscale method.

Coarsening
Since the input graph G 0 is planar, the aggregation algorithm that creates coarsened graphs G i makes them also planar, so we follow the same coarsening scheme as that in the original MNG.Algorithm 2 lists the steps involved for generating coarse level graph G i+1 from G i .At each level of the hierarchy, we start with finding set of seed nodes, C, and its complement fine-level nodes F which is based on two rules: (a) nodes with high volume and connectivity (i.e., major aggregates) are more likely to be included in C, and (b) the remaining nodes in F should be "strongly" coupled to enough neighbors in C. At level i, given a graph G i , Algorithm 1 Multiscale Planar Network Generator MPNG(G i ) 1: if G i is not small or too dense or perturbations are required for G i at level i by user then 2: Return coarser edited network from recursive call 4: Find set of seed nodes (C) for coarse network G i+1

3:
Find fine-level nodes that belong to each aggregate

4:
Calculate weight of edges connecting aggregates and weights of coarse nodes

5:
Return G i+1 6: end if to generate coarse level nodes for G i+1 we begin with C = ∅ and F = V i where V i is set of nodes at fine level G i .Next, we iteratively transfer some nodes from F to C (visiting them one after another in random order), such that currently visited node i ∈ F is added to C if it is not well connected to those already chosen to C [23].The connection strength between nodes i and j is determined by means of normalized weight of edge ij with respect to C, namely, if node i ∈ F is not connected strongly enough to the currently chosen C, i.e., then we move i to C and transfer our attention to the next node in F .Thus, instead of requiring for a certain number of F -nodes to be transferred to C, we scan them iteratively, and decide based on Eq. ( 1).The connection strength is parametrized using threshold α which determines the speed and number of coarse nodes (and implicitly edges).Big values of α (in multiscale algorithms, typically, 0.7 or bigger) will result in small changes in coarsened graphs that are created from level to level as most of nodes wont be strongly connected to C (according to Eq. 1).In contrast, small values (in multiscale algorithms, typically, 0.3 or smaller) will cause a decreased number of levels as not too many nodes will be transferred to C. In all our experiments we have used α as 0.5, which guarantees uniform coarsening.However, we note that the strength of connectivity criterion in network generation requires further investigation similar to that in multiscale optimization [42] where it plays a crucial role in the solution quality.
Figure 1: The V-model for multiscale planar network generation.The original input planar network is coarsened to generate a hierarchy of coarse networks, the process is then reversed generating fine-level networks.The number of level (here 5) depends on the size of input network or the user input.
The final phase of coarsening is computing the connection strength between the coarse nodes.Here we define the algebraic multigrid interpolation matrix P of size |V | × |C| (for details see [23]) in which P uv represents the likelihood of u ∈ V i to belong to the aggregate seeded with node v ∈ V i .The Laplacian of the coarse graph G i+1 , L i+1 , can be calculated by the algebraic multigrid coarsening operator L i+1 ← P T L i P where, L i is the Laplacian of ith level graph, and The edge st connecting two coarse nodes s ∈ V i+1 and t ∈ V i+1 , is assigned with the weight k =l P ks w(kl)P lt and the volume of the coarse aggregate seeded by u ∈ V i is j v(j)P ju .This step finalizes creating the (i + 1)th level graph, and we can measure the properties of ith level graph and store them in Q i .As in the original MNG, we attempt to preserve the small loop structure of the network by avoiding any insertion of edges that connect nodes that were previously separated by the long distances in the original network.This is done by estimating the empirical probability of closed random walks (of limited length) that start at some node whose degree is at least two (for details see [2]).In general, this step is application dependent as in different applications the preserved properties may vary.Because, in planar graphs of infrastructures it is important to generate realistic path lengths (e.g., not to create shortcuts that connect distant regions in a graph), we are sampling using random walks the distribution of path lengths and shortcuts (second shortest distance between nodes) and store them in Q i .

Uncoarsening
Once the coarsest level is reached, we start the uncoarsening.During this process, at each level i+1 we choose nodes and edges to be edited (randomized while keeping some properties preserved), to generate edited network G g i+1 at level i + 1 and then project the newly created graph to generate the next finer level G g i .The projection is done in two steps.First, we interpolate the unedited aggregates (nodes and edges) in interpolateUneditedAggregates (see Alg. 3) from G g i+1 to generate graph G d i .This process is just a reverse interpolation of aggregates based on aggregation data stored during the coarsening phase.Because the input network at all levels is planar, the interpolated edges do not violate planarity.This helps in preserving structural properties of original input network, as after this step we have a subgraph G d i of original network coarsened at level i.
In the next step, we interpolate the edited aggregates in function interpolateEditedAggregates to generate graph G d i by adding edited nodes and edges to graph generated with Algorithm 3. The pseudocode for this step is presented in Algorithm 4. We first interpolate the edited nodes and add edges that were trapped within the aggregates (or coarse) nodes connecting the interpolated fine nodes, i.e., these are edges that connect fine nodes that are coarsened within the same coarse node.Next we interpolate edited or new edges introduced during editing phase at level i + 1.In this step, we introduce new fine level edges for every coarse edge connecting a pair of aggregates u and v.This is done by randomly selecting the fine level nodes generated by interpolating u and v.The number of fine level edges added for each coarse edge is based on the degree distribution of nodes in aggregates u and v at level i as stored in data structure during coarsening.This interpolation is likely to introduce crossing over edges, therefore, when we add an edge ij to G d i , we check if the network is still planar.If it is not, the edge is discarded.If an edge is discarded, we perform several iterations and find an edge which is similar to the edge ij using properties stored in Q i during coarsening in Algorithm 1 (i.e., in our implementation, the short loop structure).
After the interpolation is complete and we have a fine-level graph G d i , on which we introduce randomizations or editing (discussed below in detail) specified by the user at level i to generate a finer-level random planar network network G g i .The topology of the final Algorithm 3 interpolateUneditedAggregates (G g i+1 ) 1: G d i ← uncoarsen nodes from G g i+1 using data stored during coarsening at level i 2: G d i ← uncoarsen unedited edges G g i+1 using data stored during coarsening at level i network depends on the level at which the changes are introduced and the number of edited network elements both dependent on user input.At the coarsest level, every network element is an aggregate which interpolate of many network elements at fine level, a small change introduced at this level may generate high-entropy changes which are carried forward to the next fine level, whereas addition of an element at fine levels may introduce elements to the final synthetic network.In general, the changes introduced to deeper levels of aggregation, the more significant changes are introduced in the topology.

Editing
In the final phase we measure the properties of the generated graph G d i and compare with the properties of original graph G i coarsened at level i which is stored in Q i , thus preserving the local topological structure of the network and preventing addition of edges between nodes which were separated by long distance in original network at coarse level G i stored in Q i .We then use an editing process which introduces randomizations in the network to generate a synthetic network.This is a process of deleting and adding new edges whose both amounts depend on the user input for level i (namely, how much randomization is required at each level, i.e., a value from 0 -no randomization, to 1 -everything is randomized).In particular, we are interested in two properties, namely, the second shortest path length distribution (to prevent generating unrealistic shortcuts) and planarity.The first property, second shortest path length spath(u, v) for an edge uv is the number of edges in the shortest path u → v that does not include edge uv.Before introducing edits we estimate the distribution of spath at level i, P i by random sampling of edges R ⊂ E i where E i is set of edges in graph G i as, When we delete an edge u 1 v 1 such that spath(u 1 , v 1 ) = d, we choose a random node u and v at randomly drawn distance from u using P i .This sampling of distances preserves multiple structural properties such as clustering coefficient and average shortest path (see more details in [2]).
The second critical property is planarity.In order to preserve planarity, if inserting the new edge makes the network non-planar we discard it and find an alternate edge that preserves the desired structural properties (in this case the first property) as well as planarity.Technically, it is done by verification of existence of Kuratowski subgraph [43] after adding a new edge.This step is repeated until we find a non-crossing edge that preserves the planarity of the network and thus generating synthetic planar graph G g i at coarse level i.

Rescaling
Rescaling is a part of the editing phase in which we add new elements (edges and nodes) to the synthetic network in order to increase its size.The scaling factor and the coarsened level at which the network is rescaled is controlled by node growth parameter which is provided as an input from the user depending on the user requirement.In general, rescaling at coarsest levels will preserve the local structure of the input network, i.e. the generated network will have increased number of communities whereas rescaling at finer levels will increase the size of communities.The scaling factor ranges from 0 to any number which decides the percentage of new nodes that are to be added at the level i.This is a two step process.First, we introduce a new node u and connect to an existing node v in the network deleting an existing edge from v to restore the degree of node v.In the next step, we find neighbors of v iteratively over increasing distance from v and connect the newly added node u to the neighbors of node v thus preserving the local topological structure of the network at coarse level G i stored in Q i .The process is terminated when the desired number of network elements are added and a rescaled network G g i is generated at coarse level i.

Computational Experiments
In this section we show the computational results summarizing the performance of our multiscale planar network generator in replicating the original and also generating rescaled networks.To test the variability of the generator we used real-world infrastructure networks such as water distribution system, power grid and road network that are either planar or have very few edge crossings that we removed.We used the water network from "The Battle of the Water Networks II" [44] and for road network we used a sub graph of Texas [45] road network from [46].We also used a finite element large planar sub-graph of a finite-element graph from Boeing collection in [47].In case of the power grid [46] which was not completely planar, we generated approximate maximal planar subgraph of the network using Open Graph Drawing Framework (OGDF) [48] to be used as an input to our algorithm.

Replication
We tested our implementation on three sets of parameters, namely, "Musketeer Coarse" (at only two coarsest levels 5% randomizations are allowed), "Musketeer Fine" (at only two finest levels 5% randomizations are allowed), and "Musketeer All" (small 1% randomizations are allowed at all levels).The amount of edits for each set of parameters are controlled such that the number of randomizations in final generated graphs for each set of parameters are comparable.Because randomizations and editing are introduced at all levels, even very little changes at the coarse levels will result in significant changes at the finest level in generated synthetic graph.We generated 30 network replicas for each network and compared the replicas with the original network based on the following metrics: number of nodes and edges, number of components, clustering coefficient, average degree, total degree-degree assortativity, average harmonic distance, modularity, pagerank and average betweenness centrality.We also compared our results with the existing generative models implemented in [25], namely, ReCoN, RMAT and BTER and stochastic Kronecker graphs by generating replicas of same input network.Since, these models do not necessarily generate planar network, we post-processed the generated networks to find the maximal planar subgraph of the replicas using OGDF library which uses edge removing technique, i.e., it adds one edge at a time while preserving planarity, if addition of the edge results in a non-planar graph then the edge is discarded thus generating a planar subgraph.We compared the generated planar graphs with the original graphs for the structural properties mentioned above.Clearly, one may argue that these generators were not developed to planar networks.We, however, note that these methods with planarization post-processing were chosen because there is no other acceptable solution to generate more or less realistically looking planar network that is similar to the original.As mentioned earlier, the available planar graph generators are generative models which either create specific classes of graphs with restricted values for minimum degree and connectivity (e.g., plantri and fullgen or Delaunay triangulation methods) or generate random realistic spatial networks based on give probability p (e.g., planar Erdos-Renyi, and spatial Watts-Strogatz generator).Other examples include domain specific generators for road networks (e.g., StreetGen) and power grid random networks that are not necessarily planar networks.To the best of our knowledge, there is no domain independent generator whose goal is to preserve similarity with the input network.
The structural properties of the replicas were normalized such that 1 denotes the property of original network.We performed 30 experiments for each set of parameters the results for which is graphically represented in Figure 2-9.Our results indicate that multiscale planar graph generator can generate replicas that preserve almost all the properties of the original networks with relatively small deviation.Also, we observe that graphs generated by BTER and RMAT after planarization are close to original network (within 0 − 2, where 1 represents the property of original input network after normalization) for properties such as average degree and mean harmonic distance whereas the properties for networks generated by stochastic Kronecker graphs (SKG) are far from those in the original graphs.As such the plots for properties for the networks generated by SKG are not represented in the plots.However, we note that the distortion of properties on the replicas by other network generators may have been the result of the post-processing step (maximal planar sub-graph of the generated replica), which often created more than one connected components.
Figure 2: Computational results on performance of planar Musketeer on power grid graph opsahl-powergrid with 4941 nodes and 6211 edges for clustering coefficient, number of edges, mean eccentricity, total degree *degree assortativity, modularity and average degree.

Rescaling
Our second set of experiments was designed to generate rescaled networks.We tested our implementation on three sets of parameters, namely, "Musketeer Coarse" (30% edge and node addition on 4 coarsest levels are allowed), "Musketeer Fine" (30% edge and node addition on 4 finest levels are allowed), and "Musketeer All" ( 15% edge and node addition at all levels are allowed).The parameters are chosen such that the generated network has 3 − 4 times the number of nodes and edges than the original network.We generated 30 rescaled replicas for the same dataset as used in our previous experiment and compared the generated networks with the original network based on the following metrics: number of components, clustering coefficient, average degree, total degree-degree assortativity, average harmonic distance, modularity, pagerank and average betweenness centrality.The structural properties of the replicas were normalized such that 1 denotes the property of original network.The comparison for 30 experiments is presented in Figure 9-12.As depicted in the plots we are able to preserve almost all the properties of original network even when the network is rescaled to more than 3 times the original network.Also, there is no significant variance observed in properties for the three different sets of parameters (coarse,fine and all) used to generate rescaled networks.However, we observed that rescaling by introducing elements at finer levels results in high clustering coefficient in generated network.This is because the planarity constraint restricts addition of long edges (edges between nodes which are far from each other) which in turn forces the algorithm to connect new elements locally at each level i.In case the network elements are introduced at coarsest levels, the locally added edges and nodes are uncoarsened to several finer edges and nodes over the V-cycle of coarsening and uncoarsening, and the near neighbors at level i are drifted apart at level i + 1.However, network elements added at fine levels are not drifted as a result of levels of coarsening and uncoarsening as described above, and the edges still connect the nodes locally.Hence, we observe an increased number of triangles (Figure 16) or high clustering coefficient (Figures 18 -24) for networks generated by introducing elements at fine level as compared to coarse level.As depicted in Figure 16 when the network is rescaled by introducing new elements at only coarse levels, we find larger communities (e.g., mesh structures in case of our input road network) in the generated network, whereas if the network is rescaled at fine level we observe smaller communities.The amount of new introduced elements can be controlled by user input which is provided as node growth parameters at certain levels.The size of replicated and edited aggregated clusters in the rescaled network can be controlled by choosing larger node growth parameter for example in Fig. 17 we used node growth parameter as 1.5 at the coarsest level to rescale the network to 1.5 times.Depending on the application, one may want to add a postprocessing step which will create longer loops as in the original network of Fig. 17.We created 13 links that close peripheral clusters by randomly choosing pairs of disconnected nodes, adding edge, and checking the planarity.However, although it may create a better visualization for the comparison with the original network, this step may not be desired by many application.
In our experiment we used 0.3 as node growth rate for coarsest and finest level and 0.10 when introducing network elements at all levels.
[t] Figure 4: Computational results on performance of planar Musketeer on finite-element graph with 4704 nodes and 13427 edges for clustering coefficient, number of edges, mean eccentricity, total degree *degree assortativity, modularity and average degree.In this paper we introduced a multiscale planar graph generation framework and its implementation using Musketeer framework [2] .Our evaluation suggest that multiscale planar graph generation method can generate realistic replicas of planar networks across domains with small loss of similarity.While there are clearly enough space for the improvement of this method, to the best of our knowledge, this is the first general purpose synthetic planar graph generation method that is able to produce realistic instances.
Several future research directions can be explored.First, we would like to introduce the algebraic distance edge weighting scheme [49] in order to more accurately preserve the distances during the uncoarsening.We have successfully used this improvement for network sparsification [50] and several combinatorial optimization solvers [20,51].Second, it would be interesting to investigate whether one should control the size of aggregates to preserve uniform coarsening, a multilevel technique that is well known in graph partitioning [51,52].The role of uniform coarsening is not well understood in multiscale graph generation.
There exist several further research directions that are application dependent.For example, approaches for assessing how much variation is desirable in the generation and how to decide whether enough changes have been introduced can vary from application to application.However, a unified strategy to address this issue would be very helpful.

Figure 3 :
Figure 3: Computational results on performance of planar Musketeer on power grid graph opsahl-powergrid with 4941 nodes and 6211 edges for number of nodes, harmonic mean path, number of components, average shortest path and average betweenness centrality.

Figure 5 :
Figure 5: Computational results on performance of planar Musketeer on finite-element graph with 4704 nodes and 13427 edges for number of nodes, harmonic mean path, number of components, average shortest path and average betweenness centrality.

Figure 6 :
Figure 6: Computational results on performance of planar Musketeer on real water network with 407 nodes and 459 edges for clustering coefficient, number of edges, mean eccentricity, total degree *degree assortativity, modularity and average degree.

Figure 7 :
Figure 7: Computational results on performance of planar Musketeer on real water network with 407 nodes and 459 edges for number of nodes, harmonic mean path, number of components, average shortest path and average betweenness centrality

Figure 8 :
Figure 8: Computational results on performance of planar Musketeer on road network from roadNet-TX with 2001 nodes and 2957 edges for clustering coefficient, number of edges, mean eccentricity, total degree *degree assortativity, modularity and average degree.

Figure 9 :
Figure 9: Computational results on performance of planar Musketeer on road network from roadNet-TX with 2001 nodes and 2957 edges for number of nodes, harmonic mean path, number of components, average shortest path and average betweenness centrality.

Figure 10 :
Figure 10: Computational results on performance of planar Musketeer on symmetric pattern with 1141 nodes and 3162 edges for clustering coefficient, number of edges, mean eccentricity, total degree *degree assortativity, modularity and average degree.

Figure 11 :
Figure 11: Computational results on performance of planar Musketeer on symmetric pattern with 1141 nodes and 3162 edges for number of nodes, harmonic mean path, number of components, average shortest path and average betweenness centrality.

Figure 12 :
Figure 12: Computational results on performance of planar Musketeer on graph for thermal L-Shape Problem with 3025 nodes and 8904 edges for clustering coefficient, number of edges, mean eccentricity, total degree *degree assortativity, modularity and average degree.

Figure 13 :
Figure 13: Computational results on performance of planar Musketeer on graph for thermal L-Shape Problem with 3025 nodes and 8904 edges for number of nodes, harmonic mean path, number of components, average shortest path and average betweenness centrality.

Figure 14 :
Figure 14: Computational results on performance of planar Musketeer 2D finite element graph with 1866 nodes and 3538 edges for clustering coefficient, number of edges, mean eccentricity, total degree *degree assortativity, modularity and average degree.

Figure 15 :
Figure 15: Computational results on performance of planar Musketeer 2D finite element graph with 1866 nodes and 3538 edges for number of nodes, harmonic mean path, number of components, average shortest path and average betweenness centrality.

Figure 16 :
Figure 16: Visualization of a road network from roadNet-TX with 2001 nodes and 2957 edges rescaled to at least 5900 nodes and 7000 edges.

Figure 17 :
Figure 17: Visualization of a road network from roadNet-TX with 2001 nodes and 2957 edges rescaled to at least 5028 nodes and 7375 edges.

Figure 18 :
Figure 18: Computational results for road network from roadNet-TX with 2001 nodes and 2957 edges rescaled to at least 6000 nodes and 6500 edges.

Figure 19 :
Figure 19: Computational results for road network real water network with 407 nodes and 459 edges rescaled to at least 1098 nodes and 1500 edges.

Figure 20 :
Figure 20: Computational results for finite-element graph with 4704 nodes and 13427 edges rescaled to at least 12700 nodes and 36000 edges.

Figure 21 :
Figure 21: Computational results for power grid graph opsahl-powergrid with with 4941 nodes and 6211 edges rescaled to at least 16500 nodes and 27000 edges.

Figure 22 :
Figure 22: Computational results on performance of planar Musketeer on symmetric pattern with 1141 nodes and 3162 edges to at least 2200 nodes and 6000 edges

Figure 23 :Figure 24 :
Figure 23: Computational results on performance of planar Musketeer on graph for thermal L-Shape Problem with 3025 nodes and 8904 edges to at least 9000 nodes and 12000 edges