<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>Modularity and Stability in Ecological Communities</title>
        <author>Jacopo Grilli</author>
        <author>Tim Rogers</author>
        <author>Stefano Allesina</author>
      </titleStmt>
      <publicationStmt>
        <p>Tag layer of the DHSS Meta-Tagging Project. The article text is reproduced from the
           staged copy named in sourceDesc and is not altered; the tags are held separately in
           standOff so that overlapping and nested spans are preserved.</p>
      </publicationStmt>
      <sourceDesc>
        <bibl>
          <title>Modularity and Stability in Ecological Communities</title>
          <date>2016</date>
          <publisher>Nature Communications</publisher>
          <idno type="DOI">10.1038/ncomms12031</idno>
          
          <idno type="record">grilli2016-ecological-modularity</idno>
          <note type="staged-file">grilli2016-ecological-modularity.txt, the project's staged copy</note>
          <note type="text-sha1">0cfed9d0e238b6537d8942e974dd2ce4357fa398</note>
          <note type="rights">arxiv-open</note>
        </bibl>
      </sourceDesc>
    </fileDesc>
    <profileDesc>
      <textClass><keywords><term>ecology</term></keywords></textClass>
      <particDesc>
        <person xml:id="paper"><p>the paper's own words</p></person>
        <person xml:id="tagger"><p>the tag layer; a sentence written by the tagger about the
          paper, always anchored to a quotation but not itself a quotation</p></person>
      </particDesc>
    </profileDesc>
    <revisionDesc>
      <change when="2026-10-06"
              who="build_paper_edition.py">83 spans located by searching the stored text for the quote's exact words, allowing any whitespace between them</change>
    </revisionDesc>
  </teiHeader>
  <standOff>
    <spanGrp type="tags">
      <span xml:id="t0" from="#a3" to="#a8" type="object_of_study" ana="#object_of_study" resp="#paper">Whether modular organisation of species interactions makes an ecological community more able to recover from small perturbations.</span>
      <span xml:id="t1" from="#a30" to="#a31" type="research_question" ana="#research_question" resp="#paper">May suggested in 1972 that communities do better when interactions are arranged in blocks; fifty years of simulations disagree with each other - what does the mathematics actually say?</span>
      <span xml:id="t2" from="#a16" to="#a17" type="contribution" ana="#contribution" resp="#paper">An analytic relation between modularity Q and stability, showing modularity stabilises only in narrow regimes while anti-modularity strongly destabilises.</span>
      <span xml:id="t3" from="#a60" to="#a61" type="claim_type" ana="#claim_type" resp="#paper">mechanism</span>
      <span xml:id="t4" from="#a9" to="#a15" type="phenomenon" ana="#phenomenon" resp="#paper">modularity and local stability of ecological communities</span>
      <span xml:id="t5" from="#a76" to="#a77" type="method" ana="#method" resp="#paper">formal-model<term>formal-model</term></span>
      <span xml:id="t6" from="#a64" to="#a65" type="mechanisms" ana="#mechanisms[0]" resp="#tagger">mechanisms<term>modularity shifts the rightmost eigenvalue of the community interaction matrix, which governs local stability (May eigenvalue criterion)</term></span>
      <span xml:id="t7" from="#a52" to="#a53" type="mechanisms" ana="#mechanisms[1]" resp="#tagger" cert="1.0">mechanisms<term>structure and strength are separated by construction: the community matrix is an element-wise product of an interaction-strength matrix and an adjacency matrix, so the effect of topology can be isolated</term></span>
      <span xml:id="t8" from="#a44" to="#a45" type="mechanisms" ana="#mechanisms[2]" resp="#tagger" cert="1.0">mechanisms<term>modularity is a single dial: within- and between-subsystem connectance are re-expressed as overall connectance plus Q, so one number moves the structure from perfectly modular to perfectly bipartite</term></span>
      <span xml:id="t9" from="#a54" to="#a55" type="mechanisms" ana="#mechanisms[3]" resp="#tagger" cert="1.0">mechanisms<term>stability is read off the rightmost eigenvalue, interpretable as how much self-regulation the system would need to stay at equilibrium</term></span>
      <span xml:id="t10" from="#a50" to="#a51" type="mechanisms" ana="#mechanisms[4]" resp="#tagger" cert="1.0">mechanisms<term>the unstructured random network is the reference point, so every result is a ratio against the same coefficients rearranged at random</term></span>
      <span xml:id="t11" from="#a79" to="#a80" type="limitations" ana="#limitations[0]" resp="#tagger">results rely on the random-matrix universality assumption<note>about this quote: QUOTE RECOVERED FROM THE PAPER&#x27;S OWN CHARACTERS. The recorded quote was LETTERS-ONLY IDENTICAL to this stretch of the staged text but not an exact substring of it - spaces, hyphens, ligature glyphs or mathematical operators differed, so it could never anchor. This is the file&#x27;s own text between the same two letters: not produced by a rule about the damage, copied out of the file. Round-trip checked (the recovered span is letters-only equal to the original) and length-checked. The text as originally recorded is kept in evidence as extracted. Update, 15 September 2026: CLEARED evidence status=&#x27;quote-not-in-current-staged-text&#x27; - the quote now locates in the current staged text, so the condition the marker recorded no longer holds.</note></span>
      <span xml:id="t12" from="#a56" to="#a57" type="limitations" ana="#limitations[1]" resp="#tagger">The stability ratio cannot be predicted analytically for unequal subsystem sizes; only extreme cases are treated.<note>what this limits: the unequal-subsystem case: WE CANNOT PREDICT THE RATIO IN FULL GENERALITY FOR THE CASE OF alpha &lt; 1/2, so only the extreme cases are treated</note></span>
      <span xml:id="t13" from="#a90" to="#a91" type="limitations" ana="#limitations[2]" resp="#tagger">No correction formula exists for the outlier eigenvalues of bipartite matrices.<note>what this limits: the bipartite results: WE DO NOT HAVE A FORMULA FOR CORRECTING THE EIGENVALUES OF BIPARTITE MATRICES</note></span>
      <span xml:id="t14" from="#a66" to="#a67" type="limitations" ana="#limitations[3]" resp="#tagger">Real ecological systems are not random graphs, which is why a cascade food-web variant had to be added.<note>what this limits: the transfer to real ecosystems: CLEARLY, ECOLOGICAL SYSTEMS DO NOT FOLLOW A RANDOM GRAPH STRUCTURE ... DISPLAYING A DIRECTIONALITY IN THE FLOW OF ENERGY FROM PRODUCERS TO CONSUMERS</note></span>
      <span xml:id="t15" from="#a36" to="#a37" type="limitations" ana="#limitations[4]" resp="#tagger" cert="1.0">Self-interactions are removed from the matrix by construction, with the claim that including them would not qualitatively change the result.<note>what this limits: every result computed from the matrix: WE REMOVE SELF-INTERACTIONS ... ADDING INTRA-SPECIFIC EFFECTS WOULD NOT QUALITATIVELY ALTER THE RESULTS - asserted, not shown</note></span>
      <span xml:id="t16" from="#a42" to="#a43" type="limitations" ana="#limitations[5]" resp="#tagger" cert="1.0">The whole analysis is of a two-subsystem block structure, which is the simplest case of modularity rather than the general one.<note>what this limits: the scope of the modularity treated: the community is assumed to be COMPOSED OF TWO SUBSYSTEMS, the simplest case rather than modularity in general</note></span>
      <span xml:id="t17" from="#a50" to="#a51" type="limitations" ana="#limitations[6]" resp="#tagger" cert="0.9">The measure of modularity depends on a chosen reference model, and the achievable range of Q depends on that choice.<note>what this limits: every modularity value quoted: TO CALCULATE [it] WE NEED TO CHOOSE A REFERENCE MODEL FOR NETWORK STRUCTURE, AND HERE WE USE THE ERDOS-RENYI RANDOM GRAPH - the number belongs to the network and the chosen null model together</note></span>
      <span xml:id="t18" from="#a12" to="#a14" type="transfers" ana="#transfers[0]" resp="#tagger">random matrix theory and the cavity method applied to the stability of ecological communities</span>
      <span xml:id="t19" from="#a9" to="#a15" type="transfers" ana="#transfers[1]" resp="#tagger" cert="1.0">the cavity method, extended with a quaternionic parameterisation, to obtain eigenvalue results for structured ecological community matrices</span>
      <span xml:id="t20" from="#a24" to="#a25" type="concepts" ana="#concepts[1]" resp="#paper">modularity<term>modularity</term></span>
      <span xml:id="t21" from="#a20" to="#a21" type="concepts" ana="#concepts[4]" resp="#paper" cert="1.0">block structure<term>block structure</term></span>
      <span xml:id="t22" from="#a22" to="#a23" type="concepts" ana="#concepts[5]" resp="#paper" cert="1.0">bipartite network<term>bipartite network</term></span>
      <span xml:id="t23" from="#a38" to="#a39" type="concepts" ana="#concepts[6]" resp="#paper" cert="1.0">community matrix<term>community matrix</term></span>
      <span xml:id="t24" from="#a54" to="#a55" type="concepts" ana="#concepts[7]" resp="#paper" cert="1.0">local stability<term>local stability</term></span>
      <span xml:id="t25" from="#a50" to="#a51" type="concepts" ana="#concepts[8]" resp="#paper" cert="1.0">Erdős–Rényi random graph<term>Erdős–Rényi random graph</term></span>
      <span xml:id="t26" from="#a42" to="#a43" type="concepts" ana="#concepts[9]" resp="#paper" cert="1.0">connectance<term>connectance</term></span>
      <span xml:id="t27" from="#a9" to="#a15" type="concepts" ana="#concepts[10]" resp="#paper" cert="0.95">quaternionic parameterization<term>quaternionic parameterization</term></span>
      <span xml:id="t28" from="#a9" to="#a15" type="concepts" ana="#concepts[11]" resp="#paper" cert="0.95">cavity method<term>cavity method</term></span>
      <span xml:id="t29" from="#a74" to="#a75" type="concepts" ana="#concepts[12]" resp="#paper" cert="0.95">Hadamard (element-by-element) product<term>Hadamard (element-by-element) product</term></span>
      <span xml:id="t30" from="#a74" to="#a75" type="concepts" ana="#concepts[13]" resp="#paper" cert="0.95">adjacency matrix<term>adjacency matrix</term></span>
      <span xml:id="t31" from="#a62" to="#a63" type="concepts" ana="#concepts[14]" resp="#paper" cert="0.95">spectrum of M<term>spectrum of M</term></span>
      <span xml:id="t32" from="#a62" to="#a63" type="concepts" ana="#concepts[15]" resp="#paper" cert="0.95">bulk<term>bulk</term></span>
      <span xml:id="t33" from="#a62" to="#a63" type="concepts" ana="#concepts[16]" resp="#paper" cert="0.95">outlier eigenvalue<term>outlier eigenvalue</term></span>
      <span xml:id="t34" from="#a68" to="#a69" type="concepts" ana="#concepts[17]" resp="#paper" cert="0.95">cascade model<term>cascade model</term></span>
      <span xml:id="t35" from="#a78" to="#a81" type="concepts" ana="#concepts[18]" resp="#paper" cert="0.95">universality property<term>universality property</term></span>
      <span xml:id="t36" from="#a84" to="#a85" type="concepts" ana="#concepts[19]" resp="#paper" cert="0.95">elliptic law<term>elliptic law</term></span>
      <span xml:id="t37" from="#a72" to="#a73" type="concepts" ana="#concepts[20]" resp="#paper" cert="0.95">feasible equilibrium point<term>feasible equilibrium point</term></span>
      <span xml:id="t38" from="#a70" to="#a71" type="concepts" ana="#concepts[21]" resp="#paper" cert="0.95">local asymptotic stability<term>local asymptotic stability</term></span>
      <span xml:id="t39" from="#a18" to="#a19" type="senses" ana="#senses[0]" resp="#tagger" cert="1.0">modular - the ecological sense: species grouped by where and when they are active, so interaction frequency tracks group membership</span>
      <span xml:id="t40" from="#a48" to="#a49" type="senses" ana="#senses[1]" resp="#tagger" cert="1.0">modular - the formal sense: a value of Q above what an Erdos-Renyi reference model would give by chance</span>
      <span xml:id="t41" from="#a26" to="#a27" type="senses" ana="#senses[2]" resp="#tagger" cert="1.0">stability - local: recovery from a small perturbation around an equilibrium, as against persistence or robustness to species loss</span>
      <span xml:id="t42" from="#a9" to="#a15" type="senses" ana="#senses[3]" resp="#tagger" cert="0.95">quaternionic parameterization - the parameterization of the cavity method used for the paper&#x27;s random-matrix results</span>
      <span xml:id="t43" from="#a9" to="#a15" type="senses" ana="#senses[4]" resp="#tagger" cert="0.95">cavity method - the method used with quaternions to obtain the new random-matrix-theory results</span>
      <span xml:id="t44" from="#a74" to="#a75" type="senses" ana="#senses[5]" resp="#tagger" cert="0.95">Hadamard (element-by-element) product - the multiplication of W and K that yields M</span>
      <span xml:id="t45" from="#a74" to="#a75" type="senses" ana="#senses[6]" resp="#tagger" cert="0.95">adjacency matrix - K, combined element by element with W to obtain M</span>
      <span xml:id="t46" from="#a62" to="#a63" type="senses" ana="#senses[7]" resp="#tagger" cert="0.95">spectrum of M - a bulk plus up to two real outliers in the two-subsystem case</span>
      <span xml:id="t47" from="#a62" to="#a63" type="senses" ana="#senses[8]" resp="#tagger" cert="0.95">bulk - the main body of eigenvalues in M&#x27;s spectrum</span>
      <span xml:id="t48" from="#a62" to="#a63" type="senses" ana="#senses[9]" resp="#tagger" cert="0.95">outlier eigenvalue - one of up to two real outliers outside the spectral bulk</span>
      <span xml:id="t49" from="#a68" to="#a69" type="senses" ana="#senses[10]" resp="#tagger" cert="0.95">cascade model - a size-ordered food web in which species consume only smaller species</span>
      <span xml:id="t50" from="#a78" to="#a81" type="senses" ana="#senses[11]" resp="#tagger" cert="0.95">universality property - distribution choice does not alter the large-system result once moments are fixed and fourth moments bounded</span>
      <span xml:id="t51" from="#a84" to="#a85" type="senses" ana="#senses[12]" resp="#tagger" cert="0.95">elliptic law - B&#x27;s large-system eigenvalues are approximately uniform in an ellipse</span>
      <span xml:id="t52" from="#a72" to="#a73" type="senses" ana="#senses[13]" resp="#tagger" cert="0.95">feasible equilibrium point - the point around which M represents population dynamics</span>
      <span xml:id="t53" from="#a70" to="#a71" type="senses" ana="#senses[14]" resp="#tagger" cert="0.95">local asymptotic stability - the system property on which block structure can have an effect</span>
      <span xml:id="t54" from="#a32" to="#a33" type="alternatives" ana="#alternatives.claim_type" resp="#tagger">claim_type: null-result<note>a second reading DIFFERING from the recorded value. Recorded: mechanism — note: a second reading, verbatim-verified, disagreeing with the value on the record. Not applied - a person decides.</note></span>
      <span xml:id="t55" from="#a9" to="#a15" type="alternatives" ana="#alternatives.method" resp="#tagger">method: mathematical-proof<note>a second reading DIFFERING from the recorded value. Recorded: formal-model — note: a second reading, verbatim-verified, disagreeing with the value on the record. Not applied - a person decides.</note></span>
      <span xml:id="t56" from="#a1" to="#a2" type="alternatives" ana="#alternatives.phenomenon" resp="#tagger">phenomenon: the relation between modular network structure and the dynamical stability of the system it describes<note>a second reading DIFFERING from the recorded value. Recorded: modularity and local stability of ecological communities — note: a second reading, verbatim-verified, disagreeing with the value on the record. Not applied - a person decides.</note></span>
      <span xml:id="t57" from="#a12" to="#a13" type="claim_relations" ana="#claim_relations[0]" resp="#tagger">builds-on → random matrix theory (from physics/mathematics)</span>
      <span xml:id="t58" from="#a5" to="#a6" type="claim_relations" ana="#claim_relations[1]" resp="#tagger">extends → the hypothesis that modularity benefits ecological stability</span>
      <span xml:id="t59" from="#a58" to="#a59" type="claim_relations" ana="#claim_relations[2]" resp="#tagger">contradicts → May&#x27;s hypothesis (ref. 20) that model communities do better when interactions are arranged in blocks, and the subsequent challenges in refs 21-22<note>differs in: THE PARAMETER IS SUBSYSTEM SIZE, AND THE CONTRADICTION IS CONDITIONAL ON IT. The span: &#x27;The picture emerging from these results is much more nuanced and complex than what was previously hypothesized: MODULARITY CAN HAVE A moderate stabilizing effect when the two subsystem have about the same size.&#x27; A &#x27;contradicts&#x27; edge without this reads as a flat denial of May&#x27;s hypothesis; the paper&#x27;s own word is &#x27;nuanced&#x27;.</note></span>
      <span xml:id="t60" from="#a82" to="#a83" type="claim_relations" ana="#claim_relations[3]" resp="#tagger">builds-on → Allesina et al. (ref. 36), the authors&#x27; earlier decomposition of the community matrix</span>
      <span xml:id="t61" from="#a88" to="#a89" type="claim_relations" ana="#claim_relations[4]" resp="#tagger">builds-on → O&#x27;Rourke &amp; Renfrew (ref. 40) on outlier eigenvalues of low-rank-perturbed random matrices</span>
      <span xml:id="t62" from="#a86" to="#a87" type="claim_relations" ana="#claim_relations[5]" resp="#tagger">replicates → Aljadeff et al. (ref. 41) implicit formula for the limiting spectral density</span>
      <span xml:id="t63" from="#a28" to="#a29" type="claim_relations" ana="#claim_relations[6]" resp="#tagger" cert="0.9">contradicts → May&#x27;s hypothesis that block-arranged interactions improve community stability</span>
      <span xml:id="t64" from="#a46" to="#a47" type="claim_relations" ana="#claim_relations[7]" resp="#tagger" cert="1.0">extends → the random-community stability literature descending from May</span>
      <span xml:id="t65" from="#a22" to="#a23" type="concept_edges" ana="#concept_edges[1]" resp="#tagger">bipartite network —is-a→ block structure<note>strength of the relation: 1</note><term>bipartite network</term><term>block structure</term></span>
      <span xml:id="t66" from="#a62" to="#a63" type="concept_edges" ana="#concept_edges[6]" resp="#tagger" cert="0.95">bulk —part-of→ spectrum of M<note>the relation itself is separately evidenced · strength of the relation: 1</note><term>bulk</term><term>spectrum of M</term></span>
      <span xml:id="t67" from="#a62" to="#a63" type="concept_edges" ana="#concept_edges[7]" resp="#tagger" cert="0.95">outlier eigenvalue —part-of→ spectrum of M<note>the relation itself is separately evidenced · strength of the relation: 1
