# Illuminance-tuned collective motion in fish

Baptiste Lafoux, Jeanne Moscatelli, Ramiro Godoy-Diana, Benjamin Thiria

► To cite this version:

Baptiste Lafoux, Jeanne Moscatelli, Ramiro Godoy-Diana, Benjamin Thiria. Illuminance-tuned collective motion in fish. Communications Biology, 2023, 6 (1), pp.585. 10.1038/s42003-023-04861-8.
hal-04290336

HAL Id: hal-04290336

https://hal.science/hal-04290336v1

Submitted on 16 Nov 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_2.png" /></figure>

# Illuminance-tuned collective motion in fish

Baptiste Lafoux<sup>1,2✉</sup>, Jeanne Moscatelli<sup>1,2</sup>, Ramiro Godoy-Diana<sup>1,2✉</sup> & Benjamin Thiria<sup>1,2✉</sup>

We experimentally investigate the role of illumination on the collective dynamics of a large school (ca. 50 individuals) of *Hemigrammus rhodostomus*. The structure of the group, defined using two order parameters, is quantified while progressively altering the visual range of the fish through controlled cycles of ambient light intensity. We show that, at low light levels, the individuals within the group are unable to form a cohesive group, while at higher illu- minance the degree of alignment of the school correlates with the light intensity. When increasing the illuminance, the school structure is successively characterized by a polarized state followed by a highly regular and stable rotational configuration (milling). Our study shows that vision is necessary to achieve cohesive collective motion for free swimming fish schools, while the short-range lateral line sensing is insufficient in this situation. The present experiment therefore provides new insights into the interaction mechanisms that govern the emergence and intensity of collective motion in biological systems.

<footnote n="1">¹Laboratoire de Physique et Mécanique des Milieux Hétérogènes (PMMH), CNRS UMR 7636, ESPCI Paris—PSL Research University, Sorbonne Université— Université Paris Cité, 10 rue Vauquelin, 75005 Paris, France. ²These authors contributed equally: Baptiste Lafoux, Jeanne Moscatelli, Ramiro Godoy-Diana, Benjamin Thiria. ✉email: baptiste.lafoux@espci.fr; ramiro@espci.fr; benjamin.thiria@espci.fr</footnote>
Collective behavior during locomotion is a fascinating phenomenon observed in many living systems, ranging from bacterial colonies¹,² to human crowds³,⁴ and starling murmurations⁵,⁶. These motions are characterized by synchronized movements on large scales of time and space⁷, emerging from local, short-range interactions between nearest neighbors⁸.

Fish provide a typical example of such self-organization, with a natural tendency to form ordered groups, known as swarms or schools⁹. Over 50% of fish species exhibit schooling behavior¹⁰, which confers benefits such as protection against predators¹¹, improved foraging¹², and reduced cost of locomotion to the group¹³,¹⁴.

From a practical point of view, schooling involves, for each individual in the group, a knowledge of both position in space and kinematics of close neighbors¹⁵,¹⁶. In order to get this information, fish rely on vision, sensing of hydrodynamic disturbances and chemo-olfactory cues¹⁷,¹⁸. The role of each of these senses is not clearly elucidated today¹⁹, but it is generally accepted that vision and hydrodynamic sensing are the most predominant²⁰,²¹.

To sense hydrodynamic disturbances, fish use their lateral line system²². This ability has been suggested to be a factor in the formation of fish schools²³. It is possible to impair the functioning of the lateral line of fish, resulting in a modified schooling behavior²³⁻²⁵. However, this kind of invasive procedure may alter the behavior of the fish in an unexpected manner.

Another way of quantifying the main sensory mechanisms for swimming interaction is to evaluate the role of vision. For instance, the ambient light level can modify the collective response of schooling fish in different situations²⁶,²⁷. Recently, McKee et al.²⁸ compared the role of the lateral line and vision in schooling fish. They suggested, based on experiments with 5 fish, that although both lateral line and vision are involved in the interaction between individuals, vision should be sufficient for schooling.

Previous studies²⁰,²⁹ have also addressed the problem of vision with larger schools (20–30 fish), and showed that fish wearing opaque eye covers were able to maintain collective motion, using their lateral line system only. However, in these experiments, only

