1 Introduction

Collective behavior is ubiquitous in living organisms at all levels of complexity. An important type of collective behavior is the translocation of groups, known as collective motion (Krause et al. 2002). Here, we refer to collective motion as macroscopic, synchronized, or coordinated movement of individuals that arises from small-scale, local inter-individual interactions (Giardina 2008; Sumpter 2010; Vicsek and Zafeiris 2012). Collective motion is found in the context of foraging for food, shelter seeking, or predator evasion, but also in other, less clearly defined or recognized circumstances (Herbert-Read et al. 2017). As noted, it can be found in practically all phylogenetic groups, from single cells (Be’er and Ariel 2019; Schumacher et al. 2016) to humans (Barnett et al. 2016; Castellano et al. 2009; Faria et al. 2010; Helbing 2001), as well as in synthetic entities like simulated agents (Kennedy and Eberhart 1995), self-propelled inanimate particles (Bär et al. 2020), or motile robots (Dorigo et al. 2020).

More than three decades ago, the phenomenon of collective motion has been described as emergent and self-organizing (Ben-Jacob et al. 2000; Vicsek et al. 1995; Vicsek and Zafeiris 2012), i.e., the congruence of local interaction to macroscopic, group-level dynamics. The field has evolved into an active, interdisciplinary research field, comprising physicists and mathematicians, computer scientists, engineers, and biologists; all trying to identify principles that are fundamental to the self-organized emergent phenomenon and its intricate connection to movement and migration. The key questions that are common to collective motion research are related to the identification of interactions between the individual, the collective, and the environment and to understanding how these converge into coherent synchronized motion (e.g., Ariel and Ayali 2015; Bär et al. 2020; Couzin et al. 2005; Edelstein-Keshet 2001; Giardina 2008; Tadmor 2021; Vicsek and Zafeiris 2012).

These questions have attracted renewed interest in light of recent technological advances, in particular computer-vision based tracking methods. This has spurred intense experimental research of collective motion under controlled laboratory environment, which lent itself to quantitative analysis of individual and crowd movement. For example, automated individual tracking systems based on body-marks recognition or on miniature barcodes allow continuous and consistent simultaneous high-precision monitoring of all individuals in animal groups, in an attempt to decipher the intricate underlying interactions. In addition, new methods allow collecting data on the movements and interactions of multiple animals in their natural environmental setting. This facilitates testing interactions of the collective with complex environments.

Much of the progress that has been made in our understanding of the causes and consequences of collective motion has been gained by comparing experimental observations with mathematical and computational models. At the same time, ample theoretical work on collective motion includes a wide range of theoretical approaches, suggesting explanations for the emergence of collective motion, its robustness and evolutionary advantages (e.g., Ariel and Ayali 2015; Be’er and Ariel 2019; Carrillo et al. 2010; Degond and Motsch 2008; Giardina 2008; Ha and Tadmor 2008; Tadmor 2021; Toner et al. 2005; Wensink et al. 2012 and the references therein).

In general, modeling approaches can be categorized as either continuous models, written in terms of integro-differential equations, or discrete agent-based models (ABMs). Continuous models typically describe the coarse-grained density of animals and other system constituents as continuous fields, e.g., by coupled reaction-diffusion equations or, following a kinetic approach, by hydrodynamic or Boltzmann equations (Ben-Jacob et al. 2000; Carrillo et al. 2010; Degond and Motsch 2008; Edelstein-Keshet 2001; Ha and Tadmor 2008; Tadmor 2021; Toner et al. 2005; Wensink et al. 2012). One of the main drawbacks of continuous models is the difficultly of relating actual properties of individual animals (e.g., body shape and size, hunger, and other internal states) to specific details of the model (Edelstein-Keshet 2001). This is one of the reasons why much of the current theoretical work related to collective motion of real animal experiments comprise agent-based simulations, which are useful for generating the dynamics from the point of view of the individual animal (“Umwelt” in biology or “Lagrangian description” in physics). The dynamics in ABMs, also referred to as self-propelled particles (SPPs), are given by specifying the internal state of each animal, its interaction with others (conspecifics), and its interactions with the environment (Bär et al. 2020; Edelstein-Keshet 2001; Giardina 2008). However, such models are limited by the number of agents that can be simulated due to computational capacities (very far, for example, from the millions of individuals comprising a locust swarm or trillions of cells in a bacterial colony). In addition, they do not provide a macroscopic, or coarse-grained, description of the swarm dynamics as a whole, and additional mathematical tools may be needed to interpret the results. Accordingly, the theoretical modeling of coarse-graining ABMs is a highly challenging research topic (Carrillo et al. 2010; Degond and Motsch 2008; Ha and Tadmor 2008; Ihle 2011; Toner et al. 2005; Wensink et al. 2012).

One important aspect of collective motion research, experimental and theoretical alike, is that of the level of similarity between the individuals composing the group, also referred to as the group homogeneity. Collective motion requires consensus in the sense that individuals need to adjust their behavior according to conspecifics. In other words, it is expected that collectivity will result in some homogenization among the individuals forming the group. At the same time, the group dynamics should somehow be a function of its constituents, i.e., depend on the different traits of the individuals composing it. A group can be heterogeneous at many different levels, including permanent differences or transient ones (e.g., due to different interactions with the surroundings), as will be discussed in the following sections. This heterogeneity can have important consequences on collective motion, leading to distinct group properties and variability between different groups (del Mar Delgado et al. 2018; Herbert-Read et al. 2013; Jolles et al. 2020; Knebel et al. 2019; May 1974; Ward et al. 2018).

These general statements bring about ample open questions that are related to the cross-dependency between individual heterogeneity and collective motion (Giardina 2008; Sumpter 2010; Vicsek and Zafeiris 2012). For example, which traits of the individual are adjusted in order for it to become part of the synchronized group? On the other direction, it is not clear whether variability supports or interferes with collectivity, and under what circumstances is heterogeneity biologically favorable? One of the main goals of this review is to develop a general methodology for addressing these issues and its application to experiments. Deciphering the bi-directional interactions between individual and group properties is essential for understanding the swarm phenomenon and predicting large-scale swarm behaviors.

To this end, we begin with a review of the different sources of variability in biology, relevant to collective motion (Sect. 2). Section 3 describes the impact of variability on collective motion as observed in experiments. We will see that, while variability is typically a limiting factor for collectivity, in some cases it may enhance it. Moreover, reduced order is not always a disadvantage. Section 4 surveys the literature on modeling heterogeneous collective motion, providing a historical overview, spanning some 50 years of progress. A few examples comparing theoretical predictions with experiments will be discussed. We conclude in Sect. 5 with our own perspective on interesting directions for future research.

2 Sources of Variability in Nature

Variability is a key concept in biology. Whether structural, functional, or behavioral, variability among animals and within an individual along time is essential for adaptability to the environment and for survival. One important aspect in which variability plays a dominant role is in the context of collective behavior, in particular during movement. Both permanent and transient differences among and within animals may be instrumental in the dynamics and organization of the group, ranging from local interactions between conspecifics to macroscopic organization. In this section, we outline several biological sources of variability that affect collective motion.

