Many animal species live or forage in groups (Krause & Ruxton, 2002). Staying close together reduces the risk of predation but may also reduce foraging efficiency. It has therefore been suggested that distances between animal group members represent a compromise between the demands of safety and of hunger (Krause & Ruxton, 2002). Although some groups (e.g., herring shoals; Parrish, 1992) are extremely cohesive, others periodically shed and regain members or even disperse altogether (e.g., deer herds; Pays, Benhamou, Helder, & Gerard, 2007).

Both empirical and theoretical studies suggest that the motion of group members is affected primarily by local interactions with their nearest neighbors (e.g., Couzin, Krause, James, Ruxton, & Franks, 2002; Partridge, 1981). Whether these interactions are bounded by the metric distance between group members (i.e., individuals attend to all conspecifics within a certain distance from themselves) or by the topological distance between them (i.e., individuals attend to a certain number of nearest neighbors, regardless of their distance; Ballerini et al., 2008), it remains true that beyond a certain distance, both advantageous and costly mechanisms of being in a group no longer operate, and the group has functionally dissolved. However, the threshold at which this occurs has not been precisely determined.

Few criteria exist in the literature for determining group cohesion. The most commonly used for groups of fish, which have attracted a large amount of research, is Pitcher, Magurran, and Allen’s (1983) elective group size (EGS), which considers animals behaving within about four body lengths (BL) of each other member of the same group, under the assumption that individuals in a group must communicate with each other. This somewhat arbitrary criterion has not, however, been experimentally validated. For instance, although distributions of group sizes under the EGS have been reported for a number of species (e.g., Pitcher & Parrish, 1993), no study—as far as we are aware—has examined how shoal size distributions vary under different threshold values for the EGS, nor whether the often-cited 4 BL threshold has any empirical basis as a limiting distance for communication.

Some authors have substituted alternate thresholds (e.g., Budaev, 1997, uses 7 BL), have considered all individuals in a testing tank or a region of study part of the same shoal (e.g., Partridge, Pitcher, Cullen, & Wilson, 1980), or have decided by eye, informally, where the limits of a shoal lie (e.g., Krause, 1993). Miller and Gerlai (2008) presented a shoal-membership criterion for zebrafish based on the distribution of inter-individual distances (IID, the mean distance between an individual and all other group members) but this measure, too, depended on a user-defined threshold.

Authors working with other taxa have sometimes used alternative measures such as fixed distance thresholds (e.g., 50 m in red deer; Clutton-Brock, Guinness, & Albon, 1982), or more complex measures (e.g., Pays et al., 2007). These methods are reviewed by Stankowich (2003).

In the present article, we present a novel criterion of group membership, derived from detailed trajectories of the animals, and demonstrate its use in identifying the comings and goings of members of zebrafish shoals. We base our criterion on the nearest neighbor distance (NND) and use fluctuations in an individual’s NND to determine excursions away from the shoal. We assume that the decision to leave a shoal occurs when an individual is still within the shoal, and we attempt to identify a behavioral correlate of this moment of decision. Finally, we use our criterion to track the gradual dissolution of a shoal across repeated exposures to an experimental tank and uncover how fish leave a shoal by comparing the behavior of fish when in the shoal and when on an excursion. Although we present our criterion in just one species in one experimental context, it is likely that similar criteria could be usefully applied to the collective motion of other species.

Method

Subjects.

Subjects were all lab-reared adult zebrafish between the ages of 3 months and 1 year, and were between 3 and 4 cm long. All fish were bred in-house. Equal numbers of fish from three different populations were used (long-fin wildtype, short-fin wildtype, and AB) but, since no significant differences were found between the populations on any measure, data are presented from all populations combined. Twenty-four groups (eight per population), of eight fish per group, were tested. Each group consisted of approximately equal numbers of males and females. Groups of fish to be tested together were housed together for at least 1 week prior to the start of the experiment. Fish were housed in 40-liter tanks containing “system” water that was previously reverse osmosis purified and mixed with sea salt (“Instant Ocean” sea salt, Aquarium Systems Inc., OH) so that the conductivity of the water was between 900–1,200 micro Siemens (576–768 TDS ppm). The water in the tanks was filtered (Aqueon PowerFilter 30, Franklin, WI), aerated, and maintained at a temperature of 26 ± 2°C. Lights in the room in which the fish were kept went on at 7:00 hr and off at 21:00 hr. Fish were fed flake food (Tetramin Tropical Flakes, Tetra, USA), ad lib., 30 min before each testing session.

