Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2025 Aug 5.
Published in final edited form as: Curr Biol. 2024 Jul 17;34(15):3380–3391.e5. doi: 10.1016/j.cub.2024.06.049

Development of neural circuits for social motion perception in schooling fish

David Zada 1,2, Lisanne Schulze 1,2, Jo-Hsien Yu 1, Princess Tarabishi 1, Julia L Napoli 1, Jimjohn Milan 1, Matthew Lovett-Barron 1,3
PMCID: PMC11419698  NIHMSID: NIHMS2011374  PMID: 39025069

Summary

The collective behavior of animal groups emerges from the interactions amongst individuals. These social interactions produce the coordinated movements of bird flocks and fish schools, but little is known about their developmental emergence and neurobiological foundations. By characterizing the visually-based schooling behavior of the micro glassfish Danionella cerebrum, we found that social development progresses sequentially, with animals first acquiring the ability to aggregate, followed by postural alignment with social partners. This social maturation was accompanied by the development of neural populations in the midbrain that were preferentially driven by visual stimuli that resemble the shape and movements of schooling fish. Furthermore, social isolation over the course of development impaired both schooling behavior and the neural encoding of social motion in adults. This work demonstrates that neural populations selective for the form and motion of conspecifics emerge with the experience-dependent development of collective movement.

Keywords: collective behavior, Danionella cerebrum, visual systems, social development

eTOC blurb

Zada and Schulze et al. study visually-based schooling of the glassfish Danionella cerebrum, and characterize the development of this collective behavior. By imaging brain-wide neural activity, they discover that midbrain neurons responsive to the shape of moving conspecifics emerge with the experience-dependent development of schooling behavior.

Graphical Abstract:

graphic file with name nihms-2011374-f0001.jpg

Introduction

Animals can navigate their environments as a cohesive group, which provides individuals the benefit of enhanced vigilance and sensing capabilities through interactions with their social partners 14. Studies of fish schools have demonstrated that collective movement emerges from local interaction rules amongst group members 59, including short-range avoidance, long-range attraction, and postural alignment 2,4,5. Less is known about how social interaction rules materialize over the course of development 10, and the implementation of these rules in the nervous system 1113.

Recent studies in zebrafish have demonstrated that fish transition from social avoidance as larvae to social attraction between two and three weeks of age 1419, and that three-week-old zebrafish engage in aggregation behavior through a biological motion-responsive nucleus in the thalamus 20. However, zebrafish do not align their postures for extended periods of time 21, and it is challenging to image neural activity beyond three weeks of age due to skull ossification throughout development 22. Therefore, little is known about the ontogeny of polarization within fish schools, or how developing nervous systems acquire the ability to detect the sensory cues of moving social partners. Moreover, a remaining question is how fish gain postural alignment with conspecifics; while some models of collective behavior suggest that heading alignment should be a consequence of spatially-regulated attraction and avoidance 6,19,23, other work suggests that alignment is a separate process 24.

Here we address these challenges by studying the collective behavior of the micro glassfish Danionella cerebrum (D. cerebrum), a recently established vertebrate model system for neuroscience 2530. Their small size, robust social behaviors, and life-long optically accessible nervous system make them a well-suited model organism to address these questions. We report on our investigations of D. cerebrum schooling – quantifying the interactions of individual fish, the development of these social interactions, the maturation of neural populations responsive to schooling-related sensory stimuli, and the effects of social isolation on neural dynamics and behavior.

Results

Analysis of visually-based schooling in D. cerebrum groups

We characterized the collective behavior of D. cerebrum adults by recording groups of four fish as they swam around a 300 mm diameter arena (Figure 1A and S1A; see Methods) and tracking the position and body orientation of individual fish using SLEAP, a deep-learning based system for multi-animal pose tracking (Figure 1B and S1BC) 31. We quantified the aggregation and alignment of D. cerebrum as they explored this open arena, by evaluating the spatial arrangement of fish in groups, the differences in their heading directions, and each fish’s movements in relation to their neighbors (see Methods). We assessed these behaviors in both light and dark, to test the role of vision in schooling 9,20,25,32,33.

Figure 1. Visually-based schooling in groups of adult D. cerebrum.

Figure 1.

A) Top: example of four adult male D. cerebrum., swimming in a 300 mm diameter arena. Projection of tracked movement over 12 s, with each fish shown in a different color. Bottom: timeseries of heading angles of these same fish over two minutes. B) Close-up images of example raw frames (top) and SLEAP-tracking (bottom, with projection of location from prior 1 s) over three example frames. C) Schematic of occupancy measurement: observation of other fish in each frame, relative to the position and heading direction of a focal individual. D) Egocentric occupancy heatmaps, for groups of four fish swimming in light (left), or dark (right). Darker colors indicate more observations of other fish at this position. N = 5 groups, 121 frames/s recordings for 300 s each in light and dark. Average of all timepoints across all fish. Schematic of focal fish is shown (approximate body size). E) Mean group area comparing between groups of four fish swimming in light versus dark (N = 5 groups). Mann-Whitney U = 1.0. P = 0.015. F) Schematic of alignment measurement: difference in the heading angle of the focal individual with its nearest neighbor in each frame. G) Polar histograms of nearest-neighbor angle differences, for groups of four fish swimming in light (left), or dark (right). Observations around 0 °/360 ° indicate aligned neighbors. N = 5 groups, 121 frames/s recordings for 300 s each in light and dark. Histogram of all timepoints across all fish. Scale bar indicates 5% of total observations. H) Mean of pairwise heading direction correlation coefficients (r) amongst all fish, comparing between groups of four fish swimming in light versus dark (N = 5 groups). Mann-Whitney U = 25.0. P = 0.00794. I) Example of two adult male D. cerebrum. (left, blue) or zebrafish (right, green), swimming on opposite sides of a clear divider. Projection of tracked movement over 10 s. At bottom is a 30 s recording of each animal’s heading direction. J) Difference in heading angle between fish on either side of the clear barrier, with inter-animal distance plotted in 2 mm bins (mean +/− s.e.m). Shaded area indicates location of close proximity (< 5 mm). K) Mean absolute heading angle difference for fish within 5 mm of each other across the barrier. Mann-Whitney U = 0.0. P = 0.007936. N=4 pairs each. * P < 0.05 **P < 0.01. Mean +/− s.e.m, with individual points is shown (E, H, and K). See also Figure S1.

We quantified social aggregation by identifying the location of each fish’s social partners relative to itself, and the average size of group distribution in space (Figure 1C). Aggregation was reduced in the dark (Figure 1D,E and S1D), with a decrease in the average occupancy surrounding each individual fish and an increase in mean group area (205 ± 29 mm2 (mean ± s.e.m) in the light, 401 ± 36 mm2 in the dark, Figure 1E; P<0.05). In addition, each fish moved more slowly (Figure S1EG; P<0.01) and less often (Figure S1H; P<0.01) in the dark. We next examined postural alignment by characterizing the difference in heading angle between each fish and its nearest neighbor (Figure 1F). Fish groups were more aligned in the light compared to the dark (Figure 1G), with a decrease in the mean Pearson’s correlation coefficient between group members’ heading in the dark (0.41 ± 0.08 in the light, 0.057 ± 0.03 in the dark; Figure 1H; P<0.01). These results demonstrate that vision is necessary for the schooling behavior of D. cerebrum 25.

Next, we asked if D. cerebrum would show aspects of schooling behavior with vision alone 9,32,33. Previous work in juvenile and adult zebrafish has indicated that fish will preferentially engage with conspecifics across a clear barrier 14,34, where vision is their only source of social sensory input. We conducted similar experiments, comparing adult D. cerebrum and zebrafish (Figure 1I and S1IK, see Methods). While closely-spaced pairs of adult zebrafish oriented head-to-head across the clear barrier (mean heading angle difference between zebrafish was 134.4 ± 2.9°) 34, D. cerebrum pairs would tend towards alignment (mean heading angle difference 47.93 ± 12.45°, Figure 1J,K; P<0.01). Thus, D. cerebrum can exhibit postural alignment with their social partners using vision alone.

Development of collective schooling behavior

To determine how the key features of schooling behavior – positional aggregation and postural alignment – emerge over the course of development 35, we quantified the behavior of groups of four D. cerebrum at two, four, six, and eight weeks of age (Figure 2A and S2A; see Methods), spanning from the larval stage to adulthood. D. cerebrum grew in nose-to-tail length from ~ 4 mm at two weeks to ~ 12 mm at eight weeks of age, with the densest part of the body identified as the points tracked with SLEAP (Figure S2B; see Methods). Overall, the spatial relationships between fish increased with body length (Figure S2CG), as is expected from interactions based on vision that may use retinal occupancy as an important measure for determining social distance 79,18.

Figure 2. Sequential development of collective behavior in maturing D. cerebrum.

Figure 2.

