Dissimilarity of species interaction networks: quantifying the eﬀect of turnover and rewiring

Despite having established its usefulness in the last ten years, the decomposition of ecological networks in components allowing to measure their β -diversity retains some methodological ambiguities. Notably, how to quantify the relative eﬀect of mechanisms tied to interaction rewiring vs. species turnover has been interpreted diﬀerently by different authors. In this contribution, I present mathematical arguments and numerical experiments that should (i) establish that the decomposition of networks as it is currently done is indeed ﬁt for purpose


Introduction
Ecological networks are variable both in time and space (Poisot et al. 2015;Trøjelsgaard & Olesen 2016) -this variability motivated the emergence of methodology to compare ecological networks, including in a way that meshes with the core concept for the comparison of ecological communities, namely β-diversity (Poisot et al. 2012). The need to understand network variability through partitioning in components equivalent to α, β, and γ diversities is motivated by the prospect to further integrate the analysis of species interactions to the analysis of species compositions. Because species that make up the networks do not react to their environment in the same way, and because interactions are only expressed in subsets of the environments in which species co-occurr, the β-diversity of networks may behave in complex ways, and its quantification is likely to be ecologically informative. Poisot et al. (2012) and Canard et al. (2014) have suggested an approach to β-diversity for ecological networks which is based on the comparison of the number of shared and unique links among species within a pair of networks. Their approach differentiates this sharing of links between those established between species occurring in both networks, and those established with at least one unique species. This framework is expressed as the decomposition β wn = β os + β st , namely the fact that network dissimilarity (β wn ) has a component that can be calculated directly from the dissimilarity of interactions between shared species (β os ), and a component that cannot (β st ). The β st component differs slightly from the others, in that it is a quantification of the relative rewiring to overall dissimilarity, and not an absolute measure of interaction turnover. Presumably, the value of these components for a pair of networks can generate insights about the mechanisms involved in dissimilarity, when interpreted within the context of species turnover and differences in network connectance.
This approach has been widely adopted since its publication, with recent examples using it to understand the effect of fire on pollination systems (Baronio et al. 2021); the impact of rewiring on spatio-temporal network dynamics (Campos-Moreno et al. 2021); the effects of farming on rural and urban landscapes on species interactions (Olsson et al. 2021); the impact of environment gradients on multi-trophic metacommunities (Ohlmann et al. 2018); and as a tool to estimate the sampling completeness of networks . It has, similarly, received a number of extensions, including the ability to account for interaction strength (Magrach et al. 2017), the ability to handle probabilistic ecological networks (Poisot et al. 2016), and the integration into the Local Contribution to Beta Diversity (Legendre & De Cáceres 2013) approach to understand how environment changes drive network dissimilarity (Poisot et al. 2017).
Yet, the precise meaning of β st , namely the importance of species turnover in the overall dissimilarity, has been difficult to capture, and a source of confusion for some practitioners. This is not particularly surprising, as this component of the decomposition responds to unique species introducing their unique interactions both between themselves, and with species that are common to both networks ( fig. 1). For this reason, it is important to come up with guidelines for the interpretation of this measure, and how to use it to extract ecological insights.

Timothée Poisot
Figure 1 -The dissimilarity of two networks (green and orange) of equal richness S (this also holds for unequal richness) depends on three families of interactions: those that are unique because of species turnover (in a pale color), those that are unique because of rewiring (in a saturated color), and those that are shared (in black). Assuming that the chance of sharing a species between the two networks is p, then there can be at most p 2 × S 2 shared links -for this reason, overall network dissimilarity (β wn ) will have a component tied to species turnover, which is β st .
Furthermore, much like the definition of β-diversity in all its forms is a contentious topic amongst community ecologists (see e.g. Tuomisto 2010), the β-diversity of networks has been submitted to methodological scrutiny over the years. A synthesis of some criticisms, related to the correct denominator to use to express the proportion of different links, has recently been published (Fründ 2021). It argues that the calculation of network dissimilarity terms as originally outlined by Poisot et al. (2012) is incorrect, as it can lead to over-estimating the role of interactions between shared species in a network ("rewiring"), and therefore underestimate the importance of species turnover across networks. As mist-understanding either of these quantities can lead to biased inferences about the mechanisms generating network dissimilarity, it is important to assess how the values (notably of β os , and therefore of β st ) react to methodological choices.
Here, I present a mathematical analysis of the Poisot et al. (2012) method, explain how information about species turnover and link rewiring can be extracted from its decomposition, and conduct numerical experiments to guide the interpretation of the β-diversity values thus obtained (with a specific focus on β st ). These numerical experiments establish three core facts. First, the decomposition adequately captures the relative roles of species turnover and interaction rewiring; second, the decomposition responds to differences in network structure (like connectance) as expected; finally, the decomposition more accurately captures rewiring than the proposed alternative using a different denominator put forth by Fründ (2021).

