# Sensorimotor computation underlying phototaxis in zebrafish

Sébastien Wolf, Alexis M. Dubreuil, Tommaso Bertoni, Urs Lucas Böhm, Volker Bormuth, Raphaël Candelier, Sophia Karpenko, David G. C. Hildebrand, Isaac H. Bianco, Rémi Monasson, et al.

<figure><img src="image_1.png" /></figure>

## To cite this version:

Sébastien Wolf, Alexis M. Dubreuil, Tommaso Bertoni, Urs Lucas Böhm, Volker Bormuth, et al. Sensorimotor computation underlying phototaxis in zebrafish. Nature Communications, 2017, 8 (1), pp.651. 10.1038/s41467-017-00310-3. hal-01591895

HAL Id: hal-01591895

https://hal.sorbonne-universite.fr/hal-01591895

Submitted on 22 Sep 2017

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
ARTICLE

DOI: 10.1038/s41467-017-00310-3

OPEN

# Sensorimotor computation underlying phototaxis in zebrafish

Sébastien Wolf<fnref n="1" />,², Alexis M. Dubreuil³, Tommaso Bertoni<fnref n="1" />,², Urs Lucas Böhm⁵,⁴,⁵,⁶,⁷, Volker Bormuth<fnref n="1" />,², Raphaël Candelier<fnref n="1" />,², Sophia Karpenko<fnref n="1" />,², David G.C. Hildebrand⁵,⁸,⁹,¹¹, Isaac H. Bianco¹⁰, Rémi Monasson³ & Georges Debrégeas<fnref n="1" />,²

Animals continuously gather sensory cues to move towards favourable environments. Efficient goal-directed navigation requires sensory perception and motor commands to be intertwined in a feedback loop, yet the neural substrate underlying this sensorimotor task in the vertebrate brain remains elusive. Here, we combine virtual-reality behavioural assays, volumetric calcium imaging, optogenetic stimulation and circuit modelling to reveal the neural mechanisms through which a zebrafish performs phototaxis, i.e. actively orients towards a light source. Key to this process is a self-oscillating hindbrain population (HBO) that acts as a pacemaker for ocular saccades and controls the orientation of successive swim-bouts. It further integrates visual stimuli in a state-dependent manner, i.e. its response to visual inputs varies with the motor context, a mechanism that manifests itself in the phase-locked entrainment of the HBO by periodic stimuli. A rate model is developed that reproduces our observations and demonstrates how this sensorimotor processing eventually biases the animal trajectory towards bright regions.

<footnote n="1">¹Sorbonne Universités, UPMC Univ. Paris 06, UMR 8237, Laboratoire Jean Perrin, F-75005 Paris, France. ²CNRS UMR 8237, Laboratoire Jean Perrin, F-75005 Paris, France. ³Laboratory of Theoretical Physics, Ecole Normale Supérieure, CNRS, PSL Research University, Sorbonne Universités UPMC, 24 rue Lhomond, 75005 Paris, France. ⁴Institut du Cerveau et de la Moelle Epinière, 75013 Paris, France. ⁵UPMC Univ. Paris 06, 75005 Paris, France. ⁶Inserm UMR 1127, 75013 Paris, France. ⁷CNRS UMR 7225, 75013 Paris, France. ⁸Program in Neuroscience, Department of Neurobiology, Harvard Medical School, Boston, MA 02115, USA. ⁹Department of Molecular and Cellular Biology, Harvard University, Cambridge, MA 02138, USA. ¹⁰Department of Neuroscience, Physiology & Pharmacology, University College London, London WC1E 6BT, UK. ¹¹Present address: Laboratory of Neural Systems, Rockefeller University, New York, NY 10065, USA. Sébastien Wolf and Alexis M. Dubreuil contributed equally to this work. Correspondence and requests for materials should be addressed to G.D. (email: georges.debregeas@upmc.fr)</footnote>
To survive and thrive, motile organisms use sensory cues to navigate towards environments where they are more likely to avoid predators, obtain food or find mates. Efficient goal-directed locomotion requires closed-loop coordination between motor action and sensory perception. Each movement induces a new sensory signal, which in turn modulates the forthcoming motor output. This mechanism is at play in a number of goal-directed behaviours, in organisms ranging from bacteria¹ to nematodes², ³ and insects⁴, ⁵, but also among humans⁶. Numerous models have been proposed to account for this complex-coordinated motion, but to date no data are available to understand how these behavioural strategies might be implemented at the circuit level in the vertebrate brain.

Here, we take advantage of the accessibility of zebrafish larvae to whole-brain imaging⁷⁻⁹ to investigate the neural sensorimotor computation underlying phototaxis. This behaviour, which drives the animal towards illuminated regions, is already present at 5 days post-fertilisation and is thus likely to be hard-wired in the larval brain¹⁰⁻¹². To obtain information regarding the direction of a light source, larvae use two complementary strategies: stereo-

visual comparison¹² and spatio-temporal sampling¹³. The first mode relies on the difference in instantaneous perceived intensity at two different angles to infer the direction of the source. In the second mode, the illumination spatial gradient is extracted from two successive samplings obtained before and after a gaze-reorienting movement. This latter approach requires that the visual and motor information are integrated in a timely fashion.

We thus postulated the existence of a central neural circuit that would drive spontaneous gaze shift while integrating unilateral and bilateral changes in illumination so as to bias reorienting bouts towards a light source. We first establish, through behavioural assays, that the gaze and turning-bout orientations are robustly coordinated, and that the statistics of gaze orientation are biased towards illuminated regions. We then use volumetric functional imaging and optogenetic activation to identify a bilaterally distributed neuronal ensemble in the rostral hindbrain that appears to be a strong candidate for the control of spontaneous gaze dynamics. We further investigate how the self-oscillatory dynamics of this population are modulated by

