Community size and disturbance history jointly explain
the interplay between stochastic and deterministic
community variation in benthic invertebrates

Kurt Villsen, Leah Bêche, Gaït Archambaud-Suard, Martin Daufresne

► To cite this version:

Kurt Villsen, Leah Bêche, Gaït Archambaud-Suard, Martin Daufresne. Community size and disturbance history jointly explain the interplay between stochastic and deterministic community variation in benthic invertebrates. Oikos, 2024, 2025, pp.e10968. 10.1111/oik.10968. hal-05227776

HAL Id: hal-05227776

https://hal.inrae.fr/hal-05227776v1

Submitted on 28 Aug 2025

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

OIKOS

Research article

Community size and disturbance history jointly explain the interplay between stochastic and deterministic community variation in benthic invertebrates

Kurt Villsen<fnref n="1" />, Leah Bêche<fnref n="2" />, Gaït Archambaud-Suard<fnref n="1" /> and Martin Daufresne<fnref n="1" />

Correspondence: Kurt Villsen (kurt.villsen@inrae.fr)

Oikos

2025: e10968

doi: 10.1111/oik.10968

Subject Editor: Werner Ulrich

Editor-in-Chief: Pedro Peres-Neto

Accepted 25 November 2024

<figure><img src="image_3.png" /></figure>

Community ecology has so far struggled to integrate both deterministic and stochastic processes into a global model of community variation. To address this issue, we aimed to characterise the ecological conditions that determine the relative importance of deterministic and stochastic community variation in benthic macroinvertebrates. We sampled macroinvertebrate and algal periphyton communities, and microhabitat conditions at monthly intervals over a five year period in two sampling sites in the regulated Durance River and one site in the Asse River (a natural tributary of the Durance). The relative importance of stochastic and deterministic processes was estimated over time as functional and taxonomic spatial β-deviation (i.e. β-diversityobs – mean β-diversitynull/SD β-diversitynull) for each sampling date and site. We additionally quantified deterministic variation as the trait–environment relationship and predicted a positive correlation with β-deviation metrics. We found evidence of overdispersal in both functional and taxonomic β-diversities compared to null expectations. Spatial β-deviation was highly variable over temporal scales and was jointly explained by invertebrate community size, disturbance (i.e. flooding), periphyton diversity and to a lesser extent, microhabitat diversity. The key factor that explained β-deviation was recent river discharge (< 90 days), which had a strong negative effect on community size but was also directly associated with higher β-deviation, likely related to recolonization processes post-flood. Lastly, we found that when β-deviation was high, the hydraulic trait–environment relationship was stronger. This indicates that spatial heterogeneity in hydraulic conditions was the main driver of deterministic variation in invertebrate community structure. This study demonstrates that the importance of stochastic processes can vary greatly over short (~ months) and long (~ years) temporal windows with significant consequences for trait–environment relationships. Our study provides an example of how stochastic community variation can be modelled to better interpret deterministic patterns of community structure in natural communities.

Keywords: Community ecology, disturbance, macroinvertebrates, null models, periphyton, river regulation, temporal dynamics, trait-environment relationship

<figure><img src="image_4.png" /></figure>

<footnote n="1">¹INRAE, Aix Marseille Université, RECOVER, Aix-en-Provence, France</footnote>

<footnote n="2">²EDF - Hydroelectricity Engineering Centre, Savoie Technolac, Le Bourget du Lac, France</footnote>
Introduction

One of the main objectives of ecology is to understand how assemblages arise and vary across time and space. Research into community variation has traditionally focused on deter- ministic mechanisms, wherein species interactions (e.g. competition, mutualism and predation) and the response of species' traits to environmental gradients are expected to drive patterns of biodiversity at local scales (Chase and Leibold, 2009). In addition to deterministic processes, demographic (i.e. related to births, deaths or migrations) and environmen- tal stochasticity (i.e. variability in extrinsic conditions) are increasingly recognised as key drivers of biodiversity variation (Vellend 2016, Hart et al. 2017, Shoemaker et al. 2019). Most ecologists now generally agree that ecological communities are driven by a combination of deterministic and stochastic pro- cesses. One of the main objectives in community ecology is now to understand the conditions that determine where com- munities fall along a gradient of deterministic to stochastic assembly (Chase et al. 2011, Chase and Myers 2011, Gilbert and Levine 2017, Saito et al. 2021, Shi et al. 2021).

In order to disentangle the relative importance of stochas-
tic versus deterministic community variation, ecologists often
rely on tests based on null models (Gotelli and Graves 1996,
Chase 2010, Chase et al. 2011). Null models test the extent
to which community dissimilarity (β-diversity) deviates from
null (i.e. stochastic) expectations (hereafter β-deviation) after
controlling for certain community parameters (e.g. gamma
diversity, alpha diversity and species abundance distribu-
tions; Gotelli and Graves 1996, Kraft et al. 2011). Significant
β-deviation values are often taken as evidence of non-ran-
dom (i.e. deterministic) community variation (Chase 2010,
Chase et al. 2011). Null model approaches are particularly
versatile and can be applied to several distinct diversity fac-
ets (e.g. taxonomic, functional or phylogenetic β-diversities)
depending on specific research questions. For example, as
functional traits are expected to vary along environmental
gradients (i.e. the trait-environment relationship; Shipley
2010, Townsend and Hildrew 1994) functional β-deviation
could be particularly useful to estimate non-randomness in
the functional structure of communities. Though null model
approaches are becoming increasingly common in ecology
(Martínez-Villa et al. 2020, Krishnadas and Osuri 2021,
Ge et al. 2021, Shi et al. 2021, Timoner et al. 2022), there
is a certain number of caveats that should be mentioned
(Gotelli and Ulrich 2012, Tucker et al. 2016). For example,
certain random processes have been shown to generate sig-
nificant β-deviation, such as founder-effects (Chase 2010),
dispersal limitation among species (Myers et al. 2013) and
uneven species abundance distributions (Tucker et al. 2016).
To overcome some of the pitfalls of null model tests, we pro-
pose coupling estimates of β-deviation with other, comple-
mentary indicators of deterministic community structure.
For example, the strength of the relationship between spe-
cies' traits and environmental gradients (hereafter the trait-
environment relationship; Townsend and Hildrew 1994), is
commonly used as an indicator of deterministic community

structure (Cottenie 2005, Vellend et al. 2014). Coupling null
model and trait–environment relationship approaches will
likely lead to a greater understanding of the forces that drive
stochastic and deterministic community variation.

Previous theoretical studies and to a lesser extent, empiri-
cal studies have highlighted three main mechanisms that
may influence the relative importance of deterministic versus
stochastic community variation. First, habitat heterogeneity
is expected to promote deterministic community variation
when local conditions favour the establishment and growth
of certain traits (Gravel et al. 2006, Dini-Andreote et al.
2015, Liu et al. 2018). High habitat heterogeneity would be
expected to promote distinct trait combinations across space
(i.e. heterogenous selection) while low habitat heterogene-
ity is expected to filter the overall number of trait combina-
tions in a given environment (i.e. homogenising selection).
Second, gradients of environmental stress such as elevation
gradients (Martínez-Villa et al. 2020, García-Navas et al.
2021, Timoner et al. 2022), disturbance regimes (Chase
2007, Lepori and Malmqvist 2009) or productivity gradients
(Chase 2010) are expected to increase the relative impor-
tance of deterministic processes along a gradient of increas-
ing stress. This is expected to arise due to the possibility of
multiple stable equilibria at low stress conditions, wherein
priority effects may persist over time (Chase 2010). Lastly,
variation in community size (i.e. the number of individuals
per unit of area; Orrock and Watling 2010) determines the
importance of ecological drift (i.e. variation associated with
chance demographic events e.g. births, deaths, dispersal) and
thus the relative importance of stochastic community varia-
tion (Gilbert and Levine 2017, Siqueira et al. 2020). Indeed,
when community size is small, the probability of population
extinction due to chance events (e.g. reproductive failure
or environmental disturbance) is higher (Melbourne and
Hastings 2008, Orrock and Watling 2010). Thus, the relative
importance of deterministic versus stochastic processes likely
depends on a combination of habitat heterogeneity, envi-
ronmental stress and community size. Previous studies have
generally addressed the drivers of deterministic and stochastic
processes across spatial scales (Liu et al. 2018, Siqueira et al.
2020, Timoner et al. 2022), while temporal drivers remain
less well understood (Huttunen et al. 2017, Saito et al. 2021,
Melo and Froehlich 2022). Furthermore, recent evidence
suggests that the balance between deterministic and stochas-
tic forces can greatly vary over seasonal scales (Tolonen et al.
2018, Aguilar and Sommaruga 2020, Melo and Froehlich
2022). This may arise due to seasonal variation in environ-
mental stress due to disturbance (e.g. seasonal flooding in
rivers; Death 2008, Saito et al. 2021) and productivity (e.g.
seasonal peaks in productivity; Schöl et al. 2002). Similarly,
as many communities undergo seasonal growth (e.g. benthic
macroinvertebrates; Jackson and Füreder 2006) the impor-
tance of stochasticity should also vary according to commu-
nity size. In order to model the drivers of deterministic and
stochastic forces it will therefore be necessary to account for
multiple factors that may differ in importance over both spa-
tial and temporal scales (e.g. seasonality).
Benthic macroinvertebrate communities present a high degree of seasonal variability in temperate latitudes (Jackson and Füreder 2006, Huttunen et al. 2017) appropriate for studying how stochastic and deterministic processes vary over time and space. The abundance and composition of benthic macroinvertebrates are strongly influenced by flow regime dynamics, characterised by the frequency, intensity and timing of high and low flows (Poff et al. 1997, Lake 2000, Monk et al. 2008, White et al. 2017). In particular, flood events are known to greatly diminish invertebrate communities and drive secondary succession processes post-flood (Death 2008, Eagle et al. 2021, Saito et al. 2021, Melo and Froehlich 2022). On one hand, we would expect severe flow regimes to increase β-deviation due to an environmental filter effect wherein founder effects are less likely to persist (Chase 2010). On the other hand, severe flow regimes could enhance stochastic processes as smaller communities are expected to be more sensitive to chance demographic events (i.e. ecological drift; Orrock and Watling 2010). Environmental stress for benthic invertebrates should also be related to the availability of periphytic algae (diatoms, cyanobacteria, green algae, red algae etc.) which represent a primary food source for many invertebrates (Fenoglio et al. 2020). In accordance with Chase 2010, in the case that periphytic algae (hereafter periphyton) biomass is a limiting factor, we would expect high periphyton density to promote more stochastic communities due to weaker environmental filtering effects. At local-scales, invertebrate distributions are dependent on microhabitat conditions like substrate composition (Downes et al. 2000), substrate clogging (Kaller and Hartman 2004, Jones et al. 2012), current velocity and depth (Beauger et al. 2006, Pander et al. 2019). Spatial variation in periphyton community composition has also been shown to co-vary with local-scale patterns of benthic invertebrate community variation (Lamberti and Resh 1983, Fenoglio et al. 2020). However, as invertebrates also influence the periphyton community through grazing pressure (Peters et al. 2007), their spatial relationship should be considered as covariation rather than directional. We would expect high microhabitat diversity associated with substrate, hydraulics and the periphyton to promote greater community dissimilarity than expected by chance (i.e. heterogeneous selection). While homogeneous conditions would be expected to result in higher community similarity than expected by chance (i.e. homogeneous selection). Lastly, invertebrates exhibit complex life histories with variable timing of new cohorts and periodicity of juvenile phases leading to marked seasonal variation in the abundance of certain taxa (Clifford 1982, Corbet et al. 2006, Tachet et al. 2010). We would therefore expect the influence of ecological drift to vary according to seasonal variation in macroinvertebrate community size, with smaller communities being dominated by stochastic factors (Siqueira et al. 2020).

