Skip to main content
iScience logoLink to iScience
. 2026 Jun 5;29(6):116190. doi: 10.1016/j.isci.2026.116190

Behavioral algorithms of ontogenetic switching in larval and juvenile zebrafish phototaxis

Maxim Q Capelle 1,2,3,4,∗, Katja Slangewal 1,2,4, Panagiotis E Eleftheriadis 1,2,4, Armin Bahl 1,2,3,4,5,∗∗
PMCID: PMC13253138  PMID: 42291246

Summary

Animals undergo major behavioral adjustments during ontogeny, but how the underlying cognitive algorithms change during this process remains elusive. Here, we describe that zebrafish shift from light-seeking to dark-seeking as they grow from larval to juvenile stage. Combining complementary phototaxis assays in virtual reality and modeling, we dissect the computational basis of this transition. We identify three parallel pathways, one analyzing ambient whole-field luminance levels, one spatially comparing light levels across the eyes, and one computing luminance change in each eye. Larvae mostly use the latter two computations, whereas juveniles largely employ the first one. Using a library of agent-based models, we predict behavior in more complex environments. Model-based extraction of latent cognitive variables suggests potential neural correlates of this behavioral inversion. We suggest that zebrafish phototaxis is regulated via parallel processing streams, which could be a universal mechanism for adjusting behavior depending on developmental stage, context, or internal state.

Subject areas: Biological sciences, Behavioral neuroscience, Systems neuroscience, Developmental biology

Graphical abstract

graphic file with name ga1.jpg

Highlights

  • •

    We provide a framework to describe how behavioral strategies evolve during ontogeny

  • •

    Zebrafish switch their phototactic behavior within the first weeks of their life

  • •

    Brightness navigation strategies can be described with a three-pathway model

  • •

    Larvae use spatial cues, while juveniles use ambient whole-field luminance for phototaxis


Biological sciences; Behavioral neuroscience; Systems neuroscience; Developmental biology

Introduction

Animal behavior changes during development and in response to different environmental constraints. For example, growing up from infancy to adulthood, humans undergo a long phase of immaturity in which they crucially depend on others for food and protection.1 Rodent reflexive responses, anxiety behavior, and memory formation change with development.2,3,4 Locusts display increased threat-induced hiding behavior over early-life stages.5 While Drosophila larvae avoid light,6,7 adult Drosophila are attracted by light.8,9 It remains unknown whether such ontogenetic behavioral transitions involve remodeling circuit mechanisms or if they can be explained through adjustments of the algorithmic strategies underlying sensory-motor decision-making.

An excellent system for the study of ontogeny is the vertebrate zebrafish.10 This freshwater fish shows rapid behavioral adjustments in early development, while continuously interacting with the environment and without the need for parental care. These features provide unique advantages compared to insects and mammalian systems. The majority of insects undergo fundamental structural changes during metamorphosis. While some neural structures remain intact, most of the insect nervous system and body plan get completely remodeled,11 making it challenging to interpret insect ontogeny. Mammalian development, in general, requires complex social interactions with the parental generation,12 largely complicating experimentation.

The visual system and motor control elements of zebrafish become fully functional a few days after hatching,13,14,15,16 allowing animals to perform a large range of visually driven behaviors.17 Around three weeks of age, zebrafish start to engage in social interactions18,19,20,21,22,23 and display robust learning and memory abilities.24,25,26 In addition to these behavioral transitions, it has been shown that even certain innately present sensory-motor responses, like the optomotor response and phototaxis, may invert while the animals grow from larval to juvenile to adult stage.27,28,29,30 However, quantitative behavioral analyses of such inversions are largely absent.

In particular, phototaxis—the tendency to alter behavioral responses to light—is well-suited for the study of ontogeny.10 Luminance stimuli are easy to control, allow for rich variations of spatial and temporal features, and can be used to probe complex gradient tracking strategies and search behavior. Larval zebrafish display positive phototaxis by approaching brighter regions.31,32 Many studies have explored potential behavioral algorithms and neural implementations of this behavior. When presented with lateral brightness stimuli, locked to the position and orientation of the fish, larvae swim toward the brighter side,33,34 which suggests that spatial contrast across the eyes plays a major role in phototaxis. Temporal luminance dynamics have been shown to provide additional cues for gradient navigation. In response to sudden decreases in whole-field brightness, animals swim more vigorously, and with larger and more frequent turns.32,35,36,37,38 These behaviors can be modulated by adapting animals to different brightness levels,35,39,40 indicating that phototaxis flexibly depends on the recent environmental context. With advances in virtual reality for high-throughput zebrafish experimentation,21 it is now becoming possible to extend behavioral assays toward more complex stimulus arrangements and beyond the larval stage.

Quantitative behavioral experiments and computational modeling allow for the extraction and validation of the algorithmic processes underlying ontogeny. In addition, they assist in the mapping of how corresponding cognitive parameters change over time. Such analyses provide a theoretical basis to interpret potential ecologically relevant reasons for the observed changes and guide experiments to assess their mechanistic implementation.41,42 Several models have been suggested to explain phototaxis in larval zebrafish: fish may turn away from the eye that experiences the greater reduction in light intensity.39 Whole-field brightness change magnitudes may determine whether animals should swim forward or make a turn.34 Brightness levels in each eye may also be compared with a dynamically evolving eye-specific luminance set point to determine turn direction.40 Focusing on purely temporal aspects of the behavior, navigational strategies could also employ the tendency of animals to repeat the same turn direction upon sudden decreases in brightness, thus enabling the return to the original location.37 However, none of these previous works have systematically validated their models over multiple stimulation configurations, in more complex environments, and across the ontogenetic timeline.

In this study, we use phototaxis in zebrafish transitioning from the larval to the juvenile stage. We find a fundamental shift in behavior as animals mature: larvae spend more time in bright areas, whereas juveniles spend more time in the dark. Using specifically designed visual stimuli, we probe the influence of luminance on swim statistics. Separating temporal and spatial features enables us to disentangle three parallel sensory-motor pathways and build a universal computational model of phototaxis, which allows generating testable predictions in new brightness environments. Our proposed model indicates that animals transition from a spatial contrast comparison to a whole-field luminance averaging strategy. Combining high-throughput tracking experiments with computational modeling in the context of zebrafish phototaxis, our study provides a general framework to describe how behavioral strategies evolve during ontogeny.

Results

Inversion of phototactic behavior during zebrafish development

To establish how zebrafish phototaxis changes across two developmental time points, we characterized the behavior of larval (5 days post-fertilization; dpf) and juvenile zebrafish (26–27 dpf) in different brightness environments. We placed fish in opaque watch glasses, where they could swim freely while their body position and orientation were continuously tracked at high frame-rates (Figure 1A). Our setups allow for the presentation of well-controlled visual stimuli—either locked in closed-loop relative to the fish or in a static open-loop configuration. Carefully designed experiments using such stimuli enable us to build, constrain, and validate behavioral algorithmic models of phototaxis across development (Figure 1B). To probe behavioral responses to light, we used four static luminance stimuli with different spatial characteristics (Figure 1C): a half-circles stimulus with distinct brightness levels on each side (dark vs. bright); a circular gradient stimulus that decreased from bright to dark from 0° to 180° and then increased back to bright from 180° to 360°; an inward gradient stimulus where brightness increased from the rim toward the center; and an outward gradient stimulus where brightness increased from the center to the rim. We tracked individual fish over time (Figure 1D and Video S1), allowing us to compute the fraction of time animals spend at different locations across the arena (Figure 1E). We also performed experiments in a uniform luminance control stimulus (all gray), showing largely homogeneous position distributions for larvae and juveniles (Figures 1F and S1A). This experiment allowed us to correct for the geometry of the dish by computing values relative to control conditions (Figure 1G).

Figure 1.

Figure 1

Zebrafish invert phototactic behavior while growing from larval to juvenile stage

(A) Experimental setup, the position and orientation of freely swimming fish are tracked in real-time using infrared illumination and a camera. Brightness stimuli are projected from below onto shallow watch glasses (12 cm diameter) using a video projector.

(B) Our conceptual framework for model-based dissection of ontogenetic switching of visual behaviors.

(C) Four static test stimuli, half-circles stimulus (10 vs. 300 lux), circular gradient (300–10 lux, and back), inward gradient (10–300 lux), and outward gradient (10–600 lux) stimuli.

(D) Example trajectories for a single larva and juvenile (same two animals across stimuli).

(E) Two-dimensional distribution of the fraction of time spent (%) across arena locations (calculated per fish, then averaged).

(F) Standard error of the mean (SEM) values for data in (E).

(G) Same as in (E) but relative to the control stimulus (uniform 300 lux across the arena, Figure S1A).

(H) Spatial distributions as a fraction of time (%) spent at arena locations, binned using stimulus-specific metrics (see axis labels in C), relative to the control stimulus. Mean ± SEM over fish.

(I) Stimulus-specific metrics for individual fish. For the circular gradient stimulus, angular positions are cosine-weighted. N = 70 larvae (blue) and 73 juveniles (orange). Each fish was presented with all stimuli. Black circles in (H) indicate control conditions (larvae, left; juveniles, right). Annotations indicate statistical significance (p∗∗∗ < 0.001, p∗∗ < 0.01, p∗ < 0.05, n.s. ≥ 0.05; Mann-Whitney U test comparing test stimuli for larvae vs. juveniles as well as the test stimuli vs. control within each age group). Scale bars: 1 cm (D and E). See also Figure S1.

Video S1. A larval and a juvenile zebrafish in the half-circles stimulus with distinct brightness levels on each side (dark vs. bright)
Download video file (3.5MB, mp4)