Partitioning network dissimilarity.
The approach to quantifying the difference between pairs of networks established in Poisot et al. (2012) is a simple extension of the overall method by Koleff et al. (2003) for species dissimilarity based on presence-absence data. The objects to compare, X 1 and X 2 , are partitioned into three values, a = |X 1 ∪ X 2 |, b = |X 2 \ X 1 |, and c = |X 1 \ X 2 |, where | · | is the cardinality of set · (the number of elements it contains), and \ is the set substraction operation. In the perspective Timothée Poisot 3 of species composition comparison, X 1 and X 2 are the sets of species in either community, so that if X 1 = {x, y , z} and X 2 = {v , w , x, y }, we have X 1 ∪ X 2 = {v , w , x, y , z}, X 1 ∩ X 2 = {x, y }, X 2 \ X 1 = {v , w }, and X 1 \ X 2 = {z}. The core message of Koleff et al. (2003) is that the overwheling majority of measures of β-diversity can be re-expressed as functions that operate on the cardinality of these sets -this allows to focus on the number of unique and common elements, as outlined in fig. 1.
1.1.1. Re-expressing networks as sets. Applying this framework to networks requires a few additional definitions. Although ecologists tend to think of networks as their adjacency matrix (as is presented in fig. 1), this representation is not optimal to reach a robust understanding of which elements should be counted as part of which set when measuring network dissimilarity. For this reason, we need fall back on the definition of a graph as a pair of sets, wherein G = (V , E ). These two components V and E represent vertices (nodes, species) and edges (interactions), where V is specifically a set containing the vertices of G, and E is a set of ordered pairs, in which every pair is composed of two elements of V ; an element {i, j} in E indicates that there is an interaction from species i to species j in the network G. The adjancency matrix A of this network would therefore have a non-zero entry at A ij .
In the context of networks comparison (assuming the networks to compare are M and N ), we can further decompose the contents of these sets as where V c is the set of common species, V m and V n are the species belonging only to network m and n (respectively), E c are the common edges, and E sm and E um are the interactions unique to k involving, respectively, only species in V c , and at least one species from V m (the same notation applies for the subscript n ).