2.1 Development as a Source of Variation

All animals change and develop during their lifetime. Ultimately, through this process, individuals go from immature early stages to being able to reproduce and give rise to surviving offspring. Yet, the degree of such changes differs greatly among taxa. As the time scale of developmental changes is typically longer than the characteristic time scale in which swarming occurs or is observed, groups that are composed of individuals at different developmental levels are intrinsically heterogeneous.

For example, insects can be classified into two major groups according to their ontogeny: Holometabola, in which the insect goes through an extreme metamorphosis during its development; and hemimetabola, in which the changes between immature and mature individuals are milder.

Holometabola insects go through several distinct life stages, differing in their anatomy and morphology, as well as in physiology and behavior: the larva (hatching from eggs), pupa and imago (adult insect). Among the Holometabola one finds many of the truly social (called eusocial) insects, i.e., insects that live in cooperative colonies such as bees and ants. Their collective behavior is complex, both on the inter-individual communication level and the exhibited behaviors.

Hemimetabola insects go through a series of larval stages. The basic anatomy and many features of the behavior of the larvae (or nymphs) and adults are rather similar (except for flight and reproduction related ones). Locusts are one of the prominent examples of hemimetabola insects exhibiting collective motion, notorious for forming swarms composed of millions of individuals. The non-adult (non-flying) insects migrate in huge marching bands. These often include nymphs of different developmental stages or different larval instars, thus introducing many aspects of variation to the group, for example, in body size, walking speed, and food consumption (Ariel and Ayali 2015). To the best of our knowledge, no research specifically addressed the influence of instar variance (i.e., swarms of nymphs at a mixture of developmental stages) upon the swarm’s dynamics.

Fish go through continuous development. They hatch from the egg into a larva state, characterized by the ability for exogenous (external) feeding. Next, fish go through juvenile phases, in which the body structure changes, and eventually mature into sexually active adult fish (the exact definition of these stages is ambiguous; see Penaz 2001). During this development, fish grow and change their behavior. The developmental level is critical to the formation of schools, as part of the behavioral change, which is highly relevant to the collective motion of the school or shoal. In particular, the level of attraction to conspecifics was shown to increase during juvenile development (Hinz and de Polavieja 2017).

Mammals show a very distinctive maturation that includes no metamorphosis. Offspring are born in rather small batches and are highly dependent on their mother for feeding and protection. As a result, collective behavior in mammals includes co-behavior of several generations at once. This inter-generational composition might be instrumental for understanding animal packs (Ákos et al. 2014; Leca et al. 2003; McComb et al. 2011; Strandburg-Peshkin et al. 2015, 2017) and human crowds (Barnett et al. 2016; Faria et al. 2010).

2.2 Transient Changes in the Behavior of Individuals

Rarely, if at all, will a moving animal maintain constant dynamics on the go. Such changes include speed, switching between moving and pausing, and more. When moving in a group, individual kinematic changes increase the propensity for variability within the group, and thus, essentially add noise to a synchronized collective. However, such temporal variations at the individual level may also contribute to the overall movement and success of group-level tasks (Viscido et al. 2004).

For example, locusts walk in a pause-and-go motion pattern (Ariel et al. 2014; Bazazi et al. 2012), i.e., they intermittently switch between walking and standing. The durations of walking and pausing bouts have different distributions: while walking bout durations are approximately exponentially distributed, pauses show an approximate power-law tail. This indicates that while the termination of walking bouts reflects a random, memory-less process (Reches et al. 2019), the termination of pauses is based on information processing with a memory (Ariel et al. 2014). What kind of information is being processed? Looking into the pause episodes of marching locusts, the termination of pauses was found to depend on the locusts’ social environment. Both tactile stimulation and visual inputs make a locust stop standing and engage in walking. Thus, when a locust is touched by another locust or alternatively is seeing locusts depart from its front visual field or appear at its rear, its probability to start walking increases. Moreover, as locusts rarely turn during a walking bout, the shift from standing to walking is crucial for directional changes in order to align with the crowd (Ariel et al. 2014; Knebel et al. 2021).

2.3 Environmentally Induced Variations

The behavior of a moving organism is affected by external conditions, including the physical habitat (Strandburg-Peshkin et al. 2017), the ecological niche (Ward et al. 2018) and the topology of the environment (Amichay et al. 2016; May 1974; Strandburg-Peshkin et al. 2015). Therefore, differences in environmental characteristics can also exert different constraints on collective motion, inducing inter-environment variability. For example, predation is an environmental factor that can shape the behavioral strategies of many organisms. The abatement of predation risk, e.g., through predator confusion and increased vigilance, was suggested as one of the dominant advantages of aggregation (Ioannou et al. 2012; Krause et al. 2002). Thus, this may be a major evolutionary pressure leading to collective animal motion. The relation between predation and collective motion was demonstrated in fish. For example, fish that are grown in high predation-risk environments showed higher group cohesiveness (Herbert-Read et al. 2017). This exemplifies how the ecological niche can dictate group dynamics by modulating local individual decisions.

2.4 Social Structure

The social environment is another factor that affects variance (Smith et al. 2016; Ward and Webster 2016). The level of disparity in social rank among individuals can vary depending on the society being a complete egalitarian one, or one based on an hierarchical structure (Ákos et al. 2014; Couzin et al. 2005; Garland et al. 2018; Jacoby et al. 2016; Leca et al. 2003; Lewis et al. 2011; Nagy et al. 2010; Smith et al. 2016; Strandburg-Peshkin et al. 2015; Watts et al. 2017). Below we discuss a few natural examples.

In clonal raider ants, a queen-less species in which each ant can reproduce by parthenogenesis (reproduction without fertilization), the size of the colony dictates the division of labor structure (an organizational regime in which individual ants are assigned to different tasks in the colony). If the colony is small, then each ant fulfills various tasks, both within and outside the nest. However, in large colonies, different ants occupy different roles (Ulrich et al. 2018).

Flocks of pigeons exhibit outstanding flight synchronization. The flock is organized through a hierarchical network, where different individuals have different influence on other pigeons. It is estimated that such hierarchical structure, rather than egalitarian alternatives, is more efficient for coordinated flight in small flocks (Nagy et al. 2010).

Many birds use thermals to climb up, thereby reducing their costly need to flap their wings. Yet, the use of thermals can differ between individuals, as was shown for white storks that form flocks with leader–follower relations (Flack et al. 2018). Leaders tend to explore for thermals, while the followers enjoy their findings. Yet, followers exit the thermals earlier than leaders, rise less, and must flap their wings more. Thus, leader–follower social relations combine with environmental factors. On the one hand, shared knowledge decreases variation, while on the other, different exploitation of resources increases it.

Social structure may go beyond a linear ranking scale. Indeed, the social network of relatedness and familiarities can influence the stability of swarm dynamics and the organization within it (Barber and Ruxton 2000; Barber and Wright 2001; Croft et al. 2008).