Across our four tested stimuli, we observed that larvae spent more time in brighter areas (Figures 1E–1G). Juveniles were more likely to be found in darker regions. For the outward gradient stimulus, this effect was weaker. We further computed occupancies along stimulus-specific axes, allowing for individual fish analyses (Figures 1H and 1I), confirming the switch in phototactic behavior from larval to juvenile stage across conditions. The effect sizes between the two age groups were large (Cohen’s d of 2.32 for the half-circles stimulus, 3.19 for the circular gradient stimulus, 2.57 for the inward gradient stimulus, and 0.99 for the outward gradient stimulus). Effect sizes compared to the control stimulus for larvae were large (Cohen’s d of 2.04 for the half-circles stimulus, 2.86 for the circular gradient stimulus, 1.16 for the inward gradient stimulus, and 1.4 for the outward gradient stimulus). Whereas juveniles show large effect sizes for the first two stimuli (Cohen’s d of 0.65 for the half-circles stimulus, 0.81 for the circular gradient stimulus), the effect size for the inward gradient stimulus was medium (Cohen’s d of 0.52) and small for the outward gradient stimulus (Cohen’s d of 0.09). The weaker phototactic behavior in the radial stimuli for juveniles could be explained by wall interactions (Figure S1B). We speculate that walls may modulate the sensorimotor process in juveniles more strongly than in larvae. As juveniles swim faster than larvae, processing of temporal gradients near the wall may work less well, which could explain our observations. We did not observe body size-dependent effects within each age group, supporting the idea that the ontogeny of the behavior depends on neural rather than bodily development (Figure S1C).

Thus, we find a robust behavioral switch in phototaxis behavior across a range of visual stimuli as animals mature from the larval to the juvenile stage. These results hint toward specific adjustments in the behavioral algorithms that animals employ during development. A possible strategy may be based on swimming modulation as a function of whole-field luminance. To probe this idea, we next developed a stimulus that allowed us to measure behavioral responses to varying but spatially uniform brightness levels.

Modulation of swimming behavior by whole-field brightness

Phototactic behavior may be controlled by static non-spatially dependent whole-field luminance levels (general brightness of the scene), global or localized temporal luminance changes, spatial cues across the eyes, or combinations of these features. The presented static stimuli (Figure 1C) revealed a fundamental switch in behavior across development. However, such experiments do not allow for disentangling which of these components are the most relevant ones for the observed effects because spatial and temporal cues vary simultaneously as the fish swims through the arena. To address this problem, we developed a set of well-controlled stimulus conditions to precisely probe temporal and spatial features independently from one another.

We first sought to explore the influence of homogenous, ambient, whole-field luminance levels on behavior. To this end, we developed a virtual phototaxis paradigm with spatially uniform brightness. We picked the brightness level in real-time based on the position of the fish, using the real circular gradient stimulus as a lookup function (Figure 2A and Video S2). This stimulus mimics the overall timescale of fluctuations when animals move through the arena, while not displaying any spatial contrasts. If animals rely only on spatial luminance cues to guide sensory-motor decision-making, then phototactic behavior should disappear in this configuration, because animals never experience any luminance contrast across the two eyes. On the contrary, if they use an averaging strategy of luminance over the visual field, their phototactic behavior should remain intact. Using the same stimulus-specific metrics as before (Figure 1G), we find that larval ability to stay in brighter areas drops to almost chance levels, while juvenile performance improves (Figure 2B).

Figure 2.

Figure 2

Whole-field brightness modulates swimming statistics in juveniles, but not in larvae

(A) Fish are shown spatially uniform brightness levels that are dynamically updated in real-time based on the position of the animal in a virtual circular gradient stimulus.

(B) Same as in Figure 1G, but for the virtual circular gradient stimulus. Compared to the spatially distributed real circular gradient stimulus (thin lines), luminance navigation performance is largely impaired in larvae, while it improves for juveniles. Mean ± SEM over fish.

(C) Swims are detected based on sudden changes in heading orientation and quantified by three metrics (orientation change, inter-swim interval, and displacement).

(D) Normalized distribution of orientation change for larvae and juveniles, and definitions of turns and straight swims. The black arrowhead indicates the absolute angle of turns. Dashed black lines are multimodal distribution fits (method details). For radius-dependent distributions, see Figure S2A.

(E) Swimming behavior as a function of uniform brightness, percentage of turns relative to all swims, absolute angle of turns, inter-swim interval, and displacement. Mean ± SEM over fish. Thin colored lines are medians within individual fish, and the black-dashed line is the average over logarithmic fits of individual fish.

(F) Averaging pathway (A) model (one separate model for each swim metric). This pathway symmetrically averages the luminance over the two eyes and transforms signals into behavioral modulations via a non-linearity.

(G) Fitted logarithmic slopes for individual fish (circles) of the same data as in E. The black cross is the median over individual slopes. N = 46 larvae (blue) and 30 juveniles (orange). Annotations indicate bootstrapped significance from zero (p∗∗ < 0.01, p∗ < 0.05, n.s. ≥ 0.05; method details). Scale bars: 1 cm, 500 ms, 25 deg (C). See also Figure S2.

Video S2. A larval and a juvenile zebrafish in the virtual circular gradient stimulus
Download video file (3.5MB, mp4)

To further explore the influence of homogenous whole-field luminance on the statistics of swimming, we analyzed behavior from the perspective of individual swims. Both larvae and juveniles exhibit burst-and-glide swimming, allowing us to characterize each event by orientation change, inter-swim interval, and displacement (Figure 2C). Larvae and juveniles display symmetric orientation change distributions (Figure 2D), as expected for uniform environments. Whereas larvae follow a trimodal distribution, with an emphasis on forward swims, juveniles predominantly exhibit turns, resulting in a bimodal distribution. These distributions were largely independent of radial position in the arena, and thus, their shapes cannot be explained by wall-following behavior (Figures S2A and S2B). We classified each swim as a turn when the absolute orientation change exceeded 10°, a threshold corresponding to two standard deviations of the normal peak for larval orientation changes. Otherwise, swims were labeled as straight swims. We used these classifications to compute the percentage of turns relative to all swims and the median absolute angle of all turns.

The extracted swimming metrics allowed us to quantify the effect of uniform brightness levels on behavior (Figure 2E) and develop a computational model (Figure 2F). This model uses an averaging pathway (A) in which the surrounding (ambient) luminance is simply averaged and then transformed through a logarithmic nonlinearity into behavioral properties. The averaging first happens within each eye, and then the signals are averaged again. A logarithmic relationship captures the data better than a linear fit (Figure S2C), which is in agreement with the Weber-Fechner law.43 Fitting this model to our experiments allowed us to quantify brightness-dependent modulation across individual fish (Figure 2G). For juveniles, we observed that with brightness, the absolute angle of turns decreases, the inter-swim interval increases, and the displacement per swim increases. Overall, these modulations should result in straighter trajectories using fewer but stronger swims to leave brighter areas more efficiently. In contrast, larvae did not significantly adjust any of the measured swim properties based on overall brightness. These results are in line with our observations of animal performance in the virtual circular gradient stimulus, where larvae failed to follow the luminance gradient, but juveniles performed well (Figure 2B). Thus, our results suggest that larvae do not navigate brightness environments based on a luminance averaging strategy, while juveniles do.

Notably, we observe an enhancement of phototaxis for juveniles in the virtual setting compared to the real circular gradient stimulus (Figures 2B and 1H), which hints toward a specific field-of-view for the luminance averaging process. To illustrate this logic, one may assume an extreme case in which juveniles average over large parts of the arena. In such a case, one would obtain similar brightness perceptions independent of their position. If this were true, we would expect uniform distributions of juveniles across the arena for all static stimuli. However, this is not the case (Figure 1H). In another extreme, animals may sample only directly under them. In this case, the perceived brightness levels in the virtual and real configurations would be identical, leading to the same performance in the two cases. However, juveniles perform better in the virtual configuration (Figure 2B). Therefore, a highly localized averaging strategy is not present either. We conclude that juveniles sample luminance within an intermediate range around their body. We experimentally quantify the spatial extent of this visual range below as part of our agent model design.

As animals tend to repeat the same turning direction with consecutive swims,44 we argued that motor history may perhaps also influence phototactic behavior.37 We found such effects to be weak in our assays for both larvae and juveniles (Figures S2D and S2E), indicating that motor history-dependent dynamics are likely not the main drivers of phototaxis.

After having explored the influence of homogenous ambient whole-field luminance levels on behavior, we next asked to what degree whole-field luminance temporal changes may modulate swimming. To this end, we tested a stimulus in which the complete arena linearly darkened or brightened in time at different speeds (Figure S3A). We chose a broad range of speeds to also cover extreme scenarios. For both larvae and juveniles, we find modulations of swimming behavior only for large whole-field brightness changes (Figure S3B). For example, larvae increased their turning angle for strong brightness decrements, reminiscent of a dark flash response.45 Juveniles did the same, but for strong brightness increments. Yet, within the intermediate luminance change regimes, modulation of swimming was rather small. We therefore argue that luminance changes are likely less relevant to guide phototaxis under realistic conditions. Based on the observed behavior, we developed a model using an averaging-derivative pathway (AD) (Figure S3C), in which swim statistics are determined by changes in whole-field brightness levels with different linear transformations for luminance decreases and increases. We fit this model to our experimentally observed swim modulations (Figure S3B) to obtain negative and positive slopes for individual fish (Figures S3E and S3F). A linear relationship captures the data better than a logarithmic fit (Figure S3D). Using agent simulations, we will later further quantify the performance of this model (Figures 4 and S5G) by letting the model predict what animals would do under the conditions tested before (Figure 1).

Figure 4.

Figure 4

Predicting brightness preferences in complex brightness environments

(A) Agents are simulated in virtual arenas of the same dimensions and seeing identical visual stimuli as in Figure 1C.

