Skip to main content
PLOS Computational Biology logoLink to PLOS Computational Biology
. 2022 Jan 13;18(1):e1009394. doi: 10.1371/journal.pcbi.1009394

Dominating lengthscales of zebrafish collective behaviour

Yushi Yang 1,2,*, Francesco Turci 2, Erika Kague 3, Chrissy L Hammond 3, John Russo 4, C Patrick Royall 2,5,6
Editor: James AR Marshall7
PMCID: PMC8797201  PMID: 35025883

Abstract

Collective behaviour in living systems is observed across many scales, from bacteria to insects, to fish shoals. Zebrafish have emerged as a model system amenable to laboratory study. Here we report a three-dimensional study of the collective dynamics of fifty zebrafish. We observed the emergence of collective behaviour changing between ordered to randomised, upon adaptation to new environmental conditions. We quantify the spatial and temporal correlation functions of the fish and identify two length scales, the persistence length and the nearest neighbour distance, that capture the essence of the behavioural changes. The ratio of the two length scales correlates robustly with the polarisation of collective motion that we explain with a reductionist model of self–propelled particles with alignment interactions.

Author summary

Groups of animals can display complex collective motion, which emerges from physical and social interactions amongst the individuals. A quantitative analysis of emergent collective behaviour in animals is often challenging, as it requires describing the movement of many individual animals. With an innovative 3D tracking system, we comprehensively characterized the motion of large groups of zebrafish (Danio rerio), a freshwater fish commonly used as a vertebrate model organism. We find that the different collective behaviours are captured by two physical scales: the length of persistent motion in a given direction and the typical nearest neighbour distance. Their ratio allows us to interpret the experimental results, in the light of a statistical mechanics model for swarming with persistent motion and local neighbourhood alignment.

Introduction

In living systems aggregation occurs at different scales, ranging from bacteria (microns) to insects (centimetres) to fish shoals (tens of kilometres) and with emerging complex patterns [13]. These manifestations of collective behaviour originate from the interactions among the individual agents and between the agents and the environment [4]. Such interactions are often modelled by a combination of deterministic and stochastic contributions, capturing the individual’s variability observed in nature and unknown or uncontrollable variables. The emergence of collective behaviour has been shown to be advantageous for communities [57], and the identification of universal patterns across scales and species reveals the physics behind these phenomena [8, 9]. Understanding the relationship between the collective behaviour and animal interactions has potential technological applications, for example to reverse engineer algorithms for the design of intelligent swarming systems [10]. Successful examples include the global optimisation algorithm for the travelling salesman problem inspired by the behaviour of ants, and implementation of the Boids flocking model in schooling of robotic fish [11, 12].

In a reductionist approach, collective behaviour can be modelled with interacting agents representing individuals in living systems. For example, groups of animals may be treated as if they were self-propelled particles with different interacting rules [13, 14]. Examples of using simple agent–based models applied to complex behaviour include describing the curvature of the fish trajectories as a Ornstein–Uhlenbeck process [15], modelling the ordered movement of bird flocks by an Ising spin model [2, 16], mapping of midge swarms onto particulate systems to explain the scale-free velocity correlations [13, 17, 18] and swarming in active colloids [19, 20]. One of the simplest approaches is the Vicsek model [21], in which the agents only interact via velocity alignment. Despite its simplicity, a dynamical phase transition from ordered flocking to randomised swarming can be identified, providing a basis to describe collective motion in biological systems [22, 23].

The study of collective behaviour in living systems typically has focused on two-dimensional cases for reason of simplicity, making the quantitative characterisation of three-dimensional systems such as flocks of birds or shoal of fish rare. To bridge this gap, zebrafish (Danio rerio) present a wealth of possibilities [24]: zebrafish manifest shoaling behaviour, i.e. they form groups and aggregates, both in nature and in the laboratory; also, it is easy to constrain the fish in controlled environments for long–time observations. Typically, the response of fish to different perturbations, such as food and illumination, can be pursued [2426]. Furthermore, genetic modification has been very extensively developed for zebrafish, giving them altered cognitive or physical conditions, and yielding different collective behaviour [27, 28].

However, tracking zebrafish in three dimensions (3D) has proven difficult [29]. To the best of our knowledge, previous studies on the 3D locomotion of zebrafish focussed either on the development of the methodology [30, 31], or were limited to very small group sizes (N ≤ 5) [29, 32, 33], while ideally one would like to study the 3D behaviour of a statistically significant number of individuals, representative of a typical community. In the field, zebrafish swim in 3D with group sizes ranging from tens to thousands [34].

Here we report on the collective behaviour of a large group (N = 50) of wild-type zebrafish, captured by a custom 3D tracking system. The observed fish shoals present different behaviours, showing different levels of local density and velocity synchronisation. We identify two well-separated time scales (re-orientation time and state-changing time) and two important length scales (persistence length and nearest neighbour distance) for the zebrafish movement. The time scales indicate the fish group change their collective state gradually and continuously. The spatial scales change significantly as collective behaviour evolves over time, with strong correlations between spatial correlations and shoaling. Finally, we reveal a simple and universal relationship between the global velocity alignment of the shoals (the polarisation) and the the ratio between the two length scales (the reduced persistence length). We rationalise this finding through the simulation of simple agent-based models, in which an extra inertia term is added to the Vicsek model. Our findings illustrate complex behaviour in zebrafish shoaling, with couplings between spatial and orientational correlations that could only be revealed through a full three-dimensional analysis.

Materials and methods

Ethics statement

The experiments were approved by the local ethics committee (University of Bristol Animal Welfare and Ethical Review Body, AWERB) and given a UIN (university ethical approval identifier).

Zebrafish husbandry

Wildtype zebrafish were kept in aquarium tanks with a fish density of about 5 fish / L. The fish were fed with commercial flake fish food (Tetra Min). The temperature of the water was maintained at 25°C and the pH ≈ 7. They were fed three times a day and experience natural day to night circles, with a natural environment where the bottom of the tank is covered with soil, water plant, and decorations as standard conditions [35]. Our young group (Y) were adults between 4–6 months post-fertilisation, while our old group (O) were aged between 1–1.5 year. The standard body lengths of these fish were are available in section II in S1 Text. All the fish were bred at the fish facility of the University of Bristol.

Apparatus

The movement of the zebrafish were filmed in a separate bowl-shaped tank, which is immersed in a larger water tank of 1.4 m diameter. The radius r increasing with the height z following z = 0.734r2. The 3D geometry of the tank is measured experimentally by drawing markers on the surface of the tank, and 3D re-construct the positions of the markers. Outside the tank but inside the outer tank, heaters and filters were used to maintain the temperature and quality of the water. The videos of zebrafish were recorded with three synchronised cameras (Basler acA2040 um), pointing towards the tank. Detailed information is available in subsection I.A in S1 Text.

Measurement and analysis

Fifty zebrafish were randomly collected from their living tank, moved to a temporary container, then transferred to the film tank. The filming started about 10 minutes after fish were transferred. The individual fish in each 2D images were located by our custom script and we calculated the 3D positions of each fish following conventional computer vision method [36, 37]. The 3D positions of the fish were linked into trajectories [38, 39]. Such linking process yielded the positions and velocities of different fish in different frames. We segmented the experimental data into different sections of 120 seconds, and treat each section as a steady state, where the time averaged behavioural quantities were calculated. More details on the tracking are available in subsections I.B-I.D in S1 Text, and more descriptions on the analysis are in section III in S1 Text.

