The Birds That Turn as One
A Sky Over Rome
Every winter evening, a few blocks from Rome’s main railway station, the starlings come in to roost, and before they settle they fill the sky. The flock pours, thickens, thins to a veil and folds back on itself. When a falcon dives into it, a dark wave runs across thousands of birds and the whole flock swerves as one.
Nobody is in charge. No starling can see more than a handful of the others, and none of them knows where the flock is going.
For three winters, a team of physicists from the University of Rome spent their evenings on the roof of the Palazzo Massimo museum, photographing the flocks with pairs of cameras set 25 metres apart, so that a computer could place every bird in three dimensions. They wanted the answer to one question: when a starling decides which way to fly, whom does it listen to?

One Rule, No Leader
Years earlier, in 1995, the Hungarian physicist Tamás Vicsek and his colleagues had written down the simplest flock there is. Every bird flies at the same speed. At each step it looks at its neighbours, turns to their average direction, and gets it slightly wrong, by a random angle of up to $\pm\eta\cdot 180°$:
$\theta_i$ is the direction bird $i$ flies, and $N_i$ is the set of birds it follows, itself included. The sum adds up their directions as arrows, and $\arg$ reads off the way the total points: $\bar\theta_i$, the average heading. The bird takes it, gets it slightly wrong, and flies on; with positions written as complex numbers, $e^{\mathrm{i}\theta}$ is one step of unit length in the direction $\theta$. That is the whole model: no leader, no destination, no memory.
To see whether the birds agree, add up everybody’s arrow:
The order $\varphi$ is 1 when every bird flies the same way and close to 0 when each goes its own way.
A Tipping Point
Turn the error $\eta$ up far enough and the agreement collapses: past a threshold, the flock stops being a flock. Physicists call it a phase transition, the same mathematics as a magnet that loses its magnetism when it is heated.
The deeper surprise came the same year, from John Toner and Yuhai Tu. A flat sheet of compass needles, each copying its neighbours with any jitter at all, can never agree over an unlimited distance; the agreement always fades, however slowly. Mermin and Wagner had proved it in 1966. Toner and Tu showed that birds escape the theorem because they move. A flying bird keeps changing neighbours, so what it knows travels further than it can see. In a flat world, a flock is possible only because the birds are flying.
Seven
Here is what the cameras on the Palazzo Massimo found. Vicsek’s birds, like most models of the time, listened to every bird within a fixed distance. Starlings do not. Michele Ballerini, Andrea Cavagna, Giorgio Parisi and their colleagues found that each bird tracks a fixed number of neighbours, six or seven, however near or far they happen to be. A starling counts. It does not measure.
Is counting better? I built both rules into Vicsek’s model: 400 birds in a square that wraps around at its edges. One flock follows each bird’s 7 nearest. The other follows every bird within a fixed reach, set so that when the birds are packed as closely as in Vicsek’s paper, the average bird has 7 neighbours there too. Then two sweeps, order against noise and order against how far apart the birds are, each point the average of six runs:
Algorithm — Four Hundred Birds, Two Rules
input: N = 400 birds in a square of side 10 that wraps around at its edges
speed v₀ = 0.03, noise η
rule: "7 nearest", or "within reach" r = 0.75
(at spread ×1 the reach holds 7 birds on average)
spread s: the square's side becomes 10 s,
so the distance between birds grows s times
x, θ <- random positions and random headings
repeat 4000 times:
for every bird i, all at once:
neighbours <- i and its 7 nearest birds (7 nearest)
or i and every bird closer than r (within reach)
θᵢ <- the direction of Σ (cos θⱼ, sin θⱼ) over the neighbours
θᵢ <- θᵢ + π η U, U uniform in [−1, 1]
move every bird v₀ along its new heading; wrap at the edges
from step 2001 on: record φ = | mean of (cos θᵢ, sin θᵢ) |
order <- the mean of φ over the recorded steps, then over 6 runs
The flock below runs the same rules, live, in your browser:
The Price of Counting
The first result goes the wrong way. With the birds packed close and a small error, $\eta = 0.10$, the within-reach flock reaches an order of 0.97, the counting flock only 0.80. At $\eta = 0.20$ the gap is wider: 0.87 against 0.42. Watch the counting flock and you can see what goes wrong: it breaks into groups flying different ways. Following is not mutual. I may count you among my seven while you count others, so a tight clump can end up listening only to itself.
Now spread the birds out. At twice the distance the two rules draw level, 0.88 against 0.87. At four times, the circle that used to hold seven birds holds, on average, less than half of one, and the within-reach flock falls apart: 0.41. The counting flock does not notice. Every bird still has its seven, and the order is 0.94.