(B) Performance scores (mean-squared error-based), comparing agent spatial distributions to real larval and juvenile data, normalized to blind control agents. Metrics using a Bayesian information criterion led to similar interpretations (Figure S7B).

(C) Proposed model architecture, percentage of turns relative to all swims, absolute turn angle, inter-swim interval, and displacement are determined by the averaging pathway (A, Figure 2F), with turn direction controlled by the derivative (D) and contrast (C) pathways (Figure 3D).

(D–I) Same as in Figure 1, but for agent data. N = 96 larva-based agents (blue) and 96 juvenile-based agents (red). Annotations indicate statistical significance (p∗∗∗ < 0.001, p∗∗ < 0.01, p∗ < 0.05, n.s. ≥ 0.05; Mann-Whitney U test comparing test stimuli for larval-based vs. juvenile-based agents as well as the test stimuli vs. control within each age group). Scale bar: 1 cm (D and E). See also Figures S4–S7.

In summary, our experimental dissections using the homogeneous whole-field luminance paradigm suggest different strategies for how larvae and juveniles navigate spatial brightness gradients, like the ones tested in Figure 1. Juveniles can use the temporal dynamics of ambient luminance cues in a region below them (not requiring any spatial structure). However, larvae do not seem to rely on such cues, suggesting that phototaxis at this early development stage may involve spatial computations across the two eyes. We next developed a range of well-controlled spatiotemporal luminance configurations to explore this possibility.

Modulation of turns by lateral brightness stimuli

We have shown that larval phototactic behavior is largely absent in our virtual circular gradient stimulus (Figure 2B) and that behavior is not modulated by homogenous whole-field brightness (Figures 2E and 2G). We thus hypothesized that larvae use spatial contrast cues across the eyes to perform phototaxis in the spatial gradients tested in our open-loop experiments (Figure 1). For juveniles, we found that they can perform phototaxis using only whole-field luminance cues (Figure 2B). The average brightness around their field of view modulates their swimming statistics (Figures 2E and 2G). However, this result does not rule out the possibility that juveniles also employ spatial information in more complex environments. To explore how these spatial aspects influence directed turns, we implemented a range of visual stimuli in which luminance cues on either lateral side of the fish could be independently controlled. To achieve this, while allowing animals to freely move through the arena, we operated our tracking setup in a real-time closed-loop configuration, such that stimuli are continuously locked to the position and orientation of the fish (Figure 3A and Video S3).

Figure 3.

Figure 3

Lateral brightness stimuli modulate turn direction

(A) Lateral brightness stimulus, visual stimuli are updated based on the position of the fish in real-time, allowing independent control of brightness on the left and right sides of the fish (closed-loop configuration).

(B) Left turns (%) over time in response to changing lateral brightness levels as depicted in the stimulus bar (top). Black dashed line, mean over individual model fits (see D and E).

(C) Quantification of data in (B) for transient, contrast, and uniform phases (method details).

(D) Spatial-temporal model, (A) bias for left turns is determined by a derivative (D) and contrast (C) pathway. Increasing and decreasing brightness levels are detected with a high-pass filter.

(E) Fitted model parameters for individual bootstrapped sets of fish (circles; method details). The black cross shows the median over all fits.

(F) Model prediction and experimental validation. Fish are adapted to one uniform brightness, then exposed to a new brightness for a variable interval (left, first 10 lux then 300 lux; right, first 300 lux then 10 lux), and subsequently presented with a dark-bright choice. Black dashed lines indicate model predictions. Quantification is based on left turn peak heights after the transition to the spatial contrast. Experimental data show mean ± SEM over fish. (B and E) N = 45 larvae (blue) and 52 juveniles (orange), bootstrapped for (E). (F) N = 63 larvae and 49 juveniles. Annotations indicate statistical significance (p∗∗∗ < 0.001, p∗∗ < 0.01, p∗ < 0.05; Mann-Whitney U test comparing larvae vs. juveniles).

Video S3. A larval and a juvenile zebrafish in the lateral brightness stimulus
Download video file (4.2MB, mp4)

Specifically, we designed a lateral brightness stimulus consisting of periods of homogeneous brightness, homogeneous darkness, and eye-specific luminance contrast cues locked to the midline axis of the fish (Figures 3A and 3B). We characterized the temporal dynamics of the probability that animals turn left, revealing three major components in the behavioral responses: first, fish tended to transiently turn away from the side that underwent decreasing or increasing changes in brightness (see Figure 3B at 30 s and 150 s). Notably, this behavior also occurred when transitioning to a uniform stimulus, even though spatial contrasts are absent during this period (see 90 s and 210 s). These transient responses were present in both larvae and juveniles. Second, larval turning tendencies converged to swimming toward the brighter side when spatial contrast is present (see 50 s, 80 s, 170 s, and 200 s). For juveniles, we found this contrast-dependent behavior to be much weaker and close to chance levels. Third, when luminance contrast abruptly switched sides (see 60 s and 180 s), we found larvae to show a rapid transition between contrast-dependent turning directions while transient turning tendencies were absent. Juveniles, however, transiently swam toward the side that decreased in brightness. We quantified responses at the moment of stimulus transition (=transient), during the spatial contrast steady-state period (=contrast), and during uniform stimulus phases where both hemispheres were either dark or bright (=uniform) (Figure 3C). This analysis revealed that both larvae and juveniles respond reliably with directed swims during the transient phases, but that juvenile responses during the steady-state contrast phase were weaker than in larvae.

To quantify latent algorithmic parameters and compare values across larvae and juveniles, we developed a unified model architecture to be fitted to each of the two age groups (Figure 3D, method details). This model is a superposition of two parallel pathways: an eye-specific derivative pathway (D) and a spatial contrast pathway (C). This model takes two inputs over time: the brightness on the left and the right side of the fish. For each side, we used a high-pass filter acting like a derivative to detect temporal changes in brightness. We implemented the high-pass filter as a mathematical operation that compares an input signal with its low-pass filtered version (Figure 3D, right). We then applied different weight factors, depending on whether brightness increased or decreased. This resulted in a pathway in which luminance changes on the right side induced swims to the left, and the other way around for luminance changes on the left side. The different weight factors can lead to phototactic behavior, favoring increases over decreases or the other way around. We further computed a signed spatial contrast across the eyes by subtracting the brightness on the right side from the brightness on the left side and applied an additional weight factor to the resulting value. Combining these pathways results in a bias in turning direction. The model has only four parameters: the time constant (τ) and two asymmetric weights for the D pathway, as well as the weight of the C pathway.

We then fitted this model to our experimental data, allowing us to extract the latent cognitive variables underlying behavior (Figure 3E, method details). Comparison of the resulting values across the larval and juvenile stages then hints toward possible mechanisms of the computational adjustments during development. In the eye-specific D pathway, the time constant was more than twice as high for larvae as for juveniles, suggesting faster temporal processing of visual information in older animals. For both larvae and juveniles, we found the two weight factors for brightness increments and decrements to be of opposing signs. This means that this pathway generally biases turns to go away from localized absolute brightness change for the two age groups. Interestingly, for juveniles, the magnitude of these weight factors was much lower for decrements than for increments, pointing toward asymmetric contrast change computations favoring darkness at this developmental stage (see Figure 3B, 60 s and 180 s). For the C pathway, larvae showed a strong positive weight, while the weight for juveniles was almost zero. The cognitive variables differ considerably between larvae and juveniles (Cohen’s d of 4.7 for the time constant, 8 for the contrast weight, 0.62 for the increase weight, and 3.32 for the decrease weight). This result highlights that spatial luminance cues contribute differently in larval and juvenile brightness navigation.

Our model design and its parameters are based on a stimulus that changes on fixed 30-s intervals (Figure 3B). We next sought to challenge our model and test its predictive power with new, untested stimuli. To this end, we developed a paradigm in which uniform brightness levels and spatial contrast cues are temporally separated from one another with varying delay intervals (Figure 3F). Specifically, we started with a dark uniform environment and then changed the luminance to bright for variable interval lengths. We then switched on the luminance contrast cue, with the bright stimulus on the right side, and probed the initial response during this period. For short intervals, our model predicted that during the luminance contrast phase, turns should be more likely to go toward the dark side, because the model is still adapted to the initial period of darkness. For longer intervals, the model should get increasingly adapted to the bright environment and thus predict more turns toward the bright side. To test these predictions, we performed experiments with fish in the same stimulus configuration. Animal behavior closely matched our modeling results for both larvae and juveniles. As an additional validation step, we repeated analyses on a luminance-inverted variant of the stimulus, where model and experiment were also in close agreement.

We conclude that two more luminance processing pathways are present in zebrafish, in addition to the A pathway discussed in the previous section (Figure 2). The D pathway lets larval and juvenile zebrafish transiently swim away from changing brightness levels. The C pathway controls responses to brightness differences across the eyes. Here, when presented with spatial luminance contrasts, larvae swim toward the brighter side, while juveniles remain largely undirected. We have now successfully described behavior in response to well-controlled whole-field (Figure 2) and eye-specific spatial-temporal (Figure 3) brightness environments. These results enable us to explore whether our fitted models, without further changing their structure and parameters, may predict phototactic behavior when fish dynamically interact with more complex brightness patterns.

Model simulations of phototactic behavior in complex brightness environments

We have developed algorithmic models for larval and juvenile luminance-based behavioral modulations, whose parameters we fitted to simplified experimental configurations (Figures 2 and 3). With these models, we can now test more complex stimuli where spatial and temporal stimulus features are intertwined and where the luminance cues perceived by the animal dynamically depend on its behavior. Moreover, such model simulations allow us to evaluate the relevance of each of the identified pathways for phototactic behavior and how pathway contributions may change across development.