<figure><img src="image_3.png" /><figcaption>**Fig. 1** Behavioural assays of ocular-saccade-turning-bout coordination and light-induced gaze bias. **a** Definition of the eye and tail kinematic parameters. The larva's tail and eyes are free. The gaze angle, $\theta_{gaze}$, is defined as the mean orientation of both eyes. The parameter *m* characterises the instantaneous tail deflection (Supplementary Methods). **b–d** Gaze dynamics. **b** Example time-traces of the eye and gaze angles. **c** Probability distribution function (PDF) of the gaze angle, normalised by its characteristic range (Supplementary Methods), for one fish (*solid line*) and for *N* = 29 fish (*dashed line*). **d** PDF of the delay $\tau$ between successive reorienting saccades for one fish. **e–i** Ocular-saccade-tail-beat coordination. **e** Gaze angle and tail deflection signals. **f** Individual tail-beats turning score *M*, defined as the integral of *m*(*t*) over the swim-bout (Supplementary Methods), vs. the normalised gaze angle *g* (3681 tail-beats, *N* = 11 fish). **g** Histograms of *M* for leftward (**red**) and rightward (**blue**) gaze orientation. The central part of the distribution (standard deviation $\sigma$) is used to assess the significance of the tail-bout orientational bias. **h** Conditional probability of the gaze to be orientated to the left (**red**) or right (**blue**) given the tail-beat turning score *M* (3681 tail-beats, *N* = 11 fish). The *shaded region* corresponds to the s.e.m. **i** Mean peri-saccadic tail deflection signal averaged over leftward (**blue**) and rightward (**red**) saccades. **j, k** Stereo-visual phototaxis. **j** Scheme of the experimental assay. **k** PDF of the normalised gaze during periods of unilateral stimulation for animals displaying positive phototaxis (*N* = 18 fish). Red and blue curves correspond to illumination on the left and right eye, respectively. **Dashed curve** indicates bilaterally symmetric illumination. **I, m** Spatio-temporal gaze phototaxis. **I** Scheme of the virtual-reality assay. The fish is submitted to a uniform illumination whose intensity is driven in real-time by the animal's gaze angle. **m** PDF of the normalised gaze angle for virtual leftward (**red**) and rightward (**blue**) illumination (*N* = 13 fish). The *dashed curve* corresponds to the neutral runs (constant illumination)</figcaption></figure>
bilateral and unilateral changes in illumination. Finally, we develop a rate model of this circuit that reproduces most of our observations and provides the first comprehensive description of how phototaxis can be implemented in the vertebrate brain.

## Results

**Visually induced modulation of gaze shift dynamics.** Larvae can redirect their gaze by triggering coherent angular excursions of both eyes—a process called a saccade—or through whole-body reorientation. We examined the endogenous temporal structure

<figure><img src="image_4.png" /></figure>

<figure><img src="image_5.png" /></figure>

<figure><img src="image_6.png" /></figure>

<figure><img src="image_7.png" /></figure>

<figure><img src="image_8.png" /></figure>

<figure><img src="image_9.png" /></figure>
of both processes by monitoring tail deflections and eye orientations in the absence of visual cues in larvae partially restrained in agarose. Spontaneous ocular saccades in zebrafish larvae are highly stereotyped (Fig. 1a–d; Supplementary Fig. 1), with a quasi-periodic alternation between leftward and rightward gaze periods. This property is reflected by the quasi-bimodal distribution of gaze orientations and a distribution of delays between successive reorientations peaked at ~12 s (12.2 ± 3.5 s, mean ± std, N = 29). The orientations of the gaze and the turning bouts were found to be strongly correlated (Fig. 1e–i; Supplementary Fig. 1 and Supplementary Movie 1). We observed that over 85% of the tail-beats that could be unequivocally classified as an attempted turning bout were oriented in the direction of the gaze. Moreover, a large fraction (60.2%) of these bouts occurred within the first second following the onset of an ipsiversive saccade. This coordination mechanism was true for both large-amplitude reorienting saccades that drove the right-left alternation of gaze direction, and for low-amplitude secondary saccades that maintained the gaze to the right or to the left by compensating for slow ocular drift (Supplementarty Fig. 1d–g).

These observations suggest that a unique command circuit may drive ocular saccades and set the direction of successive tail-beats, such that the gaze sequence may be viewed as a proxy for fish reorienting dynamics. We thus posited that phototaxis should manifest as a bias in the animal gaze-angle distribution towards illuminated regions. We tested this hypothesis by replicating, in agarose-restrained animals, two visual stimulation protocols known to evoke phototaxis in freely swimming larvae while monitoring gaze dynamics<sup>12, 13</sup>. Visual stimulation was obtained by projecting two LEDs onto a screen below the animal, each delivering uniform illumination to one eye's field of view (Supplementary Methods).

We first submitted the larva to a 1 min period of whole-field (bilateral) illumination followed by a step decrement of the intensity to one eye, whereas illumination to the other eye was held constant (Fig. 1j; Supplementary Fig. 2). The unilateral illumination period was maintained for 30 s, and the sequence was then repeated. In 67% of the fish (18 of 27), we observed that the gaze orientation was significantly biased towards the more illuminated side during unilateral illumination periods (Fig. 1k). This process was reflected in the trial-averaged post-extinction gaze sequence, which exhibited a transient drift toward the illuminated region (Supplementary Fig. 2f). This bias was associated with a 27 ± 3.4% (mean ± std) increase in fixation time towards the illuminated area. In total, a significant phototactic behaviour was observed in 77% of the fish, yet 10% displayed negative phototaxis, in accord with the experiments performed in freely swimming configurations<sup>12</sup>. We confirmed that, owing to gaze-tail coordination, this light-induced gaze bias resulted in a turning bias of the animal toward the light by

performing similar experiments while simultaneously monitoring both the eyes and tail movements (Supplementary Fig. 2k–m).

In a second approach, we developed a virtual-reality phototaxis assay in which the animal had access to spatial cues through spatio-temporal probing only. Both eyes were exposed to the same whole-field illumination at an intensity that was locked in real-time to the gaze orientation (Fig. 1l; Supplementary Fig. 2i–j). The illumination was thus at its maximum when the gaze was oriented to one side, and at its minimum for the other side. A significant light-induced bias of the gaze orientation was observed in 85% of the fish (p < 0.05, N = 11 of 13). All responsive larvae showed an increased fixation time towards the brighter direction, consistent with a positive phototactic behaviour (Fig. 1m).

In both assays, the imposed spatial light gradient did not trigger a systematic and immediate gaze shift. Instead, it induced a statistical bias of the spontaneous saccadic dynamics whose net result was to increase the relative duration of gaze fixations towards the brightest region.

**Functional mapping of gaze-tuned neuronal populations.**
These observations suggested that the saccadic dynamics play a central role in phototaxis by enabling a sequential sampling of illumination gradients through spontaneous gaze shifts, while driving the reorienting dynamics via gaze-tail coordination. We thus sought to identify the saccade command circuit. Ocular saccades in zebrafish have been studied mostly as a model of neural integration<sup>14–16</sup>. The accessibility of this vertebrate model to optogenetic techniques allows one to examine with unmatched precision how a transient neural command that rapidly brings the eyes into a desired position can be transformed into a sustained signal to maintain a fixed eye position<sup>17</sup>. However, in contrast with mammals<sup>18</sup>, the upstream command circuit that drives the rhythmic alternation between leftward and rightward saccades in zebrafish remains elusive<sup>19</sup>.

Our approach to identify the saccade command neuronal population consisted of recording large fractions of the brain using light-sheet functional imaging in animals expressing calcium reporter in nearly every neuron (Tg(elavl3:GCaMP6f)) while monitoring eye dynamics (Fig. 2a; Supplementary Movie 2). We restricted our analysis to the hindbrain and the caudal midbrain, where saccade-induced distortions of the brain tissues remained small enough to enable consistent signal extraction. We implemented a multilinear regression approach to classify individual voxels based on their tuning with respect to the angular position and velocity signals of the eyes<sup>20</sup> (Supplementary Methods). We then applied a non-rigid registration method to align these functional maps onto a single reference brain obtained by averaging four different samples imaged using the