A) Example of group movement for D. cerebrum of different ages (2, 4, 6, or 8 weeks old), swimming in a 300 mm diameter arena (or 150 mm diameter for small two-week-old fish). Projection of tracked movement over 12 s, with each fish shown in a different color. B) Mean speed (body lengths/s; Kruskal-Wallis H = 22.614, P = 4.85 × 10−5). Individual data points are means of the four fish in the group. C) Egocentric occupancy heatmaps, for groups of four fish (left to right: 2, 4, 6, or 8 weeks old). Maps are scaled by body length, to account for growing size across development. Darker colors indicate more observations of other fish at this position. Average of all timepoints across all fish. Schematic of focal fish is shown (approximate body size). D) Mean group area divided by mean body length, comparing groups of four fish (H = 34.4, P = 1.07 × 109). E) Polar histograms of nearest-neighbor angle differences, for groups of four fish (left to right: 2, 4, 6, or 8 weeks old). Observations around 0 °/360 ° indicate aligned neighbors. Histogram of all timepoints across all fish. Scale bar indicates 5% of total observations. F) Mean of pairwise heading direction correlation coefficients amongst all fish, comparing between groups of four fish (H = 23.6, P = 3.032 × 10−5). N = 10, 7, 9, and 7 groups for 2,4,6, and 8 week-old fish, respectively. * P < 0.05 **P < 0.01 ***P < 10−3, determined by Kruskal-Wallis followed by post hoc Dunn’s test with Bonferroni correction. Mean +/− s.e.m with individual points is shown (B, D and F). See also Figure S2.

We found that fish swam faster as they matured, increasing by 79% from two to eight weeks of age (6.4 ± 0.4 body length/s at two weeks, to 7.6 ± 0.5 body length/s at four weeks, 8.5 ± 0.2 body length/s at six weeks, and 11.3 ± 0.4 body length/s at eight weeks, Figure 2B; P<10−4). Groups of fish also became more closely spaced with age (Figure 2C), with the mean group area decreasing by 44% at four weeks and reaching a 67% decrease by eight weeks, compared to two-week-old fish (107.4 ± 3.4 body length2 at two weeks, to 59.1 ± 12.1 body length2 at four weeks, 35.0 ± 3.3 body length2 at six weeks, and 35.1 ± 4.5 body length2 at eight weeks, Figure 2D; P<10−8). Pairwise distances between individuals in these groups also decreased over development (Figure S2H). Therefore, social aggregation in D. cerebrum largely develops between two and four weeks of age, and plateaus by six weeks.

In contrast to the rapid development of aggregation, postural alignment between partners developed more slowly (Figure 2E), with progressive increases in the heading angle correlation between four, six, and eight weeks of age (mean Pearson’s r = −0.01 ± 0.02 at two weeks, 0.129 ± 0.05 at four weeks, 0.291 ± 0.03 at six weeks, and 0.399 ± 0.06 at eight weeks, Figure 2F; P<10−4). This developmental sequence – with the onset of aggregation preceding alignment – was also apparent when sorting fish by speed instead of chronological age (Figure S2I,J), and when comparing aggregation and alignment within groups (Figure S2K).

To measure this sequential emergence of schooling behavior at higher temporal resolution, we conducted a longitudinal measurement by sampling the same group of fish every 3–4 days from two to six weeks of age. We observed a similar pattern, that group area began to decrease between the ages of 25 and 32 days old (week 4), while heading direction correlation increased between 32 and 39 day old fish (week 5; Figure S2L,M). These results indicate that D. cerebrum schooling develops in a sequence – beginning with social avoidance at two weeks of age, then gaining aggregation at four weeks of age and alignment by six weeks of age. This suggests that the aggregation and alignment aspects of collective behavior are separate processes.

D. cerebrum follow visual stimuli with the form and motion of conspecifics

As animals develop the capacity to school in groups, their changing behavioral responses to social partners suggests a change in the sensory encoding of conspecific actions 11,12. In order to examine the neural basis of this maturation, we first sought to identify simplified visual stimuli that evoke schooling behavior, which can be presented to animals during neural activity imaging 16,18,20. We therefore designed a hexagonal 360° virtual environment for individual D. cerebrum to freely explore while viewing synthetic visual stimuli that resemble schooling conspecifics in their body shape and/or kinetics (Figure 3A). We monitored the swimming behavior of adult D. cerebrum while projecting three virtual conspecifics on each screen, whose movement kinetics were drawn from either real schooling fish (biological motion) or linear translation at the same average speed (non-biological / linear motion). These virtual conspecifics were either fish-like horizontal ellipses or vertical ellipses, and moved in clockwise or counterclockwise directions on alternating trials (Figure 3B, see Methods); we monitored the fraction of movements that were in the same direction as the virtual stimuli. We found that individual fish followed the direction of fish-like horizontal ellipses with biological kinetics 80% of the time, followed vertical ellipses with biological kinetics 43% of the time, and horizontal ellipses with non-biological motion 49% of the time (Figure 3C). These results demonstrate that D. cerebrum can school with visual stimuli whose shape and movement kinetics match those of conspecifics, allowing us to use such stimuli as an entry point to study neuronal responses to visual stimuli associated with schooling.

Figure 3. Behaviorally salient visual social motion stimuli for free-swimming and head-tethered fish.

Figure 3.

A) Schematic of recording configurations where stimuli simultaneously presented in six screens to freely swimming fish. B) Top: Types of projected stimuli. Bottom: representative trajectories of tracked movement over 60 s. C) Fraction of time a single fish followed social motion stimuli. One-way ANOVA followed by post hoc Dunn’s test with Bonferroni correction F = 25.7, P = 5.58 × 10–7. N = 10 fish. Mean +/− s.e.m with individual points is shown D) Production of social motion stimuli for head-tethered fish. 5 s period of schooling in a group of four 8 week-old fish (left) is rotated around one focal fish to produce this fish’s egocentric view of the other three animals over the 5 s period (right). E) Illustration of head-tethered D. cerebrum under a two-photon microscope objective with mouth and tail free, and immersed in a visual display environment that covers ~260 ° of visual space (left). The egocentric social motion stimulus is presented to the fish, where the three virtual group member motions are applied to three varieties of dark shapes (horizontal, vertical, or circular), or to the floor below the fish (“background”). ***P < 0.001. Mean +/− s.e.m with individual points is shown (C). See also Figure S3.

Imaging brain-wide neural activity in D. cerebrum viewing social motion stimuli

We next explored how neural activity across multiple regions of the D. cerebrum brain responds to naturalistic schooling-like visual stimuli, and how these responses mature over social development. To record neural activity from behaving D. cerebrum, we developed a method for head-tethering and visual stimulus display for behaving fish undergoing large-scale two-photon calcium imaging (Figure S3A; see Methods). This preparation allows for multi-region cellular-resolution calcium imaging from juvenile and adult transgenic D. cerebrum with near-pan-neuronal expression of a genetically-encoded calcium indicator (Tg(elavl3:H2B-GCaMP6s))28,29, while ensuring the mouth and gills are free for respiration, and the tail free for behavioral monitoring (see Methods).

In order to create visual stimuli with naturalistic biological motion 16,20,36 for head-tethered fish, we transformed a recording of four schooling D. cerebrum into one animal’s egocentric view of their three group members (Figure 3D; see Methods). This was produced from the same data that generated the biological motion stimuli for freely-swimming fish. We extracted a short epoch from this egocentric view to display to tethered D. cerebrum (Figure 3E), with trials showing these virtual conspecifics as either the pseudo-natural fish-like shape (horizontal ellipse), a sphere, or the non-fish-like shape (vertical ellipse). We also generated a “background” social motion stimulus by applying the motion of one virtual group member to the floor underneath the fish (see Methods). We presented stimuli to head-tethered D. cerebrum, to examine neural dynamics in response to this schooling-like social motion stimuli.

Neural responsiveness to social motion stimuli increases over development

We imaged neural activity at cellular resolution across multiple brain regions in two, four and six week-old D. cerebrum immersed in this visual environment (Figure 4A), where social motion stimuli were provided for 7 s trials, interleaved with a 9–11 s inter-trial interval. Stimuli for each trial were randomly selected to be virtual conspecifics with either horizontal, vertical, or spherical shapes, or background motion (Figure 4B and C). While all tethered D. cerebrum executed tail movements, we observed higher baseline rates in two-week-old fish (Figure S4A), consistent with previous results 28. These methods allow us to image brain-wide cellular-level activity of behaving D. cerebrum across social development, in response to ethologically-relevant visual stimuli.

Figure 4. Imaging social motion-driven neural dynamics across social development.

Figure 4.

A) Side and top-down views of 3D projections of representative two-, four- and six-week-old D. cerebrum expressing nuclear-localized GCaMP6s. Transparent red line in lateral indicates the approximate z depths targeted for functional imaging. B) Example fish with anatomically-annotated cell locations (left; A=Anterior; P=Posterior), and z-scored neural activity for all recorded neurons, sorted by anatomical location. Social motion stimulus timing (colors corresponding to the stimulus types in panel D, and tail movements are noted below each neural activity heatmap). A subset of the full imaging time is displayed. C) Short epoch of a fish’s example neurons’ responses to social motion stimulus types and tail movements. Color corresponds to the stimuli in panel D. D) Average change in z-scored neural activity in response to each stimulus (wk2: N = 6, wk4: N = 7, wk6: N = 8 fish) Significance values determined by linear mixed-effects model, with fish id as random variable. Individual data points displayed are means of cells within a fish. E) Short epoch of a fish’s example neurons’ responses to global optic flow motion and tail movements. Shades of red correspond to stimulus direction (left or right). F) Average change in z-scored neural activity in response to left or right motion (wk2: N = 5, wk4: N = 4, wk6: N = 6 fish). * P < 0.05. Mean +/− s.e.m with individual points is shown (D and F). See also Figure S3 and S4.