Studies that aim to disentangle the relative importance of stochastic versus deterministic forces of community variation are becoming increasingly common. However, the vast majority of studies that investigate the ecological drivers of the stochastic versus deterministic relationship

have focused on spatial community variation (Daniel et al. 2019, Ge et al. 2021) and rarely account for temporal variation (Tolonen et al. 2018, Aguilar and Sommaruga 2020). Additionally, as significant deviation from null β-diversity expectations (i.e. β-deviation) can also arise due to random processes (Chase 2010, Myers et al. 2013, Tucker et al. 2016), it will be important to couple multiple indicators of community structure to better understand the underlying processes. To address these knowledge gaps we aimed to: 1) determine the ecological drivers of β-deviation and to 2) test the relationship between β-deviation and the trait-environment relationship (i.e. a complementary indicator of deterministic structure) in benthic macroinvertebrates. First, as habitat heterogeneity is a requirement of heterogeneous selection, we expected a positive relationship between β-deviation and habitat heterogeneity (microhabitat and periphyton diversity). Secondly, as low stress conditions is expected to promote stochastic variation through the maintenance of multiple stable equilibria, we expected environmental stress related to high river flow disturbance and low periphyton density (i.e. low food availability) to be associated with higher β-deviation. Thirdly, we expected smaller communities to be associated with lower β-deviation, due to a stronger effect of ecological drift. Lastly, as negative β-deviation values are often interpreted as resulting from homogenising selection, and positive β-deviation values from heterogeneous selection (Soininen and Graco-Roza 2024), we expected to observe a positive relationship between β-deviation and the strength of the trait-environment relationship. This multifaceted approach will contribute to our understanding of how spatial structure varies across temporal scales in benthic invertebrate communities.

# Material and methods

## Study sites

The Durance River is one of the main tributaries of the Rhône River (south-eastern France). It is a braided river with a catchment basin of 14 280 km² and a length of 305 km. Our study sites were located in the middle Durance, its climate is Mediterranean, characterised by warm dry summer periods and rainy periods in spring and autumn (Olivier et al. 2022). River flow is highly regulated by a hydroelectrical chain that was constructed progressively between 1950 and 1980 for the eight mainstem dams. The riverbed is largely composed of coarse pebbles and cobbles of various geological origins (gneiss and limestone). The Durance also has a natural tendency to accumulate fine sediments due to black marl formations in the region. This fine sediment accumulation can lead to both superficial and interstitial clogging of the riverbed (Loire et al. 2019). The Asse River, a tributary of the Durance River, was selected as a natural reference for the Durance River, despite their differences in size. It is also a braided river with similar geology and climate to the Durance, though its drainage basin is considerably smaller (657 km², length:
76.3 km). Sampling was performed at three sites: two in the Durance River and one in the Asse River (Fig. 1). In order to test whether the Asse River influences the macroinvertebrate community in the Durance River, one of the Durance sites was positioned upstream (Dur-1) and downstream (Dur-2) of the confluence with the Asse River.

## Hydrological conditions

We obtained hourly hydrological data ($Q \text{ m}^3 \text{ s}^{-1}$) for the period of December 2012 to August 2018. Hydrological data for the two Durance sites was obtained from the Escale hydro-electrical dam (28.3 km and 34.7 km upstream of the Dur-1

and Dur-2 sites, respectively). We also obtained hydrological data for the Bléone River (906 $\text{km}^2$ drainage basin) as both Durance sites were situated downstream from its confluence with the Durance (Fig. 1). The Bléone River is also regulated by a dam but as discharge measurements were not available. We obtained simulated discharge values inferred from reservoir water levels for the sample period from the French electrical company (EDF). These simulated discharge values were then added to the Durance hydrograph. For the Asse site, we obtained hydrological data from the Clue Chambrières limnology station (14.7 km upstream from the Asse study site). We also added the input of the Asse to the Dur-2 hydrograph, as Dur-2 is located downstream from the confluence between

<figure><img src="image_5.png" /><figcaption>Figure 1. Map of the study sites (above) and hydrographs (below). Black triangles indicate the two regulated Durance sites, the green triangle indicates the natural Asse site. The position of the Escale and Bleone hydroelectrical dams that regulate the flows in the study reach are indicated as double black bars. River discharge is expressed as $Q \text{ m}^3 \text{ s}^{-1}$ and the timing of sampling dates is represented by inverted triangles. The hydrograph of the Durance sites includes simulated discharge from the Bleone River.</figcaption></figure>
the Asse and Durance rivers. Lastly, we standardised river discharge (Q m³ s⁻¹) to account for differences in the size of catchment basins between our sampling sites. River discharge was converted to mm h⁻¹ and then standardised by catchment area using the following formula: Q(l/s) × T(s)/(S km² × 1000 × 1000). Where Q is discharge (in l/s), T is the number of seconds in the desired time unit (i.e. 3600 seconds in an hour) and S is the surface area of the catchment basin (Dur-1=8131 km², Dur-2=91 851 km² and Asse=538 km²).

## Macroinvertebrate and periphyton sampling protocol

We performed monthly sampling beginning in late winter (~ February) and ending in early summer (~ July) from 2014 to 2018 (Table 1). We selected this period in order to capture the main growth period of invertebrate and periphyton communities in our study sites (Cazaubon and Giudicelli 1999).

Sampling was designed to be representative of the various hydrologic ambiances found in riffle habitats. To this end, we defined three hydraulic ambiances: 30–50 cm s⁻¹, 70–90 cm s⁻¹ and > 100 cm s⁻¹, wherein we obtained three macroinvertebrate and periphyton samples at each sampling date (i.e. three samples per ambiance = nine samples total). Samples were distributed haphazardly within each ambiance with a minimum of three meters between two samples. The length of the sampling reach varied according to the availability of the three ambiances, ranging from 50 m to ~ 1000 m in length. Macroinvertebrate samples were obtained using a Surber sampler (0.10 m²) with a 0.25 mm mesh. Samples were immediately stored in 70% ethanol, awaiting morphological identification. In the laboratory, macroinvertebrate samples were rinsed and further sieved (0.63 mm mesh) before being counted and identified under binocular microscope. Species- or genus-level Identification was obtained for the majority of specimens with the exception of Diptera (which were identified to the family-, sub-family- or tribe-levels) and other

groups like Oligochaeta and Hydrachnidia which could not be reliably identified. Nine periphyton samples were obtained in parallel to each of the nine macroinvertebrate samples in the same sample area. A periphyton sample was constituted of three medium-sized stones found beside the Surber sample. The biofilm on each stone was scrapped from a standardised 25 cm² area (drawn on by pencil), using a scalpel and/or nylon brush and transferred to a container with a solution of formaldehyde 2–5%. The resulting solution from each of the three stones (total area sampled=75 cm²) was then pooled into a single container. Note that the area sampled changed after 2014 (when 100 cm² area was sampled on each stone) to account for the large amount of material that was collected. In the laboratory, each sample was brought to a fixed volume of liquid (50 ml) and put into suspension to homogenize the samples. Counting and identification of the periphyton was performed using a microscope and expressed as the number (of cells) per cm².

## Micro-habitat description

We described microhabitat conditions that are pertinent to the ecology of benthic organisms (granulometry, clogging, depth, velocity, etc.) at the scale of each Surber sample (i.e. 0.10 m²). The granulometry of the riverbed was quantified using semi-quantitative size-classes described by Malavoi and Souchon 1989. The substrate size-class scale ranged from 0 (silt: 0.0039 – 0.0625 mm diameter) to 10 (bedrock: > 1024 mm diameter; Supporting information). We used substrate size-classes to estimate the surface and underlayer substrate richness, largest substrate size and dominant substrate size. Substrate clogging was evaluated visually using a semi-quantitative scale ranging from 1 to 5 (Supporting information) designed to describe the level of substrate embeddedness and clogging of the interstitial space by silt and algae (Archambaud et al. 2005). Current velocity was measured at regular intervals beginning at 3 cm from the river bottom and

