Introduction

From flocks of birds1,2 to schools of fish3,4 to swarms of insects5,6,7, animal aggregations that display collective behaviour appear throughout the animal kingdom8. This self-organized, emergent phenomenon has been the subject of intensive modeling for decades, both because it is extremely common in nature and because of its potential utility as a biomimetic control strategy for engineered systems. Low-level interactions between individuals have been shown to allow the percolation of information known by only a few individuals throughout an entire aggregate9 and to drive the emergence of collective intelligence such as enhanced sensing10.

Many types of models of collective animal behaviour have been proposed, ranging from continuum approaches based on partial differential equations11,12 to cellular automata that specify only simple rules13. The most common paradigm, however, is to model the aggregation as a collection of self-propelled, discrete individuals that obey coupled ordinary differential equations14. The individuals interact via effective forces that affect their motion just as physical forces would. Typically, these effective forces include a short-range inter-individual repulsion, a long-range attraction and an intermediate-range tendency for a individual to align its motion with its neighbours15. For animal groups that move in a coordinated direction, such as bird flocks, the orientational interaction is often assumed to dominate; for those that stand still, such as insect swarms, the attraction and repulsion are the most important factors15. These models are appealing since they are straightforward to simulate, the “forces” that drive the collective behaviour are easily identifiable and they can produce behaviour that is qualitatively similar to what is observed in nature16,17. But simply displaying similar emergent behaviour is not sufficient to claim that a model accurately captures the dynamics of real biological systems8; instead, models must be validated against real empirical data18,19. Capturing such data has historically been a significant challenge.

To make progress towards validating models of collective animal behaviour, we made quantitative measurements of a canonical animal aggregation: mating swarms of flying insects, also known as leks. (Note that we use the term “swarm” to refer to unpolarized animal groups, rather than simply to groups of insects.) We measured the time-resolved trajectories and kinematics of every individual in several swarms of the flying midge Chironomus riparius. Previously, we reported our measurements of the group properties of the swarms, including their shape and velocity statistics. Here, we probe the statistical properties in more detail to look for signatures of interaction among the midges. Since acceleration is often used as a proxy for social-force information3,18, we studied the midge acceleration as a function of the distance to neighboring insects. We found clear evidence for a short-range repulsive inter-individual interaction, a result that we quantitatively confirmed by measuring the spatial distribution of the midges. At larger scales, however, the interpretation of the acceleration statistics is less clear, since on average the midges display an approximately equivalent acceleration in the direction of almost any feature of the swarm. These results suggest that, aside from relatively rare close-range interactions, the midges are on average only weakly coupled. We find further support for this conclusion by estimating the mean free path of the midges and showing that our swarms are rarefied. On the other hand, we also find that the midges are strongly bound to the swarm itself, since the size of the swarm is also on the order of the mean free path. Thus, our results suggest that some kind of attraction keeps the midges bound together, but that this effect does not take the form of a simple attraction towards nearest neighbours.

Results

We filmed 20 swarming events in a laboratory colony of C. riparius; the number of individuals in the swarms ranged from 10 to nearly 100. By imaging the swarms with multiple cameras, we pinpointed the location of each individual insect in three-dimensional space. We then used automated particle-tracking algorithms, originally developed to study intensely turbulent fluid flows20, to link these positions in time, giving us access to the flight trajectories, velocities and accelerations of each individual insect. More details on our husbandry procedures and experimental methods are given in the Methods section.

Acceleration statistics

