Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Nov 19;121(47):e2410254121.
doi: 10.1073/pnas.2410254121. Epub 2024 Nov 15.

Uncovering multiscale structure in the variability of larval zebrafish navigation

Affiliations

Uncovering multiscale structure in the variability of larval zebrafish navigation

Gautam Sridhar et al. Proc Natl Acad Sci U S A. .

Abstract

Animals chain movements into long-lived motor strategies, exhibiting variability across scales that reflects the interplay between internal states and environmental cues. To reveal structure in such variability, we build Markov models of movement sequences that bridge across timescales and enable a quantitative comparison of behavioral phenotypes among individuals. Applied to larval zebrafish responding to diverse sensory cues, we uncover a hierarchy of long-lived motor strategies, dominated by changes in orientation distinguishing cruising versus wandering strategies. Environmental cues induce preferences along these modes at the population level: while fish cruise in the light, they wander in response to aversive stimuli, or in search for appetitive prey. As our method encodes the behavioral dynamics of each individual fish in the transitions among coarse-grained motor strategies, we use it to uncover a hierarchical structure in the phenotypic variability that reflects exploration-exploitation trade-offs. Across a wide range of sensory cues, a major source of variation among fish is driven by prior and/or immediate exposure to prey that induces exploitation phenotypes. A large degree of variability that is not explained by environmental cues unravels hidden states that override the sensory context to induce contrasting exploration-exploitation phenotypes. Altogether, by extracting the timescales of motor strategies deployed during navigation, our approach exposes structure among individuals and reveals internal states tuned by prior experience.

Keywords: behavioral variability; coarse-graining; exploitation–exploration; motor patterns; probabilistic models.

PubMed Disclaimer

Conflict of interest statement

Competing interests statement:The authors declare no competing interest.

Figures