To test our models, we performed agent simulations (Figure 4A and Video S4), in which model fish navigate stimulus landscapes identical to those presented to real animals (Figure 1C). We projected the visual scene onto both eyes of the agent based on its position and orientation in the arena. We fed these time-evolving signals into our models to generate agent movement decisions. As the agents move through the arena, they perceive updated visual inputs. To identify the spatial extent of these projections, we performed experiments in which we varied luminance cues as a function of distance to the animal (Figures S4A–S4C). We found that swim modulations saturated beyond 2 cm and therefore set the field of view of our agent to a radius of 2 cm.

Video S4. Simulated agent fish in the half-circles stimulus with distinct brightness levels on each side (dark vs. bright)
Download video file (2.5MB, mp4)

To obtain eye-specific luminance levels, we assume that retinal images are averaged within a certain range around the animal. For juveniles, this assumption is justified by the observation that juveniles show improved phototactic navigation in the virtual circular gradient stimulus (Figure 2B). To test whether this assumption holds for larvae, we developed another virtual stimulus, the virtual contrast circular gradient stimulus (Figure S4D). This stimulus is based on the real circular gradient stimulus (Figure 1C): within a 2 cm radius of the fish, we compute the average brightness on the left and on the right side, and present these two brightness levels as a spatial contrast locked to the midline of the fish. As the larvae swim through the arena, the average luminance to each eye, and therefore, the perceived contrast will update depending on the orientation and position of the fish. Thus, for the fish, there is never any spatial information within each eye, only spatial contrast across eyes, as well as temporal modulations. As such, this configuration allows us to explicitly test to what extent the luminance input into the C pathway can also be described by local ambient eye-specific averaging. Using this virtual configuration, we found that the spatial distribution of larvae now closely matches the one obtained for the real static circular gradient (compare to Figure 1H). This finding, together with our observations that whole-field homogeneous temporal luminance cues are insufficient to guide larvae to the bright locations (Figure 2B), thus, adds confidence to the design of the proposed C pathway. We corroborate that localized spatially averaged luminance input, followed by an inter-hemispheric comparison, is a driver of phototaxis in zebrafish larvae.

Based on the experimental validations, we ran our agent models as close to the experimental conditions as possible. Specifically, we ran simulations for the same amount of time as for our real fish and generated the same data structure, largely facilitating comparisons between real and virtual animals. Notably, we set the parameters of our agent models solely based on the fitted model results from our separate experiments (Figures 2 and 3). This approach allowed us to validate models without fitting them to test stimuli. To compare across different models (Figure 4B), we computed a performance score based on the mean squared error between the model and the experimental spatial distributions across the four test stimuli, normalized by the error of a “blind” control model that is fed with constant luminance cues (method details). A positive performance score indicates that the model simulations show the same qualitative phototaxis tendency as real animals, while a negative value points toward opposing behaviors between the model and experiment.

We first tested the A pathway model (Figure 2F). Juveniles show modulations of swimming as a function of whole-field brightness, such as an increased displacement in brighter environments (Figures 2E and 2G). Such a modulation should allow animals to leave brighter areas more rapidly. As larvae did not show such modulations, we expect our larval agent model not to be able to perform the behavior. Our simulations were in agreement with such reasoning (Figures 4B and S5A).

Next, we tested models composed of the C and D pathways (Figure 3D). We first probed each pathway in isolation. The C pathway induces a tendency to swim toward the brighter side for both age groups, with strong effects in larvae but weak effects in juveniles (Figure 3E). We expected that such dynamics would be reflected in our agent simulations, which was indeed the case (Figure S5B). While our predictions were well aligned with the behavior of real larvae, they were the opposite of what real juveniles do, thus leading to positive and negative model performance scores for larvae and juveniles, respectively. For the D pathway model, our agent simulation qualitatively captured both larval and juvenile behavior (Figure S5C), resulting in positive performance scores for both developmental stages. The combination of the D and C pathways (D + C, same model as in Figure 3D) further improves the spatial distributions across the four test stimuli for larvae but not for juveniles (Figure S5D), reflected by the corresponding positive performance scores.

While these separate pathways in isolation can qualitatively explain individual elements of phototaxis, we require their combination to fully capture the different configurations presented in Figures 1, 2, and 3. We therefore propose a model that combines three parallel processing pathways (Figure 4C): the A pathway modulates the probability that a swim is a turn, the absolute turn angle, the inter-swim interval, and the displacement per swim. The D and the C pathways then regulate the direction of turns. Not only is this proposed model able to capture the behavioral responses discussed in the previous sections (Figures 1, 2, and 3), but it also shows the highest performance score when comparing simulations with the experiment (Figure 4B).

To facilitate easy comparison between our proposed model results and experimental data, we plotted simulated data in the same style as displayed before: our virtual agent simulations mimic the trajectories of real fish (compare Figures 4D and 1D). Looking at the two-dimensional spatial distributions, we observed that simulated larvae spend more time in bright areas, while juveniles go to darker areas (compare Figures 4E and 4G, and 1E and 1G). Moreover, our agents largely capture the same stimulus-specific distributions (compare Figures 4H and 1H). We attribute differences in the radial configurations to wall interactions in the experimental data, which we did not explicitly include in our models. Quantifying stimulus-specific metrics for individual fish showed significant differences between larval and juvenile agents (Figure 4I), as found in the experiments (Figure 1I).

Notably, we obtained these results without tuning any of the model parameters. For juveniles, simulation results and experimental data were in close agreement (Figure S5E). In larvae, however, we only obtained qualitative matching of our stimulus-specific metrics (Figure S5E). Together, these results indicate that our proposed model likely represents major important pathways in visual processing. To show that our larval simulations would be capable of matching data quantitatively, we next manually tuned one of the parameters in our proposed model. Specifically, we increased the weight of the C pathway in the larval model by a factor of 5. A model with such a configuration mimicked the experimentally observed distributions well (Figure S5F).

Finally, we wanted to know if more complex models, capturing additional behavioral features, would perform better than the proposed model. Further analyzing the behavioral response dynamics to the lateral brightness stimulus (Figure 3B), we found that the other swim statistics, besides the fraction of left turns, were also affected (Figure S6A). We therefore designed a five-pathway model that independently modulates each of the five swim statistics (Figure S6B): in addition to the A, D, and C pathways, this extended model also uses an AD (Figure S3C) and a derivative-averaging (DA) pathway. In the latter, we use the eye-specific derivative pathways and then average signals across eyes. We simultaneously fit our model to the experimental data obtained from both the lateral brightness stimulus (Figure 3B) and the virtual circular gradient stimulus (Figure 2), obtaining good matches between model and experiment (Figures S6A and S6C, method details). We then probed the performance of this extended model in our agent simulations (Figure S5G). Although this five-pathway model shows an improvement in the performance score compared to the proposed model, it does not capture the qualitative aspects of the spatial densities better than the proposed model. For completeness, we also tested two models composed only of the AD pathway (Figure S3C) or the DA pathway, which did not perform better than our proposed model (Figures S5H and S5I).

In summary, through systematic testing of a variety of different models for phototaxis, we propose a three-pathway configuration regulating swimming behavior. The A pathway controls undirected swimming statistics, while a superposition of a D and a C pathway modulates turn direction tendencies. Even though our proposed model is relatively simple in structure and parameter numbers, it could qualitatively capture behavior across a variety of experimental configurations without parameter tuning. Manual tuning of a single model parameter allowed us to obtain quantitatively matching results. The five-pathway model that modulates each swim statistic separately also performed well, however, with the cost of a largely extended parameter space. Comparing performance score and number of parameters across all tested model arrangements (Figure S7), we conclude that our proposed model provides an adequate intermediate level of model complexity and biological realism.

Discussion

Several studies have explored larval zebrafish phototaxis across a range of stimulus configurations.31,32,33,34,37,40 Yet, there have been no attempts to obtain a comprehensive generalized model that can explain behavior across conditions and over development. Here, we developed a systematic strategy to unravel the algorithmic principles of zebrafish phototaxis, proposing that animals employ three parallel pathways for luminance-based navigation. Our modeling approach allowed us to dissect how computations change as animals become older. It has been reported that juvenile zebrafish tend to swim into darkness, similarly to Danionella cerebrum adults.30 This behavior of juvenile zebrafish is in stark contrast to what larval zebrafish do, which swim into the light, making this transition a suitable example of vertebrate ontogeny.

Although little is known about zebrafish behavior in their natural environment,46 we hypothesize that eggs are laid in shallow, brighter waters, where the semi-transparent larvae hatch and spend their first days, likely staying hidden from predators or strong currents. As the fish grow and become more visible, they may move to deeper or darker waters for less visual exposure or to start hunting. Another example is the shell-dwelling cichlid, in which the leaving of the nest coincides with an inversion from dark-seeking to light-seeking.47

We found that juvenile zebrafish, like larvae, swim in a burst-and-glide pattern. Notably, the two age groups differed in their distribution of turn angles: whereas about half of larval swims are directed straight, juveniles turned more frequently. This increase in turn frequency may reflect a shift in their navigational strategy. With laterally positioned eyes, stronger relative sideways motion could support a better scan of the environment ahead.

While larval swim characteristics showed little sensitivity to uniform brightness levels, juvenile responses to whole-field brightness followed a natural logarithmic relationship, consistent with the Weber-Fechner law.43 This developmental change may relate to earlier findings that retinal cells in zebrafish keep developing until the juvenile stage.16 We conclude that whole-field brightness-based behavioral modulations, which can be described via an A pathway, play a major role in the navigational strategy of juvenile zebrafish.

