Introduction Many animal groups display coordinated motion in which individuals exhibit attraction towards others and also a tendency to align their direction of travel with near-neighbors [1]. The functional complexity of such aggregates are thought to result from relatively local, self-organizing interactions among individuals that endow many groups, such as flocking birds and schooling fish, with the capacity to move, respond to threats and make decisions collectively [2]. Thus the way in which collective dynamics emerge from inter-individual social interactions likely has profound consequences on the selection pressures experienced by group living organisms. Theoretical considerations of the self-structuring properties of groups have suggested that certain features of interaction among individuals may give rise to a relatively small number of specific collective states [3]–[7]. For example, models representing local repulsion, directional alignment and longer-range attraction among individuals [3], [5] predict that groups in which individuals follow these behavioral rules exhibit only three collective states; a swarm state in which individuals aggregate but are locally and globally disordered, a milling state in which individuals have a high degree of alignment with local neighbors but overall the group exhibits a rotating milling formation (or torus, in three-dimensional space) and a polarized state in which individuals tend to be aligned with each other over a long range and consequently the group experiences net movement. While these patterns have all been observed in nature among different organisms [8] and can evolve in simulations of simple predator and prey behaviour [9], experimental support for the existence of these states, and for any one system transitioning between them, has not previously been determined. In addition to displaying commonly observed group structures these models also emphasize an important unifying feature—that collectively moving animal groups can be considered as a dynamical system in which multiple group states, or dynamically-stable states, exist, and that collective properties, such as the spatio-temporal configurations exhibited, may be robust to exactly how behavioral tendencies such as repulsion, alignment and attraction are mediated. Furthermore, under this scenario, animal groups are also predicted to exhibit ‘multistability’ whereby more than one collective state coexist for identical individual behavior, with groups transitioning relatively quickly between the alternate structural configurations. In the model of Couzin et al. [3], for example, the milling and polarized state co-exist over a region of parameter space (see Paley et al. [10] for a formal analysis of this bistable regime). The question of which collective behavior is adopted therefore depends on the initial configuration of the system, in this case the positions and orientations of individuals: if groups start in a relatively disordered state they tend to form a milling formation; but tend to remain in the polarized configuration if they begin sufficiently aligned with one another. Perturbations, such as disruption induced by predator attacks [1], or more generally, sources of intrinsic [11], [12] or extrinsic noise [13], can cause the system to leave its existing dynamically-stable state and enter an unstable transitional regime. Depending on the degree and type of perturbation the group may find itself either drawn back towards the previous state, or if perturbed sufficiently far, to be drawn into the alternative dynamically-stable state. Thus even though the group behavior results from a large number of relatively local interactions, the group-level dynamics can be described using relatively few and simple lower-dimensional ‘order parameters’ that portray the collective dynamics, such as global polarization and the degree of collective rotation. This approach is familiar to us in physical systems where a multitude of different inter-molecular interactions result in only four fundamental states of matter; solid, liquid, gas and plasma. When properties such as density and energy are altered, a physical system can undergo ‘phase transitions’ between these states. Similarly, at a certain level of description, we can view animal groups as having the potential to exhibit abrupt changes in spatial or temporal patterns, and thus phase transition-like behavior (see Buhl et al. [14] for an experimental example of density-driven transitions in locust swarms). However, biological systems are not in equilibrium. There are no conserved thermodynamic quantities, such as momentum and energy, and individual motion typically results not from thermal fluctuations or external forcing, but from individual self-propulsion and decision-making. Nevertheless, the concept that local interactions reduce to common non-equilibrium collective states is a key insight provided by computational modeling of collective animal behavior [3], [4], [15] which relates more generally to phase transition theory in non-equilibrium systems [16]. Additionally, despite individual motion likely being governed by a complex stochastic decision-making process based on the positions, movement and size of neighbors (and even hidden features like individual's state), two recent studies of schooling fish—Katz et al. [17] and Herbert-Read et al. [18]—demonstrate that interactions can be effectively reduced to local tendencies to be repelled from, or attracted towards, neighbors. Similar evidence exists for aggregating ducks [19] and swarming locusts [20]. Despite these advances, to date, no experimental study has quantified the dynamical states of collective motion exhibited by any species of group-living animal, nor determined whether the general predictions of existing models of collective behavior hold—notably, that groups will exhibit, and transition among, relatively few (dynamically-stable) states. Here we investigate the emergence of macroscopic collective states under highly controlled laboratory conditions using schooling fish (golden shiner, Notemigonus crysoleucas). This is a convenient model system for investigating collective behavior since individuals are relatively small (average length approximately 5 cm in our study), and naturally form highly cohesive schools in very shallow and still water [21]. Digital tracking of fish in a range of group sizes (from 30 to 300 fish) allows us to obtain detailed data regarding the individual positions and velocities of schooling fish over long periods of time. We use these data to analyze how group size and perturbations (driven both by inevitable contact with the boundary of the tank, but also by changes in motion by individuals within the group in the absence of boundary influence) affect group behavior and function to transition the group between alternative dynamical states. Results/Discussion Seven replicate experiments were conducted for group sizes 30, 70 and 150 fish, and three replicates were conducted for 300 fish (due to limitations in our capacity to house very large numbers of fish). Each replicate consisted of filming fish swimming in a large shallow tank (2.1 m×1.2 m, water depth 5 cm) for 56 minutes (at 30 frames per second). A similar approach has been taken previously [17], [18], [22], [23]. Individual fish were tracked following the methodology of Katz et al. [17] to obtain time series of the positions and velocities. These time series constitute the raw data from which we base our analyses. To describe the collective structure of the fish shoals we use two order parameters, identical to previous categorization in simulation models [3], [11]. First, the polarization order parameter Op , which provides a measure of how aligned the individuals in a group are. It is defined as the absolute value of the mean individual heading, where is the unit direction of fish number i. Op takes values between 0 (no alignment on average) and 1 (all fish are aligned). Second, the rotation order parameter Or , which describes a group's degree of rotation about its center of mass. To define this measure we introduce the unit vector pointing from the shoal's center of mass towards fish i. The rotation order parameter Or is then defined by the mean (normalized) angular momentum which, by construction also takes values between 0 (no rotation) and 1 (strong rotation). Time series of these two order parameters give us valuable information about the global structure of a group and how the structure changes during an experiment. However, important pieces of information are not captured, like the group density, the average individual speed, and how close a group swims to the tank boundary. For a fuller picture of the collective dynamics, we will also use these order parameters. Other group properties could also be measured. Collective states exhibited and the role of group size Throughout our entire period of filming the fish were cohesive, and for all group sizes three dynamically-stable collective behaviors were observed [3]; the swarm (S), polarized (P) and milling (M) group state. Snapshots of these distinct patterns are shown in Fig. 1A for a group of 150 fish (Videos S1, S2, S3, S4 contain video extracts of all group sizes). As in [3], these separate modes of motion can be categorized by only two structural properties (order parameters) of the group—its polarization Op and its degree of collective rotation Or . Groups repeatedly transitioned between these collective states, as is evident in representative time series of the order parameters shown in Fig. 1B. 10.1371/journal.pcbi.1002915.g001 Figure 1 Dynamical states of schooling fish. (A) Snapshots of a group of 150 golden shiners swimming in a shallow tank. The different images (thresholded for clarity) demonstrate the typical configurations displayed by the fish school: swarm state (S), polarized state (P) and milling state (M). (B) Extracts of time series of order parameters for groups of 30, 70, 150, and 300 golden shiners. Polarization Op (in blue) measures how aligned the fish are, while rotation Or (in red) measures the degree of rotation around the center of mass of the fish shoal. To demonstrate more clearly these dynamically-stable states, in Fig. 2 we consider the proportion of time groups spend in different regions of the two-dimensional phase space spanned by the order parameters Op and Or (red representing more time spent in a given region and blue the least time; black areas signify regions of the phase space not visited by groups in our experiments). While all three states of motion were manifest in all groups, there are also visible differences relating to increasing group size. For the smallest group size of 30 fish we see that the polarized group state predominates (high Op and low Or ). Only rarely did groups of this size exhibit swarm behavior (low Op and low Or ), and even less frequently did they adopt the rotating group state (low Op and high Or ). The fluctuations in the order parameters are also most frequent for this group size (Fig. 1B). For a group size of 70 fish the frequency of transitions decreases and the collective states corresponding to the three dynamically-stable states become clearly distinguishable as ‘hotspots’: the polarized state is no longer dominant, with milling and swarm behavior also being common. As group size is increased further, to 150 and then 300 fish, groups spend most of their time milling, displaying fewer transitions into (and among) the polar state and swarm state. For all group sizes the milling state has an equal probability of rotating clockwise and counter-clockwise, i.e. groups did not exhibit a handedness (see Fig. S1). 10.1371/journal.pcbi.1002915.g002 Figure 2 Density plots of polarization vs. rotation from experiments. The data shown are averaged over all replicates for each of the groups of 30, 70, 150, and 300 golden shiners. The order parameter space is divided into four regions—swarm (S), polarized (P), milling (M), and transition (T)—each being characterized by the dominant dynamical state of the fish school in that particular region. Different values of pmin and pmax were used for each group size to emphasize the density patterns and regions with no data are colored black. The insert in the 30 fish plot shows the density plot from an experiment with 30 fish and the tank area reduced to one tenth of the original. A natural consequence of increasing the number of fish in the tank is that the mean density within the experimental arena becomes higher, and hence the effects of the tank boundary become more pronounced. To reveal whether the higher density of fish per tank area in larger groups could cause the increased stability of the milling state we performed an experiment (4 replicates) with 30 fish in a smaller tank (0.66×0.38 m), which corresponds to the mean density of 300 fish in the larger tank. The density plot of the order parameters is shown as an inset in the 30 fish density plot in Fig. 2, and reveals that confinement by the boundaries and higher mean density do not lead to increased time spent milling. However, the time spent in the polarized state was reduced; contact with the smaller tank caused this group size to exhibit more frequent transitions to the swarm state than when it was in the larger tank. At least for the 30 fish, and possibly as a general result, the presence of the boundary does not increase the stability of the milling state per se. Rather, the stability of milling is largely determined by the size of the group. Although the functional reason for milling is not yet known, it does, however, allow individuals to be locally polarized, which could be important for information transfer, while allowing the group to remain in a specific area. Swarm behavior allows the group to remain in an area but is locally disordered and this may be more susceptible to predation [1]. To gain further understanding of the relationship between group size and the stability of the different group structures we employed the canonical model of grouping of Couzin et al. [3], in which there are no boundary interactions. Exploring the collective behavior of simulated individuals (see Methods for simulation set up and details) we find that the model produces qualitatively similar results across the range of group size in our experiments (30, 70, 150 and 300 agents), with the polarized states being dominant for the smallest group size, and an increasing proportion of the group's time is spent in the milling state as group size increases (see Fig. 3). 10.1371/journal.pcbi.1002915.g003 Figure 3 Density plots of polarization vs. rotation from simulations. The data shown are from simulations with 30, 70, 150, and 300 agents, employing a constant-speed agent based simulation model of collective behavior where no boundary is present (See Methods for simulation details). Regions with no data are colored black. As for the experimental data, the milling state grows in stability with group size. Another aspect of group size is the self-regulation of density. Theoretically, when more members are added to a group of self-propelled particles, the density can either remain approximately constant, in which case the system is H-stable, or the density can increase, and the system is catastrophic [4]. In our experiments, the individuals within the group regulate their spacing such that density tends to remain stable regardless of group size. The mean area occupied by the fish grows approximately linearly with group size and the packing fraction (and density) remains nearly constant (See Fig. S2). This regulatory behavior places the fish in the category of H-stable systems. Transitions between collective states To quantify the relation between group size and collective state we need to explicitly define the different states. Given the relatively clear demarcation of states revealed by our data in Fig. 2 we employed a simple approach in which we discretize the phase space in terms of the order parameters. The specific range of values were motivated by the high-density regions observed in Fig. 2. We thus define that the school is in: the polar state (P) when Op>0.65 and Or 0.65; and the swarm state (S) when Op 0.65 and Or 0.65; and swarm state (S) when Op 1−k and Or 1−k; and swarm state (S) when Op