<figure><img src="image_3.png" /><figcaption>**Fig. 1** Experimental setup. Groups of fish of around 50 individuals swim freely in a large and shallow tank, while the ambient illumination is continuously modified over time, using a video projector. The whole system is backlit using a custom-build infrared LED panel, and the movements of the fish are recorded with an overhanging camera filming only the IR at 5 frames per second (the visible light is filtered to avoid that its variations alter the lighting conditions of the videos).</figcaption></figure>

one fish was blinded and placed back in a normal school, which limits the conclusions in terms of collective motion.

It has been found that fish reduce or completely suppress schooling behavior below a certain light threshold, that can vary across species³⁰,³¹. However, these experiments were conducted on 4 to 6 fish and therefore do not provide evidence for specific behaviors that may occur when increasing the number of individuals in the school. Furthermore, the question was tackled in terms of an abrupt limit between a cohesive and a non-cohesive state, without considering the effect of an increase in light level over a wide range once these thresholds are exceeded.

In this work, we go further in addressing the role of vision in the formation of large groups of fish, by altering the vision of all individuals at once. For that purpose, we chose to work with a species of highly cohesive fish, *Hemigrammus rhodostomus*, freely swimming in a large and shallow water tank. The available visual information is gradually altered by modifying the illumination over time, with two cycles of increasing then decreasing ramps. In addition to quantifying the role of vision, our study allows us to evaluate the role of the lateral line in a non-invasive way (typically, the response of fish in an experiment without light informs on their hydrodynamic sensing capabilities). Moreover, the progressive nature of the light variation enables use to fully resolve the transition from non-cohesive to cohesive motion. In contrast with similar previous studies, we worked on schools composed of a large number of individuals (around 50), allowing for a robust statistical analysis of the collective behavior parameters.

The evolution of the parameters characterizing the group cohesion clearly shows that the fish group is unable to organize collectively until the light intensity is sufficient for the fish to see each other. This conclusion is supported by a complete description of the transition from disordered to ordered group dynamics as a function of individual visual capacities.

## Results

Our experimental apparatus allows groups of around $N = 50$ fish to swim freely in a wide tank while controlling the illuminance $E$ of their environment (Fig. 1). During one hour, the ambient illumination is modified over time on a large range (from 0 lux to $E_{max} = 900$ lux). The light level is gradually increased and then decreased over a period of 15 min in a repeated pattern (two up-down sequences, see the dashed line in Fig. 3).

Fish are recorded using an overhead camera, from which two-dimensional trajectories are extracted with FastTrack, an open-source tracking software³² (Fig. 2). In order to quantify the relationship between the fish school organization and the illumination level, we compute two physical quantities that characterize the level of order and cohesion within the group, in terms of alignment and rotation. The alignment (polarization $P$) and rotation (milling $M$) order parameters are defined as follows¹⁵:

$$P = \left| \left\langle \frac{\mathbf{v}_i}{\|\mathbf{v}_i\|} \right\rangle_{i \in 1..N} \right|, \quad \text{and} \quad M = \left| \left\langle \frac{\mathbf{r}_i \times \mathbf{v}_i}{\|\mathbf{r}_i\| \|\mathbf{v}_i\|} \right\rangle_{i \in 1..N, \|\mathbf{r}_i\| < L} \right| \quad (1)$$

where $v_i$ (resp. $r_i$) is the instantaneous velocity vector (resp. the position with respect to the school instantaneous center of mass of the $i$-th fish) (Fig. 2). $\langle \cdot \rangle$ denotes the averaging operator over all fish in the school. These parameters both range from 0 to 1 and quantify how much the individuals within the school are aligned along the same direction ($P$) or rotating around the center of mass of the group ($M$). We use a slightly modified expression of $M$ to discard cases where the fish are spread over all the tank area and swim along the borders, artificially producing high values of the milling parameter $M$, even when the group is not cohesive and no collective milling motion is observed in reality. $M$ is thus
<figure><img src="image_4.png" /><figcaption>**Fig. 2** Snapshot of 53 fish swimming under illuminance *E* = 810 lx. The group motion is captured at 5 fps with a high-resolution camera. From the videos, we reconstruct the individual trajectories of each animal (2D position and velocity at each time step). Zoom-in: 5 previous positions (1s-period, gray dots) and current velocity vectors from tracking data. For the *i*-th fish, we denote **v**ᵢ, the instantaneous velocity and **r**ᵢ, the position with respect to the school current center of mass *O*.</figcaption></figure>

defined in such a way that we only consider contributions from fish whose distance from the center of mass ||**r**ᵢ|| is less than a threshold value *L*, chosen to be half the short length of the tank (*L* = 50 cm).