Defining the partitions from networks as sets.
The metaweb (Dunne 2006), which is to say the entire regional species pool and their interaction, can be defined as M ∪ N (this operation is commutative), which is to say This operation gives us an equivalent to γ-diversity for networks, in that the set of vertices contains all species from the two networks, and the set of edges contains all the interactions between these species. If, further, we make the usual assumption that only species with at least one interaction are present in the set of vertices, then all elements of the set of vertices are present at least once in the se of edges, and the set of vertices can be entire reconstructed from the set of edges. Although measures of network β-diversity operate on interactions (not species), this property is maintained at every decomposition we will describe next.
We can similarly define the intersection (also commutative) of two networks: The decomposition of β-diversity from Poisot et al. (2012) uses these components to measure β os ("rewiring"), and β wn (the overall dissimilarity including non-shared species). We can express the components a, b, and c of Koleff et al. (2003) as the cardinality of the following sets: It is fundamental to note that these components can be measured entirely from the interactions, and that the number of species in either network are never directly involved.
In the following sections, I present a series of calculations aimed at expressing the values of β os , β wn , and therefore β st as a function of species sharing probability (as a proxy for mechanisms generating turnover), and link rewiring probability (as a proxy for mechanisms generating differences in interactions among shared species). These calculations are done using Symbolics.jl (Gowda et al. 2021), and subsequently transformed in executable code for Julia (Bezanson et al. 2017), used to produce the figures.
1.1.3. Quantifying the importance of species turnover. The difference between β os and β wn stems from the species dissimilarity between M and N , and it is easier to understand the effect of turnover by picking a dissimilarity measure to work as an exemplar. We will use β = (b +c)/(2a+ b + c), which in the Koleff et al. (2003) framework is (Wilson & Shmida 1984). This measure returns values in [0, 1], with 0 meaning complete similarity, and 1 meaning complete dissimilarity.
Based on a partition between three sets of cardinality a, b, and c, Note that this measure is written as β t for consistency with Koleff et al. (2003). So as to simplify the notation of the following section, I will introduce a series of new variables. Let C = |E c | be the number of links that are identical between networks (as a mnemonic, C stands for "common"); R = |E sn ∪ E sm | be the number of links that are not shared, but only involve shared species (i.e. links from M ∪ N established between species from M ∩ N ; as a mnemonic, R stands for "rewired"); and T = |E un ∪ E um | the number of links that are not shared, and involve at least one unique species (as a mnemonic, T stands for "turnover").
There are two important points to note here. First, as mentionned earlier, the number or proportion of species that are shared is not involved in the calculation. Second, the connectance of either network is not involved in the calculation. That all links counted in e.g. T come from M, or that they are evenly distributed between M and N , has no impact on the result. This is a desirable property of the approach: whatever quantitative value of the components of dissimilarity can be interpreted in the light of the connectance and species turnover without any risk of circularity; indeed, I present a numerical experiment where connectance varies independently later in this manuscript, reinforcing this point.
The final component of network dissimilarity in Poisot et al. (2012) is β st , i.e. the part of β wn that is not explained by changes in interactions between shared species (β os ), and therefore stems from species turnover. This fraction is defined as β st = β wn − β os . The expression of β st does not involve a partition into sets that can be plugged into the framework of Koleff et al. (2003), because the part of M and N that are composed of their unique species cannot, by definition, share interactions. One could, theoretically, express these as M \ N = (V m , E um ) and N \ M = (V v , E un ) (note the non-commutativity here), but the dissimilarity between these networks is trivially maximal for the measures considered.
Using the β t measure of dissimilarity, we can re-write (using the notation with R, C , and T ) Note that β os has the form x/y with x = S and y = 2A+S, and β wn has the form (x +k)/(y +k), with k = U. As long as k ≥ 0, it is guaranteed that β wn ≥ β os , and therefore that 0 ≥ β st ≥ 1; as C , T , and R are cardinalities of sets, they are necessarily satisfying this condition.
We can get an expression for β st , by bringing β os and β wn to a common denominator and simplifying the numerator: Note that this value varies in a non-monotonic way with regards to the number of interactions that are part of the common set of species -this is obvious when developing the denominator into 4C 2 + R 2 + 4CR + 2CT + RT . As such, we expect that the value of β st will vary in a hump-shaped way with the proportion of shared interactions. For this reason, Poisot et al. (2012) suggest that β st /βwn (alt. 1 − β os /β wn ) is a better indicator of the relative importance of turnover processes on network dissimilarity. This can be calculated as which reduces to The roots of this expression are C = 0 (the turnover of species has no contribution to the difference between β wn and β os if there are no shared species, and therefore no rewiring), and for T = 0 (the turnover of species has no contribution if all species are shared).

