Starlings take to the sky in swirling vortices; ants teem like rivers. “They stretch, they move around, but they retain cohesion in a way you’d expect from a fluid moving,” said Nicholas Ouellette, a physicist at Stanford University. That’s why to him, it isn’t far-fetched to think about collective animal behavior in the language of fluid mechanics, or to analyze groups of organisms much as an engineer would analyze a material.

That approach has paid off in a paper published today in Science Advances, in which Ouellette and his colleagues used a strategy inspired by materials science to analyze the dynamics of a flying swarm. They identified properties in the collective behaviors of insects that might help a group to avoid falling apart in the face of a changeable and disruptive natural environment.

Such collective behavior — in which hundreds of fish, say, all suddenly change course at once, seemingly as a single entity — is a mystery that researchers are still eagerly trying to unravel. To understand it more fully, experts usually study the interactions of the individuals, hoping to pin down how certain simple rules can lead to the macroscopic emergent effects they’ve observed. But that’s been difficult.

Ouellette and a handful of other scientists have therefore tackled the problem from a different angle: by ignoring the individuals and turning their attention to what the properties of the whole system can reveal about its behavior — just as “you can describe what a material is like, without needing to know about what its atoms are doing,” Ouellette said.

When engineers test a material, they poke and prod it to see how it reacts. David Hu, a physicist at the Georgia Institute of Technology, did something similar in his studies of fire ants: By measuring how the swarms reacted when they were compressed between two surfaces and subjected to other kinds of forces, he and his colleagues found that ant behavior has properties resembling those of both solids and fluids. Other researchers have studied similar physical properties in bacteria.

But doing that for flying animals, which don’t touch each other as they swarm, and which are often more difficult to control in an experiment, seemed out of reach. “You’re not going to put a flock of birds in the lab,” Ouellette said.

He therefore decided to work with male midges, small insects that band together into clouds during mating season to make themselves visible to females from afar. They usually do so above some object visible on the ground, be it a tree root or a small puddle of rainwater — which the team reproduced by placing a little piece of black felt on the bottom of the tank in which the midges were raised.

When the researchers moved the felt patch in an oscillating wave pattern, the swarm moved with it, allowing them to study the midges the way Hu had done with his ants. In particular, they looked at how layers of the swarm behaved in response to the felt’s changing position. The midges near the bottom moved in step with the felt, oscillating as much as it did; those midges could see the felt below them. But the midges in higher layers, which could see only other insects below them, lagged behind, oscillating less with the felt. The lag showed that the wave of information about the felt’s position was gradually getting suppressed as it moved upward through the swarm.