  Many animals in their natural habitat exhibit collective motion and form
complex patterns to tackle environmental difficulties. Several physical and
biological factors, such as animal motility, population densities, and chemical
cues, play significant roles in this process. However, very little is known
about how sensory information interplays with all these factors and controls
the dynamics of collective response and pattern formation. Here, we use a model
organism, Caenorhabditis elegans, to study the direct relation between oxygen
sensing, pattern formation, and the emergence of swarming in active worm
aggregates. We find that when thousands of animals gather on food,
bacteria-mediated decrease in oxygen levels slowed down the animals and
triggers motility-induced phase separation. Three coupled factors bacterial
accumulation, aerotaxis, and population density act together and control the
dynamics of pattern formation. Through several intermediate stages, aggregates
converge to a large scale swarming phase and collectively move across the
bacterial lawn. Additionally, our theoretical model captures behavioral
differences resulting from the genetic variations and oxygen sensitivity.
Altogether, our study provides many physical insights and a new platform for
investigating the complex relationship between neural sensitivity, collective
dynamics, and pattern formation.