In addition, we also quantify two intrinsic characteristic lengths of the fish school: the Nearest-Neighbor Distance (NN-D) and the Inter-Individual Distance (II-D). For a given individual, the NN-D is the distance to the closest fish and the II-D is the average distance to all the other fish.

Variations of illumination strongly influence the values of the milling and polarization parameters (Friedman test, *M*: $\chi^2(8) = 20.07$, *p* = 1.21 × 10⁻³, *P*: $\chi^2(8) = 22.50$, *p* = 4.2 × 10⁻⁴). Sharp contrasts in behavior are observed, with three clearly identifiable phases. On Fig. 3, we represent a time series of the values of *P*, *M*, and the normalized illuminance level $\bar{E} = E/E_{max}$ (see also Supplementary Movie 1).

When placed in very dark conditions ($\bar{E} < 0.05$), fish occupy the entire tank area and move without clear group organization: the average distance between individuals (average II-D) is about 18 body lengths (BL) and fish are placed 1.6 (±0.2) BL away from their nearest neighbor (average NN-D). Both the rotation parameter and the polarization are very low ($M < 0.1$, $P < 0.2$), showing no significant cohesive movement (Fig. 3a).

As the light gradually increases ($\bar{E} \in [0.05, 0.2]$), a short phase of strong alignment is visible (Fig. 3b 1–2), still with a weak but increasing value of the rotation parameter value. Further on, *M* keeps increasing linearly with illuminance, while the polarization drops ($P < 0.2$) to eventually reach a plateau for $\bar{E} > 0.6$ where the behavior in terms of both rotation and polarization does not change anymore. The school is highly structured, showing a very robust and stable rotational motion ($M > 0.6$) with almost no interruption (Fig. 3c 1–2). The succession of these phases as a function of illumination is observed repeatedly with great statistical stability, whether the light is following an ascending or descending ramp.

Figure 4 displays the averaged results obtained over 24 different cycles of the illuminance varying experiments (see Methods). The top graphic (Fig. 4a) shows the evolutions of both *M* and *P* with respect to normalized illuminance level $\bar{E}$. The behavior described for a single experiment in Fig. 3 is found again in the average curves of Fig. 4a: while the milling parameter increases

<figure><img src="image_5.png" /><figcaption>**Fig. 3** The structure of a fish school varies when the environment light level is modified over time. **a)** Time signal of the order parameters for a group of 53 fish experiencing a variation of normalized illuminance $\bar{E}$ (Dots: raw signal every 1 s. Lines: signal average with a rolling window of 60 s). *P* is the polarization parameter and *M* the milling parameter. After a 10 min adaptation period in the dark, the group is subjected to slow variations of illuminance, increasing then decreasing, between 0 ± 0.1 lx and $E_{max} = 900$ lx. **b)** Trajectories snapshots at normalized illuminance $\bar{E} = \{0, 0.22, 0.83, 0.10, 0.89\}$ (black lines represent trajectories over the last 12 frames, i.e., 2.4 s).</figcaption></figure>

monotonically with illuminance, the polarization parameter peaks rapidly and decreases afterwards to a plateau.

Figure 4b shows the Nearest-Neighbour Distance (NN-D) and the Inter-Individual Distance (II-D) in Body Lengths (1 BL ≈ 3.9 cm). It is worth noting that in its averaged form, the II-D gives a good approximation of the characteristic size of the school. As can be observed, both characteristic lengths are large when there is no illumination: the average distance between the fish is about 20 BL and the distance to the nearest neighbor is 1.7 BL at the most. This case corresponds to a swarming behavior, without cohesion in the group, as confirmed by Fig. 3a. The fish are distributed throughout the tank space and swim independently with respect to each other. These quantities rapidly
<figure><img src="image_6.png" /><figcaption>**Fig. 4** Fish school order parameters and distances with respect to light intensity. Solid lines show values averaged over every trials (N = 6) and every light ramps (either increasing or decreasing, 4 for each trial), which represents 24 replicates. (The shaded region is the 95% confidence interval for the mean). **a** Polarization and milling parameter. **b** Nearest-Neighbour Distance (NN-D) and Inter-Individual Distance (II-D) in Body Lengths. For a given individual, the NN-D is the distance to the closest fish and the II-D is the average distance to all the other fish. Values displayed here are averaged over all individuals in the school. (The scales for NN-D and II-D are different).</figcaption></figure>