**Fig. 2** Regression-based identification of gaze-tuned neuronal populations. **a** Schematic of the experimental setup and regression analysis. Volumetric recordings on GCaMP6f-expressing larvae were performed using one-photon light-sheet imaging (20 sections per stack, 1 stack per second) while monitoring saccadic dynamics. Voxel-by-voxel regression with the eye orientation signals were used to produce position-tuned and velocity-tuned 3D maps. Notice that the two maps overlap in a small subset of voxels (the two 3D maps are displayed separately in Supplementary Movie 3). **b, c** Dorso-ventral projection view and sagittal sections along two planes of the 3D functional map (mean over 7 fish) showing neuronal populations whose activity is tuned to the gaze orientation (blue and red) and to the gaze angular velocity (green and yellow). The voxel colour encodes the Z-score values obtained through multilinear regression (Supplementary Methods). Te, telencephalon; OT, optic tectum; Cb, cerebellum; Hb, hindbrain; RH, rhombomere. The grey dotted rectangle indicates the effective recorded volume. **d** Coronal sections along the dotted lines shown in (c) for one sample of the four regions delineated in (b). Region 1 encompasses the saccade generator burst neurons (SGBN); region 2 is the velocity-position neural integrator (VPNI); region 3 and 4 constitute the newly identified gaze-tuned rostral hindbrain population. It consists of four bilaterally symmetric clusters tuned to the ipsiversive gaze orientation (region 3) and 2 more rostral clusters tuned to the contraversive gaze angle (region 4). **e** Example ΔF/F time-traces for these four regions. The red and yellow (respectively blue and green) traces correspond to the sub-populations tuned to leftward (respectively rightward) gaze orientation. The grey lines are the gaze angle traces (−θ<sub>gaze</sub>: solid line, θ<sub>gaze</sub>: dashed line). **f** Corresponding mean peri-saccade ΔF/F signals, computed over the leftward (red) and rightward (blue) saccades. Grey lines are peri-saccadic signals for individual saccades
one-photon light-sheet microscope at high spatial resolution. A zebrafish brain atlas²¹ was finally used to anatomically localise the various neuronal clusters that displayed robust tuning with the gaze position and velocity (Fig. 2b, c; Supplementary Movie 3).

The most prominent velocity-tuned neuronal assemblies were located in two bilaterally symmetric clusters in rhombo-meres 4–6 (rh 4–6, Fig. 2d–f, region 1). These populations correspond to the previously identified saccade generator burst neurons²² (SGBN). Each lateral cluster triggers ipsiversive saccades through direct activation of two oculomotor nuclei (abducens and oculomotor nucleus III). Position-tuned neurons

were found in the caudal hindbrain in a region consistent with the previously described velocity-position neural integrator²⁰ (VPNI, Fig. 2d–f, region 2). These analysis allowed us to further discover the existence of position-tuned clusters in the rostral hindbrain (rh 2–3) in the form of four stripes bilaterally distributed on each side of the midline (Fig. 2d–f, region 3). These clusters systematically displayed increased and prolonged activity after every ipsiversive saccade, whether reorienting or secondary (Supplementary Fig. 3). We also found two symmetric clusters, lying at the rostral border of the hindbrain (rh 1) ventral to the cerebellum, that were strongly correlated with contra-versive gaze orientation (Fig. 2d–f, region 4). Notice that the

<figure><img src="image_10.png" /></figure>
same gaze-tuned neuronal clusters in the rostral hindbrain were independently identified by Alex Ramirez and Emre Aksay in a yet unpublished study.

**Identifying a putative saccade command circuit.** The morphology and anatomical location of this newly identified gaze-tuned ensemble in the rostral hindbrain (the four stripes located in rh 2-3) appeared very similar to the self-oscillating circuit identified by Ahrens et al. in eyes-fixed experiments based on activity correlation analysis²³ (the so-called hindbrain oscillator, or HBO). Consistent with these findings, we observed that this particular neuronal population displayed sustained antiphasic dynamics, with each side activated in alternation, in recordings where the saccades were abolished through eye fixation in agar (Fig. 3a–g). To properly delineate the neuronal population engaged in these self-generated oscillations, which we refer to as the HBO, we first approximated the oscillatory signal using a small subset of neurons and then computed the tuning of each voxel to this reference trace (Supplementary Methods; Supplementary Fig. 4). This functional criterion yields a neuronal map that essentially encompasses the gaze-tuned circuit in rh 1-3 as formerly identified through regression with the gaze signal (Fig. 3a, b; Supplementary Fig. 5). In more caudal regions of the hindbrain (SGBN and VPNI areas, rh4-7), a small number of neurons also participated in these self-oscillatory dynamics. We analysed the temporal structure of the HBO’s endogenous oscillations in eye-fixed conditions by running the Hilbert transform on the differential signal (left minus right circuit activity, Fig. 3e–g). We found the period distribution to be peaked at ~20 s (19.9 ± 4.8 s mean ± std, N = 8 fish), i.e. close to the spontaneous saccadic period.

The quasi-periodic nature of the saccadic dynamics suggests the existence of a circuit, akin to a central pattern generator, capable of maintaining oscillations with a period on the order of 20 s in the absence of rhythmic sensory or proprioceptive inputs. The HBO constitutes the best candidate for this saccade command circuit. This putative role was found to be consistent with optogenetic assays using larvae expressing ChR2 pan-neurally (Fig. 3h–l; Supplementary Fig. 6). We delivered series of 2.75 s-long light pulses over 47 × 57 µm² brain areas, alternately on either side of the midline with a 18 s period (one pulse every 9 s), while monitoring saccades (Fig. 3j). Each pair of bilaterally symmetric regions was tested five times before the targeted regions were relocated to eventually probe a large fraction of the hindbrain encompassing both the HBO and the SGBN. As previously reported²², activation of the SGBN (rh 4–6) consistently entrained the saccadic dynamics (8 fish of 19, see Supplementary Methods

for details on the quantification of the response). For these responsive fish, activation of the hindbrain in the rh 2-3 region evoked ipsiversive saccades with comparable efficiency (Fig. 3l). These responses could not result from direct activation of the oculomotor nuclei, which lie immediately rostral to rh 1 but drive contraversive saccades. In contrast, optogenetic activation of the two most rostral regions of the oscillator, located in rh 1, failed to evoke conjugated saccades, which might indicate that these two assemblies lie downstream of the HBO’s gaze-driving neurons. Finally, a small area in the caudal midbrain was found to trigger ipsiversive saccades in two larvae.

