Skip to main content
Journal of the Royal Society Interface logoLink to Journal of the Royal Society Interface
. 2024 Oct 9;21(219):20240450. doi: 10.1098/rsif.2024.0450

Spatial correlations in laboratory insect swarms

Andy M Reynolds 1,
PMCID: PMC11495674  PMID: 39378982

Abstract

In contrast with flocks of birds, schools of fish and herds of animals, swarms of the non-biting midge Chironomus riparius do not possess global order and under quiescent conditions velocities are only weakly correlated at long distances. Without such order it is challenging to characterize the collective behaviours of the swarms which until now have only been evident in their coordinated responses to disturbances. Here I show that the positions of the midges in laboratory swarms are maximally anticorrelated. This novel form of long-range ordering has until now gone unnoticed in the literature on collective animal movements. Here, its occurrence is attributed to midges being, in nearly equal measure, attracted towards the centre of the swarm and repelled by one another. It is shown that the midge swarms are poised at the cusp of a stable–unstable phase transition.

Keywords: collective motion, swarming, stochastic modelling


Laboratory swarms of the non-biting midge Chironomus riparius are among the intensively investigated examples of collective behaviour, behaviour that becomes apparent in their coordinated responses to disturbances [19]. When, for example, a single swarm is quasi-statically pulled apart into two daughter swarms, the swarm displays macroscopic mechanical properties similar to solids, including a finite Young’s modulus and yield strength, and does not flow like a viscous fluid [3]. In the presence of an oscillatory visual stimuli, swarms display viscoelastic responses characterized by a negative storage modulus [9]. Erratic environmental perturbations, on the other hand, induce correlations [10] of the kind evident in wild swarms that must contend with environmental disturbances [11]. Swarms of C. riparius midges can also be driven through ‘thermodynamic cycles’ by external perturbations, during which an equation of state holds throughout [8]. Nonetheless, laboratory swarms of C. riparius midges challenge more conventional notions of collective animal behaviours because they do not possess global order [1] and because velocities are only weakly correlated at long distances [2].

Here I show that the positions of C. riparius midges in laboratory swarms are maximally anticorrelated. This novel form of long-range ordering has until now gone unnoticed in the literature on collective animal movements. It is not related to short-range mutual repulsion and can arise in the absence of velocity correlations. Here, its occurrence is attributed to midges being, in nearly equal measure, attracted towards the centre of the swarm and repelled from one another by long-range forces. This is shown with the aid of stochastic models for simulating the trajectories of swarming insects. Finally, I identify several ways in which the anticorrelations are advantageous from a biological perspective.

Positional correlations (covariances) are given by σij2=xi(t)xj(t)¯xi(t)¯xj(t)¯ , where xit and xjt are the x-components of the positions of individuals ‘i’ and ‘j’ at time t, measured relative to the swarm’s current centre of mass and where the overbars denote time averages. To good approximation normalized correlations cx:=σij2ij/σii21/n , where n is the time average number of individuals in the swarm and where the angular brackets denote an average over all individuals in the swarm (figure 1a ). This is true for both horizontal components of position (figure 1b ). Results for the vertical component of position are not shown because they are inconclusive as individuals may join the swarming by flying above it, thereby extending large swarms in the vertical direction [1].

Figure 1.

Normalized positional correlations for laboratory swarms of the non-biting midge C. riparius.

Normalized positional correlations for laboratory swarms of the non-biting midge C. riparius. (a) Normalized positional correlations for one horizontal component of position (black circles) are shown, together with values of −1/n (red circles). (b) Normalized positional correlations for both horizontal components of position. Data are taken from [12].

The normalized correlations are maximal in the sense that if all individuals behave in the same way then the covariant matrix given by Σij=1 if i=j and Σij=-1/n if ij is positive definite only when the size of the matrix is less or equal to n × n. In other words, the least biased (maximum entropy) choice for the distribution of individual positions, i.e. multivariant Gaussians, exist only for swarms containing no more than n individuals. A few individuals, ‘cheaters’, could be more strongly anticorrelated than -1/n but such non-operative behaviour is unlikely because if it proliferates it will destabilize the swarm. By way of contrast, if the anticorrelations are not maximal then the covariant matrix would be given by Σij=1 if i=j and 1 > Σij>1/n if ij which encompasses the cases of non-interacting individuals, and individuals that tend to be cluster.