Models of collective animal behaviour typically treat interactions between individuals as effective forces. Modeling social interactions as forces assumes that they will affect the motion of an animal in the same way as real physical forces (such as drag or lift, the case of flying or swimming animals). If this assumption holds, then the interactions between individuals can be extracted from experimental data by studying accelerations and this approach has been taken in other studies of collective animal motion3,18. Thus, to look for repulsive or attractive forces between individuals, we measured the acceleration from each insect toward its nearest neighbour (that is, the projection of an insect's instantaneous acceleration vector onto a unit vector in the direction of its nearest neighbour). The result, averaged over the ensemble of observed insects, is shown in Fig. 1a. A repulsive zone is clearly visible in the data: when a pair of insects is closer than a distance rrep = 12 mm (about 2 body lengths), the acceleration between them becomes strongly repelling. At separations greater than rrep, the acceleration is attractive, with a magnitude that increases linearly with distance.

Figure 1
figure 1

Acceleration statistics.

(a), Average acceleration of a midge towards its nearest neighbour (red), empty space (blue), given by the nearest Voronoi centroid and the centre of the swarm (green), as a function of separation distance. Negative accelerations are repulsive; positive are attractive. Shaded areas show the standard error of the mean. Midges are strongly repelled from their nearest neighbours below a separation of rrep = 12 mm. Above this distance, midges show attractive interactions towards their neighbours, empty space and the swarm centre. (b), The same statistics as in a, as measured in a simulation of the zonal model of Couzin et al.15. Details of the simulation are given in the Methods section.

This apparent long-range attraction towards nearest neighbors is exactly what would be predicted by typical swarm models. But this kind of linearly increasing attractive acceleration is not unique to a model with long-range attraction. Indeed, a cluster of noninteracting particles moving according to an Ornstein–Uhlenbeck process21 would show similar apparent attraction on average. Therefore, to test whether our measurements truly imply meaningful long-range attraction, we measured the acceleration not between an insect and its neighbours but rather towards empty space. We constructed Voronoi tessellations of our swarms and measured the acceleration from each insect toward the nearest Voronoi centroid–that is, towards the most empty region of space in the insect's vicinity. As shown in Fig. 1a, this acceleration is comparable in both strength and scaling to the attraction to an insect's nearest neighbour–so, on average, the insects are just as strongly pulled towards empty space as they are towards their neighbours. We also show in Fig. 1a the average attraction of an insect to the centre of the swarm6, which is comparable to both of these other forces. These results pose something of a conundrum: it appears that on the average, the insects show an acceleration that is attractive and linearly increasing with distance to almost any feature of the swarm. Since there is no a priori reason to expect that the form of these three signals should be the same, these results suggest that the acceleration is not accurately capturing the insect interactions at distances substantially larger than rrep. To support this conclusion further, we computed the same acceleration statistics in a simulation of an effective-force model that shows a swarm phase15. Details of the model are given in the Methods section. As shown in Fig. 1b, the results of the model are significantly different from what we measure for the insects and long-range attraction to other individuals is clearly distinguishable in the acceleration statistics.

Spatial distribution

At long range, the acceleration statistics we measure are therefore inconclusive. It is thus appropriate to test the validity of the observed short-range repulsion as well. If this result is significant, its effect should also be apparent in the spatial organization of the midges. We therefore measured the probability density function of nearest-neighbour distances, shown in Fig. 2; note that individuals closer to the swarm edge than to their nearest neighbour were excluded from this calculation to avoid edge effects. We compare our results with two model predictions. If the distribution of individuals within the swarm were random, the nearest-neighbour distances should follow a Poisson distribution. Given a strong repulsive interaction, however, one might expect that the distribution should be more like that computed for a hard-sphere gas22. Similar to what has been found in previous work6,23, the Poisson distribution compares poorly with our data. Fitting the hard-sphere model, which includes the sphere radius as a parameter, to our data again leads to an estimate of 12 mm for the radius of the repulsive zone, consistent with our acceleration measurements. The measured nearest-neighbour distance distribution, however, does not show the discontinuous jump to zero that a hard-sphere model would predict (see Fig. 2), suggesting that the repulsive interaction is more like a soft potential.

Figure 2
figure 2

Probability density function of nearest-neighbour distances.

Two models are compared with the data: a Poisson distribution, which would be expected if the midges were randomly arranged and a hard-sphere distribution with a sphere radius of rrep.

Mean free path

So far, our measurements suggest that the midges in the swarms are relatively weakly coupled; they repel each other strongly at short distances, but do not show clear long-range attraction (at least, not in the average acceleration statistics). To probe in more detail how free their motion is as they move through the swarm, we therefore estimated the mean free path of the midges. In a hard-sphere gas, defining the free path between interactions is simple, since the only interaction events are collisions. Midges, however, do not collide and rarely come as close as rrep. Additionally, the trajectories they take in between such close approaches are far from straight. Thus, we estimate the free paths of the midges by measuring the distance they travel between significant changes in their motion. To define these “scattering” events, we use the trajectory curvature κ. Curvature is naturally a geometric quantity; in a system like ours, however, where a trajectory is parameterized by time, it can be expressed as κ = an/|v|2, where an = |v × a|/|v| is the magnitude of the acceleration normal to the flight direction and v is the velocity24,25. As shown in Fig. 3a, κ is large when an insect makes a tight turn. Curvature is well suited to identifying significant changes in motion because it typically has a very large dynamic range25,26. As shown in Fig. 3b, spikes in curvature are well separated from the background fluctuations and can be easily identified with a simple peak-finding algorithm. We look for curvature peaks above a threshold value κ0. By fitting the curvature peaks with Gaussians, we find that the temporal extent of these events is on average about 0.1 s, giving a timescale for how rapidly the midges can manoeuvre. We also note that fewer than 1% of these curvature peaks occur when the focal midge is within rrep of a neighbouring midge.

Figure 3
figure 3

Curvature as an indicator of significant trajectory changes.

(a), Flight path of a single midge in a swarm; the curvature is indicated by the colour along the trajectory. Large curvature occurs at the sharp bends. (b), Time series of curvature along the same trajectory shown in (a). Events are identified by a simple peak-finding algorithm and are shown with diamonds. The dashed line shows the threshold κ0 (here chosen as 1/20 = 0.05 mm−1) that a peak must exceed to be considered a significant event.

In Fig. 4, we show the distribution of free paths λ (that is, the distances traveled between curvature peaks) normalized by the mean free path 〈λ〉, which we measure to be 38 mm. The free-path distribution decays exponentially for long path lengths, as would be expected for a classical equilibrium gas. The behaviour at small λ is quite different, however and is likely due to the more complex interactions that would be expected for animals as compared to molecules. This result is consistent with our findings above: the midges appear to interact weakly except at short range. At larger scales, their mean-field behaviour is similar to a gas. This “gas”, however, is quite rarefied. Our measurements of the mean-free path allow us to estimate the Knudsen number Kn = 〈λ〉/〈dN N〉, where 〈dN N〉 is the typical distance between nearest neighbours. Kn is used in statistical physics to determine whether a continuum approximation may be applied to a given system. If , scattering is very frequent and a continuum approximation is reasonable. For our swarms, we find , suggesting that continuum modeling of insect swarms is not justified and that the swarms are extremely rarefied.

Figure 4
figure 4

Distribution of free paths λ scaled by the mean free path 〈λ〉 = 38 mm.

For large λ, the distribution is nearly exponential, as would be expected for a classical gas; for small λ, however, it differs significantly. Varying the curvature threshold κ0 by an order of magnitude changes 〈λ〉 by only about 15%.

Discussion

Although we find clear evidence for short-range repulsive interactions between the midges in our swarms from both acceleration and position statistics, our data do not clearly support long-range effective-force-type attractive interactions. Measurements of mean acceleration indicate the same trends at long range to nearly any feature of the swarm and are qualitatively different from what we measured in a model that contains long-range attraction. Measurements of the mean free path of the midges likewise suggest that the midges are only weakly coupled.

Nevertheless, the midges are clearly not free particles: something must be keeping them bound to the swarm. And this binding is relatively strong: the ratio of the mean free path to the overall linear size of the swarm is also of order unity, suggesting that the swarms are dynamically small. This finding is consistent with our previous result that on average the midges move ballistically through the swarm rather than diffusively6. The swarms are always much smaller than the size of the midge enclosure6, so there is no obvious external pressure that keeps the midges confined to the aggregation. Rather, they are bound to the swarm due to some kind of interaction, though our data suggest that this interaction is not a simple long-range attraction to nearest neighbours. Thus, the midges appear somewhat paradoxically to be tightly bound to the swarm while at the same time weakly coupled inside it. Understanding the detailed origin of this behaviour will be an interesting topic for future research.

Methods

Insect husbandry

We established a self-sustaining laboratory colony of Chironomus riparius midges from initial egg sacs purchased from Environmental Consulting and Testing, Inc. Our husbandry and experimental procedures are described in detail elsewhere6; we outline them briefly here. The midges spend their entire life cycle in a cubical enclosure that measures 91 cm on a side. The enclosure is illuminated by an overhead light set to a circadian cycle, providing 16 hours of light and 8 hours of darkness per day and the environment is kept at a steady 23°C. Midge larvae develop in 9 open tanks containing dechlorinated, aerated fresh water and a cellulose substrate into which they can burrow. Larvae are fed crushed rabbit food twice weekly. Note that once they emerge as winged, flying adults, the midges do not eat; they live for only two to three days during this stage.

During their adult stage, male midges spontaneously form mating swarms, also known as leks, twice daily, at “dawn” and “dusk” (corresponding in our laboratory to times just before the circadian illumination turns on and just after it turns off). We typically observe larger swarms at dusk; all the data reported here was taken for dusk swarms. Females do not participate in the swarming behaviour, but will occasionally fly through the swarms to find mates. They deposit fertilized egg masses into the water tanks, closing the life cycle.

Since swarm nucleation depends in part on optical cues, we provide a “swarm marker” (in our case, a piece of shiny black plastic); it is thought that swarm markers simulate the muddy streams where C. riparius lives in the wild27. In addition to encouraging the formation of swarms, the marker also allows us to position the swarms in the midge enclosure so that we can ensure that the entire swarm is visible to our imaging system. Even in the presence of such a swarm marker, previous work has established that the swarms are real self-organized states and not merely groups of non-interacting individuals sharing a small space28. All of our observed swarms are much smaller than the size of the enclosure; the insects are not constrained by the laboratory environment. Finally, we note that since are swarms do not drift in space, they have no net linear momentum; we also find that they do not circulate and have no net angular momentum.

Data acquisition

To study the swarms quantitatively, we image them with three hardware-synchronized high-speed Photron Fastcam SA-5 cameras. Each camera records 1024 × 1024 pixel images at a rate of 125 frames per second. The images are buffered into the cameras' onboard memory and subsequently transferred to disk. Roughly 5400 frames of data (approximately 45 s) were acquired for each swarming event. In the 20 swarming events studied, the mean number of participating individuals was 10, 12, 14, 14, 15, 16, 16, 17, 17, 18, 23, 24, 24, 26, 26, 30, 37, 40, 64 and 89. The midges were illuminated with 20 LED lamps that emitted light in the near infrared. Since the midges cannot see in the infrared, their natural behaviour was unaffected by the lighting.

After data acquisition, the images were processed to locate the intensity-weighted centroids of each individual midge. The redundant information captured by the three cameras was used to combine the two-dimensional positions of the insects recorded by the individual cameras into three-dimensional positions using standard stereoimaging techniques6,20,29. After determining the three-dimensional positions of the midges, we tracked their motion in time using a fully automated predictive tracking algorithm originally developed to study turbulent fluid flows that has been well documented elsewhere20. Briefly, the algorithm proceeds by using the prior flight history of a midge to estimate (kinematically) the expected position of the midge in future frames; the real midge that is found closest to the estimated position is linked to the trajectory. Once the trajectories have been identified, we compute velocities and accelerations by convolving the trajectories with a Gaussian smoothing and differentiating kernel30, avoiding noise that can be introduced by simple finite differences. Our time resolution is sufficient to capture even the most intense acceleration events displayed by the midges6.

Numerical simulation

Data in Fig. 1b are collected by simulating the zonal model of collective animal behaviour described by Couzin et al.15 in its swarm phase. The model consists of a set of point particles that move at a constant speed and that interact via a set of deterministic rules that depend on the separation distance between the particles. Particles are repelled from nearby neighbours in a zone of repulsion, are attracted to distant neighbours in a zone of attraction and try to align their motion with neighbours at intermediate distances in a zone of orientation. The model produces swarm-like behaviour when the orientational interaction is small or nonexistent15.

In our simulations, we set the radius of the repulsion zone to 2 units and the radius of the attractive zone to 40 units and we used no orientational interaction. The speed of each particle was held fixed at 3 units and the maximum turning speed of the particles was set to 50 degrees per time step. These parameters place the model in the swarming part of its phase diagram15. We ran 200 independent simulations with 100 individuals per realization; each simulation was run for 10000 time steps, of which we used the last 5000 for this analysis.