Careful examination of the functional imaging data in eyes-free preparations offers hints regarding a putative connectivity map between the HBO and the SGBN. We identified two small clusters in rh 7 systematically activated 2–3 s prior to the saccade onset (Supplementary Fig. 3a–c), which are thus analogous to the so-called long-lead burst neurons in the mammalian saccadic circuit²⁴. Such a functional trait can be understood within the assumption that they receive inhibitory inputs from the contralateral HBO circuit, whose spike-rate consistently decays before the saccade onset. In contrast, the ipsilateral HBO circuit remained silent until the saccade onset, which precludes the possibility that it drives, via excitatory inputs, these long-lead burst neurons. Our observations further indicate that the HBO may receive ascending ipsilateral signals from saccadic pre-motor centres (efference copy). When two successive saccades occurred in the same direction, the second one was systematically followed by a rebound of the HBO active module (Supplementary Fig. 3d, e). This process cannot result from the reciprocal inhibitory coupling with the contralateral HBO module²⁵, as the latter remains silent during such phases. Although more work will be needed to definitely establish that the HBO drives spontaneous saccades, these various observations suggest a neural architecture of the saccadic command circuit as sketched in Supplementary Fig. 3f.

**The hindbrain oscillator responds to visual stimuli.** Dunn et al.²⁵ recently reported that the HBO left and right activity biased the orientation of fictive turning bouts to the right and the left, respectively. This finding is in line with our hypothesis that a unique command circuit controls both turning-bout orientation and spontaneous ocular saccades. The resulting gaze-tail coordination process, analogous to the well-documented head-eye coordination in vertebrates²⁶, ²⁷, explains why the orientation of successive turning bouts exhibits a ~10 s autocorrelation decay in freely swimming larvae¹³, as this value corresponds to the typical period between successive reorienting saccades.

**Fig. 3** Self-oscillatory dynamics and optogenetically evoked saccades. **a** Dorso-ventral projection of the gaze-tuned (top-half, N = 7 fish) and self-oscillatory hindbrain population (bottom-half, N = 8 eye-fixed fish). In the latter, the colour encodes tuning to the left (red) and right (blue) pre-selected neuronal clusters, revealing strong antiphasic activity (Supplementary Methods). The two functional maps were registered on the same reference brain to enable side-by-side comparison. The rectangle indicates the region of the rostral hindbrain gaze-tuned population. **b** Coronal sections of the self-oscillatory population along the dotted lines in the projected view. **c** Pearson correlation matrix of the neurons engaged in the self-oscillatory dynamics (616 neurons). The matrix was reordered to reveal two highly correlated (and reciprocally anti-correlated) clusters. **d** Activity of the left vs. right populations (r = −0.43). **e** Example ΔF/F traces of the left and right groups (top), and of the differential signal (bottom). The grey dotted line shows cos(φ(t))), where φ(t) is the oscillatory phase extracted using Hilbert’s transform. **f** ΔF/F of the right (blue) and left (red) circuits as a function of the oscillatory phase. The blue and red lines correspond to the mean values. **g** PDF of the instantaneous oscillation period. **h-k** Optogenetic activation of ocular saccades. **h** Schematic of the optogenetic stimulation protocol. **i Top:** projective view of the previously mapped gaze-tuned regions. **Bottom:** Z-score map of saccadic entrainment by optogenetic activation averaged over 8 fish (Supplementary Methods). **j** Mean peri-stimulation normalised gaze signal for three regions: the rostral HBO (rh 2-3), the SGBN (rh 5), a control region (rh 7). The responses of four different fish are shown, and the associated targeted areas are indicated in (i). The 2.75 s-long stimulation periods are indicated by the grey area. **k** Example gaze signals upon periodic left or right optogenetic stimulation for two region pairs in rh 2-3 and rh 5. **l** Profile plot of the mean optogenetic Z-score along the rostro-caudal axis (black), overlaid on the ipsiversive (red) and contraversive (blue) gaze-tuned Z-score yellow curve indicates the ipsiversive velocity-tuned Z-score. Ipsiversive saccades are evoked with comparable efficiency by targeting the SGBN (rh 5) or the rostral HBO (rh 2-3)
<figure><img src="image_11.png" /><figcaption>**Fig. 4** Response of the HBO to asymmetric and symmetric visual stimuli. **a** Schematic of the two-photon light-sheet imaging setup with stereo-visual stimulation. **b** Comparison of the gaze-tuned and visual response projection maps. **Top:** the red and blue colours encode leftward and rightward gaze-tuning Z-score, respectively (N = 7 fish). **Bottom:** the red and blue colours encode the visual response Z-score (Supplementary Methods) to unilateral stimulation on the left and right eye, respectively (N = 11 fish). The HBO circuit (white rectangle) is engaged in both sensory and motor processing. **c** Coronal sections of the visual response map along the two dotted lines shown in (a). In (b) the dotted rectangle delineates the recorded volume. **d** Alternated unilateral visual stimulation. **e** Example traces of left and right HBO. **f** Trial-averaged response of the HBO over 20 stimulation periods. Shaded regions correspond to left (dark grey) and right (pale grey) illumination. **g** Bilaterally symmetric 100 ms-long flashes. **h** Example traces of the right and left HBO. The grey lines indicate the flashes. **i** Trial-averaged flash-induced responses of each subpopulation (100 flashes). **j** Left vs. right HBO responses (1311 flashes, N = 12 fish, r = -0.5). **k** Phase-dependent response of each subpopulation to symmetric flashes. **l** Time-evolution of the HBO oscillatory phase φ(t). The slope of the green line corresponds to the stimulation frequency (period T<sub>stim</sub> = 10 s). The HBO is entrained at half the frequency of the stimulation (period 2T<sub>stim</sub>). **m** PDF of the HBO stimulation phase offset δφ. The inset shows the PDF of the HBO phase at times where the flashes were delivered. Notice that in (f), (i) and (k), the error bars indicate the s.e.m</figcaption></figure>
<figure><img src="image_12.png" /><figcaption>**Fig. 5** Phase-locking and frequency entrainment of the HBO by periodic visual stimuli. **a** Example HBO signals during symmetric visual stimulus presentation consisting of alternating light-ON and light-OFF periods of similar duration. Difference of the left and right HBO signals for five stimulation frequencies. Light-ON periods are indicated by the **shaded areas**. **b** Time-evolution of the HBO phase signal demonstrating frequency entrainment by periodic visual stimuli. The **green line** indicates the phase evolution of the stimulation. The HBO is entrained at half the frequency for $T_{\text{stim}} = 10$ s, and twice the frequency for $T_{\text{stim}} = 60$ s. **c** The HBO stimulation phase offset displays a non-uniform distribution, revealing phase-locking (Rayleigh test, $p < 0.01$). **d-f** Frequency entrainment by symmetric stimulation. **d** Symmetric stimulation schematic. **e** HBO oscillatory period $T_{\text{osc}}$ as a function of the stimulation period $T_{\text{stim}}$ ($N = 5$ fish, **red points** show the data presented in (**a-c**)). The **dotted line** shows the $T_{\text{osc}} = T_{\text{stim}}$ entrainment curve. **f** Entrainment ratio $T_{\text{osc}}/T_{\text{stim}}$ as a function of $T_{\text{stim}}$ ($N = 5$ fish). **g-i** Frequency entrainment by asymmetric stimulation ($N = 11$ fish). The **shaded areas** in (**f** and **i**) are guides to the eye showing the approximate domain of one-to-one frequency entrainment in each configuration. In (**e**, **f**) and (**h**, **i**), the **error bars** represent the s.e.m</figcaption></figure>
<figure><img src="image_13.png" /><figcaption>d Symmetric flash</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>e Amplitude response</figcaption></figure>

