Rome is famous for its huge flocks of starlings that swerve through the evening sky as if directed by a collective intelligence. While these spectacular displays have fascinated Romans since ancient times, they have yet to be described effectively by a mathematical model.

Now physicists in Italy have analysed 3D photographs of the Eternal City's famous flocks using techniques borrowed from statistical mechanics. They found that a change in direction of one bird can affect the behaviour of all its companions – regardless of the size of the flock. This, argue the physicists, ensures a maximal response to environmental perturbations such as attacks by predators.

The work is part of an international collaboration between biologists, ornithologists and physicists called StarFlag, which aims to understand the rules of collective animal behaviour.

"Although it is possible to construct models that reproduce flocking behaviour, typically these are not based on an empirical analysis of observational data," explains StarFlag member Irene Giardina, from Istituto Sistemi Complessi, Consiglio Nazionale delle Ricerche (CNR). "We felt the scientific dialogue between theory and experiment was missing."

Bird watching in 3D

Even with the latest digital cameras and image-processing software, analysing flocks of birds is no easy task. In order to collect 3D data of the birds, the team used stereoscopic photography. This in itself presented a challenge. "Imagine the difficulty of taking high-resolution photos of thousands of far-away objects that are continually moving," says Andrea Cavagna, also a physicist at CNR. "Now imagine doing this simultaneously with two fixed cameras you can't move. Once we were set up, we could only fish in one place."

You have two pictures, both essentially full of black dots, and you have to tell who is who Andrea Cavagna, CNR

The biggest obstacle, however, was matching data from both cameras. "You have two pictures, both essentially full of black dots, and you have to tell who is who," says Cavagna. "This problem has arguably held up the entire field for 50 years." By approaching the issue as an optimization problem, the scientists were able to develop algorithms based on statistical physics, and successfully match thousands of birds.

The result is a large data set describing the motions of individual birds, which was then studied using the mathematics of statistical physics to quantify the interactions among the starlings. Previous flocking models had assumed that an individual bird only interacts with others within a certain radius, but the Italian team found that an individual interacts with a fixed number of nearest neighbours, regardless of the distance to those neighbours. This means that information about the change of direction of any individual is quickly shared throughout the entire flock, and its transmission is not limited by a fundamental distance scale.

The critical point

This "scale invariant" correlation is significant because it is indicative of critical behaviour that occurs at a phase transition – when a material spontaneously transforms from being solid to liquid, for example. At a critical point, the smallest of perturbations can push the system into either one of the two states. In most physical systems, a critical point is reached by changing an external parameter, such as temperature. Cavagna and colleagues speculate that for the birds to flock at a critical point, the relevant external parameter must be evolutionarily hard-wired into the birds' behaviour to help the creatures avoid predators.

Frank Heppner, an ornithologist from the University of Rhode Island in the US, finds the work of the physicists "remarkable". He points out, however, that starlings typically do not fly in the spectacular formations seen at sunset at Rome. "Although it is absolutely legitimate to ask 'How do they do it?', an equally interesting point from a biological perspective is, 'Why don't they do it more often, and why do few bird species do it?'"

Cavagna acknowledges that, as well as contributing to the understanding of collective animal behaviour, his team has a lot to learn from biologists. He told physicsworld.com that he now hopes to apply its methodology to other members of the animal kingdom, such as insects.

The work is described in Proceedings of the National Academy of Sciences.