Using closed-loop stimulus delivery methods, previous studies have shown that larvae tend to swim toward brighter regions33,34 and away from sides where luminance changes occur.37,40 We developed this paradigm further to capture both of these behavioral responses within a single experiment. We observed that larval zebrafish behavior is predominantly guided by a C pathway that steers swimming toward the brighter side. Juveniles, however, show very little directional swimming as a function of spatial contrast. Moreover, we find that animals at both developmental stages show a strong tendency to swim away from luminance change, which we describe through a D pathway. This D pathway may be linked to retinal ON- and OFF-pathways, which have been attributed to guide zebrafish larvae along spatial luminance gradients.39 Yet, as we find that our D pathway induces turns in response to both increments and decrements, it is unlikely to be the only pathway involved in luminance gradient navigation. Instead, it may act as a conservative mechanism to stabilize movement, which becomes particularly notable in high-contrast regions, such as near the midline edge of the half-circles stimulus.

Based on our experiments, we propose a three-pathway model for zebrafish phototaxis. Our model includes an A pathway to control the percentage of turns relative to all swims, the absolute turn angle, the inter-swim interval, and the displacement per swim. D and C pathways then bias the turning direction.

Agent-based simulations are powerful tools for developing and validating computational models of behavior and for probing their generalizability.48 We implemented our proposed model as an agent navigating the same environments as our real fish. Importantly, even though this model was not fitted to the test data, we found that model predictions and experimental results qualitatively match. Comparing this model to a library of alternative model implementations, we further confirm that our proposed model achieves the best predictive performance using only a moderate number of parameters.

Our agent model describes both larval and juvenile behavior using the same algorithmic architecture. We therefore hypothesize that the underlying neuronal connectivity and circuit mechanisms of phototaxis are largely conserved during development. The observed switch from light-seeking to dark-seeking may then be implemented through adjustments in synaptic strengths and potentially rebalancing of pathways. This configuration allows behavior to flexibly adapt to context, internal state, and changing environmental goals, without the need for an energy-consuming restructuring of the brain.

Limitations of the study

Despite these advances, our study has limitations. In Figure 3, we applied bootstrapping over individuals due to the limited number of swim events per fish per time bin, which prevented fitting models to individual fish. Shorter stimulation periods and longer experimental runs may help to mitigate this problem in future experimental designs. Moreover, after manually adjusting the weight of the C pathway, our proposed model could not only qualitatively, but also quantitatively, reproduce larval spatial distributions. Future experiments with a broader range of contrasts may contribute to retrieving a more optimal value of the C pathway weight. Experiments shown in Figures 1, 2, and 3 were not conducted on the same batches of fish. One could also test the same individuals across all conditions, allowing for single-fish comparisons and individualized model fitting. Furthermore, our tested stimuli are only abstractions of naturalistic visual environments, which may include dynamic motion, depth, and color variation.49,50 Future work could test whether our findings hold under more ecologically realistic conditions, potentially even in the wild. Our study further assumes that each fish behaves consistently throughout each experiment, which may not be true.51 Exploring intra-individual variability over time could provide further insights into behavioral flexibility and adaptation.

Although we observe a significant shift in larval and juvenile phototactic behavior, the dark-seeking behavior in juvenile fish appears to be less pronounced than the light-seeking behavior in larvae. One possible explanation is that the juvenile stage examined here represents a transitional developmental phase, in which phototactic strategies are being reorganized but are not fully finalized yet. In addition, experimental constraints may contribute to reduced effect sizes. Juvenile fish swim faster than larvae, which increases the spatial scale over which visual information is sampled and may reduce the effective spatial resolution of the stimuli. It is also possible that phototaxis plays a reduced role at this stage of development, as juveniles may increasingly rely on social or collective cues that are absent in our single-animal assays. Future experiments with broader age ranges, larger arenas, and different luminance configurations will be able to address this issue.

Another limitation of our work is that the identified behavioral algorithms still need to be mapped to their respective neural mechanisms. Zebrafish are well suited for such analyses, on the level of cells and brain-wide circuits, and our results provide the necessary basis for such experiments in the future. Several studies have already hinted at a possible role of the optic tectum in the implementation of the D pathway.39,52 In larvae, this brain region responds to changes in luminance and plays a causal role during initial turns away from darkness. Long-term phototaxis, over the time span of several minutes, involves intrinsically photoreceptive retinal ganglion cells, the thalamus, and the left habenula.53,54 Causal manipulations of the habenula influence how likely the fish is to cross a light-dark boundary while leaving swimming speed intact,53 suggesting a role in the C and/or the D pathway but not in the A pathway. Intrinsically photosensitive neurons in the preoptic area, on the other hand, influence swim statistics but not directional swims,36 suggesting a role in the A pathway. Future studies probing these brain regions under luminance stimuli, which allow to disentangle the three pathways, could test these predictions. It also remains completely unclear how neural circuits remodel in juveniles to implement the observed behavioral transitions, which should be explored in future work.

In addition, it will be important to quantify behavior along more developmental time points. Such experiments will enable us to better understand if transitions happen gradually or at specific maturation events, for example, with the onset of active feeding. Another promising direction is to study phototactic behavior in animal groups, where social cues may benefit collective decision-making.55 Here, it will be interesting to combine our experimentally constrained model of phototaxis in juveniles with additional inter-animal attraction rules and probe joint navigational performance. Our modeling framework can be used to make testable predictions for experiments dissecting the structure and function of the nervous system within and across species. For example, it will be interesting to repeat our behavioral analyses in Danionella cerebrum, as it has been shown that the response to a light-ON stimulus in these fish is similar to a light-OFF response in zebrafish larvae.56 This suggests that this species may already be dark seeking at the larval stage. We have previously used a modeling approach to link specific disease-related mutations to social behavior.21 Similarly, using recently developed mutant zebrafish with defects in brightness and contrast perception,57 it will now be possible to test how such manipulations impact our proposed visual processing pathways.

Our work takes advantage of the fact that development and behavior are in an interdependent relationship. We explore two different developmental stages in zebrafish to constrain a universal three-pathway model for phototaxis. This approach allows us to study how decision-making algorithms unfold with development, in organisms that must solve context-specific problems at an earlier stage, while still supporting the development of their behavioral repertoire. In general, our findings provide important insights into the computational mechanisms that guide vertebrate ontogeny and exemplify the power of model-driven behavioral research.

Resource availability

Lead contact

Requests for further information and resources should be directed to and will be fulfilled by the lead contact, Armin Bahl (armin.bahl@uni-konstanz.de).

Materials availability

This study did not generate new, unique reagents or materials.

Data and code availability

  • •

    All data associated with this manuscript are publicly available on the persistent repository platform KonDATA with the identifier https://doi.org/10.48606/sb32fkvwj5avwhbr.

  • •

    The code for simulations and data analysis is available on the persistent repository platform KonDATA with the identifier https://doi.org/10.48606/m9v18p3c6cb7k77q.

  • •

    Any additional information required to reanalyze the data reported in this study is available from the lead contact upon request.

Acknowledgments

We thank the staff of the Animal Facility of the Couzin Lab, and in particular Dominique Leo and Jayme Weglarski, for their generous supply of zebrafish eggs and juvenile fish. In addition, we thank Heike Naumann and Ulrike Bonitz for their vital work in keeping the lab running. We are thankful to the staff support of our central machine shop, especially Ralf Honz, for the invaluable assistance with building our tracking setups. We are grateful for the inspiring and stimulating discussions with Daan Brinks, Iain Couzin, and Osama M. Ahmed. Finally, we would like to thank Daan Brinks, Fabienne Roth, Lukas Pijnacker-Hordijk, Margherita Zaupa, Osama M. Ahmed, and Sophie Aimon for proofreading and providing constructive feedback on the manuscript.

This work was funded by the Emmy Noether Program (BA 5923/1-1), an ERC Starting Grant (101075541 – CollectiveDecisions), and the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy (EXC 2117–422037984). In addition, the Zukunftskolleg Konstanz supported A.B. and M.Q.C. The Max Planck Institute for Animal Behavior provided bridge funding for M.Q.C. K.S. was supported by a Boehringer Ingelheim Fonds graduate fellowship.

Author contributions

Conceptualization, M.Q.C., K.S., P.E.E., and A.B.; data curations, M.Q.C., K.S., P.E.E., and A.B.; formal analysis, M.Q.C.; funding acquisition, A.B.; investigations, M.Q.C., K.S., and P.E.E.; methodology, M.Q.C. and K.S.; project administration, M.Q.C.; resources, M.Q.C. and A.B.; software, M.Q.C., K.S., and A.B.; supervision, A.B.; validation, M.Q.C., K.S., P.E.E., and A.B.; visualization, M.Q.C.; writing – original draft, M.Q.C. and A.B.; writing – review and editing, M.Q.C., K.S., P.E.E., and A.B.

Declaration of interests

The authors declare no competing interests.

Declaration of generative AI and AI-assisted technologies in the writing process

During the preparation of this work, M.Q.C. and A.B. used ChatGPT in order to proofread parts of the manuscript and improve language. After using this service, the authors carefully reviewed and edited the content as needed. They take full responsibility for the content of the publication. All illustrations and schematics in the manuscript have been generated by the authors without generative AI, using the vector design program Affinity.

STAR★Methods

Key resources table

REAGENT or RESOURCE SOURCE IDENTIFIER
Deposited data

Data repository This study https://doi.org/10.48606/sb32fkvwj5avwhbr
Code repository This study https://doi.org/10.48606/m9v18p3c6cb7k77q

Experimental models: Organisms/strains

Zebrafish: Konstanz wild type strain Max Planck Institute of Animal Behavior N/A

Software and algorithms

Python 3.12 https://www.python.org/downloads RRID: SCR_008394
Panda3D https://www.panda3d.org RRID: SCR_021216

Experimental model and study participant details