We recorded 4397 cells in six two-week-old animals, 8095 cells in seven four-week-old animals, and 9155 cells in eight six-week-old animals during social motion presentation, and identified neurons with significant stimulus-driven activity during one or more of the social motion stimuli (8.6% of cells in two-week-old fish, 12.5% in four-week-old fish, 12.4% in six-week-old fish, see Methods). We also recorded from animals viewing a non-social global optic flow stimulus that drifted right or left at a constant rate (Figure S3BD, see Methods), recording 3787 cells in five two week-old animals, 5102 cells in four four-week-old animals, and 8336 cells in six six-week-old animals. Of these cells, those with significant directionally-modulated activity comprised 21.7% of cells in two-week-old fish, 18.2% in four-week-old fish, and 13.8% in six-week-old fish (see Methods).

Amongst social motion-modulated neurons, we quantified the amplitude of the response to each stimulus type (average change in z-scored fluorescence), and compared them across developmental stages. We found that the magnitude of neuronal responses to the social motion of horizontal and spherical shapes increased over development (Figure 4D), while the magnitude of responses to vertical shape, background motion (Figure 4D), and global optic flow (Figure 4E,F) did not. Additionally, we sorted neurons by brain region (Figure 4A,B, S3D and S4B) and examined the relationship between visual motion and activity by fitting linear models to each neuron (see Methods). Average model coefficients (β) for neurons in multiple regions increased over development to social motion stimuli, but not global optic flow (Figure S3E and S4C).

These results demonstrate that, as D. cerebrum develop into adulthood, neurons across brain regions become more responsive to the schooling-like motion of conspecifics. In contrast, neuronal responses to global motion do not show similar increases over development. Therefore, as D. cerebrum become more socially engaged with conspecifics over development, their nervous systems mature to respond to socially-relevant visual information.

Maturation of neural populations selective to the shape of social partners

We next asked whether stimulus-driven neurons were responsive to all social motion stimuli, or could distinguish between different classes of visual stimuli. We analyzed the trial-averaged trajectories of neural activity in low-dimensional space using principal components analysis (Figure 5A and S4D; see Methods), to determine if trajectories differ amongst social motion stimuli with virtual conspecifics of different shapes. We first compared the average pairwise distance between stimulus-evoked trajectories for social motion stimuli with horizontal, vertical, or spherical virtual conspecifics; the average angular difference between trajectories (cosine distance) did not change in two-week-old fish (0.02 ± 0.04 a.u.), but increased in four- (0.34 ± 0.05 a.u.) and six- (0.30 ± 0.06 a.u.) week-old fish (Figure 5B; P<0.05). In contrast, the average angular distance between trajectories for each shape stimulus and background motion increased across all groups, with no differences between ages (two-week-old fish = 0.62 ± 0.17 a.u., four-weeks = 0.69± 0.12 a.u., six-weeks = 0.70 ± 0.12 a.u.; Figure 5C). These findings persisted when neurons were subsampled to common numbers of cells across ages (Figure S4E, see Methods). For both stimulus type comparisons, the mean Euclidean distance between trajectories increased across all groups, with no significant distinction between ages (Figure S4F). Therefore, in socially-mature fish, neural population activity evoked by social motion stimuli follows distinct trajectories depending on the shape of observed conspecifics.

Figure 5. Maturation of neural selectivity to the shape of social motion stimuli.

Figure 5.

A) Low-dimensional trajectory of trial-averaged social motion stimulus responses, beginning at 1s pre-stimulus onset (black dot) and progressing for 12 s after stimulus onset. Trajectories are colored by stimulus type, and are shown for the first three principal components (pcs). Example fish of each age are shown. B) Mean pairwise cosine distance of trial-averaged trajectories in 10-dimensional PC space, between each of the three virtual group member social motion trial types (horizontal, vertical, or spherical shape). Left: timeseries are baseline-subtracted (1 s before stimulus onset; mean +/− s.e.m), and the average across the 7 s stimulus period (top gray bar). Right: mean across the 7 s stimulus period. One-way ANOVA followed by post hoc t-test tests with Bonferroni correction. F = 8.9, P = 0.002. C) Mean pairwise cosine distance of trial-averaged trajectories in 15-dimensional PC space, between each of the three virtual group member social motion trial types and the background social motion trials. Left: timeseries are baseline-subtracted (1 s before stimulus onset). Right: mean across the 7 s stimulus period. One-way ANOVA F = 0.08, P = 0.91. D) Neurons for fish of each age were selected as top 10th percentile of model coefficients (β) for horizontal shape social motion (left) or the background social motion (right), and their trial-averaged responses to each stimulus type is displayed. Traces are mean +/− s.e.m, colored by stimulus type. Beginning at 1s pre-stimulus onset, and progressing for 12 s after stimulus onset (top gray bar indicates stimulus period). E) Object-shape selectivity (absolute value of the difference in the maximum response to horizontal and vertical shape stimuli) across each age, displayed on cell locations in example fish. F) Summary of shape selectivity measure (absolute value of the difference in the maximum response to horizontal and vertical shapes) across each age, and separated by gross anatomical subdivision (left; A=Anterior; P=Posterior). Significance values determined by linear mixed-effects model, with fish id as random variable. Individual data points displayed are means of cells within a fish. * P < 0.05 **P < 0.01 **P < 0.001. Mean +/− s.e.m with individual points is shown (B, C and F). N = 6 (2 wks), 7 (4 wks) and 8 (6 wks) fish. See also Figure S4 and S5.

We next asked whether these population-level distinctions between neural responses to the shape of moving virtual conspecifics were a consequence of shape-tuning in single neurons. To determine whether neurons are selective for each class of social motion stimulus, we examined the trial-averaged activity of the most responsive neurons, selecting neurons in the top tenth percentile of β coefficient distributions for the horizontal fish-like shape or the background motion stimulus. Responses to different social motion shapes became more selective in older fish (Figure 5D), whereas background motion-responsive neurons were selective across all ages, consistent with the mature retinotopy underlying widefield motion detection in larvae 37. These distinctions were present regardless of whether the fish moved their tail during the stimulus trial or not (Figure S5A,B).

To identify which neurons and brain regions are the most selective to the social motion of fish-like shapes, we quantified a shape selectivity index for all neurons recorded. We quantified the difference in maximum responses of each neuron to motion of horizontal versus vertical shapes, where cells with a high value have the greatest differences in responses to each stimulus (see Methods). By sorting neurons into brain regions, we found an age-dependent increase in the mean shape selectivity of neurons in the midbrain (Figure 5E,F; mean response difference of 0.68 ± 0.016 σ at two weeks, 0.80± 0.012 σ at four weeks, 0.88 ± 0.014 σ at six weeks; P<0.05). A similar selectivity metric, comparing responses to social motion of the horizontal shapes versus background, shows no differences across ages and brain regions (Figure S5C,D).

These data demonstrate that the selectivity of visual midbrain neurons to the shape of social motion stimuli matures with the social development of D. cerebrum. Therefore, the development of postural alignment in schools emerges alongside the ability of neurons to distinguish between the postures of schooling conspecifics. This suggests that the detection of a social partners’ orientation may be important for coordinating one’s posture with these partners.

Developmental social isolation impairs schooling behavior and neural shape selectivity

We next sought to manipulate the social development of D. cerebrum, to ask whether shape discrimination is present in animals with impaired social behavior. We socially isolated D. cerebrum from the early larval stage (2–4 days old), and raised them to adulthood in tanks where animals did not have visual access to adjacent tanks (Figure 6A). We then assessed collective behavior of groups of four socially isolated fish at four or six weeks of age. Socially isolated four-week-old fish had speed, aggregation, and alignment behaviors that were no different from group-housed controls (Figure S6AC). In contrast, socially-isolated six-week-old fish moved at a normal speed (Figure S6A), but showed impaired schooling, with less aggregation (mean group area: 207.4 ± 40.1 mm2 in group-housed fish and 348.6 ± 24.3 mm2 in socially isolated fish, Figure 6B; P<0.05) and reduced heading angle alignment (mean Pearson’s r = 0.37 ± 0.04 in group-housed fish and 0.13 ± 0.02 in socially isolated fish, Figure 6C; P<0.001). These results are consistent with recent studies of developing zebrafish, where social isolation impairs aggregation and social preference in adult animals, but not juveniles 16,38. These results indicate that six-week-old D. cerebrum do not align their heading direction with their social partners, demonstrating that engaging in postural alignment during schooling requires social experience.

Figure 6. Social isolation impairs schooling and neural selectivity to the shape of social motion stimuli.

Figure 6.

