DRN neuronal activity increased during quiescence.

A. A schematic of our all-optical system that integrates tracking, dual-color volumetric fluorescence imaging, and optogenetic manipulation. B. Example zebrafish exhibited alternating locomotor and quiescent states during spontaneous behavior. C. Maximum intensity projection (MIP) of whole-brain imaging in a zebrafish, showing 30 s averaged neural activity during locomotor (left) and quiescent (middle) states; their difference is shown on the right. The red circle marks the dorsal raphe nucleus (DRN). Scale bar, 100 µm. D. Relationship between locomotor speed and DRN neural activity. Data are mean ± SD, n = 5 fish, p < 0.0001 (Mann–Whitney U test).

DRN 5-HT activation induces a quiescent but non-sleep-like state.

A. MIP of whole-brain data from a 7 dpf Tg(tph2:ChrimsonR-mKate2 × elavl3:h2b-jGCaMP8s) zebrafish acquired by two-photon microscopy. Scale bar, 100 µm. B. Locomotor velocity changes in Tg(tph2:ChrimsonR) and control zebrafish during DRN 5-HT neuron activation (n = 6). Yellow shading marks optogenetic stimulation. C. Top: Body roll angle (rotation in the Y–Z plane) increases during natural sleep, indicating loss of postural stability. Body roll angle in control (n = 8), sleep-deprived (SD, n = 6), and Tg(tph2:ChrimsonR) zebrafish (n = 12). Yellow indicates optogenetic stimulation. In Tg(tph2:ChrimsonR) fish, light versus no-light conditions were compared with the Wilcoxon matched-pairs signed rank test. Tg(tph2:ChrimsonR) versus control and sleep-deprived versus Tg(tph2:ChrimsonR) were compared with the Mann–Whitney U test. ****p < 0.0001. D. Top: Experimental timeline over two light–dark cycles (14 h light/10 h dark). The first cycle was normal; in the second, optogenetic stimulation was applied during the first 6 h of the dark period. Average locomotor speed and sleep duration in the 4 h after stimulation were compared with the corresponding 4 h of the first dark period. Bottom: Differences in average locomotor speed and sleep duration between Tg(tph2:ChrimsonR) (n = 24) and control zebrafish (n = 24), analyzed with the Mann–Whitney U test.

DRN 5-HT activation modulates brain state.

A. Cumulative variance explained by demixed principal components (dPCs) related to optogenetic stimulation in Tg(tph2:ChrimsonR) zebrafish (n = 8) and controls (n = 5). B. Time course of whole-brain activity projected onto dPC1 in Tg(tph2:ChrimsonR) zebrafish (n = 8). Yellow shading marks optogenetic stimulation. ϕDRN represents dPC1 score. C. Left: Histogram of brain-region weight distribution in dPC1. Yellow shading highlights high-weight regions (|weight| > 0.03, 272 regions). Right: Spatial distribution of these regions in the zebrafish brain. Scale bar, 100 µm. D. R2 between neural activity in dPC1 high-weight regions and locomotor behavior, compared with randomly selected regions (n = 272; Mann–Whitney U test, ****p<0.0001).

DRN 5-HT activation modulates motor circuits to reduce sound-evoked responses.

A. Experimental protocol for sound stimulus experiments. B. Probability of sound-evoked escape in Tg(tph2:ChrimsonR) and control zebrafish before, during, and after optogenetic stimulation. Yellow shading marks optogenetic activation. Wilcoxon matched-pairs signed rank test, **p = 0.0039. C. Population raster plot of simultaneously recorded neurons during DRN 5-HT activation and control. Blue lines mark sound onset. D. Schematic of sound, motor, and DRN activation subspaces identified by dPCA. Left and right MIPs show brain regions with high weights in each subspace in an example zebrafish (bottom right panel is the same as the panel shown in Figure 3C). E. Left: Similarity matrix of sound-evoked population responses during DRN activation vs. control. Right: Same analysis comparing awake and drug-induced sleep. F. Principal angle analysis shows the motor subspace is significantly aligned with the DRN activation subspace, while the sound subspace is nearly orthogonal (p-values from a nonparametric permutation test, 1000 iterations). Arrows show the mean angle, across all fish, between the DRN 5-HT activation subspace and the motor-related subspace (left) or the sound-related subspace (right). “Significantly aligned” means the motor–DRN angle is significantly smaller than the random baseline (gray), and “significantly orthogonal” for sound–DRN means the angle is significantly closer to 90 than the random baseline.

