Nicholas Ouellette likes midges. Yes, these tiny flies are infuriating and can bite, but Ouellette, who’s a physicist by training, is intrigued by how and why these insects form giant swarms, sometimes thousands strong. We know the swarms are composed entirely of male midges, which have long antennae and beat their wings at nearly twice the frequency of the females. Attracted by the high-pitched sounds, the females fly towards the swarm in the hope of reproducing, which makes swarming an elaborate midge-mating ritual.

The sensitivity of midges to sound was allegedly discovered by a Finnish ecologist in the 1960s while out walking in the woods. As he sang local folk songs, the ecologist noticed swarms of these flies being irresistibly drawn into his path, seemingly by the sound of his voice. Ouellette knew, however, that he’d need something more scientific than singing folk songs if he was to study swarming using sound. He therefore got one of the postdocs in his lab at Stanford University Rui Ni (now at Pennsylvania State University) – to track midges with a microphone and record the beating of their wings.

When Ni and Ouellette blasted the buzzing of swarming midges back at them through a loudspeaker, they noticed some unusual things. If they alternated the level of sound played back through the speaker – loud, soft, loud, soft – the region of highest midge density shifted with the change in volume. And when they played just the sound of a female through the speaker (you can easily spot the females as they lack antennae), the entire male swarm flew over and sat on it.

Fascinated by flocks

Ouellette is one of a growing number of scientists seeking to understand how such “collective behaviour” comes about. Having previously worked on pattern formation and coherent structures in fluid flows, Ouellette became fascinated by biological swarms after noting the unusual patterns formed by flocks of starlings in flight. “It looked to me like turbulence,” he recalls, pointing to the large eddies that form in the Gulf Stream as an example of the phenomenon. “They dramatically appear out of the flow itself. So there must be some kind of mechanism that leads to the formation of these kinds of structures in animals.”

But swarm scientists are still puzzling over how such a mechanism might work and whether there’s a set of universal laws dictating such collective behaviour across a wide range of biological systems. That’s the nagging question, because while flocking and swarming are common in nature, each species that exhibits such collective behaviour does so just a little bit differently. A flock of starlings, a swarm of midges or a group of fire ants linking together to form floating rafts, for instance, are not quite the same thing.

Even the terminology is woolly. “Many people use the words flocking and swarming interchangeably,” admits Ouellette. “But since I work on both, I distinguish them by using ‘flocking’ to mean a group with net, ordered motion and ‘swarming’ to mean collective motion without any overall order or net motion. Much as I try, though, that’s still not standard usage.” Nevertheless, Ouellette is convinced there is something universal about all these systems – some aspects that don’t depend on exactly which animal you are studying.

For Chad Topaz – an applied mathematician from Williams College in Massachusetts who works independently of Ouellette on models of locust swarms – it all boils down to three questions. What do the individuals do? What does the group do? And how are those two things related? “These are such simple questions, and yet they are very difficult to answer,” Topaz says.

Gaining a better understanding of swarms is not just an intellectual challenge. It could also reap dividends for society by, for example, leading to improved crowd-management strategies for subways, concerts, rallies and other places where lots of people gather. Such work could in addition give scientists a unique approach to designing complex networks that are resistant to failure. An electric power grid, for example, can fail catastrophically if just a single pylon is down, while all it takes for planes to be delayed throughout the US is for a winter storm to knock out one key node in the airline industry’s hub-and-spoke flight network.

“We are not good as human beings at designing controlled and distributed systems,” Ouellette admits. Nature, in contrast, seems to have solved this conundrum in flocks and swarms, which don’t have the same choke points. If a few birds fall out of formation as a big flock of starlings migrates, the overall dynamics do not change. There is no central node – no top-down mechanism – and yet a form of controlled order does emerge in such collective systems. “It’s bottom-up instead of top-down control,” says Ouellette.

Swarm into action purlieu

Swarming research has been firmly in the wheelhouse of observational biologists for decades, when they would monitor swarm behaviour in the field and carefully write down their observations. It wasn’t until the 1980s, however, that computer graphics specialist Craig Reynolds developed what became the canonical computational model for collective behaviour: the so-called “boids program” – an agent-based simulation that gets its name from “bird-oid” (or “bird-like”) objects. The program became a staple in Hollywood, being used to model the movement of groups of computer-generated bats in Tim Burton’s Batman Returns, as well as the movement of combatants in major battle scenes in the Lord of the Rings trilogy.