Results

Experimental observation

We tracked the movement of zebrafish from multiple angles using three synchronised cameras. We collected data for fish groups with different ages, with young fish (labelled as Y1–Y4) and old fish (labelled as O1–O4). Fig 1A schematically illustrates the overall setup of the experiment, where the cameras were mounted above the water to observe the fish in a white tank in the shape of a parabolic dish, enabling 3D tracking [2, 4042]. With this apparatus, we extract the 3D positions of the centre of each fish at different time points, with the frequency of 15 Hz. We then link these positions into 3D trajectories. Fig 1B presents typical 3D trajectories from 50 young zebrafish during a period of 10 seconds, where the fish group changed its moving direction at the wall of the tank. The zebrafish always formed a single coherent group, without splitting into separate subgroups during our observations. Supplementary videos (S1, S2 and S3 Videos) are examples of the their movements. Fig 1C shows the cumulative spatial distribution of the zebrafish in the tank, during a one-hour observation. It is clear from this figure that the fish tend to swim near the central and bottom part of the tank. The propensity of zebrafish to swim near the wall was our motivation to use a bowl-shaped fish tank shown in Fig 1C, so that there are no corners for the fish to aggregate in, compared to a square-shaped container like conventional aquaria.

Fig 1. Experimental setup and overall spatial distributions.

Fig 1

A: Schematic illustration of the experimental setup. Zebrafish were transferred into a bowl-shaped tank and three cameras were mounted above the air-water interface to record the trajectories of the fish. B: 3D trajectories obtained from the synchronised videos of different cameras. These trajectories belong to 50 young zebrafish (group Y1) in 10 seconds. C: The spatial distribution of 50 young fish (Y1) during a one-hour observation. Brighter colour indicates higher density. The top panel shows the result in XY plane, obtained from a max-projection of the full 3D distribution. The bottom panel shows a max-projection in the XZ plane. The outline of the tank and water-air interface, obtained from 3D measurement, are labelled.

Evolving collective behaviour

The 3D tracking yields the positions of the fish, whose discrete time derivative gives the velocities. From these two quantities, we calculate three global descriptors to characterise the behaviour of the fish: the average speed, the polarisation, and the nearest neighbour distance. The average speed is defined as v0 = 1/N∑|vi| where i runs over all the tracked individuals. The polarisation Φ characterises the alignment of the velocities. It is defined as the modulus of the average orientation, written as [13], Φ = 1/N|∑(vi/|vi|)| where i runs over all the individuals. Large polarisation (Φ ∼ 1) signifies synchronised and ordered movement, while low polarisation indicates decorrelated, random movement. The nearest neighbour distance between the fish centres is defined according to the Euclidean metric, and we focus on is arithmetic mean lnn. These quantities were selected, because v0 and Φ describe the dynamic of the fish, and lnn captures structural information on the group of fish.

We start from the analysis of temporal correlations of these three scalar quantities. Notably, all three exhibit two distinct time scales. Fig 2A shows the auto–correlation functions (ACF) of v0, Φ and lnn averaged over the group of 50 young fish, calculated from a one hour observation. The ACFs present two decays and one intermediate plateau. We identify the first decay (∼1s) corresponding to the reorientation time of the zebrafish. This can be shown through the analysis of the autocorrelation of the orientations Fig 2B, which are characterised by an exponential decay with relaxation time 〈τ〉 close to ∼1s. This value is compatible with the previously reported turning rate timescale (∼0.7s) [43].

Fig 2. The behavioural quantities of 50 young zebrafish (group Y1).

Fig 2

A: The auto–correlation function of the polarisation and average speed of the fish group. B: The auto–correlation function of the orientations of fish. C: Sequence of radial distribution functions with increasing time: at early times (top curves) the fish are clustered together so that the peak is large; at later times (bottom curves) the local density decreases and so does the peak height. D: The time evolution of the averaged behavioural quantities for 50 young fish. Each point corresponds to the average value in 2 minutes. The error bars illustrate the standard error values.

The plateau and subsequent decay of the ACF of the scalar quantities v0, Φ and lnn, with the time scale of ∼120 seconds, represent complete decorrelation from the initial state, indicating that the shoal properties change significantly on this much longer timescale. Therefore, we employ time-windows of 120 seconds to average the time evolution of of v0, Φ and lnn, to characterise the states of the fish groups with moving averages 〈v0〉(t), 〈Φ〉(t) and 〈lnn〉(t).

To characterise the degree of spatial correlation of the fish, we calculate their radial distribution function (RDF), see Fig 2C, which quantifies the amount of pair (fish-fish) correlations and it is commonly employed in the characterisation of disordered systems ranging from gas to liquids, from plasma to planetary nebulae [44]. Details on the RDF can be found in subsection III.C in S1 Text. All the RDFs exhibit one peak at a short separation, indicating the most likely short-distance separation between fish. The peak height is a measure of the cohesion of the fish group. Inspired by liquid state theory [44], we take the negative logarithm of the peak height to characterise what we call as the “effective attraction” among the fish, noted as 〈ϵ〉. While lnn quantifies a characteristic lengthscale in the macroscopic collective state, ϵ quantifies the fish propensity to remain neighbours. In Fig 2D we see that 〈lnn〉 and 〈ϵ〉 are strongly correlated, confirming that lnn is also a measure of the cohesion of the collective states. We term 〈v0〉, 〈Φ〉, 〈τ〉, 〈lnn〉, and 〈ϵ〉 “behavioural quantities”, and the brackets indicate the moving average. These variables are summarised in Table 1.

Table 1. A summary of the variables used to describe the fish behaviour.

Symbol Name Unit Comment
v 0 Speed mm/s Average over different fish
l nn Nearest Neighbour Distance mm Average over different fish
Φ Polarisation 1 Larger = ordered movement
〈⋅〉 Average operator Time average over 120 s
τ Relaxation time s The relaxation of fish orientation
ϵ Effective Attraction 1 Smaller = more cohesive
lp Persistence Length mm Defined as 〈v0〉〈τ
κ Reduced Persistence Length 1 Defined as 〈lp〉 / 〈lnn

Fig 2D illustrates the time-evolution of all the behavioural quantities, calculated from the movement of 50 young fish (group Y1) ten minutes after they were extracted from a husbandry aquarium and introduced into the observation tank. Over time, the behavioural quantities drift, indicating that a steady state cannot be defined over the timescale of 1 hour. This result is generic, as the separated time scales and changing states were obtained from repeated experiments on the fish group (Y2–Y4), and also from different groups of older zebrafish (O1–O4).

Shoaling state described by two length scales

To describe the space of possible collective macroscopic states we employ two dimensioned lengths, the nearest neighbour distance 〈lnn〉 defined above and a second scale characterising the typical distance that a single fish covers without reorientation, the persistence length 〈lp〉. This is defined as the product of the speed and the orientational relaxation time 〈lp〉 = 〈v0〉〈τ〉.