<table><caption>Table 1. Sampling information including site positions and sampling dates. Macroinvertebrate and microhabitat samples were obtained at all sampling dates (Dur-1 and Dur-2: n=28; Asse: n=24; total: n=80) and sampling dates with periphyton data available (Dur-1 and Dur-2: n=20; Asse: n=16; total: n=56) are indicated with (*). Please note that Dur-1 and Dur-2 were sampled either on the same day or over a two day period.</caption><thead><tr><th>River</th><th>Sampling site ID</th><th>Coordinates</th><th>2014</th><th>2015</th><th>2016</th><th>2017</th><th>2018</th></tr></thead><tbody><tr><td rowspan="5">Durance</td><td rowspan="5">Dur-1 and Dur-2</td><td>Dur-1, 43°53'17.6"N, 05°53'02.7"E</td><td>–</td><td>–</td><td>10 Feb (*)</td><td>10 Feb (*)</td><td>13–14 Feb (*)</td></tr><tr><td rowspan="5">Dur-2, 43°50'17.8"N, 05°50'52.0"E</td><td>27 Feb (*)</td><td>18 Feb (*)</td><td>24 Feb (*)</td><td>02 Mar (*)</td><td>07 Mar (*)</td></tr><tr><td>17 Mar (*)</td><td>18 Mar (*)</td><td>25 Mar (*)</td><td>29 Mar (*)</td><td>28 Mar</td></tr><tr><td>16 Apr (*)</td><td>20 Apr (*)</td><td>20 Apr (*)</td><td>27 Apr (*)</td><td>25 Apr</td></tr><tr><td>20 May (*)</td><td>18 May (*)</td><td>18 May (*)</td><td>19 May (*)</td><td>24 May</td></tr><tr><td>–</td><td>17 Jul</td><td>28–29 Jun</td><td>07 July</td><td>27 Jun</td></tr><tr><td rowspan="8">Asse</td><td rowspan="8">Asse</td><td rowspan="8">43°55'47.6"N, 06°08'21.1"E</td><td>–</td><td>–</td><td>–</td><td>–</td><td>25 Jul</td></tr><tr><td>–</td><td>–</td><td>10 Feb (*)</td><td>09 Feb (*)</td><td>14 Feb (*)</td></tr><tr><td>–</td><td>19 Feb (*)</td><td>24 Feb (*)</td><td>02 Mar (*)</td><td>06 Mar (*)</td></tr><tr><td>–</td><td>19 Mar (*)</td><td>23 Mar (*)</td><td>28 Mar (*)</td><td>27 Mar</td></tr><tr><td>–</td><td>22 Apr (*)</td><td>19 Apr (*)</td><td>27 Apr (*)</td><td>24 Apr</td></tr><tr><td>–</td><td>20 May (*)</td><td>18 May (*)</td><td>18 May (*)</td><td>23 May</td></tr><tr><td>–</td><td>15 Jul</td><td>28 Jun</td><td>05 Jul</td><td>26 Jun</td></tr><tr><td>–</td><td>–</td><td>–</td><td>–</td><td>27 Jul</td></tr></tbody></table>
at approximately 0.20, 0.40 and 0.80 water depth, using an electromagnetic current meter (OTT MFT Pro).

## Statistical analyses

All statistical analyses and data manipulation were performed in R ver. 4.20 (www.r-project.org) running in RStudio (RStudio 2011).

### Spatio-temporal variation in macroinvertebrate and periphyton communities

We performed principal components analysis (PCA) to characterise spatiotemporal variation in macroinvertebrate and periphyton communities. PCAs were based on total invertebrate and periphyton community density (inv./0.10 m² and cells cm⁻² for invertebrates and periphyton, respectively), taxonomic richness (based on the highest possible taxonomic identification), Shannon and Simpson diversity indices, and taxonomic evenness. Lastly, as benthic communities have a tendency to be dominated by a few hyper abundant taxa (Minshall et al. 1992, Battle et al. 2007), we calculated the percentage contribution of the most abundant taxon to the total sample density (hereafter dominance). Functional diversity indices were also calculated for the macroinvertebrate community. Functional diversity indices were based on fuzzy-coded traits from Tachet et al. 2010, and included ecological (microhabitat, temperature and water velocity preferences, and feeding strategy) and biological (respiration, diet, locomotion, dispersion strategy, lifestyle, reproduction, number of generations per year) characteristics (Supporting information). Differences in taxonomic assignment between the invertebrate and functional datasets were resolved by summarising groups to the highest shared taxonomic-level (genus, tribe or family; taxa identified to order-level or higher were excluded from functional analyses) and averaging fuzzy trait values (Supporting information). Functionally identical taxa were regrouped into functional entities using the function *sp.to.fe* from the 'mFD' package (Magneville et al. 2022). Fuzzy-traits were then transformed into two continuous variables (axes 1 and 2) using principal coordinates analysis (PCoA) based on Gower distances (i.e. functional dissimilarity between taxa). We then calculated functional richness, evenness and divergence using *fd_fric*, *fd_fve* and *fd_fdiv* functions, respectively from the 'fundiversity' package (Grenié and Gruson 2023). The 'fundiversity' package calculates functional metrics according to Villéger et al. (2008), wherein functional richness corresponds to the volume of the convex hull of multidimensional functional space in each sample. Functional evenness corresponds to the minimum spanning tree which links all the species in the multidimensional functional space. Functional divergence is quantified by the extent to which taxa diverge in their distance from the centre of functional space, and is weighted by taxa abundance.

### Calculating β-deviation

The objective of the β-deviation metric was to quantify the degree of non-random invertebrate community structure at

each sampling site and date. We calculated β-deviation as the extent to which observed spatial dissimilarity (β-diversity) within macroinvertebrate communities deviated from null expectations (i.e. based on random community reshuffling). β-deviation was estimated for both taxonomic and functional β-diversity indices, separately, with the aim of providing complementary information on the processes that drive community assembly. β-diversities were calculated separately for each sampling date and site (i.e. among the nine Surber samples per campaign) as pairwise Hill numbers (q=1) based on a Jaccard-type complement. Taxonomic β-diversities were calculated using the *pair_dis* function from the 'hilldiv' package (Alberdi and Gilbert 2019) and functional β-diversities were calculated using the *beta_fd_q* function (tau=mean, package 'mFD'; Chao et al. 2019, Magneville et al. 2022) based on Gower distances between functional entities (function *funct_dis*, package 'mFD'; Magneville et al. 2022).

The choice of null model is particularly important as it imposes constraints on the null distribution generated by the model, thus modifying the ecological significance of β-deviation (Harvey et al. 1983, Gotelli and Ulrich 2012, Vellend et al. 2014). We therefore selected the most widely used null model based on the reasoning of Kraft et al. 2011 which randomly assigns individuals to sites while preserving the overall species abundance distributions and the total number of individuals in each site (Tucker et al. 2016, Siqueira et al. 2020, Shi et al. 2021). Abundance-based null model approaches like the Kraft et al. null model have been shown to be more robust than β-deviation estimates based on presence/absence data (Tucker et al. 2016). It should be mentioned that the Kraft et al. null model has been criticised, notably, for constraining species abundance distributions. Qian et al. 2013 has pointed out that species abundance distributions actually arise largely due to deterministic processes (Alonso et al. 2008). However, as the abundance distribution of invertebrate communities varies greatly over seasonal timeframes, we justify our use of the Kraft et al. model by our need to explicitly control for such temporal variation in species abundances. β-deviation was calculated as the standardised effect size of a two-sided test comparing the simulated and observed β-diversity values using the *oecosimu* function from the 'vegan' package (n=1000, method=r2dtable; Oksanen et al. 2008, Patefield 1981). There are three possible outcomes for this test: 1) the mean β-diversity value falls within 95%CI of simulated values, indicating that similarity could have arisen solely from stochastic processes, 2) the mean β-diversity value exceeds the 95%CI of simulated values, indicating overdispersal of community variation and 3) the mean β-diversity is significantly lower than the 95%CI of simulated values, indicating clustered community variation. Positive (i.e. outcome 2) and negative (outcome 3) β-deviation values are expected to arise from a dominant role of heterogenous and homogenous selection processes, respectively. It should be noted that non-significant β-deviation values (outcome i) can also arise due to opposing deterministic forces of community assembly. For example, an equal contribution of heterogenous and homogenous selection would
be expected to result in non-significant β-deviation. In the case of a non-significant β-deviation value (i.e. p > 0.05), the value was set to zero. This two-sided test assumes that the null distribution is normally distributed. An assumption that is often invalidated in the case of null model generated metrics (Bernard-Verdier et al. 2012), including the present study. We therefore rank transformed our β-deviation metrics into 10 distinct classes in order to reduce the magnitude of differences among standardised effect sizes driven by non-normal null distributions.

## The trait–environment relationship

We quantified the trait–environment relationship as an additional indicator of deterministic community structure (Cottenie 2005), and tested its relationship with β-deviation. The trait–environment relationship was quantified as the goodness-of-fit between invertebrate functional β-diversities and environmental β-diversities. Invertebrate and environmental β-diversity were both determined within the context of each sampling date at each site. Invertebrate assemblages were compared using functional β-diversities. Environmental β-diversity was separated into two abiotic components including 1) substrate and underlayer characteristics (dominant substrate, size-class richness, smallest and largest substrate size-class, and clogging class), and 2) hydraulic characteristics (water velocity mean, max, min, coefficient of variation and at 3 cm from the riverbed), hydraulic ambiance (30–50 cm s⁻¹, 70–90 cm s⁻¹ or > 100 cm s⁻¹) and water depth. To calculate abiotic environmental β-diversity we first scaled all microhabitat variables to zero mean. Microhabitat samples were then plotted using principal components analysis (function *dudi*.pca, package 'ade4'; Dray and Dufour 2007) and β-diversity was determined as the Euclidean distance between points. We also quantified 3) periphyton β-diversity as a biotic dimension of environmental β-diversity. To do so, periphyton community data (log + 1 transformed) were compared using pairwise Bray–Curtis distances. The trait–environment relationship was quantified as the Pearson's r correlation between functional invertebrate β-diversities and environmental β-diversities (i.e. β-diversity<sub>inv.</sub> ~ β-diversity<sub>env.</sub>) for each sampling date at each site and environmental β-diversity component (i.e. substrate, hydraulic and periphyton), separately. This resulted in three trait–environment relationships related to: substrate, hydraulic and periphyton β-diversities.