2.5 Inherent/Intrinsic Properties and Animal Personality

Inherent variability among individuals is, perhaps, what makes biological systems essentially different from ideal theoretical models. Each biological “agent” is unique and has its own properties. These can be anatomical features like body size or physiological parameters such as metabolic rate. Individuals may also have personal behavioral characteristics that are consistent across different contexts, also referred to as animal personality (Wolf and Weissing 2012). For example, properties such as boldness, aggressiveness, activity level, and sociability were considered as behavioral tendencies that make up an animal personality in a range of organisms, from insects to mammals (Gosling 2001). Such features induce differences in the behavior and decisions of individuals, which are influential in the formation of collective behavior.

For example, feral guppies show consistent variance in their boldness, activity level, and sociability (Brown and Irving 2014). However, the exploratory behavior of the groups they form was found to be independent of the average personality characteristics of its members. Nonetheless, low exploratory behavior did correlate with the activity score of the least active member in the group. Conversely, high exploratory behavior correlated with the sociality rank of the most social member (Munson et al. 2021). Therefore, extreme personalities of single individuals are critical for the entire group.

Body size is a parameter that covers many anatomical and physiological measurements, such as body mass, volume, and muscularity. These, of course, affect movement kinematics but also the relative impact of individuals on others. For example, the order within groups of schooling fish has been shown to reflect the heterogeneity of the member’s body size. Larger fish tend to occupy the front and edges of a school, while smaller ones populate the center and the back. Consequently, larger fish tend to have a higher influence on the group direction of movement (Jolles et al. 2020). Other experiments found different spatial distribution of body sizes within the swarm, depending on species (Romey 1997; Theodorakis 1989), suggesting that the effect of body size is coupled to other properties (Sih 1980).

2.6 Variability in Microorganisms

Microorganisms grow in nature in a variety of habitats, from aquatic niches and soil, to waste and within hosts. In much of these systems, several species, or variants of the same species, occupy the same niche, creating a heterogeneous population with a diverse range of interactions between them (Ben-Jacob et al. 2016). For example, Bacillus subtilis is a model organism used in swarm assays. Typical swarms of B. subtilis form a multilayered colonial structure composed of billions of cells. Grown from a single cell, colonies become a mixed population of two strikingly different cell types. In one type the transcription factor for motility is active, and in the other one motility is off and the bacteria are placed in long chains of immobile cells (Kearns and Losick 2005). Cell population heterogeneity could enable B. subtilis to exploit its present location through the production of immobile cells as well as to explore new environmental niches through the generation of cells with different motility capabilities, resistance to harmful substances, and response to chemical cues (Kearns and Losick 2005).

Multispecies communities cooperate and at the same time compete in order to survive harsh conditions (Ben-Jacob et al. 2016). Examples of experimental studies include biofilms (Nadell et al. 2016; Rosenberg et al. 2016; Tong et al. 2007), plant roots (Stefanic et al. 2015), neighboring colonies of Bacillus subtilis forming boundaries between non-kin colonies, swarming assays (showing either mixing or population segregation depending on species) (Tipping and Gibbs 2019), mixtures of motile and non-motile, antibiotic resistant species (Benisty et al. 2015; Ingham et al. 2011), and other collectively moving bacteria (Zuo and Wu 2020). In other works, it was shown that species diversity can lead to a non-transitive symbiosis in a “rock-paper-scissors” manner that leads to stable coexistence of all the species (Kerr et al. 2002; Reichenbach et al. 2007). Exploitation competition can lead to growth inhibition when one bacterial species changes its metabolic functions (Hibbing et al. 2010).

3 Experiments with Heterogeneous Swarms

Extensive experimental research has been devoted to understanding the effect of variability among individuals on the group’s collective behavior—ranging from bacteria to primates (see Ben-Jacob et al. 2016; del Mar Delgado et al. 2018; Gosling 2001; Herbert-Read et al. 2013; Jolles et al. 2020; Ward and Webster 2016; Wolf and Weissing 2012 for recent reviews, and Dorigo et al. 2020 for investigation of heterogeneity in the context of swarm robotics). Indeed, it has been suggested that the inherent differences among members of the group can translate into distinct group characteristics (Brown and Irving 2014; Jolles et al. 2018; Knebel et al. 2019; Munson et al. 2021; Strandburg-Peshkin et al. 2017). Namely, different groups composed of individuals with distinctive features may adopt different collective behaviors. However, the interactions between variability in specific aspects of the individuals’ behavior and group-level processes are complex and bi-directional. This leads to a practical difficulty in distinguishing between the inherent variability between individual features and the results of their interaction with the crowd. We stress that we focus on the interplay between variability and collective motion, not on other forms of collectivity, for example, shared resources or decision making.

Surprisingly, despite extensive research on the effect of heterogeneity on collective motion, general conclusions are scarce and simplistic. In some cases, the effect of heterogeneity is subtle and does not determine the movement of the group (Brown and Irving 2014). However, three main effects are generally accepted: First, collectivity reduces the inherent variability between individuals (Knebel et al. 2019; Planas-Sitjà et al. 2021). This is not surprising, as individuals are exposed to similar “averaged-out” environments. Second, heterogeneity quantitatively reduces order and synchronization (Jolles et al. 2017; Kotrschal et al. 2020; Ling et al. 2019). Note that reduced order is not necessarily disadvantageous. For example, it can assist in collective maneuvering around obstacles (Feinerman et al. 2018; Fonio et al. 2016; Gelblum et al. 2015) and enhance accurate sensing of the environment (Berdahl et al. 2013). Last, individual differences can determine the spatial organization within the swarm (Jolles et al. 2017). For example, faster individuals are typically at the front (Pettit et al. 2015).

Below, we focus on several examples, including a couple of exceptions going beyond these general conclusions.

3.1 Fish

Golden shiners are well known for their schooling behavior. In order to maintain group formation, individuals tend to stay at a small distance away from their closest neighbor, yet avoid proximity (approximately 1 body length (Katz et al. 2011)). They do so by adjusting their velocity according to the relative position and velocity of conspecifics. It has been found that fish swimming at higher speeds affect their neighbors to a greater extent. Thus, individual variation in speeds is instrumental in inter-fish interactions, serving as a key element in fish schooling (Jolles et al. 2017).

Guppy is a fish species with rather low shoaling behavior, in which different fish exhibit different collectivity tendencies. These tendencies, to some extent, pass from mothers to offspring. In a recent study (Kotrschal et al. 2020), selecting and breeding females who were swimming in high coordination with conspecifics led to increasingly higher collectivity scores. Therefore, individual tendencies to make appropriate social decisions might take role in the natural selection of swarming communities. Guppies also differ in individual shy-bold responses. It was shown that the composition of the small groups according to this trait affects foraging success (Dyer et al. 2009). In particular, groups that have bold fish find food faster. However, an all-bold school is not optimal as more fed fish are found in mixed groups. This observation was explained by the tendency of shy fish to follow bold ones and thus reach the food source immediately after them. Therefore, inter-individual heterogeneity can maximize groups’ ability to use resources.