Wild-type Danio rerio (Konstanz strain) larvae, at 5 days post-fertilization (dpf), and juveniles, at 26 and 27 dpf, were used. Larvae were reared in Petri dishes containing E3 solution under a 14/10 hr light/dark cycle at 28°C. Juveniles were housed in ZebTec tanks under a 12/12 hr light-dark cycle and at 28°C. Juveniles were fed dry Zebrafeed by Sparos 3 times a day. In addition, they were fed live high-hufa artemia, according to the following schedule: 5–10 dpf: None; 11–15 dpf: 4× a day 1 drop per feeding; 16–20 dpf: 4× a day 3 drops per feeding; 21–30 dpf: 4× a day 5 drops per feeding. This protocol minimized variation in body size. Care was taken to always include fish from multiple clutches. All experiments were conducted during daytime hours (9 AM to 5 PM). Experiments involving juveniles zebrafish were approved by the Regierungspräsidium Freiburg (Germany) under permit number G21/153 (Soziales Lernverhalten im larvalen Zebrafisch). To reduce the number of animals used, only zebrafish that were surplus-bred for other projects and could not be used in those projects were included in this study. Sex could not be determined at this age.

Method details

Experimental setup

Experiments were conducted in diffusive watch-glass arenas, each filled with 75 mL of E3 solution, resulting in a water volume having a diameter of 12 cm and a maximum depth of 5 mm. The water temperature was stably maintained at 26 °C. Before trials began, fish were given 15 minutes to habituate to the experimental arenas. The visual stimuli were created using Panda3D. Visual stimuli were projected from below using an AAXA P300 Pico Projector. We ensured control over the projected brightness levels by measuring intensities for a fixed interval of projector input values using an LX1330B light meter (Hongkong Thousandshores Ltd., Central Hong Kong). Subsequently, a sigmoid function was fitted to the measured values for each projector and inverted to retrieve the appropriate projector input value for each desired brightness level. Luminance levels varied between 10 lux (dark) and 300 lux (bright) for all stimuli except the outward gradient stimulus (Figures 1C and 4C), where brightness increased to 600 lux. For the circular and radial gradients, the brightness scales linearly between this brightness range along the azimuth and radius, respectively. The stimulus position was calibrated to match the camera position, and a computational warping grid was applied to allow orthogonal projection onto the curved watch-glass arenas. Stimuli were shown in random order, and the same fish were exposed to stimulus-corresponding controls. Stimuli were shown either as static or locked to the fish’s position in a closed-loop setup configuration (full closed-loop delay: 60 ms). All stimuli were also always shown in their mirrored version to control for potential asymmetries in behavior and arena shape: around the arena’s y-axis for static stimuli (Figures 1, 2, and 4) or around the fish’s longitudinal body axis for fish-locked stimuli (Figure 3).

Infrared illumination was provided by an LED array (940 nm wavelength), and behavioral recordings were made using an IR-sensitive camera (Basler acA2040-90um-NIR) equipped with an adjustable macro lens (Navitar ZOOM 7000) and an IR longpass filter (Linghuang Zomei IR 850 nm 52 mm). The camera operated at 90 Hz. To increase experimental throughput, we used two computers, each connected to eight cameras and four projectors, allowing for independent stimulation and closed-loop tracking of 16 fish simultaneously. Fish position and orientation were continuously measured using background subtraction-based tracking, implemented in custom Python software. To compute body size (Figure S1C), we implemented a real-time posture-based tracking to detect the midline. Experiments, simulations, and data analysis were performed using custom-written Python code (Python 3.11).

Agent simulations

Each simulation ran at 60 Hz and included 96 model agents. The simulations were run in parallel at the agent level, in which each agent was assigned a unique random number generator seed. The simulated arena matched the real experimental arena (6 cm radius). Simulated agents received identical visual stimuli as the real fish, with the same trial structure, trial duration, and number of trials. Each agent had a left and right eye, each with a 2 cm half-disk field of view, where the half-circle region on the side of each eye was considered for visual input (spatially averaged, Bright and Bleft). Pixels outside the dish but within the field of view were assigned not-a-number values and ignored in further processing. The stimulus was rendered on a grid of 256 by 256 pixels. At the start of each trial, each agent was assigned a random orientation and position within the arena. The swim events of agents were determined based on the brightness input to the corresponding models. All models had parameters obtained from real fish data (Figures 2 and 3, and S3), fitted for each age group and swim statistical property.

The Averaging pathway (A) models (Figure 2D) took the average brightness (B) across the two eyes

BA=Bright+Bleft2

and the contribution to the swim characteristics by evaluating the natural logarithm.

yA=bA·logBA,

where bA is the logarithmic slope.

The Contrast (C) pathway models (Figure 3D) compute the contrast across the eyes following

BC=Bright−Bleft

and its contribution to swim characteristics was obtained by evaluating the linear function.

yC=bc·Bcontrast,

where bc is a linear transformation.

The Derivative (D, Figure 3D), Averaging-Derivative (AD, Figure S3C), and Derivative-Averaging pathway (DA, Figure S5I) involve a high-pass filter to detect luminance changes. This filter is implemented via a low-pass filter that is slowly updated to match the new brightness value. The low-pass filtered value is updated at each timestep n following.

BLPF(n)=α·B(n)+(1−α)·BLPF(n−1),

where the low-pass filter parameter α is based on the time constant τ and time since the last processed frame Δt:

α=Δtτ+Δt.

Subsequently, the high-pass filter value is obtained by computing the difference between the current perceived brightness B(n) and the low-pass filtered BLPF(n) by

ΔB=BLPF(n)−B(n).

For these pathways, the resulting brightness change value is subsequently multiplied by sign-dependent weights and linearly transformed to obtain the pathway contributions to the modulation of swim characteristics according to

y=b·w+·ΔBifΔB>0
y=b·w−·ΔBifΔB≤0
y=0otherwise.

Where scaling factors b, and weights w+, and w− were different for each of the D, AD, and DA pathways.

To obtain the final swimming characterizations for all five pathways, the contributions of each pathway are then summed, and an offset a is added. For the extended five-pathway model, this results in

Y=yA+yC+yD+yAD+yDA+a.

In the proposed model, the percentage of turns relative to all swims, turn angle, inter-swim interval, and displacement are determined by the Averaging pathway only, as given by

Y=yA+a,

and the fraction of left turns by a superposition of the Derivative (D) and Contrast (C) pathways is given by

Y=yD+yC+a.

Upon reaching the arena wall, agents maintained their general swimming direction but were assigned a new heading angle relative to the wall, drawn from a normal distribution centered around 115 degrees and with a 10-degree standard deviation. The angle drawing process was repeated until the agents moved away from the wall again.

Quantification and statistical analysis

Edge interactions, pre-screening, and data exclusion

To exclude edge effects, only data from fish located at least 1 cm away from the edge were included in the analysis. As part of the habituation to the experimental arena, larvae underwent a 10-minute pre-screening period to exclude unhealthy individuals. Larvae that did not adhere to the following behavioral criteria were excluded: Leftward and rightward gratings: at least 50% of turns aligned with the grating direction; Homogeneous gray background: maximum of 20% of turns in a single direction. For juveniles, the arena was left gray during the habituation phase without performing a pre-screening protocol. To exclude potential tracking errors during the pre-screening and the experiment, swim events were discarded if they exceeded predefined thresholds. Generally, less than 1% of all data was discarded. Larvae: maximum contour area = 12,000 px, maximum average speed per swim = 1.5 cm/s. Juveniles: max. contour area = 16,000 px, maximum average speed per swim = 3 cm/s. All fish: maximum inter-swim interval = 10 s, maximum absolute orientation change = 150°. A complete trial was discarded if more than 5% of swim events in that trial exceeded any of the above thresholds.

Swim event detection

Fish position and orientation were extracted after background subtraction, with the background being updated every 120 s. Swim events were identified based on windowed variance thresholds applied to movement data, using a variance window of 0.050 s, a minimum duration above the start threshold of 0.020 s, a minimum duration below the end threshold of 0.050 s, and a maximal event length of 4 s. The start and end variance thresholds differed between larvae (start threshold = 5, end threshold = 1.5) and juveniles (start threshold = 7.5, end threshold = 5).

Arena-locked paradigm

The tracking data described the x and y positions for every individual, stimulus, and trial, with each row denoting a frame. Spatial binning was applied using 10 bins. Bins were defined for x-position, radius, and azimuthal angle, with values ranging from –5 to 5 cm for x, 0 to 5 cm for radius, and 0 to 360 degrees for the angle. The spatial distributions were first averaged within individuals before calculating the mean and standard error of the mean over each population. The shown probabilities (Figures 1, 2B, and 4) are normalized by the values of the control stimulus (Figure S1A). The average cosine-weighted angle is a dimensionless metric used to capture the average position of individuals for all tested circular gradient stimuli. This was computed by multiplying the number of swims within each azimuthal bin N(αi) with the cosine-weighted value cos(αi) for that bin and subsequently summing over all bins

100·∑αi∈anglesN(αi)·cos(αi).

Simulations produced the same format as the experimental data, allowing us to perform the exact same analysis for both figures. The agents’ performance score indicates how well an agent captures the spatial distribution of the real fish. We calculate the average mean-squared error for each of the four (=Nstim) test stimuli in their stimulus-specific spatial bins, comparing the spatial distributions of simulated agents (pagent) to real fish (reference, pref).

MSE=1Nstim·∑i∈stimuli(1Nbins·∑j∈bins(pref,i,j−pagent,i,j)2).

Subsequently, the performance was calculated as the percentage improvement relative to a blind control model (perceiving constant luminance levels),

MSEblind−MSEMSEblind·100%.

Virtual circular gradient paradigm