A) Schematic of social isolation procedure. Note that socially isolated fish did not have visual access to conspecifics in adjacent housing tanks. B) Mean group area, comparing between group-housed (N=6 groups) and socially isolated (N = 13 groups) groups of four six-week-old fish. Mann-Whitney U = 11. P = 0.012. C) Mean of pairwise heading direction correlation coefficients amongst all fish, comparing between group-housed (N=6 groups) and socially isolated (N = 13 groups) groups of four six-week-old fish. Mann-Whitney U = 74. P = 8.8 × 10−4. D) Mean pairwise distance of trial-averaged trajectories in 10-dimensional PC space, between each of the three virtual group member social motion trial types (horizontal, vertical, or spherical shape). Left: cosine distance between trajectories. Right: Euclidean distance between trajectories. In each, timeseries are baseline-subtracted (1 s before stimulus onset; mean +/− s.e.m), and the average across the 7 s stimulus period (top gray bar) is compared between group-housed (N=7) and socially isolated (N=5) fish. Comparison of cosine distance (left): t = 2.88. *P = 0.016. Comparison of Euclidean distance (right): t = 2.7. *P = 0.022, determined by T-test for means of independent samples. E) Neurons for group-housed and socially isolated fish were selected as top 10th percentile of model coefficients (β) for horizontal shape social motion (left) or the background social motion (right), and their trial-averaged responses to each stimulus type is displayed. Traces are mean +/− s.e.m, colored by stimulus type. Beginning at 1s pre-stimulus onset, and progressing for 12 s after stimulus onset (top gray bar indicates stimulus period). F) Summary of shape selectivity measure (absolute value of the difference in the maximum response to horizontal and vertical shapes) across conditions, and separated by gross anatomical subdivision (left; A=Anterior; P=Posterior). N = 6 (2 wks), 7 (4 wks) and 8 (6 wks) fish. ** P < 0.01. Mean +/− s.e.m with individual points is shown (B, C, D and F). N = 7 (group-housed) and 5 (socially isolated) fish. See also Figure S6.

We therefore sought to ask whether neural responses to social motion stimuli were impaired in isolated animals compared to group-housed controls that align with their social partners during schooling. We recorded 6758 cells in seven group-housed six week-old fish, and 9898 cells in five socially isolated six-week-old fish. Of these cells, 11.9% of neurons in group-housed fish and 11.1% of neurons in socially isolated fish were significantly modulated by social motion stimuli. Amongst these significantly-modulated neurons, only responses to social motion stimulus with vertical shapes were decreased in socially isolated fish (Figure S6D). These data suggest that neurons in the brains of socially isolated D. cerebrum develop similarly to group-housed fish and have similar ability to respond to fish-shaped visual stimuli.

We next analyzed shape-selectivity of neurons in socially isolated fish, by comparing the distance of trial-averaged trajectories in low-dimensional neural activity space (see Methods). When comparing the average pairwise distance between trajectories for social motion stimuli with horizontal, vertical, or spherical shapes, we found that socially isolated fish showed a decrease in the mean angular distance (group-housed: 0.35 ± 0.02, socially isolated: 0.15 ± 0.07, P<0.05) and Euclidean distance (group-housed: 9.3 ± 1.9, socially isolated: 2.7 ± 0.9, P<0.05) compared to group-housed controls (Figure 6D). In contrast, there were no significant differences between the average cosine or Euclidean distances when comparing pairwise distance between trajectories for each shape stimulus and background motion (Figure S6E). This data suggests that while the visual system responses develop similarly, social isolation impairs the ability of adult D. cerebrum to distinguish between the orientation of moving conspecifics, but the ability to distinguish background from foreground motion is intact.

To examine social shape selectivity at the level of single cells, we compared the trial-averaged activity of the most responsive neurons for group-housed and socially isolated fish. Neuronal selectivity to the horizontal shape was found in group-housed fish but not in socially isolated fish, where the most responsive neurons for horizontal shape were similarly responsive to other shapes (Figure 6E). As expected, background motion-responsive neurons were selective in both conditions. We then compared the social motion shape selectivity index of neurons across each brain region, and found reduced mean selectivity in socially isolated fish compared to group-housed controls in the midbrain (0.88 ± 0.02 σ for group-housed, 0.64± 0.01 σ for socially isolated, P<0.001; Figure 6F). In addition, selectivity for social motion of the horizontal shapes versus background motion showed decreased selectivity in the hindbrain of isolated fish (Figure S6F).

Together, these results demonstrate that social isolation impairs the ability for D. cerebrum to school as socially developed adults. Notably, we found that midbrain neurons, whose shape selectivity increases over development, showed impaired shape selectivity in isolated animals. These findings demonstrate that social experience is important for the social development of D. cerebrum visual circuits, and suggest that the identification of conspecific orientation plays a role in successfully coordinated schooling behavior.

Discussion

Collective behavior emerges from the interactions between individuals in a group, that continually sense each other’s actions and move cooperatively. These interactions are produced by the sensory, integrative, and motor processes of each animal’s nervous system – a complex process that arises over the course of development. Here we have used D. cerebrum as a model system 2528 to investigate the development of visually-based schooling behavior and its neurobiological underpinnings. We found that D. cerebrum schooling behavior is based on vision (confirming prior work 25), and found that these fish can engage in affiliative behaviors based on vision alone, as has also been described in zebrafish 14,16,34. We demonstrated that D. cerebrum schooling develops in a sequential manner: two week-old larvae begin with social avoidance, and progressively acquire the ability to aggregate beginning at four weeks, followed by postural alignment and coordinated swimming beginning at six-to-eight weeks of age. Our social isolation experiments demonstrate that the shoaling behavior of four week-old fish – with aggregation but not alignment – does not require social experience, in agreement with work in juvenile zebrafish 16,38. However, the more complex schooling behavior of older D. cerebrum – comprising both aggregation and postural alignment – is impaired by social isolation. Future studies can determine how these innate and experience-dependent aspects of social development interact, including the role of critical periods for neural plasticity 12,32.

To gain access to the neural circuits underlying schooling, we showed that visual perception of the shape and kinetics of conspecific motion is sufficient for D. cerebrum to engage in schooling behavior. We then established a novel head-tethering method to image neural activity from behaving D. cerebrum across developmental stages, and recorded neural activity across brain regions with cellular resolution while presenting visual stimuli that mimic the egocentric experience of a schooling fish. In agreement with previous work in juvenile zebrafish 20, we found biological motion-driven neural activity at all ages. However, we found that the fraction of social motion-modulated neurons, the magnitude of their responses, and the selectivity to the shape of social motion stimuli increases with age. This developmental increase in stimulus responsiveness and specificity was not present in the case of background motion or global optic flow, suggesting that the brains of D. cerebrum mature to favor the processing of ethologically-relevant social motion stimuli. We note that the maturation of social stimulus selectivity is not a mere consequence of brain development; we found that socially isolated six week-old fish are physically mature, but their neural activity does not distinguish between the shape of social motion stimuli. Together, these results indicate that, as D. cerebrum matures to engage both the aggregation and alignment aspects of schooling, their nervous systems acquire the ability to identify the shape and posture of moving conspecifics.

While prior studies have suggested that postural alignment in fish schools is a consequence of close aggregation 6,19,23, our results suggest that alignment is a separate process from aggregation. We observe that four-week-old fish aggregate without strong alignment (i.e. shoaling), whereas six-week-old fish do both (i.e. schooling). Furthermore, we found that social isolation does not influence shoaling at four weeks old, but dramatically reduced schooling at six weeks of age, when heading alignment occurs in group-housed fish. These results suggest that D. cerebrum actively engage in social alignment, and that this process is mediated by neural populations in the midbrain that detect the body orientation of social partners. The explicit encoding of conspecific orientation and posture could allow for effective postural alignment during schooling. Additional studies are required to determine whether social shape-selective neurons distinguish between other visual features of conspecifics and their motion, including color, patterning, or sex 32, and their relationship to neurons selective to biological motion 20,36. Furthermore, it will be interesting to investigate how visual perception of conspecifics interacts with auditory perception, as male D. cerebrum begin to produce vocalizations shortly after the development of schooling 39.

A central question to address in future studies is how visual representations of conspecifics and their actions are transformed into the movement commands that produce social aggregation and alignment. We hypothesize that these behaviors involve coordination of brain-wide circuits, including the visually-driven midbrain neurons we describe, as well as sensory-motor integration in forebrain populations, brainstem motor control pathways 40, and ascending hypothalamic and neuromodulatory influences 41. These studies will benefit from simultaneously imaging all neurons in adult D. cerebrum using newly-developed microscopy techniques 29 that can allow for investigation of dynamics across the entire vertebrate social decision-making network 42. Investigating the neurobiological mechanisms of collective behavior can provide links across biological scales – from the microscale properties of individual nervous systems to the emergent properties of animal collectives 13.

STAR*METHODS

RESOURCE AVAILABILITY

Lead contact

Further information and requests for resources should be directed to and will be fulfilled by the lead contact, Matthew Lovett-Barron (mlb@ucsd.edu).

Materials availability

This study did not generate new unique reagents.

Data and code availability

Data and code are available via links in the key resources table. Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.