Experiments with giant danio showed that temporal variability in the speed and polarity leads to the emergence of several preferred collective states (Viscido et al. 2004).

3.2 Mammals

The effect of social structure on collective movement of mammals has been explored in several species (Smith et al. 2016), including monkeys (Leca et al. 2003; Strandburg-Peshkin et al. 2015, 2017), dolphins (Lewis et al. 2011), and family dogs (Ákos et al. 2014).

For example, baboons live in groups of up to 100 individuals, exhibiting multiple forms of collective behaviors, including collective motion (Strandburg-Peshkin et al. 2015, 2017). Unlike other, smaller animals, Baboons are studied in their natural habitat, imposing constraints on the ability to perform highly controlled experiments. Recent experiments applied high resolution GPS tracking (Strandburg-Peshkin et al. 2015) and unmanned aerial vehicle photography (Strandburg-Peshkin et al. 2017) to reconstruct animal trajectories in the wild. Some degrees of variations within the packs were found. For example, when on the move, different individuals show different preferred positions (central or peripheral) within the pack (Farine et al. 2017). The structure of the group and its navigational decisions were also shown to be highly dependent on the physical characteristics of the habitat and thereby change depending on the environment.

3.3 Insects

When an ant comes across goods which are too heavy for it to carry alone, it recruits other ants for assistance. Once a team is gathered, its members engage in a complex process of cooperative transport of the good to the nest. During this process, ants either pull or lift the item, but do not push. Thus, they arrange around it, with individuals facing the direction of movement lifting, while the ones on the opposite side pulling (Gelblum et al. 2015). As turns and angular modifications take place, ants may change their relative position in respect to the movement direction and switch roles, resulting in transient roles. These variations are essential for steering maneuvers and successful navigation to the nest. As carrying ants have limited sensing ability of the environment, they are assisted by freely moving ants around them. The latter, which are more knowledgeable about the path back to the nest, intermittently attach themselves to the load and pull in the required direction. However, their influence on the group is limited for a few seconds, after which other freely moving ants join the steering (Feinerman et al. 2018; Gelblum et al. 2015). Overall, individuals with different realizations of the environment participate in the collective effort, introducing small, cumulative changes to the direction of motion.

A plague of locusts can involve millions of individuals. Yet, under lab conditions, even a small group of 10 locusts can exhibit collective motion when placed in a ring-shaped arena. In such experiments, the group shows a consistent tendency to walk in either clockwise or counterclockwise direction with considerable agreement among the individuals (Buhl et al. 2006; Knebel et al. 2019). Despite this general formation of marching, different groups show different kinematic properties (e.g., the fraction of time spent walking and speed). Interestingly, while the differences among groups are significantly high, within each group (i.e., among the individuals) the differences are low. This indicates that each group develops a distinctive internal dynamic with specific kinematic features that are, on one hand, unique to the group, while on the other side practiced by all group members similarly (see Fig. 1). In (Knebel et al. 2019), it was shown that the origin of both the intergroup heterogeneity and the intragroup homogeny is in the individual socio-behavioral tendencies: different animals have different propensity of joining a crowd of walking conspecifics. Thus, the specific composition of locusts grouped together determines the specific dynamic the group eventually develops.

Fig. 1
figure 1

Heterogeneity of locust swarms. Experiments with marching locust in a circular arena showed that locust groups developed unique, group-specific behavioral characteristics, reflected in large intergroup and small intragroup variance. (a) Picture of the experimental setup. (b) Data comprised three types: single animals in the arena, groups of 10 animals in the arena (real groups), and fictive groups constructed by shuffling the data of the real groups (shuffled groups). (c) Example kinematic results showing the median (ci) and inter quartile range (IQR) among the groups’ members (cii) in the fraction of time spent walking, the median (ciii) and IQR (civ) in walking speeds. While different groups show different kinematic properties, within each group (i.e., among the individuals) the differences are significantly lower. This indicates that each group develops a distinctive internal dynamic with specific kinematic features, which is, on one side unique to the group, and on the other side, practiced by all group members similarly. (d) Results from a simplified Markov-chain model with parameters that were either derived from experiments with real groups, the shuffled groups or homogeneous ones (same for all group members) equal to the average value of each simulated group (homogenized within groups), or the average of all simulated groups (homogenized across groups). (di) The median in each group. (dii) The IQR. Reproduced from Knebel et al. (2019)

Not only are locust swarms intrinsically heterogeneous, recent laboratory experiments found that the connection between the properties of individuals changes fundamentally during collective motion. In Knebel et al. (2021), the walking kinematics of individual insects were monitored before, during, and after collective motion under controlled laboratory settings. It was found that taking part in collective motion induced unique behavioral kinematics compared with those exhibited in control conditions, before and during the introduction to the group. These findings (see Fig. 2) suggest the existence of a distinct behavioral mode in the individual termed a “collective-motion-state.” This state is long lasting, not induced by crowding per se, but only by experiencing collective motion, and characterized by behavioral adaptation to a social context. It was shown that the “collective-motion-state” improves the group’s ability to maintain inter-individual order and proximity. Simulations verify that this behavioral state shortens the average time an animal rejoins the swarm if it departs from it (Knebel et al. 2021). Thus, different socio-environmental circumstances and experiences shape the behaviors of individuals to fit and strengthen the structure of the collective behavior.

Fig. 2
figure 2

Collective motion as a distinct behavioral state of the individual. (a) A schematic flow of the experimental procedure. The experiments comprised the following consecutive stages: (1) isolation for 1 h in the arena; (2) grouping for 1 h; and (3) re-isolation for 1 h. Each stage is characterized by a different internal state with unique kinematic characteristics. In particular, in each stage animals show different average walking bout and pause durations. (b) Agent-based simulations show the influence of different walking bout and pause durations on the collectivity parameters in simulated swarms. (bi) The regions in parameters space indicating the behavioral states. (bii) The order parameter (norm of the average), (biii) The average number of steps to regroup in a small arena (comparable to experimental conditions) and in a larger one (biv). Simulations show that these states may be advantageous for the swarm integrity, shortening the regrouping time if an animal gets separated from the swarm. Reproduced from (Knebel et al. 2021)

The existence of such a “collective-motion-state” is an extreme example of adaptable interactions that enhance a swarms’ stability. It suggests that collective motion is not only an emergent property of the group, but is also dependent on a behavioral mode, rooted in endogenous mechanisms of individuals.

3.4 Microorganisms

Self-organizing emergent phenomena bear critical biological consequences on bacterial colonies and their ability to expand and survive (Grafke et al. 2017; Zuo and Wu 2020). Hence, the properties of mixed swarms are of great significance to our understanding of realistic bacterial colonies.