The swim-event characteristics (orientation change, inter-swim interval, and displacement) are summarized as median values over trials, within individual fish and stimuli, as the underlying distributions are not necessarily symmetric. Orientation change can be best described by a mixture of a Normal distribution for forward swims and two Maxwell-Boltzmann distributions for left and right turns. The proportions of left and right turns can be captured using weighting factors in the mixture model. Displacement and inter-swim intervals both follow a Gamma distribution, which is known to be well-suited for representing temporal and spatial intervals.

In the virtual circular gradient paradigm, the arena brightness was set based on the azimuthal position of the fish. Swims were grouped into brightness bins, based on the brightness at the start of the swim, and medians were computed within each brightness bin for individual fish. A logarithmic function was then fitted to the brightness data (see below), allowing for an estimation of the relationship between brightness and swim characteristics. To assess whether the fitted slope parameters differed significantly from zero, we performed bootstrapping over fish with 10,000 iterations to compute two-tailed p-values and 95% confidence intervals. This approach provided robust statistical inference for evaluating the modulation of swim parameters by brightness. The Averaging pathway (A) model (Figure 2D) is described above in the subsection called agent simulations.

Lateral brightness paradigm

For the quantification in Figure 3C, we divided data points for individual fish into three phases. The transient phase included data points in the first temporal bin after the appearance or disappearance of spatial contrast. The spatial contrast and uniform phase both include the center 10 seconds of the stimulus blocks, where the stimulus shows a spatial contrast or uniform brightness.

To ensure sufficient data points per temporal bin for model fitting (Figure 3E), we generated bootstrapped sets of fish. For each age group, the total number of bootstrapped fish matched the number of original individuals. Each bootstrapped fish was constructed by randomly sampling, with replacement, two-thirds of the available real fish. For time-series analysis, data were resampled by calculating the median value within 1-second time windows for each individual. The Contrast (C) and Derivative (D) pathways (Figure 3D) are described above in the “Agent simulations” subsection. Models were fitted to individual bootstrapped fish (see below), and mean model parameters were retrieved by averaging over parameters of the individual fits.

To detect peaks in the percentage of left turns (Figure 3F), values before stimulus onset were excluded, and the peak was determined by maximizing the absolute deviation from the 50% chance level.

All statistical tests are specified in the figure legends. To compare distributions against zero, we used bootstrapping to compute a two-tailed p-value. Unless specified otherwise, resampling was performed 10,000 times, each time selecting 2/3 of the individuals to create a bootstrapped dataset matching the original sample size. For comparisons between distributions, we applied the Mann-Whitney U-test.

Model parameters were obtained by fitting the analytic model equations to experimental data using the optimization and root-finding functions of the Python package SciPy. Fitting to separate experimental datasets–virtual circular gradient stimulus (Figure 2), lateral brightness stimulus (Figure 3), and whole-field luminance changes stimulus (Figure S3)–was performed using the non-linear least squares fit function curve_fit. The extended five-pathway model was fitted to the combined experimental data from the lateral brightness stimulus and virtual circular gradient stimulus by minimizing the mean-squared error to both datasets using the minimize function.

Footnotes

Supplemental information can be found online at https://doi.org/10.1016/j.isci.2026.116190.

Contributor Information

Maxim Q. Capelle, Email: maxim.capelle@uni-konstanz.de.

Armin Bahl, Email: armin.bahl@uni-konstanz.de.

Supplemental information

Document S1. Figures S1–S7
mmc1.pdf (879.5KB, pdf)