DRN 5-HT neuron activation exerts graded suppression on motor subspace.

A. Schematic of the linear regression analysis. B. Example neurons with low (top) and high (bottom) variability in regression coefficients. Left, middle, and right panels show regression coefficients, mean activity across bout types, and neuronal spatial locations. C. Two motor-related regions with distinct modulation after DRN 5-HT activation. Left, middle, and right panels show their spatial locations, activity in control and optogenetic trials, and trial-averaged activity. D. Spatial distribution of motor-correlated neurons differentially modulated by DRN 5-HT activation. Neural magnitude is quantified by variance. Neurons are color-coded by variance reduction (darker red, stronger suppression; lighter red, weaker effect), as in (Fig. 5E,F). E. Relationship between DRN 5-HT–induced modulation and the coefficient of variation (CV) of regression coefficients across motor-correlated neurons. F. Hyperbolic curvature of the motor population tracks behavioral quiescence during DRN 5-HT activation. Each point is one fish (n = 7), colored by individual. Y-axis: curvature parameter λ from Bayesian hyperbolic MDS of pairwise motor-population correlation distances (d = 6; K = λ2); error bars, 1 SD. X-axis: bout frequency in the same period. Top, optogenetic laser on: stronger behavioral suppression corresponds to higher curvature (Spearman ρ = 0.96, p = 0.003, exact permutation test; Pearson r = 0.87, p = 0.011). Bottom, laser off: no significant relationship in baseline (ρ = +0.54, p = 0.236, Pearson r = +0.59, p = 0.166).

DRN 5-HT activation suppresses locomotion and induces a quiescent state distinct from sleep.

A. Schematic of burst and tonic optogenetic stimulation paradigms. B. Top: locomotor speed of a zebrafish during burst stimulation. Bottom: locomotor speed of a zebrafish during tonic stimulation. C. Relationship between body roll angle and swimming speed in Tph2:ChrimsonR zebrafish. Each point represents one second; yellow points indicate periods of DRN 5-HT activation. D. Relationship between body roll angle and swimming speed in sleep-deprived zebrafish. E. Quiescence per hour in Tph2:ChrimsonR zebrafish. F. Quiescence per hour in control zebrafish.

Geometric interpretation of dPCA.

A. Neural activity at each time point is a point in an N-dimensional space defined by the recorded neurons (illustrated for two neurons). dPCA finds a direction (dPC1, orange arrow) that best separates conditions — here, DRN-activated (orange) versus control (blue). Dashed lines show orthogonal projections of individual time points onto the dPC1 axis. The weights defining dPC1 as a linear combination of the neural axes are shown below. B. Over time, the population state traces a trajectory through this space (color gradient from light to dark indicates progression from T1 to T2). Projecting this trajectory onto dPC1 (dashed lines with right-angle marks) gives a one-dimensional time course of the activation-related component of population activity. C. The resulting dPC1 score, plotted as a time series with the laser-on period shaded, is the quantity shown in Fig. 3B and reflects how strongly the population is driven along the activation-related direction at each moment.

DRN 5-HT activation did not alter neural dynamics within the sound-evoked subspace.

A. Temporal evolution of whole-brain neural activity projected onto the sound-evoked subspace and the motor-correlated subspace in an example Tg(tph2:ChrimsonR) zebrafish. Yellow shading indicates periods of optogenetic stimulation. B. Similarity matrices of sound-evoked neuronal population responses during DRN 5-HT activation and control periods for fish 2–4 (fish 1 shown in Fig. 4E). C. Same analysis as in panel B, but comparing the awake state with the drug-induced sleep state. D. Schematic of auditory stimulation paradigms with different sound intensities. E. Similarity matrices of sound-evoked neuronal population responses for strong (left) and weak (right) sound stimuli during DRN 5-HT activation and control periods.

Distribution of bouts in the direction–amplitude space.

A.Left: Distribution of all detected bouts projected onto the direction–amplitude space. Each bout is color-coded according to the classification scheme used in the main text (n = 7 fish, 1,493 bouts). Right: Frequency distribution of each bout type. B. Representative examples of distinct bout types, illustrating both large- and small-amplitude tail deflections. Colors are consistent with those used in the main figures.