<figure><img src="image_15.png" /></figure>

<figure><img src="image_16.png" /></figure>

<figure><img src="image_17.png" /><figcaption>h Strategy I: Stereo-visual comparison</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>i Strategy II: Spatio-temporal sampling</figcaption></figure>

<figure><img src="image_19.png" /></figure>

**Fig. 6** A rate model of the HBO's visually entrained dynamics leading to phototaxis. **a, b** Schematic of HBO network connectivity. Visual stimuli are relayed to the HBO via the ON and OFF pathways, as detailed in (**b**). The HBO activity controls gaze shifts via ocular saccades and turning bouts. Self-oscillatory dynamics result from the recurrent excitation ($W_E$), reciprocal inhibition ($W_R$) and adaptation currents (Supplementary Methods). **c** Example traces of the endogenous antiphasic oscillations of the left and right HBO in the absence of varying visual stimulation (arbitrary units). **d** Response of the HBO to a symmetric flash. The shaded areas display the difference in activity induced by the flash, from which we extract an amplitude response for each circuit and a flash-induced phase offset. **e, f** Mean amplitude and phase response to symmetric flashes as a function of the HBO phase at stimulation. **g** Frequency entrainment curve for symmetric periodic stimulations (light-ON-light-OFF alternation). The ratio of the oscillatory over the stimulation periods ($T_{osc}/T_{stim}$) is plotted as a function of $T_{stim}$ normalised by the endogenous period $T_{endo}$. **h** Numerical implementation of a stereo-visual comparison strategy for phototaxis. Each eye receives a different intensity ($I_L(\theta_s)$ and $I_R(\theta_s)$) set by the light source azimuth $\theta_s$. The red and blue curves show, as a function of $\theta_s$, the time fraction for which $r_L > r_R$ and $r_R > r_L$, respectively. The light source reinforces the ipsilateral circuit leading to orientational positive phototaxis. **i** Spatio-temporal sampling strategy. Both eyes receive a similar intensity, which depends on the relative orientation of the gaze $\theta_{gaze}$ and the light source azimuth $\theta_s$. The gaze orientation oscillates between two values according to $\theta_{gaze} = \text{sign}(r_L - r_R) \times 15^\circ$. As in (**h**), the left vs. right bias of the HBO as a function of $\theta_s$ is consistent with positive phototaxis

To evaluate the HBO's putative role in driving the phototactic behaviour, we sought to investigate whether its endogenous dynamics could be visually biased. We thus successively probed its response to asymmetric (unilateral illumination of one eye) and symmetric (similar illumination on both eyes) visual stimuli (Fig. 4). To prevent visual perturbations by the light-sheet, these experiments were carried out using two-photon excitation, i.e. with an infrared source that is invisible to the fish²⁸. In a first series of experiments, we alternately illuminated each eye for 15 s while performing brain-wide functional imaging. The associated response maps indicated that the most prominent visually sensitive clusters in the hindbrain corresponded to the HBO

(Fig. 4b–f; Supplementary Fig. 5b). The right HBO, whose activity is associated with a rightward reorienting bias, was activated when the right eye was stimulated, and vice-versa. These unilateral visual responses are consistent with a stereo-visual positive phototaxis mechanism. In 1 of 11 fish, however, we found a reverse response, i.e. the visual stimulation elicited activity in the contralateral HBO. This observation parallels, and may explain, the 10% of fish found to display negative phototaxis in the behavioural assays.

Phototaxis has been shown to implicate OFF retinal ganglion cells, i.e. neurons activated upon light decrement¹². We thus asked whether the visually evoked transient of the left or right
HBO was driven by the stimulus onset (light-on) on the ipsilateral eye, the stimulus offset (light-off) on the contralateral eye, or both. To answer this question, we monitored the HBO dynamics while exposing one eye to alternating on-off illumination, the other being maintained at constant illumination. We found that light-on and light-off stimuli induced a sharp increase in activity in the ipsilateral and contralateral sub-populations, respectively. This indicates that the ON and OFF pathways both contribute to driving the HBO (Supplementary Fig. 7, *N* = 8 fish).

In a second experiment, we investigated the HBO response to bilateral illumination by delivering a series of 100 ms-long flashes simultaneously to both eyes with a 10 s inter-flash period (Fig. 4g, h). Both left and right HBO displayed a significant response as evidenced by the trial-averaged peri-stimulus signal (Fig. 4i, *n* = 1311 flashes, *N* = 12 fish, Supplementary Fig. 7d, e), but the across-trials dispersion appeared surprisingly large (coefficient of variation 170%). The visual responses of the left and right HBO were strongly anti-correlated (*r* = −0.5) such that a given flash seemed to stochastically evoke a response in either one of them (Fig. 4j). To evaluate whether this apparent stochasticity may reflect a state-dependent sensitivity of the HBO, we examined how the stimulus-evoked transient depended on the particular phase of the oscillation at which the stimulus was delivered. We used the Hilbert transform to extract the phase φ(t) of the HBO oscillation. We then computed the derivative of the left and right HBO signals at all times corresponding to a given phase, separating those at which a stimulus had been delivered from the times when the oscillation was running free. We then subtracted the means of both groups to extract the sole contribution of the stimulus to the HBO transient dynamics. This analysis yielded a phase-dependent response curve for each left and right HBO (Fig. 4k). It revealed that each subpopulation is responsive to the visual stimulus within a particular phase range and is essentially unresponsive for the rest of the cycle. More specifically, each flash selectively reinforces the cluster that is already active or about to become active after a period of rest. The transition between left-right HBO activity being associated with gaze shift events, such a phase-dependent response curve can be interpreted as a motor-related gating mechanism. In this view, each subpopulation selectively integrates light increments generated by ipsiversive saccades as expected during spatio-temporal sampling.