We begin with a macroscopic point of view that studies the effect of mixed bacterial populations on the overall structure and expansion rate of the entire colony. To this end, we present here new experiments with mixed B. subtilis mutants with different cell lengths.Footnote 1 Figure 3 shows results obtained with mixed colonies of wild-type and one of three other mutants that vary in their mean length (but have the same width). To distinguish between the strains in a colony, the strains were labeled with a green or red fluorescence protein. Figure 3a is a global view of the colony, showing qualitatively the spatial distribution of the different strains (WT and long mutant) approximately 5 h after inoculation. Figure 3b shows the fraction (in terms of the surface coverage) of the mutant strain at the tip of the expanding colony. On their own, the colony’s expansion rate is independent of the cell shape, regardless of the substrate on which they are grown. However, in mixed colonies, results depend on the hardness of the substrate. On soft agar (left column), all bacteria can move easily and fast. As a result, the ratios between strains in the initial inoculum are same as the one obtained at the colony’s edge, indicating that all strains migrate at similar speeds with no apparent competition between them. On the other hand, movement on hard agar (right column) is slower, and the ratio between strains in the initial inoculum is different from the one obtained at the edge. In particular, strains that are either shorter or longer compared to the wild-type show a disadvantage. For example, in a mix of short cells and wild-type, the short cells do not make it to the edge at all unless their initial concentration is above 65%.

Fig. 3
figure 3

The macroscopic density distribution in a bacterial colony of Bacillus subtilis with a mixed population of cells with different lengths. (a) Fluorescent microscope image showing wild-type cells (∼7 μm length, green) and an extra-long mutant (∼19 μm length, red). The scale window size is about 1 cm. (b) The fraction of the mutant strain at the edge of the colony as a function of the fraction at the inoculum. On a soft, moist subtract, all cell types can move easily. As a result, the two populations are well-mixed on the macroscopic scale and both populations make it to the front of the colony, where nutrients are abundant. On a hard, dry subtract, wild-type cells spread faster compared to other mutants (either too short or too long) and the colony segregates into wild-type-rich and mutant-rich regions. Thus, the details of the dynamics and the interaction between the species and the environment determine the macroscopic state of the swarm

In a second example, Deforet et al. (Deforet et al. 2019) studied a mixed colony of wild-type Pseudomonas aeruginosa with a mutant that disperses ∼100% faster but grows ∼10% slower (possibly due to resources redirected to grow extra flagellum). Thus, their experiment tests the trade-off between growth and dispersal. Although a model predicts that in some cases, better growth rate may win over faster dispersal, all experiments showed the opposite, i.e., that getting first to the front of the colony (where nutrients are abundant) is the bottleneck for fast colony expansion.

The two experiments described above clearly show that the coupling between species competition and the environment results in complex macroscopic spatial patterns that is difficult to predict based on first principles.

Next, we concentrate on the microscopic properties of swarming bacteria. One of the main challenges in studying heterogeneous systems of microorganisms is in distinguishing between biological and physical interactions. Microorganisms belonging to different species and strains typically have many differences, ranging from mechanical properties such as cell size, different physical responses to external ques. (e.g., different effective drift-diffusion parameters) to species-specific metabolic processes. In order to untangle all these effects, Peled et al. (2021) focused on mixtures of same species swarms differing only in cell size.

Bacterial swarms are composed of millions of flagellated, self-propelled cells that move coherently in dynamic clusters forming whirls and jets. Dominated by hydrodynamic interactions and cell–cell steric forces, the characteristics of the individuals dictate the dynamics of the group (Be’er and Ariel 2019). Empirically, active cells tend to elongate prior to swarming, and their length (or rather aspect ratio) was shown to play a crucial role in determining their collective statistics, suggesting a length selection mechanism. In Ilkanaiv et al. (2017), it was shown that although homogeneous colonies of bacteria with different aspect ratios spread at the same speed, their microscopic motion differs significantly. Both short and long strains were moving slower, exhibiting non-Gaussian statistics; however, the wild-type, and strains that are close in size to the wild-type, were moving faster with Gaussian statistics. Overall, bacteria are thought to have adapted their physics to optimize the principle functions assumed for efficient swarming.

Surprisingly, introducing a small number of cells with a different length than the majority can have a significant effect on the dynamics of the swarm (Peled et al. 2021). The cooperative action of many short cells mixed with a few longer cells leads to longer spatial correlations (indicating a more ordered swarming pattern) and higher average cell speeds. Figures 4 and 5 show that a small number of long cells helps organizing the dynamics of the bacterial colony, with long cells acting as nucleation sites, around which aggregates of short, rapidly moving cells can form. Increasing the fraction of long cells (i.e., increasing heterogeneity), the average speed drops as the long cells become jammed, serving as a bottleneck for efficient swarming. The impact of long cells was reproduced in a simple model based on hydrodynamic interactions, indicating a purely physical mechanism behind the beneficial effects of a few long cells on spatial organization and motion of all cells in the swarm. To the best of our knowledge, this is a first example showing that heterogeneity can promote order and increase swarm speeds.

Fig. 4
figure 4

The microscopic density distribution in a bacterial colony of Bacillus subtilis with a mixed population of cells with different lengths. (a, b) The wild-type in red and the elongated cells in green. When the mixing ratio is about 50:50, the swarm is well-mixed. (c, d) Cohesive moving clusters (false-colored for illustration purposes). When the fraction of long cells is small, short cells cluster around elongated ones, moving together. The figures shows two such clusters in two consecutive snapshots, 0.3 s apart. We find that the ratio between the two populations determines the spatial distribution and the dynamics of the swarm. Reproduced from Peled et al. (2021)

Fig. 5
figure 5

Microscopic dynamics in a mixed bacterial swarm. (a, b) Experiments and (c, d) Agent-based simulations. (a, c) The average swarm speeds in heterogeneous populations with a small fraction of elongated cells (10%) as a function of the total area fraction. (b, d). The average swarm speeds in heterogeneous populations with a large fraction of elongated cells (90%). Surprisingly, introducing a small number of cells with a different aspect ratio than the majority increases swarm speeds. Reproduced from Peled et al. (2021)

4 Modeling Heterogeneous Collective Motion

Theory and simulations of active matter establish that heterogeneous systems of self-propelled agents show a range of interesting dynamics and a wealth of unique phases that depend on the properties of individuals. In accordance with the discussions above, researchers studied two main sources of variability. The first type assumes fixed properties (at least on the time scale of the dynamics of interest), for example, individuals with different velocities (Hemelrijk and Hildenbrandt 2011; McCandlish et al. 2012; Schweitzer and Schimansky-Geier 1994; Singh and Mishra 2020), noise sensitivity (Ariel et al. 2015; Benisty et al. 2015; Menzel 2012; Netzer et al. 2019), sensitivity to external cues (Book et al. 2017), and particle-to-particle interactions (Bera and Sood 2020; Copenhagen et al. 2016; Hemelrijk and Kunz 2005; Khodygo et al. 2019). It was found that the effect of heterogeneity ranges from trivial (the mixed system is equivalent to an average homogeneous one) to singular (one of the sub-populations dominates the dynamics of the group as a whole) (Ariel et al. 2015). The second type of heterogeneity refers to identical individuals whose properties change due to different local environments, for example, local density of conspecifics (Castellano et al. 2009; Cates and Tailleur 2015; Helbing 2001) or topology of the environment (Berdahl et al. 2013; Khodygo et al. 2019; Shklarsh et al. 2011; Torney et al. 2009). Such differences may have a significant effect on the ability of swarms to organize and, in particular, navigate towards required goals (Berdahl et al. 2013; Khodygo et al. 2019; Shklarsh et al. 2011; Torney et al. 2009). Coupling between the different populations and heterogeneous environments may lead to the evolution of territories (Alsenafi and Barbaro 2021). Note that here, we do not consider uniform distribution of obstacles (e.g., Chepizhko et al. 2013; Rahmani et al. 2021) as heterogeneity.