Key resources table.
REAGENT or RESOURCE SOURCE IDENTIFIER
Chemicals
SYNCAINE® (MS 222) Syndel 200–226
UltraPureTM LMP Agarose Invitrogen 16520–100
Deposited data
Code This paper https://github.com/lblabucsd/Zada_Schulze_24/
Data This paper doi: 10.17632/5gjc34mynv.1
Experimental models: Organisms/strains
D. cerebrum : Tg(elavl3:H2B-GCaMP6s) Judkewitz Lab NA
D. cerebrum : Wild type Judkewitz and Douglass Labs NA
Zebrafish : AB ZIRC ZDB-GENO-960809–7
Software and algorithms
Python 3.6 python.org RRID:SCR_008394
Suite2p www.suite2p.org RRID:SCR_016434
ThorImage®LS 4.1 www.thorlabs.com ThorImage®LS
SLEAP 1.3 Pereira et al. 31 https://github.com/talmolab/sleap
BonsaiRx Lopes et al. 43 https://bonsai-rx.org/
Other
AnyBeam Pico Projector, AnyBeam HD301M1-H2
Infrared light CMVision Technologies Inc. CM-IR130–850NM
Camera 121Hz FLIR Grasshopper Edmund Optics #33–534
7” LCD screens HAMTYSAN NA
25 mm/ F 1.85 lens Edmund Optics #33–305
MaiTai DeepSee SpectraPhysics

EXPERIMENTAL MODEL AND SUBJECT DETAILS

The behavioral and imaging experiments with D. cerebrum were approved by the government authorities (U.S. Animal Care, and Institutional Animal Care and Use Committee (IACUC), (USDA Registration Number 93-R-0437)) and carried out in accordance with the U.S. federal and California state law to enforce the Animal Welfare Act (AWA) under the California Health and Safety Code.

Animals aged between 2 and 8 weeks post fertilization were used in the experiments. These animals were either WT or Tg(elavl3:H2B-GCaMP6s) genotypes..

The sex of D. cerebrum only becomes visible around 8 weeks of age. Therefore, two-, four- and six-week-old fish used in our experiments did not have an identifiable sex and experiments at those ages were thus conducted agnostic to sex. Adult D. cerebrum at the age of eight weeks and older were both males and females in our studies: In the light-dark experiments two groups were males, one group was females and two groups were a mix of two males and two females. For the clear-wall assays, only males were used. For eight weeks of age in the sequential development experiments, we used three groups of males, one group was females and three groups of mixed sexes. In the hexagonal virtual environment assays, six males and four females were used.

METHOD DETAILS

Fish husbandry

D. cerebrum and zebrafish were raised and maintained, separately, in standard zebrafish housing systems (Aquaneering; system water temperature 29 ± 0.5 °C, pH 7.0, conductivity 650 mS), under 14 h light/10 h dark cycles, and fed twice a day. D. cerebrum were bred in communal tanks of 20–40 individuals with ~5 cm silicone tubes as spawning environments 25,44. Eggs were collected during the first hour of daylight, and during 1–2 h after morning and afternoon feeding. Embryos (0–5 days old) were raised in egg-water (0.2 mg/L Instant Ocean, 3 g/l mm CHNaO3, and 0.15% methylene blue dissolved in reverse osmosis purified water) in an incubator at 29 ± 0.5 °C. Larvae (5–14 days old) were cocultured with L-type rotifers (Brachionus plicatilis) in static tanks, where water levels were raised approximately 1 L per day. After entering water circulation at 14 days old, D. cerebrum were fed increasingly with artemia. D. cerebrum reaching adulthood and becoming fertile by 8–10 weeks. For isolation experiments, single fish were housed in individual tanks separated by a visual barrier, and were isolated beginning after hatching from the chorion at 2–4 days old. Wild-type AB zebrafish were raised using standard procedures, and used for behavior experiments at 6–8 weeks of age. Wild-type D. cerebrum were provided by Dr. Adam Douglass (University of Utah) and Dr. Benjamin Judkewitz (Charité Berlin). The transgenic line Tg(elavl3:H2B-GCaMP6s) was provided by Dr. Benjamin Judkewitz (Charité Berlin).

Behavioral experiments

All behavioral experiments were controlled with BonsaiRx (bonsai-rx.org), using BonVision and BonZeb packages 43,45,46, and custom routines to control and time stamp camera acquisition and visual stimuli. All behavioral experiments were conducted in a behavioral room at 28 °C maintained with central circulation and portable electric heater. Since the onset of D. cerebrum reproduction is at ~8 weeks of age, 8 weeks and older fish are considered as adult D. cerebrum. To avoid feeding and circadian clock effects on behavioral output, we conduct all behavioral experiments between 1–4 zeitgeber hours, before the first feeding of the day and without feeding during this period.