The resulting 〈lp〉 and 〈lnn〉 diagram is illustrated in Fig 3A. As we move across the diagram, the degree of alignment of the fish motion—the polarisation—also changes, indicating that changes in the local density (as measured by 〈lnn〉) and in the pattern and velocity of motion (as measured by 〈lp〉) are reflected in the polarisation of the shoals. For high 〈lp〉 and low 〈lnn〉, the movements of the fish are cohesive and ordered (S1 Video). For the fish states with a low 〈lnn〉 and low 〈lp〉, the movements are cohesive but disordered (S3 Video). For fish states with high 〈lnn〉 and low 〈lp〉, the fish are spatially separated with disordered movements (S2 Video). Separated and ordered states are never observed. We also note that there is a systematic difference between young (Y) and old (O) fish groups, with the former characterised by longer persistence lengths, shorter neighbour distances and larger polarisations, while the latter are clustered in a narrower range of persistence lengths with more disorder.

Fig 3. The states of Zebrafish characterised by two length scales.

Fig 3

A: The states of the fish represented by the nearest neighbour distance and the persistence length. The brightness of the markers corresponds to the value of the polarisation. Each scatter–point corresponds to a time-average of 2 minutes. Different shapes indicate different fish groups from different experiments. B: A multilinear regression model fitting the relationship between the polarisation and the two length scales, indicating the polarisation increase with the increase of persistence length, and the decrease of the nearest neighbour distance. The model is rendered as a 2D plane, whose darkness indicates the value of polarisation.

The simplest model to capture the relationship between polarisation and the two lengthscales is a multilinear regression. This yields 〈Φ〉 = 0.039 〈lp〉 − 0.05 〈lnn〉 + 0.147, with a goodness of fit value R2 = 0.73. This strong simplification suggests that most of the fish macroscopic states reside on a planar manifold in the Φ–lnnlp space, illustrated in Fig 3B. The value of 〈Φ〉 increases with the increase of 〈lp〉, and the decrease of 〈lnn〉. Such relationship is reminiscent of results from the agent-based Vicsek model, where the polarisation of self–propelled particles is determined by the density (lnn-1) and orientational noise (lp-1) [21, 45]. In addition, the relationship between the polarisation and the local density suggests a metric based interaction rule, rather than the topological one [46]. In other words, the fish tend to align with nearby neighbours, rather than a fixed number of neighbours. For instance, if the fish always align with their closest neighbours regardless of the distance, then the polarisation of the system will not be affected by lnn. A similar relationship between polarisation and density was also found for jackdaw flocks while responding to predators [47].

Interestingly, the ratio between the persistence length and the nearest neighbour distance exhibits a simple and robust correlation with the polarisation. Here we introduce the reduced persistence length κ = 〈lp〉/〈lnn〉. The value of κ exhibits a consistent relationship with the polarisation for all the fish groups, as shown in Fig 4A. All the experimental data points collapse onto a single curve, especially for the younger fish groups (Y1–Y4) which have a much wider dynamic range than the older groups. Notably, the young fish always transform from ordered states with high κ value to disordered states with low κ value, possibly because they adapt to the observation tank. Other possible ways to collapse the data is discussed in section VII in S1 Text.

Fig 4. Single–parameter description of the Zebrafish system.

Fig 4

A: The average polarisation 〈Φ〉 as a function of the reduced persistence length κ, where most data points collapse, and agree with the simulation result of the inertial Vicsek model. The dashed line and grayscale zone represent the expected average value and standard deviation of 〈Φ〉 for the uniform random sampling of vectors on the unit sphere. B: The velocity correlation function of the fish and the model in the low κ states, highlighted in A with a × symbol. C: The velocity correlation function of the fish and the model in the high κ states, highlighted in A with a + symbol.

To understand this relationship, we consider the fish motion as a sequence of persistent paths interrupted by reorientations. In a simplified picture, the new swimming direction at a reorientation event is determined by an effective local alignment interaction that depends on the neighbourhood, and notably on the nearest neighbour distance lnn. The fish states with larger value of κ correspond to situations where each individual fish interacts with more neighbours on average, between successive reorientations. The increased neighbour number leads to a more ordered collective behaviour, so that the values of κ and Φ are positively correlated as shown in Fig 4A.

The time-averaged spatial correlation of the velocity fluctuation supports our picture of the local alignment interaction between the fish. Such a correlation function is defined as,

C(r)=i=1Nj=i+1N[(vi-v¯)·(vj-v¯)δ(r-rij)]i=1Nj=i+1Nδ(r-rij), (1)

where vi is the velocity of fish i, v¯ is the average velocity in one frame, rij is the distance between two fish, and δ is the Dirac delta function. This function is widely used to characterise the average alignment of velocity fluctuations of moving animals, at different distances [2, 48, 49]. Fig 4B and 4C show the correlation functions for different fish groups with low and high κ values, respectively. The distances are rescaled by the different 〈lnn〉 values of each fish group. For both conditions, the correlation curve collapses beyond one 〈lnn〉, and peaks around the value of 〈lnn〉, supporting our assumption that 〈lnn〉 is the length scale for the fish–fish interactions.

Vicsek model rationalisation of the experiments

The relationship between κ and Φ, presented in Fig 4A, can be easily compared with simulations. Here we explore this through simulations proposing a new modification of the original Vicsek model [21]. The Vicsek model treats the fish as point-like agents with an associated velocity vector of constant speed v0. During the movement, the fish adjust their orientations to align with the neighbours’ average moving direction. In order to take into account of memory effects in a simple fashion, we add an inertia term into the Vicsek model, so that each agent partially retain their velocities after the update, with the following rule

vi(t+1)=v0Θ[(1-α)v0Rη[Θ(jSivj(t))]VicsekModel+αvi(t)], (2)

where vi is the velocity or the ith fish, and the updated velocity of fish i is a linear mixture of its previous velocity and a Vicsek term. The parameter α characterises the proportion of the non-updated velocity, i.e. the inertia. This model is reduced to the Vicsek model by setting α to 0. If α = 1, these agents will perform straight motion with constant speed without any interaction. For the Vicsek term, Si is the set of the neighbours of fish i, and the Θ is a normalising function. The operator Rη[r] randomly rotates the vector r into a new direction, which is drawn uniformly from a cap on the unit sphere. The cap is centred around r with an area of 4πη. The value of η determines the degree of stochasticity of the system. Our model is thus an inertial Vicsek model in three dimensions with scalar noise.

We set the units of the interaction range ξ and time dt and fix the number density to ρ = 1ξ−3 and speed v = 0.1ξ/dt. We then proceed with varying the two parameters α and η to match the data. In particular we measure the average persistence length 〈k〉 and polarisation 〈Φ〉 and find that for α = 0.63 we can fit the data only through the variation of the noise strength η (more details of the simulation are available in the section IV in S1 Text). For η ∼ 1, the movement of each agent is completely disordered, reproducing the low κ (or Φ) states of the fish. For the case of η ∼ 0.65 the movements of the agents are ordered (Φ ∼ 0.64) and mimic the states of fish with high κ. This is consistent with the fact that in the ordinary Vicsek model the persistence length scales as v0/η2 (section V in S1 Text) [45]. The good fit of the simulation result suggests the fish–fish alignment interaction dominates their behaviour, and the fish can change their states by changing the rotational noise (η).

We emphasise that the inertial Vicsek model is a crude approximation, as the only interaction of the model is velocity alignment. Without the attractive/repulsive interactions and other details, the inertial Vicsek model does not reproduce the velocity correlation function of the fish, as illustrated in Fig 4B and 4C, suggesting that more sophisticated models with effective pairwise and higher order interactions may be developed in the future. Nevertheless, the model qualitatively reproduces the fact that the velocity correlation is stronger in the high κ states.

Discussion and conclusion