decrease, showing that the individuals within the group get closer to each other as light intensity increases. II-D eventually saturates to a constant value above an illuminance threshold around *E* = 0.1. As can be observed, the average distance stabilizes around 8 BL, while the NN-D increases progressively before stabilizing around 1.5 BL after *E* = 0.5, which shows that, within a group of a given size (quantified by the II-D), a better quality of the visual information lets these highly cohesive fish reorganize, finding more regular patterns leaving more space between themselves and their nearest neighbor.

It is known that fish can exhibit changes in their behavior in experiments over time³³. An additional set of experiments conducted at a fixed illumination level for one hour allowed us to reject the hypothesis that the variations of *M*, *P*, II-D, and NN-D observed here could be due to the time elapsed since the beginning of the experiment (see Supplementary Table 1 and Supplementary Fig. 4).

Discussion

The reading of both Figs. 3 and 4 is here straightforward. In the absence of light, or with insufficient lighting, fish are unable to give rise to coherent and cohesive group dynamics. We also observed that above a certain threshold, the properties characterizing the collective dynamics do not statistically change with

the degree of light intensity and tend to saturate to a constant value. This remark of course holds for the range of illuminance used for this work ($E \in [0, 900]$ lx) and the global behavior of the group might change with higher values of $E$. However, the range used in this work corresponds to lighting values in natural habitats for this kind of animals³⁴. This sheds light on the recent discussion on the respective roles of vision and lateral line sensing in the appearance of cohesive behaviors. Our observation in the absence of light suggests that lateral line sensing is not sufficient for the group to form a school in free swimming.

Moreover, the quality of the visual cue seems to be paired with the capacity of the individuals to achieve collective swimming. It is worth noting again that the conclusions brought with this work are based on a large number of individuals constituting the group. This contrasts with most of past studies³⁵⁻³⁷ that characterized cohesion and collective dynamics under a changing illuminance using a reduced group of fish (<10 individuals), then mainly focusing on local interactions. Thus, this study constitutes the first experimental work examining vision-based global behavior of a large scale group of fish.

In addition, the stable milling motion observed here with sufficient lighting may in fact be induced by the interaction with walls³⁸. Figure 4a shows that the group polarization starts decreasing after exceeding the visual threshold. This decrease is coupled with the amplification of the milling parameter characterizing the group rotation around its center of mass. Thus, considering that fish tend to align with each other as their ability to see other individuals in the group is enhanced by a brighter environment, the milling behavior could be the simple consequence of being aligned in a confined space. Indeed, the alignment can be either quantified by the polarization or milling parameter, both having the same role in that particular geometry: while the polarization quantifies the alignment along lines, the milling parameters can be understood as a measure of an alignment along circles around the center of the group. The effect of confinement on this transition from polarization to milling is the subject of further investigations.

Methods