Apparatus.

Fish were tested in a circular white plastic tank with a diameter of 91 cm. The tank was filled with system water to a depth of 10 cm and was located in one corner of the room in which the fish were housed. The temperature of the water in the tank was kept at 26 ± 2°C. A moveable black room divider visually separated the tank from the rest of the room. The tank was lit by two fluorescent light fixtures placed at opposite sides of the tank, ensuring an even level of illumination in all parts of the tank. Experiments were filmed using a Sony Handycam (model HDR-XR-520) attached to the ceiling with the lens of the camera 200 cm above the surface of the water, located so that the entire tank was visible in the frame of the video. Videos, at 1,920 x 1,080 pixels and 12 fps, were converted into AVI format using iSkySoft Video Converter (v. 2.2).

Procedure.

All testing was performed between 10:00 and 14:00 hr each day. Fish were gently netted from their home tank and transferred in a plastic beaker to the testing tank. They were then gently poured into the center of the tank. Fish were filmed for the duration of the session (30 min) and then were netted into the beaker and returned to their home tank. The water in the testing tank was replaced after each two groups had been tested to control for possible odor cues left by previous groups. Each group was exposed to the testing tank on 5 consecutive days.

Data analysis.

A custom application, designed in-house, extracted the positions of all the fish from each frame of video and calculated the trajectory of each fish. A similar application was recently described in some detail by Delcourt, Becco, Vandewalle, and Poncin (2009). The fish were allowed to habituate to the tank for the first 5 min of each session, and minutes 5–10 of each 30-min session were analyzed (only 5 min of data were analyzed per session because of limitations of the tracking software). Raw trajectories were analyzed using Mathematica (v. 4.0; Wolfram Research). All statistical analyses were conducted in either Mathematica or SPSS (v. 17.0). A significance level of .01 was used for all tests.

Results and discussion

Definition of a group membership criterion.

Distance threshold group-membership criteria reflect the assumption that group limits depend only on the current (momentary) spatial distribution of the animals. However, if animals in groups do not move at random and actively choose to leave and join groups, it is more likely that individuals decide to leave the group—that is, adjust their motion relative to that of other individuals to move themselves away from the group—while still within it and while they are potentially still very close to other members of the group. In the present study, we attempt to identify this moment of decision and use it—rather than a fixed distance threshold—to delimit membership in a shoal of zebrafish.

An individual that has left a shoal will have an elevated NND—as compared with when it is within the shoal—and we thus begin by examining the time series of NND for each individual (Fig. 1a). The trajectory of each individual is partitioned into movement segments, according to the values of NND. To find the beginning and end of each movement segment, we construct the overall distribution of NND for all fish in that session (Fig. 1b). The mode of this distribution is used as a threshold for the beginning and end of each segment: Every time the NND of an individual exceeds the mode, a movement segment begins; when the NND falls below the mode, that segment ends. Although using the mode of the distribution of NND here is somewhat arbitrary, we feel this is perhaps the most logical and biologically meaningful threshold, and that it reflects the most prevalent shoaling characteristic of the particular group of individuals observed. Notably, since the mode of the distribution is lower in more cohesive, tighter shoals, a smaller movement away from a dense shoal than from a looser shoal is required to be considered a movement segment, which our intuition suggests is correct. Each movement segment is a candidate for being a “true” excursion, an episode during which that fish left the shoal. We assume that most movement segments are not excursions but represent the constant jostling for position that occurs within a shoal. To determine which movement segments are excursions, we characterize each segment by the maximal NND attained during that segment, denoted MaxD. Only movement segments whose MaxD falls outside the overall distribution of MaxD for all fish (Fig. 1c)—that is, above the p = .05 quantile of the distribution—are considered excursions. This procedure is summarized in Fig. 1 and in the following section. Our definition of excursions bears some similarity to the method employed by Aoki (1980) for determining when shoals of field gudgeon (Gnathopogon elongatus) had divided. Aoki observed that when shoals split (as determined by eye) for a sufficiently large proportion of a trial, the distribution of NNDn (the distance from an individual to its nth nearest neighbor) became bimodal. He used the trough between the two peaks of the distribution as a threshold for determining the extent of the shoal. In other words, similar to our criterion, Aoki assumed that an individual’s NND is unimodally distributed when it is within a shoal and that NND values outside this distribution (or in a second distribution peak) represent excursions away from the shoal.

Fig. 1
figure 1