Our results confirm some previous observations and open novel research directions. The young fish appear to adapt to a new environment with the reduction of the effective attraction and speed (Fig 2). Such behaviour is consistent with previous observations of dense groups of fish dispersing over 2–3 hours [50], and it might be related to the fact that the fish perceived less danger as they adapted to the new environment [51, 52]. At the same time, it was reported by Miller and Gerlai that the habituation time has no influence on the Zebrafish group density [53]. We speculate that this difference emerges from the way the statistics were performed. Typically, Miller and Gerlai’s results were averaged over 8 different small fish groups (N = 16), and it is possible that the noise among different groups obfuscates the time dependence features here highlighted. Despite the different claims, our result matched Miller and Gerlai’s result quantitatively (section VI in S1 Text).

The strong correlation between the speed and polarisation (Fig 4D) is consistent with previous studies on zebrafish [54, 55]. Such correlation had also been observed for different fish species [15, 28, 56]. The polarisation of the young fish was found to decrease (Fig 2D), during the adaptation process. This “schooling to shoaling” phenomenon had also been observed previously in a quasi 2 dimensional environment [51]. Our results, being quantitatively consistent with previous reports (section VI in S1 Text), suggest that this behaviour is present also in a fully three-dimensional context and that the change from schooling (ordered motion) to shoaling (disordered motion) is related to an increasingly disordered or uncorrelated behaviour, corresponding to the increase in the noise term η in the Vicsek model.

It is been speculated that all the biological systems were poised near the critical state, enjoying the maximum response to the environmental stimuli [57]. Here the inertial Vicsek model offers a supporting evidence to this claim. The fluctuation of the polarisation, the susceptibility, took a maximum value at moderate reduced persistence value κ ∼ 2, as illustrated Fig 4A. Also, the fish states were clustered around such region, where the fish can switch between the disordered behaviour and ordered behaviour swiftly. Such disordered but critical behaviour was also observed for the midges in the urban parks of Rome [18].

In conclusion, our work presents a quantitative study of the spatial and temporal correlations manifested by a large group of zebrafish. In our fully 3D characterisation, we have shown that there is a timescale separation between rapid reorientations at short times and the formation of a dynamical state with characteristic spatial correlations at longer times. Such spatial correlations evolve continuously and no steady state is observed in the time window of one hour. Our analysis shows that the continuously changing collective macroscopic states of the fish can be described quantitatively by the persistence length and nearest neighbour distance. The ratio of these length scales presents a characteristic correlation with the polarisation of the fish group. This simple relation is supported by an elementary agent based model in the class of the Vicsek models for collective behaviour.

Our analysis also opens multiple questions: the true nature of the interactions and how these are linked to the sensory and vision capabilities of the fish is open to debate; also, the reason for the change of the fish states remained unexplored, with the possibility of the fish learning over time about the experimental conditions. Our work shows that zebrafish provides a viable model system for the study of animal collective behaviour where such questions can be investigated in a quantitative manner.

A further intriguing possibility is to link the methodology that we develop here, with genetic modifications to zebrafish, for example with behavioural phenomena such as autism [27] or physical alterations such as the stiffened bone and cartilage [58].

Supporting information

S1 Text. The details on the experiments, the analysis, and simulations. And the comparison between our results and previous studies.

The detailed description of the tracking system was introduced in the first section, including the analysis on the overall tracking accuracy. The second section presented the details of the fish age. The third section discussed the details of the analysis, typically the calculation of the correlation functions. The fourth section showed the simulation parameters. The fifth section verified the scaling relationship between persistence length and noise in the Vicsek model. The sixth section presented the comparison between our result and previous results. The last section discussed different ways to collapse the experimental data.

(PDF)

S1 Dataset. The behavioural quantities, correlation functions, and simulation results to produce figures in the main text.

The results were organised in the json file format, and they can be parsed by common json libraries in different computer languages. The pedagogical code (S1 Code) was provided to aid the reader visualising the results.

(JSON)

S1 Code. The pedagogical code to explore the dataset and to generate the figures in the main text.

The code was written in Python language, and organised as a jupyter notebook.

(IPYNB)

S1 Video. Fifty young fish in the fast and ordered state.

The movie shows the 2D video and 3D trajectories of 50 young fish in real time. In the 3D plot, The dots represent the location of the fish, and the arrows represent the velocities of the fish. The length of the arrow indicates the value of the speed.

(MP4)

S2 Video. Fifty young fish in the slow and disordered state.

The movie shows the 2D video and 3D trajectories of 50 young fish in real time. In the 3D plot, The dots represent the location of the fish, and the arrows represent the velocities of the fish. The length of the arrow indicates the value of the speed.

(MP4)

S3 Video. Fifty old fish in the fast and disordered state.

The movie shows the 2D video and 3D trajectories of 50 old fish in real time. In the 3D plot, The dots represent the location of the fish, and the arrows represent the velocities of the fish. The length of the arrow indicates the value of the speed.

(MP4)

S4 Video. The reprojection error of the 3D tracking of 50 young fish.

The circles are 2D tracking results, and the cross markers are the reprojected 3D tracking results.

(MP4)

S5 Video. The reprojection error of the 3D tracking of 50 simulated fish.

The circles are 2D tracking results, and the cross markers are the reprojected 3D tracking results.

(MP4)

Acknowledgments

We thank James G. Puckett, Christos C. Ioannou, and James Herbert for stimulating conversations. This work was carried out using the computational facilities of the Advanced Computing Research Centre, University of Bristol—http://www.bris.ac.uk/acrc/.

Data Availability

All relevant data are within the manuscript and its Supporting information files.

Funding Statement

CLH and EK were funded by Versus Arthritis grants 21937 and 21211. YY was funded by the China Scholarship Council (grant 201700260078), and supported by a studentship provided by the Bristol Centre for Functional Nanomaterials (EPSRC Grant EP/L016648/1). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