4.1 Continuous Models

To the best of our knowledge, the first theoretical works on the effect of heterogeneity on collective motion approached the question from the point of view of population dynamics in heterogeneous environments. In the mid-1970s, Comins and Blatt (1974), Roff (1974a, b), Roughgarden (1974) and subsequently Levin (1976) studied the dynamics of a finite number of migrating populations using continuous models. Local dynamics was modeled, for example, by logistic growth, while migration was taken into account by a linear diffusion (or a discrete analogue). The biological motivation for this point of view is migration in a patchy environment. Patches (or niches) were characterized by different parameters, for example, carrying capacities. One of the main conclusions of these studies was that movement can have a stabilizing effect on the dynamics, for example, suppressing oscillations in predator–prey models (Comins and Blatt 1974).

At the same time, Horn and MacArthur (1972), followed by Segel and Levin (1976), and Gopalsamy (s1977) considered continuous two-species spatial models. Again, movement was modeled using diffusion. The main goal was to study the effect of migration on the stability of communities. Conditions, in which initially mixed species evolve into spatially segregated regions were found particularly interesting. See Kareiva (1990) for a review of this perspective. The coupling between two-species competition and heterogeneous environments was studied by Dubois, motivated by plankton populations (Dubois 1975) and McMurtrie (1978). They study different forms of models with non-uniform dispersal and drift. For example, McMurtrie (1978) propose a one-dimensional (1D) model involving a two-species predator–prey system of the form

$$ { \begin{array}{l}\displaystyle\frac{\partial n}{\partial t}= an\left(1- bp\right)+\mu \frac{\partial^2n}{\partial {x}^2}+\alpha \operatorname{sgn}(x)\frac{\partial n}{\partial x}\\ {}\displaystyle\frac{\partial p}{\partial t}= dp\left(-1+ cn\right)+\nu \frac{\partial^2p}{\partial {x}^2}+\beta \operatorname{sgn}(x)\frac{\partial p}{\partial x},\end{array}} $$

where n(t, x) and p(t, x) are the density of predators and prey, respectively. The constants a, b, c, and d are the standard Lotka–Volterra parameters, μ and ν are diffusion constants. The terms involving α and β describe preferential dispersal towards the center of the habitat.

Motivated by works on single species spatial distribution patterns, as well as analogue models of gas flow in porous medium, (in the 1980s) modeling shifted towards nonlinear reaction-diffusion equations in which the flux term depends on the local concentration (Aronson 1980; Namba 1980, 1989). Thus, the description inherently takes into account a heterogeneous environment, as movement is density dependent. Two-species versions were also explored (Bertsch et al. 1984; Mimura and Kawasaki 1980; Namba and Mimura 1980; Shigesada et al. 1979; Witelski 1997). The main goals were again to classify under which conditions populations mix or segregate. For example, Mimura and Kawasaki (1980) study a 1D predator–prey model with nonlinear self and cross-diffusion of the form

$$ { \begin{array}{l}\displaystyle\frac{\partial n}{\partial t}= an\left(1- bp- en\right)+\frac{\partial^2}{\partial {x}^2}\left[\left(\alpha +{\beta}_1p\right)n\right]\\ {}\displaystyle\frac{\partial p}{\partial t}= dp\left(-1+ cn+ fp\right)+\frac{\partial^2}{\partial {x}^2}\left[\left(\alpha +{\beta}_1n\right)p\right].\end{array}} $$

Traveling wave solutions (Gurtin and Pipkin 1984) later (in the 1990s) proved to be important to modeling of expanding bacterial colonies (Ben-Jacob et al. 2000).

New forms of models were derived by coarse-graining agent-based models. The first approaches, such as those of Toner-Tu (Toner et al. 2005) and Swift-Hohenberg (Wensink et al. 2012) applied phenomenological models that were based on physical principles and the underlying symmetries in collective systems. More rigorous approaches derived coarse-grained equations of agent-based models under appropriate limits (e.g., Carrillo et al. 2010; Degond and Motsch 2008; Ha and Tadmor 2008). Much research involves density dependent parameters (Frouvelle 2012), in particular speed dependence (see Cates and Tailleur 2015; Degond et al. 2017) and the references therein. For example, derived from microscopic considerations, Cates and Tailleur (2015) consider the stochastic partial differential equation

$$ { \begin{array}{l}\displaystyle\frac{\partial \rho \left(t,x\right)}{\partial t}=-\nabla \cdot J\\ {}J=-D\left(\rho \right)\nabla \rho +V\left(\rho \right)\rho +\sqrt{2D\left(\rho \right)\rho}\dot{W},\end{array}} $$

where \( \dot{W} \) is white noise and V(ρ), D(ρ) are density dependent drift-diffusion coefficients, typically taken as linearly decreasing in ρ. The main conclusion is that density dependent motility may lead to the so-called motility induced phase separation, in which the system self-segregates into coexisting low-density/high-speed that are characterized by high-density/low-speed regions. Density dependent speeds are also fundamental to understanding traffic and pedestrian dynamics through the so-called fundamental diagram, relating the flux of individuals to the local density (Castellano et al. 2009; Helbing 2001).

Similarly, considerable research has been devoted to continuous descriptions of binary self-propelled particle mixtures. Models included variability in motility (Book et al. 2017; Deforet et al. 2019; Navoret 2013), noise (Menzel 2012), strength of alignment (Yllanes et al. 2017), cross interactions between species (Burger et al. 2018; Chertock et al. 2019; Di Francesco and Fagioli 2013), or cross-diffusion (Alsenafi and Barbaro 2021; Book et al. 2017; Carrillo et al. 2018, 2020; Di Francesco et al. 2018). The results vary significantly in the level or rigor. Again, a key question of interest is the effect of heterogeneity on the order-disorder transition and spatial phase segregation. For example, Carrillo et al. (2018) extend previous models and study a nonlinear and non-local model with cross-diffusion of the form

$$ { \begin{array}{l}\displaystyle\frac{\partial n}{\partial t}=\nabla \cdot \left[n\nabla \left({W}_{11}\ast n+{W}_{12}\ast p+\upepsilon \left(n+p\right)\right)\right]\\ {}\displaystyle\frac{\partial p}{\partial t}=\nabla \cdot \left[p\nabla \left({W}_{22}\ast p+{W}_{21}\ast n+\upepsilon \left(n+p\right)\right)\right],\end{array}} $$