**HBO entrainment by periodic uniform visual stimuli.** In biological and physical oscillators, phase-dependent responses can be revealed through phase-locking and frequency entrainment by periodic forcing<sup>29–31</sup>. Consistently, we observed that the HBO oscillation exhibited a mean period of 20 s in the symmetric stimulation experiments, i.e. precisely twice the stimulation period *T*<sub>stim</sub> = 10 s (Fig. 4l, *T*<sub>osc</sub> = 20.5 ± 1.4 s, *N* = 12 fish). Furthermore, the phase offset between the HBO and the stimulus signal, defined as *δφ(t) = φ(t) − π* *t*/*T*<sub>stim</sub>, displayed a marked bimodality, with two peaks located at 0 and π (Fig. 4m, Rayleigh test, *p* < 0.01, Supplementary Fig. 8a). This indicates that visual stimuli induce a phase-shift in the HBO oscillations such that the flashes tend to coincide with successive right-to-left and left-to-right transitions (Fig. 4m inset).

We suspected that this period-doubling mechanism ensued from the particular choice of the stimulation period, which is close to half the HBO endogenous period *T*<sub>endo</sub>. We sought to explore how this synchronization process varied with the stimulation *T*<sub>stim</sub>. To guarantee that the mean illumination was independent of the stimulation period, we exposed the fish to a series of alternating ON-OFF illuminations at six frequencies

(20 periods each, 10 s < *T*<sub>stim</sub> < 60 s) separated by 100 s-long periods of constant illumination (Fig. 5a). For each sequence, we extracted the mean oscillation period *T*<sub>osc</sub> and the phase-offset distribution (Fig. 5b, c). In all tested visually responsive fish (*N* = 5 of 7), this analysis revealed the existence of an entrainment plateau at intermediate stimulation periods (20 s < *T*<sub>stim</sub> < 40 s) for which the HBO frequency was controlled by the stimulation period (*T*<sub>osc</sub>/*T*<sub>stim</sub> ≅ 1) and the phase-offset distribution was strongly non-uniform (Fig. 5d–f, Rayleigh test, *p* < 0.01). At higher and lower frequencies, the entrainment ratio *T*<sub>osc</sub>/*T*<sub>stim</sub> was close to 2 and 0.5, respectively. The same experiments were replicated for asymmetric stimuli and yielded qualitatively similar results, albeit with a more pronounced phase-locking and a more extended entrainment plateau (Fig. 5g–i, *N* = 11, Supplementary Fig. 8).

**A stochastic neural model of phototaxis.** A rate model approach<sup>32</sup> was used to model the oscillatory dynamics of the HBO and its visually evoked responses based on the connectivity architecture suggested by our experimental observations (Fig. 6a). We described the HBO as a half-centred oscillator consisting of two symmetric modules with recurrent excitation, reciprocal inhibition, and adaptation currents (Supplementary Methods). Such a simple model, derived from a spiking, conductance-based model, has been proposed for cortical circuits to account for the phenomenology of perceptual bi-stability<sup>33, 34</sup>. This description is consistent with the neurotransmitter identity of the different clusters that participate in the self-oscillatory dynamics<sup>25</sup>. The medial clusters of the HBO were identified as glutamatergic and the lateral clusters as primarily GABAergic, reflecting the hindbrain columnar organisation of the neurotransmitter classes<sup>35</sup>.

The model parameters were adjusted to best reproduce the self-sustained quasi-periodic oscillations observed in the absence of visual input (Fig. 6c; Supplementary Fig. 9). Visual inputs were assumed to be relayed to the HBO in the simplest way consistent with the proposed connectivity (Fig. 6b). A step increase in the illumination of the right eye was associated with a burst of current in the right circuit, followed by a plateau, whereas a step decrease in the illumination induced a transient current in the left circuit to account for the OFF pathway contribution. We then numerically implemented the stimulation protocols used in the functional imaging experiments. The left and right circuit responded to ipsilateral asymmetric visual stimuli, but we further observed a phase-dependent intensity response curve to symmetric flashes in qualitative agreement with its experimental counterpart (Figs. 4k and 6d, e). The model allowed us to reinterpret the latter result in terms of a phase-response curve (PRC). Within this scheme, the effect of a stimulus is to evoke a phase offset, i.e. a transient slowing down or speeding up of the oscillatory dynamics. For each phase, we thus computed the visually induced phase delay Δφ by comparing the phase evolution after stimulation and in the free-running (without stimulation) regime (Fig. 6f). The resulting π-periodic PRC provides a direct interpretation of the phase-locking mechanism around the phases π/2 and 3π/2, where the PRC displays a negative slope<sup>30</sup>. Consistently, a phase-locking mechanism was observed with an entrainment plateau around the endogenous oscillation frequency (Fig. 6g). However, for this process to quantitatively compare with the experimental data, the current noise had to be set at a relatively low value (Supplementary Fig. 10).

We sought to evaluate whether this minimal neural model could account for the orientational phototactic behaviour under the assumption that an imbalance in the HBO left vs. right
activity distribution may be viewed as a proxy for the statistical orientational bias in the animal locomotion²⁵. We considered configurations in which a distant light source was oriented at an angle $\theta_s$ with respect to the animal's rostro-caudal axis. The total illumination impinging on each eye was taken as a slowly varying function of $\theta_s$, reflecting the large visual field of view of the zebrafish, with a maximum at $\theta_s = 80°$ for the right eye (Fig. 6h; Supplementary Methods). We successively considered the stereo-visual comparison and spatio-temporal sampling phototactic strategies. In the first case, we examined the sole effect of a continuous unbalanced bilateral illumination. For each angle $\theta_s$, the illumination on each eye was converted into a constant input current on the ipsilateral subcircuit. We then numerically computed the HBO dynamics and compared the mean left vs. right activity. We found the HBO oscillations to be statistically biased towards the subnetwork ipsilateral to the light source. This was assessed by comparing both the time fraction during which one circuit was more active than the other (Fig. 6h) and the mean activities of the two circuits (Supplementary Fig. 11). Within the assumption that such an imbalance reflects a reorienting bias²⁵, this result appears consistent with a positive phototactic mechanism.

In a second approach, we focused on the spatio-temporal sampling strategy (Fig. 6i). We imposed identical illumination on both eyes at all times so as to provide no explicit spatial cue to the circuit. The stimulus intensity was assumed to be a slowly decreasing function of the gaze orientation relative to the light source. We posited that each left-to-right or right-to-left transition of the HBO corresponded to a rightward or leftward gaze shift of amplitude 30°, respectively. This ±15° gaze oscillation in turn elicited a series of abrupt changes in the perceived stimulus. This procedure yielded a left vs. right activity bias that depended on the light source azimuth (Fig. 6i; Supplementary Fig. 11) and was again consistent with a positive phototactic behaviour.

## Discussion

A central goal in neuroscience is to decipher the neural computation underlying the execution of natural tasks. In this respect, whole-brain functional imaging constitutes a game-changing technique because it allows one to systematically map entire neuronal populations that respond to a given sensory stimulus⁷, ²⁸, ³⁶ or correlate with a particular motor pattern²⁰, ²⁵. Here, this strategy was taken one step further: we used three distinct functional properties as joint criteria to identify a sensorimotor hub likely to play a key role for phototaxis. On the basis of behavioural assays, we reasoned that there should exist a circuit that both sets the pace of spontaneous saccades and integrates visual stimuli. We thus successively delineated three neuronal populations that (i) correlated with the gaze signal during spontaneous saccades, (ii) displayed self-sustained oscillating activity in eye-fixed configurations, and (iii) responded to unilateral visual stimulation. We then used a morphological registration algorithm to demonstrate the existence of a well-defined intersecting neuronal ensemble in the rostral hindbrain, identified as the HBO, that combines all three functionalities (Supplementary Movie 4).

Using a rate model, we showed that the HBO's phase-dependent visual sensitivity suffices to explain the tendency of larvae to reorient towards illuminated areas using both stereo-visual comparison and spatio-temporal sampling. The proposed sensorimotor processing leading to phototaxis can be summarised as follows: (i) the HBO self-sustained oscillations drive a quasi-periodic sequence of gaze shifts that allow the animal to actively explore the light angular gradient; (ii)

asymmetric visual stimuli enhance the activity of the HBO clusters ipsilateral to the eye that receives the larger illumination, which in turn biases the fish reorientation towards the light source; and (iii) a gaze shift-induced light increment reinforces the active HBO subpopulation (ipsilateral to the new gaze direction), thus delaying further left-right transition. Over multiple cycles, this process yields a statistical bias of the fish turning probability towards the brightest region.

In foveate species, ocular saccades enable detailed visual exploration by sequentially bringing different regions of the visual scene onto a small area of the retina (the fovea) where the resolving power is maximal³⁷. The present study suggests that saccades in afoveate species such as zebrafish may subserve a non-image forming visual function by allowing the animal to sequentially sample the light level at two distinct angles without the need to execute a whole-body reorientation. Within this scheme, the large stereotyped gaze shifts that characterize spontaneous saccades in zebrafish might be understood as a way to maximise the detected contrast in the context of weak illumination gradients.

The HBO presents striking similarities with central pattern generators (CPG). These specialized networks drive cyclic motor patterns underlying rhythmic behaviours such as locomotion, chewing, or breathing³⁸. Although they can operate in the absence of external sensory or proprioceptive inputs, the latter have an important role in regulating the circuit dynamics to produce behaviourally relevant motor output³⁹. Their action generally varies with the particular phase within the cycle at which they occur⁴⁰. The HBO differs from standard CPGs in the sense that it drives a pseudo-periodic motor pattern—the saccadic period displays significant variations from cycle to cycle—but also controls the sequence of discrete turning-bout orientations. By modulating the rhythmic HBO oscillations, the visual inputs thus modulate the temporal pattern of reorienting movements, effectively biasing the animal's trajectory towards brightest areas over multiple cycles. It has been recently demonstrated, in *Drosophila* larvae, that sensorimotor neurons can be engaged in distinct goal-directed behaviours⁴¹. It will thus be interesting to see whether other sensory information—chemical cues, water flow, temperature gradients, etc.—may also be relayed to the HBO, and how these multi-sensory cues are weighted in order for the larva to navigate towards the most favourable environments.

Beyond phototaxis, the sensorimotor processing operated by the HBO may also be examined in the broader context of active sensing. In vertebrates, including mammals, sensory perception—olfaction, touch, vision, etc.—generally rely on conjugated motor routines⁴², ⁴³ such as sniffing, whisking, eye saccades, etc. The rhythms of these motor patterns have been shown to entrain low-frequency neuronal oscillations in primary sensory cortices, which in turn modulate their sensitivity according to specific motor phases⁴⁴. This sensorimotor coordination has a key role in sensory processing. Given the generic nature of this neural mechanism, it will be exciting to further investigate whether the HBO oscillation may similarly drive, through afferent projections, rhythmic changes in sensitivity in sensory centres such that the olfactory bulb or the optic tectum.

**Data availability.** All data and codes used for the analysis are available from the authors on request.

Received: 18 August 2016 Accepted: 20 June 2017

Published online: 21 September 2017
## References

1. Berg, H. C. & Brown, D. A. Chemotaxis in *Escherichia coli* analysed by three-dimensional tracking. *Nature* **239**, 500–504 (1972).

2. Chalasani, S. H. et al. Dissecting a circuit for olfactory behaviour in *Caenorhabditis elegans*. *Nature* **450**, 63–70 (2007).

3. Ward, A., Liu, J., Feng, Z. & Xu, X. Z. S. Light-sensitive neurons and channels mediate phototaxis in C. elegans. *Nat. Neurosci.* **11**, 916–922 (2008).

4. Gomez-Marin, A., Stephens, G. J. & Louis, M. Active sampling and decision making in *Drosophila* chemotaxis. *Nat. Commun.* **2**, 441 (2011).

5. Gepner, R. et al. Computations underlying *Drosophila* photo-taxis, odor-taxis, and multi-sensory integration. *Elife* **4**, e06229 (2015).

6. Porter, J. et al. Mechanisms of scent-tracking in humans. *Nat. Neurosci.* **10**, 27–29 (2007).

7. Ahrens, M. B. et al. Brain-wide neuronal dynamics during motor adaptation in zebrafish. *Nature* **485**, 471–477 (2012).

8. Panier, T. et al. Fast functional imaging of multiple brain regions in intact zebrafish larvae using selective plane illumination microscopy. *Front. Neural Circuits* **7**, 65 (2013).

9. Feierstein, C. E., Portugues, R. & Orger, M. B. Seeing the whole picture: a comprehensive imaging approach to functional mapping of circuits in behaving zebrafish. *Neuroscience* **296**, 26–38 (2015).

10. Brockerhoff, S. E. et al. A behavioral screen for isolating zebrafish mutants with visual system defects. *Proc. Natl Acad. Sci. USA* **92**, 10545–10549 (1995).

11. Orger, M. B. & Baier, H. Channeling of red and green cone inputs to the zebrafish optomotor response. *Vis. Neurosci.* **22**, 275–281 (2005).

12. Burgess, H. A., Schoch, H. & Granato, M. Distinct retinal pathways drive spatial orientation behaviors in zebrafish navigation. *Curr. Biol.* **20**, 381–386 (2010).

13. Chen, X. & Engert, F. Navigational strategies underlying phototaxis in larval zebrafish. *Front. Syst. Neurosci.* **8**, 39 (2014).

14. Miri, A. et al. Spatial gradients and multidimensional dynamics in a neural integrator circuit. *Nat. Neurosci.* **14**, 1150–1159 (2011).

15. Daie, K., Goldman, M. S. & Aksay, E. R. F. Spatial patterns of persistent neural activity vary with the behavioral context of short-term memory. *Neuron* **85**, 847–860 (2015).

16. Lee, M. M., Arrenberg, A. B. & Aksay, E. R. F. A structural and genotypic scaffold underlying temporal integration. *J. Neurosci.* **35**, 7903–7920 (2015).

17. Joshua, M. & Lisberger, S. G. A tale of two species: neural integration in zebrafish and monkeys. *Neuroscience* **296**, 80–91 (2015).

18. Sparks, D. L. The brainstem control of saccadic eye movements. *Nat. Rev. Neurosci.* **3**, 952–964 (2002).

19. Gonçalves, P. J., Arrenberg, A. B., Hablitzel, B., Baier, H. & Machens, C. K. Optogenetic perturbations reveal the dynamics of an oculomotor integrator. *Front. Neural Circuits* **8**, 10 (2014).

20. Miri, A., Daie, K., Burdine, R. D., Aksay, E. & Tank, D. W. Regression-based identification of behavior-encoding neurons during large-scale optical imaging of neural activity at cellular resolution. *J. Neurophysiol.* **105**, 964–980 (2011).

21. Randlett, O. et al. Whole-brain activity mapping onto a zebrafish brain atlas. *Nat. Methods* **12**, 1039–1046 (2015).

22. Schoonheim, P. J., Arrenberg, A. B., Del Bene, F. & Baier, H. Optogenetic localization and genetic perturbation of saccade-generating neurons in zebrafish. *J. Neurosci.* **30**, 7111–7120 (2010).

23. Ahrens, M. B. et al. Whole-brain functional imaging at cellular resolution using light-sheet microscopy. *Nat. Methods* **10**, 413–420 (2013).

24. Scudder, C. A., Kaneko, C. S. & Fuchs, A. F. The brainstem burst generator for saccadic eye movements: a modern synthesis. *Exp. Brain Res.* **142**, 439–462 (2002).

25. Dunn, T. W. et al. Brain-wide mapping of neural activity controlling zebrafish exploratory locomotion. *Elife* **5**, e12741 (2016).

26. Berthoz, A. & Grantyn, A. Neuronal mechanisms underlying eye-head coordination. *Prog. Brain Res.* **64**, 325–343 (1986).

27. Einhäuser, W. et al. Eye-head coordination during free exploration in human and cat. *Ann. N. Y. Acad. Sci.* **1164**, 353–366 (2009).

28. Wolf, S. et al. Whole-brain functional imaging with two-photon light-sheet microscopy. *Nat. Methods* **12**, 379–380 (2015).

29. Brown, T. G. On the nature of the fundamental activity of the nervous centres; together with an analysis of the conditioning of rhythmic activity in progression, and a theory of the evolution of function in the nervous system. *J. Physiol.* **48**, 18–46 (1914).

30. Winfree, A. T. Biological rhythms and the behavior of populations of coupled oscillators. *J. Theor. Biol.* **16**, 15–42 (1967).

31. Roenneberg, T., Dragovic, Z. & Merrow, M. Demasking biological oscillators: properties and principles of entrainment exemplified by the *Neurospora circadian clock*. *Proc. Natl Acad. Sci. USA* **102**, 7742–7747 (2005).

32. Dayan, P. & Abbott, L. F. *Theoretical Neuroscience* (MIT Press, 2001).

33. Laing, C. R. & Chow, C. C. A spiking neuron model for binocular rivalry. *J. Comput. Neurosci.* **12**, 39–53 (2002).

34. Vattikuti, S. et al. Canonical cortical circuit model explains rivalry, intermittent rivalry, and rivalry memory. *PLoS Comput. Biol.* **12**, e1004903 (2016).

35. Kinkhabwala, A. et al. A structural and functional ground plan for neurons in the hindbrain of zebrafish. *Proc. Natl Acad. Sci.* **108**, 1164–1169 (2011).

36. Portugues, R., Feierstein, C. E., Engert, F. & Orger, M. B. Whole-brain activity maps reveal stereotyped, distributed networks for visuomotor behavior. *Neuron* **81**, 6 (2014).

37. Martinez-Conde, S. & Macknik, S. L. Fixational eye movements across vertebrates: comparative dynamics, physiology, and perception. *J. Vis.* **8**, 28 (2008).

38. Marder, E. & Calabrese, R. L. Principles of rhythmic motor pattern generation. *Physiol. Rev.* **76**, 687–717 (1996).

39. Blitz, D. M. & Nusbaum, M. P. Neural circuit flexibility in a small sensorimotor system. *Curr. Opin. Neurobiol.* **21**, 544–552 (2011).

40. Pearson, K. G. Generating the walking gait: role of sensory feedback. *Prog. Brain Res.* **143**, 123–129 (2004).

41. Tastekin, I. et al. Role of the subesophageal zone in sensorimotor control of orientation in *Drosophila* larva. *Curr. Biol.* **25**, 1448–1460 (2015).

42. Schroeder, C. E., Wilson, D. A., Radman, T., Scharfman, H. & Lakatos, P. Dynamics of active sensing and perceptual selection. *Curr. Opin. Neurobiol.* **20**, 172–176 (2010).

43. Ranade, S., Hangya, B. & Kepecs, A. Multiple modes of phase locking between sniffing and whisking during active exploration. *J. Neurosci.* **33**, 8250–8256 (2013).

44. Ito, J., Maldonado, P., Singer, W. & Grün, S. Saccade-related modulations of neuronal excitability support synchrony of visually elicited spikes. *Cereb. Cortex* **21**, 2482–2497 (2011).

## Acknowledgements

We are very grateful to Claire Wyart for allowing us to use her optogenetic setup. We would like to thank the IBPS fish facility staff, and in particular Stéphane Tronche and Alex Bois for their invaluable help. We are also grateful to Carounagarane Dore for his important contribution to the design of the light-sheet microscope. This work was supported by C'Nole Ile de France, École des Neurosciences de Paris Ile-de-France (ENP), Fondation pour la Recherche Médicale (FRM: FDT20160435670 and FDT20150532639) and Fondation Pierre-Gilles de Gennes (FPGG).

## Author contributions

S.W., A.D., V.B., R.C., R.M. and G.D. designed the project. S.W., T.B., V.B., R.C., S.K. and G.D. carried out the behavioural and neuroimaging experiments and analysis. D.G.C.H. and I.H.B. generated the elavl3:GCaMP6f transgenic zebrafish line. A.D. and R.M. developed the model and performed data analysis. S.W. and U.L.B. performed the optogenetic assays. All the authors contributed to writing the manuscript.

## Additional information

*Supplementary Information* accompanies this paper at doi:10.1038/s41467-017-00310-3.

**Competing interests:** The authors declare no competing financial interests.

**Reprints and permission** information is available online at http://npg.nature.com/reprintsandpermissions/

**Publisher's note:** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_20.png" /></figure>

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2017