It follows from the analysis of Reynolds [13] that the simplest one-dimensional model for the simulation of individuals in a statistically stationary swarm containing m individuals with the forementioned multivariant Gaussian positions, xi , and uncorrelated Gaussian velocities, ui , is given by

dui=uiTdtσu2σx2Λijxjdt+2σu2TdWi, (1.1a)
dxi=uidt, (1.1b)

where T is a velocity correlation time scale, σu2 is the velocity variance, σx2 is the position variance, i.e. the mean square size of the swarm, Λij are elements of the inverse normalized position covariance matrix and are given by Λij=(n2(m2)n)/(n21(m2)(n+1)) if i=j and by Λij=n/(n21(m2)(n+1)) if ij , dWi(t) is an incremental Wiener process with correlation property dWi(t)dWj(t+τ)¯=δ(τ)δijdt and where there is summation over repeated indices (electronic supplementary material). When the positional covariances vanish, i.e. as c0n , the model, equation (1.1), reduces to Okubo’s classic model [14] for the trajectories of swarming midges, which predicts that swarms have Gaussian density profiles (so that roughly half of the individuals are on either side of the centre of mass at any given time).

The first term on the right-hand side of equation (1.1a) is a memory term that causes velocity fluctuations to relax back to their mean value. The second term on the right-hand side of equation (1.1a) is an effective force (mean acceleration). The noise term models a stochastic component of the internal forces that arises partly because of the limited number of individuals in the swarm and partly because of the non-uniformity in their spatial distribution [14]. It also accounts for chance encounters with other individuals.

Model predictions for the effective force have strong experimental support (figure 2). This effective force can be written as

Figure 2.

Experimental support for the predicted form of the mean acceleration.

Experimental support for the predicted form of the mean acceleration. The predicted form of the mean accelerations acting on individuals on the left/right side of the origin is given by Ai=±2/πσu2/σx(n2(m2)n)/(n21(m2)(n+1))σu2/σx2n(m1)/(n21(m2)(n+1))xc where xc=1/(m1)jimxj is, from the perspective of individual i, the swarm’s centre of mass relative to the origin. This prediction is obtained from equation (1.2) by averaging over all positions, xi , left or right of the long-time average position of the swarm centre. This prediction is supported by observations of a laboratory swarm of non-biting midge C. riparius that on average contained 94 individuals (solid lines). The dashed lines are linear least square regressions and are added to guide the eye. Data are taken from Sinhuber et al. [12] (Swarm Ob1).

Ai=  σu2σx2Λijxj=σu2σx2n2+nn21(m2)(n+1)xi+σu2σx2nn21(m2)(n+1)jim(xixj) (1.2)

This form makes it clear that individuals are attracted to the centre of the swarm, i.e. behave on the average as if they are trapped in a harmonic potential, as observed in [1,14], and are repelled by one another. The harmonic potential is an emergent collective property of swarming [15]. Notice that the repulsion term is distinctly different from short-ranged forms encountered previously in studies of collective behaviours, as its magnitude increases rather than decreases with distance between pairs of individuals. Notice also that the effective spring constant σu2/σx2(n2+n)/(n21(m2)(n+1)) is maximal when m=n , is not defined (is a divergent quantity) when m=n+1 and is negative when mn+2 , implying that individuals are on average repelled by rather than attracted to the swarm centre; the latter two cases are conditions coinciding with the loss of positive definiteness of the distribution of positions (electronic supplementary material). By virtue of having maximum anticorrelation positions, i.e. having m=n , laboratory swarms of C. riparius midges are therefore predicted to be poised at the cusp of a cohesive-disintegration phase transition (electronic supplementary material), albeit one quite different from the order–disorder phase transition envisaged by Attanasi et al. [11,16] and by Cavagna et al. [17]. The instability has not been observed in the laboratory under quiescent conditions perhaps because, and as evidenced in figure 1, the laboratory swarms collectively adjust their positional anticorrelation to be maximal for their current size. The stable–unstable phase transition could potentially be triggered by environmental disturbances that induce intensification of the mutual repulsion, as observed for instance by M. Sinhuber (personal communication, 2018). Sinhuber observed that laboratory swarms of C. riparius midges dissolve in the presence of certain sounds.

