Abstract
Both humanmade and natural supply systems, such as power grids and leaf venation networks, are built to operate reliably under changing external conditions. Many of these spatial networks exhibit community structures. Here, we show that a relatively strong connectivity between the parts of a network can be used to define a different class of communities: dual communities. We demonstrate that traditional and dual communities emerge naturally as two different phases of optimized network structures that are shaped by fluctuations and that they both suppress failure spreading, which underlines their importance in understanding the shape of realworld supply networks.
Introduction
Community structures are a fundamental trait of complex networks and have found numerous applications in systems ranging from social networks^{1} to biological networks^{2,3} and critical infrastructures such as power grids^{4}. Typically, communities are defined by a strong connectivity within the community compared to a relatively weak connectivity between different communities^{1,5,6}. They may correspond to functional units of the network, for instance in metabolic networks^{7}, or actual communities in social networks.
Intuitively, community structures play an important role for the spreading of failures or perturbations in networked systems. The low connectivity impedes spreading processes, such that perturbations can be expected to stay within the community, which is both predicted by theory^{8,9} as well as observed in experiments^{10}. Community structures thus provide robustness in complex networks, but other structural patterns may have a comparable effect. In particular, it has been shown that hierarchical structures may provide similar features, for instance in vascular networks of plants^{11,12}.
In this article, we provide a unified view on the role of communities and hierarchies for network robustness based on the concept of graph duality. The dual graph is most naturally defined for spatially embedded networks, i.e., networks that are embedded in the plane without edges crossing each other. This class of networks includes a large variety of manmade and biological systems^{13,14,15,16}. The vertices of the dual correspond to the faces of the original, primal graph. Two dual vertices (faces) are connected if they share at least one edge. Graph duality has been previously used to study fixed points in oscillator networks^{17,18} and to speed up network algorithms^{19,20}. Here we use this concept to reveal patterns in the network structure that are hidden in the primal graph. In particular, we establish dual communities—communities that are defined within the dual graph—and highlight their relation to hierarchical network structures. Furthermore, graph duality readily explains why both weak and strong connections can make a network robust: strong connections in the primal translate into weak connections in the dual and vice versa.
The article is organized as follows. We first demonstrate how different structural patterns impede spreading processes and thus contribute to the robustness of a network. Focusing on flow networks, we formalize the concept of graph duality and establish dual communities. Second, we investigate essential properties of dual communities, in particular their link to hierarchical patterns and the geometry of the community boundaries. Finally, we study the emergence and impacts of communities structures. Using optimization models, we study why networks develop a primal or a dual community structure. We provide a deeper analysis of the link between communities and network robustness by employing different simulation models. Throughout the article we use the terms graph and network interchangeably. The term “graph” stresses the structural aspects while “network” stresses the functional aspects of the system.
Results
Network robustness and community structure
We first highlight how network robustness is related to the presence of communities for selected examples. Robustness is essential for critical infrastructures such as electric power grids. The highvoltage transmission grid of Scandinavia (Fig. 1a, c) has an obvious community structure due to geographic reasons. Finland is only weakly connected to the rest of Scandinavia through two highvoltage transmission lines. We simulate the impact of a transmission line failure, which is the biggest threat for largescale blackouts^{21}. We use the linear power flow or DC approximation^{22,23}, which will be described in detail below. The flow changes after the failure generally decay with the distance to the failing transmission line, but we also observe a strong impact of the community boundary. Flow changes are strongest in the community where the failure occurs, in this case Sweden. They are substantially suppressed in the other community, i.e., Finland, which also reduces the risk of a global cascade of failures.
Remarkably, a similar suppression of failure spreading is realized by strong connections. We consider the venation network of a leaf, which includes a strong central vein separating the left and right half (Fig. 1b, d). The flow of water and nutrients is described by a linear flow network^{11}, which is mathematically equivalent to the linear power flow approximation. If a secondary vein fails, we observe a very similar picture as for the power grid: flow changes generally decay and are strongly suppressed in the other half of the leaf. The central vein itself features large flow changes and thus provides a buffer function. We conclude that weak and strong connections can equally suppress the spreading of failures. We will show that both effects are fully equivalent and that they can be understood in terms of network communities, provided we generalize the definition of communities.
Before we move to a more detailed analysis, we demonstrate the generality of the observed phenomena. We consider a classic model of network cascades^{24,25}. Nodes are either healthy/operational (state 0) or infected/faulty (state 1). A node i gets infected or faulty if the weighted average over all neighbors’ states exceeds a certain threshold ϕ_{i}. Starting from a small amount of nodes in state 1, a cascade may emerge depending on the values ϕ_{i} and the structure of the network. As before, we consider networks which can be separated into two parts by either weak or strong connections (Fig. 1e, f). More precisely, we consider a lattice where the edges in the middle region have a tunable weight w, while all other edges have weight one (see “Methods” for details). We observe that a homogeneous network (w = 1) always leads to a global cascade, where all nodes are infected or faulty in the final state. A boundary, either by weak (w ≪ 1) or strong (w ≫ 1) connections, effectively stops the cascade. Only those nodes are infected, which are located in the same half as the initially infected ones.
Flow networks and dual communities
We have shown that strong connections can divide a network and enhance its robustness similarly as weak connections do. Even more, we can establish a full mathematical equivalence of weak and strong connections in the case of flow networks. This equivalence leads to a generalization of the definition of community structures in complex networks.
Linear flow networks arise in a variety of applications, including electric circuits^{26,27}, power grids^{22,23}, hydraulic networks^{28,29}, and vascular networks of plants^{11}. In these networks, the flow from node i to node j is given by F_{i→j} = w_{ij} ⋅ (θ_{i} − θ_{j}), where w_{ij} is the connectivity or conductivity of the edge (i, j). The nodal variable θ_{i} describes the local voltage or potential in an electric circuit, the voltage phase angle in a power grid, or the pressure in a hydraulic or vascular network. The flows have to satisfy the continuity equation (or Kirchhoff’s current law, KCL) at every node i of the network, ∑_{j} F_{i→j} = P_{i}, where P_{i} is the inflow to the network.
These equations can be recast in a compact matrix notation. Let N denote the number of nodes and M the number of edges in the network, which we assume to be connected. We fix an orientation for each edge to keep track of the direction of flows and define the edgenode incidence matrix \({{{{{{{\bf{I}}}}}}}}\in {{\mathbb{R}}}^{M\times N}\) as
The edge weights are summarized in a diagonal matrix W = diag(w_{1}, …, w_{M}) while all other quantities are summarized in vectors \({{{{{{{\boldsymbol{\theta }}}}}}}}={({\theta }_{1},\ldots,\, {\theta }_{N})}^{\top }\), \({{{{{{{\bf{P}}}}}}}}={({P}_{1},\ldots,\, {P}_{N})}^{\top }\), \({{{{{{{\bf{F}}}}}}}}={({F}_{1},\ldots,\, {F}_{M})}^{\top }\). Note, the ordering of the edges in the edgenode incidence matrix I and the weights in the diagonal matrix W have to be consistent such that the weight of edge k connecting nodes i and j is given by w_{k} = w_{ij}. Then the relation of flows and potentials is given by F = WIθ and Kirchhoff’s current law reads
Equation (2) is a discrete Poisson equation that determines the potential θ up to an irrelevant additive constant. The matrix \({{{{{{{\bf{L}}}}}}}}\in {{\mathbb{R}}}^{N\times N}\) is nothing but the well known graph Laplacian with components
The Laplacian is a central object in spectral graph bisection^{30}, a classic method of community detection, which will be further elaborated below.
The above description focuses on the nodes of the network, with the nodal potentials θ being the central quantity of interest. An equivalent description exists that focuses on the edges of the network and the flows F. The starting point is the KCL I^{⊤}F = P. This linear set of equations is underdetermined in terms of F, such that the general solution can be written as the sum of a particular solution and an arbitrary solution of the associated homogeneous equation, namely
The vector F_{hom} describes a flow without sources or sinks, that is, a collection of cycle flows. The cycle flows form a vector space (the cycle space) such that we can expand each cycle flow into a suitable basis. A distinguished basis exists for plane graphs, i.e., graphs embedded in the plane, which can be constructed in the following way. A face of a plane graph is a region that is bounded by edges, but contains no edges in the interior. The boundary edges of each face then provide one basis vector of the cycle space. Further details are given in the Supplementary Information.
To keep track of the basis, we introduce the cycle edge incidence matrix \({{{{{{{\bf{C}}}}}}}}\in {{\mathbb{R}}}^{M\times (MN+1)}\) with components
Then we can write the general solution of the KCL as
with an arbitrary cycle flow vector f. The actual values of the cycle flows are then determined by Kirchhoff’s voltage law (KVL), which states that the potential differences around any closed cycle sum up to zero. In fact it is sufficient to enforce this for the M − N + 1 basis cycles. We can thus formulate the KVL in terms of the flow vector F as
Crucially, this equation includes the matrix W^{−1} which translates flows into potential differences. Substituting Eq. (6) then yields
Notably, this equation has the same mathematical structure as Eq. (2): It is a discrete Poisson equation with a Laplacian matrix L^{*} and a source term Q = −C^{⊤}W^{−1}F_{part}. However, the Laplacian L^{*} is not defined on the original primal graph, but on the dual graph. The vertices of this dual graph are given by the faces of the primal graph, while two nodes of the dual graph are connected by a dual edge if the corresponding faces share an edge.
Comparing the Laplacian of the primal graph L = I^{⊤}WI to that of the dual graph L^{*} = C^{⊤}W^{−1}C, we see another essential aspect of graph duality: The weights of the dual edges are inverse to the weights of the primal edges. More precisely, we find the dual weights
of the edge that connects the nodes c and d in the dual graph corresponding to faces c and d that share the edge ℓ in the primal graph. This relation shows most clearly why weak and strong connections can both affect the robustness and the community structure of a network. Strong connections in the primal correspond to weak connections in the dual and vice versa. Similarly, a strong central vein in the primal corresponds to weak connections in the dual and thus to a pronounced community structure.
We have now introduced all mathematical tools to identify dual communities in planar complex networks. Starting from the primal network, we identify all faces and define the dual graph with weights given by Eq. (9). Then dual communities can be extracted by means of any standard community detection algorithm.
In the following, we focus on spectral graph bisection because of its direct link to the graph Laplacian—which is the central object in the above analysis. This method relies on the fact that the community structure is encoded in the second smallest eigenvalue of the graph Laplacian λ_{2} ≥ 0, known as the algebraic connectivity or Fiedler value, which vanishes if the graph consists of two disconnected components and increases with increasing connectivity between the communities. The graph nodes are then assigned to one of two communities based on the corresponding eigenvector v_{2}, the Fiedler vector: two vertices j and i are in the same community if they share the same sign of the Fiedler vector^{5}.
where \(h\in {\mathbb{R}}\) is a threshold parameter. Here, we choose h = 0.
This method can be straightforwardly applied to the dual graph, replacing the primal Laplacian L by its dual counterpart L^{*}. The algebraic connectivity of the dual is measured by the second eigenvalue \({\lambda }_{2}^{*}\) and the associated eigenvector is used to identify the dual communities. We find that dual communities appear naturally in realworld networks such as the venation networks of leaves (Fig. 2b, e). In the following, we discuss essential properties of dual communities, in particular their relation to hierarchical structures, and provide a thorough analysis of the dual algebraic connectivity \({\lambda }_{2}^{*}\). We stress that other community detection methods can be applied to the dual graph equally well and yield comparable results (cf. Supplementary Fig. S6).
Dual communities reveal hierarchical organization of supply networks
The spectral clustering method for community detection can be applied to both the primal and the dual graph, revealing different structural information about the network (Fig. 2). Furthermore, we can use this approach to extract a network’s hierarchical organization as follows. Starting from the initial network, we compute the Fiedler vector, identify the communities and then split the network into two parts at the resulting boundary by removing all edges between the communities. Then we iterate the procedure starting from the subgraphs obtained in the previous step. Repeated application of this procedure reveals different boundaries and thus different hierarchies in the primal graph and in its dual (Fig. 2g, see “Methods” for details).
Leaf venation networks are archetypal examples of hierarchically organized networks, with a thick primary vein in the middle and medium secondary veins that supply thin subordinated veins (Fig. 2b). The thick veins separate the network into distinct parts—for instance, the left and right half separated by the primary vein. This characteristic organization is clearly revealed by dual community detection. Spectral graph bisection identifies the primary vein that separates the left and the right half of the leaf. Repeating the bisection then shows that this organizational pattern repeats in a hierarchical order: dual communities are split by secondary veins in a repeated manner (Fig. 2h). Remarkably, an analog decomposition in the original primal graph does not provide any useful information on the network organization.
We conclude that leaf venation networks clearly display a dual community structure, where the boundary of the dual communities coincide with the primary and secondary veins. Hence, dual community detection allows to identify hierarchical organization patterns in complex networks. We will provide a more formal treatment of the relation between strong veins and dual communities below.
As a second example, we now turn to another type of spatially embedded supply networks: power grids. Figure 2c shows the European power transmission grid and its dual graph. Again, a hierarchical decomposition reveals different levels of hierarchies in the grid that correspond to its functional components. These components may also be interpreted geographically: the mountain ranges such as the Pyrenees or the Alps as well as the former Iron Curtain are clearly visible in the decomposition of the primal graph. Remarkably, both primal and dual decompositions provide useful structural information here. In particular, there is a dual community boundary at cut level three that spans Hungary and the border region between Slovenia and Croatia and closely corresponds to a weak spot in the European power system, where the grid was split into two mutually asynchronous fragments on January 8, 2021^{31}. Another split occurred on the 24th of July between Spain and France—where both the primal and the dual decomposition detect a community boundary^{32}.
Although mathematically similar^{12,33,34}, the two types of networks we studied display different structural hierarchies and communities. Whereas leaf venation networks are evolutionarily optimized, the structure of power grids depends strongly on historical aspects and their ongoing transition to include a higher share of renewable energy sources. This transition aspect also manifests in their community structure, as we will see further below.
Connectivity and the geometry of community boundaries
The algebraic connectivity λ_{2} of a graph is closely related to its topological connectivity—the amount of connectivity between the two communities^{35}. For a weighted graph, one can derive the upper bound (see Supplementary Note 2)
where N_{1} and N_{2} respectively count the number of nodes in the two communities. The set S contains all edges which are not within one of the two communities but in between, providing a weak connection of the communities (Fig. 3a). This set is referred to as a cutset: If all edges in S are removed, the graph is cut into the two communities. Notably, the bound becomes exact in the limit of vanishing connectivity (μ_{2} → 0) as shown in the Supplementary Information.
We derive an analogous bound for dual communities, transferring geometric concepts from the primal to the dual. In particular, we derive an analog to the cutset S, which contains all edges, which are elements of neither of the two components. Consider a decomposition of the dual graph G^{*} = (V^{*}, E^{*}), where the dual vertex set V^{*} is separated into two components \({V}_{1}^{*}\) and \({V}_{2}^{*}\). Two faces \(c\in {V}_{1}^{*}\) and \(d\in {V}_{2}^{*}\) are connected in the dual, if they share at least one edge in the primal graph. Hence, we will find a set of primal edges which belong to both of the two components (Fig. 3b). These primal edges, together with their terminal vertices, constitutes a path p in the primal graph. In the following, we will refer to p as a cutpath as its removal disconnects the graph. The edges along the cutpath essentially determine the community structure of the dual graph and its algebraic connectivity. Given a cutpath p, we find the bound
where \({N}_{1,2}^{*}={V}_{1,2}^{*}\) counts the number of nodes in the dual communities. Notably, the expression \({\mu }_{2}^{*}\) does not only provide an upper bound for the algebraic connectivity \({\lambda }_{2}^{*}\), but an approximation that becomes exact in the limit of vanishing dual connectivity. We prove these statements rigorously in the Supplementary Information.
The relation of cutpaths and dual communities is further investigated in Fig. 4 for both synthetic networks and leaf venation networks. We first consider a square lattice with a tunable dual community structure: The edges in the central vein have a higher weight w_{1} than the remaining edges w_{0}. We find that the dual algebraic and topological connectivity \({\lambda }_{2}^{*}\) and \({\mu }_{2}^{*}\) become virtually indistinguishable for w_{1}/w_{0} ≳ 10^{2}. In venation networks, the boundaries between the dual communities, i.e., the cutpaths, correspond to the primal and secondary veins as described above. A good agreement between \({\mu }_{2}^{*}\) and \({\lambda }_{2}^{*}\) is found especially for the two smaller venation networks from the Parkia and Schizolobium family. This result further emphasizes the intimate relation of dual communities and hierarchical organization in complex networks.
Why do primal and dual communities emerge?
Understanding how the structure of optimal supply networks emerges is an important aspect of complex networks research^{11,36,37,38}. In cases where a single source supplies the entire network, it is well established that fluctuations in the supply can cause a transition from a treelike topology to a structure with loops^{11,34,36}. We extend this result by studying how the increase in fluctuations influences the optimal network structure in supply networks with multiple strongly fluctuating sources and weakly fluctuating sinks. This design is highly relevant for many realworld applications, e.g., when considering a power grid that is based on decentralized renewable energy sources that fluctuate more than conventional carriers.
To interpolate between strongly fluctuating sources and weakly fluctuating ones, we first use a similar model as in ref. 36. We consider a linear flow network consisting of a triangular lattice with N nodes of which N_{s} are sources and N − N_{s} are sinks whose outflows are fluctuating iid Gaussian random variables. Additionally, we add fluctuations only to the sources of the networks that can be tuned by the additional variance \({\sigma }_{D}^{2}\) (see “Methods”). We then compute the optimal structure and edge weights of the network that minimize the total dissipated energy \(D={\sum }_{\ell }\langle {F}_{\ell }^{2}\rangle /{w}_{\ell }\) averaged over the fluctuating inflows and outflows. Resources for building the network are assumed to be limited, which translates into the constraint \({\sum }_{e}{w}_{e}^{\gamma }\le 1\). The cost parameter γ quantifies how expensive the increase of an edge weight is and was set to γ = 0.9 for the examples presented in this manuscript (see Supplementary Note 4 for more information). Results for N_{s} = 2 sources are shown in Fig. 5, and further results for N_{s} = 3 are provided in the Supplementary Information.
We find that the optimal network structure changes strongly as the fluctuations increase. For weak fluctuations, \({\sigma }_{D}^{2}\, \approx \,1\), each of the N_{s} sources supplies the surrounding area of the network. Only weak connections are established between the areas to cope with the small residual imbalances. Hence, the optimal networks show a pronounced primal community structure (see Fig. 5a).
For strong fluctuations, \({\sigma }_{D}^{2} \, \gg \, 1\), a local area supply is no longer possible and longdistance connectivity is required. Remarkably, this connectivity is established in one central vein that links the two fluctuating sources (see Fig. 5b). As a consequence, the optimal networks show a pronounced dual community structure similar to leaf venation networks. We can capture the transition from a primal to a dual community structure in terms of the primal and dual Fiedler values (Fig. 5e). Increasing \({\sigma }_{D}^{2}\), we observe a smooth crossover from primal communities with λ_{2} → 0 to dual communities with \({\lambda }_{2}^{*}\to 0\). We note that a similar picture is found if the Fiedler values λ_{2} and \({\lambda }_{2}^{*}\) are replaced by another measure such as the modularity (see Supplementary Fig. S1). We conclude that optimal supply networks typically have a community structure—whether it is primal or dual depends on the degree of fluctuations.
Strikingly, an analogous transition is observed for actual power transmission grids when optimizing the network structure for different levels of fluctuating renewable energy sources. We consider the European power transmission grid and optimize its network structure for different carbon dioxide (CO_{2}) emission reduction targets compared to the year 1990 ranging from 60% to 100% reduction using the open energy system model “PyPSAEur”^{39} (see “Methods” for details). In Supplementary Figs. S3 and S4, we illustrate how the generation mix in the optimized power system changes for different emission scenarios from conventionally dominated grids to highly renewable grids.
We find that the decarbonization of power generation drives a transition from primal to dual communities in the grid. A reduction in generationbased CO_{2} emissions corresponds to an increased share of power being produced by fluctuating renewable energy sources. With increasing penetration of fluctuating renewables, we observe a decrease in the dual Fiedler value \({\lambda }_{2}^{*}\) and an increase in the primal Fiedler value λ_{2}, which indicates a transition from primal to dual communities in the optimized networks (Fig. 5j). Hence, the primaldual transition emerges both in fundamental models and in realistic highresolutions simulations of spatial networks.
How do primal and dual communities determine network robustness?
Primal and dual communities both impede the spreading of failures and thus improve the robustness of complex networks as shown in Fig. 1. We will now provide a more detailed and quantitative analysis of this connection for two important systems: flow networks and coupled oscillator networks.
We first consider linear flow networks using the theoretical framework introduced above. Robustness is quantified by a sensitivity factor, measuring the response of the network flows F to a perturbation. As a perturbation, we add an inflow ΔP at a node v_{1} and an outflow of the same amount at another node v_{2}. Here, we focus on the case where v_{1} and v_{2} are the two end nodes of an edge e = (v_{1}, v_{2}) and treat the general case in the Supplementary Information. The source vector in the Poisson Eq. (2) then changes as
and \({{{{{{{{\bf{l}}}}}}}}}_{e}\in {{\mathbb{Z}}}^{M}\) is the indicator function for edge e, which is equal to one at the positions indicated by the subscript and zero otherwise. Inverting the discrete Poisson Eq. (2), we then find that the network flows change by the amount
where L^{†} is the Moore–Penrose pseudoinverse of the primal graph Laplacian. We then define a sensitivity factor as the ratio of the flow change at edge ℓ and the perturbation strength ΔP as^{40,41}
We note that the sensitivity factor is widely used in the context of power system security analysis, where it is referred to as a power transfer distribution factor^{40,41}. Importantly, the sensitivity factor may also be used to simulate the failure of an edge e = (v_{1}, v_{2}) by choosing the inflow ΔP accordingly (see Supplementary Information).
The sensitivity factor \({\eta }_{{v}_{1},{v}_{2},\ell }\) elucidates the relation between primal communities and network robustness^{8}. In the Supplementary Information, we treat the limiting case of vanishing connectivity between the communities and show the following: If the edges e and ℓ are in different communities, η vanishes in the same way as the Fiedler value λ_{2}. If the edges e and ℓ are in the same community, η remains finite as λ_{2} → 0.
Remarkably, we can find an analogous description in the dual graph^{19,20}. In Eq. (4), we choose the particular solution as ΔF_{part} = ΔP l_{e}. We can then compute the cycle flows f from Eq. (8) and substitute the result into Eq. (6) to obtain the change of network flows^{19,20}
The sensitivity factor for all edges ℓ ≠ e thus reads
We see that the dual Laplacian L^{*} contributes to the sensitivity factor \({\eta }_{{v}_{1},{v}_{2},\ell }\) in exactly the same way as the primal Laplacian L in Eq. (15). Hence, we conclude that primal and dual community structures determine network flows in an equivalent manner. If the edges e and ℓ are in different dual communities, η will vanishes proportional to the dual Fiedler value \({\lambda }_{2}^{*}\). If the edges e and ℓ are in the same community, η remains finite in the limit \({\lambda }_{2}^{*}\to 0\).
We now quantify this effect. To analyze the impact of a community structure, we consider a square lattice with tunable edge weights. We either reduce the edge weights w_{ℓ} across the boundary, i.e., in the cutset, to induce a primal community structure, or we increase the edge weights w_{ℓ} along the boundary, i.e., in the cutpath, to induce a dual community structure (Fig. 6a, b). We then consider an inflow and simultaneous outflow ΔP at two nodes v_{1} and v_{2}, respectively, that are connected via an edge e = (v_{1}, v_{2}). We then compare the resulting flow changes in the same (S) and the other (O) community as the given edge e. To this end, we evaluate the ratio of flow changes R(e, d) in the two communities at a given distance d to the trigger edge e^{33}
Here, \({\langle \cdot \rangle }_{d}^{\ell \in C}\) denotes the average over all edges ℓ in a community C at a given distance d to the trigger edge e. To be able to neglect the effect of a specific edge and the distance, we average over all possible trigger edges e and distances d to arrive at the mean flow ratio
The mean flow ratio ranges from R ≈ 0 if the other module is weakly affected, i.e., there is a strong community effect, to R ≈ 1 if there is no noticeable effect. We note that R describes flow changes after perturbations in the inflows and outflows as well as flow changes as a result of the complete failure of edges (see Supplementary Information).
Figure 6 illustrates that both primal and dual communities suppress flow changes in the other community. The mean flow ratio R decays for either community structure. In particular, this decay is wellcaptured by the Fiedler value of the primal (λ_{2}) and the dual (\({\lambda }_{2}^{*}\)) graph.
These findings are not restricted to linear flow networks, but hold for all diffusively coupled networked systems. We illustrate this effect for a network of secondorder phase oscillators that arises in the analysis of electric power grids^{18,42} or mechanically coupled systems^{43} and as a generalization of the celebrated Kuramoto model^{44}. The phase ϑ_{i}(t) of each oscillator i = 1, …, N evolves according to
where M_{i} is the inertia and D_{i} the damping of the ith oscillator. To analyze the impact of community structures, we consider a honeycomb lattice with tunable edge weights, with either low weights w_{ij} ≤ 1 across the boundary or high weights w_{ij} ≥ 1 along the boundary. The weights of all remaining edges are set to w_{ij} = 1 and w_{ij} = 0 if no edge exists between nodes i and j.
We now investigate how the steady states of such a network react to a localized perturbation near the community boundary (Fig. 7a, b). The oscillators relax to a phaselocked state after a short transient period, but the steadystate phases are shifted by an amount Δϑ_{i}. We recall that a global phase shift is physically irrelevant and is henceforth discarded. The response ∣Δϑ_{i}∣ crucially depends on the location of the oscillator—being strongly suppressed across the community boundary (Fig. 7a–d). To evaluate the impact of the network structure, we quantify the overall network response by the variance of the phases within a community C,
This overall response is generally suppressed in the nonperturbed community, for primal as well as for dual communities. The more pronounced the community structure, the stronger the suppression of the response (Fig. 7e). We note that for the current example some differences exist between primal and dual communities. In particular, statistic fluctuations are larger in the case of primal communities.
We conclude that the impact of community boundaries, both primal and dual, extends to all diffusively coupled networked systems. Our finding can be further substantiated by a linear response analysis^{8}, which highlights the structural similarity to linear flow networks. Furthermore, we note that related phenomena were observed for models of information diffusion in networks of different modularity^{25}. This finding is closely related, as the diffusion model includes an averaging over all adjacent nodes in the network.
Discussion
We have introduced a way to define and identify dual communities in planar graphs. We demonstrated that both primal and dual community structures emerge as different phases of optimized networks – whether the one or the other is realized in a given optimal network depends on the degree of fluctuations. In addition to that, both types of communities have the ability to suppress failure spreading. They are thus optimized to limit the effect of edge failures or other perturbations.
An important difference between primal and dual communities is the fact that the former are based on a weak connectivity, while dual communities require a strong connectivity. This has significant consequences for supply networks such as power grids. Several approaches have been discussed to limit the connectivity of power grids to prevent the spreading of cascading failures. This includes concepts of microgrids^{45} as well as intentional islanding^{46} or treepartitioning^{47,48}. However, future power grids will require more, not less connectivity to transmit renewable energy over large distances ^{49,50}. Dual communities might resolve this conundrum, as they prevent failure spreading from one community to the other one, without limiting the network’s ability to transmit energy. This is in stark contrast to primal communities that limit failure spreading from one community to the other one, but also supply. Thus, the construction of dual communities may also serve as a strategy against failure spreading, in line with other ideas brought forward recently^{33}.
Dual communities may be detected using the same techniques as for primal communities once the dual graph is constructed. We here focus on classical spectral methods based on the graph Laplacian, as this matrix naturally arises in the study of graph duality and linear flow networks. By now, numerous algorithms for community detection have been developed that outperform spectral methods depending on the respective application^{5,51,52}. All these algorithms can be readily applied to the dual graph. A short analysis for a selected example is provided in the Supplementary Information. One challenge remains for the generalization of this approach. For planar graphs, the dual is constructed by a straightforward geometric procedure. For nonplanar graphs, a geometric analysis is much more involved^{53}. A dual can be constructed algebraically by choosing a basis of the cycle space. However, there is no distinguished basis such that the algebraic dual is not unique. The detailed analysis of community boundaries, in particular the inequality (Eq. (12)), may provide an alternative route to generalize the definition of network communities. For instance, one may choose a decomposition to minimize the dual topological connectivity \({\mu }_{2}^{*}\).
Finally, we note that other approaches have been put forward to generalize the definition of network communities beyond the paradigm of strong mutual connectivity. For instance, communities can be defined in terms of the similarity of the connectivity of nodes (see, e.g., refs. 54, 55) or from spreading processes^{56}. The graph dual approach presented here emphasizes the role of the community boundaries, both in the definition of the community structure and in its impact on spreading processes and network robustness. Furthermore, graph duality provides a rigorous algebraic justification for our generalization of community structures.
Methods
Global cascade model
In Fig. 1, we show results from a classic model of global cascades. The state of each node i = 1, …, N in time step t is denoted as s_{i}(t) ∈ {0, 1}, encoding healthy/operational and infected/faulty, respectively. A node becomes infected/faulty in time step t + 1 if the weighted average of the neighboring nodes exceeds a threshold ϕ_{i}:
This model is iterated until no further changes of the node states occur.
We simulate this model on a square lattice with inhomogeneous edge weights. A fraction p_{e} = 0.8 of edges connecting the center nodes of the lattice with its nearest neighbors is selected at random. The weight of these edges is set to w_{ij} = w_{ℓ}, where w_{ℓ} is a tunable parameter, while all other edges have weight w_{ij} = 1. At time t = 0, we choose a fraction ρ_{0} = 0.05 of all nodes in the left part and set them to state 1, while all other nodes are in state 0. For each value of the parameter w_{ℓ}, we repeat the simulation for 1000 random initial conditions and record the fraction of nodes in state 1, denoted as ρ_{∞}.
Creation of dual graphs: planar networks
In this manuscript, we mostly restrict our analysis to planar, connected graphs. A graph G = (V, E) with vertex set V and edge set E is called planar if it may be drawn in the plane without two edges crossing^{57}. For a plane graph G, it is straightforward to establish a duality to another graph, referred to as the plane dual or simply dual graph and denoted as G^{*}. The dual graph is constructed using the cycles of graph G where a cycle is defined to be a path that starts and ends in the same vertex consisting of otherwise distinct vertices. For a graph with M edges and N nodes, these cycles form the graph’s cycle space of dimension N^{*} = M − N + 1. A particular basis of this space is given by the faces of the plane embedding, such that the dual graph G^{*} = (V^{*}, E^{*}) has a vertex corresponding to each face. Two dual vertices \({v}_{1}^{*}\) and \({v}_{2}^{*}\) are connected by a dual edge \({e}^{*}=({v}_{1}^{*},\, {v}_{2}^{*})\in {E}^{*}({G}^{*})\) if the two corresponding cycles share an edge. For a weighted graph, the edge weight of the dual edge is chosen to be the inverse of the corresponding edge shared by the two cycles. Furthermore, we adopt the following convention; if two cycles share k edges e_{1}, . . , e_{k} with weights w_{1}, . . . , w_{k}, we lump them together into a single dual edge e^{*} with edge weight \({w}^{*}=\mathop{\sum }\nolimits_{i=1}^{k}{w}_{i}^{1}\) thus avoiding multiedges in the dual graph and refer to this model as the reduced dual graph. Note that the definition of the edgecycle incidence matrix C needs to be adjusted for the reduced dual graph.
Creation of dual graphs: nonplanar networks
For nonplanar networks, the basis of the cycle space may no longer be uniquely determined based on the graph’s embedding. Different basis choices result in different dual graphs. When calculating the dual graph of the nonplanar European topology shown in Fig. 5f–g, we used the graphs’ minimum cycle basis to create the dual graph.
Hierarchical decomposition of dual graph
We assign m hierarchy levels based on repeated spectral bisection of the dual graph using the following procedure:

1.
Assign dual communities to the graph by making use of the Fiedler vector \({{{{{{{{\bf{v}}}}}}}}}_{2}^{*}\) of the dual graph G^{*}

2.
Identify the edges that lie on the boundary between the two communities by checking for edges in the primal shared by faces corresponding to dual nodes of both communities

3.
Remove the boundary edges from the graph thus creating two primal subgraphs G_{1} and G_{2}

4.
Repeat the process m times
Building supply networks with fluctuating sources
Our framework extends the fluctuating sink model proposed by Corson^{36} where a single, fluctuating source supplies the remaining network. To this end, we consider a linear flow network with sources and sinks attached to the nodes and model the sinks as Gaussian random variables \(P\in {{{{{{{\mathcal{N}}}}}}}}(\mu,\, \sigma )\). In contrast to previous work, we consider multiple sources, N_{s} in number, whose statistics can be derived from the statistics of the sinks due to the fact that the in and outflows at the nodes need to sum to zero (see Supplementary Information). We then add additional fluctuations to the sources that are built using Dirichlet random variables X_{i} ~ Dir(α). The fluctuations are constructed such that they only influence the statistics of the sources and their variance is tuned by a single parameter α. To be able to tune the influence of this additive noise variable, we introduce a scale parameter \(K\in {\mathbb{R}}\). The inflow at a source at a given point in time is then given by (see Supplementary Information)
where P_{i} are the outflows at the sinks. Here, we arranged the node order such that the sources have indices 1, …, N_{s} and sinks are numbered as N_{s} + 1, …, N. To produce Fig. 5, we considered a network with N_{s} = 2 and fix the parameters of the Gaussian distribution as μ = −1, σ = 0.1. The scale parameter is set to K = 500 and the parameter α controlling the statistics of the Dirichlet distribution is varied in the interval α ∈ [10^{−2}, 10^{4}], thus changing the variance of the Dirichlet variables \({\sigma }_{D}^{2}={K}^{2}\frac{({N}_{s}1)}{{N}_{s}^{2}({N}_{s}\alpha+1)}\) (see Supplementary Information).
Analysis of power grid datasets
The networks shown in Fig. 5f, g were determined using the open energy system model ’PyPSAEur’ costoptimizing the generation infrastructure and operation as well as the transmission grid for different levels of carbondioxide emission reductions with respect to the emission levels in 1990. For each target carbondioxide emission reduction level, the network is optimized for an entire year with the weather conditions of 2013 and 3hourly resolution (see ref. 39 for further details on the optimization model). To analyze the network topology, we set the weight w_{ℓ} of a line ℓ to the maximal apparent power that can flow through it. Note that this is different from weighting the line by its line susceptance and allows us to also incorporate highvoltage DC lines. To determine the level of fluctuating renewables shown in Fig. 5f, g, we calculate the share of the total annual generation in the entire system that is produced by fluctuating renewables. To this end, we assume that the following technologies are fluctuating renewable energy sources: offshore wind AC, offshore wind DC, onshore wind, runoftheriver hydroelectricity (ror) and solar. In Supplementary Figs. S3 and S4 we show as an example the generation for two months and carbon emission reduction levels over time and on the network level.
Data availability
The topology of the Central European power grid have been extracted from the open European energy system model PyPSAEur^{39}, which is fully available online^{58}. Leaf data was provided by the authors of ref. 59 and is available from the respective authors upon request. The leaf venation networks are based on microscopic recordings. Edge conductivities w_{ij} are assumed to scale with the radius r_{ij} of the corresponding vein (i, j) as \({w}_{ij}\propto {r}_{ij}^{4}\) according to the HagenPoisseuille law (see ref. 60 for a detailed discussion). We used the radius in pixels at a resolution of 6400 dpi. The data generated in this study (effective topology of power grid networks and selected leaf venation networks) as well as essential computer code for data processing have been deposited in a Zenodo repository^{61}.
Code availability
Computer code is available on github^{62} with the specific version used in this publication being archived at Zenodo^{61}.
References
Radicchi, F., Castellano, C., Cecconi, F., Loreto, V. & Parisi, D. Defining and identifying communities in networks. Proc. Natl Acad. Sci. USA 101, 2658–2663 (2004).
Girvan, M. & Newman, M. E. J. Community structure in social and biological networks. Proc. Natl Acad. Sci. USA 99, 7821–7826 (2002).
Fletcher, R. J. et al. Network modularity reveals critical scales for connectivity in ecology and evolution. Nat. Commun. 4, 2572 (2013).
Shekhtman, L. M., Shai, S. & Havlin, S. Resilience of networks formed of interdependent modular networks. N. J. Phys. 17, 123007 (2015).
Newman, M. E. J. Modularity and community structure in networks. Proc. Natl Acad. Sci. USA 103, 8577–8582 (2006).
Newman, M. E. J. Communities, modules and largescale structure in networks. Nat. Phys. 8, 25–31 (2012).
Guimera, R. & Nunes Amaral, L. A. Functional cartography of complex metabolic networks. Nature 433, 895–900 (2005).
Manik, D. et al. Network susceptibilities: theory and applications. Phys. Rev. E 95, 012319 (2017).
May, R. M. Will a large complex system be stable? Nature 238, 413 (1972).
Gilarranz, L. J., Rayfield, B., LiñánCembrano, G., Bascompte, J. & Gonzalez, A. Effects of network modularity on the spread of perturbation impact in experimental metapopulations. Science 357, 199–201 (2017).
Katifori, E., Szöllősi, G. J. & Magnasco, M. O. Damage and fluctuations induce loops in optimal transport networks. Phys. Rev. Lett. 104, 048704 (2010).
Gavrilchenko, T. & Katifori, E. Resilience in hierarchical fluid flow networks. Phys. Rev. E 99, 012321 (2019).
Viana, M. P., Strano, E., Bordin, P. & Barthelemy, M. The simplicity of planar networks. Sci. Rep. 3, 3495 (2013).
Barthélemy, M. Spatial networks. Phys. Rep. 499, 1–101 (2011).
Barthelemy, M. Morphogenesis of Spatial Networks (Springer International Publishing, 2018).
Barthelemy, M. The Structure and Dynamics of Cities: Urban Data Analysis and Theoretical Modeling (Cambridge University Press, 2016).
Manik, D., Timme, M. & Witthaut, D. Cycle flows and multistability in oscillatory networks. Chaos 27, 083123 (2017).
Dörfler, F., Chertkov, M. & Bullo, F. Synchronization in complex oscillator networks and smart grids. Proc. Natl Acad. Sci. USA 110, 2005–2010 (2013).
Ronellenfitsch, H., Timme, M. & Witthaut, D. A dual method for computing power transfer distribution factors. IEEE Trans. Power Syst. 32, 1007–1015 (2017).
Ronellenfitsch, H., Manik, D., Hörsch, J., Brown, T. & Witthaut, D. Dual theory of transmission line outages. IEEE Trans. Power Syst. 32, 4060–4068 (2017).
Pourbeik, P., Kundur, P. & Taylor, C. The anatomy of a power grid blackout  root causes and dynamics of recent major blackouts. IEEE Power Energy Mag. 4, 22–29 (2006).
Wood, A. J., Wollenberg, B. F. & Sheblé, G. B. Power Generation, Operation and Control (John Wiley & Sons, 2014).
Purchala, K., Meeus, L., Dommelen, D. V. & Belmans, R. Usefulness of DC power flow for active power flow analysis. In IEEE Power Engineering Society General Meeting, Vol. 1 454–459 (IEEE, 2005).
Watts, D. J. A simple model of global cascades on random networks. Proc. Natl Acad. Sci. USA 99, 5766–5771 (2002).
Nematzadeh, A., Ferrara, E., Flammini, A. & Ahn, Y.Y. Optimal network modularity for information diffusion. Phys. Rev. Lett. 113, 088701 (2014).
Bollobás, B. Modern Graph Theory. No. 184 in Graduate Texts in Mathematics (Springer, 1998).
Dörfler, F., SimpsonPorco, J. W. & Bullo, F. Electrical networks and algebraic graph theory: models, properties, and applications. Proc. IEEE 106, 977–1005 (2018).
Hwang, N. & Houghtalen, R. Fundamentals of Hydraulic Engineering Systems (Prentice Hall, 1996).
Díaz, S., González, J. & Mínguez, R. Observability analysis in water transport networks: algebraic approach. J. Water Resour. Planning Manag. 142, 04015071 (2016).
Fortunato, S. Community detection in graphs. Phys. Rep. 486, 75–174 (2010).
European Network of Transmission System Operators for Electricity (ENTSOE). Continental Europe synchronous area separation on 08 January 2021. ICS Investigation Expert Panel  final report. https://eepublicdownloads.azureedge.net/cleandocuments/SOCdocuments/SOCReports/entsoe_CESysSep_Final_Report_210715.pdf (2021).
European Network of Transmission System Operators for Electricity (ENTSOE). Outage of FrenchSpanish interconnection on 24 July 2021  update. https://www.entsoe.eu/news/2021/08/20/outageoffrenchspanishinterconnectionon24july2021update/ (2021).
Kaiser, F., Latora, V. & Witthaut, D. Network isolators inhibit failure spreading in complex networks. Nat. Commun. 12, 3143 (2021).
Kaiser, F., Ronellenfitsch, H. & Witthaut, D. Discontinuous transition to loop formation in optimal supply networks. Nat. Commun. 11, 5796 (2020).
Fiedler, M. Algebraic connectivity of graphs. Czechoslovak Math. J. 23, 298–305 (1973).
Corson, F. Fluctuations and redundancy in optimal transport networks. Phys. Rev. Lett. 104, 048703 (2010).
Bohn, S. & Magnasco, M. O. Structure, scaling, and phase transition in the optimal transport network. Phys. Rev. Lett. 98, 088702 (2007).
Dodds, P. S. Optimal form of branching supply and collection networks. Phys. Rev. Lett. 104, 048702 (2010).
Hörsch, J., Hofmann, F., Schlachtberger, D. & Brown, T. PyPSAeur: an open optimisation model of the european transmission system. Energy Strategy Rev. 22, 207–215 (2018).
Guo, J., Fu, Y., Li, Z. & Shahidehpour, M. Direct calculation of line outage distribution factors. IEEE Trans. Power Syst. 24, 1633–1634(2009).
Strake, J., Kaiser, F., Basiri, F., Ronellenfitsch, H. & Witthaut, D. Nonlocal impact of link failures in linear flow networks. N. J. Phys. 21, 053009 (2019).
Motter, A. E., Myers, S. A., Anghel, M. & Nishikawa, T. Spontaneous synchrony in powergrid networks. Nat. Phys. 9, 191–197 (2013).
Dörfler, F. & Bullo, F. Synchronization in complex networks of phase oscillators: a survey. Automatica 50, 1539–1564 (2014).
Acebrón, J. A., Bonilla, L. L., Vicente, C. J. P., Ritort, F. & Spigler, R. The kuramoto model: a simple paradigm for synchronization phenomena. Rev. Mod. Phys. 77, 137 (2005).
Lasseter, R. H. Microgrids. In 2002 IEEE Power Engineering Society Winter Meeting Conference Proceedings (Cat. No. 02CH37309), Vol. 1 305–308 (IEEE, 2002).
Mureddu, M., Caldarelli, G., Damiano, A., Scala, A. & MeyerOrtmanns, H. Islanding the power grid on the transmission level: less connections for more security. Sci. Rep. 6, 1–11 (2016).
Bialek, J. W. & Vahidinasab, V. Treepartitioning as an emergency measure to contain cascading line failures. IEEE Trans. Power Syst. 37, 467–475 (2021).
Zocca, A., Liang, C., Guo, L., Low, S. H. & Wierman, A. A spectral representation of power systems with applications to adaptive grid partitioning and cascading failure localization. Preprint at https://arxiv.org/abs/2105.05234 (2021).
Schlachtberger, D. P., Brown, T., Schramm, S. & Greiner, M. The benefits of cooperation in a highly renewable european electricity network. Energy 134, 469–481 (2017).
Tröndle, T., Lilliestam, J., Marelli, S. & Pfenninger, S. Tradeoffs between geographic scale, cost, and infrastructure requirements for fully renewable electricity in europe. Joule 4, 1929–1948 (2020).
Peixoto, T. P. Hierarchical block structures and highresolution model selection in large networks. Phys. Rev. X 4, 011047 (2014).
Ghasemian, A., Hosseinmardi, H. & Clauset, A. Evaluating overfit and underfit in models of network community structure. IEEE Trans. Knowledge Data Eng. 32, 1722–1735 (2019).
Modes, C. D., Magnasco, M. O. & Katifori, E. Extracting hidden hierarchies in 3D distribution networks. Phys. Rev. X 6, 031009 (2016).
Moore, C., Yan, X., Zhu, Y., Rouquier, J.B. & Lane, T. Active learning for node classification in assortative and disassortative networks. In Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining 841–849 (ACM, 2011).
Garcia, J. O., Ashourvan, A., Muldoon, S., Vettel, J. M. & Bassett, D. S. Applications of community detection techniques to brain graphs: algorithmic considerations and implications for neural function. Proc. IEEE 106, 846–867 (2018).
Schaub, M. T., Lehmann, J., Yaliraki, S. N. & Barahona, M. Structure of complex networks: quantifying edgetoedge relations by failureinduced flow redistribution. Netw. Sci. 2, 66–89 (2014).
Diestel, R. Graph Theory (Springer, 2000).
Hörsch, J., Neumann, F., Hofmann, F., Schlachtberger, D. & Brown, T. PyPSAEur: an open optimisation model of the european transmission system (Dataset). https://doi.org/10.5281/zenodo.3886532 (2020).
Ronellenfitsch, H., Lasser, J., Daly, D. C. & Katifori, E. Topological phenotypes constitute a new dimension in the phenotypic space of leaf venation networks. PLOS Comput. Biol. 11, e1004680 (2015).
Coomes, D. A., Heathcote, S., Godfrey, E. R., Shepherd, J. J. & Sack, L. Scaling of xylem vessels and veins within the leaves of oak species. Biol. Lett. 4, 302–306 (2008).
Böttcher, P. C. & Kaiser, F. Data and code accompanying “Dual communities in spatial networks”. https://doi.org/10.5281/zenodo.7243770 (2022).
Böttcher, P. C. & Kaiser, F. Dual communities. https://github.com/phboett/dualcommunities (2022).
Acknowledgements
We thank Torsten Eckstein for providing some of the digitized leaf networks, Tom Brown and Fabian Neumann for providing us with the optimized power grids, and Eleni Katifori for helpful discussions. We gratefully acknowledge support from the German Federal Ministry of Education and Research (BMBF) via the grant “CoNDyNet2” with grant no. 03EK3055B, the Helmholtz Association via the grant “Uncertainty Quantification – From Data to Reliable Knowledge (UQ)” with grant no. ZTI0029 and the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) with grant No. 491111487.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Contributions
D.W. conceived research and acquired funding. F.K. and D.W. designed research. F.K. carried out all numerical simulations. F.K. and P.C.B. evaluated the results and designed the figures. All authors contributed to discussing the results and writing the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks Wenjun Mei, Talal Rahwan, and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Kaiser, F., Böttcher, P.C., Ronellenfitsch, H. et al. Dual communities in spatial networks. Nat Commun 13, 7479 (2022). https://doi.org/10.1038/s41467022349396
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41467022349396
This article is cited by

Collaboration and competition spatial complex networks in regional science
Journal of Ambient Intelligence and Humanized Computing (2023)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.