References

  • 1.Tomasello M. Harvard University Press; 2019. Becoming Human: A Theory of Ontogeny. [DOI] [Google Scholar]
  • 2.Fox W.M. Reflex-ontogeny and behavioural development of the mouse. Anim. Behav. 1965;13:234–241. doi: 10.1016/0003-3472(65)90041-2. [DOI] [PubMed] [Google Scholar]
  • 3.Lynn D.A., Brown G.R. The ontogeny of anxiety-like behavior in rats from adolescence to adulthood. Dev. Psychobiol. 2010;52:731–739. doi: 10.1002/dev.20468. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Donato F., Alberini C.M., Amso D., Dragoi G., Dranovsky A., Newcombe N.S. The ontogeny of hippocampus-dependent memories. J. Neurosci. 2021;41:920–926. doi: 10.1523/JNEUROSCI.1651-20.2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Sztarker J., Rind F.C. A look into the cockpit of the developing locust: Looming detectors and predator avoidance. Dev. Neurobiol. 2014;74:1078–1095. doi: 10.1002/dneu.22184. [DOI] [PubMed] [Google Scholar]
  • 6.Sawin-McCormack E.P., Sokolowski M.B., Campos A.R. Characterization and genetic analysis of Drosophila melanogaster photobehavior during larval development. J. Neurogenet. 1995;10:119–135. doi: 10.3109/01677069509083459. [DOI] [PubMed] [Google Scholar]
  • 7.Zhu M.L., Herrera K.J., Vogt K., Bahl A. Navigational strategies underlying temporal phototaxis in Drosophila larvae. J. Exp. Biol. 2021;224 doi: 10.1242/jeb.242428. [DOI] [PubMed] [Google Scholar]
  • 8.Benzer S. Behavioral mutants of Drosophila isolated by countercurrent distribution. Proc. Natl. Acad. Sci. 1967;58:1112–1119. doi: 10.1073/pnas.58.3.1112. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Kain J.S., Stokes C., de Bivort B.L. Phototactic personality in fruit flies and its suppression by serotonin and white. Proc. Natl. Acad. Sci. 2012;109:19834–19839. doi: 10.1073/pnas.1211988109. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Baier H., Scott E.K. The visual systems of zebrafish. Annu. Rev. Neurosci. 2024;47:255–276. doi: 10.1146/annurev-neuro-111020-104854. [DOI] [PubMed] [Google Scholar]
  • 11.Lee K., Doe C.Q. A locomotor neural circuit persists and functions similarly in larvae and adult Drosophila. eLife. 2021;10 doi: 10.7554/eLife.69767. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Kohl J., Babayan B.M., Rubinstein N.D., Autry A.E., Marin-Rodriguez B., Kapoor V., Miyamishi K., Zweifel L.S., Luo L., Uchida N., Dulac C. Functional circuit architecture underlying parental behaviour. Nature. 2018;556:326–331. doi: 10.1038/s41586-018-0027-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Easter S.S., Nicola G.N. The development of vision in the zebrafish (Danio rerio) Dev. Biol. 1996;180:646–663. doi: 10.1006/dbio.1996.0335. [DOI] [PubMed] [Google Scholar]
  • 14.Beck J.C., Gilland E., Tank D.W., Baker R. Quantifying the ontogeny of optokinetic and vestibuloocular behaviors in zebrafish, medaka, and goldfish. J. Neurophysiol. 2004;92:3546–3561. doi: 10.1152/jn.00311.2004. [DOI] [PubMed] [Google Scholar]
  • 15.Koning H.K., Ahemaiti A., Boije H. A deep-dive into fictive locomotion – a strategy to probe cellular activity during speed transitions in fictively swimming zebrafish larvae. Biol. Open. 2022;11 doi: 10.1242/bio.059167. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Branchek T., Bremiller R. The development of photoreceptors in the zebrafish, Brachydanio rerio. I. Structure. J. Comp. Neurol. 1984;224:107–115. doi: 10.1002/cne.902240109. [DOI] [PubMed] [Google Scholar]
  • 17.Portugues R., Engert F. The neural basis of visual behaviors in the larval zebrafish. Curr. Opin. Neurobiol. 2009;19:644–647. doi: 10.1016/j.conb.2009.10.007. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Stednitz S.J., Washbourne P. Rapid progressive social development of zebrafish. Zebrafish. 2020;17:11–17. doi: 10.1089/zeb.2019.1815. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Dreosti E., Lopes G., Kampff A.R., Wilson S.W. Development of social behavior in young zebrafish. Front. Neural Circuits. 2015;9:39. doi: 10.3389/fncir.2015.00039. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Harpaz R., Nguyen M.N., Bahl A., Engert F. Precise visuomotor transformations underlying collective behavior in larval zebrafish. Nat. Commun. 2021;12:6578. doi: 10.1038/s41467-021-26748-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Harpaz R., Aspiras A.C., Chambule S., Tseng S., Bind M.-A., Engert F., Fishman M.C., Bahl A. Collective behavior emerges from genetically controlled simple behavioral motifs in zebrafish. Sci. Adv. 2021;7 doi: 10.1126/sciadv.abi7460. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Larsch J., Baier H. Biological motion as an innate perceptual mechanism driving social affiliation. Curr. Biol. 2018;28:3523–3532.e4. doi: 10.1016/j.cub.2018.09.014. [DOI] [PubMed] [Google Scholar]
  • 23.Hinz R.C., de Polavieja G.G. Ontogeny of collective behavior reveals a simple attraction rule. Proc. Natl. Acad. Sci. USA. 2017;114:2295–2300. doi: 10.1073/pnas.1616926114. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Valente A., Huang K.-H., Portugues R., Engert F. Ontogeny of classical and operant learning behaviors in zebrafish. Learn. Mem. 2012;19:170–177. doi: 10.1101/lm.025668.112. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Yashina K., Tejero-Cantero Á., Herz A., Baier H. Zebrafish exploit visual cues and geometric relationships to form a spatial memory. iScience. 2019;19:119–134. doi: 10.1016/j.isci.2019.07.013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Palumbo F., Serneels B., Pelgrims R., Yaksi E. The zebrafish dorsolateral habenula is required for updating learned behaviors. Cell Rep. 2020;32 doi: 10.1016/j.celrep.2020.108054. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Bak-Coleman J., Smith D., Coombs S. Going with, then against the flow: evidence against the optomotor hypothesis of fish rheotaxis. Anim. Behav. 2015;107:7–17. doi: 10.1016/j.anbehav.2015.06.007. [DOI] [Google Scholar]
  • 28.Coombs S., Bak-Coleman J., Montgomery J. Rheotaxis revisited: a multi-behavioral and multisensory perspective on how fish orient to flow. J. Exp. Biol. 2020;223 doi: 10.1242/jeb.223008. [DOI] [PubMed] [Google Scholar]
  • 29.Serra E.L., Medalha C.C., Mattioli R. Natural preference of zebrafish (Danio rerio) for a dark environment. Braz. J. Med. Biol. Res. 1999;32:1551–1553. doi: 10.1590/S0100-879X1999001200016. [DOI] [PubMed] [Google Scholar]
  • 30.Lee T.J., Briggman K.L. Visually guided and context-dependent spatial navigation in the translucent fish Danionella cerebrum. Curr. Biol. 2023;33:5467–5477.e4. doi: 10.1016/j.cub.2023.11.030. [DOI] [PubMed] [Google Scholar]
  • 31.Brockerhoff S.E., Hurley J.B., Janssen-Bienhold U., Neuhauss S.C., Driever W., Dowling J.E. A behavioral screen for isolating zebrafish mutants with visual system defects. Proc. Natl. Acad. Sci. USA. 1995;92:10545–10549. doi: 10.1073/pnas.92.23.10545. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Burgess H.A., Granato M. Modulation of locomotor activity in larval zebrafish during light adaptation. J. Exp. Biol. 2007;210:2526–2539. doi: 10.1242/jeb.003939. [DOI] [PubMed] [Google Scholar]
  • 33.Huang K.-H., Ahrens M.B., Dunn T.W., Engert F. Spinal projection neurons control turning behaviors in zebrafish. Curr. Biol. 2013;23:1566–1573. doi: 10.1016/j.cub.2013.06.044. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Karpenko S., Wolf S., Lafaye J., Le Goc G., Panier T., Bormuth V., Candelier R., Debrégeas G. From behavior to circuit modeling of light-seeking navigation in zebrafish larvae. eLife. 2020;9 doi: 10.7554/eLife.52882. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Orger M.B., Baier H. Channeling of red and green cone inputs to the zebrafish optomotor response. Vis. Neurosci. 2005;22:275–281. doi: 10.1017/S0952523805223039. [DOI] [PubMed] [Google Scholar]
  • 36.Fernandes A.M., Fero K., Arrenberg A.B., Bergeron S.A., Driever W., Burgess H.A. Deep brain photoreceptors control light-seeking behavior in zebrafish larvae. Curr. Biol. 2012;22:2042–2047. doi: 10.1016/j.cub.2012.08.016. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Chen X., Engert F. Navigational strategies underlying phototaxis in larval zebrafish. Front. Syst. Neurosci. 2014;8:39. doi: 10.3389/fnsys.2014.00039. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Horstick E.J., Bayleyen Y., Sinclair J.L., Burgess H.A. Search strategy is regulated by somatostatin signaling and deep brain photoreceptors in zebrafish. BMC Biol. 2017;15:4. doi: 10.1186/s12915-016-0346-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Burgess H.A., Schoch H., Granato M. Distinct retinal pathways drive spatial orientation behaviors in zebrafish navigation. Curr. Biol. 2010;20:381–386. doi: 10.1016/j.cub.2010.01.022. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Chen A.B., Deb D., Bahl A., Engert F. Algorithms underlying flexible phototaxis in larval zebrafish. J. Exp. Biol. 2021;224 doi: 10.1242/jeb.238386. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41.Marr D. MIT Press; 1982. Vision: A Computational Investigation into the Human Representation and Processing of Visual Information. [Google Scholar]
  • 42.Braitenberg V. MIT Press; 1984. Vehicles: Experiments in Synthetic Psychology. [Google Scholar]
  • 43.Dehaene S. The neural basis of the Weber-Fechner law: a logarithmic mental number line. Trends Cogn. Sci. 2003;7:145–147. doi: 10.1016/S1364-6613(03)00055-X. [DOI] [PubMed] [Google Scholar]
  • 44.Dunn T.W., Mu Y., Narayan S., Randlett O., Naumann E.A., Yang C.-T., Schier A.F., Freeman J., Engert F., Ahrens M.B. Brain-wide mapping of neural activity controlling zebrafish exploratory locomotion. eLife. 2016;5 doi: 10.7554/eLife.12741. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Lamiré L.A., Haesemeyer M., Engert F., Granato M., Randlett O. Functional and pharmacological analyses of visual habituation learning in larval zebrafish. eLife. 2023;12 doi: 10.7554/eLife.84926.3. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Sundin J., Morgan R., Finnøen M.H., Dey A., Sarkar K., Jutfelt F. On the observation of wild zebrafish (Danio rerio) in India. Zebrafish. 2019;16:546–553. doi: 10.1089/zeb.2019.1778. [DOI] [PubMed] [Google Scholar]
  • 47.Parker A.V., Stemmer M., Grätsch S., Dorigo A., Rodriguez Ramirez O., Adel A., Jordan A., Baier H. Intrinsic timing of brood care in shell-dwelling cichlids. Curr. Biol. 2025;35:672–680.e4. doi: 10.1016/j.cub.2024.12.020. [DOI] [PubMed] [Google Scholar]
  • 48.Singh S.H., Van Breugel F., Rao R.P.N., Brunton B.W. Emergent behaviour and neural dynamics in artificial agents tracking odour plumes. Nat. Mach. Intell. 2023;5:58–70. doi: 10.1038/s42256-022-00599-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49.Cai L.T., Krishna V.S., Hladnik T.C., Guilbeault N.C., Vijayakumar C., Arunachalam M., Juntti S.A., Arrenberg A.B., Thiele T.R., Cooper E.A. Spatiotemporal visual statistics of aquatic environments in the natural habitats of zebrafish. Sci. Rep. 2023;13 doi: 10.1038/s41598-023-36099-z. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50.Baden T. Circuit mechanisms for colour vision in zebrafish. Curr. Biol. 2021;31:R807–R820. doi: 10.1016/j.cub.2021.04.053. [DOI] [PubMed] [Google Scholar]
  • 51.Krishnan K., Muthukumar A., Sterrett S., Pflitsch P., Fairhall A., Fishman M., Bahl A., Zwaka H., Engert F. Attentional switching in larval zebrafish: The attentive leaky integrator. Sci. Adv. 2025;11 doi: 10.21203/rs.3.rs-3486824/v1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52.Slangewal K., Aimon S., Capelle M.Q., Kämpf F., Naumann H., Slanchev K., Baier H., Bahl A. Visuomotor decision-making through multifeature convergence in the larval zebrafish hindbrain. Nat. Commun. 2026;17:2024. doi: 10.1038/s41467-026-69633-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53.Zhang B.b., Yao Y.y., Zhang H.f., Kawakami K., Du J.l. Left habenula mediates light-preference behavior in zebrafish via an asymmetrical visual pathway. Neuron. 2017;93:914–928.e4. doi: 10.1016/j.neuron.2017.01.011. [DOI] [PubMed] [Google Scholar]
  • 54.Kölsch Y., Hahn J., Sappington A., Stemmer M., Fernandes A.M., Helmbrecht T.O., Lele S., Butrus S., Laurell E., Arnold-Ammer I., et al. Molecular classification of zebrafish retinal ganglion cells links genes to cell types to behavior. Neuron. 2021;109:645–662.e9. doi: 10.1016/j.neuron.2020.12.003. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Berdahl A., Torney C.J., Ioannou C.C., Faria J.J., Couzin I.D. Emergent sensing of complex environments by mobile animal groups. Science. 2013;339:574–576. doi: 10.1126/science.1225883. [DOI] [PubMed] [Google Scholar]
  • 56.Lindemann N., Kalix L., Possiel J., Stasch R., Kusian T., Köster R.W., von Trotha J.W. A comparative analysis of Danionella cerebrum and zebrafish (Danio rerio) larval locomotor activity in a light-dark test. Front. Behav. Neurosci. 2022;16 doi: 10.3389/fnbeh.2022.885775. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Putti E., Faini G., Thanh-Mai Dang J., Savaliya J.H., Eggeler F., Duroure K., Vougny J., Ortiz-Álvarez G., Pujades C., Bahl A., et al. Lrrn-mediated retinal ganglion cell targeting drives visual circuit assembly for brightness and contrast detection. Sci. Adv. 2026;12 doi: 10.1126/sciadv.adz4585. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

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

Supplementary Materials

Video S1. A larval and a juvenile zebrafish in the half-circles stimulus with distinct brightness levels on each side (dark vs. bright)
Download video file (3.5MB, mp4)
Video S2. A larval and a juvenile zebrafish in the virtual circular gradient stimulus
Download video file (3.5MB, mp4)
Video S3. A larval and a juvenile zebrafish in the lateral brightness stimulus
Download video file (4.2MB, mp4)
Video S4. Simulated agent fish in the half-circles stimulus with distinct brightness levels on each side (dark vs. bright)
Download video file (2.5MB, mp4)
Document S1. Figures S1–S7
mmc1.pdf (879.5KB, pdf)

Data Availability Statement

  • •

    All data associated with this manuscript are publicly available on the persistent repository platform KonDATA with the identifier https://doi.org/10.48606/sb32fkvwj5avwhbr.

  • •

    The code for simulations and data analysis is available on the persistent repository platform KonDATA with the identifier https://doi.org/10.48606/m9v18p3c6cb7k77q.

  • •

    Any additional information required to reanalyze the data reported in this study is available from the lead contact upon request.


Articles from iScience are provided here courtesy of Elsevier

RESOURCES