This is the argument Ballerini and his colleagues made in 2008, and it is why the starlings’ rule makes sense. A murmuration never holds one density. It stretches, bunches, and splits around a diving falcon. A bird that listened within a fixed distance would lose its neighbours whenever the flock thinned, and the flock would come apart where it is thinnest, which is where the falcon is. A bird that counts never loses them. Starlings pay a little agreement when the flock is dense, and buy a flock that does not break.
Why seven, and not five or twenty? In 2013 George Young, Naomi Leonard and their colleagues, working with the Rome data, asked what a bird gains from each extra neighbour it tracks. With senses that are never perfect, more neighbours hold the flock together better, but every neighbour costs the bird effort. The best balance came out at six or seven: the number the starlings use.

What the Model Leaves Out
Press startle and twenty birds swing through 90°. In the sky, a turn like that sweeps across the whole flock. In Vicsek’s model it does not. I ran it six times, three under each rule: fifty steps after the startle, the other 380 birds had turned by between 2° and 14°. Under the within-reach rule, the startled birds were being pulled back into line. Under the counting rule, once, they simply left: a small flock of their own, still turning.
Real starlings do something the model cannot. In 2014 Alessandro Attanasi, Cavagna and their colleagues filmed flocks as they turned, and found that the change of direction crosses the flock at a constant speed with almost no loss: the last bird turns as sharply as the first. To explain it they gave each bird a turning momentum. A bird that has begun to turn carries on turning for a moment and hands the turn on at full strength, the way each falling domino hands on the fall. Vicsek’s birds have no such momentum; at every step they forget how they were turning. The equations Attanasi’s team wrote down are, in their words, those of superfluid transport, the physics of liquid helium, in which a disturbance also travels without fading.

The Flock Is a Game
Vicsek’s birds obey a rule. Real birds, you could say, choose. Each starling wants to stay with the flock without wasting effort on steering, and what the flock does is the sum of what all of them choose. That is a game played by a crowd, each player responding to the average of all the others, and it has a name: a mean-field game. In 2011 Mojtaba Nourian, Peter Caines and Roland Malhamé posed flocking this way, with each bird paying for flying differently from the birds around it, the nearer the more, and for the effort of changing course. Their equilibrium is a set of flight plans that no single bird would change, given all the others.
A starling does not know where the flock is going. It knows where seven birds are going, and it turns with them. Each of those seven is watching seven more. That is enough to carry a falcon’s warning across thousands of birds, and it is why the flock turns as one.
Sources
- T. Vicsek, A. Czirók, E. Ben-Jacob, I. Cohen and O. Shochet, “Novel type of phase transition in a system of self-driven particles”, Physical Review Letters 75 (1995) 1226–1229.
- J. Toner and Y. Tu, “Long-range order in a two-dimensional dynamical XY model: how birds fly together”, Physical Review Letters 75 (1995) 4326–4329.
- N. D. Mermin and H. Wagner, “Absence of ferromagnetism or antiferromagnetism in one- or two-dimensional isotropic Heisenberg models”, Physical Review Letters 17 (1966) 1133–1136.
- M. Ballerini, N. Cabibbo, R. Candelier, A. Cavagna, E. Cisbani, I. Giardina, V. Lecomte, A. Orlandi, G. Parisi, A. Procaccini, M. Viale and V. Zdravkovic, “Interaction ruling animal collective behavior depends on topological rather than metric distance: evidence from a field study”, Proceedings of the National Academy of Sciences 105 (2008) 1232–1237.
- G. F. Young, L. Scardovi, A. Cavagna, I. Giardina and N. E. Leonard, “Starling flock networks manage uncertainty in consensus at low cost”, PLOS Computational Biology 9 (2013) e1002894.
- A. Attanasi, A. Cavagna, L. Del Castello, I. Giardina, T. S. Grigera, A. Jelić, S. Melillo, L. Parisi, O. Pohl, E. Shen and M. Viale, “Information transfer and behavioural inertia in starling flocks”, Nature Physics 10 (2014) 691–696.
- M. Nourian, P. E. Caines and R. P. Malhamé, “Mean field analysis of controlled Cucker–Smale type flocking: linear analysis and perturbation equations”, Proceedings of the 18th IFAC World Congress (2011) 4471–4476.
The simulations and every number in the text are computed by the scripts archived with this post, from results saved once.
Interested in applying these ideas to your work? Get in touch.