where W ij are interaction terms, typically of power-law form (e.g., Lennard-Jones), characteristic functions (steric repulsion), or exponential (Morse potential), ϵ > 0 is the coefficient of cross-diffusion (Carrillo et al. 2018), and * denotes the convolution operator.

4.2 Agent-Based Models

With the availability of large-scale computer simulations and the success of newly suggested simplified ABMs (Giardina 2008; Vicsek and Zafeiris 2012), much of the theoretical research on collective motion, especially models that study concrete biological systems, shifted towards discrete models. Most works are either based on the three zones model of Aoki and Reynolds (Aoki 1982; Reynolds 1987) or the Vicsek model (Vicsek et al. 1995). In the three zones model, each agent is either repelled, aligned, or attracted to conspecifics with fixed interaction ranges. Typically, the repulsion range, which describes collision avoidance, is shortest. The attraction range, allowing long range group cohesion, is the largest. In between, agents align their direction of movements according to the local average. In contrast, the Vicsek model only has local alignment, which is countered by added angular noise. To be precise, N particles with positions x i ∈ ℝ2 and velocity v i ∈ ℝ2 move with a fixed speed |v i| = v 0 in a 2D rectangular domain with periodic boundaries. At each simulation step, each agent aligns with the average direction of movement of all particles within a fixed interaction range. Then, the average direction is perturbed randomly. The equations of motion at each simulation step are

$$ {\displaystyle \begin{array}{l}{x}_i\leftarrow {x}_i+{v}_i\\ {}{v}_i\leftarrow {\varTheta}_{\phi_i}\frac{\sum_{\left\{j:\left|{x}_i-{x}_j\right|\le R\right\}}{v}_i}{\left|{\sum}_{\left\{j:\left|{x}_i-{x}_j\right|\le R\right\}}{v}_i\right|}{v}_0\end{array}}, $$

where ϕ i are independent random variables, uniformly distributed in the segment [−σπ, σπ], 0 ≤ σ ≤ 1. The main prediction of this model is the characterization of two regimes (or phases), depending on the noise level σ and the average density—a disordered phase, in which the average velocity agents goes to zero in the limit of an infinite system, and an ordered phase in which it does not (Vicsek et al. 1995).

Context-dependent interactions within the three-zone model were first studied by Torney et al. (2009). The main idea was that individuals weigh their own information regarding the environment and the local movement of conspecifics dynamically, according to local conditions or available information. In Shklarsh et al. (2011), a particular simple adaptable 2D model studied the rate in which a collection of SPPs can reach a maximum of a fixed external potential c(x). The model, which is essentially a three zones model, assumes that in each simulated step, the direction in which an agent moves, denoted \( {\hat{d}}_i \), is a weighted sum of two terms: \( {\hat{u}}_i \), denoting group interaction following the three zones model, and \( {\hat{v}}_i \), which is the particle velocity at the previous step

$$ {\displaystyle \begin{array}{l}{\overline{d}}_i\leftarrow {\hat{u}}_i+w{\hat{v}}_i\\ {}{\hat{d}}_i={\overline{d}}_i/\left|{\overline{d}}_i\right|\end{array}}. $$

The main idea of Shklarsh et al. (2011) is to make the weight w a function of the environment c(x). Denoting by Δc i(t) the difference in c(x) between two consecutive steps of agent i, they take