DRN 5-HT activation exerts graded suppression on the motor subspace.

A. Relationship between dP C1motor weights and R2. Red points indicate the motor-correlated neurons included in the analysis. B-D. Relationship between DRN 5-HT activation–induced modulation of neural activity and the coefficient of variation (CV) of regression coefficients in motor-correlated neurons for fish 2–4 (fish 1 shown in Fig. 5D–E).

Intuition for hyperbolic versus Euclidean embedding.

The same neuron population (colored by functional group) embedded in flat Euclidean space (left) and in a Poincaré disk representation of hyperbolic space (right). In Euclidean geometry, distances between groups grow linearly, so separation is moderate. In hyperbolic geometry, space near the disk boundary expands exponentially, allowing functionally distinct groups (orange, blue) to be far more separated than in an equally dimensional Euclidean space, even though they appear visually close in the disk. Dashed lines show the distance between the same two groups in each geometry. Pink points near the center lie at moderate distance from both groups. Bottom inset: available space (circumference) at radius r grows as ∼ 2πr in Euclidean geometry but as ∼ 2π sinh λr in hyperbolic geometry, where λ is the curvature parameter. This exponential expansion lets hyperbolic embeddings accommodate populations with strongly segregated functional subsets.

DRN 5-HT activation diversifies motor network activity.

A. Pairwise distance matrices of motor-correlated neurons during DRN activation (left) and control (right) periods (fish 1). Neural activity magnitude was quantified by the variance. Neurons were ranked by changes in variance between DRN 5-HT activation and control periods. B. Embedding dimension as a function of BIC, see Methods. C. Shepard diagram of embedded vs. original pairwise distances for fish 1. Original distance matrices were scaled so the maximum distance is 2. Left: DRN activation (laser on); Right: baseline (laser off). Top: Euclidean embedding; bottom: hyperbolic embedding. As indicated by R2, hyperbolic embedding outperforms Euclidean embedding under all conditions, consistently across all fish. Embedding dimension d = 6. D. Hyperbolic multidimensional scaling (HMDS) of neural correlation distances in a 3D Poincaré ball (left) and 2D projection (right), see Methods. Top: functional embedding during DRN 5-HT activation; bottom: control. In the Poincaré ball, distances diverge near the boundary. During DRN activation, two neuronal ensembles segregated to opposite poles (light and dark red, as in Fig. 5E), indicating increased functional diversity, whereas at baseline the embedding was more compact.

Curvature–behavior relationship is robust across embedding dimensions.

Same analysis as Fig. 5F but with embedding dimensions d = 7 (left column) and d = 8 (right column). Top row: during DRN activation, λ correlates negatively with bout frequency at both d = 7 (Spearman ρ = 0.96, p = 0.003) and d = 8 (Spearman ρ = 0.93, p = 0.007, exact permutation tests). Bottom row: no significant relationship during baseline in either dimension. Each point is one zebrafish (n = 7), colored by individual; error bars, ± 1 SD from the HMDS fit. All p-values computed by exact permutation (5040 permutations).

Eigenvector-randomized surrogate distorts pairwise correlation distances.

A. Shepard diagrams for hyperbolic embedding of original (left) and surrogate data (right). Left, original motor-population data (fish 1) during DRN activation. Points track the diagonal with approximately symmetric scatter. Right, covariance-eigenvector-randomized surrogate. The surrogate was generated by replacing the eigenvectors of the covariance matrix with a random orthonormal basis while preserving the eigenvalue spectrum (Methods). The cloud systematically deviates below the diagonal at large distances, indicating that the surrogate embedding compresses distances between dissimilar neurons. This distortion is absent in the original data, confirming that the quality of the hyperbolic fit depends on the specific geometric arrangement of neurons in correlation space, not solely on the eigenvalue spectrum of the covariance matrix. Shepard diagrams for other fish exhibit qualitatively similar behaviors. B. Curvature parameter λ vs. laser-on bout frequency for original data (left) and surrogate data (right), both at d = 6. Each point is one zebrafish (n = 7); error bars, ± 1 SD across repeated HMDS fits. The surrogate yields substantially larger fit uncertainty, indicating that the optimizer cannot converge on a stable embedding in the absence of a specific geometric structure. The tight curvature–behavior correlation observed in the original data is also weakened in the surrogate.