Calculating the group membership criterion. First, the time-series of NND for an individual fish is calculated (a). The overall distribution of NND (for all fish in all frames) is calculated (b), and the mode of the distribution (red line in a and b) is used as a threshold to partition the time-series of each individual’s NND into movement segments. Each segment is characterized by the greatest NND attained during that segment, MaxD. The distribution of MaxD is determined (c), and the p = .05 quantile of this distribution (blue line in a and c) is used as the threshold above which NND must rise for a movement segment to be a real excursion

Our definition relates to a situation in which a single fish departs a shoal. In large shoals, however, it is likely that several fish will sometimes leave the original group together, in which case the NND of each fish would remain deceptively low. A fish that is a member of a splinter shoal with two members will have a small NND1 (the distance to its first nearest neighbor, the other member of its sub-shoal) and a large NND2 (the distance to its second nearest neighbor, the closest member of the main shoal). Thus, the method employed previously can be used to determine excursions of subgroups with two members by replacing NND1 with NND2 – NND1. The same logic is applied to larger subgroups, up to half the number of individuals present.

To summarize, our shoal membership criterion is calculated as follows: Define NND0 of an individual ≡ 0. Then, for each n from 1 to N/2, where N is the number of individuals present, the following steps are required:

  1. 1.

    Construct the distribution of dNND = NNDn – NNDn-1. Find the mode of the distribution, μn (Fig. 1b).

  2. 2.

    Partition the time series of dNND for each individual into movement segments, each of which begins when dNND rises above μn and ends when it falls below μn (Fig. 1a).

  3. 3.

    Find each segment’s MaxD, the maximal dNND attained during that segment.

  4. 4.

    Construct the distribution of MaxD (Fig. 1c). Any movement segments whose MaxD is larger than the p =.05 quantile of the distribution are true excursions.

Three points must be made about this criterion. First, this method will operate only in cases in which there is a well-defined shoal some of the time. Since the threshold for excursions is determined by the exclusion of movement segments in the main distribution of MaxD, the measure will fail if most or all movement segments represent excursions, so that the larger part of the MaxD distribution reflects excursions rather than nonexcursion data. The advantageous aspect of this limitation is that the measure is not sensitive to the level of cohesion of the shoal. Thus, excursions away from a loose shoal (one in which most NNDs are high) will be detected as precisely as will excursions away from a tight-knit shoal. Conversely, our measure also requires that the distribution of MaxD be sufficiently different from that of NND. In other words, in the complete absence of “real” excursions, the measure will identify some spurious ones.

Second, excursions of several different types can be defined, differing on the number of fish participating in the excursion. For the following experiments, in which eight fish were placed in the tank in each session, four excursion types exist (i.e., of subgroups consisting of from one to four fish). Since identifying excursions of each type depends only on a particular distribution of dNND, an individual can be on several types of excursions at once. In other words, a fish may, under the current criterion, concurrently be a member of a shoal of two fish and of a shoal of three fish, since its membership in the former depends only on the values of NND2– NND1, and in the latter only on NND3 – NND2.

Finally, a movement segment whose MaxD is sufficiently large is designated an excursion in its entirety. Thus, the excursion begins—and the fish considered no longer part of the shoal—as soon as the individual’s dNND exceeds the mode of the overall distribution of dNND. A fish can therefore be on an excursion even when its NND is lower than those of some of its shoal-mates who are not on excursions. The beginning of the movement segment is selected as the beginning of the excursion in the belief that this most nearly corresponds to the moment of decision to leave the shoal. Since we expect that the decision to depart is accompanied by some measurable change in behavior, our choice can be tested directly by comparing the motion of the fish to either side of the putative moment of decision. Results of such an analysis are presented in the following section.

Excursions drive shoal dissolution.

Figure 2 shows the numbers (A) and durations (B) of excursions observed in our experiments. Across repeated exposures to the testing tank, as the fish habituated to the environment, both the number of excursions (Fig. 2a) and their durations (Fig. 2b) increased significantly [repeated measures ANOVA: number, F(4, 76) = 7.84, p < .001; duration, F(4, 84) = 10.855, p < .001].

Fig. 2
figure 2

The effect of repeated exposure to a testing tank on the number (a) and duration (b) of excursions. Error bars represent ± SEMs