$$ {w}_i(t)=\left\{\begin{array}{cc}1& \left|\varDelta {c}_i(t)\right|>\mathrm{const}\\ {}0& \mathrm{otherwise}\end{array}\right.. $$

In words, the external cue shuts down if the gradient in c(x) in the direction of movement is too small. This strategy proved efficient in sensing the environment (Berdahl et al. 2013; Shaukat and Chitre 2016). Other examples of adaptable models, e.g., density dependent speeds (Mishra et al. 2012), were found to be sufficient to induce phase separation between dense and dilute fluid phases (Cates and Tailleur 2015) and to increase the stability of swarms (Gorbonos and Gov 2017; Ling et al. 2019).

Over the past decade, collective motion of binary self-propelled particle mixtures has been extensively researched theoretically using agent-based models. The effect of fixed variability (i.e., non-adaptable) in motility (Agrawal and Babu 2018; Benisty et al. 2015; Copenhagen et al. 2016; Khodygo et al. 2019; Kumar et al. 2014; McCandlish et al. 2012), weight of alignment interactions (del Mar Delgado et al. 2018; Knebel et al. 2021; Kunz and Hemelrijk 2003; Peled et al. 2021; Soni et al. 2020), effective noise (Ariel et al. 2015; Guisandez et al. 2017; Menzel 2012), and interaction range (Farine et al. 2017) were studied. The main questions considered are the effect of heterogeneity on the ability of swarms to form ordered phases (Agrawal and Babu 2018; Ariel et al. 2015; Benisty et al. 2015; Copenhagen et al. 2016; del Mar Delgado et al. 2018; Kumar et al. 2014; Peled et al. 2021; Soni et al. 2020), the type of the order-disorder transition (first or second order) (Guisandez et al. 2017), spatial segregation of the two species (Copenhagen et al. 2016; Khodygo et al. 2019; McCandlish et al. 2012), or the organization within the swarm (Farine et al. 2017; Hemelrijk and Hildenbrandt 2008, 2011; Hemelrijk and Kunz 2005; Peled et al. 2021), and the rate of convergence towards the ordered steady state (Knebel et al. 2021). Not surprisingly, and as confirmed experimentally (see the previous section), heterogeneity typically lowers order. If the variation between individuals is sufficiently large, the ordered phase may either disappear completely or, alternatively, the system may segregate into coexisting, spatially separated phases. As mentioned before, low order has its own benefits—and perhaps reducing order by heterogeneity is not a bug but a feature.

For example, Ariel et al. (2015) study, using simulations, a variation of the Vicsek model with two populations that are distinguished by the amount of noise they have. In the original Vicsek model, the noise level σ is the same for all particles. In Ariel et al. (2015), it is assumed that a fraction f of the agents has noise level σ 1, while the rest have σ 2. In order to quantitatively compare homogeneous and heterogeneous systems, one needs to identify the appropriate statistics (corresponding to the relevant thermodynamic variables). Following Porfiri and Ariel (2016) and Ariel et al. (2015), the circular mean of distribution of the random turns plays the role of (1 minus) an effective temperature, in the sense that it determines the order parameter and phase (here, an ordered phase means that the mode in the distribution of the instantaneous order parameter is not zero). Moreover, it satisfies a fluctuation–dissipation relation (Porfiri and Ariel 2016). In heterogeneous systems, the two sub-populations interact non-additively: Within a large range of parameters, the dynamics of the system can be described by an equivalent homogeneous one with the same average temperature fT 1+(1-f) T 2. However, if one of the sub-populations is sufficiently “cold,” i.e., σ 1 or σ 2 (or equivalentrly, the effective temperaturese T 1 or T 2) is below a threshold, it dominates the dynamics of the group as a whole. Specifically, it determines the phase and order parameter of the mixed system, see Fig. 6 for a phase diagram. Interestingly, this phenomenon does not occur in mean-field random-network models of collective motion, but depends on emergence of spatial heterogeneities (Netzer et al. 2019).

Fig. 6
figure 6

Simulation results for a two-species Vicsek model with distinct noise levels. A heterogeneous system with 50,000 particles, half with effective temperature (the circular mean of random turns) T 1, and half with effective temperature T 2. (a) The phase diagram. Red dots indicate an ordered phase, while blue dots are disordered. (b) The difference between the observed temperature (1-order parameter) and the average effective temperature (T 1 + T 2)/2. If T 1 or T 2 is small enough, level curves are close to horizontal or vertical lines. Otherwise, they are diagonal lines, indicating a constant temperature. The dashed curve shows the homogeneous T 1 = T 2 line. The dotted line is the constant temperature curve passing through the homogeneous critical temperature. Reproduced from Ariel et al. (2015)

Finally, ABMs were used to study the effect of a social structure of the ability of swarms to synchronize. Leadership was studied in Couzin et al. (2005) and Garland et al. (2018). In Xue et al. (2020), a hierarchical swarm model in the spirit of the Vicsek model showed that introducing a simple hierarchical structure (via a linear ordering of agents) not only shifts the order–disorder phase transition, but also changes its type (first or second order).

4.3 Specific Examples: Locust

A few groups attempted to address the dynamics of locust swarms theoretically. Topaz et al. (2012) studied a continuous binary-system model, describing the density of solitarious and gregarious locusts. The main assumption is that individuals can switch between phases (solitarious and gregarious) with rates that depend on the overall local density. Thus, while the sum of the two densities is a conserved quantity, satisfying a continuity equation, each density on its own does not. The difference between the phases is in its interaction with conspecifics: while solitarious individuals are repelled from other locusts, gregarious individuals are attracted. The interaction term is non-local. The model is used to study band formation. In particular, numerical solutions reveal transiently traveling clumps of gregarious insects.

Another binary-system model, taking only gregarious locust into account, studied the impact of the pause-and-go walking pattern of locust on the spatial distribution of marching bands. In Bernoff et al. (2020), the authors study both an ABM and a simple continuous realization of a two-species model describing stationary and moving insects. Heterogeneous environments are also taken into account in the form of position dependent resource consumption rate. One of the main new assumptions is that the rate at which locusts transition between moving and stationary (and vice versa) is enhanced (diminished) by resource abundance.

Lastly, a recent work (Georgiou et al. 2020) combines the two approaches, studying the dynamics of solitarious and gregarious insects in a heterogeneous environment in terms of the available food resources.

4.4 Specific Examples: Microorganisms and Cells

Previous modeling approaches of heterogeneous active matter or self-propelled particles have been used, with some levels of success to study several aspects of mixed bacterial communities (Blanchard and Lu 2015; Book et al. 2017; Deforet et al. 2019; Kai and Piechulla 2018; Kumar et al. 2014). For example, on the macroscopic, colony-wide scale, continuous models of mixed bacterial colonies with different motility and growth rates show the balance between reproduction rates and the importance of moving towards the colony edge, where nutrients are abundant (Book et al. 2017; Deforet et al. 2019). Peled et al. (2021) studied a two-species agent-based model (with different cell-length) that is derived from the balance of forces and torques on each cell. The model follows the approach of Ariel et al. (2018) and Ryan et al. (2011), assuming each bacterium is essentially a point dipole where the size is incorporated through an excluded-volume potential and the shape is accounted for in the interaction of the point dipole’s orientation with the fluid. The model reproduces the speed dependence of both cell types at the entire range of densities tested. However, in contrast with experiments, the simulated spatial distributions of short (wild-type) and long cells are not correlated. Therefore, hydrodynamic models of swarming bacteria fall short at describing the full breadth of the dynamics.

A detailed, mixed population, agent-based 2D model that includes both excluded volume and hydrodynamic interactions was studied by Jeckel et al. (2019). In this model, agents are elongated ellipsoids with a distribution of lengths, motility, and friction coefficients, as observed experimentally for different phases during the growth of bacterial colonies. The model successfully reproduces the motile phases observed experimentally in an expanding colony of swarming B. subtilis.

Finally, we briefly discuss collective cell migration, which plays a pivotal role in a range of biological processes such as wound healing, cancer invasion and development (Schumacher et al. 2016, 2017). Heterogeneity, both between cells and in the environment (typically non-uniform tissues) has been identified as a key parameter in the regulation and differentiation of cells, for example, in development of tips vs. stalks (Rørth 2012). Of course, cells are not organisms. However, the theory of collective cell migration shares many of the universal properties of other collective motion phenomena (Chauviere et al. 2007; Gavagnin and Yates 2018; Szabo et al. 2006), for example, a kinetic phase transition from a disordered to ordered state (Szabo et al. 2006), spatial segregation and “task specification” (Rørth 2012).

5 Summary and Concluding Remarks

Variability is inherent to practically all groups of organisms. As discussed above, the sources of variations among members of a group are diverse, from differences rooted in ontogeny and development, via changes due to physiological adaptations, to distinct behavioral states. Accordingly, the variations may be transient or lasting. Collective motion, manifested by coordinated or synchronized group movement requires, by definition, a level of similarity between the individuals composing the group. Furthermore, the groups exert a homogenizing effects on its members. This alleged discrepancy, or tug-of-war type interaction, between the group and the individual (i.e., variability vs. homogeneity) is at the basis of much of the rich and complex dynamics seen in collective motion.

This review presents both the state-of-the-art and a historical perspective of experimental and theoretical aspects of heterogeneity in real, natural swarms. We focus on natural-biological systems only; however, the main points are also relevant to humans and human made systems (pedestrians, cars, robots, etc.). The conclusion of most theoretical work is rather straightforward, i.e., a higher heterogeneity diminishes the order, as one could intuitively expect. However, as evident from the different examples discussed, heterogeneity may be contributory and even instrumental in the interaction leading to the self-emergence of collective motion. The disparity between the rather simplistic theoretical conclusions and the known biological prevalence and significance of variability in nature raises a major open question (critically important to biological systems) of the ecological and evolutionary consequences of heterogeneity within collectives. In particular, it is not clear under what circumstances is heterogeneity, and its consequences on collective motion, evolutionary advantageous, or is it merely a natural, unavoidable reality that interferes with collectivity. Such considerations are often not taken into account in simplified mathematical models.

The challenges ahead of us include deciphering these interactions in new, diverse systems and at different types of environments. Also, there is currently very little work on continuous distribution of heterogeneities, as well as on coupling between different properties, which are more biologically realistic. By utilizing a comparative approach for developing general rules, we will be able to provide a further solid theoretical framework for the development of collectivity in light of variability and heterogeneity.