Fig. 1.
Fig. 1.
Building a maximally predictive state space for larval zebrafish. (A) Typical example of larval zebrafish locomotion bouts, measured as the cumulative angle made by points on the tail with respect to the midline. An example turn (Left) and forward (Right) bout are shown below. We construct bout sequences XK(t) (gray bar), increasing the sequence length K to maximize predictability. (B) Illustration of the estimation of transition matrices as a function of the number of bouts in a sequence K and the number of partitions N. We cluster the bout sequence space into N discrete microstates si and estimate transition probabilities Tij(τ) (SI Appendix). Below, we illustrate an example microstate constructed with K=3bouts, N=200clusters: We plot the cumulative tail angle in the bout sequences belonging to the microstate (gray, average in black). (C) To probe the short-time predictability of the dynamics across sensory contexts, we estimate the entropy rate h(K,N) of the transition matrix constructed with τ=1bout for varying K and N (we sample 7,500 bouts from each sensory context from ref. ; see SI Appendix). Increasing N offers resolution over the bout sequences, while increasing K offers predictability. We choose K=5bouts to minimize the entropy rate, and choose N=1,200clusters to maximize the resolution before finite-size effects result in the underestimation of the entropy rate (33).
Fig. 2.
Fig. 2.
Zebrafish navigation is led by long-lived modes with a hierarchy of timescales prioritizing change of orientation, speed, and egocentric direction bias. (A) Implied timescales of the k-th mode of the reversibilized Tensemble, estimated as timp=τlogλk, where λk are the eigenvalues of Tensemble(τ) with τ=3bouts, SI Appendix, Fig. S2A. We find three long-lived modes that are well separated from the bulk spectrum, while faster modes are closer to each other. Error bars are bootstrapped 95% CI obtained by sampling 7,500 bouts from each 14 sensory context (11) over 100 seeds (SI Appendix). (A, Inset) We show the averaged 1,200×1,200 transition matrix Tensemble. (B) Microstates projected along ϕ1ϕ2 and color coded by the mean absolute change in heading for the bouts belonging to each si of the N=1,200 microstates. Increasing ϕ1 is associated with higher amplitude reorientations. (C) Same as (B), but color coded by the mean speed in each microstate si. We find that higher ϕ2 is generally associated with higher speeds. (D) Probability density of the mean change in heading for each of the microstates along the third mode ϕ3. Low values of ϕ3 correspond to leftward bouts, while high values of ϕ3 correspond to rightward bouts. (E) Cumulative distribution function (CDF) of the absolute mean change in heading direction for all bouts belonging to the cruising (red) and wandering (blue) strategies, identified by partitioning along ϕ1 (SI Appendix). (E, Inset) Reorganized Tensemble, where each microstate in cruising or wandering is placed together, revealing a block diagonal structure. (F) Mean sequence length (MSL) of fish in wandering Sw and cruising Sc strategies. We infer a coarse-grained transition matrix among cruising and wandering Tijq=2=P(Sj(t+τ)|Si(t)),i,j{c,w}, and simulate sequences by sampling the next state according to the transition matrix (SI Appendix). We find that the coarse-grained Markov models inferred for each fish accurately predict the mean sequence lengths in cruising and wandering. Note also the wide variability in mean sequence lengths among fish, from a few bouts to a few hundreds of bouts.
Fig. 3.
Fig. 3.
Preferences for distinct motor strategies are deployed across sensory contexts. (A) Left, probability density of visiting microstates along ϕ1ϕ2. Right, example trajectory color coded by ϕ1 (Top) and median dwell time in each strategy (Bottom) (error bars represent 95% CI bootstrapped across fish, with individual fish scattered in the background). (A1) In large square arena in the light, fish mostly fast cruise (1,000lm/m2, 5×5cm2, 10 fish). (A2) In a smaller arena, fish in the light use wandering at the short ends when forced to reorient (1,000lm/m2, 1×5cm2 arena, 12 fish), resulting in a reduction of time spent cruising compared to (A1). (A3) In the dark, fish show a shift toward fast wandering (5×5cm2, 37 fish, data combined from the “Dark” condition and the first 30 min of the “Dark Transitions” condition; see SI Appendix, Table S1). (A4) In a prey capture assay with 50 paramecia per arena, fish mostly engage in slow cruising and wandering when the eyes are converged, and introduce faster wandering when the eyes diverge (1,000lm/m2, 2.5×2.5cm2 arena, 65 fish). Each bout is given an eye convergence index based on the angle between the eyes (SI Appendix). Note the near absence of fast cruising when compared to (A1). (B) Probability of hunting (B1) or detecting (B2) resources in each of the q=4 motor strategies, SI Appendix, Fig. S3D1. Using data from all fish, we infer transition matrices using only the microstates belonging to each motor strategy and simulate trajectories (SI Appendix, Fig. S5). (B1) We assess the fish’s ability to hunt prey that is uniformly distributed within cone of 60° aperture ahead of its head (eyes converged) (40) and 2mm radius. We simulate fish trajectories for the average duration of hunting sequences (3bouts), SI Appendix, Fig. S5A, and count successful hunts when the head trajectory is within lhunt=0.2mm from the prey (5% of the body length); see SI Appendix. In this case, slow cruising is the most successful strategy. (B2) We assess the fish’s ability to detect resources uniformly scattered within a distance r>8mm=2body lengths from the initial position (41) We now simulate 1,000 bout-long trajectories, and assume that the fish can detect resources within a distance ldetect=1body length around its head position (SI Appendix). In this case, the wandering states are most effective up to mesoscale search (r40body lengths) while fast cruising is effective at large scale dispersal. The black line represents the behavior of an average fish. Errorbars and shaded areas correspond to bootstrapped 95% CI obtained from 10,000 simulations from random initial conditions.
Fig. 4.
Fig. 4.
Sensory contexts cannot fully explain behavioral variability across fish. We encode the behavior of each fish in transition matrices Tqf built with an increasing number of coarse-grained states q, and use regularized logistic regression to classify each fish to their respective sensory contexts. (A) Accuracy of the classification task (fraction of correct classifications) for the Train (black) and Test (yellow) sets plotted as a function of the number of coarse-grained states q (SI Appendix): the Train accuracy grows continuously as a function of q and rapidly reaches 1.0 while the test accuracy reaches only 0.5, far from perfect. Minimal improvements are seen above q=7states above which the classifier overfits. q=7 states correspond to LeftRight variations of slow-fast cruising–wandering motor strategies (Right, example trajectories). (B) Confusion matrix of the classifier for q=7 in which each row reflects the proportion of individuals assigned from each sensory context to all conditions. A strong diagonal component indicates that a large portion of fish are correctly assigned, while off-diagonal components point to fish misclassified into a different sensory context. Sensory contexts with visual stimuli are labeled with squares while prey exposure conditions are labeled with a diamond.
Fig. 5.
Fig. 5.
Phenotypic groups emerge by clustering individual fish based on their behavioral dynamics. (A) Pairwise distance matrix between the transition matrices of individual fish Tqf at q=7states. We find structure across multiple scales, with prey exposure being an important source of variability. (B) We use a constant shift embedding (CSE) to map distances onto an Euclidean space that preserves the pairwise distances among individual fish (gray dots). We plot the first two dimensions of the transition matrix space with example matrices displayed for two individuals (red dots). We test whether two fish behave significantly differently over the experimental timescale by re-estimating transition matrices from finite simulations of each fish’s Tfq and calculating the distance between the re-estimated and original transition matrices (blue area around example fish). Averaging these distances sets an effective scale ϵ^f (blue area around example fish) within which neighboring fish are indistinguishable from each other (SI Appendix). (C) Left, illustration of our clustering approach as a tree diagram, with the distance matrix organized according to the cluster assignment. We structure the phenotypic space through a top–down subdivision of a multiplicative diffusion process [hierarchical multiplicative diffusive (HMD) clustering] where distances are rescaled by ϵ^f. At each iteration L, the group of fish that is most separable is subdivided so that the ordering of subdivisions is indicative of the relative scale separation among fish from different groups. We stop the clustering at the point beyond which the effective distances between fish within clusters stop decreasing (L=6subdivisions, 7 clusters, vertical dashed line; see SI Appendix, Fig. S6B). The widths of the branches of the tree are proportional to the number of fish in each cluster. (C) Right, individual fish are color-coded by their most likely phenotypic group Gi, where i{1,,7}. Dot size indicates the posterior probability P(GL=6|f). (D) Clustering reveals different phenotypic groups Gi: Groups G1,2,3 exhibit a bias toward fast cruising (with G1 also exhibiting fast wandering and G3 also exhibiting slow cruising and wandering) while groups G4,5 share a bias toward slow cruising and wandering (with G4 exhibiting also faster cruising) and groups G6,7 use mostly fast wandering, with some slow cruising and wandering also for G7. (E) Probability of either hunting (E1) or detecting (E2) resources for the 7 phenotypic groups, as in Fig. 3B (SI Appendix, Fig. S5). (E1) Probability of hunting prey within 3 bouts (SI Appendix, Fig. S5A), at a distance of r=2mm (41) and within a cone of 60° ahead of the fish (40): group G5, which biased toward slow cruising and wandering strategies, is the most effective at gathering prey. (E2) Probability of detecting uniformly distributed resources with a radius r: groups G5,6,7 are effective for short to meso-length scale search, while G1,2,3 are most effective at large scale dispersal. Group G4 is approximately equally efficient across a broad range of length scales (black line, average of all groups).
Fig. 6.
Fig. 6.
Phenotypic group structure reveals prey exposure as a major determinant of variation. (A1) Transition matrix space of all individuals color-coded by phenotypic groups together with the average position for each condition using symbols detailed above. (A2) Probability of a fish to belong to group Gi in a given experimental condition c, P(GL=6|c): While no sensory context maps onto a phenotypic group, most fish of a given context have preferences for specific groups: fish never exposed to prey often belong to G1,2,3, while fish exposed to prey often belong to groups G4,5,6,7. (B1–B3) Probability of belonging to group G for fish in a condition c at different iterations in the hierarchical subdivision L (gray line, probability of belonging to neither of the groups): (B1) the first L=1 splits fish exposed to prey (during or prior the assay, Right in blue) from fish never exposed to prey (Left in red) (note that the OMR, Dark, and Light/Dark transitions assays are equally distributed across these two groups). (B2) The fourth L=4 subdivision distinguishes fish previously exposed to prey but swimming in the light without prey from the fish that had prey in the arena. (B3) At L=5, we find differences stemming from the prey type and prior exposure. In the dashed box, we see that naive fish hunting for the first time split equally, whereas fish raised with either paramecia or rotifers generally belong to distinct groups.
Fig. 7.
Fig. 7.
Phenotypic group structure reveals the role of hidden internal states in structuring the behavioral variability among fish exposed to the same sensory context. (A1) Transition matrix space color-coded according to the 7 phenotypic groups, with naive fish hunting for paramecia highlighted. (A2) Fraction of bouts with high eye convergence for naive fish hunting paramecia according to the phenotypic group G reveals that fish in G1 and G6 spent less time with eyes converged, indicating lower rate of hunting than fish in other groups. (B1) Transition matrix space color-coded according to the seven phenotypic groups, with fish exploring in the light that were previously raised with rotifers highlighted. (B2) Fraction of bouts with eye convergence across fish in the light raised in different conditions across phenotypic groups G uncovers that fish in G1 and G6 show very little eye convergence rates, while fish in G7 exhibit higher eye convergence, indicating that they attempt hunting more frequently. These differences indicate that phenotypic groups reflect hidden internal states impacting behavior. We estimate the eye convergence rates per fish, and show the phenotypic groups that have more than one fish with bootstrapped 95% CI obtained across fish.

Update of

References

    1. Bargmann C. I., Beyond the connectome: How neuromodulators shape neural circuits. Bioessays 34, 458–465 (2012). - PubMed
    1. Marder E., Neuromodulation of neuronal circuits: Back to the future. Neuron 76, 1–11 (2012). - PMC - PubMed
    1. Kanwal J. K., et al. , Internal state: Dynamic, interconnected communication loops distributed across body, brain, and time. Integr. Comp. Biol. 61, 867–886 (2021). - PMC - PubMed
    1. Helms S. J., et al. , Modelling the ballistic-to-diffusive transition in nematode motility reveals variation in exploratory behaviour across species. J. R. Soc. Interface 16, 20190174 (2019). - PMC - PubMed
    1. Goc G. L., et al. , Thermal modulation of zebrafish exploratory statistics reveals constraints on individual behavioral variability. BMC Biol. 19, 1–17 (2021). - PMC - PubMed

LinkOut - more resources