Excursions involving different numbers of fish (i.e., of different types) were also compared. Figure 3 displays the durations of all excursions (on all days of the experiment) by the number of fish participating in the excursion. Excursions of singletons (Type 1) were of significantly longer duration than excursions of larger subgroups, which did not differ [overall, F(3, 69) = 38.942, p < .001; posthoc comparisons, Type 1 vs. Types 2, 3, 4; all ps < .001; all other ps > .11]. This effect may be partially due to the larger number of ways in which a subgroup of several individuals can disband. An excursion by a single fish ends when it rejoins a shoal, whereas a subgroup of several fish can either disperse or rejoin the shoal to end their excursion. However, if this mechanism were primarily responsible for the effect observed, differences should also have appeared between excursions of two, three, and four fish, which was not the case. To demonstrate more clearly the dissolution of the shoal across days, we developed a measure of group cohesion comparable to Pitcher et al.’s (1983) EGS. Since, by our criterion, fish can be on several types of excursions at once, we do not simply report the size of the shoal each fish is in. Instead, at each time point t, we count the number of excursions of type T that are occurring, E T (t). We then define the sum of excursions at time t,

$$ EXS(t) = \sum\limits_{{T = 1}}^{{\frac{N}{2}}} {\frac{{{E_T}(t)}}{T}}, $$

where N is the number of fish in the tank. Simply put, EXS counts the number of excursions taking place, weighting each excursion in inverse proportion to the number of fish participating, so that excursions of individuals contribute more to the measure than do excursions of pairs, and so on for larger groups. EXS is designed to reflect our intuitions concerning the dissolution of a shoal. When all the fish are in one shoal, EXS = 0. At the opposite end of the scale, when each fish is on its own, EXS = N. A single fish leaving a shoal gives an EXS of 1. Indeed, since excursions are inversely weighted by the number of participants, any uneven splitting of a single shoal into two groups always gives one (e.g., three fish leaving a shoal of eight). Uneven divisions of a shoal into three subshoals gives an EXS of 2, and so on. Shoals that divide into two groups evenly give an EXS of 2 (e.g., a shoal of eight splitting into two groups of four). The theoretical maximum of the measure is \( \sum\limits_{{T = 1}}^{{\frac{N}{2}}} {\frac{N}{T}} \) (for N = 8, 16.67). It is difficult to imagine, however, a distribution of fish that would yield such a value, and, in practice, values above N are rarely observed.

Fig. 3
figure 3

Excursion durations by excursion type. Type 1 excursions, involving only a single individual, are significantly longer than excursions of larger subgroups. Error bars represent ± SEMs

Figure 4 shows the mean EXS (A) and the correlation of EXS with IID (B) for each day of our experiment. For obvious reasons, EXS increases as shoals disintegrate across days (Fig. 4a). However, EXS is defined for each frame of data and so can be used to track in greater detail the effects of excursions on group structure. Miller and Gerlai (2008) showed that the mean IID of zebrafish shoals oscillates with a characteristic period. Since excursions will tend to increase the mean IID, it is informative to ask whether excursions drive the observed fluctuations in IID (a similar suggestion was made—but not tested—by Aoki, 1980). To answer this question, we measured the correlation between the EXS and IID time series’. To determine the significance of the correlation, we used the following method: We constructed a null distribution by repeatedly randomly pairing EXS and IID time series’ from different datasets and plotting the distribution of correlations between them. All within-dataset correlations were compared to this distribution for significance. The correlation of the time series of mean IID with that of EXS (Fig. 4b, solid line) was significant for all days (all ps < .002). More interestingly, when mean IID was recalculated excluding all fish on excursions, its correlation with EXS became negative and nonsignificant (Fig. 4b, dotted line; all ps > .011). Both of these results strongly imply that the previously noted oscillations in mean IID (Miller & Gerlai, 2008; also present in the present data) are at least partially driven by fish leaving and rejoining the shoal.

Fig. 4
figure 4

Mean EXS—a measure of the dissolution of the shoal—by day (a) and the correlation of EXS (b) with the mean IID (solid line) and the mean IID excluding fish on excursions (dotted line). See the text for details. Error bars represent ± SEMs

Characteristics of excursions.

Excursions may be divided into an outward phase (when dNND is increasing) followed by an inward phase (when dNND is decreasing) (see Tchernichovski, Benjamini, & Golani, 1998; small-scale reversals of direction within each section of the excursion are ignored). Much like excursions of rats away from a home base (Tchernichovski et al., 1998), zebrafish swim more slowly on the outbound section of an excursion than when they are returning to the shoal, F(1, 21) = 9.00, p = .007. In addition, we examined where in the shoal fish were likely to be when initiating an excursion, using data from the 1 s prior to the start of each excursion. Individuals were ranked by their position toward the front (1) or back (8) of the shoal, relative to the shoal’s direction of motion. Figure 5 shows the distribution of these ranks. The distribution is significantly different from uniform (KS test, D = 0.274, p < .001), strongly implying that zebrafish are more likely to leave the shoal from the back than from the center or front of the shoal.

