When minds align: A neural basis for flocking

Lisa Lock
scientific editor

Robert Egan
associate editor

When animals move together in flocks, herds, or schools, neural dynamics in their brain become synchronized through shared ways of representing space, a new study by researchers from the University of Konstanz (Germany) suggests. The findings challenge the conventional view of how collective motion arises in nature.
Flocking animals, such as hundreds of birds sweeping across the sky in unison, are a mesmerizing sight. But how does their collective motion—seen in many species, from swarming locusts to schooling fish and flocking birds—arise?
Mohammad Salahshour and Iain Couzin from the Center for the Advanced Study of Collective Behavior (CASCB) at the University of Konstanz and the Max Planck Institute of Animal Behavior have developed a novel theoretical framework that integrates neurobiological principles to upend long-held assumptions about how flocking behavior emerges in nature.
In a recent article in Nature Communications they demonstrate that flocking does not require individuals to rely on rigid behavioral rules, as is typically assumed. Instead, it can arise naturally from a simple and widespread neural architecture found across the animal kingdom: the ring attractor network.
A paradigm shift in understanding collective motion
In the new model, flocking arises because neural activity in each animal becomes linked through perception: Every individual processes its surroundings using a ring attractor—a circular network of neurons that tracks the direction toward perceived objects in space. This way, the animal can maintain bearings toward others relative to stable features in the environment. The researchers found that when many such individuals interact, their neural dynamics synchronize, giving rise to spontaneous alignment and collective movement.
This means that coordinated motion can emerge directly from navigational processes in the brain, challenging decades of theory. Since the 1970s, scientists have believed that the mesmerizing, synchronized movements of animal groups result from individuals following behavioral "rules of thumb"—such as aligning with neighbors, avoiding collisions, and staying close. While these rules could replicate flock-like patterns in computer models, they failed to capture how real animals perceive and process their surroundings.
The new framework shows that collective motion emerges when individuals represent the directions of others relative to stable features in their surroundings—a world-centered, or allocentric, perspective. This mechanism underlies what the authors describe as "allocentric flocking."
One mechanism, a multitude of collective behaviors
Crucially, the ring attractor network does not just enable basic flocking, but it can also generate a wide range of collective behaviors—from sudden expansions to smooth, coordinated turns. Empirical studies on fish and locust swarms responding, seemingly effortlessly, to their surroundings, support the ideas of the new model. "It's an elegant solution," says Salahshour. "Instead of needing a new set of rules for every behavior, animals rely on a flexible, built-in system that creates complexity from simplicity."
But animals need not rely on a single way of representing space. They can switch between an allocentric (world-centered) view—the one where bearings are encoded relative to stable features in the environment—and an egocentric (body-centered) view—where directions are represented relative to the animal's own orientation, instead.
In simulations of the new model, rapid switching between these two modes of representation improved coordination and stability, combining the advantages of both: The allocentric view supports global alignment, while the egocentric view enables individuals to respond to nearby neighbors and avoid collisions.
"This flexibility is the secret to their adaptability," explains Couzin. "The brain doesn't choose one system over the other. It uses both to navigate the dynamics of a moving swarm."
A wide range of implications—from social evolution to swarm robotics
The finding that complex group movements can emerge naturally from basic navigation skills already encoded in the brain's ring attractor networks indicates that no specialized neuronal circuits are required. This further suggests that collective behaviors may have evolved easily from a universal neural mechanism already present in solitary ancestors. Allocentric flocking bridges the gap between brain and behavior, revealing how individual cognition gives rise to collective intelligence and how order emerges from interaction—not only in animals, but potentially in future robotic and artificial systems.
By linking biological and artificial neural networks, the framework opens new possibilities for swarm robotics, for example, where robots could coordinate dynamically—without GPS or central control—by mimicking the brain's dual navigation system. Furthermore, the framework is adaptable and allows the integration of features such as learning, collective sensing, and decision-making. More importantly, it provides a fresh perspective on collective motion, viewing it as the natural outcome of interacting minds sharing a common representation of space.
More information: Mohammad Salahshour et al, Allocentric flocking, Nature Communications (2025).
Journal information: Nature Communications
Provided by University of Konstanz