Efficient flocking: metric versus topological interactions

Flocking is a fascinating phenomenon observed across a wide range of living organisms. We investigate, based on a simple self-propelled particle model, how the emergence of ordered motion in a collectively moving group is influenced by the local rules of interactions among the individuals, namely, metric versus topological interactions as debated in the current literature. In the case of the metric ruling, the individuals interact with the neighbours within a certain metric distance; by contrast, in the topological ruling, interaction is confined within a number of fixed nearest neighbours. Here, we explore how the range of interaction versus the number of fixed interacting neighbours affects the dynamics of flocking in an unbounded space, as observed in natural scenarios. Our study reveals the existence of a certain threshold value of the interaction radius in the case of metric ruling and a threshold number of interacting neighbours for the topological ruling to reach an ordered state. Interestingly, our analysis shows that topological interaction is more effective in bringing the order in the group, as observed in field studies. We further compare how the nature of the interactions affects the dynamics for various sizes and speeds of the flock.


INTRODUCTION
Cohesive group formation is one of the most eyecatching displays in nature.It is observed among various species, such as, flock of birds [1,2], school of fishes [3], swarm of prey [4,5], colony of bacteria [6], aggregation of cells [7], and pedestrian crowd [8].The instances of collective behaviours have also been demonstrated in non-living systems including multi-agent robots [9], vibrated disks [10], artificial microswimmers [11] etc. Until now, a great effort has been devoted in understanding the underlying universal mechanisms of such spontaneous emergence of ordered motion irrespective of the nature of the constituent entities.As a result, several theoretical approaches have been developed to study the collective dynamics [1,2,[12][13][14][15][16][17][18][19].Among these, the self-propelled particle based model, since the seminal work of Vicsek [20], remains one of the most favourite choices as it could replicate both system-specific and universal features of the collective behaviours observed across a wide range of species.Moreover, because of its simplicity, one could easily test the model against the experimental observations.Several studies have revealed that collective motion can emerge from simple local rules of interaction among the individuals without a leader or any kind of a central control [21].The most commonly discussed interactions include short-range repulsions and long-range attractions among the individuals, or the alignment of velocities along with the nearest neighbours [1,22].Many intriguing questions, thus arise, e.g., how the individuals keep track of its neighbour in a large extended group, how far its range of interaction extends, or how many interacting neighbours do they require to establish such a coordinated motion of the whole group to flock together.Following Vicsek's work, most of the self-propelled particle models have incorporated metric based interaction rules according to which each individual interacts with its surrounding neighbours up to a certain metric distance.Hemelrijk and Hildenbrandt have demonstrated that metric based interactions incorporating cohesion, alignment and separation rules can explain the shapes and patterns of fish schooling [23].Using a simple model with metric rules, Couzin et al. have shown how efficient information transfer and decision-making can occur in animal groups [24].Another self-propelled particle model introduced by Bhattacharya and Vicsek indicates the mechanisms of the synchronized landing of a flock of birds performing foraging flights [25].There are also other metric based interaction models that have given many insights into the orientational order, cluster formations, synchronization, and spatial sorting in collective groups [26][27][28].
However, in contrast to the metric based interaction rules, it has recently been suggested in an experimental finding that the birds in a flock tend to interact with a fixed number of nearest neighbours [30], this has been termed as topological interaction in the subsequent literature.Ballerini et al. have analysed the trajectories of flocks of a few thousand starlings and have shown that each bird interacts with a fixed number of neighbours (on an average six to seven neighbours) irrespective of their metric distance [30].Camperi et al. based on a self-propelled particles model have shown that the topological models are more stable than the metric ones, and maximal stability is attained when topological neighbours are distributed evenly around each individual, i.e., the neighbours are chosen from a spatially balanced neighbourhood [31].Further, using network and graphtheoretic approaches coupled with a dynamical model, Shang and Bouffanais have studied the consensus reaching process with topologically interacting self-propelled particles.They have shown regardless of the group size, a value of close to ten neighbours speeds up the rate of convergence to the consensus to an optimal level where all particles interact with the entire group [32].
Several studies on metric interactions and quite a few on topological interactions have been carried out; however, what kind of inter-agents interaction governs the macroscopic collective order among diverse species is not yet well-understood [33,34].On the one hand, animals can estimate absolute distance by various methods, including retinal image size and different motional cues [29].Therefore, estimating the metric distance among the surrounding neighbours could be a natural interaction.On the other hand, the sensory and cognitive limitation of an individual indicates that instead of interacting with all members, topological interaction with a few neighbours could play an important role in establishing collective order in the group.In this paper, based on a simple self-propelled particle model, we investigate how the metric versus topological interactions affect the emergence of ordered motion in a flock.We study the dynamics of flocking by both varying the range of interaction radius and the number of interacting topological neighbours among the individuals.Our theory predicts the existence of a certain threshold interaction radius for the metric ruling and a threshold number of interacting neighbours for the topological ruling for the whole group to reach an ordered state.We further explore how the nature of interactions influences the overall dynamics for different speeds and group sizes of the flock.It shows that the lower speed is more beneficial for the group to flock together compared to the higher speed.Further, in the case of metric interaction, the threshold value decreases with an increase in flock sizes irrespective of the flock speeds.On the contrary, in topological interaction, increasing the group size increases the threshold value for flocks moving with the higher speed; however, it remains unaffected for flocks with a lower speed.Overall, the topological interaction turns out to be beneficial and effective in bringing order in the flock.

THEORETICAL MODEL
We consider a group of N active particles in twodimensional space where each particle is characterised by its position, r i , and the velocity, v i = v 0 cos θ i x + v 0 sin θ i ŷ, where v 0 is the magnitude and θ i is the direction of the velocity of the i th particle.To mimic the real-life scenario in the field, we consider that the particles move in open space (hence, the boundary is not restricted).Moreover, the particle velocity can change in magnitude as well as in direction depending on the local inter-particle interactions.In a simple way to incorporate this feature, we consider a velocity alignment interaction between the particles and the surrounding neighbours.In case where the interaction is governed by the metric distance, each particle interacts with its neighbours within a certain reaction radius, r int .On the other hand, in case of topological interaction, each particle chooses to interact with a certain N r number of nearest neighbours.Thus, the equation of motion is given by, where v i is the velocity of the i th particle.Here, the first term on the right-hand side denotes the velocity alignment interaction of the i th particle with the surrounding neighbours.The summation is performed over N int number of neighbours interacting with the i th particle following the metric or the topological rule of interactions.The motion of the surrounding neighbours influences the velocity of an individual particle, and it responds by changing its velocity to equal the velocity of the neighbouring particles.Here, α represents the strength of the interparticle interactions, γ denotes the coefficient of the viscous drag experienced by the particle, and ξ represents the noise resulting from the surrounding medium.However, since our main focus is to investigate how the nature of the interactions, be it metric or topology, influences the flock, here we concentrate on the simplest case where the damping term and the noise are negligible and thus not considered.We study the dynamics in dimensionless units.Time variable is scaled as T = t/τ , the dimensionless velocity is given by V = v/v s , the dimensionless speed is V 0 = v 0 /v s where v s = l s /τ ; and other scaled parameters are interaction radius, R = r int /l s and α s = ατ ; where the constants l s and τ represent the characteristic length and time scale of the system.

RESULTS
We study the dynamics of flocking by varying the range of the interaction radius, R, in the case of metric and the number of interacting neighbours, N r , for the topological interactions.In our simulations, we consider a group of N particles initially positioned randomly in a square box of size L. The initial directions of the velocity of the particles are chosen uniformly between 0 to 2π with a velocity magnitude, V 0 , and then the positions and velocities of the particles evolve in time depending on the interaction with their neighbours following Eq. 1.We have investigated the dynamics for a wide range of parameter values; here, we present the results for some representative values by keeping the initial box size, L = 25, α s = 1, and the flock size, N = 100, 200, 300, 500.We have also studied the effect of varying initial velocity magnitude, V 0 , on the flocking state; the results presented here are for two different regimes, at a lower speed, V 0 = 0.01, and at a higher speed, V 0 = 1.0, of the flock.The results are obtained, averaging over hundred such simulation trajectories starting from different initial configurations.It is worth noting that the group size, N , is motivated by the literature study of the size of flocks, schools, and herds of various species [24,35] (and the references therein).Many groups could also contain a large number of individuals; however, even within this range, our analysis clearly demonstrates the influence of variation in group sizes in the case of both metric and topological interactions.Now, to characterize the ordered state, i.e., the flocking state when all individuals move along the same direction in unison, we consider the order parameter, φ, to describe the degree of the collective order as the absolute value of the averaged normalized velocity of the group given by [20], where N is the total number of particles in the group, V i is the velocity of the i th particle, and |V i | is the magnitude, i.e., the speed of the particle.The order parameter, φ, measures the global order in the system at any given time instant, T .φ approaches to unity for ordered motion and to zero for disordered state.We further investigate how the order or the degree of similarity varies spatially in time by analysing the spatial correlation function, C(r), where C(r) measures the velocity correlation between a pair of particles, i and j, at a distance r at a given time T .Here, V i = Vi |Vi| is the unit velocity vector of the i th particle and r ij = |r i − r j | denotes the distance between a pair of particles, i and j.The Kronecker delta, δ(r − r ij ) = if r = r ij , and δ(r − r ij ) = 0 if r = r ij .To calculate the spatial average, summation is performed over all pairs with a distance r ij between r and r + dr and then it is devided by the number of such pairs (the number is given by the denominator term).This gives a fair estimate of the veolocity correlation, C(r), between two individuals in a group [2].

Metric interaction: influence on flocking state
Figures 1a and 1b show the time evolution of the order parameter, φ, for different interaction radius, R, at a lower and a higher flock speed, V 0 , keeping the flock size, N = 100, for a representative simulation trajectory.As seen from the figures, the order parameter increases with an increase in the range of interaction since the agent-particles get to interact with more neighbours with an increasing radius, which facilitates to bring in higher-order in the group.Further, it shows that for a given interaction radius, R, the group moving with a lower speed, V 0 = 0.01, results in more order in the system (figure 1a) compared to the higher speed, V 0 = 1.0 (figure 1b).It is because the particles with a low speed move with the same surrounding neighbours for a considerable time; thus, they get sufficient time to align their velocities.Whereas the particles moving at high speed go through rapid changes in their surrounding neighbours; thus, the overall order in the group decreases.
We further investigate the spatial ordering in the group while it approaches the flocking state by analysing the velocity correlation function, C(r), at different time instances, T , for two reaction radius, R = 5 and 10 shown in figures 2a -2d.We calculate the spatial statistical av- erage by summing over all pairs of particles in the group as described by Eq. 3 for one representative simulation trajectory.Initially, since the particles are positioned randomly, in the beginning, at T = 1, the velocity correlation function, C(r), is close to zero over the entire spatial extent r of the system as could be seen from figures 2a -2b.As time evolves, at T = 5, the particles located within the interaction radius R start interacting and gradually tend to align along with their neighbours.Thus, the correlation between the particle velocities increases at a shorter distance r; however, the correlation function stays close to zero between the particles at a large distance as the motion remains uncorrelated.As time progresses further (shown at T = 1000), the correlation functions, C(r), approaches unity, and the entire group reaches an ordered state.It could be seen from the figures that for a given flock speed, the agent-particles with a higher interaction radius reach the flocking state faster compared to a smaller radius.Similarly, if we compare the speeds, for a smaller range of interaction, R = 5, the group with a lower speed tends to approach the ordered state faster compared to the group with a higher speed, as shown in figures 2a and 2b.However, for a higher interaction radius, (R = 10), the variation in flock speeds does not significantly alter the dynamics as could be seen in figures 2c and 2d.
To further explore, we study the order parameter, φ, at steady state as a function of interaction radius, R, for different group size, N , and speed, V 0 , of the flock, shown in figures 3a and 3b (values are obtained averaging over hundred simulation trajectories).We find that a certain threshold interaction radius, R th , is required for the group to reach the ordered state (φ ∼ 1), i.e., for the group to flock together.Moreover, the threshold value of the interaction radius, R th , decreases with the increase in the flock size, N .With increasing group size, the individuals get surrounded by more closely spaced interacting neighbours.As the average distance between the particles decreases, the threshold value of interaction, R th also decreases.On the other hand, for a given flock size, the threshold value, R th , increases with an increase in the flock speed, as shown in figure 3a and figure 3b.Thus, the lower speed turns out to be beneficial in establishing the order in the group as the individuals moving with low speed get to spend considerable time with the same neighbours to align their velocities and thus, require to interact comparatively with a smaller number of particles and at a shorter distance for the whole group to reach the flocking state (values are presented in table 1 in supplementary).

Topological interaction: influence on flocking state
We now investigate how the flocking state is affected when the individuals interact topologically, i.e., when they interact with a certain number of nearest neighbours irrespective of their metric distances.Figures 4a and 4b show the steady state value of the order parameter, φ, as a function of the number of nearest neighbours, N r , for different flock size, N , and initial speed, V 0 (averaging has been done over hundred simulation trajectories).Our analysis shows that also in the case of topological interaction, a threshold number of nearest neighbours, N th , is required for the whole group to attain the ordered state (φ ∼ 1).Moreover, for a given flock size, N , if we increase the speed from V 0 = 0.01 (figure 4a) to a higher value, V 0 = 1.0 (figure 4b), the threshold value, N th , increases.Interestingly, in contrast to the metric ruling, here, the variation in flock sizes does not alter the threshold number for flocks moving with a lower speed (figure 4a).On the other hand, for the high-speed case, increasing the flock size increases the threshold value to reach the ordered state (figure 4b).Further, we have studied the time evolution of the order parameter, φ, and the spatial velocity correlation, C(r), for the topological interactions which have been presented in the supplementary section.It is noteworthy that other studies have also observed that the cohesion of the whole group moving with a constant speed increases with an increase in the topologically interacting neighbours.The threshold or the optimal number of neighbours is independent of the swarm size, as we find in the case of flocks moving at a slower speed [32].

Metric versus topological interactions
So far, we have studied the influence of metric and topological interactions on the emergence of the ordered state.Here, we analyse which of these local interactions is favourable for the group to flock together.For a given number of topologically interacting neighbours N r , we calculate the mean distance, R m , among the interacting agent-particles in the steady state (averaging has been done over hundred simulation trajectories).Figures 5a  and 5b show the mean distance, R m , as a function of interacting neighbour, N r , for different flock sizes as well as speeds.Interestingly, the mean emergent distance, R m , when plotted against Nr N , i.e., in terms of the fraction of total group member, turns out to be invariant to the change in flock size, N , as could be seen in figures 5c and 5d.Similar results are also obtained for the metric interaction where for a given interaction radius, R, the mean number of interacting particles, N m , has been calculated (plots are shown in the supplementary section).Now in order to compare how the metric and the topological ruling could fair in establishing the order in the flocking state, we evaluate the minimal interaction distance and the minimal number of interacting agents required to reach the ordered state, i.e., when φ reaches unity.We define an efficiency parameter, η = R th N m , for the metric interaction and for the topological interaction, η = N th R m ; where R th is the threshold value of the interaction radius required for the metric ruling and the threshold number of neighbours, N th , for the topological ruling to attain the order state.(The values of R th and N th are obtained from figure 3 and figure 4 and the corresponding values of the mean emerging interacting neighbours, N m , and the mean emerging interaction distance, R m , are obtained from figures S3 and figure 5.The values are presented in Table 1 in the supplementary).Therefore, comparatively, flocking is considered to be more efficient if the whole group reaches the ordered state with a lower value of η.For the quantitative analysis of the dynamics, we compare the bar plot of η with varying flock sizes (N = 100, 200, 300 and 500) and speeds (V 0 = 0.01 and V 0 = 1.0) for both the metric and the topological interactions.As shown in figures 6a and 6b, with a decrease in the flock size, the difference between the metric and the topological interaction becomes more prominent, and the topological ruling becomes significantly efficient as compared to the metric ruling.Moreover, the values of η are lower in the case of topological ruling for both low and high-speed flocks.Further, if we scale η by the flock size N , as shown in figures 6c and 6d, topological interaction turns out to be a clear winner for smaller group size.Further, the difference between the metric and topological interaction becomes more distinct for the higher speed compared to the flock moving with a lower speed.

DISCUSSION
We have investigated, based on a simple self-propelled particle model, how the local rules of metric and topological interactions affect the dynamics of flocking.We have studied the emergence of order by varying the interaction distance and also the number of interacting nearest neighbours for various flock sizes and speeds.It is observed that in the case of the metric ruling, a certain threshold value of interaction radius is required to reach the ordered state.Similarly, for the topological ruling, a threshold value of the number of interacting neighbours is needed for flocking.Our study shows that the threshold value for a given flock size gets lowered for the group moving with a lower speed for both the metric and the topological interactions.Thus, the lower speed turns out to be beneficial since the individuals are required to interact comparatively with a smaller number of neighbours and at a shorter distance for the group to flock together.Further, in metric interaction, increasing the group size decreases the threshold interaction radius required for flocking irrespective of the flock speeds.On the contrary, in the topological ruling, the variation in the group size does not affect the flocking dynamics in the case of lower speed.Our study shows in the case of flocks moving at a lower speed, the optimal number of topologically interacting neighbours is ∼ 7 − 10 to achieve the ordered motion of the whole group, which has also been observed in other studies [30,32]; moreover, the number does not depend on the flock size as found in [32,36].However, our analysis indicates that for groups moving at high speed, the optimal number of interacting neighbours require to be much higher to reach an ordered state, and also, the threshold number of interacting neighbours increases with the increase in the flock size, as shown in Table 1 in supplementary.Overall, the topological interaction turns out to be more efficient as compared to the metric interaction for the whole group to reach the order state.Moreover, the difference between the metric and the topological ruling becomes more pronounced with a decrease in the flock size.Further, it is worth noting that apart from these two broad groups of local interactions -metric and topological rules, there are also studies considering a hybrid model of metric-topological interactions to understand the specific behaviours associated with various swarms [37,38].Moreover, there are recent approaches by explicitly incorporating the sensory information such as visual sensing of the individuals or inferring the fine-scale social interaction rules among the individuals that help to get an insight into the coordinated motion of collectively moving groups [39][40][41].However, it is quite challenging to construct the visual field and analyse the trajectories of every individual of large swarms in natural fields.Besides, the ways of communication in the groups may vary with changing environmental conditions.In such cases, these two broad groups of local interactions, namely metric and topological rules that indirectly incorporate the sensory cues and cognitive capabilities of individuals in a group, provide a great deal of information about the collective dynamics, as shown by our study.Our minimal model set-up could further be extended by incorporating other interactions as observed in nature, the effect of strong noise, or the presence of restrictive boundary or a predator attack and explore how it could influence the outcomes.

Funding.
The authors acknowledge the financial support from the Science and Engineering Research Board (SERB), Grant No. SR/FTP/PS-105/2013, Department of Science and Technology (DST), India.