Schematic diagrams illustrating Craig Reynold’s computer model of co-ordinated animal motion

The basic concept is simple (figure 1). First, treat each individual in the swarm as a dot (or particle) initially moving in a straight line at constant speed. Then programme in a few simple rules governing interactions between those dots. For instance, if two dots move too close together, they must move apart to avoid colliding, but if the distance between them becomes too great, they must get nearer again. When the collection of dots becomes sufficiently dense, a flocking pattern will form. Tweak the rules, and a pattern emerges that resembles a swarm of midges or locusts. Yet another set of rules will give you a pattern similar to a raft of fire ants.

These kinds of models have dominated research into collective behaviour, but Ouellette thinks such an approach is insufficient – making an exact solution well-nigh impossible – given that such systems are highly nonlinear and have anywhere from several hundred to a billion moving parts. But even knowing which pair of variables have a nonlinear dependence isn’t clear since, as Ouellette puts it, “we don’t know what parameters matter in the first place”. The bottom line is that the combined effect of all those individuals in a nonlinear system adds up to more than the just the sum of those parts. “You get something other than a simple average over their individual states.”

Ouellette considers swarming a classic inverse problem. Scientists have collected huge amounts of data on flocks and swarms, and are now trying to work backward to ferret out the underlying rules. But even if you have the rules, it doesn’t mean you understand how animals behave. “You can say, if I make these modelling rules, it looks kind of like a flock of birds,” explains Ouellette. “But there’s a very big divide between that statement and saying ‘Birds behave this way.’ ”

His solution? A macroscale, big-picture approach that draws as much from thermodynamics and materials science as it does from particle modelling and statistical mechanics. “I’m starting from a stereotypical physicist’s approach: everything is probably the same stuff in an underlying way if you tease it apart and cast it in the right way,” Ouellette says. But rather than turning to computational modelling, Ouellette instead works with actual midges, treating the swarm like a chunk of material – probing it by doing something to it and seeing how it reacts. As he points out: “You don’t test materials by observing them. You do something to the material and measure its response.”

Photograph of fire ants working together to form a bridge

It’s an approach shared in part by David Hu, a physicist at Georgia Tech in the US, whose lab is justly famous for its experiments with swarms of fire ants. The swarms, which can consist of 100 or more individuals, have both solid and liquid properties. By linking their bodies together, the ants form floating rafts, towers and other solid-like structures, but collectively they also flow like a fluid. One YouTube video from Hu’s lab even shows the ants pouring themselves out of a teapot into a teacup. The lab uses standard materials tools such as rheometers to apply various kinds of forces to the ant swarms to see how they collectively respond (Nature Mater. 15 54).

Midge master

In his lab, Ouellette works with small swarms of non-biting midges Chironomus riparius, which are an ideal choice from a physicist’s perspective as they are so simple. Lacking digestive systems, adult midges don’t eat and instead conserve all their energy for their swarmy mating rituals. What’s more, these particular midges don’t spread disease and, should they escape, they die within a few days.

They are also bred commercially in labs that provide customer support – a surprisingly useful feature if you’re a physicist like Ouellette who’d never dealt with living specimens before.

“The first couple of tries, I’d call them up and say, ‘Okay, everything died again, what did we do wrong this time?’ ” he recalls. “And they’d say ‘Well, did you oxygenate the water?’ Because little things like that matter.” Eventually, Ouellette mastered the art of breeding his midges, and his experiments began in earnest. Since swarming is triggered by light, he’s fixed up a lamp that switches on automatically for an hour twice a day. Each time the light flicks on, gangs of 25–30 midges swarm for the full hour until it turns off again. “It’s a really robust system,” says Ouellette. “Twice a day we get swarms.” Pieces of black cloth simulate the terrestrial features that midges like to swarm over, such as stumps or tree roots or small pools of water.