A novel form of correlation has been identified in laboratory swarms of the C. riparius midges; those collective behaviours have until now only been evident in the swarms’ collective responses to perturbations [3,4,8,9]. The positions of individuals within the swarm were shown to have maximal anticorrelation, a condition that is biologically significant because it maximizes the cohesiveness of swarms thereby making them resilient to environmental disturbances, because it minimizes competition between individuals (the mating males that form the swarms) for space and because the interactions represent a means of obtaining information on what may be occurring in a part of the swarm outside of an individual’s perceptual range. Regarding the latter it is interesting to note that if the anticorrelations persist after a female enters the swarm and is being chased by a single male (so that the female and the chasing male have positive positional covariance), then the modelling predicts that the effective mutual repulsion between males increases and that all males within the swarm are attracted towards the female, albeit less strongly than the chaser (electronic supplementary material). These attractions to the female are maximal (and differ from that of the chaser by a factor of one-half) when the anticorrelations between males are maximal (electronic supplementary material). This is true even of large swarms where the maximal anticorrelations are weak. Conversely, if the positions of swarming males were weakly correlated rather than weakly anticorrelated, then they would effectively and unknowingly be repelled by a female that is being chased.

The foregoing analysis indicating maximal anticorrelation leaves open the question as to how each midge can effectively interact with every other midge in the swarm, which in the case of the largest swarm amounts to effectively interacting with about 100 individuals. Preliminary network analysis seems to preclude metric interactions. This analysis was based on snapshots of 100 individuals with positions in three-dimensional space drawn at random from a Gaussian distribution. Individuals were assumed to be interacting if their spatial separation were less than some specified interaction range. This analysis revealed that even when the range of the interaction is comparable to the root-mean-size of the swarm, multiple eigenvalues of the Laplacian matrix are zero, indicating the presence of multiple disconnected networks of interactions and isolated individuals (located predominately in the outskirts of the swarm). The preliminary analysis is, however, supportive of topological interactions. If each individual interacts with just three or four of its nearest neighbours, then only one eigenvalue of the Laplacian matrix tends to be zero (in 87 out of 100 snapshots/99 out of 100 snapshots), indicating that each individual is predicted on average to be effectively interacting with every other individual. This warrants further investigation because to date there are just two reported empirical examples of topological interactions in collective animal motion, namely in flocks of starlings wherein each bird interacts with a fixed number (six to seven) of its neighbours [18], and in flocks of jackdaws wherein individuals interact with seven or eight neighbours on average [19].

Ethics

This work did not require ethical approval from a human subject or animal welfare committee.

Data accessibility

Electronic supplementary material is available online [20].

Declaration of AI use

I have not used AI-assisted technologies in creating this article.

Authors’ contributions

A.M.R.: conceptualization, formal analysis, investigation, methodology, project administration, validation, writing—original draft, writing—review and editing.

Conflict of interest declaration

I declare I have no competing interests.

Funding

The work at Rothamsted forms part of the Smart Crop Protection (SCP) strategic programme (BBS/OS/CP/000001) funded through the Biotechnology and Biological Sciences Research Council’s Industrial Strategy Challenge Fund.