**Fish breeding.** Rummy-nose tetra (*Hemigrammus rhodostomus*, BL = 3.92 ± 0.42 cm) were bought from a professional supplier (EFV group, http://www.efvnet.net). Fish were kept in a 120 L tank on a 14:10 h photoperiod (day:night), similar to that existing at their latitudes of origin. The water temperature was maintained at 27 °C (±1 °C) and fish were fed ad libitum with fine pellets from an automated feeder once a day, at a fixed time in the morning. The fish handling protocol complies with the European Directive 2010/63/EU for the protection of animals used for scientific purposes, as certified by the ESPCI Paris Ethics Committee.

**Experimental setup.** The experimental setup consists of a large shallow tank with a working area of 140 × 100 cm. This area was illuminated by visible light produced by a video projector (BenQ, 1920 × 1080 pixels) placed 280 cm above the water surface. To vary the light intensity, uniform images were projected, with shades of gray ranging from 0 to 255 (from complete black to maximum illumination). We measured with a luxmeter that the corresponding light intensity in the tank ranges from 0 to 900 lux (±3%). These levels of light intensity are comparable to those existing in the natural environment of origin of the tetra fish, as well as in their breeding conditions. The maximum value $E_{max}$ = 900 lux corresponds to the illumination on a clear sunny day.

In order to visualize the fish regardless of the lighting conditions, the tank was lit from the bottom by an infrared LED panel (200 W, $\lambda$ = 940 nm, LEDpoint): the wavelength $\lambda$ was chosen to be large enough to be invisible to the fish³⁹ while not interfering with the light variations created in the environment. The entire device was placed in an enclosure surrounded by opaque curtains, in order to avoid any light or visual disturbance due to the presence of the experimenter. The dimensions of the tank are large enough (25 × 35 BL) that the interaction of the school with the borders is negligible and the trajectories can be considered unconfined, while the chosen water depth ($h$ = 5 cm) induces swimming movements essentially in 2D without causing stress to the animals.

The raw data represents 6 h of video recording at 5 frames per second, with a high spatial resolution (0.7 mm per pixel), which were converted into trajectories (2D position of each fish at each time point) using FastTrack³² tracking software.
The tracking accuracy was 94.7% (percentage of fish detected on average on each frame, compared to the effective number of fish in the tank, see Supplementary Figs. 5 and 6 for details on the tracking accuracy).

**Experimental procedure.** On each experimental run, a group of ~50 fish was allowed to swim freely in the tank while the illumination is varied. The light to which the school was exposed vary slowly enough that the experiment can be considered "quasi-static". In this way, the fish were not stressed by sudden changes in light and the structure of the school changed on a time scale shorter than the light variation. Video of the full swimming area were recorded with a Basler Camera AC2040-90um monocholor at 5 frames per second, with a resolution of 3 Mpx (2048 × 1536 pixels). A time step represents on average a displacement of 0.15 ± 0.02 BL. A filter letting only infrared light pass through (IR-transparent PMMA, thickness 3 mm, Lacrylic Shop) was placed in front of the camera lens to enhance the quality of the recorded images. The experiments were carried out as follow: first, the light was completely switched off for 5-10 min, in order to let the fish get used to the environmental conditions. In this way, an equilibrium regime was reached and the agitation that would be caused by a sudden change of light at the beginning of the experiment was avoided. The illumination then followed two linear growth-decay cycles, from 0 to 900 lux and back. Each ramp lasted 15 min, for an effective experiment duration of 60 min. We performed six such experiments on 3 separate days, for a total of more than 6 h of video and 24 illuminance ramps studied. Each experiment is performed on ~50 fish (56, 55, 53, 49, 58, 50). An additional set of 24 experiments was performed as a control, consisting of eight fixed illuminance levels, with three replicates for each level, and lasting one hour each (see Supplementary Figs. 1, 2 and 4). The trials were carried out in sets of two. Animals were randomly selected and then placed in a separate tank after the first experiment. Another group of animals was then chosen for a second experiment, and all were regrouped in the main tank after. This procedure and the large number of bred fish (200) ensures a random distribution of individual across experiments. The days of experiments were spaced at least 72 h apart to prevent possible stress, and to avoid conditioning or habituation phenomena. The tests were performed at approximately the same time of day (in the afternoon), to avoid a potential influence of the circadian cycle of the animals on the results. No excess mortality was observed during or in the days following the experiments.

**Statistical analysis.** A Friedman test⁴⁰ (non-parametric alternative to repeated measurement ANOVA) was conducted to determine whether light intensity had a significant influence on the measured parameters (*M*, *P*, NN-D, II-D) over the repeated trials. For this test, we binned the data on eight different intervals of normalized light intensity (regularly spaced, from 0 to 1), with 24 replicates for each of these interval (6 trials, with 4 ramps). We then conducted a post-hoc test to the Freidman test, the Nemenyi test⁴¹, to determine the pairwise comparison of means (see Supplementary Fig. 3 for details). To ensure that the observed behaviors do not depend on the duration of the experiment, a Spearman's rank correlation was computed to assess the relationship between light intensity and the measures in the continuous experiments, and between elapsed time and the measures in the discrete experiments (See Supplementary Fig. 2 and Supplementary Table 1). There was a high correlation between light and the measured parameters in the first case ($p > 0.16$) and a very low correlation between time and the measured parameters in the second case ($p < 0.05$).

**Reporting summary.** Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

**Data availability**

The trajectories data for continuous and discrete light variation experiments as well as corresponding metadata are available on a figshare repository⁴² (https://doi.org/10.6084/m9.fishshare.22434919). The raw data (complete movies) is available from the corresponding author upon request.

Received: 13 September 2022; Accepted: 21 April 2023;
Published online: 31 May 2023

**References**

1. Zhang, H. P., Be'er, A., Florin, E.-L. & Swinney, H. L. Collective motion and density fluctuations in bacterial colonies. *Proc. Natl Acad. Sci. USA* **107**, 13626–13630 (2010).

2. Gachelin, J., Rousselet, A., Lindner, A. & Clement, E. Collective motion in an active suspension of *Escherichia coli* bacteria. *N. J. Phys.* **16**, 025003 (2014).

3. Moussaïd, M. et al. Experimental study of the behavioural mechanisms underlying self-organization in human crowds. *Proc. R. Soc. B: Biol. Sci.* **276**, 2755–2762 (2009).

4. Bain, N. & Bartolo, D. Dynamic response and hydrodynamics of polarized crowds. *Science* **363**, 46–49 (2019).

5. Bajec, I. L. & Heppner, F. H. Organized flight in birds. *Anim. Behav.* **78**, 777–789 (2009).

6. Ballerini, M. et al. Interaction ruling animal collective behavior depends on topological rather than metric distance: evidence from a field study. *Proc. Natl Acad. Sci. USA* **105**, 1232–1237 (2008).

7. Chaté, H., Ginelli, F., Grégoire, G., Peruani, F. & Raynaud, F. Modeling collective motion: variations on the Vicsek model. *Eur. Phys. J. B* **64**, 451–456 (2008).

8. Katz, Y., Tunstrom, K., Ioannou, C. C., Huepe, C. & Couzin, I. D. Inferring the structure and dynamics of interactions in schooling fish. *Proc. Natl Acad. Sci. USA* **108**, 18720–18725 (2011).

9. Shaw, E. Schooling Fishes: the school, a truly egalitarian form of organization in which all members of the group are alike in influence, offers substantial benefits to its participants. *Am. Scientist* **66**, 166–175 (1978).

10. Pitcher, T. J., Greenberg, G. & Haraway, M. M. Shoaling and Schooling Behaviour in Fishes. in *Comparative Psychology: A Handbook* (Garland, New York, 1998).

11. Handegard, N. O. et al. The dynamics of coordinated group hunting and collective information transfer among schooling prey. *Curr. Biol.* **22**, 1213–1217 (2012).

12. Pitcher, T. J. Functions of Shoaling Behaviour in Teleosts. in *The Behaviour of Teleost Fishes* 294–337 https://doi.org/10.1007/978-1-4684-8261-4_12 (1986).

13. Weihs, D. Hydromechanics of fish schooling. *Nature* **241**, 290–291 (1973).

14. Ashraf, I. et al. Simple phalanx pattern leads to energy saving in cohesive fish schooling. *Proc. Natl Acad. Sci. USA* **114**, 9599–9604 (2017).

15. Calovi, D. S. et al. Disentangling and modeling interactions in fish with burst-and-coast swimming reveal distinct alignment and attraction behaviors. *PLoS Comput. Biol.* **14**, 1–28 (2018).

16. Filella, A., Nadal, F., Sire, C., Kanso, E. & Eloy, C. Model of collective fish behavior with hydrodynamic interactions. *Phys. Rev. Lett.* **120**, 1–6 (2018).

17. Hemmings, C. Olfaction and vision in fish schooling. *J. Exp. Biol.* **45**, 449–464 (1966).

18. Pavlov, D. S. & Kasumyan, A. O. Patterns and mechanisms of schooling behavior in fish: a review. *J. Ichthyol.* **40**, S163–S163 (2000).

19. Lopez, U., Gautrais, J., Couzin, I. D. & Theraulaz, G. From behavioural analyses to models of collective motion in fish schools. *Interface Focus* **2**, 693–707 (2012).

20. Partridge, B. L. & Pitcher, T. J. The sensory basis of fish schools: relative roles of lateral line and vision. *J. Comp. Physiol. A* **135**, 315–325 (1980).

21. Pitcher, T. J. & Partridge, B. L. Fish school density and volume. *Mar. Biol.* **54**, 383–394 (1979).

22. Bleckmann, H. The lateral line system of fish. *Fish. Physiol.* **25**, 411–453 (2006).

23. Faucher, K., Parmentier, E., Becco, C., Vandewalle, N. & Vandewalle, P. Fish lateral system is required for accurate control of shoaling behaviour. *Anim. Behav.* **79**, 679–687 (2010).

24. Mekdara, P. J., Schwalbe, M. A., Coughlin, L. L. & Tytell, E. D. The effects of lateral line ablation and regeneration in schooling giant danios. *J. Exp. Biol.* **221**, jeb175166 (2018).

25. Mekdara, P. J., Nasimi, F., Schwalbe, M. A. & Tytell, E. D. Tail beat synchronization during schooling requires a functional posterior lateral line system in Giant Danios, devario aequipinnatus. *Integr. Comp. Biol.* **61**, 427–441 (2021).

26. Puckett, J. G., Pokhrel, A. R. & Giannini, J. A. Collective gradient sensing in fish schools. *Sci. Rep.* **8**, 1–11 (2018).

27. Giannini, J. A. & Puckett, J. G. Testing a thermodynamic approach to collective animal behavior in laboratory fish schools. *Phys. Rev. E* **101**, 62605–62605 (2020).

28. McKee, A., Soto, A. P., Chen, P. & McHenry, M. J. The sensory basis of schooling by intermittent swimming in the rummy-nose tetra (Hemigrammus rhodostomus): schooling by intermittent swimming. *Proc. R. Soc. B: Biol. Sci.* https://doi.org/10.1098/rspb.2020.0568rspb20200568 (2020).

29. Pitcher, T. J., Partridge, B. L. & Wardle, C. S. A blind fish can school. *Science* **194**, 963–965 (1976).

30. Whitney, R. R. Schooling of fishes relative to available light. *Trans. Am. Fish. Soc.* **98**, 497–504 (1969).

31. Ryer, C. & Olla, B. Effect of light on juvenile walleye pollock shoaling and their interaction with predators. *Mar. Ecol. Prog. Ser.* **167**, 215–226 (1998).

32. Gallois, B. & Candelier, R. FastTrack: an open-source software for tracking varying numbers of deformable objects. *PLoS Computational Biol.* **17**, 1–19 (2021).

33. Shearer, K. D. Experimental design, statistical analysis and modelling of dietary nutrient requirement studies for fish: a critical review. *Aquac. Nutr.* **6**, 91–102 (2000).

34. Fraser, N. H. C. & Metcalfe, N. B. The costs of becoming nocturnal: feeding efficiency in relation to light intensity in juvenile Atlantic Salmon. *Funct. Ecol.* **11**, 385–391 (1997).
35. Morrow, J. E. Schooling behavior in fishes. *Q. Rev. Biol.* **23**, 27–38 (1948).

36. Steven, D. M. Studies on the shoaling behaviour of fish. *J. Exp. Biol.* **36**, 261–280 (1959).

37. Torisawa, S. et al. Schooling behaviour and retinomotor response of juvenile Pacific bluefin tuna Thunnus orientalis under different light intensities. *J. Fish. Biol.* **71**, 411–420 (2007).

38. Tunstrøm, K. et al. Collective states, multistability and transitional behavior in schooling fish. *PLoS Comput. Biol.* https://doi.org/10.1371/journal.pcbi.1002915 (2013).

39. Carleton, K. L., Escobar-Camacho, D., Stieb, S. M., Cortesi, F. & Justin Marshall, N. Seeing the rainbow: Mechanisms underlying spectral sensitivity in teleost fishes. *J. Exp. Biol.* https://doi.org/10.1242/jeb.193334 (2020).

40. Friedman, M. The use of ranks to avoid the assumption of normality implicit in the analysis of variance. *J. Am. Stat. Assoc.* **32**, 675–701 (1937).

41. Nemenyi, P. B. *Distribution-free Multiple Comparisons*. (Princeton University, 1963).

42. Lafoux, B., Moscatelli, J., Godoy-Diana, R. & Thiria, B. Trajectories of large schools of Hemigrammus rhodostomus swimming under varying illuminance https://doi.org/10.6084/m9.fishshare.22434919.v3 (2023).

## Acknowledgements

We thank Amaury Fourgeaud from the Laboratoire de Physique et Mécanique des Milieux Hétérogènes workshop, for his technical support on the experimental setup design.

## Author contributions

B.L. and J.M. carried out the experiments. B.L., R.G.-D., and B.T. designed the experiments, analysed the data and wrote the paper. All authors participated in discussing and approving the final version of the paper.

## Competing interests

The authors declare no competing interests.

## Additional information

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s42003-023-04861-8.

**Correspondence** and requests for materials should be addressed to Baptiste Lafoux, Ramiro Godoy-Diana or Benjamin Thiria.

**Peer review information** *Communications Biology* thanks the anonymous reviewers for their contribution to the peer review of this work. Primary Handling Editor: Luke R. Grinham.

**Reprints and permission information** is available at http://www.nature.com/reprints

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_7.png" /></figure>

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2023