Experiments typically involve manipulating the conditions to see how swarms respond, like blasting those recordings of male or female midges – the changes in volume mimicking the application of an oscillating magnetic field to a material. Another experiment involves placing two black cloths together to draw a swarm and then slowly pulling them apart – the swarm splits into two distinct swarms, exhibiting a property akin to elasticity or mechanical strength in materials. In each case, Ouellette uses high-speed cameras running at 100 frames per second to determine the position, velocity and acceleration of each insect, and uses a particle-tracking computer program to recreate the individual trajectories. Then it becomes a matter of analysing that data in such a way as to extract the large-scale swarm features.

Trajectories of 30 midges tracked over 20 seconds

Ouellette’s most recent analysis of the data from his lab-based swarms yielded a result strongly analogous to a liquid vapour-phase coexistence ( Eur. Phys. J. Special Topics 224 3271). The core of the swarm is consistently in a condensed phase (like water mole­cules in liquid form), with a more dilute “vapour” phase around the edges (like water molecules in gaseous form). Individual midges can, however, wander back and forth between the two phases. Such findings are intriguing, but fall short of the ultimate goal of a universal set of rules for swarms.

Craig Tovey, who works with Hu at Georgia Tech modelling swarming behaviour in fire ants, honey bees and other systems, has observed a couple of common principles that show up in multiple cases. First, he has found that the models do not rely on past history to make predictions for the future, depending instead just on current conditions. That not only makes life easier when analysing such systems, but also makes sense biologically since ants, bees, fish, midges and other swarmy creatures do not have long memories. They would naturally respond to cues in their immediate vicinity to determine their next move.

Second, Tovey has also noticed that randomness plays a balancing role in many swarming models. With fire ants, for example, each individual insect travels in a random direction, but eventually the group forms a roughly circular raft. “You’ll get roughly the same number going in different directions to form these circular shapes – without any individual ant knowing what it or the others are doing,” he says. That randomness explains how the fire ants can build complicated structures without any of them having any sense of the overall structure of the tower or raft or whatever else they’re building.

Tovey also suggests that evidence of scaling in the data could provide a vital clue to the question of whether a universal set of rules might exist governing swarms. Indeed, Andrea Cavagna and Irene Giardina – physicists at the Institute for Complex Systems in Rome, Italy – have already found evidence of this kind of scaling in their own studies of midge swarms ( Nature Phys. 13 914). Unlike Ouellette, they study midges in the wild, where the swarms are much larger (with up to 1000 individual midges), providing a complementary approach. By tracking the midges in 3D with high-speed cameras, Cavagna and Giardina found that as individual midges group together and get larger and denser, they interact more, with the correlations increasing sharply with density. When enough midges gather in sufficiently close proximity, a swarm develops. This observation means that swarming behaviour is an “emergent” property and could therefore be described by scaling laws.

If, for example, the number density of insects in a swarm remains constant as the swarm grows, which is roughly correct for the swarms Ouellette has studied, then there would be a scaling relationship between the number of individual midges and the swarm volume. Such a relationship would be useful as it would then let you predict the volume of a swarm that would be formed by a different number of individuals, which you could, say, use to design an enclosure to hold swarms of a particular size.

“If we were to find a scaling law, that would be a powerful thing for interpreting the data, because it would allow us to make a prediction about how a swarm of different size, for example, would behave, even though we haven’t measured it,” says Ouellette. Nevertheless, he is cautious about whether such laws actually exist. “I think the evidence for scaling in swarms is still pretty tenuous,” he admits. “A lot more work needs to be done before I would trust scaling in collective behaviour too much.”

That hasn’t held back Cavagna and Giardina, who say their experiments found that scaling holds across different swarms of three different species – each with different sizes and densities, recorded on different days over the course of a year. Their analysis, however, doesn’t amount to a true universal class of behaviour, since the existing models do not describe the specific dynamical behaviour of swarming midges. Whatever is regulating how each individual moves and interacts with others in the swarm at the microscopic level remains hidden. “We have found these systems obey these very non-trivial laws, which means we can hope to treat [swarms] with simple models in the same way as is done in physics,” says Giardina. “And we also learned that there is still something we have not yet captured in the modelling. That is the next step.”

As for Ouellette, he thinks his approach could yield even more progress by connecting the various lines of ongoing swarm research. While he acknowledges there may be some scepticism from certain quarters, he thinks he can win people over to his viewpoint: “If you’re loud enough, people eventually take notice.” A bit like buzzing midges in fact.