References

  • 1. Kelley DH, Ouellette NT. 2013. Emergent dynamics of laboratory insect swarms. Sci. Rep. 3 , 1–7. ( 10.1038/srep01073) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2. Ni R, Ouellette NT. 2015. Velocity correlations in laboratory insect swarms. Eur. Phys. J. Spec. Top. 224 , 3271–3277. ( 10.1140/epjst/e2015-50077-5) [DOI] [Google Scholar]
  • 3. Ni R, Ouellette NT. 2016. On the tensile strength of insect swarms. Phys. Biol. 13 , 045002. ( 10.1088/1478-3975/13/4/045002) [DOI] [PubMed] [Google Scholar]
  • 4. Ni R, Puckett JG, Dufresne ER, Ouellette NT. 2015. Intrinsic fluctuations and driven response of insect swarms. Phys. Rev. Lett. 115 , 118104. ( 10.1103/PhysRevLett.115.118104) [DOI] [PubMed] [Google Scholar]
  • 5. Puckett JG, Ni R, Ouellette NT. 2015. Time-frequency analysis reveals pairwise interactions in insect swarms. Phys. Rev. Lett. 114 , 258103. ( 10.1103/PhysRevLett.114.258103) [DOI] [PubMed] [Google Scholar]
  • 6. Sinhuber M, Ouellette NT. 2017. Phase coexistence in insect swarms. Phys. Rev. Lett. 119 , 178003. ( 10.1103/PhysRevLett.119.178003) [DOI] [PubMed] [Google Scholar]
  • 7. Sinhuber M, van der Vaart K, Ouellette NT. 2019. Response of insect swarms to dynamic illumination perturbations. J. R. Soc. Interface 16 , 20180739. ( 10.1098/rsif.2018.0739) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8. Sinhuber M, van der Vaart K, Feng Y, Reynolds AM, Ouellette NT. 2021. An equation of state for insect swarms. Sci. Rep. 11 , 3773. ( 10.1038/s41598-021-83303-z) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9. van der Vaart K, Sinhuber M, Reynolds AM, Ouellette NT. 2019. Mechanical spectroscopy of insect swarms. Sci. Adv. 5 , eaaw9305. ( 10.1126/sciadv.aaw9305) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10. van der Vaart K, Sinhuber M, Reynolds AM, Ouellette NT. 2020. Environmental perturbations induce correlations in midge swarms. J. R. Soc. Interface 17 , 20200018. ( 10.1098/rsif.2020.0018) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11. Attanasi A, et al. 2014. Collective behaviour without collective order in wild swarms of midges. PLoS Comput. Biol. 10 , e1003697. ( 10.1371/journal.pcbi.1003697) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12. Sinhuber M, van der Vaart K, Ni R, Puckett JG, Kelley DH, Ouellette NT. 2019. Three-dimensional time-resolved trajectories from laboratory insect swarms. Sci. Data 6 , 190036. ( 10.1038/sdata.2019.36) [DOI] [Google Scholar]
  • 13. Reynolds AM. 2019. On the emergence of gravitational-like forces in insect swarms. J. R. Soc. Interface 16 , 20190404. ( 10.1098/rsif.2019.0404) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Okubo A. 1986. Dynamical aspects of animal grouping: swarms, schools, flocks, and herds. Adv. Biophys. 22 , 1–94. ( 10.1016/0065-227x(86)90003-1) [DOI] [PubMed] [Google Scholar]
  • 15. Puckett JG, Ouellette NT. 2014. Determining asymptotically large population sizes in insect swarms. J. R. Soc. Interface 11 , 20140710. ( 10.1098/rsif.2014.0710) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16. Attanasi A, et al. 2014. Finite-size scaling as a way to probe near-criticality in natural swarms. Phys. Rev. Lett. 113 , 238102. ( 10.1103/PhysRevLett.113.238102) [DOI] [PubMed] [Google Scholar]
  • 17. Cavagna A, Conti D, Creato C, Del Castello L, Giardina I, Grigera TS, Melillo S, Parisi L, Viale M. 2017. Dynamic scaling in natural swarms. Nat. Phys. 13 , 914–918. ( 10.1038/nphys4153) [DOI] [Google Scholar]
  • 18. Ballerini M, et al. 2008. Empirical investigation of starling flocks: a benchmark study in collective animal behaviour. Anim. Behav. 76 , 201–215. ( 10.1016/j.anbehav.2008.02.004) [DOI] [Google Scholar]
  • 19. Ling H, Mclvor GE, van der Vaart K, Vaughan RT, Thornton A, Ouellette NT. 2019. Costs and benefits of social relationships in the collective motion of bird flocks. Nat. Ecol. Evol. 3 , 943–948. ( 10.1038/s41559-019-0891-5) [DOI] [PubMed] [Google Scholar]
  • 20. Reynolds A. 2024. Data from: Spatial correlations in laboratory insect swarms. Figshare. ( 10.6084/m9.figshare.c.7423810) [DOI] [PMC free article] [PubMed]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Electronic supplementary material is available online [20].


Articles from Journal of the Royal Society Interface are provided here courtesy of The Royal Society

RESOURCES