References

  • 1. Liu G, Patch A, Bahar F, Yllanes D, Welch RD, Marchetti MC, et al. Self-Driven Phase Transitions Drive Myxococcus Xanthus Fruiting Body Formation. Phys Rev Lett. 2019;122(24):248102. doi: 10.1103/PhysRevLett.122.248102 [DOI] [PubMed] [Google Scholar]
  • 2. Cavagna A, Cimarelli A, Giardina I, Parisi G, Santagati R, Stefanini F, et al. Scale-Free Correlations in Starling Flocks. Proceedings of the National Academy of Sciences. 2010;107(26):11865–11870. doi: 10.1073/pnas.1005766107 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3. Makris NC, Ratilal P, Symonds DT, Jagannathan S, Lee S, Nero RW. Fish Population and Behavior Revealed by Instantaneous Continental Shelf-Scale Imaging. Science. 2006;311(5761):660–663. doi: 10.1126/science.1121756 [DOI] [PubMed] [Google Scholar]
  • 4. Deneubourg JL, Goss S. Collective Patterns and Decision-Making. Ethology Ecology & Evolution. 1989;1(4):295–311. doi: 10.1080/08927014.1989.9525500 [DOI] [Google Scholar]
  • 5. Pitcher TJ, Magurran AE, Winfield IJ. Fish in Larger Shoals Find Food Faster. Behav Ecol Sociobiol. 1982;10(2):149–151. doi: 10.1007/BF00300175 [DOI] [Google Scholar]
  • 6. Trenchard H, Perc M. Energy Saving Mechanisms, Collective Behavior and the Variation Range Hypothesis in Biological Systems: A Review. Biosystems. 2016;147:40–66. doi: 10.1016/j.biosystems.2016.05.010 [DOI] [PubMed] [Google Scholar]
  • 7. Hemelrijk C, Reid D, Hildenbrandt H, Padding J. The Increased Efficiency of Fish Swimming in a School. Fish Fish. 2015;16(3):511–521. doi: 10.1111/faf.12072 [DOI] [Google Scholar]
  • 8. Cavagna A, Conti D, Creato C, Del Castello L, Giardina I, Grigera TS, et al. Dynamic Scaling in Natural Swarms. Nature Phys. 2017;13(9):914–918. doi: 10.1038/nphys4153 [DOI] [Google Scholar]
  • 9. Méndez-Valderrama JF, Kinkhabwala YA, Silver J, Cohen I, Arias TA. Density-Functional Fluctuation Theory of Crowds. Nat Commun. 2018;9(1):3538. doi: 10.1038/s41467-018-05750-z [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Grünbaum D, Viscido S, Parrish JK. Extracting Interactive Control Algorithms from Group Dynamics of Schooling FIsh. In: Cooperative Control; 2005. p. 103–117.
  • 11. Dorigo M, Birattari M, Stutzle T. Ant Colony Optimization. IEEE Comput Intell Mag. 2006;1(4):28–39. doi: 10.1109/MCI.2006.329691 [DOI] [Google Scholar]
  • 12. Jia Y, Wang L. Leader–Follower Flocking of Multiple Robotic Fish. IEEE/ASME Trans Mechatron. 2015;20(3):1372–1383. doi: 10.1109/TMECH.2014.2337375 [DOI] [Google Scholar]
  • 13. Attanasi A, Cavagna A, Del Castello L, Giardina I, Melillo S, Parisi L, et al. Collective Behaviour without Collective Order in Wild Swarms of Midges. PLoS Comput Biol. 2014;10(7):e1003697. doi: 10.1371/journal.pcbi.1003697 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Ni R, Ouellette NT. On the Tensile Strength of Insect Swarms. Phys Biol. 2016;13(4):045002. doi: 10.1088/1478-3975/13/4/045002 [DOI] [PubMed] [Google Scholar]
  • 15. Gautrais J, Ginelli F, Fournier R, Blanco S, Soria M, Chaté H, et al. Deciphering Interactions in Moving Animal Groups. PLoS Comput Biol. 2012;8(9):e1002678. doi: 10.1371/journal.pcbi.1002678 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16. Bialek W, Cavagna A, Giardina I, Mora T, Silvestri E, Viale M, et al. Statistical Mechanics for Natural Flocks of Birds. Proceedings of the National Academy of Sciences. 2012;109(13):4786–4791. doi: 10.1073/pnas.1118633109 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17. Sinhuber M, Ouellette NT. Phase Coexistence in Insect Swarms. Phys Rev Lett. 2017;119(17):178003. doi: 10.1103/PhysRevLett.119.178003 [DOI] [PubMed] [Google Scholar]
  • 18. Attanasi A, Cavagna A, Del Castello L, Giardina I, Melillo S, Parisi L, et al. Finite-Size Scaling as a Way to Probe Near-Criticality in Natural Swarms. Phys Rev Lett. 2014;113(23):238102. doi: 10.1103/PhysRevLett.113.238102 [DOI] [PubMed] [Google Scholar]
  • 19. Bricard A, Caussin JB, Desreumaux N, Dauchot O, Bartolo D. Emergence of Macroscopic Directed Motion in Populations of Motile Colloids. Nature. 2013;503(7474):95–98. doi: 10.1038/nature12673 [DOI] [PubMed] [Google Scholar]
  • 20. Yan J, Han M, Zhang J, Xu C, Luijten E, Granick S. Reconfiguring Active Particles by Electrostatic Imbalance. Nature Mater. 2016;15(10):1095–1099. doi: 10.1038/nmat4696 [DOI] [PubMed] [Google Scholar]
  • 21. Vicsek T, Czirók A, Ben-Jacob E, Cohen I, Shochet O. Novel Type of Phase Transition in a System of Self-Driven Particles. Phys Rev Lett. 1995;75(6):1226–1229. doi: 10.1103/PhysRevLett.75.1226 [DOI] [PubMed] [Google Scholar]
  • 22. Couzin ID, Krause J, James R, Ruxton GD, Franks NR. Collective Memory and Spatial Sorting in Animal Groups. Journal of Theoretical Biology. 2002;218(1):1–11. doi: 10.1006/jtbi.2002.3065 [DOI] [PubMed] [Google Scholar]
  • 23. van der Vaart K, Sinhuber M, Reynolds AM, Ouellette NT. Mechanical Spectroscopy of Insect Swarms. Sci Adv. 2019;5(7):eaaw9305. doi: 10.1126/sciadv.aaw9305 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24. Giannini JA, Puckett JG. Testing a Thermodynamic Approach to Collective Animal Behavior in Laboratory Fish Schools. Phys Rev E. 2020;101(6):062605. doi: 10.1103/PhysRevE.101.062605 [DOI] [PubMed] [Google Scholar]
  • 25. Puckett JG, Pokhrel AR, Giannini JA. Collective Gradient Sensing in Fish Schools. Sci Rep. 2018;8(1):7587. doi: 10.1038/s41598-018-26037-9 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26. Jolles JW, Boogert NJ, Sridhar VH, Couzin ID, Manica A. Consistent Individual Differences Drive Collective Behavior and Group Functioning of Schooling Fish. Curr Biol. 2017;27(18):2862–2868.e7. doi: 10.1016/j.cub.2017.08.004 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27. Kim OH, Cho HJ, Han E, Hong TI, Ariyasiri K, Choi JH, et al. Zebrafish Knockout of Down Syndrome Gene, DYRK1A, Shows Social Impairments Relevant to Autism. Molecular Autism. 2017;8(1):50. doi: 10.1186/s13229-017-0168-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28. Tang W, Davidson JD, Zhang G, Conen KE, Fang J, Serluca F, et al. Genetic Control of Collective Behavior in Zebrafish. iScience. 2020;23(3):100942. doi: 10.1016/j.isci.2020.100942 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Pedersen M, Haurum JB, Bengtson SH, Moeslund TB. 3D-ZeF—a 3D Zebrafish Tracking Benchmark Dataset. CVPR. 2020;. [Google Scholar]
  • 30. Butail S, Paley DA. Three-Dimensional Reconstruction of the Fast-Start Swimming Kinematics of Densely Schooling Fish. J R Soc Interface. 2011;9(66):77–88. doi: 10.1098/rsif.2011.0113 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Wang SH, Liu X, Zhao J, Liu Y, Chen YQ. 3D Tracking Swimming Fish School Using a Master View Tracking First Strategy. 2016 IEEE International Conference on Bioinformatics and Biomedicine (BIBM). Proceedings—2016 IEEE International Conference on Bioinformatics and Biomedicine, BIBM 2016; 2017. p. 516–519.
  • 32. Cachat J, Stewart A, Utterback E, Hart P, Gaikwad S, Wong K, et al. Three-Dimensional Neurophenotyping of Adult Zebrafish Behavior. PLoS ONE. 2011;6(3):e17597. doi: 10.1371/journal.pone.0017597 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33. Saberioon MM, Cisar P. Automated Multiple Fish Tracking in Three-Dimension Using a Structured Light Sensor. Comput Electron Agric. 2016;121(C):215–221. doi: 10.1016/j.compag.2015.12.014 [DOI] [Google Scholar]
  • 34. Shelton DS, Shelton SG, Daniel DK, Raja M, Bhat A, Tanguay RL, et al. Collective Behavior in Wild Zebrafish. Zebrafish. 2020;17(4):243–252. doi: 10.1089/zeb.2019.1851 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35. Westerfield M. The Zebrafish Book: A Guide for the Laboratory Use of Zebrafish (Danio Rerio). University of Oregon Press. University of Oregon Press; 2000. [Google Scholar]
  • 36. Hartley R, Zisserman A. Multiple View Geometry in Computer Vision. Cambridge Books Online. Cambridge University Press; 2003. [Google Scholar]
  • 37. Cavagna A, Giardina I, Orlandi A, Parisi G, Procaccini A, Viale M, et al. The STARFLAG Handbook on Collective Animal Behaviour: 1. Empirical Methods. Animal Behaviour. 2008;76(1):217–236. doi: 10.1016/j.anbehav.2008.02.003 [DOI] [Google Scholar]
  • 38. Ouellette NT, Xu H, Bodenschatz E. A Quantitative Study of Three-Dimensional Lagrangian Particle Tracking Algorithms. Exp Fluids. 2006;40(2):301–313. doi: 10.1007/s00348-005-0068-7 [DOI] [Google Scholar]
  • 39. Xu H. Tracking Lagrangian Trajectories in Position–Velocity Space. Meas Sci Technol. 2008;19(7):075105. doi: 10.1088/0957-0233/19/7/075105 [DOI] [Google Scholar]
  • 40. Kelley DH, Ouellette NT. Emergent Dynamics of Laboratory Insect Swarms. Sci Rep. 2013;3(1):1073. doi: 10.1038/srep01073 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41. Stowers JR, Hofbauer M, Bastien R, Griessner J, Higgins P, Farooqui S, et al. Virtual Reality for Freely Moving Animals. Nat Methods. 2017;14(10):995–1002. doi: 10.1038/nmeth.4399 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42. Ling H, Mclvor GE, van der Vaart K, Vaughan RT, Thornton A, Ouellette NT. Costs and Benefits of Social Relationships in the Collective Motion of Bird Flocks. Nat Ecol Evol. 2019;3(6):943–948. doi: 10.1038/s41559-019-0891-5 [DOI] [PubMed] [Google Scholar]
  • 43. Mwaffo V, Anderson RP, Butail S, Porfiri M. A Jump Persistent Turning Walker to Model Zebrafish Locomotion. J R Soc Interface. 2015;12(102):20140884. doi: 10.1098/rsif.2014.0884 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44. Hansen JP, McDonald IR. Chapter 3—Static Properties of Liquids: Thermodynamics and Structure. In: Hansen JP, McDonald IR, editors. Theory of Simple Liquids (Fourth Edition). fourth edition ed. Oxford: Academic Press; 2013. p. 61–104. [Google Scholar]
  • 45. Ginelli F. The Physics of the Vicsek Model. Eur Phys J Spec Top. 2016;225(11-12):2099–2117. doi: 10.1140/epjst/e2016-60066-8 [DOI] [Google Scholar]
  • 46. Ballerini M, Cabibbo N, Candelier R, Cavagna A, Cisbani E, Giardina I, et al. Empirical Investigation of Starling Flocks: A Benchmark Study in Collective Animal Behaviour. Anim Behav. 2008;76(1):201–215. doi: 10.1016/j.anbehav.2008.02.004 [DOI] [Google Scholar]
  • 47. Ling H, Mclvor GE, Westley J, Vaart K, Vaughan RT, Thornton A, et al. Behavioural Plasticity and the Transition to Order in Jackdaw Flocks. Nat Commun. 2019; p. 1–7. doi: 10.1038/s41467-019-13281-4 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 48. Silverberg JL, Bierbaum M, Sethna JP, Cohen I. Collective Motion of Humans in Mosh and Circle Pits at Heavy Metal Concerts. Phys Rev Lett. 2013;110(22):228701. doi: 10.1103/PhysRevLett.110.228701 [DOI] [PubMed] [Google Scholar]
  • 49. van der Vaart K, Sinhuber M, Reynolds AM, Ouellette NT. Environmental Perturbations Induce Correlations in Midge Swarms. J R Soc Interface. 2020;17(164):20200018. doi: 10.1098/rsif.2020.0018 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50. Delaney M, Follet C, Ryan N, Hanney N, Lusk-Yablick J, Gerlach G. Social Interaction and Distribution of Female Zebrafish (Danio Rerio) in a Large Aquarium. The Biological Bulletin. 2002;203(2):240–241. doi: 10.2307/1543418 [DOI] [PubMed] [Google Scholar]
  • 51. Miller N, Gerlai R. From Schooling to Shoaling: Patterns of Collective Motion in Zebrafish (Danio Rerio). PLoS ONE. 2012;7(11):e48865. doi: 10.1371/journal.pone.0048865 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52. Pérez-Escudero A, de Polavieja GG. Adversity Magnifies the Importance of Social Information in Decision-Making. J R Soc Interface. 2017;14(136):20170748. doi: 10.1098/rsif.2017.0748 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53. Miller N, Gerlai R. Quantification of Shoaling Behaviour in Zebrafish (Danio Rerio). Behavioural Brain Research. 2007;184(2):157–166. doi: 10.1016/j.bbr.2007.07.007 [DOI] [PubMed] [Google Scholar]
  • 54. Miller N, Greene K, Dydinski A, Gerlai R. Effects of Nicotine and Alcohol on Zebrafish (Danio Rerio) Shoaling. Behav Brain Res. 2013;240:192–196. doi: 10.1016/j.bbr.2012.11.033 [DOI] [PubMed] [Google Scholar]
  • 55. Heras FJH, Romero-Ferrero F, Hinz RC, de Polavieja GG. Deep Attention Networks Reveal the Rules of Collective Motion in Zebrafish. PLoS Comput Biol. 2019;15(9):e1007354. doi: 10.1371/journal.pcbi.1007354 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56. Tunstrøm K, Katz Y, Ioannou CC, Huepe C, Lutz MJ, Couzin ID. Collective States, Multistability and Transitional Behavior in Schooling Fish. PLoS Comput Biol. 2013;9(2):e1002915. doi: 10.1371/journal.pcbi.1002915 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57. Mora T, Bialek W. Are Biological Systems Poised at Criticality? J Stat Phys. 2011;144(2):268–302. doi: 10.1007/s10955-011-0229-4 [DOI] [Google Scholar]
  • 58. Lawrence EA, Kague E, Aggleton JA, Harniman RL, Roddy KA, Hammond CL. The Mechanical Impact of Col11a2 Loss on Joints; Col11a2 Mutant Zebrafish Show Changes to Joint Development and Function, Which Leads to Early-Onset Osteoarthritis. Philos Trans R Soc B Biol Sci. 2018;373(1759):20170335. doi: 10.1098/rstb.2017.0335 [DOI] [PMC free article] [PubMed] [Google Scholar]
PLoS Comput Biol. doi: 10.1371/journal.pcbi.1009394.r001

Decision Letter 0

James AR Marshall, Ville Mustonen

25 Oct 2021

Dear Mr. Yang,

Thank you very much for submitting your manuscript "Dominating Lengthscales of Zebrafish Collective Behaviour" for consideration at PLOS Computational Biology. As with all papers reviewed by the journal, your manuscript was reviewed by members of the editorial board and by several independent reviewers. The reviewers appreciated the attention to an important topic. Based on the reviews, we are likely to accept this manuscript for publication, providing that you modify the manuscript according to the review recommendations.

Please prepare and submit your revised manuscript within 30 days. If you anticipate any delay, please let us know the expected resubmission date by replying to this email.

When you are ready to resubmit, please upload the following:

[1] A letter containing a detailed list of your responses to all review comments, and a description of the changes you have made in the manuscript. Please note while forming your response, if your article is accepted, you may have the opportunity to make the peer review history publicly available. The record will include editor decision letters (with reviews) and your responses to reviewer comments. If eligible, we will contact you to opt in or out

[2] Two versions of the revised manuscript: one with either highlights or tracked changes denoting where the text has been changed; the other a clean version (uploaded as the manuscript file).

Important additional instructions are given below your reviewer comments.

Thank you again for your submission to our journal. We hope that our editorial process has been constructive so far, and we welcome your feedback at any time. Please don't hesitate to contact us if you have any questions or comments.

Sincerely,

James A.R. Marshall, BSc, PhD

Associate Editor

PLOS Computational Biology

Ville Mustonen

Deputy Editor

PLOS Computational Biology

***********************

A link appears below if there are any accompanying review attachments. If you believe any reviews to be missing, please contact ploscompbiol@plos.org immediately:

[LINK]

Reviewer's Responses to Questions

Comments to the Authors:

Please note here if the review is uploaded as an attachment.

Reviewer #1: This is a review of the manuscript “Dominating Lengthscales of Zebrafish Collective Behaviour”.

The authors present research that examines how various behavior metric depend on two length scales using 3D tracking of schools of 50 zebrafish. The experiments showed that the two length scales – the persistence length and nearest neighbor distance – correlate with the polarization. The authors use simulations to support their claim. This code is made publically available on github – though this could benefit from better readme files and documentation.

In my opinion this work is well-suited for publication in PLOS computational biology given it meets the criteria for publication (originality, innovation, importance to researchers in the field, insight, methodology and conclusions).

I have a few questions and comments that I would like the authors to address/answer:

1) How does the inaccuracy in tracking (Fig S3), where about 90% of fish are tracked each frame, affect the nearest neighbor statistics? It seems to me that tracking is more likely to lose fish that are occluded or near other fish and this may be a systematic error in the nearest neighbor distance metric. This effect even is shown in the figure. How does this impact the ratio and its correlation to polarization?

