Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

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

Https

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

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Sep 11;14(1):5572.
doi: 10.1038/s41467-023-41261-2.

The spatial and temporal structure of neural activity across the fly brain

Affiliations

The spatial and temporal structure of neural activity across the fly brain

Evan S Schaffer et al. Nat Commun. .

Abstract

What are the spatial and temporal scales of brainwide neuronal activity? We used swept, confocally-aligned planar excitation (SCAPE) microscopy to image all cells in a large volume of the brain of adult Drosophila with high spatiotemporal resolution while flies engaged in a variety of spontaneous behaviors. This revealed neural representations of behavior on multiple spatial and temporal scales. The activity of most neurons correlated (or anticorrelated) with running and flailing over timescales that ranged from seconds to a minute. Grooming elicited a weaker global response. Significant residual activity not directly correlated with behavior was high dimensional and reflected the activity of small clusters of spatially organized neurons that may correspond to genetically defined cell types. These clusters participate in the global dynamics, indicating that neural activity reflects a combination of local and broadly distributed components. This suggests that microcircuits with highly specified functions are provided with knowledge of the larger context in which they operate.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing interests.

Figures

Fig. 1
Fig. 1. Brainwide neural activity correlates with behavior.
a Illustration of SCAPE’s imaging geometry. b The head of a fly viewed from a dorsal perspective (Top = posterior), with the approximate imaging window denoted by a black rectangle. c Points on the fly’s limbs and body are tracked with Deep Graph Pose (DGP). Running, grooming, and abdomen bending exhibit distinct patterns of limb dynamics, observed in trajectories of DGP points. d A semi-supervised sequence model extracts a timeseries of discrete behavioral states from DGP points. Example trajectories of the 8 tracked points shown in black above, ordered from anterior to posterior (fb: front bottom, ft: front top, mb: middle bottom, mt: middle top, hb: hind bottom, ht: hind top, ab: abdomen bottom, at: abdomen top). Inferred probability of each behavioral state is shown below, showing a transition from running to back grooming. The argmax of these state probabilities is shown in the ethogram above and hereafter. e The autocorrelation of running (black) is best-fit by the sum of two exponentials, with time constants of 1s and 40s (gold). Error bars indicate ± SEM, N = 18. f Fraction of time spent in each behavioral state for each fly. Colors as in d. g Sample volume of raw imaging data in a brain with panneuronal expression of both nuclear-localized GCaMP6s and nuclear dsRed. Shown are maximum-intensity projections of the dsRed channel over the approximate dorsal/ventral (top right), anterior/posterior (bottom right), and medial/lateral dimensions (top left). Pseudocolor indicates depth in dorsal/ventral dimension. Scale bar in spatial map is 50 μm. Cartoon at bottom left shows the approximate location of the imaged volume on a reference brain from a dorsal (top) and anterior (bottom) perspective. h Top, raster of ratiometric fluorescence for all neurons from one fly (Fly 1 in f). Bottom, behavioral state, color coded as in d. i Average ratiometric fluorescence from all neurons (gold) and running smoothed with an exponential filter (black, time constant = 6s) are highly correlated (r = 0.90). j Maximum cross-correlation with running for every cell from the same fly as in h, versus the corresponding lag. Each point is one cell. ab created with BioRender.com.
Fig. 2
Fig. 2. Correlates of running are multimodal and spatially organized.
a Example traces from two cells, with regression fit overlaid in blue and ethogram below. b Average model fit across cells for each fly versus fraction of time spent running (Mean ± SEM, N = 16). Fly with highest time spent running shown in Fig. 1h–j. c Correlation with running for all cells and all flies (N = 18), cells significantly active during behavior in blue, all other cells in gray, total in black. d Downsampled composite spatial map of running correlation for all flies, viewed in the sagittal (left), transverse (right), and coronal (bottom) planes. e Location of an example cell (blue) in each of two flies (top and bottom, respectively) negatively correlated with running. f Corresponding activity traces for cells indicated in e for each fly. Ethograms shown below for reference. g Distribution of behavior time constants (τ) vs model r2 for all flies (N = 18, cells significantly active during behavior in blue, all other cells in gray). Blue line indicates median r2 as a function of τ for all cells significantly active during behavior. h Distribution of τ vs distribution of time shifts (ϕ) for all flies (N = 18), all cells significantly active during behavior. i Downsampled composite spatial map of τ for all flies, with large values in yellow and small values in red, viewed in the sagittal (left), transverse (right), and coronal (bottom) planes. Scale bar for all maps is 50 μm.
Fig. 3
Fig. 3. Large-scale neural activity correlates with vigorous but not subdued behaviors.
a Example raster of z-scored ΔF/F for all cells from one fly in a short time window, showing individual bouts of many behaviors. Cells ordered by ascending ϕ. b Regression weights for running vs. back grooming, for all flies (N = 16), all cells significantly active during at least one behavior colored by behavior time constant. Cells not significantly modulated during either behavior shown in gray. c Regression weights for front grooming vs. back grooming, for all flies (N = 16). d Left, location of pairs of cells in two flies (gold and cyan, respectively) correlated with front grooming. Scale bar is 50 μm. Right, corresponding activity traces for cells indicated at left for each fly. Ethograms shown below for reference. e Relative rate of variance explained for each behavior, normalized to running, for all cells and all flies (For running and grooming: 17,404 large τ and 9812 small τ cells from 16 flies; For flailing: 8236 large τ and 4187 small τ cells from 10 flies). Error bars indicate ± SEM. f Raster of z-scored ΔF/F for all neurons from a fly running on a spherical treadmill (left) and then flailing in the absence of a spherical treadmill (right), with the timeseries of bouts of activity (running/flailing) shown below. g Activity from four example neurons (red) from the same fly as f, with regression model fits overlaid in blue and behavioral state (running/flailing/quiescent state) shown below. h Distribution of regression weights for running and flailing for all cells and all flies (N = 10).
Fig. 4
Fig. 4. Neural activity not accounted for by behavior is high-dimensional.
a Example residual of the behavioral regression model reveals rich dynamics and groups of neurons with similar activity (z scored ΔF/F, N = 100 cells, ordered by iteratively selecting the neuron most correlated with the previous neuron). Behavior ethogram shown below. b Example traces from two selected cells (red, gold, respectively) either before (top, middle) or after (bottom) subtracting the behavioral regression fit, with ethogram shown below. c The fraction of total variance explained in the regression residual as a function of the number of PCA modes (mean ± SEM, N = 18). d Dimensionality (number of modes) of the regression residual for all flies (N = 18), calculated as the peak in log-likelihood. Error bars indicate ± 1%. e Weights of all cells in a single representative PCA mode (fly 3, mode 2). Sparseness = 0.004, corresponding to 4.58 participating neurons. f Sparseness of each PCA mode, averaged across all flies (Methods, median ± SEM, N = 18). Dashed line represents Gaussian zero-mean patterns. gi Example maps of weights from leading PCA modes are sparse, approximately symmetric, and exhibit common patterns across flies (scale bar = 50 μm). Shown are examples dominated by Pars Intercerebralis (PI) neurons (g), dorso-posterior neurons (i), and anticorrelations between neurons from the two regions (h). Upper-right in i (Fly 3, Mode 2) is the same mode as shown in e. j Euclidean distance between cells with large magnitude PC components (red) for modes with 4, 6, or 8 such cells (left, middle, right, respectively) versus random groupings of cells of the same size (gray). Distance is computed after superimposing the left and right hemisphere by folding at the midline.
Fig. 5
Fig. 5. Residual neural activity is largely independent of behavioral state.
a Possible relationships between residual activity and behavioral state for two cartoon neurons. Model 1: Residual dynamics only exist during one behavioral state. Model 2: Both raw and residual dynamics depend on behavioral state. Model 3: Residual dynamics are independent of behavioral state. b Fraction of total variance explained, as in Fig. 4c, but fitting and testing exclusively on times the fly was quiescent or running (gray and green, respectively). c Estimated dimensionality for the quiescent and running states, calculated as in Fig. 4d. d Using PCA modes calculated as in b but evaluating them on the opposite behavioral state. Cumulative variance explained in the opposite behavioral state is divided by variance explained in the fitted behavioral state. e Shared dimensionality of the quiescent and running states, calculated as in Fig. 4d. f Projection of residual dynamics during the running (green) or quiescent (gray) states onto the first two PCs of the running state for an example fly. g Residual pairwise correlation during either the quiescent or running state, for all cells from one fly. h Distribution of differences of residual pairwise correlations between the quiescent and running states for all flies (N = 10).
Fig. 6
Fig. 6. Residual neural activity is composed of organized clusters on multiple spatial scales.
a The relationship between all cells in one fly, defined by hierarchical clustering on residual neural activity. Vertical axis reflects relative Euclidean distance in activity space, with the exception of the topmost dashed line, which is not to scale. Significance of each cluster was assessed by comparing the variance of the child cluster to the variance of samples from the parent cluster on held-out time points. Branches from non-significant clusters colored black, branches from significant clusters in other colors. Cyan bracket under the tree indicates region shown in b, and yellow and white markers under the tree indicate clusters highlighted in c. b Magnification of the portion of the tree indicated by a cyan bracket in a. c Example map of cluster identity for PI cluster (white) and neighboring clusters (yellow), with identity indicated by markers in a. d Same as c for additional flies, with fly 1 repeated for clarity. e Distribution of the size of all significant clusters (dark gray) and significant clusters that have no significant children (light gray). f Distribution of correlations with running for all cells (gray) and cells belonging to a significant two-cell cluster (green). g Residual neural activity from three example clusters each comprising two neurons. h Cells belonging to clusters shown in g in red and gold, with non-member cells in gray. Scale bar is 50 μm. i Euclidean distance between cells belonging to a 2-member cluster (blue), versus randomly assigned cluster labels (gray). Distance computed after superimposing the left and right hemisphere by folding at the midline. Each row shows a different fly and bar height is capped at 30.
Fig. 7
Fig. 7. Activity of defined cell types correlates with running.
a oviDN-SS1 (split-GAL4) labels a pair of neurons in each hemisphere. Scale bar is 50 μm. b Activity of oviDN neurons for two example flies, with bouts of running indicated in green. c Model fit for each fly versus fraction of time spent running (N = 7), as in Fig. 2b. d Activity of a Dilp neuron, with bouts of running indicated in green. e Activity of a Dh44 neuron, with bouts of running indicated in green. f Distribution of behavior time constants and correlations with running for all Dilp (57 neurons, 7 flies) and Dh44 (20 neurons, 5 flies) neurons whose behavior time constant was less than 60s (57 of 77 and 20 of 24, respectively).

References

    1. Deisseroth K. Optogenetics: 10 years of microbial opsins in neuroscience. Nat. Neurosci. 2015;18:1213–1225. - PMC - PubMed
    1. Hoopfer, E.D., Jung, Y., Inagaki, H.K., Rubin, G.M., & Anderson, D.J. P1 interneurons promote a persistent internal state that enhances inter-male aggression in drosophila. Elife4, e11346 (2015). - PMC - PubMed
    1. Duistermars BJ, Pfeiffer BD, Hoopfer ED, Anderson DJ. A brain module for scalable control of complex, multi-motor threat displays. Neuron. 2018;100:1474–1490.e4. - PMC - PubMed
    1. von Philipsborn AC, et al. Neuronal control of drosophila courtship song. Neuron. 2011;69:509–522. - PubMed
    1. Coen P, Xie M, Clemens J, Murthy M. Sensorimotor transformations underlying variability in song intensity during drosophila courtship. Neuron. 2016;89:629–644. - PMC - PubMed

Publication types

LinkOut - more resources