Fig. 5
figure 5

Density distribution of rank when starting an excursion. The distribution of the ranks of fish in the shoal—toward the front (1) or back (8)—in the 1 s preceding an excursion are shown. Fish are more likely to leave a shoal from the back (at higher ranks) than from the front or center

The present criterion is predicated on identifying the moment at which a fish decides to leave the shoal, and the beginning of an excursion might therefore be marked by a measurable change in behavior. One second of data from before the start of each excursion was compared to data from the first second of the excursion. Individual speed, polarization (the degree to which the heading of an individual deviates from the mean group heading), and turning rate were examined. Of all three measures, only the speeds of fish significantly increased during excursions relative to their speeds immediately before the excursion (Wilcoxon Signed Ranks Test, Z = 5.617, p < .001). Thus, zebrafish speed up when departing a shoal. No significant difference was found in either polarization or turning rate (both ps > .12). It is possible either that these measures do not change in a consistent direction at the start of an excursion or that the change occurs outside the quite narrow window of time we examined.

Finally, it is possible to compare the excursions detected by our method to the divisions of the shoal according to existing measures. The most commonly used measure of group membership in shoals of fish is Pitcher et al.’s (1983) EGS, which typically considers fish within 4 BL of each other members of the same shoal. Adult zebrafish are between 3 and 4 cm long, giving a threshold of between 12 and 16 cm. By our criterion, each real excursion must, at its greatest extent, exceed the p = .05 quantile of the distribution of MaxD. The mean value of this threshold for excursions of a single fish in our data was 10.86 cm (± 0.62 cm SD) on the first day of the experiment and increased slowly but steadily with repeated exposure to the testing tank (Day 2, 11.16 ± 0.6 cm; Day 3, 12.17 ± 2.14 cm; Day 4, 12.27 ± 1.99 cm; Day 5, 13.29 ± 2.43 cm). These values are very close to 4 BL of a zebrafish. It is important to remember, however, that in our method, excursions are measured from the beginning of the movement segment to which they belong, much of which occurs at closer distances to the shoal.

Conclusion

Distances between members of animal groups are rarely constant, and determining which individuals are in a group at a given time is thus a dynamical statistical problem. Therefore, we attempted to identify the moment at which an individual’s movement away from the group begins. Although we observed a change only in the speeds of fish at the start of each excursion—implying that we did not precisely identify the moment of decision—it remains likely that movement away from a group begins when an individual is not yet far enough from its conspecifics to be excluded on the basis of state-variable type criteria, such as EGS. Regardless of whether an abrupt change in behavior accompanies the decision to leave a group, we show that excursions—as we define them—have certain consistent characteristics and can explain much of the variance in IID.

A group-membership criterion such as ours can be constructed in several different ways. For instance, the time series of NND could be partitioned into movement segments by different, possibly more complex, criteria. Or, a different time series could be used, such as individual speed, which—as we demonstrated above—correlates well with the beginnings of excursions. Additional requirements could also be imposed on a movement segment to be considered an excursion—for example, that its MaxD be twice the mode of the MaxD distribution. Finally, different measures similar to our EXS could be constructed using different weightings for excursions of various types (although we have found this has little effect on the usefulness of the measure for predicting fluctuations in IID).

Discussions of individuals leaving groups or of groups splitting most often occur in the context of fission–fusion societies and involve much larger spatial and temporal scales than in the present case (Krause & Ruxton, 2002). It is not known whether zebrafish shoals in the wild exchange members more permanently, as other cyprinids do (Croft et al., 2003), but, if they do, we would not expect to observe such effects in the present data. The limited space available in the testing tank we used, and the small number of fish in the tank, ensured that all excursions ended in the return of the fish to the main shoal. It is thus possible to argue that the shoals in our experiments could not split in any meaningful sense. There is no particular reason, however, to believe that being part of a shoal is a unitary single-level phenomenon. It is quite possible that zebrafish concurrently engage in the types of excursions presented here as well as—space permitting—more permanent fission–fusion of their shoals.

Most importantly, our group-membership criterion need not be limited to shoals of fish. Applying either our criterion or similar criteria to the trajectories of other group-living animals may uncover interesting differences and similarities in the manner in which they order their participation in shoals, flocks, herds, or crowds.