2) How does the nearest neighbor distance compare with the average distance to neighbors (e.g. through Delauney triangulation)? This may be a more robust statistic.

3) In the SI, you cite an early literature which remarks on the difficulties of stereomatching through an index change (air-water). Since this is not been done in more recent literature, could the authors provide more details about how the index change affects the measurement of the depth of the fish in the tank?

4) Fig 2 is very difficult to read as markers are nearly identical to my eye (diamonds and circles) One solution may be replace the diamonds with stars.

5) Also, in Fig 2, there is a large jump in several quantities at 5 min and 40 min. Could these jumps be ‘startle’ responses? It’s been reported that vibrations (from something like a door closing in another room of the building) can cause the fish to respond like this.

6) What are the uncertainties for the fit to the plan for Fig 3b? How ‘thick’ is this plane?

7) The cameras are reported as Basler acA2040 um, which from a quick search is 3.2MP. Could this information and the size of fish in px be provided in the SI or text?

8) Activity in fish schools has been shown to depend on temperature. The authors state that the fish are kept in water maintained at 25C. In the paper, this is reported as the living tank temperature. I’ll assume that this is the same for the experimental tank. Since this temperature is higher than room temperature, how is the experimental tank maintained at 25C?

9) In the text page 13, the authors report that fish are keep in living tanks with a density of 10fish/L. But some details are missing. Are the same group of fish used for each test (Y1,Y2,O1,O2, etc)? Or are several living tanks collected to make a school of 50 fish for the experiment? How many fish are there in each living tank?