Audit 2026-09-28: DOUBTFUL - read against its full span and kept, but the span writes &#x27;outlier&#x27;, real eigenvalues; the endpoint is a variant.</note><term>outlier eigenvalue</term><term>spectrum of M</term></span>
      <span xml:id="t68" from="#a48" to="#a49" type="content_tags" ana="#content_tags.quantities[0]" resp="#tagger" cert="1.0">Q &gt; 0 modular, Q &lt; 0 anti-modular — sign convention of the modularity measure against a chance expectation</span>
      <span xml:id="t69" from="#a16" to="#a17" type="content_tags" ana="#content_tags.findings[0]" resp="#tagger">Modularity can have moderate stabilizing effects for particular parameter choices, while anti-modularity can greatly destabilize ecological networks.</span>
      <span xml:id="t70" from="#a4" to="#a7" type="content_tags" ana="#content_tags.findings[1]" resp="#tagger">It has been posited that a modular organization of species interactions benefits the stability of communities, though evidence for this hypothesis is mixed.</span>
      <span xml:id="t71" from="#a16" to="#a17" type="content_tags" ana="#content_tags.findings[2]" resp="#tagger" cert="1.0">Modularity stabilises only in particular parameter regimes; anti-modularity destabilises strongly.</span>
      <span xml:id="t72" from="#a32" to="#a33" type="content_tags" ana="#content_tags.findings[3]" resp="#tagger" cert="1.0">The same level of modularity can help or hurt depending on regime - so no structure is stabilising in itself.</span>
      <span xml:id="t73" from="#a28" to="#a29" type="content_tags" ana="#content_tags.findings[4]" resp="#tagger" cert="1.0">The hypothesis was challenged by authors whose simulations showed the opposite effect.</span>
      <span xml:id="t74" from="#a30" to="#a31" type="content_tags" ana="#content_tags.findings[5]" resp="#tagger" cert="1.0">Despite decades of work across epidemiology, neuroscience and complex systems, no systematic classification of structure-to-dynamics relations existed.</span>
      <span xml:id="t75" from="#a10" to="#a11" type="content_tags" ana="#content_tags.variables[0]" resp="#tagger">modularity<term>modularity</term></span>
      <span xml:id="t76" from="#a52" to="#a53" type="content_tags" ana="#content_tags.variables[2]" resp="#tagger" cert="1.0">connectance<term>connectance</term></span>
      <span xml:id="t77" from="#a34" to="#a35" type="content_tags" ana="#content_tags.definitions[1]" resp="#tagger">community matrix<note>about this quote: QUOTE RECOVERED FROM THE PAPER&#x27;S OWN CHARACTERS. The recorded quote was LETTERS-ONLY IDENTICAL to this stretch of the staged text but not an exact substring of it - spaces, hyphens, ligature glyphs or mathematical operators differed, so it could never anchor. This is the file&#x27;s own text between the same two letters: not produced by a rule about the damage, copied out of the file. Round-trip checked (the recovered span is letters-only equal to the original) and length-checked. The text as originally recorded is kept in evidence as extracted.</note><term>community matrix</term></span>
      <span xml:id="t78" from="#a20" to="#a21" type="content_tags" ana="#content_tags.definitions[3]" resp="#tagger" cert="1.0">block structure<term>block structure</term></span>
      <span xml:id="t79" from="#a24" to="#a25" type="content_tags" ana="#content_tags.definitions[4]" resp="#tagger" cert="1.0">modularity<term>modularity</term></span>
      <span xml:id="t80" from="#a22" to="#a23" type="content_tags" ana="#content_tags.definitions[5]" resp="#tagger" cert="1.0">bipartite network<term>bipartite network</term></span>
      <span xml:id="t81" from="#a54" to="#a55" type="content_tags" ana="#content_tags.statistics[0]" resp="#tagger" cert="1.0">random-matrix-theory<term>random-matrix-theory</term></span>
      <span xml:id="t82" from="#a40" to="#a41" type="content_tags" ana="#content_tags.statistics[1]" resp="#tagger" cert="0.9">correlation<term>correlation</term></span>
    </spanGrp>
  </standOff>
  <text>
    <body>
        <p><anchor xml:id="a0"/> Abstract. <anchor xml:id="a1"/>Networks composed of distinct, densely connected subsystems are called modular.<anchor xml:id="a2"/> <anchor xml:id="a3"/>In ecology, <anchor xml:id="a4"/>it has been posited that <anchor xml:id="a5"/>a modular organization of species interactions would benefit the dynamical stability of communities<anchor xml:id="a6"/>, even though evidence supporting this hypothesis is mixed<anchor xml:id="a7"/>.<anchor xml:id="a8"/> <anchor xml:id="a9"/>Here we study <anchor xml:id="a10"/>the effect of modularity on the local stability of ecological dynamical systems<anchor xml:id="a11"/>, by <anchor xml:id="a12"/>presenting new results in random matrix theory<anchor xml:id="a13"/>, which are obtained using a quaternionic parameterization of the cavity method<anchor xml:id="a14"/>.<anchor xml:id="a15"/> <anchor xml:id="a16"/>Results show that modularity can have moderate stabilizing effects for particular parameter choices, while anti-modularity can greatly destabilize ecological networks.<anchor xml:id="a17"/> Modularity in food webs can be caused by spatial and temporal mismatches in interactions. Here, Jacopo Grilli, Tim Rogers and Stefano Allesina show that modularity, contrary to expectations, does not generally help stabilizing ecological communities. <anchor xml:id="a18"/>Ecological communities are structured both in space, as in a stratified lake and in time, as for migratory birds.<anchor xml:id="a19"/> This temporal and spatial organization is reflected in the strength of species interactions, where we expect populations dwelling in the same location, or being active in the same season, to interact more frequently than those that are not. When drawing ecological interaction networks—where species are the nodes and the edges connecting the species stand for interactions (for example, consumption, pollination and competition)—we therefore expect to find that species can be partitioned into distinct ‘groups&#x27;, such that the frequency of interaction largely depends on group-membership 1 2 . <anchor xml:id="a20"/>Networks with this property are said to be ‘block-structured&#x27;: a modular structure is a particular block structure, in which a network is divided into subsystems, and within-subsystem interactions are much more frequent than those between subsystems 3 4 .<anchor xml:id="a21"/> <anchor xml:id="a22"/>If, on the other hand, interactions occur exclusively between groups, we obtain a bipartite network—another type of block structure with many ecological applications 5 .<anchor xml:id="a23"/> <anchor xml:id="a24"/>The appealingly simple idea of a block structure has been formalized in the measure of modularity, Q 3 4 , calculated as the difference between observed and expected within-group interactions, divided by the total number of interactions.<anchor xml:id="a25"/> Positive values indicate that interactions occur predominantly within-groups, while negative values that interactions are more frequent betweenthan within-group. Modularity has become one of the most investigated network metrics, with applications spanning biological, social and technological networks 6 7 8 9 10 11 . Unveiling the relationship between the network structure of biological systems and their dynamical properties has been a long-sought goal of the discipline, and many authors have hypothesized that biological networks must be shaped by evolution 12 13 14 15 and co-evolution 16 , favouring configurations yielding controlled dynamics 17 18 19 . <anchor xml:id="a26"/>In ecology, the idea that a modular organization would be beneficial for the local stability of ecological communities (that is, their ability to recover from small perturbations) dates back to work on complexity and stability by May 20 , where he suggested ‘that our model multi-species communities [...] will do better if the interactions tend to be arranged in blocks&#x27;.<anchor xml:id="a27"/> <anchor xml:id="a28"/>This hypothesis was challenged by a number of authors 21 22 , who produced simulations showing the opposite effect.<anchor xml:id="a29"/> However, recent studies found that modularity can indeed enhance species persistence 23 24 , further complicating the picture. <anchor xml:id="a30"/>Though the relationship between block structure and dynamics on networks has since been investigated in many fields, including epidemiology 25 , neuroscience 26 and complex systems in general 27 , a systematic classification is still lacking.<anchor xml:id="a31"/> Here we study how the local stability of ecological systems is influenced by modularity, providing new results on the theory of random matrices that can be used to draw a direct relationship between modularity Q and local stability. The mathematical results are briefly stated in the Methods section, while a calculation based on the cavity method 28 29 30 31 with quaternions is carried out in the Supplementary Notes . We show that, with respect to the corresponding unstructured case, modularity can have moderate stabilizing effects for particular parameter choices, while anti-modularity can greatly destabilize networks. <anchor xml:id="a32"/>The rich range of possible effects associated with the same level of modularity stresses the fact that a given network structure is not ‘stabilizing&#x27; or ‘destabilizing&#x27; per se , but only for particular regimes.<anchor xml:id="a33"/> Results Building community matrices <anchor xml:id="a34"/>We study the stability of a community matrix M , modelling a continuous-time, dynamical ecological system<anchor xml:id="a35"/> composed of S populations, resting at a feasible equilibrium point. <anchor xml:id="a36"/>We remove self-interactions from the matrix (setting M ii =0), so that we can concentrate on inter-specific effects (adding intra-specific effects would not qualitatively alter the results 32 ).<anchor xml:id="a37"/> <anchor xml:id="a38"/>M is obtained by multiplying element-by-element two matrices, a matrix of interaction strengths, W , where W ij expresses the effect of species j on species i around equilibrium, and the adjacency matrix of an undirected graph, K . The community matrix is therefore M = W ○ K ( Fig. 1 ).<anchor xml:id="a39"/> <anchor xml:id="a40"/>Initially, we independently sample the coefficients in W in pairs, drawing ( W ij , W ji ) from a bivariate distribution with identical marginals, defined by the mean , the variance and the correlation .<anchor xml:id="a41"/> By varying these parameters, we can model different types of interactions between the species from preponderantly predator–prey to dominated by competition or mutualism 33 . The binary matrix K dictates ‘who interacts with whom&#x27;, and is symmetric because we assume pairwise interactions. Thus, K determines which interactions in W are activated, and which are suppressed. <anchor xml:id="a42"/>Here we study the case of a block-structured K : we assume that the community is composed of two subsystems, of sizes αS and (1− α ) S , respectively (with α ≤1/2), and that species in the same subsystem interact with probability C w (within-subsystem connectance), while species in different subsystems with probability C b (between-subsystem connectance).<anchor xml:id="a43"/> This parameterization is especially intuitive, because for C b = C w , we recover the well-studied case of a random ecological community 20 33 . Hence, by varying C b and C w , we can isolate the effect of having a modular or anti-modular structure ( Fig. 2 ), with the two extreme cases being networks composed of two separate subsystems (perfectly modular), and those in which interactions occur exclusively between subsystems (perfectly anti-modular or bipartite). <anchor xml:id="a44"/>For simplicity, we speak of a ‘modular&#x27; structure whenever C w &gt; C b , and of an ‘anti-modular&#x27; structure when C w &lt; C b .<anchor xml:id="a45"/> <anchor xml:id="a46"/>The case of C w = C b represents ‘unstructured&#x27; systems, such as those studied by May and other authors 20 33 .<anchor xml:id="a47"/> Equivalently (Methods), we can express C w and C b in terms of the overall connectance C (that is, the overall density of interactions in K ) and Q , the modularity of the network 3 4 , defined as: where L w is the observed number of interactions within the subsystems, L b the number of between-subsystem interactions and is the number of within-subsystem interactions we would expect by chance. <anchor xml:id="a48"/>Values of Q &gt;0 ( Q &lt;0) mean that we observe within-subsystem interactions more (less) frequently than expected by chance.<anchor xml:id="a49"/> <anchor xml:id="a50"/>To calculate , we need to choose a reference model for network structure, and here we use the Erdős–Rényi random graph 34 , as we want to contrast our results with those found for an unstructured, random network.<anchor xml:id="a51"/> Though Q is bounded by −1 and 1, only a smaller interval of values might be achievable for a given choice of a reference model, α and C (Methods; for example, in our case, when α =1/2, then Q ∈[−1/2, 1/2], provided that C &lt;1/2). <anchor xml:id="a52"/>In summary, the parameterization M = W ○ K allows us to separate the effect on stability of a block structure (modelled by K through α, C and Q ) from those due to the distribution of interaction strengths (modelled by W ).<anchor xml:id="a53"/> Given that the case of Q =0 (unstructured network) has been studied intensively, and that the calculation of the stability of these matrices can be achieved analytically 20 32 33 35 , we use it as a reference point to determine the effect of Q on stability. Effect of modularity on stability We want to study the effect of modularity on stability. Therefore, we contrast the value for the real part of the ‘rightmost&#x27; eigenvalue of M , Re( λ M ,1 ), with , the value found for , a matrix with exactly the same coefficients, but re-arranged according to a random network structure ( Q =0). <anchor xml:id="a54"/>Re( λ M ,1 ), is a measure of stability, as it expresses the amount of self-regulation we would need to stabilize the equilibrium 20 32 .<anchor xml:id="a55"/> Our analysis ( Fig. 3 ; Methods) highlights that there are three main parameterizations we need to consider: (a) mean interaction strength close to zero ( μ ≈0); (b) strongly negative mean interaction strength; and (c) strongly positive mean interaction strength. Without loss of generality, we can set σ 2 =1, and study the effect of the modularity Q on the stability of the community, measured as the ratio , for a given choice of α (controlling the size of the smaller subsystem), ρ (correlation of interaction strengths) and C (overall connectance of the system). Values Γ&lt;1 are found when imposing the block structure helps stabilizing the community (for example, in Fig. 3 , for Q &lt;0 and μ =0), while ratios Γ &gt;1 stand for destabilizing effects (for example, any Q ≠0 for positive mean). For an unstructured matrix ( Q =0), the ratio is exactly 1. In Fig. 4 , we show the effect of modularity on stability in a community composed of 1,000 species, when we set C =0.2. Take the case of two equally sized subsystems ( α =1/2), for which we derive new results allowing us to express the ratio analytically (Methods; Supplementary Information ): when μ ≥0, we have no effect of modularity on stability; when μ &lt;0, on the other hand, a bipartite structure is highly destabilizing, while a modular structure is moderately stabilizing. Both effects are stronger in the case of a negative correlation. When the two subsystems have different sizes ( α &lt;1/2), the stabilizing effect of modularity found for the case of μ &lt;0 is greatly diminished, and eventually also modularity can become destabilizing (especially for positive ρ and ). For μ &gt;0, any Q ≠0 is destabilizing, while for μ ≈0, a modular structure is always destabilizing, and a anti-modular structure can be stabilizing, provided that ρ is sufficiently negative. These effects hold qualitatively for different levels of C (Methods; Supplementary Figs 2–3 ), with higher connectances leading to more marked effects. <anchor xml:id="a56"/>Though we cannot predict the ratio in full generality for the case of α &lt;1/2, we can treat the extreme cases of a perfectly modular and perfectly bipartite structure, and this is sufficient to understand the qualitative behaviour of all cases (Methods).<anchor xml:id="a57"/> <anchor xml:id="a58"/>The picture emerging from these results is much more nuanced and complex than what was previously hypothesized 20 21 22 : modularity can have a moderate stabilizing effect when the two subsystem have about the same size, and the mean μ is negative or destabilizing, when μ ≥0 and the subsystems have different sizes.<anchor xml:id="a59"/> Similarly, anti-modularity is highly destabilizing for μ ≠0, but can be stabilizing for μ =0. <anchor xml:id="a60"/>The qualitative behaviour of these systems can be understood quite simply, when considering the distribution of the eigenvalues of the block-structured matrices in the complex plane.<anchor xml:id="a61"/> As shown in Fig. 5 , <anchor xml:id="a62"/>when there are two subsystems the spectrum of M is composed of a ‘bulk&#x27; of eigenvalues, and up to two ‘outlier&#x27;, real eigenvalues.<anchor xml:id="a63"/> <anchor xml:id="a64"/>When μ ≈0, there are no outliers, and thus stability is determined in all cases by the rightmost eigenvalue<anchor xml:id="a65"/>(s) in the bulk. When μ ≠0, we have only one outlier in the case of unstructured networks: if μ &lt;0, then the outlier lies to the left of the bulk and thus has limited effects on stability; if μ &gt;0, on the other hand, the outlier lies to the right of the bulk and therefore solely determines stability. The modular case is similar to the unstructured one, though we now have two outilers, in that both lie either to the right ( μ &gt;0) or the left ( μ &lt;0) of the bulk. In the bipartite case, however, for any μ ≠0 the spectrum presents an outlier to the right (determining stability) and one to the left of the bulk. These simple observations are sufficient to understand the very strong destabilizing effect of a bipartite structure when μ &lt;0: in this case, the stability of the unstructured network, , is determined by the bulk of the eigenvalues, while that of the block-structured network, Re( λ M ,1 ), by the outlier to the right of the bulk ( Fig. 5 , red). When both Re( λ M ,1 ) and are determined by the bulk (for example, modular case with μ &lt;0 or any structure with μ ≈0), the either stabilizing or destabilizing effect is going to be moderate. Moderate effects are also observed when both Re( λ M ,1 ) and are associated with an outlier lying to the right of the bulk ( μ &gt;0). When both Re( λ M ,1 ) and are determined by the same type (bulk, outlier) of eigenvalue, the precise stabilizing or destabilizing effect depends nonlinearly on the parameters α , C , Q , μ , σ and ρ (Methods). To summarize, a block structure for an otherwise random ecological system can help stabilization in only two cases: (a) when the structure is modular, and μ &lt;0 (though small α or a positive ρ could reverse this effect); and (b) when the structure is bipartite, μ ≈0, and the correlation is negative. For all the other cases, the effect of a block structure ranges from neutral to highly destabilizing. Food-web structure <anchor xml:id="a66"/>Clearly, ecological systems do not follow a random graph structure, for example, displaying a directionality in the flow of energy from producers to consumers.<anchor xml:id="a67"/> This directionality proved important in our previous study 36 , where we showed that when the mean of the negative effects dominates that of the positive effects, systems built according to the cascade 37 model (in which ‘larger&#x27; species consume ‘smaller&#x27; ones) are more likely to be stable than their random counterparts. <anchor xml:id="a68"/>We therefore analysed matrices constructed using a variation of the cascade model, where we assign a ‘size&#x27; to each species and each species can only consume smaller species, and has a preference for those in the same subsystem ( Q &gt;0), or for those in the other subsystem ( Q &lt;0).<anchor xml:id="a69"/> Note that in this case, we need to set a mean for the positive effects and another one for the negative effects (Methods). Figure 6 shows that the stabilizing effect of modularity found before for the case of μ &lt;0 is practically negligible, while the other results are qualitatively the same. Discussion We have studied the effect of a modular or anti-modular network structure on the stability of an otherwise random ecological system. Our parameterization makes it easy to compare the effect of the network structure with that one would obtain for unstructured, random systems such as those studied in the past 20 33 : a ratio Γ&lt;1 stand for stabilizing and Γ&gt;1 for destabilizing effect of network structure. For block-structured matrices, we showed that modularity can have a positive effect on stability only when (a) the system is composed of two subsystems of about the same size and (b) the overall mean interaction strength is negative. The stabilizing effect is stronger for negative correlations. Anti-modularity, on the other hand, is typically strongly destabilizing, besides the case in which the average interaction strength is close to 0 (a well-studied case 20 33 , though of limited biological realism). When the mean interaction strength is positive, both modularity and anti-modularity are destabilizing. Through numerical simulations, we have investigated the more complex case of an interaction between modularity and food-web structure, and found that the results are qualitatively unchanged. The picture emerging from both simulations and mathematical analysis is much more complex than previously hypothesized. <anchor xml:id="a70"/>Block structure can have an effect on the local asymptotic stability of the underlying system.<anchor xml:id="a71"/> However, unless we are in particular areas of the parameter space, the effect tends to be destabilizing. Our results stress the fact that, when discussing the relationship between network structure and local stability, we need to qualify our statements, as a given structure is not stabilizing or destabilizing per se , but is only so under certain specific conditions. Though we have illustrated this point by studying the modular structures, we believe this phenomenon to hold generally: any network structure can have different effects on stability, depending on the choice of parameters. To reinforce this message, in Fig. 7 , we show three cases in which an empirical network structure makes the system more or less stable than its random counterpart, depending on the parameterization of the coefficients. Practically, this means that the challenge of proving that biological network structure emerges because of a selective process, removing configurations yielding unfavourable dynamics 17 18 19 is much harder than expected: network structure, without estimates of the distribution of the coefficients, cannot be used to determine the effect on dynamical properties. Methods Constructing the community matrix <anchor xml:id="a72"/>M is the S × S community matrix, representing the population dynamics of an unknown dynamical system around a feasible equilibrium point.<anchor xml:id="a73"/> We consider two cases: (a) random ecological networks with block structure and (b) food webs with block structure. For case (a), we sampled the pairs ( W ij , W ji ) independently from a bivariate normal distribution with means ( μ , μ ) T , and covariance matrix For case (b), we first assigned a ‘size&#x27; to each species (randomly sampling it from a uniform distribution between 0 and 1), and then sampled the pairs ( W ij , W ji ) independently from a normal bivariate distribution with means ((1+ ξ ) μ , (1− ξ ) μ ) T (ensuring that , for Fig. 6 , ξ =3), and covariance matrix Σ, whenever i was larger than j . This means that species can only consume ‘smaller&#x27; prey, such as in the cascade model. In particular, in this case we could order the rows and columns of matrix W so that all the positive effects would be confined to the upper-triangular part and the negative effects to the lower-triangular part. <anchor xml:id="a74"/>In both cases, the matrix M is obtained via the Hadamard (element-by-element) product of W and the adjacency matrix K .<anchor xml:id="a75"/> The matrix K is characterized by four parameters: S , α , C and Q . S is the size, α is the proportion of species belonging to the first subsystem, Q is the modularity and C the overall connectance of K (density of the nonzero elements). The first αS species are assigned to the first subsystem, and the remaining (1− α ) S species to the second subsystem. The vector encodes the subsystem-membership of each species. Then, we set ( K ij , K ji ) to (1, 1) with probability C w , when γ i = γ j and with probability C b when γ i ≠ γ j . The ‘within-subsystem connectance&#x27; C w is: and the ‘between-subsystem connectance&#x27; C b is: Note that, given the Erdős–Rényi reference model, the values of Q that are attainable depend on both α and C : Numerical simulations For each α and ρ , we set S =1,000, C =0.2, σ =1 and μ =0 (green), μ =−1 (red) or μ =1 (blue), and varied Q from its minimum to its maximum possible value in twenty equally sized steps. <anchor xml:id="a76"/>For each parameter set, we produced 50 block-structured matrices M , and 50 unstructured matrices , obtained by setting Q =0.<anchor xml:id="a77"/> The ratio was computed by averaging over the replicates. In many cases, one can obtain the expectation for the ratio analytically (below; Supplementary Information ). The simulations were repeated for both random ecological networks ( Fig. 4 ) and cascade-based food webs ( Fig. 6 ). The spectrum of block-structured matrices For our derivations, we adopt a slightly more general notation, which includes that discussed above as a special case. We consider the matrix M , with M ii =0 and the off-diagonal coefficients independently sampled in pairs from either of two distributions: Hence, the pairs come from a certain bivariate distribution , when i and j belong to the same subsystem, while from a different distribution , when i and j belong to different subsystems. <anchor xml:id="a78"/>We do not need to specify the exact form of the distributions and , given that, as for many results in random matrix theory, <anchor xml:id="a79"/>our findings are consistent with the ‘universality&#x27; property<anchor xml:id="a80"/> 38 39 : once fixed the mean and covariance matrices of and , and provided that the fourth moment of each is bounded, any choice of distributions yields the same result, for S →∞.<anchor xml:id="a81"/> When considering the case examined in the main text, where the elements M ij = W ij K ij , the universality property helps us in two ways. First, consider that the pairs ( M ij , M ji ) are zero with probability 1− C w (case γ i = γ j ) or probability 1− C b (case γ i ≠ γ j ), and that the nonzero pairs are sampled from a bivariate distribution (for the elements of W ), defined by the parameters μ , σ 2 and ρ . This is sufficient to calculate 32 the relevant parameters for the distributions and : This means that the effect of the connectances is somewhat trivial: we can ‘absorb&#x27; the connectances in the parameters μ w , μ b , σ w , σ b , ρ w and ρ b , which are our ‘effective&#x27; parameters, dictating the shape of the distribution of the eigenvalues of M . The second advantage of having universal results is that we are free to choose any distribution for the pairs ( W ij , W ji ). In all our examples, these are sampled from a bivariate normal distribution. Decomposition We want to study the limiting (that is, when S is large) distribution of the eigenvalues of M for the case of a random community (for the food webs following the cascade model, we rely exclusively on simulations). <anchor xml:id="a82"/>Following the approach by Allesina et al . 36 , we write the matrix M as the sum of two matrices, M = A + B , where A is a matrix with block structure whose elements are and B is obtained by difference: B = M − A .<anchor xml:id="a83"/> Thus, the diagonal elements of B ii =− μ w , while for the off-diagonal , and (when γ i = γ j ), or (when γ i ≠ γ j ). This parameterization is very convenient, as the spectrum of matrix B describes the bulk of the eigenvalues of M , while the outlier eigenvalues of M are given by the nonzero eigenvalues of A , modified by a small correction 40 . The eigenvalues of A The eigenvalues of A are easy to obtain for any choice of S , α , μ w and μ b , with all being zero besides which can be both zero as well ( μ w = μ b =0), both different from zero ( α ≠1/2, μ w ≠ μ b ), or one zero and one nonzero ( μ w = μ b ≠0). Thus, there are going to be up to two outlier eigenvalues. These are the approximate locations of the two outlier eigenvalues of M (only one outlier when μ b = μ w ≠0, as found for example in the ‘unstructured&#x27; case). The exact location of the outliers depends also on B , as explained below. The eigenvalues of B The spectrum of B has never been studied in full generality. We start by discussing the known cases, and then introduce new results that allows us to understand the qualitative behaviour of our simulations. These results can be derived by a calculation making use of the cavity method ( Supplementary Information ). Known case: σ w = σ b , ρ w = ρ b <anchor xml:id="a84"/>In this case, the eigenvalues of B follow the ‘elliptic law&#x27; 39 , and for S large, are approximately uniformly distributed in an ellipse, centred at (− μ w , 0), and with horizontal semi-axis and vertical semi-axis .<anchor xml:id="a85"/> Known case: σ b =0 (perfectly modular) When there are no connections between-subsystem, we have two independent subsystems. Hence, the eigenvalues of B are simply the union of the eigenvalues of the two squared block matrices found on the diagonal. The eigenvalues of each diagonal block follow the elliptic law, so that the distribution of the eigenvalues of B is a combination of two uniform ellipses, both centred at (− μ w , 0), and with horizontal semi-axes and , and vertical semi-axes and , respectively. Known case: ρ b = ρ w =0 New results 41 can be applied to this case, showing that the eigenvalues of B are contained in a circle in the complex plane, with centre (− μ w , 0) and radius <anchor xml:id="a86"/>In this case, the distribution of the eigenvalues is not uniform, and Aljadeff et al . 41 provide an implicit formula for the density of the limiting spectral distribution, which is consistent to that found in the Supplementary Information using a different method.<anchor xml:id="a87"/> New case: α =1/2 (equally sized subsystems) When the two subsystems have the same size ( α =1/2), we find ( Supplementary Information ) that the eigenvalues of B are approximately uniformly distributed in the ellipse in the complex plane with centre in (− μ w , 0), horizontal semi-axis and vertical semi-axis Note that this would also be the limiting distribution for the eigenvalues of the unstructured matrix with − μ w on the diagonal, and off-diagonal elements sampled independently in pairs from the bivariate normal distribution with means (0, 0) T , a correlation that is a weighted average of the correlations in B , and a variance that is the arithmetic mean of the variances in B , In this case, it is convenient to express these values in terms of μ , σ 2 , ρ , C and Q , because this makes the role of modularity in modulating the stability much clearer: From the two equations above, it is clear that (a) for μ =0, modularity has no effect on the spectrum, while for μ ≠0 the sign of μ does not affect the spectrum; (b) modular and bipartite structures have the same effect: the eigenvalues of B will be approximately the same, when we have Q = q or Q =− q ; (c) the effect of modularity is going to be more marked for large C or | μ |; and (d) the radius of B is always lower or equal than that we would find by setting Q =0. Summarizing, for α =1/2, the eigenvalues of B are contained in an ellipse whose horizontal semi-axis is always smaller or equal than that found for the corresponding unstructured matrix. This explains the stabilizing effect of a modular structure ( Q &lt;0) we observed for μ &lt;0, as in that case the rightmost eigenvalue of M is the rightmost eigenvalue of B . New case: σ w =0 (perfectly bipartite) When σ w =0 (that is, C w =0), the nonzero coefficients of B are exclusively contained in the two blocks, representing the interactions between subsystems, as in a bipartite network. Hence, we can write the matrix B in block form: where X is a αS × (1− α ) S matrix and Y is a (1− α ) S × αS matrix. The two matrices on the diagonal contain all zeros, and have size αS × αS and (1− α ) S × (1− α ) S , respectively. The eigenvalues of B 2 , are the eigenvalues of B , squared: if λ i is an eigenvalue of B , then is an eigenvalue of B 2 . Squaring B , we obtain: XY has αS eigenvalues, while YX has (1− α ) S eigenvalues. The eigenvalues of YX are the same as those of XY , with the exception of (1− α ) S − αS eigenvalues which are exactly 0 (take v to be an eigenvector of XY . Then XYv=λv . Let w = Yv , hence, XYv = Xw = λv . Finally, consider YXw = Y ( λv )= λYv=λw . Thus, if λ ≠0, it is an eigenvalue of both XY and YX ). Hence, we can study the eigenvalues of XY (the smaller matrix) without loss of generality. In the Supplementary Information , we show that the eigenvalues of XY are contained in an ellipse in the complex plane, with centre in , horizontal semi-axis and vertical semi-axis ( Supplementary Fig. 7 , top). If the support of the distribution of the eigenvalues of XY is an ellipse in the complex plane, then the support of the eigenvalues of B for perfectly bipartite interaction matrices is obtained via a square-root transformation of the ellipse in the complex plane ( Supplementary Fig. 7 , bottom), with the addition of the point (0, 0), stemming from the extra eigenvalues of YX . To find the real part of the rightmost eigenvalue of B , we thus need to consider the square-root transformation of the ellipse found for XY . The eigenvalues of XY , which are the squared eigenvalues of B , are contained in the ellipse: where x is the real part and y the imaginary part of the point z = x + iy (we can consider the case y &gt;0 without loss of generality, given that the spectrum of B is symmetric about the real and the imaginary axis). Then, the square root of z has real part a : To approximate the maximum real part for the eigenvalues of B , we need to find the x that maximizes a . First, we can rewrite the equation for a , exploiting the fact that we know that all the points z we want to consider are on the curve describing the ellipse: where we have substituted the value of y 2 by constraining the point z to be on the curve describing the ellipse. Substituting the values for x c , r x and r y , we can write: Where we maximize the function for a by taking values x in [ x c , x c + r x ], which is sufficient because of the symmetry discussed above. Maximizing, we find two cases: Combining the eigenvalues of A and B Having derived the position of the eigenvalues of A , and, for particular cases, the support of the distribution of those of B , we want to combine the results to obtain an approximation for Re( λ M ,1 ), the real part of the rightmost eigenvalue of M = A + B . <anchor xml:id="a88"/>This problem has been recently studied by O&#x27;Rourke &amp; Renfrew 40 , who considered the following case: B is a large, random matrix whose eigenvalues follow the elliptic law.<anchor xml:id="a89"/> It is defined by its size, S and the distribution of the coefficients, which are independently sampled in pairs from a bivariate distribution with mean zero, unitary variance and correlation ρ . A is a matrix with low rank (that is, few nonzero eigenvalues), and nonzero eigenvalues that are sufficiently larger than those of B . Then (Theorem 2.4), we can order the eigenvalues of such that: where the term o (1) goes to zero as S →∞. This means (ref. 40 ; Theorem 2.8) that a random matrix with a nonzero mean μ will have a single outlier located approximately at μS , exactly as found for the unstructured case 32 33 studied above. Clearly, the correction above is well suited for the unstructured case, and for the perfectly modular one (which is the combination of two unstructured cases). We also corrected in the same way the eigenvalues for matrices with α =1/2, reasoning that the correction would have the same form, given that the spectra of these matrices converge to those of equivalent unstructured cases. <anchor xml:id="a90"/>We do not have a formula for correcting the eigenvalues of bipartite matrices, but, as for the other cases, the correction is negligible when | μ | is large enough.<anchor xml:id="a91"/> Supplementary Fig. 8 shows that our approximation is indeed excellent for all the cases considered here. Simulating empirical network structures We parameterized three empirical networks, and studied the effect of network structure by measuring the ratio , when varying a critical parameter θ . For simplicity, we always consider the case of matrices with zero on the diagonal. Contact network We took a symmetric adjacency matrix, A , specifying whether two members of an high school were in contact (see ref. 42 ), and built the matrix M by sampling the coefficients M ij = M ji from a normal distribution with mean θ and variance 0.0025, whenever A ij = A ji =1. We sampled θ independently from a uniform distribution and for each M , we obtained by shuffling the interactions while maintaining the pairs (so that both matrices are symmetric), following ref. 35 . In Fig. 7 , we show 250 realizations. Food web We took the adjacency matrix A , specifying trophic interactions in the Little Rock lake 43 , and built M by sampling M ij from the half-normal distribution , whenever A ij =1. These are the (negative) effects of predators on prey. For each M ij &lt;0, we chose M ij by multiplying − M ij by a random value drawn from . Thus, for θ ≈1 the positive coefficients have about the same strength as the negative ones; when θ &gt;1 positive effects dominate; and for θ &lt;1 negative effects are stronger. Again, for each of the realizations, we built both M and , obtained by shuffling the interactions. In Fig. 7 , we show results obtained by sampling θ 250 times from the distribution . Pollinator network We took the pollination network compiled by Robertson 44 45 , and we used the rectangular adjacency matrix to determine the position of the nonzero, mutualistic effects between plants and pollinators: M ij and M ji were sampled independently from the uniform distribution , whenever plant i and pollinator j interacted. We then sampled competitive effects by sampling uniformly the coefficients for k and l being both plants or both pollinators. Thus, M has a block structure, very similar to that studied here. In Fig. 7 , we show the effects of the strength of competition ( θ ) on stability. Data availability The data and code needed to reproduce all results presented in the article can be downloaded from https://github.com/StefanoAllesina/blockstructure Additional information How to cite this article: Grilli, J. et al . Modularity and stability in ecological communities. Nat. Commun. 7:12031 doi: 10.1038/ncomms12031 (2016). Supplementary Material Supplementary Information Supplementary Figures 1-8, Supplementary Notes and Supplementary<anchor xml:id="a92"/></p>
    </body>
  </text>
</TEI>