Quantifying the response of network beta-diversity to souces of variation.
1.2.1. The relative effect of species turnover and link rewiring. As the decomposition of beta diversity into sets presented above reveals, the value of the components β os and β st will respond to two family of mechanisms: the probability of sharing a species between the two networks, noted p, which will impose bounds on the value of T ; and the probability of an interactions between shared species not being rewired, noted q, which will impose bounds on the value of C . These two probabilities represent, respectively, mechanisms involved in species turnover and link turnover, as per Poisot et al. (2015), and the aim of this numerical experiment is to describe how these families of processes drive network dissimilarity.
In order to simplify the calculations, I make the assumptions that the networks have equal species richness (noted S), so that S 1 = S 2 = S, and the same connectance (noted ρ), so that ρ 1 = ρ 2 = ρ. As a consequence, the two networks have the same number of links L = ρ × S 2 1 = ρ × S 2 2 . The assumption of equal connectance will be relaxed in a subsequent numerical experiment. These simplifications allow to express the size of C , R, and T only as functions of p and q, as they would all be multiplied by L, which can therefore be dropped from the calculation.
The value of C is the proportion of shared species p 2 , as per fig. 1, times the proportion of shared links, q, giving C = qp 2 . Each network has r = p 2 − (qp 2 ) rewired links, which leads to R = 2r = 2p 2 (1 − q). Finally, we can get the number of unique links in each network t by substracting C + r from the total number of links (which, since we scale everything by L, is 1), yielding t = 1 − qp 2 − p 2 + qp 2 , which is t = 1 − p 2 . The total number of unique links due to turnover is T = 2t = 2(1 − p 2 ). It is important to note that C and R, namely the number of links that are kept or rewired, depends on species sharing (p), as the possible size of the overlap between the two networks does, but the quantity of links that are different due to turnover does not depends on rewiring.
With the values of C , R, and T , we can write This is a first noteworthy result: the value of β os , in the ideal scenario of equal links and richness, is the probability of link re-wiring. Because this is true regardless of the value of p (species turnover), this makes β os a strongly ecologically informative component.
Similarly, we can write 6 Timothée Poisot Figure 2 -Values of β os , β wn , β st , and β st /β wn as a function of the probability q or sharing a link (x-axis), and the probability p of sharing a species (y -axis). Larger values indicate more dissimilarity, such that for p = q = 1 the dissimilarity as measured by β wn = 0, and for p = q = 0 the dissimilarity as measured by β wn = 1. As expected, the relative importance of turnover (β st ) is maximal when there is no rewiring, and when turnover increases.
The overall dissimilarity responds to q (rewiring) linerarly, and to p quadratically (which is expected assuming unipartite networks, in which species are present on both sides).
Expressing β os and β wn as functions of p and q trivializes the search for the expression of β st , which is It is worth examining this solution in some detail. β st scales linearly with the probability that a link will not be rewired -in other words, in a pair of networks for which rewiring is important (q goes to 0), species turnover is going to be a relatively less important mechanism to dissimilarity. β st increases when turnover is important (p goes to 0), and therefore β st represents a balance between species turnover and link rewiring. These three values, as well as β st /β wn , are represented in fig. 2.

Sensibility of the decomposition to differences in connectance.
The results presented in fig. 2 include the strong assumption that the two networks have equal connectance. Although the range of connectances in nature tends to be very strongly conserved within a system, we can relax this assumption, by letting one network have more interactions than the other. Note that for the sake of notation simplicity, I maintain the constraint that the two networks are equally species rich. Therefore, the sole variation in this numerical experiment is that one network has L 1 = ρ × a × S 2 , and the other network has L 2 = ρ × S 2 ; in other words, L 1 = a × L and L 2 = L. As one step of the components calculations involves a min operation, I will add the constraint that L 1 ≤ L 2 , which is to say 0 < a ≤ 1. The value of a is the ratio of connectances of the two networks, and the terms S 2 and ρ being shared across all factors, they will be dropped from the calculations. The maximal number of links that can be shared is ap 2 (i.e. min(p 2 , ap 2 )), as we cannot share more links than are in the sparsest of the two networks. Of these, q are not rewired, leading to C = aqp 2 . The number of links that are rewired in network 1 is the number of its links between shared species minus C , i.e. r 1 = ap 2 −aqp 2 = ap 2 (1−q), and similarly r 2 = p 2 −aqp 2 = p 2 (1−aq), leading to R = r 1 + r 2 = p 2 [a(1 − q) + 1]. Using the same approach, we can get t 1 = a(1 − p 2 ) and t 2 = (1 − p 2 ), leading to T = t 1 + t 2 = (1 − p 2 )(1 + a).
The values of these components are visualized in fig. 3. The introduction of the connectance ratio makes these expressions marginally more complex than in the case without differences in connectance, but the noteworthy result remains that in the presence of differences of connectance, the value of β os is still independent from species turnover. In fact, there is an important conclusion to be drawn from this expression. The shared species component is by definition square, meaning that from an actual measurement of β os between two networks for which we know the connectance, noted b os , we can get the probability of rewiring by reorganizing the terms of b os = 1 − 2aq/(1 + a) as which gives the probability of rewiring as 1−q; note that this is an approximation, as it assumes that the connectances of the entire network and the connectances of the shared components are the same.