Zebrafish and D. cerebrum older than 28 days old were tested in a 300 mm acrylic circular arena (black walls and transparent bottom lined with white styrene to diffuse light) filled with 1 L of system water, covered with black curtain to control light and dark. D. cerebrum younger than 28 days old fish were placed in a 150 mm petri dish placed in the middle of the aforementioned circular arena filled with 150 mL of system water, in order to allow for sufficient tracking despite their small size. The arena was illuminated with bottom-projected white light (AnyBeam Pico Projector, HD301M1-H2) and infrared light (CM-IR130–850NM, CMVision Technologies Inc.) Behavioral videos were acquired from a camera mounted above the arena, at 121 Hz (FLIR Grasshopper, #33–534) with an 8 mm/ F 1.8 lens (Edmund Optics, #15–626) and long-pass filter (Edmund Optics, #12–767).

Before the recording, fish were left to habituate in the arena for 10 min, and then recorded for 5 min. In light-dark experiments, fish were recorded under light for 10 min, then lights were turned off and fish were recorded for an additional 15 min. Since fish are affected by light-dark transitions 47, we considered the first 10 min of dark as habituation and only the last 5 min were analyzed. We note that the eight-week-old fish used in the light-dark experiments were also included in the eight-week-old group in the development experiments. For clear-wall assays, the 300 mm arena was divided by a 1 mm thick transparent acrylic barrier sealed to the wall and bottom of the arena to prevent water exchange.

For the hexagonal virtual environment assays, we used six LCD screens (HAMTYSAN, 7 inch 800×480 LCD) mounted to a custom built hexagonal arena with thin transparent acrylic walls. We extracted a short 6 s period of schooling behavior from 121 Hz recordings of a group of three eight-week-old D. cerebrum, and obtained the centroid position and swimming speed of each fish. Then, we applied these vectors to the size of the six screens (x: 0–3600, y: 250–310 [water level]). To make the stimuli presented continuously and simultaneously in all screens, we made six different starting points with jumps of 600 in the x axis. For non-biological / linear motion we make an average speed of all three fish and apply it with the same parameters. Fish were habituated in the arena for 10 min before stimuli onset. Then, each stimulus was projected for 5 minutes in random order. Each stimulus was projected both clockwise and counterclockwise for 2.5 minutes. All stimuli were displayed underneath the water surface of the recording arena.

In vivo two-photon calcium imaging

For live D. cerebrum brain imaging, we designed a triangular chamber filled with fish housing water, built from two LCD screens (HAMTYSAN, 7 inch 800×480 LCD) and a transparent acrylic back wall and floor for IR lights and recording camera, respectively. A 4.5 mm column of clear acrylic was used as a pedestal to position head-fixed fish at a standard positioning within this arena. The arena was 10 cm high in total, with the fish placed at the intersection of each screen’s midpoint. The two screens occupied ~260 ° of visual space in azimuth (130 ° each side, with ~10 ° gap in the front, and ~90 ° gap behind the fish), and ~105 ° of visual space in elevation (52.5 ° below and above, though note that water height only reached ~3 mm above the fish’s eye).

To image the brains of D. cerebrum tethered in this environment, we developed a head-fixation protocol (see fig. S3A). We prepared a 24×30×1 mm coverslip (12545B, Fisher Scientific) by lining UV-cured plastic (Bondic) on the margins to hold agarose. We then placed an anesthetized D. cerebrum (anesthetized in 120 mg/L MS-222 for 1–2 minutes) upside down by the front edge of the coverslip, secured its position with two wedges of pre-cured Sylgard placed behind each ear, and covered it with 3–4% low-melting point agarose (UltraPure LMP Agarose, Invitrogen) – ensuring the back of the head and trunk are as close as possible to the glass. We removed the agarose covering the mouth, gills, and tip of the tail with a scalpel, and ventilated with oxygenated water to ensure gill movement. We then applied a strip of UV-curable plastic extending from each side of the coverslip, including the agarose-covered part of the fish, to provide extra stability. UV light was delivered for less than a second, and the mounted fish was placed in fresh fish water for recovery. Fish that showed good recovery by moving their tail and breathing normally were transferred into the chamber described above (survival rate was approximately 70% for two-week-old fish, 50% for four-week-old and 30% for six-week-old). Coverslips were suspended from the acrylic pedestal using 3 × 1 mm magnets (Ethcool), two glued into the top of the pedestal, and two on top of the coverslip. The arena was then filled with warmed (28 °C) and oxygenated system water (~ 500 mL), and fish were allowed to recover for 10–60 minutes before imaging data were collected.

For tail tracking, fish were illuminated from behind by two collimated 850 nm LEDs (ThorLabs, M850L3), and tail movements reflected from a mirror beneath the chamber were recorded by a 121 Hz IR camera (FLIR Grasshopper, #33–534) with a 25 mm/ F 1.85 lens (Edmund Optics) and IR bandpass filter (Thorlabs, FBH850–40). BonsaiRx was used to track tail movements online, measure the timing of microscope frame acquisitions, and display visual stimuli. Visual stimuli were displayed on the screens using cube mapping in the BonVision package 45, where each screen displayed a viewport in a virtual environment. Global motion stimuli were generated by producing an image of evenly spaced red dots on a black background, and tiling this image along the inside of a sphere. The observer was placed at the center of this sphere in the virtual environment, and the sphere rotates in the y axis either left or right at 20 °/s, reversing the direction of rotation every 20 s.

In the case of social motion stimuli, we extracted a short 5 s period of schooling behavior from 121 Hz recordings of a group of 4 eight-week-old D. cerebrum, and obtained the centroid position and heading direction of each fish. We selected one of the fish as the “focal” individual, and translated/rotated all points around this focal individual, to produce a time series of each fish’s position and orientation in reference to the focal individual (which was held at the position of 0,0 and heading angle of 0; see Fig. 3A). A 2 s period where no other fish were visible was appended to the end of the stimulus. We subsampled this 7 s dataset of three fish (“virtual group members”) to 60 Hz in order to accommodate our screens’ refresh rate, and saved the egocentric centroids and heading angles of each fish as a .csv file. In BonsaiRx, we developed a virtual environment, composed of a 1500 mm2 plane with a smoothed white-noise pattern (“seafloor”). The fish’s position in this VR world was in the center (0,0 in x/y), 20 mm above the seafloor. Virtual group members objects were presented 10 mm above the focal fish, with shapes created as ellipsoids with a scale of 8×1×3 mm in x/y/z (horizontal stimulus), 3×1×8 mm in x/y/z (vertical stimulus), or 3×3×3 mm in x/y/z (spherical stimulus), and moved according to the x/y/angle data provided for each of the three fish in the field of view. For horizontal stimuli, which were polarized in azimuth, the direction of the shapes moved according to the measured heading direction angles. After a 120 s baseline period where only the seafloor was visible, we used a trial structure to present these 7 s stimuli to head-tethered fish, with 9–11 s inter-trial intervals, and random selection of these three stimulus shapes or the x/y movement patterns of one fish applied to the seafloor (“background” social motion stimulus). All stimuli were displayed underneath the water surface of the recording arena.

Two-photon microscopy was performed with a ThorLabs Bergamo II multiphoton microscope controlled by ThorImageLS 4.1 and illuminated by an fs-pulsed 80-MHz Ti:S laser (MaiTai DeepSee; SpectraPhysics). GCaMP6s fluorescence was imaged with a 16x / 0.8W Nikon objective at an excitation wavelength of 930 nm and ≤10 mW excitation power. Frames of 800 × 800 pixels covering a field-of-view of 833×833 um, were acquired at a rate of 19.3 Hz, and averaged three times to produce a final effective imaging rate of 6.43 Hz. While imaging fish across different ages, we focused on single z-planes (90–190 μm below the surface) that maximized the number of neurons visible in the telencephalon and mesencephalon, while including some neurons in the diencephalon (primarily habenula and dorsal thalamus), and the hindbrain (though note that more of the hindbrain was visible in the smaller two-week-old fish). We imaged fish at a diagonal, to include as much of the brain as possible in older fish, which have a wider midbrain and elongated forebrain 20.

Behavior Analysis

We used Social LEAP-Estimates Animal Poses (SLEAP) 31, for tracking the location and posture of fish in groups. Each video was checked and proofread after pose inference and identity tracking, and output files (.h5) containing the locations of each point were further analyzed using python code organized in Colab notebooks (available upon publication). The SLEAP model was trained to track each fish with six or nine points distributed from the nose to the proximal tail, while we excluded the most distal tail owing to the limited opacity of this structure. For each fish at each time point, the animal centroid was defined as the x/y coordinate labeling the front of the swim bladder, the nose was defined as the midpoint between the x/y coordinates of each eye, and the tail tip was defined as the furthest reliable x/y coordinate along the tail (second-to-last point). Heading angle was calculated as the direction following the vector between the centroid and nose coordinates. All x/y coordinates were transformed from pixels to mm for subsequent quantification. The time series of x/y positions and heading angles were smoothed by a five-frame running average (equaling 6 ms time windows). Speed (in x/y position, or in angle) was calculated from the change in position or heading angle across frames, and was subsequently smoothed by a ten-frame running average. Nearest neighbors were identified for each fish at each time point, and the angle between a focal fish and their nearest neighbor was identified as the absolute difference in heading angle.

Fraction time moving was calculated as the number of frames where fish moved > 2 body length/s. Heading angle correlation is the average pairwise Pearson’s correlation coefficient between all fish pairs, over the full length of the recording. Group area was defined as the convex hull in two dimensions, from all the points across all fish in the group. For experiments analyzing social interactions across a clear barrier, we only examined fish pairs where the mean inter-animal distance is under 25 mm across the recordings, and only included frames where fish are within the middle 80% of the wall (avoiding the 10% closest to each arena boundary). We identified the difference in heading angle as the absolute value of the heading angle difference between closely-spaced individuals.

Egocentric spatial maps were calculated for each individual fish, and averaged across every 10th time point for all fish in the group. For occupancy maps, the focal fish’s centroid was placed in the center of an empty 100 × 100 array of zeros (covering 100 mm2 or 6 body length2), and oriented to face north in every frame. All other fish centroids were displaced and rotated around the focal fish. If another fish was within the 100 × 100 array, that pixel was assigned a 1. This array was produced for each time point for a focal fish, then down-sampled to 50 × 50 and summed to produce a final 50 × 50 array. This same process was used to calculate speed maps, but instead of pixels being assigned a value of 1 when a fish was present in that location, the value was assigned as the linear speed (x/y displacement from the previous frame) or angular speed (degree change from the previous frame) of the focal fish.

To calculate the fraction of time a fish followed a virtual social motion stimulus in the hexagonal arena, we counted the number of clockwise and counterclockwise rotations and aligned them with the direction of the presented stimuli. First, the center x and center y were calculated as the means of the x and y coordinates, respectively. Then, the angles were computed using the arctan2 function based on the differences between the center x and x, and between the center y and y. Subsequently, the difference between consecutive angles was calculated (wrapping into the range of −π to π). By counting the number of positive and negative changes in angles and dividing it by the total number of frames, we obtained the fraction of time a fish swims clockwise or counterclockwise, respectively.

Imaging Analysis

Before commencing analysis, we only proceeded with experiments where fish showed spontaneous tail movement but did not show substantial z-movements. Imaging data were motion corrected in Suite2p 48, followed by cell extraction. Time series were inspected to ensure there was no z-motion contamination or slow drift, and only included neurons with continuous measurements and which were classified as a cell by Suite2p (“iscell”=1). We excluded the first 5% of each imaging trial to avoid the influence of sound-evoked activity upon the initiation of scanning. Fluorescence traces were detrended, smoothed with a 1 s rolling mean, and z-scored. Neurons in each recorded fish were further classified as belonging to the telencephalon, diencephalon, mesencephalon, and rhombencephalon with manually-defined boundaries. Z-scored fluorescence and the median x/y coordinates for each cell within these boundaries were used for further analysis. Final counts of neurons included for social motion stimuli are N = 4397 cells at two weeks (N=6 fish), 8095 cells at four weeks (N=7 fish), and 9155 cells at six weeks (N=8 fish). Final counts of neurons included for global optic flow stimuli are N = 3787 cells at two weeks (N=5 fish), 5102 cells at four weeks (N=4 fish), and 8336 cells at six weeks (N=6 fish). Final counts of neurons included for social isolation stimuli are N = 6758 cells for group-housed six-week-old fish (N=7 fish), and 9898 cells for socially isolated six-week-old fish (N=5 fish). We quantified stimulus-responsive cells by calculating the response of a neuron by conducting a t-test between the mean z-scored fluorescence in the 7 s post-stimulus and the mean z-scored fluorescence in the 1 s pre-stimulus. Neurons were identified as stimulus-responsive if the significance of any of these tests is P<0.01.

All analyses were conducted using python code organized in Colab notebooks. For behavioral analysis of tethered fish, we smoothed and mean-subtracted the tail angle, and analyzed the sum of the tail angle’s absolute value over the 7 s stimulus for each trial. This value was normalized against the mean tail angle sum across five pre-stimulus periods of the same length. Values below 1 indicate less stimulus-driven movement than baseline movements, whereas values above 1 indicate more. For neural activity analysis, behavioral recordings (tail movement, stimulus presentation) were first cropped to align with the times of two-photon image acquisition, and time series were resampled to a common 10 Hz sampling rate for further analysis. To exclude low-amplitude tail movements, we only analyzed tail movements that exceeded 15° from the midline, and produced an array of binary movement times for subsequent analysis.

We fit linear models to each neuron using ridge regression (alphas = 0.001, 0.01, 0.1, 1.0, 10.0), training on the first 75% of the data and testing on the last 25%. Regressors were normalized between 0 and 1, and smoothed by an exponentially weighted moving average with decay of 3 s (approximate decay of H2B-GCaMP6s). For optic flow stimuli, the regressors were the direction of the global optic flow (accumulating positive to go right, and negative to go left) and tail movements. For social motion stimuli, regressors were boxcar functions for each stimulus type (horizontal shape, vertical shape, spherical shape, and background motion), and tail movements. We used the model coefficients (βs) for each regressor to identify neurons in each age group with the most selective responses to each stimulus, and plotted these neurons’ averaged peri-stimulus activity. We defined the “most responsive cells” of each age group to be those in the top 10th percentile of the β distribution for a given regressor type. We quantified a neuron’s stimulus selectivity by measuring the absolute value of the difference between the maximum z-scored activity (σ) during 12 s after onset of the horizontal stimulus (averaged across all trials), and the maximum z-scored activity (σ) during the same period of the vertical or global floor drift stimulus (averaged across all trials).

To analyze population-level activity, we performed principal components analysis (PCA) on populations of neurons in each fish with a positive prediction score from the linear model. These traces were mean-centered before PCA; 10 components explained ~ 50–80% of the variance for each fish. For analysis of subsampled populations, we randomly selected 50 cells from the original distribution, before PCA (except for 3 two-week-old fish, 1 four-week-old fish, and 1 6-week-old fish had fewer cells). For visualization, we plotted the trial-averaged trajectories in the first 3 components. To quantify the distance between trajectories in low-dimensional PC space, we obtained the mean pairwise distances amongst all 3 object trajectories or the mean pairwise distances between each object trajectory and the moving floor stimulus, over the 7 s stimulus presentation period in the top 10 PCs. We used both Euclidean distance and cosine distance (one minus cosine similarity (the normalized dot product of each vector)) as metrics. A smaller cosine distance indicates a more similar vector angle. Time series of cosine distance or Euclidean distance are baseline (1 s)-subtracted.

Statistics

Groups were tested for normality using the Shapiro-Wilk test. Non-parametric tests (Mann-Whitney U, Kruskal-Wallis H) were conducted if the Shapiro-Wilk P<0.05 for any group. Otherwise, parametric tests were used. Post hoc tests were conducted in main effect was P<0.05, except in the case of comparing model coefficients across regressors, where we used a Bonferroni correction to correct for multiple Mann-Whitney U tests across 2 or 5 regressors, and therefore set significance cutoff to P<0.025, or P<0.01, respectively. All post hoc tests (Dunn’s test for nonparametric data, or t-tests for parametric data) were corrected for multiple comparisons with a Bonferroni correction. For nested data (neurons within fish within experimental groups), we determined the significance of pairwise comparisons using linear mixed-effects models, with fish identity (id) as a random variable. Exact tests and P values are reported in the figure legends.

Supplementary Material

1

Highlights.

  1. Danionella cerebrum engage in collective schooling behavior using vision

  2. Schooling develops sequentially, with group aggregation preceding group alignment

  3. Tectal neurons in mature fish are selective to the shape of virtual conspecifics

  4. Social experience is necessary for schooling and tectal shape selectivity in adults

Acknowledgments

We thank Benjamin Judkewitz and Adam Douglass for sharing D. cerebrum and advice on their care, as well as Talmo Pereira and the Pereira lab for assistance with animal tracking. We thank Takaki Komiyama, Johnatan Aljadeff, Byungkook Lim, Ashley Juavinett, Scott Sternson, and Priya Rajasethupathy for comments on an earlier version of the manuscript, and thank all members of the Lovett-Barron Lab for discussion, support, and feedback. We acknowledge funding from the Human Frontier Science Program Postdoctoral Fellowship LT0002/2022L (DZ), Zuckerman STEM Program Israeli Postdoctoral Fellowship (DZ), Kavli Institute for Brain and Mind Postdoctoral Fellowship 2022140 (LS), UC San Diego J. Yang Scholarship (JY), Taiwanese Government Scholarship to Study Abroad Award (JY), NIH T32GM133351 (JLN), Searle Scholars Award (MLB), Packard Foundation Fellowship (MLB), Pew Biomedical Scholar Award (MLB), Klingenstein-Simons Fellowship in Neuroscience (MLB), Sloan Research Fellowship (MLB), NIH R00MH112840 (MLB), and the NIH New Innovator Award DP2EY036251 (MLB).

Footnotes

Declaration of Interests

The authors declare no competing interests.

Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

References

  • 1.Shaw E (1978). 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. Sci. 66, 166–175. [Google Scholar]
  • 2.Krause J, and Ruxton GD (2002). Living in groups (Oxford University Press; ). [Google Scholar]
  • 3.Sumpter D, Buhl J, Biro D, and Couzin I (2008). Information transfer in moving animal groups. Theory Biosci. 127, 177–186. 10.1007/s12064-008-0040-1. [DOI] [PubMed] [Google Scholar]
  • 4.Sumpter DJT (2010). Collective animal behavior (Princeton Univ. Press; ). [Google Scholar]
  • 5.Couzin ID (2009). Collective cognition in animal groups. Trends Cogn. Sci. 13, 36–43. 10.1016/j.tics.2008.10.002. [DOI] [PubMed] [Google Scholar]
  • 6.Katz Y, Tunstrøm K, Ioannou CC, Huepe C, and Couzin ID (2011). Inferring the structure and dynamics of interactions in schooling fish. Proc. Natl. Acad. Sci. U. S. A. 108, 18720–18725. 10.1073/pnas.1107583108. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Strandburg-Peshkin A, Twomey CR, Bode NWF, Kao AB, Katz Y, Ioannou CC, Rosenthal SB, Torney CJ, Wu HS, Levin SA, et al. (2013). Visual sensory networks and effective information transfer in animal groups. Curr. Biol. CB 23, R709–711. 10.1016/j.cub.2013.07.059. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Rosenthal SB, Twomey CR, Hartnett AT, Wu HS, and Couzin ID (2015). Revealing the hidden networks of interaction in mobile animal groups allows prediction of complex behavioral contagion. Proc. Natl. Acad. Sci. U. S. A. 112, 4690–4695. 10.1073/pnas.1420068112. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Davidson JD, Sosna MMG, Twomey CR, Sridhar VH, Leblanc SP, and Couzin ID (2021). Collective detection based on visual information in animal groups. J. R. Soc. Interface 18, 20210142. 10.1098/rsif.2021.0142. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Muratore IB, and Garnier S (2023). Ontogeny of collective behaviour. Philos. Trans. R. Soc. B Biol. Sci. 378, 20220065. 10.1098/rstb.2022.0065. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Anderson DJ (2016). Circuit modules linking internal states and social behaviour in flies and mice. Nat. Rev. Neurosci. 17, 692–704. 10.1038/nrn.2016.125. [DOI] [PubMed] [Google Scholar]
  • 12.Wei D, Talwar V, and Lin D (2021). Neural circuits of social behaviors: Innate yet flexible. Neuron 109, 1600–1620. 10.1016/j.neuron.2021.02.012. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Jo-Hsien Yu, Julia L Napoli, and Matthew Lovett-Barron(2024). Understanding collective behavior through neurobiology. Curr. Opin. Neurobiol. In Press. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Dreosti E, Lopes G, Kampff AR, and Wilson SW (2015). Development of social behavior in young zebrafish. Front. Neural Circuits 9. 10.3389/fncir.2015.00039. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Hinz RC, and de Polavieja GG (2017). Ontogeny of collective behavior reveals a simple attraction rule. Proc. Natl. Acad. Sci. U. S. A. 114, 2295–2300. 10.1073/pnas.1616926114. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Larsch J, and Baier H (2018). Biological Motion as an Innate Perceptual Mechanism Driving Social Affiliation. Curr. Biol. CB 28, 3523–3532.e4. 10.1016/j.cub.2018.09.014. [DOI] [PubMed] [Google Scholar]
  • 17.Stednitz SJ, and Washbourne P (2020). Rapid Progressive Social Development of Zebrafish. Zebrafish 17, 11–17. 10.1089/zeb.2019.1815. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Harpaz R, Nguyen MN, Bahl A, and Engert F (2021). Precise visuomotor transformations underlying collective behavior in larval zebrafish. Nat. Commun. 12, 6578. 10.1038/s41467-021-26748-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Harpaz R, Aspiras AC, Chambule S, Tseng S, Bind M-A, Engert F, Fishman MC, and Bahl A (2021). Collective behavior emerges from genetically controlled simple behavioral motifs in zebrafish. Sci. Adv. 7, eabi7460. 10.1126/sciadv.abi7460. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Kappel JM, Förster D, Slangewal K, Shainer I, Svara F, Donovan JC, Sherman S, Januszewski M, Baier H, and Larsch J (2022). Visual recognition of social signals by a tectothalamic neural circuit. Nature 608, 146–152. 10.1038/s41586-022-04925-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Miller N, and Gerlai R (2012). From Schooling to Shoaling: Patterns of Collective Motion in Zebrafish (Danio rerio). PLoS ONE 7, e48865. 10.1371/journal.pone.0048865. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Orger MB, and de Polavieja GG (2017). Zebrafish Behavior: Opportunities and Challenges. Annu. Rev. Neurosci. 40, 125–147. 10.1146/annurev-neuro-071714-033857. [DOI] [PubMed] [Google Scholar]
  • 23.Bastien R, and Romanczuk P (2020). A model of collective behavior based purely on vision. Sci. Adv. 6, eaay0792. 10.1126/sciadv.aay0792. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Heras FJH, Romero-Ferrero F, Hinz RC, and De Polavieja GG (2019). Deep attention networks reveal the rules of collective motion in zebrafish. PLOS Comput. Biol. 15, e1007354. 10.1371/journal.pcbi.1007354. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Schulze L, Henninger J, Kadobianskyi M, Chaigne T, Faustino AI, Hakiy N, Albadri S, Schuelke M, Maler L, Del Bene F, et al. (2018). Transparent Danionella translucida as a genetically tractable vertebrate brain model. Nat. Methods 15, 977–983. 10.1038/s41592-018-0144-6. [DOI] [PubMed] [Google Scholar]
  • 26.Penalva A, Bedke J, Cook ESB, Barrios JP, Bertram EPL, and Douglass AD (2018). Establishment of the miniature fish species Danionella translucida as a genetically and optically tractable neuroscience model (Neuroscience) 10.1101/444026. [DOI] [Google Scholar]
  • 27.Britz R, Conway KW, and Rüber L (2021). The emerging vertebrate model species for neurophysiological studies is Danionella cerebrum, new species (Teleostei: Cyprinidae). Sci. Rep. 11, 18942. 10.1038/s41598-021-97600-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Rajan G, Lafaye J, Faini G, Carbo-Tano M, Duroure K, Tanese D, Panier T, Candelier R, Henninger J, Britz R, et al. (2022). Evolutionary divergence of locomotion in two related vertebrate species. Cell Rep. 38, 110585. 10.1016/j.celrep.2022.110585. [DOI] [PubMed] [Google Scholar]
  • 29.Hoffmann M, Henninger J, Richter L, and Judkewitz B (2022). Brain-wide imaging of an adult vertebrate with image transfer oblique plane microscopy (Neuroscience) 10.1101/2022.05.16.492103. [DOI] [Google Scholar]
  • 30.Lee TJ, and Briggman KL (2023). Visually guided and context-dependent spatial navigation in the translucent fish Danionella cerebrum. Curr. Biol. 33, 5467–5477.e4. 10.1016/j.cub.2023.11.030. [DOI] [PubMed] [Google Scholar]
  • 31.Pereira TD, Tabris N, Matsliah A, Turner DM, Li J, Ravindranath S, Papadoyannis ES, Normand E, Deutsch DS, Wang ZY, et al. (2022). SLEAP: A deep learning system for multi-animal pose tracking. Nat. Methods 19, 486–495. 10.1038/s41592-022-01426-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Ward AJW, Kent MIA, and Webster MM (2020). Social Recognition and Social Attraction in Group-Living Fishes. Front. Ecol. Evol. 8, 15. 10.3389/fevo.2020.00015. [DOI] [Google Scholar]
  • 33.McKee A, Soto AP, Chen P, and McHenry MJ (2020). The sensory basis of schooling by intermittent swimming in the rummy-nose tetra ( Hemigrammus rhodostomus ). Proc. R. Soc. B Biol. Sci. 287, 20200568. 10.1098/rspb.2020.0568. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Stednitz SJ, McDermott EM, Ncube D, Tallafuss A, Eisen JS, and Washbourne P (2018). Forebrain Control of Behaviorally Driven Social Orienting in Zebrafish. Curr. Biol. CB 28, 2445–2451.e3. 10.1016/j.cub.2018.06.016. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Shaw E (1960). The Development of Schooling Behavior in Fishes. Physiol. Zool. 33, 79–86. [Google Scholar]
  • 36.Nunes AR, Carreira L, Anbalagan S, Blechman J, Levkowitz G, and Oliveira RF (2020). Perceptual mechanisms of social affiliation in zebrafish. Sci. Rep. 10, 3642. 10.1038/s41598-020-60154-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Wang K, Hinz J, Zhang Y, Thiele TR, and Arrenberg AB (2020). Parallel Channels for Motion Feature Extraction in the Pretectum and Tectum of Larval Zebrafish. Cell Rep. 30, 442–453.e6. 10.1016/j.celrep.2019.12.031. [DOI] [PubMed] [Google Scholar]
  • 38.Gemmer A, Mirkes K, Anneser L, Eilers T, Kibat C, Mathuru A, Ryu S, and Schuman E (2022). Oxytocin receptors influence the development and maintenance of social behavior in zebrafish (Danio rerio). Sci. Rep. 12, 4322. 10.1038/s41598-022-07990-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Groneberg AH, Dressler LE, Kadobianskyi M, Müller J, and Judkewitz B (2024). Development of sound production in Danionella cerebrum. Preprint, https://doi.org/10.1101/2024.03.25.586601 10.1101/2024.03.25.586601. [DOI] [PubMed] [Google Scholar]
  • 40.Bollmann JH (2019). The Zebrafish Visual System: From Circuits to Behavior. Annu. Rev. Vis. Sci. 5, 269–293. 10.1146/annurev-vision-091718-014723. [DOI] [PubMed] [Google Scholar]
  • 41.Flavell SW, Gogolla N, Lovett-Barron M, and Zelikowsky M (2022). The emergence and influence of internal states. Neuron 110, 2545–2570. 10.1016/j.neuron.2022.04.030. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.O’Connell LA, and Hofmann HA (2011). The Vertebrate mesolimbic reward system and social behavior network: A comparative synthesis. J. Comp. Neurol. 519, 3599–3639. 10.1002/cne.22735. [DOI] [PubMed] [Google Scholar]
  • 43.Lopes G, Bonacchi N, Frazão J, Neto JP, Atallah BV, Soares S, Moreira L, Matias S, Itskov PM, Correia PA, et al. (2015). Bonsai: an event-based framework for processing and controlling data streams. Front. Neuroinformatics 9. 10.3389/fninf.2015.00007. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Rajan G, Duroure K, and Del Bene F (2022). Danionella translucida, a tankful of new opportunities. In Laboratory Fish in Biomedical Research (Elsevier; ), pp. 409–418. 10.1016/B978-0-12-821099-4.00017-1. [DOI] [Google Scholar]
  • 45.Lopes G, Farrell K, Horrocks EA, Lee C-Y, Morimoto MM, Muzzu T, Papanikolaou A, Rodrigues FR, Wheatcroft T, Zucca S, et al. (2021). Creating and controlling visual environments using BonVision. eLife 10, e65541. 10.7554/eLife.65541. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Guilbeault NC, Guerguiev J, Martin M, Tate I, and Thiele TR (2021). BonZeb: open-source, modular software tools for high-resolution zebrafish tracking and analysis. Sci. Rep. 11, 8148. 10.1038/s41598-021-85896-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47.Burgess HA, and Granato M (2007). Modulation of locomotor activity in larval zebrafish during light adaptation. J. Exp. Biol. 210, 2526–2539. 10.1242/jeb.003939. [DOI] [PubMed] [Google Scholar]
  • 48.Pachitariu M, Stringer C, Dipoppa M, Schröder S, Rossi LF, Dalgleish H, Carandini M, and Harris KD (2016). Suite2p: beyond 10,000 neurons with standard two-photon microscopy (Neuroscience) 10.1101/061507. [DOI] [Google Scholar]

Associated Data

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

Supplementary Materials

1

Data Availability Statement

Data and code are available via links in the key resources table. Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.

Key resources table.

REAGENT or RESOURCE SOURCE IDENTIFIER
Chemicals
SYNCAINE® (MS 222) Syndel 200–226
UltraPureTM LMP Agarose Invitrogen 16520–100
Deposited data
Code This paper https://github.com/lblabucsd/Zada_Schulze_24/
Data This paper doi: 10.17632/5gjc34mynv.1
Experimental models: Organisms/strains
D. cerebrum : Tg(elavl3:H2B-GCaMP6s) Judkewitz Lab NA
D. cerebrum : Wild type Judkewitz and Douglass Labs NA
Zebrafish : AB ZIRC ZDB-GENO-960809–7
Software and algorithms
Python 3.6 python.org RRID:SCR_008394
Suite2p www.suite2p.org RRID:SCR_016434
ThorImage®LS 4.1 www.thorlabs.com ThorImage®LS
SLEAP 1.3 Pereira et al. 31 https://github.com/talmolab/sleap
BonsaiRx Lopes et al. 43 https://bonsai-rx.org/
Other
AnyBeam Pico Projector, AnyBeam HD301M1-H2
Infrared light CMVision Technologies Inc. CM-IR130–850NM
Camera 121Hz FLIR Grasshopper Edmund Optics #33–534
7” LCD screens HAMTYSAN NA
25 mm/ F 1.85 lens Edmund Optics #33–305
MaiTai DeepSee SpectraPhysics

RESOURCES