10) Several typos are present in the text an supplemental information. I will include a few here:

Text p8 ‘Tis’ -> this

SI p 6 ‘wold’ -> old

Reviewer #2: Overall, a nice interesting paper. It would benefit from some more controls to be convincing. Regarding language, there is room for improvement, particularly in the methods.

Important comments:

- You put a lot of stress into the fact that the group is studied in 3D and not in 2D. However, Fig 1c suggests that zebrafish are most of the time in a pseudo-2D conformation. Maybe you can report the standard deviation of z and x-y fish locations from the group center of mass?

- I miss some exploration about how other variables fall into the framework of the two length scales. For example, speed seems to correlate a lot with polarisation (Miller&Gerlai and your figure 2), and it seems to increase alignment (e.g. Heras et al. "Deep attention networks reveal the rules of collective motion in zebrafish", 2019), so I suspect you will see some correlation between speed and the length scales. One of the main contributions of the manuscript is to show the two length scales as useful to describe collective motion, so some effort to try to test whether other variables are useful as well (or more useful) is important.

- One of the main results is the relation between \\kappa and the polarisation. Again, is it much better than the relation between speed (or other variable) and polarisation? This is of utmost important, because the Vicsek model you use to validate your ideas has a constant speed for all agents.

- Regarding the discussion, stress/relaxation is mentioned in Miller & Gerlai (2012) as a possible explanation of the decrease in polarization of the group after spending some time in the same tank. There is a nice discussion about this effect in Miller & Gerlai, and also some more modern theoretical studies that are worth mentioning (e.g. Perez-Escudero et al. "Adversity magnifies the importance ofsocial information in decision-making", 2017).

Minor comments, typos and optional suggestions:

A lot of variables to remember, so I think a table of symbols could be useful. Some optional suggestions:

- Maybe all length constants as l with varying subindices: l_0, l_p ...

- Maybe all time constants as \\tau with varying subindices

When possible, I would suggest avoiding the use of several terms for the same thing (confusing to the reader):

- zebrafish/Zebrafish

- group/cluster

- ordered/polarised/alligned

- disordered/randomised

- orientation/direction

pag 2

- is it really "tens of kilometers"?

- The sentence "The emergence of..." contains two parts with two unrelated ideas. What about separating in two sentences.

pag 3

- "birds of shoal" > "birds or shoal"

pag 4

- "and that the density distribution is inhomogenous" is redundant (you say how it is inhomogenous just before)

pag 5

- The polarisation order parameter not exactly as in [20] (in 20 all animals have same speed). I would recommend citing any paper with the same definition (e.g. Cavagna et al.).

pag 6

- "We note that while... ...on time differences". Unsure about what you mean here, or why this is worth noting. Is it a statement about which quantities change if we change the time units?

pag 7

- "we focus on the fish center of mass". Of the group or each of individual fish? I guess the latter, but then unclear why this is mentioned here, as all previous analysis consider fish as point particles.

- "characteristic of Zebrafish behaviour". Maybe remove as it is explained two sentences later? Alternatively, cite 37 here?

pag 8

- "Tis" > "This"

- "polar order" > "polarisation order"

- "Cohesive but dilute". What is dilute? Maybe you mean "Separated and ordered"

- "larger persistence lengths, neighbour distances and polarisations" > "longer persistence lengths, shorter neighbour distances and larger polarisations"

pag 9

- in third line you refer directly to R2 but it is inside brackets