Does the partition of network dissimilarity needs a new normalization?.
One of the arguments put forth in a recent paper by Fründ (2021) is that the decomposition outlined above will overestimate the effect of rewiring; I argue that this is based on a misunderstanding of what β st achieves. It is paramount to clarify that β st is not a direct measure of the importance of turnover: it is a quantification of the relative impact of rewiring to overall dissimilarity, which, all non-turnover mechanisms being accounted for in the decomposition, can be 8 Timothée Poisot Figure 3 -Consequences of changing the ratio of connectances between two equally species-rich networks on the decomposition of network beta-diversity, assuming p = 0.8. Networks with stronger differences in connectance will tend to be more similar, because the differences in number of links becomes extreme enough that the chances of all the links in the sparser network being in the denser network increases. explained by turnover mechanisms. In this section, I present two numerical experiments showing (i) that the β os component is in fact an accurate measure of rewiring, and (ii) that β st captures the consequences of species turnover, and of the interactions brought by unique species.

Illustrations on arbitrarily small networks are biased.
We can re-calculate the illustration of Fründ (2021), wherein a pair of networks with two shared interactions (C = 2) receive either an interaction in T , in R, or in both: C T R β os β wn β st β st /β wn 2 0 0 0 0 0 2 1 0 1/5 1/5 0 0 2 0 1 0 1/5 1/5 0 The over-estimation argument hinges on the fact that β st < β os in the last situation (one interaction as rewiring, one as turnover). Reaching the conclusion of an overestimation from this is based on a mis-interpretation of what β st means. The correct interpretation is that, out of the entire network dissimilarity, only three-fifths are explained by re-wiring. The fact that this fraction is not exactly one-half comes from the fact that the Wilson & Shmida (1984) measure counts shared interactions twice (i.e. it has a 2C term), which over-amplifies the effect of shared interactions as the network is really small. Running the same calculations with C = 10 gives a relative importance of the turnover processes of 47%, and β st goes to 1/2 as C /(T +R) increases. As an additional caveat, the value of β st will depend on the measure of beta-diversity used. Measures that do not count the shared interaction twice are not going to amplify the effect of rewiring.
Based on the arguments presented above, I do not think the suggestion of Fründ (2021) to change the denominator of β os makes sense as a default; the strength of the original approach by Poisot et al. (2012) is indeed that the effect of turnover is based on a rigorous definition of networks as graphs (as opposed to networks as matrices), in which the induction of vertices from the edgelist being compared gives rise to biologically meaningful denominators. The advantage of this approach is that at no time does the turnover of species itself (or indeed, as shown in many places in this manuscript, the network richness), or the connectance of the network, enter into the calculation of the beta-diversity components. As such, it is possible to use β os and β wn in relationship to these terms, calculated externally (as was recently done by e.g. Higino & Poisot 2021), without creating circularities.
Therefore the argument of Fründ (2021), whereby the β os component should decrease with turnover, and be invariant to connectance, does not hold: the very point of the approach is to provide measures that can be interpreted in the light of connectance and species turnover. Adopting the perspective developed in the previous section, wherein networks are sets and the measures of β-diversity operates on these sets, highlights the conceptual issue in the Fründ (2021) alternative normalization: they are using components (namely, interactions) of the networks that are not directly part of the two networks being compared.

1.3.2.
Using an alternative normalization trivializes the results. In this numerical experiment, we reproduce the results in fig. 2, but using the alternative normalization described above. The results are presented in fig. 4. Producing the analytical solutions for the various components, following the expressions for C , T , and R given for fig. 2, yields a similar value for β wn (i.e. the two approaches estimate the same value for total dissimiliarity), but different values for β st and β os . Specifically, β os becomes p 2 (1−q), which becomes dependent on species turnover. This, from an ecological point of view, makes no sense: the quantification of how much shared species interact in a similar way should not depend on how much species actually overlap. The opposite problem arises for β st , which becomes 1 − p 2 . In short, the relative importance of species turnover is simply species turnover itself, and has no information on interaction dissimilarity. Therefore the core issue of the Fründ (2021) alternative is that, by attempting to fix a non-issue (namely the over-estimate of the importance of re-wiring, which is only true in trivially small networks), it blurs the meaning of β os , and renders β st useless as it is a re-expression of species beta-diversity.

Measuring network beta-diversity: recommendations.
Based on the numerical experiments and the derivations presented in this paper, we can establish a number of recommendations for the measurement and analysis of network dissimilarity. First, β os allows to estimate the rate of rewiring, which is an important ecological information to have; quantifying it properly can give insights as to how networks differ. Second, β st captures both turnover and rewiring mechanisms, but its interpretation is easier to accomplish in the context of total network dissimilarity, and therefore β st /β wn should be interpreted more thoroughly.