Congregating and physical stimulation trigger swarming: desert locusts
Solitary forms of desert locusts transform into those that swarm when environmental conditions force the locusts to congregate in groups, increasing physical stimulation that sets off a metabolic and behavioral cascade.
"The desert locust is especially destructive, but like other locusts it lives a sort of Jekyll and Hyde existence. For much of the time, it is a harmless grasshopper, living a solitary life, doing no harm to agriculture, and laying eggs that hatch into fresh generations of normal grasshoppers, wingless at first but gradually developing wings as they mature.
"If environmental conditions confine these grasshoppers into concentrated breeding sites, however, a disturbing transformation occurs. The juvenile grasshoppers begin forming groups. Then, groups close to one another combine to form ever-larger congregations, and eventually an immense 'army' is produced. These gregarious yellow grasshoppers develop longer-than-normal wings, enabling them to fly farther and faster. Once airborne, they move through the skies in vast clouds, guided by the Sun and wind, seeking food and able to fly across a continent to find it." (Shuker 2001:73)
"Desert locusts, Schistocerca gregaria, show extreme phenotypic plasticity, transforming between a little-seen solitarious phase and the notorious swarming gregarious phase depending on population density. An essential tipping point in the process of swarm formation is the initial switch from strong mutual aversion in solitarious locusts to coherent group formation and greater activity in gregarious locusts. We show here that serotonin, an evolutionarily conserved mediator of neuronal plasticity, is responsible for this behavioral transformation, being both necessary if behavioral gregarization is to occur and sufficient to induce it. Our data demonstrate a neurochemical mechanism linking interactions between individuals to large-scale changes in population structure and the onset of mass migration." (Anstey et al. 2009:627)
Learn more about this functional adaptation.