- "... suggests a metric based interaction rule ..." this seems an interesting observation. Maybe you cound give more details about it?

- The sentence "A further simplification..." needs to be rewritten

pag 10

- the definition of C(r) is missing something (what happens to index j ?).

- "constant ballistic movements", maybe better "straight movement with constant speed"?

pag 11

- "the persistence length scales as..." Is this a new result, or something known about the Vicsek model? Needs clarification or citation

pag 12

- Is the distribution of polarisation bimodal, as in Miller&Gerlai 2012?

pag 13

- Missing github links

**********

Have the authors made all data and (if applicable) computational code underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data and code underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data and code should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data or code —e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: No: I could not check, as missing links in main manuscript

**********

PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

Figure Files:

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email us at figures@plos.org.

Data Requirements:

Please note that, as a condition of publication, PLOS' data policy requires that you make available all data used to draw the conclusions outlined in your manuscript. Data must be deposited in an appropriate repository, included within the body of the manuscript, or uploaded as supporting information. This includes all numerical values that were used to generate graphs, histograms etc.. For an example in PLOS Biology see here: http://www.plosbiology.org/article/info%3Adoi%2F10.1371%2Fjournal.pbio.1001908#s5.

Reproducibility:

To enhance the reproducibility of your results, we recommend that you deposit your laboratory protocols in protocols.io, where a protocol can be assigned its own identifier (DOI) such that it can be cited independently in the future. Additionally, PLOS ONE offers an option to publish peer-reviewed clinical study protocols. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols

References:

Review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the rebuttal letter that accompanies your revised manuscript.

If you need to cite a retracted article, indicate the article’s retracted status in the References list and also include a citation and full reference for the retraction notice.

PLoS Comput Biol. doi: 10.1371/journal.pcbi.1009394.r003

Decision Letter 1

James AR Marshall, Ville Mustonen

9 Dec 2021

Dear Mr. Yang,

We are pleased to inform you that your manuscript 'Dominating Lengthscales of Zebrafish Collective Behaviour' has been provisionally accepted for publication in PLOS Computational Biology.

Before your manuscript can be formally accepted you will need to complete some formatting changes, which you will receive in a follow up email. A member of our team will be in touch with a set of requests.

Please note that your manuscript will not be scheduled for publication until you have made the required changes, so a swift response is appreciated.

IMPORTANT: The editorial review process is now complete. PLOS will only permit corrections to spelling, formatting or significant scientific errors from this point onwards. Requests for major changes, or any which affect the scientific understanding of your work, will cause delays to the publication date of your manuscript.

Should you, your institution's press office or the journal office choose to press release your paper, you will automatically be opted out of early publication. We ask that you notify us now if you or your institution is planning to press release the article. All press must be co-ordinated with PLOS.

Thank you again for supporting Open Access publishing; we are looking forward to publishing your work in PLOS Computational Biology. 

Best regards,

James A.R. Marshall, BSc, PhD

Associate Editor

PLOS Computational Biology

Ville Mustonen

Deputy Editor

PLOS Computational Biology

***********************************************************

Reviewer's Responses to Questions

Comments to the Authors:

Please note here if the review is uploaded as an attachment.

Reviewer #1: The authors have satisfied all questions and comments. The amendments and edits to the text greatly helped to clarify the work. I recommend that this be published without need for further revision.

Reviewer #2: A suggestion regarding figure R8: I think it is of general interest, so I would include it in the supplement; maybe together with some sort of quantification of the quality of the collapse, if that is possible.

Otherwise, I am fully satisfied with the authors' changes and explanations. Congratulations on the interesting results!

**********

Have the authors made all data and (if applicable) computational code underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data and code underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data and code should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data or code —e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

**********

PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

PLoS Comput Biol. doi: 10.1371/journal.pcbi.1009394.r004

Acceptance letter

James AR Marshall, Ville Mustonen

7 Jan 2022

PCOMPBIOL-D-21-01528R1

Dominating Lengthscales of Zebrafish Collective Behaviour

Dear Dr Yang,

I am pleased to inform you that your manuscript has been formally accepted for publication in PLOS Computational Biology. Your manuscript is now with our production department and you will be notified of the publication date in due course.

The corresponding author will soon be receiving a typeset proof for review, to ensure errors have not been introduced during production. Please review the PDF proof of your manuscript carefully, as this is the last chance to correct any errors. Please note that major changes, or those which affect the scientific understanding of the work, will likely cause delays to the publication date of your manuscript.

Soon after your final files are uploaded, unless you have opted out, the early version of your manuscript will be published online. The date of the early version will be your article's publication date. The final article will be published to the same URL, and all versions of the paper will be accessible to readers.

Thank you again for supporting PLOS Computational Biology and open-access publishing. We are looking forward to publishing your work!

With kind regards,

Zsanett Szabo

PLOS Computational Biology | Carlyle House, Carlyle Road, Cambridge CB4 3DN | United Kingdom ploscompbiol@plos.org | Phone +44 (0) 1223-442824 | ploscompbiol.org | @PLOSCompBiol

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 Text. The details on the experiments, the analysis, and simulations. And the comparison between our results and previous studies.

    The detailed description of the tracking system was introduced in the first section, including the analysis on the overall tracking accuracy. The second section presented the details of the fish age. The third section discussed the details of the analysis, typically the calculation of the correlation functions. The fourth section showed the simulation parameters. The fifth section verified the scaling relationship between persistence length and noise in the Vicsek model. The sixth section presented the comparison between our result and previous results. The last section discussed different ways to collapse the experimental data.

    (PDF)

    S1 Dataset. The behavioural quantities, correlation functions, and simulation results to produce figures in the main text.

    The results were organised in the json file format, and they can be parsed by common json libraries in different computer languages. The pedagogical code (S1 Code) was provided to aid the reader visualising the results.

    (JSON)

    S1 Code. The pedagogical code to explore the dataset and to generate the figures in the main text.

    The code was written in Python language, and organised as a jupyter notebook.

    (IPYNB)

    S1 Video. Fifty young fish in the fast and ordered state.

    The movie shows the 2D video and 3D trajectories of 50 young fish in real time. In the 3D plot, The dots represent the location of the fish, and the arrows represent the velocities of the fish. The length of the arrow indicates the value of the speed.

    (MP4)

    S2 Video. Fifty young fish in the slow and disordered state.

    The movie shows the 2D video and 3D trajectories of 50 young fish in real time. In the 3D plot, The dots represent the location of the fish, and the arrows represent the velocities of the fish. The length of the arrow indicates the value of the speed.

    (MP4)

    S3 Video. Fifty old fish in the fast and disordered state.

    The movie shows the 2D video and 3D trajectories of 50 old fish in real time. In the 3D plot, The dots represent the location of the fish, and the arrows represent the velocities of the fish. The length of the arrow indicates the value of the speed.

    (MP4)

    S4 Video. The reprojection error of the 3D tracking of 50 young fish.

    The circles are 2D tracking results, and the cross markers are the reprojected 3D tracking results.

    (MP4)

    S5 Video. The reprojection error of the 3D tracking of 50 simulated fish.

    The circles are 2D tracking results, and the cross markers are the reprojected 3D tracking results.

    (MP4)

    Attachment

    Submitted filename: response_to_reviewers.pdf

    Data Availability Statement

    All relevant data are within the manuscript and its Supporting information files.


    Articles from PLoS Computational Biology are provided here courtesy of PLOS

    RESOURCES