## The relationship between ecological conditions, β-deviation and the trait–environment relationship

To characterise the relationship between ecological conditions, β-deviation and the trait–environment relationship we fitted causal models. We considered four distinct categories of ecological variables: disturbance, phenology, abiotic conditions and biotic conditions (periphyton and invertebrate communities; see the Supporting information for a priori model structure). However, due to incomplete periphyton data (Table 1) we fitted two causal models (model 1) one using all data types (n=56) and (model 2) a second excluding periphyton data (n=80). Ecological variables were all

zero-mean standardised. Prior to model selection we verified the normality of taxonomic and functional β-deviation metrics, which were both skewed towards zero. We therefore log + 1 transformed both β-deviation metrics prior to rank transformation to meet the assumption of normality.

The first step was to select the best performing ecological predictors of β-deviation. Variable performance was evaluated for each ecological compartment according to RandomForest analysis (mtry=10, ntree=5000, 100 runs, package 'randomForest'; Liaw and Wiener 2002), based on mean square error divided by its standard deviation. The two best performing disturbance, microhabitat, periphyton and macroinvertebrate variables were selected for causal analysis. Causal analysis was performed using the R package 'piecewiseSEM' (www.r-project.org, Lefcheck 2016). The global model was composed of multiple mixed effect models, all of which included a year and site random effect. The final model was obtained by removing all non-significant causal paths. We also tested the significance of dependencies between covariates (function *dSep*), and included significant dependencies in the final model. We tested the relationship between β-deviation and the trait–environment relationship (i.e. invertebrate β-diversity ~ environmental β-diversity corelation statistic) using the same mixed model structure as indicated above. The β-deviation ~ periphyton trait–environment relationship was tested in model *i* (n=56), while the β-deviation ~ hydraulic and substrate trait–environment relationships were tested in model 2 (n=80). Lastly, to detect site-specific effects, we visualised and tested the relationship between the trait–environment relationships and β-deviation (Pearson's r correlation and associated p-value) by site and type.

## Results

### Spatio-temporal variation in invertebrate and periphyton communities

Our sampling approach detected 141 and 266 macroinvertebrate and periphyton taxa, respectively (Supporting information). The Chironomidae sub-family Orthocladiinae (Diptera) was the most abundant taxa in all three sites, followed by *Acentrella* (Ephemeroptera) and *Leutra* (Plecoptera) at the Asse site and Simuliidae at the Durance sites (Supporting information). Taxonomic richness for the main macroinvertebrate groups was largely comparable between Durance and Asse sites, both in terms of the total and mean richness per sampling date (Table 2). Only slight differences were observed, such as higher Plecoptera richness but lower Ephemeroptera richness at Asse compared to the Durance sites. This was contrasted by invertebrate abundance, with markedly higher Diptera, Oligochaeta and Ephemeroptera abundance observed in the Durance compared to Asse (Table 2, Supporting information). This was most marked for Oligochaeta and Diptera groups, with mean abundances ranging from 283 to 427 and 1953 to 2184 inv/0.90 m²
<table><caption>Table 2. Taxonomic richness and mean abundance of the most abundant invertebrate (above) and periphyton (below) groups. Taxonomic richness is expressed as the total number of taxa found at each site over the entirety of sampling campaigns and the mean ± standard deviation per sampling campaign. Mean (±SD) abundance was calculated using the sum of abundances for each sampling date and site (i.e. nine invertebrate samples 0.10 m²=inv/0.90 m² and nine periphyton samples cells/cm=cells/9 cm). Only information for the eight most abundant taxa is shown.</caption><thead><tr><th rowspan="2"></th><th colspan="3">Taxonomic richness (mean ±SD)</th><th colspan="3">Mean abundance ±SD</th></tr><tr><th>Asse</th><th>Dur-1</th><th>Dur-2</th><th>Asse</th><th>Dur-1</th><th>Dur-2</th></tr></thead><tbody><tr><td>Diptera</td><td>22 (9 ± 3)</td><td>22 (9 ± 2)</td><td>22 (9 ± 3)</td><td>536 ± 594</td><td>1953 ± 2450</td><td>2184 ± 2264</td></tr><tr><td>Ephemeroptera</td><td>20 (10 ± 3)</td><td>23 (11 ± 3)</td><td>25 (12 ± 2)</td><td>694 ± 739</td><td>934 ± 1126</td><td>1325 ± 1166</td></tr><tr><td>Oligochaeta</td><td>4 (1 ± 1)</td><td>5 (2 ± 1)</td><td>5 (2 ± 1)</td><td>2 ± 3</td><td>283 ± 539</td><td>427 ± 815</td></tr><tr><td>Trichoptera</td><td>11 (3 ± 1)</td><td>12 (4 ± 2)</td><td>15 (4 ± 1)</td><td>106 ± 192</td><td>185 ± 226</td><td>331 ± 438</td></tr><tr><td>Plecoptera</td><td>18 (5 ± 2)</td><td>13 (2 ± 2)</td><td>14 (4 ± 2)</td><td>261 ± 433</td><td>38 ± 52</td><td>213 ± 314</td></tr><tr><td>Amphipoda</td><td>2 (1 ± 1)</td><td>1 (1 ± 0)</td><td>3 (1 ± 0)</td><td>10 ± 17</td><td>9 ± 9</td><td>93 ± 138</td></tr><tr><td>Coleoptera</td><td>14 (3 ± 2)</td><td>15 (3 ± 2)</td><td>15 (5 ± 2)</td><td>6 ± 5</td><td>31 ± 44</td><td>59 ± 66</td></tr><tr><td>Hydrachnidia</td><td>1 (1 ± 0)</td><td>1 (1 ± 0)</td><td>1 (1 ± 0)</td><td>12 ± 13</td><td>46 ± 68</td><td>22 ± 28</td></tr><tr><td>Bacillariophyta</td><td>69 (21 ± 6)</td><td>147 (40 ± 12)</td><td>146 (42 ± 10)</td><td>2e<sup>+5</sup> ± 3e<sup>+5</sup></td><td>5e<sup>+6</sup> ± 7e<sup>+6</sup></td><td>5e<sup>+6</sup> ± 8e<sup>+6</sup></td></tr><tr><td>Gyrista</td><td>3 (2 ± 1)</td><td>4 (1 ± 1)</td><td>5 (2 ± 1)</td><td>5e<sup>+4</sup> ± 7e<sup>+4</sup></td><td>2e<sup>+5</sup> ± 4e<sup>+5</sup></td><td>6e<sup>+5</sup> ± 1e<sup>+6</sup></td></tr><tr><td>Cyanobacteria</td><td>13 (3 ± 2)</td><td>23 (5 ± 3)</td><td>26 (5 ± 3)</td><td>4e<sup>+4</sup> ± 1e<sup>+5</sup></td><td>4e<sup>+5</sup> ± 7e<sup>+5</sup></td><td>3e<sup>+5</sup> ± 3e<sup>+5</sup></td></tr><tr><td>Chlorophyta</td><td>5 (1 ± 1)</td><td>18 (2 ± 1)</td><td>16 (2 ± 2)</td><td>1e<sup>+3</sup> ± 3e<sup>+3</sup></td><td>8e<sup>+4</sup> ± 2e<sup>+5</sup></td><td>9e<sup>+4</sup> ± 1e<sup>+5</sup></td></tr><tr><td>Rhodophyta</td><td>2 (0 ± 1)</td><td>3 (1 ± 1)</td><td>2 (1 ± 1)</td><td>7e<sup>+2</sup> ± 2e<sup>+3</sup></td><td>3e<sup>+4</sup> ± 5e<sup>+4</sup></td><td>3e<sup>+4</sup> ± 7e<sup>+4</sup></td></tr><tr><td>Streptophyta</td><td>3 (1 ± 1)</td><td>6 (1 ± 1)</td><td>5 (1 ± 1)</td><td>1e<sup>+2</sup> ± 3e<sup>+2</sup></td><td>3e<sup>+3</sup> ± 5e<sup>+3</sup></td><td>4e<sup>+3</sup> ± 9e<sup>+3</sup></td></tr><tr><td>Cryptophyta</td><td>0 (0 ± 0)</td><td>2 (0 ± 1)</td><td>1 (0 ± 0)</td><td>0 ± 0</td><td>9e<sup>+1</sup> ± 9e<sup>+1</sup></td><td>4e<sup>+2</sup> ± 4e<sup>+2</sup></td></tr><tr><td>Euglenozoa</td><td>0 (0 ± 0)</td><td>1 (0 ± 0)</td><td>1 (0 ± 0)</td><td>0 ± 0</td><td>0 ± 0</td><td>9e<sup>+1</sup> ± 9e<sup>+1</sup></td></tr></tbody></table>

at Dur-1 and Dur-2, respectively, compared to 2 and 536 inv/0.90 m² at Asse. In terms of the periphyton community, Bacillariophyta was the most abundant (cell cm⁻²) phylum by a significant margin for all sites (Table 2, Supporting information). Within the Bacillariophyta phylum, species from the *Achnanthidium* and *Diatoma* genres were the most abundant (Supporting information). The Durance sites exhibited markedly higher taxonomic richness than Asse, with roughly two times the number of Bacillariophyta and Cyanobacteria taxa (146–147 and 23–26, respectively) than Asse (69 and 13, respectively). Chlorophyta was more than three times richer in the Durance sites (16–18) compared to Asse (5). In addition to marked differences in richness, the Durance sites exhibited higher mean cell density than Asse for all periphyton phylum (Table 2). Overall, cell density did not exceed 1.25 × 10⁶ at the Asse site while density peaked at 3 × 10⁷ and 4 × 10⁷ at Dur-1 and Dur-2, respectively (Supporting information).

Temporal variation in invertebrate and periphyton communities appeared to follow the same general trajectory (Fig. 2). Both communities varied mostly along the horizontal axis (~65% compared to ~25% for the vertical axis), and tended to increase in diversity, richness and density from February to July. The dominance of the most abundant invertebrate and periphyton taxa was highest early in the year and tended to decline towards July. Variance among samples was largely comparable between sites for the invertebrate community, but the Asse site exhibited notably lower periphyton community variation than the Durance sites. The periphyton in the Asse remained low in density, richness and diversity indices at all times, while Durance sites exhibited more dense and rich communities overall with higher variance. Invertebrate functional diversity indices were also best described by the horizontal axis (51.8% compared to 28.8%)

which was characterised by functional richness and evenness. As for taxonomic indices, functional richness tended to increase from February to July. However, contrary to invertebrate taxonomic indices, invertebrate functional richness appeared to be comparable or greater at the Asse site than at the Durance sites (Fig. 2).

## Temporal evolution of β-deviation

Functional and taxonomic β-deviation were highly correlated (R²=0.92, p < 0.001), we therefore decided to present functional β-deviation results in the main manuscript, while taxonomic β-deviation results are available in the Supporting information.

Invertebrate β-diversities rarely fell within null expectations (i.e. p < 0.05) and exhibited marked temporal variation, both within and between years (Fig. 3). Significant β-deviation was always positive, indicating overdispersion in invertebrate dissimilarities. β-deviation generally tended to increase from February to July in 2014, 2015 and 2017. But in 2016 and 2018, β-deviation exhibited no clear seasonal pattern. It should be noted that β-deviation was generally higher in the Durance sites compared to the Asse site, though the magnitude of the difference varied greatly between and within years.

## Causal analysis: ecological conditions, β-deviation and the trait–environment relationship

To characterise the relationship between ecological drivers of β-deviation and the trait–environment relationship we fitted two causal models. The resulting causal models were statistically significant (model 1: p=0.843, Fisher’s C=12.07, model 2: p=0.648, Fisher’s C=11.48) and explained the vast
<figure><img src="image_6.png" /><figcaption>Figure 2. Principal components analysis (PCA) of (taxonomic and functional) invertebrate and periphyton community variation. Points represent individual samples. The day of the year that a sample was collected is indicated by the darkness of the point (darker = later in the year).</figcaption></figure>

majority of variation in functional β-deviation (R²m,c=0.86 – 0.89) and to a lesser extent, the hydraulic trait–environment relationship (R²m = 0.18; R²c = 0.27). Both models (1 and 2) were characterised by a strong positive link between invertebrate community size and β-deviation (Fig. 4). Maximum river discharge and variability over the previous 90 days were jointly associated with lower β-deviation, due to both a negative direct effect and an indirect negative effect via invertebrate density, respectively. In contrast, both periphyton diversity and underlayer heterogeneity exhibited direct positive associations with β-deviation. The main difference between model 1 and 2 was the proportion of invertebrate density variance explained, with a positive relationship between periphyton cell density greatly improving model fit (R²m = 0.47 compared to R²m = 0.32). Taxonomic β-deviation causal models were comparable to their functional equivalents, but were simplified: not including significant paths for periphyton or microhabitat diversity (Supporting information).

Lastly, only the hydraulic trait–environment relationship was significantly associated with β-deviation, however, site-by-site comparisons revealed a clear site effect (Fig. 5). The positive relationship between β-deviation and the hydraulic gradient was more spatially and temporally consistent than both the periphyton and substrate gradients, ranging from r=0.29 to 0.63 (compared to r=-0.17 to 0.52 and r=-0.10 to 0.38, respectively). However, the β-deviation ~ hydraulic gradient relationship was only significant at Asse (p=0.001) and marginally non-significant at Dur-2 (p=0.088) Similarly, the periphyton trait–environment relationship was only significant at Asse (p=0.038). We found no significant correlations between β-deviation and trait–environment relationships at Dur-1. The substrate trait–environment relationship tended to increase with β-deviation at Asse and Dur-2 sites, though this trend was only significant at the Dur-2 site (p=0.045). Lastly, it should be noted that the strength of each of the trait–environment relationships
<figure><img src="image_7.png" /><figcaption>Figure 3. Temporal evolution of raw functional macroinvertebrate β-deviation. β-deviation was calculated as the difference between observed and mean simulated functional β-diversity values, standardised by the standard deviation of the simulated values (i.e. β-deviation = β-diversityobs - mean β-diversitysim/SD β-diversitysim).</figcaption></figure>

was highly variable at all sites over the study period ranging
from roughly r = -0.50 to 0.75 in most cases (Fig. 5).

Discussion

Stochasticity is increasingly supported as a key source of com-
munity variation according to both theoretical (Orrock and
Fletcher Jr 2005, Orrock and Watling 2010, Shoemaker et al.
2019) and empirical evidence (Tolonen et al. 2018,
Siqueira et al. 2020, Ge et al. 2021). Null models represent
a powerful tool to test for deviations (i.e. β-deviation) from
stochastic expectations, but have been criticised for poorly
explaining the underlying drivers of β-deviation (Gotelli and
Ulrich 2012, Vellend et al. 2014). In this study, we demon-
strated that β-deviation can vary greatly over short-temporal
scales from months to years due to variation in community
size, disturbance history, the periphyton community and to
a lesser extent, microhabitat diversity. Invertebrate commu-
nities that deviated from null expectations were consistently
over-dispersed, indicating that heterogeneous selection largely
drove the observed community structure (Soininen and
Graco-Roza 2024). This was consistent for both functional
and taxonomic metrics of β-deviation, which were highly cor-
related, suggesting redundancy in the traits selected for this
study. As significant β-deviation is often taken as evidence of
deterministic community variation (Chase 2010, Chase et al.
2011), we expected to find a positive relationship between
β-deviation and the trait-environment relationship (another
indicator of deterministic community variation). However,

this hypothesis was only partially validated, most notably for
the hydraulic dimension of the trait–environment relation-
ship. We observed marked variation in the strength and sig-
nificance of the β-deviation ~ trait–environment relationship
both among sites and through time. On one hand, this indi-
cates that spatial heterogeneity in hydraulic conditions was
the primary mechanism that structured the benthic inverte-
brate communities in the present study. On the other hand,
it highlights the difficulty of directly relating β-deviation to
deterministic variation. Overall, this study demonstrates that
β-deviation and its relationship with deterministic patterns
can vary greatly across not only spatial, but also temporal
scales, owing to a combination of ecological drivers.

Community size and disturbance history drive
stochastic processes

Theoretical (Orrock and Fletcher Jr 2005, Orrock and Watling 2010) and recent empirical studies (Siqueira et al. 2020) have demonstrated that stochasticity tends to override deterministic processes in small communities, as chance demographic events (i.e. ecological drift) have a greater chance of significantly modifying community structure. Siqueira et al. 2020 demonstrated this principle in benthic invertebrates across broad biogeographic scales using a taxonomic approach to estimate β-deviation. In the present study, our functional estimate of β-deviation further supported the importance of community size and thus ecological drift as the main mediating force between deterministic and stochastic processes in benthic macroinvertebrates (Fig. 4). This was evident across the limited spatial scale of this study, wherein
<figure><img src="image_8.png" /><figcaption>Figure 4. Causal analysis assessing the relationship between ecological conditions, functional invertebrate β-deviation and the trait–environment relationship (trait ~ env.). Two models were fitted, model 1 including periphyton data (n=56) and 2 excluding periphyton data (n=80). Both models were fitted according to the a priori structure indicated in the Supporting information. The trait–environment relationship was estimated as the correlation (Pearson's r) between macroinvertebrate functional β-diversity and environmental β-diversity for periphyton, hydraulic and substrate conditions, separately. The global model was composed of multiple linear mixed models which included site and year random effects. The width of lines indicates the value of standardised estimated coefficients, with black lines indicating positive coefficients and red lines indicating negative coefficients. Only significant (p > 0.05) effects are shown. The marginal R² (i.e. fixed effects only) and conditional R² (i.e. fixed and random effects) are indicated for response variables (i.e. variables with at least one significant causal path) in bold and in brackets, respectively. Fisher's C and associated p value indicate overall model fit (p > 0.05 indicates good model fit).</figcaption></figure>

highly abundant Durance communities tended to exhibit
higher β-deviation than their Asse counterpart (Fig. 3).
However, temporal variation associated with seasonal com-
munity growth appeared to be equally important. As detailed
above, the positive relationship between seasonal community
growth and β-deviation may arise due to a decline in the
importance of ecological drift effects (Orrock and Watling
2010, Siqueira et al. 2020). Alternatively, Tolonen et al. 2018
suggested that seasonal periods of high abundance could lead
to mass effects wherein individuals may temporarily inhabit
sub-optimal habitats (Leibold et al. 2004), thus temporar-
ily enhancing stochasticity. We found no evidence for such
mass effects in our study system, rather we found that sea-
sonal community growth was associated with lower taxo-
nomic dominance and greater overall community richness
(functional and taxonomic; Fig. 2). In addition to modulat-
ing the strength of ecological drift, the positive relationship
between community size and β-deviation may therefore arise
due to greater functional complementarity as the season pro-
gresses. Indeed, as community density increases, competi-
tion among residents and colonisers is expected to select the

most adapted competitors resulting higher functional com-
plementarity (competition–colonization tradeoffs; Tilman
1994). This hypothesis is supported by the positive relation-
ship observed between functional richness and β-deviation.
We therefore expect that the positive relationship between
community density and β-deviation may fluctuate between
a ecological drift modulated relationship at low density early
in late Winter, and shift towards a competition–colonization
tradeoff relationship towards Summer.

Hydrological disturbance constituted an omnipresent
force in both the Durance and Asse rivers, both directly and
indirectly reducing β-deviation via its impact on invertebrate
community size (i.e. ecological drift). Indeed, flooding is a
well-known determinant of community variation in river sys-
tems (Lake 2000, Death 2008), but our understanding of its
effect on stochastic processes may be incomplete due to the
past focus on discrete disturbance events (Giller et al. 1991,
Ledger et al. 2006) and spatial gradients of disturbance regimes
(Lepori and Malmqvist 2009, but see: Huttunen et al. 2017).
Thanks to our extensive temporal sampling over a five-year
period, we concluded that river discharge within a period of
<figure><img src="image_9.png" /><figcaption>Figure 5. The importance of hydraulic, periphyton and substrate niche selection in invertebrate communities according to functional β-deviation (log+1 and rank transformed). The importance of niche selection was estimated as the correlation (Pearson's r) between macro-invertebrate community functional β-diversities and environmental (substrate, periphyton and hydraulic) β-diversities. Points represent individual sampling dates at each site. Pearson's r statistic and associated p values indicate the strength and significance of each correlation.</figcaption></figure>

90 days was the most pertinent temporal window for explain-
ing stochastic processes. Ninety days likely relates to the period
of recolonization post-disturbance, wherein chance dispersal
may lead to diverse community outcomes irrespective of local
environmental conditions. Indeed, when a wide range of taxa
can colonise and persist in a certain habitat, as is the case for
macroinvertebrates, recolonization is expected to be domi-
nated by stochasticity (Chase 2007, Chase and Myers 2011,
Vellend et al. 2014). We expect that high variability in dis-
persal ability among benthic invertebrates (Heino et al. 2015,
Tonkin et al. 2018) further promoted stochasticity, leading
to diverse community outcomes following flooding events
or periods of highly variable river discharge. In addition to
the indirect effect of hydraulic disturbance via invertebrate
community size, according to our causal analysis, disturbance
intensity also directly promoted stochasticity (i.e. reduced
β-deviation). This was contrary to our initial hypothesis, as
we expected variation in river discharge to reflect a gradient
of environmental stress for benthic invertebrates leading to
deterministically structured communities. Instead, the added
stochasticity may arise directly following intense floods due
to stochastic colonisation as detailed above, or during the
flood event itself. For example, the tendency of invertebrates

to drift or seek refuge during increased flow events (Death
2008) may increase the rate of dispersal to novel sites, thus
promoting stochasticity in the short-term. The unpredict-
able response of invertebrates to flooding (Thomson 2002),
depending on the availability of hydraulic refugia and river
morphology (Lake 2000), may also contribute to the direct
effect of flood magnitude on β-deviation. This hypothesis is
in line with recent empirical evidence that invertebrate com-
munity structure is largely driven by stochastic colonisation
and dispersal limitation following heavy flood or precipita-
tion events (Melo and Froehlich 2022, Saito et al. 2021).

Temporal variation in the importance of stochastic
and deterministic processes

Studies of community ecology have traditionally been focused
on spatial dynamics, a principle which is especially true for
aquatic systems (Townsend et al. 2003, Heino et al. 2007,
2015, Heino and Tolonen 2017, Perez Rocha et al. 2018,
Daniel et al. 2019, Ge et al. 2021, but see: Huttunen et al.
2017, Aguilar and Sommaruga 2020). This study demon-
strates that the importance of stochastic and determinis-
tic processes can vary greatly over short-temporal windows
due to a combination of interacting ecological factors. It
remains uncertain as to whether this temporal variability
of β-deviation and the trait–environment relationship may
be affected by the small spatial extent (50–500 m) consid-
ered in this study (Heino et al. 2015). However, even after
accounting for this uncertainty, the results of this study call
into question the temporal stability of ecological patterns
demonstrated in studies based on a few or a single temporal
datapoints. We therefore add our voices to recent calls for
greater incorporation of the temporal dimension of com-
munity variation (Heino et al. 2015, Huttunen et al. 2017,
Jabot et al. 2020, Guzman et al. 2022), especially in the case
of studies based on null models.

Regulated versus natural rivers

River regulation tends to reduce river flow variability, result-
ing in low stress conditions and the proliferation of abundant
but less taxonomically diverse macroinvertebrate assemblages
compared to natural counterparts (Wang et al. 2020). This
would be expected to lead to a corresponding decline in
the importance of stochastic processes related to ecological
drift (Orrock and Fletcher Jr 2005, Siqueira et al. 2020).
Accordingly, we found that regulated Durance sites gener-
ally exhibited higher β-deviation relative to their unregulated
Asse counterpart, indicating that deterministic processes were
comparatively more important in Durance sites. However,
interestingly, we found that higher β-deviation in regulated
sites did not translate to stronger trait–environment relation-
ships. We expect that higher β-deviation in the Durance may
relate to stronger priority effects, that may be interpreted
as ‘non-random’ by the null model used. Indeed, we would
expect that lower stress conditions both in terms of milder
river discharge disturbance and greater periphyton develop-
ment (Table 2) would promote more stochastic communities
due to priority effects and the potential for multiple stable
equilibria (Chase 2010, Shi et al. 2021, Timoner et al. 2022).
Alternatively, the fact that higher β-deviation in the Durance
did not translate to a stronger trait–environment relation-
ship may be due to the position of our sites within the river
network. Mainstem rivers like the Durance receive more dis-
persal than headwater streams like the Asse river, leading to
a stronger relative effect of dispersion factors compared to
local conditions (Swan and Brown 2017, Tonkin et al. 2018).
The numerical dominance of ubiquitous Orthocladiinae chi-
ronomids may additionally limit the capacity of the regulated
Durance sites to form functional gradients. As uneven species
abundance distributions can lead to significant β-deviation
values (Tucker et al. 2016), high taxonomic dominance in
the Durance sites (Fig. 2) may limit the ability of null models
to detect deterministic community structure. It is also impor-
tant to note some of the several caveats of the trait–environ-
ment relationship which may have led to its weak association
with β-deviation. For example, it assumes that the traits and
environmental conditions accurately capture variation in
fitness. Redundancy among functional traits may therefore
have weakened the relationship between the trait–environ-
ment and β-deviation in the present study.

**Conclusion and future perspectives**

Our study provides a concrete example of how stochastic
community variation can be modelled to better interpret
deterministic patterns of community structure. Our results
suggest that poorly accounting for temporal variation in sto-
chastic processes may lead to inaccurate conclusions about
the forces that drive community assembly. As null model
approaches are becoming increasingly widespread (Liu et al.
2018, Ge et al. 2021, Timoner et al. 2022), our results high-
light the importance of accounting for temporal variation in
β-deviation. Future applications of null model tests should
also aim to disassociate random processes (e.g. priority effects
and uneven species abundance distributions) from non-
random community variation, as this represents a significant
limitation to the most commonly used null model based on
random community reshuffling. We identified community
size effects likely associated with ecological drift, competitor-
colonisation tradeoffs and post-disturbance recolonisation,
as the principal temporal driver of β-deviation in benthic
invertebrates. Siqueira et al. 2020 suggested that ecological
drift could result in fragilized communities dominated by
stochastic processes as anthropic impacts continue to alter
natural communities. Indeed, our results support this notion
but indicate that temporal variation in community size and
disturbance history may offset some of the stress related to
ecological drift. This study largely highlighted marked tem-
poral phenomena across relatively limited spatial scales. As
the importance of dispersal factors across broad spatial gra-
dients (e.g. metacommunity structure and connectivity) are
increasingly accepted as important drivers of community
variation (Heino et al. 2015, Tonkin et al. 2018, Green et al.
2022), it will be important for future studies to investigate
how broad spatial and temporal dimensions interact to deter-
mine stochastic and deterministic patterns. Such an integra-
tive approach will likely improve our ability to predict how
community dynamics will respond to future global change
and thus contribute to conservation management.

***Acknowledgements*** – We warmly thank the staff from INRAE Aix-en-Provence and EDF, in particular for their help with the field and laboratory work and their technical support: B. Dumont, A. Pujol, A. Morel, A. Marchandise, L. Voisin and V. Diouloufet. We thank Bi-Eau and in particular Maria Leitao and Anne Marie Lançon for their laboratory work. This work was supported by a grant from EDF and the RMC Water Agency.

*Funding* – This work was supported by a grant from EDF and the RMC Water Agency.

Author contributions

**Kurt Villsen:** Formal analysis (lead); Investigation (lead); Validation (lead); Visualization (lead); Writing - original draft (lead); Writing - review & editing (lead). **Leah Beche:** Data curation (equal); Funding acquisition (equal); Methodology (supporting); Project administration (supporting); Supervision (supporting); Writing - review & editing (supporting). **Gait Archambaud-Suard:** Conceptualization
(lead); Data curation (lead); Funding acquisition (equal); Investigation (supporting); Methodology (lead); Project administration (equal); Resources (equal); Supervision (equal); Validation (equal); Writing - original draft (supporting); Writing - review & editing (supporting). **Martin Daufresne:** Formal analysis (equal); Investigation (equal); Methodology (equal); Project administration (equal); Supervision (equal); Validation (lead); Writing - original draft (supporting); Writing - review & editing (supporting).

## Data availability statement

Data are available from the Dryad Digital Repository: https://doi.org/10.5061/dryad.brv15dvkb (Villsen et al. 2024).

## Supporting information

The Supporting information associated with this article is available with the online version.

## References

Aguilar, P. and Sommaruga, R. 2020. The balance between deterministic and stochastic processes in structuring lake bacterioplankton community over time. – Mol. Ecol. 29: 3117–3130.

Alberdi, A. and Gilbert, M. T. P. 2019. Hildiv: an R package for the integral analysis of diversity based on Hill numbers. – bioRxiv: 545665. https://doi.org/10.1101/545665

Alonso, D., Osstling, A. and Etienne, R. S. 2008. The implicit assumption of symmetry and the species abundance distribution. – Ecol. Lett. 11: 93–105.

Archambaud, G., Giordano, L. and Dumont, B. 2005. Description du substrat minéral et du colmatage. Note technique. – Cemagref Aix-En-Provence, UR Hydrobiologie.

Battle, J. M., Jackson, J. K. and Sweeney, B. W. 2007. Annual and spatial variation for macroinvertebrates in the Upper Mississippi River near Cape Girardeau, Missouri. – Fundam. Appl. Limnol./Archiv Fuer Hydrobiologie 168: 39–54.

Beauger, A., Lair, N., Reyes-Marchant, P. and Peiry, J.-L. 2006. The distribution of macroinvertebrate assemblages in a reach of the River Allier (France), in relation to riverbed characteristics. – Hydrobiologia 571: 63–76.

Bernard-Verdier, M., Navas, M. L., Vellend, M., Violle, C., Fayolle, A. and Garnier, E. 2012. Community assembly along a soil depth gradient: contrasting patterns of plant trait convergence and divergence in a Mediterranean rangeland. – J. Ecol. 100: 1422–1433.

Cazaubon, A. and Giudicelli, J. 1999. Impact of the residual flow on the physical characteristics and benthic community (algae, invertebrates) of a regulated Mediterranean river: the Durance, France. – Regul. Rivers: Res. Manage. 15: 441–461.

Chao, A., Chiu, C. H., Villéger, S., Sun, I. F., Thorn, S., Lin, Y. C., Chiang, J. M. and Sherwin, W. B. 2019. An attribute-diversity approach to functional diversity, functional beta diversity, and related (dis)similarity measures. – Ecol. Monogr. 89: e01343.

Chase, J. M. 2007. Drought mediates the importance of stochastic community assembly. – Proc. Natl Acad. Sci. USA 104: 17430–17434.

Chase, J. M. 2010. Stochastic community assembly causes higher biodiversity in more productive environments. – Science 328: 1388–1391.

Chase, J. M. and Leibold, M. A. 2009. Ecological niches: linking classical and contemporary approaches. – Univ. of Chicago Press.

Chase, J. M. and Myers, J. A. 2011. Disentangling the importance of ecological niches from stochastic processes across scales. – Philos. Trans. R. Soc. B 366: 2351–2363.

Chase, J. M., Kraft, N. J. B., Smith, K. G., Vellend, M. and Inouye, B. D. 2011. Using null models to disentangle variation in community dissimilarity from variation in α-diversity. – Ecosphere 2: 1–11.

Clifford, H. 1982. Life cycles of mayflies (Ephemeroptera), with special reference to voltinism. – Quaest. Entomol. 18: 15–90.

Corbet, P. S., Suhling, F. and Soendgerath, D. 2006. Voltinism of Odonata: a review. – Int. J. Odonatol. 9: 1–44.

Cottenie, K. 2005. Integrating environmental and spatial processes in ecological community dynamics. – Ecol. Lett. 8: 1175–1182.

Daniel, J., Gleason, J. E., Cottenie, K. and Rooney, R. C. 2019. Stochastic and deterministic processes drive wetland community assembly across a gradient of environmental filtering. – Oikos 128: 1158–1169.

Death, R. G. 2008. The effect of floods on aquatic invertebrate communities. – In: Aquatic insects: challenges to populations. Cabi Publishing, pp. 103–121.

Dini-Andreote, F., Stegen, J. C., Van Elsas, J. D. and Salles, J. F. 2015. Disentangling mechanisms that mediate the balance between stochastic and deterministic processes in microbial succession. – Proc. Natl Acad. Sci. USA 112: E1326–E1332.

Downes, B. J., Lake, P. S., Schreiber, E. S. G. and Glaister, A. 2000. Habitat structure, resources and diversity: the separate effects of surface roughness and macroalgae on stream invertebrates. – Oecologia 123: 569–581.

Dray, S. and Dufour, A. B. 2007. The ade4 package: implementing the duality diagram for ecologists. – J. Stat. Softw. 22: 1–20.

Eagle, L. J. B., Milner, A. M., Klaar, M. J., Carrivick, J. L., Wilkes, M. and Brown, L. E. 2021. Extreme flood disturbance effects on multiple dimensions of river invertebrate community stability. – J. Anim. Ecol. 90: 2135–2146.

Fenoglio, S., Tierno de Figueroa, J. M., Doretto, A., Falasco, E. and Bona, F. 2020. Aquatic insects and benthic diatoms: a history of biotic relationships in freshwater ecosystems. – Water 12: 2934.

García-Navas, V., Sattler, T., Schmid, H. and Ozgul, A. 2021. Spatial heterogeneity in temporal dynamics of Alpine bird communities along an elevational gradient. – J. Biogeogr. 48: 886–902.

Ge, Y., Meng, X., Heino, J., García-Girón, J., Liu, Y., Li, Z. and Xie, Z. 2021. Stochasticity overrides deterministic processes in structuring macroinvertebrate communities in a plateau aquatic system. – Ecosphere 12: e03675.

Gilbert, B. and Levine, J. M. 2017. Ecological drift and the distribution of species diversity. – Proc. R. Soc. B 284: 20170507.

Giller, P. S., Sangpradub, N. and Twomey, H. 1991. Catastrophic flooding and macroinvertebrate community structure. – Int. Ver. Theor. Angew. Limnol. Verh. 24: 1724–1729.

Gotelli, N. J. and Graves, G. R. 1996. Null models in ecology. – Smithsonian Institution Press.

Gotelli, N. J. and Ulrich, W. 2012. Statistical challenges in null model analysis. – Oikos 121: 171–180.

Gravel, D., Canham, C. D., Beaudet, M. and Messier, C. 2006. Reconciling niche and neutrality: the continuum hypothesis. – Ecol. Lett. 9: 399–409.
Grenié, M. and Gruson, H. 2023. fundiversity: a modular R package to compute functional diversity indices. – *Ecography* 2023: e06585.

Guzman, L. M., Thompson, P. L., Viana, D. S., Vanschoenwinkel, B., Horváth, Z., Ptacnik, R., Jeliazkov, A., Gascón, S., Lemmens, P., Anton-Pardo, M., Langenheder, S., De Meester, L. and Chase, J. M. 2022. Accounting for temporal change in multiple biodiversity patterns improves the inference of metacommunity processes. – *Ecology* 103: e3683.

Hart, S. P., Usinowicz, J. and Levine, J. M. 2017. The spatial scales of species coexistence. – *Nat. Ecol. Evol.* 1: 1066–1073.

Harvey, P. H., Colwell, R. K., Silvertown, J. W. and May, R. M. 1983. Null models in ecology. – *Annu. Rev. Ecol. Syst.* 14: 189–211.

Heino, J. and Tolonen, K. T. 2017. Ecological drivers of multiple facets of beta diversity in a lentic macroinvertebrate metacommunity. – *Limnol. Oceanogr.* 62: 2431–2444.

Heino, J., Melo, A. S., Siqueira, T., Soininen, J., Valanko, S. and Bini, L. M. 2015. Metacommunity organisation, spatial extent and dispersal in aquatic systems: patterns, processes and prospects. – *Freshwater Biol.* 60: 845–869.

Heino, J., Mykrä, H., Kotanen, J. and Muotka, T. 2007. Ecological filters and variability in stream macroinvertebrate communities: do taxonomic and functional structure follow the same path? – *Ecography* 30: 217–230.

Huttunen, K. L., Mykrä, H., Oksanen, J., Astorga, A., Paavola, R. and Muotka, T. 2017. Habitat connectivity and in-stream vegetation control temporal variability of benthic invertebrate communities. – *Sci. Rep.* 7: 1448.

Jabot, F., Laroche, F., Massol, F., Arthaud, F., Crabot, J., Dubart, M., Blanchet, S., Munoz, F., David, P. and Datry, T. 2020. Assessing metacommunity processes through signatures in spatiotemporal turnover of community composition. – *Ecol. Lett.* 23: 1330–1339.

Jackson, J. K. and Füreder, L. 2006. Long-term studies of freshwater macroinvertebrates: a review of the frequency, duration and ecological significance. – *Freshwater Biol.* 51: 591–603.

Jones, J. I., Murphy, J. F., Collins, A. L., Sear, D. A., Naden, P. S. and Armitage, P. D. 2012. The impact of fine sediment on macro-invertebrates. – *River Res. Appl.* 28: 1055–1071.

Kaller, M. D. and Hartman, K. J. 2004. Evidence of a threshold level of fine sediment accumulation for altering benthic macroinvertebrate communities. – *Hydrobiologia* 518: 95–104.

Kraft, N. J. B., Comita, L. S., Chase, J. M., Sanders, N. J., Swenson, N. G., Crist, T. O., Stegen, J. C., Vellend, M., Boyle, B., Anderson, M. J., Cornell, H. V., Davies, K. F., Freestone, A. L., Inouye, B. D., Harrison, S. P. and Myers, J. A. 2011. Disentangling the drivers of β diversity along latitudinal and elevational gradients. – *Science* 333: 1755–1758.

Krishnadas, M. and Osuri, A. M. 2021. Environment shapes the spatial organization of tree diversity in fragmented forests across a human-modified landscape. – *Ecol. Appl.* 31: e02244.

Lake, P. S. 2000. Disturbance, patchiness, and diversity in streams. – *J. N. Am. Benthol. Soc.* 19: 573–592.

Lamberti, G. A. and Resh, V. H. 1983. Stream periphyton and insect herbivores: an experimental study of grazing by a caddisfly population. – *Ecology* 64: 1124–1135.

Ledger, M. E., Harris, R. M. L., Milner, A. M. and Armitage, P. D. 2006. Disturbance, biological legacies and community development in stream mesocosms. – *Oecologia* 148: 682–691.

Leibold, M. A., Holyoak, M., Mouquet, N., Amarasekare, P., Chase, J. M., Hoopes, M. F., Holt, R. D., Shurin, J. B., Law,

R., Tilman, D., Loreau, M. and Gonzalez, A. 2004. The metacommunity concept: a framework for multi-scale community ecology. – *Ecol. Lett.* 7: 601–613.

Lepori, F. and Malmqvist, B. 2009. Deterministic control on community assembly peaks at intermediate levels of disturbance. – *Oikos* 118: 471–479.

Liaw, A. and Wiener, M. 2002. Classification and regression by randomForest. – *R News* 2: 18–22.

Liu, J., Vellend, M., Wang, Z. and Yu, M. 2018. High beta diversity among small islands is due to environmental heterogeneity rather than ecological drift. – *J. Biogeogr.* 45: 2252–2261.

Loire, R., Piégay, H., Malavoi, J.-R., Beche, L., Dumoutier, Q., Mosseri, J. and Kerjean, C. 2019. Unclogging improvement based on interdate and interreach comparison of water release monitoring (Durance, France). – *River Res. Appl.* 35: 1107–1118.

Magneville, C., Loiseau, N., Albouy, C., Casajus, N., Claverie, T., Escalas, A., Leprieur, F., Maire, E., Mouillot, D. and Villéger, S. 2022. mFD: an R package to compute and illustrate the multiple facets of functional diversity. – *Ecography* 2022: e05904.

Malavoi, J.-R. and Souchon, Y. 1989. Méthodologie de description, quantification des variables morphodynamiques d'un cours d'eau à fond caillouteux: exemple d'une station sur la Fillière (Haute-Savoie)/A methodology for the description and the quantification of the morphodynamic variables along a gravel bed river: a reach of the Fillière river (Haute-Savoie) as an example. – *Géocarrefour* 64: 252–259.

Martínez-Villa, J. A., González-Caro, S. and Duque, Á. 2020. The importance of grain and cut-off size in shaping tree beta diversity along an elevational gradient in the northwest of Colombia. – *For. Ecosyst.* 7: 2.

Melbourne, B. A. and Hastings, A. 2008. Extinction risk depends strongly on factors contributing to stochasticity. – *Nature* 454: 100–103.

Melo, A. S. and Froehlich, C. G. 2022. An attractor domain model of seasonal and inter-annual β diversity of stream macroinvertebrate communities. – *Freshwater Biol.* 67: 1370–1379.

Minshall, G. W., Petersen, R. C., Bott, T. L., Cushing, C. E., Cummins, K. W., Vannote, R. L. and Sedell, J. R. 1992. Stream ecosystem dynamics of the Salmon River, Idaho: an 8th-order system. – *J. N. Am. Benthol. Soc.* 11: 111–137.

Monk, W. A., Wood, P. J., Hannah, D. M. and Wilson, D. A. 2008. Macroinvertebrate community response to inter-annual and regional river flow regime dynamics. – *River Res. Appl.* 24: 988–1001.

Myers, J. A., Chase, J. M., Jiménez, I., Jørgensen, P. M., Araujo-Murakami, A., Paniagua-Zambrana, N. and Seidel, R. 2013. Beta-diversity in temperate and tropical forests reflects dissimilar mechanisms of community assembly. – *Ecol. Lett.* 16: 151–157.

Oksanen, J., Kindt, R., Legendre, P., O'Hara, B., Simpson, G. L., Solymos, P. M., Stevens, M. H. H. and Wagner, H. 2008. The vegan package. – *Community Ecol. Package* 10: 631–637.

Olivier, J.-M., Carrel, G., Lamouroux, N., Dole-Olivier, M.-J., Malard, F., Bravard, J.-P., Piégay, H., Castella, E. and Barthélemy, C. 2022. Chapter 7. The Rhône river basin. – In: Tockner, K., Zarfl, C. and Robinson, C. T., (eds), *Rivers of Europe*, 2nd edn. Elsevier, pp. 391–451.

Orrock, J. L. and Fletcher Jr, R. J. 2005. Changes in community size affect the outcome of competition. – *Am. Nat.* 166: 107–111.
Orrock, J. L. and Watling, J. I. 2010. Local community size mediates ecological drift and competition in metacommunities. – Proc. R. Soc. B 277: 2185–2191.

Pander, J., Knott, J., Mueller, M. and Geist, J. 2019. Effects of environmental flows in a restored floodplain system on the community composition of fish, macroinvertebrates and macrophytes. – Ecol. Eng. 132: 75–86.

Patefield, W. M. 1981. Algorithm AS 159: an efficient method of generating random RxC tables with given row and column totals. – J. R. Stat. Soc. C 30: 91–97.

Perez Rocha, M., Bini, L. M., Domisch, S., Tolonen, K. T., Jyrkänkallio-Mikkola, J., Soininen, J., Hjort, J. and Heino, J. 2018. Local environment and space drive multiple facets of stream macroinvertebrate beta diversity. – J. Biogeogr. 45: 2744–2754.

Peters, L., Hillebrand, H. and Traunspurger, W. 2007. Spatial variation of grazer effects on epilithic meiofauna and algae. – J. N. Am. Benthol. Soc. 26: 78–91.

Poff, N. L. R., Allan, J. D., Bain, M. B., Karr, J. R., Prestegaard, K. L., Richter, B. D., Sparks, R. E. and Stromberg, J. C. 1997. The natural flow regime: a paradigm for river conservation and restoration. – BioScience 47: 769–784.

Qian, H., Chen, S., Mao, L. and Ouyang, Z. 2013. Drivers of β-diversity along latitudinal gradients revisited: latitudinal gradients of β-diversity. – Global Ecol. Biogeogr. 22: 659–670.

RStudio 2011. RStudio: Integrated development environment for R, (ver. 0.97.311). – J. Wildl. Manage. 75: 1753–1766.

Saito, V. S., Stoppa, N. E., Shimabukuro, E. M., Cañedo-Argüelles, M., Bonada, N. and Siqueira, T. 2021. Stochastic colonisation dynamics can be a major driver of temporal β diversity in Atlantic Forest coastal stream communities. – Freshwater Biol. 66: 1560–1570.

Schöl, A., Kirchesch, V., Bergfeld, T., Schöll, F., Borcherding, J. and Müller, D. 2002. Modelling the chlorophyll a content of the River Rhine – Interrelation between riverine algal production and population biomass of grazers, rotifers and the zebra mussel, *Dreissena polymorpha*. – Int. Rev. Hydrobiol. 87: 295–317.

Shi, W., Wang, Y. Q., Xiang, W. S., Li, X. K. and Cao, K. F. 2021. Environmental filtering and dispersal limitation jointly shaped the taxonomic and phylogenetic beta diversity of natural forests in southern China. – Ecol. Evol. 11: 8783–8794.

Shipley, B. 2010. Community assembly, natural selection and maximum entropy models. – Oikos 119: 604–609.

Shoemaker, L. G., Sullivan, L. L., Donohue, I., Cabral, J. S., Williams, R. J., Mayfield, M. M., Chase, J. M., Chu, C., Harpole, W. S. and Huth, A. 2019. Integrating the underlying structure of stochasticity into community ecology. – Ecology 101: e02922.

Siqueira, T., Saito, V. S., Bini, L. M., Melo, A. S., Petsch, D. K., Landeiro, V. L., Tolonen, K. T., Jyrkänkallio-Mikkola, J., Soininen, J. and Heino, J. 2020. Community size can affect the signals of ecological drift and niche selection on biodiversity. – Ecology 101: e03014.

Soininen, J. and Graco-Roza, C. 2024. Homogeneous selection and stochasticity overrule heterogeneous selection across biotic taxa and ecosystems. – Oikos 2024: e10517. https://doi.org/10.1111/oik.10517

Swan, C. M. and Brown, B. L. 2017. Metacommunity theory meets restoration: isolation may mediate how ecological communities respond to stream restoration. – Ecol. Appl. 27: 2209–2219.

Tachet, H., Richoux, P., Bournaud, M. and Usseglio-Polatera, P. 2010. Invertébrés d'eau douce: systématique, biologie, écologie, (Vol. 15). – CNRS éditions Paris.

Thomson, J. R. 2002. The effects of hydrological disturbance on the densities of macroinvertebrate predators and their prey in a coastal stream. – Freshwater Biol. 47: 1333–1351.

Tilman, D. 1994. Competition and biodiversity in spatially structured habitats. – Ecology 75: 2–16.

Timoner, P., Marle, P., Castella, E. and Lehmann, A. 2022. Assessment of the stream invertebrate β-diversity along an elevation gradient using a bidimensional null model analysis. – Ecol. Evol. 12: e9135.

Tolonen, K. E., Leinonen, K., Erkinaro, J. and Heino, J. 2018. Ecological uniqueness of macroinvertebrate communities in high-latitude streams is a consequence of deterministic environmental filtering processes. – Aquat. Ecol. 52: 17–33.

Tonkin, J. D., Altermatt, F., Finn, D. S., Heino, J., Olden, J. D., Pauls, S. U. and Lytle, D. A. 2018. The role of dispersal in river network metacommunities: patterns, processes and pathways. – Freshwater Biol. 63: 141–163.

Townsend, C. R. and Hildrew, A. G. 1994. Species traits in relation to a habitat templet for river systems. – Freshwater Biol. 31: 265–275.

Townsend, C. R., Dolédec, S., Norris, R., Peacock, K. and Arbuckle, C. 2003. The influence of scale and geography on relationships between stream community composition and landscape variables: description and prediction. – Freshwater Biol. 48: 768–785.

Tucker, C. M., Shoemaker, L. G., Davies, K. F., Nemergut, D. R. and Melbourne, B. A. 2016. Differentiating between niche and neutral assembly in metacommunities using null models of β-diversity. – Oikos 125: 778–789.

Vellend, M. 2016. The theory of ecological communities (MPB-57). –In: The theory of ecological communities. – Princeton Univ. Press.

Vellend, M., Srivastava, D. S., Anderson, K. M., Brown, C. D., Jankowski, J. E., Kleynhans, E. J., Kraft, N. J. B., Letaw, A. D., Macdonald, A. A. M., Maclean, J. E., Myers-Smith, I. H., Norris, A. R. and Xue, X. 2014. Assessing the relative importance of neutral stochasticity in ecological communities. – Oikos 123: 1420–1430.

Villéger, S., Mason, N. W. H. and Mouillot, D. 2008. New multidimensional functional diversity indices for a multifaceted framework in functional ecology. – Ecology 89: 2290–2301.

Villsen, K., Bêche, L., Archambaud-Suard, G. and Daufresne, M.. 2024. Data from: Community size and disturbance history jointly explain the interplay between stochastic and deterministic community variation in benthic invertebrates. – Dryad Digital Repository, https://doi.org/10.5061/dryad.brv15dvkb

Wang, J., Ding, C., Heino, J., Jiang, X., Tao, J., Ding, L., Su, W., Huang, M. and He, D. 2020. What explains the variation in dam impacts on riverine macroinvertebrates? A global quantitative synthesis. – Environ. Res. Lett. 15: 124028.

White, J. C., Hannah, D. M., House, A., Beatson, S. J. V., Martin, A. and Wood, P. J. 2017. Macroinvertebrate responses to flow and stream temperature variability across regulated and non-regulated rivers. – Ecohydrology 10: e1773.