{'fraction_non_alphanumeric': 0.03406250964178828, 'fraction_numerical': 0.007775138070408195, 'mean_word_length': 4.776510425949029, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Revealing In-Block Nestedness: detection and benchmarking

As new instances of nested organization --beyond ecological networks-- are discovered, scholars are debating around the co-existence of two apparently incompatible macroscale architectures: nestedness and modularity. The discussion is far from being solved, mainly for two reasons. First, nestedness and modularity appear to emerge from two contradictory dynamics, cooperation and competition. Second, existing methods to assess the presence of nestedness and modularity are flawed when it comes to the evaluation of concurrently nested and modular structures. In this work, we tackle the latter problem, presenting the concept of \textit{in-block nestedness}, a structural property determining to what extent a network is composed of blocks whose internal connectivity exhibits nestedness. We then put forward a set of optimization methods that allow us to identify such organization successfully, both in synthetic and in a large number of real networks. These findings challenge our understanding of the topology of ecological and social systems, calling for new models to explain how such patterns emerge.


I. INTRODUCTION
The identification of macroscale connectivity patterns has been central to the development of network science. Beyond the inherent methodological challenges of this task, ascertaining them is of relevance to the specific disciplines and to the area as a whole, inasmuch they are the outcome of distinct microscopic mechanisms of network formation. It is in this context -i.e. understanding network architecture as an emergent feature-that nestedness and modularity arise as prominent macro-structural signatures to study.
The concept of nestedness was first coined in biology to characterize the spatial distribution of biotas in isolated, yet spatially-related landscapes [1], and later found to describe large families of inter-species cooperative relations [2]. In structural terms, a perfectly nested pattern is such that the set of connections of any given node is a subset of the relationships of larger degree ones [3]; see Fig. 1 (left). Nestedness has imposed itself as a landmark feature in mutualistic interactions, with an emphasis in natural ecosystems, triggering a large amount of research spanning fieldwork [2], modeling [4] and simulation [5]. Beyond natural systems, nestedness emerges as well in social, technical, and economic systems, e.g. industrial relationships [4,6,7], international trade [8], information ecosystems [9], anthropology [10] and knowledge production [11]. In socio-economic systems, epitome of this property in unipartite networks, emergence of nestedness is originated in agents attempting to maximize their own centrality [12][13][14].
On the other side, the identification of modular patterns in networks stands as one of the hallmarks in the area with prominent precedents in social network analysis [15]. Besides social systems, networks with significant community structure, see Fig. 1 (middle), appear in multiple contexts [16], like biology [17] or cognitive science [18]. It implies the existence of subgroups of nodes, strongly connected within but loosely connected to nodes outside. The identification and analysis of community structure constitutes itself a sub-area of network science. It poses challenges with respect to detection algorithms, empirical problems, applications and conclusions derived [19].
Nestedness and modularity have been often treated as incompatible architectures, since they are thought to emerge from conflicting (respectively, cooperative and competitive) dynamics [20]. Thus, most studies have focused exclusively on either of them. The existence of systems which combine both patterns has been largely overlooked, despite challenging indications in natural [21][22][23][24] and social ecosystems [9]. As of now, the proper identification of such compound structures lays beyond the capabilities of state-of-the-art techniques.
In the scarce existing literature we identify two different approaches. The first operates in parallel, measur- Rows and columns have been ordered by degree. Center: Example of a network with block structure -blocks are typically referred to as communities and compartments in the network science [16] and the ecology [21] literature, respectively. The network exhibits high internal connectivity between nodes of the same block and low connectivity between nodes that belong to different blocks. Right: Example of a network with in-block nested (IBN) structure. Nodes within blocks exhibit nested structure. Vertical and horizontal lines are a visual guide to show the existing blocks.
ing modularity and nestedness independently [9,23,25], with the obvious drawback that these properties are treated as emerging unrelatedly. The second approach operates sequentially: After a proper identification of a partition (usually in terms of modularity [26]), it computes the nestedness (usually in terms of NODF [27]) locally for each block [22,24]. In consequence, modularity takes functional precedence relegating nestedness from a macro-to a mesoscopic pattern. Both approaches overlook that these two network patterns are inherently intertwined and thus cannot be evaluated using independent metrics.
To be precise, the presence of modules places hard limits to the extent of nestedness that a network can exhibit ( Fig. 2A); and, on the other direction, detected communities in a globally nested system leads to aberrant, hardly interpretable modules [22] (see Fig. 2F and the relative discussion in the Results section). As it is expected, the modularity score is sensitive to the number of communities (Fig. 2B), but not to the shape of the nested structure. Overall, these in-block nested (IBN) structures are highly undetectable if the network contains few communities and/or the nested structure within the communities is very stylized (Fig. 1, right).
Beyond the methodological challenges, there exists an important epistemological aspect which cannot be overlooked. In most scenarios, the boundaries of the system under consideration are imprecise because the researchers, albeit involuntarily, impose a discretionary observation scale to it. Extending the realm of observation, the network structure can parsimoniously be expected to show a set of loosely interconnected blocks. This is particularly evident in natural ecosystems [28], where, in general, no precise geographic boundaries can be defined; but also in social networks, when it comes to decide which subjects should be included or not in a specific study.
The paper is organized as follows: to overcome the limitations of existing approaches, Section II introduces a compact methodological framework that jointly consid-ers both patterns (block -or compartmental-structure and within-block nestedness). Our methodology can unveil the existence of IBN structures, as shown in Section III for a suitable benchmark. We then investigate, in Section IV, the question of how general (or anecdotal) such property is. We show that a large number of real datasets exhibit in-block nested structures that would have gone undetected under conventional modularity optimization/nestedness detection techniques. Our findings indicate that these previously-overlooked structures are in fact common in ecological and social systems. This opens a new direction for the structural analysis of ecological and social systems, discussed in Section V, calling as well for new models to explain how IBN structures emerge.

II. DEFINITION AND QUANTIFICATION OF IN-BLOCK NESTEDNESS
In this Section, we develop a proper formulation of the problem of determining to what extent a given network is organized as loosely interconnected blocks, each of them internally nested. We begin by defining in a congruent manner both, global nestedness and the new in-block nestedness fitness I. In particular, maximizing the IBN fitness function I allows us to unveil the best node partition in terms of IBN structure. We analyze synthetic networks to show that I-maximization allows us to reconstruct ground truth IBN structures that would have gone undetected under the widely-used modularity optimization. We then proceed to analyze a large set of real networks -originated in the most varied disciplinesto evince that this type of structures is indeed a common occurrence in both uni-and bipartite networks of diverse nature.

A. A nestedness measure
Without loss of generality, consider a bipartite network, describing a relationship between two sets G = {s, t, . . . } and Γ = {σ, τ, . . . } with cardinalities N r and N c respectively. The bipartite network can be represented as a binary adjacency matrix A whose elements are A s,τ = 1 if a relationship between elements s and τ exists, or zero otherwise. In the same spirit as the measure Node Overlap-Decreasing Fill [27] (NODF), we introduce the global nestedness fitness N which measures the amount of global overlap between row and column pairs where k i corresponds to the degree of the element i (regardless on whether it belongs to G or Γ); Θ(·) is the Heaviside step function (such that the only contributing terms are those in which the outer index has larger degree than the inner); O ·,· measures the degree of overlap between row and column pairs as: It is important to remark that Eq. 1 weighs linearly the contribution of rows and columns to N (instead of quadratic weights as in NODF [27]). This is preferable when the difference between the number of rows and columns is considerable.

B. Recasting nestedness at the mesoscale level
We now introduce two new elements that allow us to generalize N to the case where nested structures exist at a mesoscopic scale: a membership variable and a null model. First, we consider that both sets of nodes are partitioned into C disjoint subsets, termed blocks. This implies that for each node i, it is possible to define a membership variable α i . Based on this, the total size of block can be obtained as where δ is the Kronecker Delta. In addition, C s = to. The block overlap O ·,· , now including the membership variable, can be obtained as The null model gauges the expected overlap between a pair of nodes belonging to a class and aims at compen-sating the nestedness that can be explained solely by the nodes' degrees. The expected overlap, given two nodes s and t with degrees k s and k t , is obtained considering that the neighbors of each node are chosen uniformly at random. In this situation, the probability that both nodes share a common neighbor is simply (k s k t )/N c 2 and therefore, the expected amount of shared neighbors, i.e. the expected overlap, is given by O s,t = k s k t /N c . The same argument shows that for the columns, O σ,τ = k σ k τ /N r .
We can now introduce the in-block nestedness fitness I, which quantifies to which extent a network exhibits IBN, In this expression, some normalization factors have disappeared after straightforward simplifications. In the same spirit as in the row and column weighting of N (Eq. 1), the per-block nestedness aggregates are weighted by the size of the block (i.e. C s and C σ ). Notice that, for each pair of row nodes, O s,t only accounts for column nodes within the same block, while O s,t considers all column nodes regardless of the block they belong to. This implies that, for any pair of rows, I will be in principle larger when they are assigned to the same block: in this case the difference O s,t − O s,t has positive contributions. On the other hand, the membership variable α allows to discard some of the comparisons, assigning row nodes to different communities. In general, an algorithm that correctly maximizes I will attempt to discard pairs whose contribution is negative to the aggregate. This intuition is equivalent for columns. The balance of such "mergesplit" strategy for rows and columns allows an algorithm to identify in-block nested structures by maximizing the objective function I. Equation 4 is equally valid for unipartite networks, simply imposing that the two sets of nodes are identical. In this work, we have adopted a biologically-inspired optimization algorithm [29]. However, I's formulation -which closely follows that of modularity Q-enables the adoption of many existing heuristics (see [16] for an extensive review). Noteworthy, the objective function I reduces to N , corrected by a suitable null model, if one considers a single block (α s = α σ = α, ∀s, σ), i.e.
While the difference between NODF and N is slightexcept when M N , or viceversa-, the null-model cor-rection in N heavily alters the nestedness measure. In particular, note that fully connected nodes do not contribute to N -as opposed to maximum contribution in the original formulation.
To illustrate this point, it is instructive to consider the case of one single nested block (Num. Blocks = 1 in Fig. 2A,C,D) (Note that Fig. 2 is explained in detail in the next Section). In this cut, the contrast between non-corrected measure of nestedness (panel 2A) and corrected (panel 2D) is very clear: when the perfectly nested network is very dense (bottom-left corner, ξ < 2.5), most of the nodes have large expected overlap with the few hubs. Hence, even though the nestedness condition is respected for all the pairs of nodes, the nestedness metric N only deviates little from its expected value under the null model, resulting in a small value of N . In other words, the observed level of nestedness N can be simply explained by the network degree distribution. On the contrary, N and N are practically identical for ξ > 2.5. In this region, the slimness of the nested structure and the strict decreasing connectivity condition (Heaviside function in Eqs. 1 and 4) heavily limit the value of nestedness, regardless the consideration of a null model (N ) or not ( N ).

III. DETECTION OF IN-BLOCK NESTED STRUCTURES IN SYNTHETIC NETWORKS
In this Section, we first introduce a benchmark graph model with planted in-block nested structures (Section III A), and then present the results for the Q and I optimization algorithms' performance in reconstructing such planted structures (Section III B).

A. In-block nested structures generator
In a perfectly nested structure, rows (and columns) interact with a subset of the neighbors of the rows (and columns) of larger degree. Correctly ordering its adjacency matrix by row and column degree, it resembles an upper (possibly with some curvature) secondary diagonal matrix. Inspired by the p-norm unit ball equation, we synthetically generate such structures using where x ∈ [0, 1] and ξ ∈ [1, ∞) dictates how stylized is the shape of the nested structure. The adjacency matrix of the nested structure with N c nodes is constructed tessellating the [0, 1]×[0, 1] space into N 2 c squares; and then, adding a link into each matrix position whose center lies above the curve in Eq. 5. While an approach based on threshold graphs would have been also used, the degree sequences it produces are stochastic, introducing unnecessary fluctuations to the network generation [30].
Such noiseless nested structures are rarely found in real systems. Thus, on top of the previous scheme, we mimic random and uncorrelated noise using a dual-step procedure. In the first stage, we randomly remove links from the perfectly nested structure with probability p. Given a network with E c edges, pE c of them will be removed in average. In the second step, the removed edges are randomly distributed across the empty elements of the adjacency matrix. These include initially empty positions (i.e. those lying below the function in Eq. 5) and empty positions resulting form the stochastic removal procedure. Parameter value p = 0 corresponds to the initial structure and p = 1 corresponds to an Erdős-Rényi network with average degree E c /N c .
The construction of an adjacency matrix of an ideal in-block nested structure starts off with B (a real-valued number) blocks. Specifically, we build B blocks of size N c /B and another with the remaining N c − N c /B nodes. In the previous, · stands for the integer part function. In this way, the network produced has some level of heterogeneity (albeit the size of all blocks remains in the same order of magnitude). Then A I , can be constructed repeating the procedure for each block, A c , and joining them to compose a block diagonal matrix where A o = 0 is a matrix of the required size.
Similarly to the intra-block noise, we reproduce interblock perturbations with an additional dual-step procedure controlled by the parameter µ ∈ [0, 1]. In this first step, for each block, each link is removed with probability p i = µ(B − 1)/B. In the second step, those links are distributed at random to connect one node of the original block with a random node of a different block.
Probability p i depends on the number of blocks, since our purpose is that for µ = 1 the amount of links within each block is the same as the amount of links connecting any two distinct blocks. In the limit situation of p = µ = 0 the outcome corresponds to a noiseless in-block nested structure and for p = µ = 1 the outcome corresponds to an Erdős-Rényi network with the same average degree as the germinal noiseless structure, see Appendix A.
The described generative process can be locally implemented in terms of edge probabilities. Along these lines, the probability of having a link between nodes i and j within a block becomes where Θ is the Heaviside function. The term within square brackets is related to the intra-block noise. In the first term, (1 − p) corresponds to the probability of not altering the link. The second, pp r , corresponds to the probability of recovering a link, after removal, in the random dispersion of removed links. These two terms are restricted, by Θ function, to the region where links exist in the noiseless structure. The third term, corresponds to the probability of selecting link A ij in the random distribution of removed links. Eventually, the term (1 − p i ) corresponds to the probability of not removing the link in the process of generating inter-block noise.
The probability of a inter-block link is The numerator accounts for the amount of removed links from the blocks related to the off-diagonal block A o , that is compartment i and j. The denominator accounts for the possible places where each of those links can be placed. Note that the 2 on both numerator and denominator explicitly shows that each removed link of com- The noisy version given by Eqs. 7 and 8 of the original noiseless in-block nested structure generates a network with equivalent average degree. This is formally proved in Appendix A. An example of these synthetically generated structures is shown in Fig. 2C and Fig. 3C.

B. IBN optimization applied to synthetic networks
In Fig. 2, we unveil the limitations of current techniques to detect IBN structures in noiseless networks (IBN networks) where no links exist between nodes belonging to different blocks. In a more realistic setting, where links can connect nodes that belong to different blocks, such weaknesses become even more apparent (see Fig. 3).
We generated synthetic (unipartite) networks of N c nodes and E c edges within blocks, where the level of inblock nestedness and the number of inter-block links can The experiments in Fig. 2 correspond to 3 × 10 4 networks generated with parameters p = µ = 0, with varying number of blocks and number of edges (see Fig. 2C for an illustration of the resulting adjacency matrices). By construction all networks have maximum I, in the range (0.16, 0.90), depending on the shape parameter ξ and number of blocks B. Unsurprisingly, modularity Q increases as the number of block increases (Fig. 2B).
We find that in this setting, the modules detected by the modularity-maximization algorithm can be very different from the planted blocks, as measured by Normalized Variation of Information [32] (NVI), Fig. 2E. The difference between detected and planted blocks is larger for sparser networks (upper region of Fig. 2E). Fig. 2F shows the difference between the number M of detected modules by the Q-maximization and the number B of planted blocks. The difference is non-zero for a large region of the parameter space. In particular, the modularity optimization algorithm detects more than one module in a network composed of one single block with internal nested structure (see Fig. 2F, left-corner). This happens because the modularity-optimization algorithm tends to form a module that only contains the nodes with largest degree. Figs. 2E-F indicate that modularity optimization is only reliable in the limit of large number of blocks and dense networks (lower-right corner).
The results of Figs. 2B,E,F make clear that measuring modularity and nestedness as two independent network properties is inherently flawed: modularity-optimization algorithms detect more than one module in a network composed of a single nested block, and the NVI between detected modules and planted blocks is in general large. We have verified that the I-optimization algorithm introduced in this paper overcomes these limitations and is able to correctly recover the planted structure for all the parameter values shown in Fig. 2. Figure 3 shows the results for an exhaustive exploration of the (p, µ) parameter space over 2600 networks with a fixed B = 3 and shape parameter ξ = 4 (see Fig. 3C for an illustration of the resulting adjacency matrices). Results on these synthetic networks after a modularity optimization process (Fig. 3B) show that Q is almost insensitive to changes in the parameters of the model: notice that its range is quite narrow, 0.55 < Q < 0.7, and only mildly affected by the p parameter (i.e., by the level of IBN). This itself is a consequence of the fact that Q does not consider any particular structure within the blocks, but only their internal density. Even further, the value of modularity fluctuates around Q ≈ 0.6, in remarkable accordance with the predictions in Guimerà et al. [33], for sparse graphs, like those obtained with ξ = 4. Figure 3A shows the value of in-block nestedness fitness, I, after a maximization procedure based on a biologically-inspired optimization algorithm (see Methods). Evidently, I is sensitive to both the modular structure, and the nested organization within, taking a maximum value for µ = 0 and p = 0. When we increase the randomness in either dimension the obtained in-block nestedness fitness smoothly decreases, reaching a global minimum when µ = 1 and p = 1.
Since it can be assumed that the block structure is known a priori, it is possible to quantify how far a given partition is from the planted one. As before, we resort on NVI to assess the quality of the partitions obtained optimizing I (Eq. 4) and the quality of the partitions obtained maximizing Q [31]. Focusing on the quality of the Q-detected partition with respect to the prescribed one (Fig. 3E), we emphasize that modularity does not recover the planted partition in any parameter configuration, not even at µ = 0. Remarkably, changes in NVI are independent of the parameter p, related to the level of disorder within each block. In contrast, we see that I optimization allows to unveil the planted partition for a region along the µ axis, as long as p remains low (Fig. 3D): the presence of internal nestedness compensates the tenuous identity of the blocks, caused by large µ. The parameter region corresponding to low p and large µ is also the region where Q-detected partitions and Idetected partitions differ the most (Fig. 3F). This points out that the Q-detected partitions are particularly unreliable when there is a clear internal nested structure and there exist a significant number of inter-block links.

IV. DETECTION OF IN-BLOCK NESTED STRUCTURES IN REAL DATASETS
The previous sections demonstrate the adequacy and robustness of I -and the inherent flaws of modularity Q and global nestedness N -to unveil IBN structures. However, those analysis would be limited to a mere academic exercise in absence of ample (in terms of examples and origin) empirical evidence. To demonstrate the practical aspects of the proposed methodology, we have analyzed a total of 334 networks, including both unipartite (57) and bipartite (277) ones which are known to display some level of nested organization. Most of them (209 bipartite networks) belong to ecology [34] -mostly mutualistic networks-and the rest belong to online platforms (68 bipartite networks) and social networks (57 unipartite networks). Table I in Appendix B details the origin and characteristics of each dataset.
As a visual intuition, Fig. 4 displays the adjacency matrix of four of these networks, where rows and columns have been sorted following different criteria: for left and central columns (I-and Q-maximizing partitions, respectively), nodes in the same block are placed together, and they are ranked by degree (within blocks) to make more apparent a possible IBN structure; in the right column, nodes are simply ranked by degree. Panel A shows such arrangements for a host-parasite network (see A HP 050 in Table I of the Appendix B). Clearly, the three matrix representations look very different. In this case, I favors the existence of a large, highly nested block, and a set of smaller clusters with a clear internal organization as well, whereas Q renders several, similarly sized, highly dense modules with no clear internal nested organization. Even though the classical NODF measure hints at some degree of global nestedness, taking into account the null model (N = 0.059) seems to indicate that the nested organization is a simple consequence of the network's degree distribution. Panel B shows the results for a pollination mutualistic network (see M PL 001 in Table I of the Appendix B). The system exhibits a clear IBN structure that cannot be detected through the maximization of modularity. From the results in panels A and B, it is worth remarking that the observation of IBN structures in ecosystems with different types of interactions demands a reconsideration of which patterns should or should not be expected in them. Panel C shows the results for a urban user-service network (see Chennai in Table I  pollinator network is clearly (and globally) nested -but the other two arrangements are qualitatively convincing as well. For this reason, we have systematically compared the results of N and Q, on one side, and I, on the other, for the whole set of real networks mentioned above. In Fig. 5A, two color-coded scatter plots are shown for uni-(left) and bipartite (right) networks. Strikingly, modularity Q and in-block nestedness I are not strongly correlated in real datasets. Networks that exhibit small or intermediate values of modularity (compatible with those of a random network [33]) may show high I, regardless of the N score. Also, large values of Q -which unsurprisingly display nestedness ≈ 0-indeed exhibit both large and small I scores as well. Beyond the uncorrelated behavior between the three descriptors, what surfaces here is the fact that when analyzing data we may be overlooking a relevant pattern -IBN structure-just because two partial views of it (N and Q taken independently) appear to be non-significant.
Further, in Fig. 5B we show the value of I for partitions obtained by maximizing Q confronted to the maximization of I itself. This plot evidences that modularity optimization may sometimes render partitions which do have some in-block organization (near the diagonal), but most often it is blind to it. This result highlights that using an approach where modularity is maximized, to successively evaluate nestedness within the blocks identified (i.e. the approach in [22,24]), is not able to unveil the IBN structure in most real-world networks.

V. CONCLUSIONS
The emergence of structural patterns in complex networks is a consequence of the dynamics that take place on them. While the ultimate goal is to understand how these dynamics operate, this is not feasible until the correct methods to identify those patterns are available. The increasing evidence that nestedness and modularity appear in many empirical contexts; the already abundant hints that they may appear together; and the importance of both to disentangle how they affect -and are affected by-the evolution of a system, prompt the need of rethinking the strategy to detect the occurrence of in-block nestedness.
Inspired by the NODF and modularity optimization, in this paper we have developed a methodology to detect in-block nested structures. The objective function at the core of this method naturally embeds a suitable null model to discount the in-block nestedness of the network that can be ascribed to randomness. Beyond the formal correctness of our formulation, demonstrated by means of a suitable benchmark to generate synthetic networks, we have shown that it overcomes the inherent limitations of nestedness and modularity (as independent methods) for this task. In structural terms, our approach can be interpreted as a generalization of the concept of nestedness (as expressed in NODF), re-framing it to the mesoscopic network scale. Along this line, the door remains open to further development. For example, slight modifications on our formulation generalize the notion of multiple coreperiphery structures, which has been recently addressed from a different starting point [36]. Other directions may be related to identification techniques (e.g. stochastic block models [37]) or the design of distinct, specialized null models [38,39].
The analysis of real data has shown that many networks display in-block nested structure, regardless of their NODF and modularity scores. This finding suggests that previous works may have overlooked important features when discussing the organization of real systems. The existence of in-block nested structures affects the debate around population dynamics, in ecology specially, in terms of which patterns maximize survival [5], and why. Our methodological contribution thus uncovers the need for models -beyond host-parasite [40,41] -that explain how networks transition between possible configurations: from modular, to combined, to purely nested architectures, as suggested by the emergence of collective attention processes [9]; or from nested to combined architectures, as one would expect in a growing, but highly structured, system with increasing specialization. Noteworthy, it is not clear whether these processes are reversible, as they may respond to different system-wide adaptive processes.

ACKNOWLEDGMENTS
CJT and MSM acknowledges the University of Zürich for support through the URPP Social Networks. MSM also acknowledges financial support from the Swiss National Science Foundation Grant No. 200020-156188. The synthetic in-block nested network generator we propose in the main text include two parameters to generate noise. Only as a summary, parameter p controls the intra-compartment noise and parameter µ controls the inter-community noise. The noisy versions of the initial germinal noiseless in-block nested structure has the same average degree. We first show that adding intracommunity noise does not alter the average number of edges. Under this situation µ = 0 and Eq. 7 becomes (1 − Θ(jN c − f n (iN c ))). Substituting, this to Eq. A2 leads to We now consider the case where µ = 0. The expected amount of edges within the full in-block nested structure Q.E.D.

Appendix B: Real datasets used in the experiments
The set of real networks used throughout the article comprise ecological and social systems. The largest subset -ecological networks [34]-represent mutualistic and competitive systems, including macroscopic and microscopic environments. The analyzed social systems include social communication networks such as face-to-face interactions, e-mail contacts and Twitter messages; urban systems such as user check-ins to city services (museum, market, restaurant, etc.); technological systems such as cooperative software development projects, where we account which files each user works on. Some of these networks have been previously shown to exhibit nestedness and modularity jointly [9,24,25]. However, none of them have not been previously analyzed in the proposed setting.