Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2023 Oct 2.
Published in final edited form as: Nature. 2021 Apr 28;593(7858):244–248. doi: 10.1038/s41586-021-03497-0

Coupling of activity, metabolism and behaviour across the Drosophila brain

Kevin Mann 1,3, Stephane Deny 2,3, Surya Ganguli 1,2,, Thomas R Clandinin 1,
PMCID: PMC10544789  NIHMSID: NIHMS1880859  PMID: 33911283

Abstract

Coordinated activity across networks of neurons is a hallmark of both resting and active behavioural states in many species15. These global patterns alter energy metabolism over seconds to hours, which underpins the widespread use of oxygen consumption and glucose uptake as proxies of neural activity6,7. However, whether changes in neural activity are causally related to metabolic flux in intact circuits on the timescales associated with behaviour is unclear. Here we combine two-photon microscopy of the fly brain with sensors that enable the simultaneous measurement of neural activity and metabolic flux, across both resting and active behavioural states. We demonstrate that neural activity drives changes in metabolic flux, creating a tight coupling between these signals that can be measured across brain networks. Using local optogenetic perturbation, we demonstrate that even transient increases in neural activity result in rapid and persistent increases in cytosolic ATP, which suggests that neuronal metabolism predictively allocates resources to anticipate the energy demands of future activity. Finally, our studies reveal that the initiation of even minimal behavioural movements causes large-scale changes in the pattern of neural activity and energy metabolism, which reveals a widespread engagement of the brain. As the relationship between neural activity and energy metabolism is probably evolutionarily ancient and highly conserved, our studies provide a critical foundation for using metabolic proxies to capture changes in neural activity.


Three technologies have widely been used to measure changes in neural activity across whole-brain volumes. Functional magnetic resonance imaging uses blood-oxygen-level-dependent (BOLD) signals to capture changes in oxygenated blood flow as a proxy for neural activity, and has a temporal resolution of seconds and a spatial resolution of millimetres6. Fluorodeoxyglucose positron emission tomography (FDG PET) captures changes in glucose uptake, and has a temporal resolution of tens of minutes and a typical spatial resolution of centimetres79. Simultaneous imaging methods have demonstrated that FDG-PET-intrinsic (that is, task-free) brain networks spatially overlap with BOLD networks, which indicates a relationship between glucose uptake and blood oxygenation10. BOLD signals also correspond with low-frequency fluctuations in the local field potential, which indicates that these measures of blood flow and glucose metabolism can be proxies for neural activity11. In parallel, imaging approaches that use fluorescent sensors to measure changes in intracellular calcium concentrations can capture neural activity with single-cell resolution across large areas of the brain24,1215. However, none of these approaches has allowed direct, simultaneous, brain-wide intracellular measurements of changes in both neural activity and metabolic flux at high spatial and temporal resolution.

Neural and metabolic signals correlate

Correspondences between neural activity and metabolism can be measured using genetically encoded sensors, combined with brain-wide imaging, in immobilized animals3,15 (Fig. 1a). Whole-brain imaging often measures functional connectivity networks that are defined by correlated changes in neural activity between regions over time, in which the strength of each connection is represented by the magnitude and sign of the correlation between the activity patterns in pairs of regions5. These correlations capture large-scale, infra-slow (<0.1 Hz) interactions that reflect brain regions coordinating their activity1618. We hypothesized that if normal variations in neural activity in the brain were closely coupled to variations in intracellular energy flux, then a functional connectivity network could be detected using sensors that measure changes in energy metabolism. To test this hypothesis, we took advantage of Pyronic (a sensor of changes in intracellular pyruvate concentration1921) (Fig. 1a) and iATPSnFR (a sensor of changes in ATP concentration22) (Extended Data Fig. 1), and compared these signals to intracellular calcium levels measured using GCaMP6s23. As changes in both the citric acid cycle and glycolysis alter pyruvate and ATP flux, we reasoned that changes in Pyronic and iATPSnFR signals should report whether changes in metabolic flux are correlated within and between brain regions.

Fig. 1 |. Metabolic and neural networks are highly correlated across the brain.

Fig. 1 |

a, Top left, schematic of the preparation that allows two-photon imaging across the fly brain. Top right, cartoon of the imaged region of the fly brain. Bottom, schematic of a neuronal process, denoting the metabolic pathways that lead to ATP production, and the sensors that were used to measure changes in intracellular calcium concentration (GCaMP6s and jRGECO1a), pyruvate concentration (Pyronic) and ATP concentration (iATPSnFR). CAC, citric acid cycle. bd, Matrices of pairwise correlations between brain regions. b, GCaMP6s. c, Pyronic. d, iATPSnFR. eg, Scatter plots of the pairwise correlations between matrices. e, Pyronic versus GCaMP6s. f, iATPSnFR versus GCaMP6s. g, iATPSnFR versus Pyronic. n = 12 flies for GCaMP6s, n = 10 for Pyronic, n = 10 for iATPSNFr.

We expressed both of these metabolic sensors pan-neuronally, along with a structural marker (tdTomato), and imaged the entire central brains of immobilized flies3 (Methods). Next, we aligned each brain with a template brain24 and used a standard atlas to extract each of these signals from 54 anatomically defined regions25. We observed strong correlations between some pairs of regions, but not others (Extended Data Fig. 2). We then compared the average correlations between all pairs of regions across all flies, which provided us with a functional connectivity map of metabolic flux (Fig. 1bd, Extended Data Fig. 3). All three connectivity maps were highly structured, which demonstrates that both metabolic flux and neural activity are coordinated between brain regions in a stereotyped manner.

To examine similarities between each of the metabolic flux networks and the calcium activity network, we computed the pairwise correlations between each correlation matrix (Fig. 1eg). These comparisons revealed that all of these correlation matrices were very similar (R = 0.69 for pyruvate versus calcium; R = 0.80 for ATP versus calcium; and R = 0.82 for ATP versus pyruvate), even though the metabolic flux and neural activity measures were made in different flies, using different sensors and targeting different aspects of energy metabolism. We obtained similar results when we co-expressed both Pyronic and the red-shifted calcium indicator jRGECO1a pan-neuronally (or both iATPSnFR and jRGECO1a) and simultaneously measured both metabolic flux and neural activity in the same fly26 (n = 24 flies for Pyronic, n = 18 flies for iATPSNfR) (Extended Data Fig. 4ag). These data demonstrate that the functional connectivity structure of neural signals throughout the brain is mirrored in the corresponding structure of metabolic flux, which suggests an intimate link between neural activity and metabolism.

Activity is necessary for metabolic networks

We next determined the relationship between metabolic flux and neural activity at the level of individual regions (Fig. 2, Extended Data Fig. 4). Our comparisons of the simultaneously recorded signals revealed substantial correlations (Fig. 2a, b, Extended Data Fig. 4h, i). These correlations were stronger when the metabolic flux and neural activity signals were filtered to select for low frequencies rather than high frequencies (Fig. 2cf, Extended Data Fig. 4jm), and were eliminated by shuffle controls that swapped regional identities (Fig. 2g, h). iATPSnFR displayed a greater correlation with jRGECO1a than did Pyronic across all frequencies, but had a similar drop-off in correlation at higher frequencies (Fig. 2g, h). Thus, low-frequency changes in intracellular calcium levels (corresponding to the timescales of tens of seconds) are correlated with changes in metabolic flux.

Fig. 2 |. Simultaneous measurements of neural activity and metabolic flux reveal correlations that are dominated by low frequencies.

Fig. 2 |

af, Comparison of jRGECO1a and iATPSnFR signals within a single brain region (right superior medial protocerebrum (SMP-R)). a, Traces of iATPSnFR and jRGECO1a signals including all frequency components. b, Pairwise comparison of iATPSnFR and jRGECO1a signals, including all frequency components and the correlation between these signals. c, d, As in a, b, but filtered to include only low-frequency (<0.1 Hz) components. e, f, As in a, b, but filtered to include only high-frequency (>0.1 Hz) components. g, Pairwise correlations between iATPSnFR and jRGECO1a signals measured in each brain region, as a function of frequency (green trace) and shuffle control in which pairwise comparisons were done between brain regions with identities that have been shuffled (black trace). n = 24 flies, mean ± s.e.m. (shading). ROI, region of interest. h, As in g, but with Pyronic (orange). n = 24 flies, mean ± s.e.m. (shading).

To test whether physiological fluctuations in neural activity were necessary to drive correlated changes in metabolic flux, we imaged flies that simultaneously expressed either Pyronic and jRGECO1a or iATPSnFR and jRGECO1a before and after a bath application of tetrodotoxin (TTX). TTX blocks voltage-gated sodium channels, which prevents the generation of action potentials27 and thereby inhibits neural activity. If changes in neural activity drive changes in metabolic flux, then blocking neural activity should disrupt both the neural and metabolic functional connectivity maps by eliminating regional correlations between these signals. A bath application of TTX markedly reduced fluctuations in the Pyronic, iATPSnFR and jRGECO1a signals across a wide range of frequencies (Fig. 3a, b, Extended Data Fig. 5a), and largely eliminated the stereotyped correlations between these signals across the brain (Fig. 3c, Extended Data Fig. 5b). Thus, the observed metabolic network is substantially the product of neural activity.

Fig. 3 |. Neural activity drives metabolic flux in the brain.

Fig. 3 |

a, Comparison of the variance of the signals of each ROI before and after TTX application, jRGECO1a (blue) (n = 20 flies), Pyronic (orange) (n = 8 flies) and iATPSnFR (green) (n = 20 flies), mean ± s.e.m. for each region. b, The relative reduction in signal power caused by TTX application, as a function of frequency across all brain regions and flies (n = 54 regions, mean ± 95% confidence interval (shading)). c, Correlation of the correlation maps between flies before and after TTX application, across all brain regions, for jRGECO1a (calcium) (blue dots), Pyronic (pyruvate) (orange dots) and for iATPSnFR (ATP) (green dots) (mean ± 95% confidence interval) ***P < 0.0004, **P < 0.005. d, Schematic of optogenetic stimulation-imaging protocol. Top, cartoon of the imaged fly brain showing the whole-mounted brain and a detailed view of antennal lobe (AL) and imaged projection neurons (PN), with multiple stimulation ROIs indicated by black circles. Bottom, example of stimulation-imaging protocol, with CsChrimson activation (black) and imaging responses of either GCaMP6s (blue) or iATPSnFR (green). e, Left, GCaMP6s response to 10-ms CsChrimson activation (stimulation window denoted by black tick, not to scale). Frames collected during the stimulation window are not shown, as optical stimulation produces a large artefact (n = 141 ROIs, mean ± s.e.m.). Right, 10 s of imaging data from left (box) with exponential fit (black). f, As in e, but with a 50-ms activation pulse (n = 77 ROIs). g, As in e, but with iATPSnFR (n = 124 ROIs, mean ± s.e.m). h, As in g, but with a 50-ms activation pulse (n = 123 ROIs). i, Normalized spectrum of calcium signals from data collected for Fig. 4 (blue), with linear fit (red). AU, arbitrary units. j, Autocorrelation of calcium signal from data collected for Fig. 4.

Activity drives metabolic flux

To determine whether local increases in neural activity were sufficient to alter metabolic flux and to measure the timescale of this coupling, we used the light-activated cation channel CsChrimson to depolarize neurons with subcellular resolution and millisecond precision28. We expressed CsChrimson in antennal-lobe projection neurons, simultaneously with either the calcium indicator GCaMP6s or the ATP sensor iATPSnFR29. We then imaged each sensor signal while locally stimulating CsChrimson in approximately 20-μm2 subregions of projection-neuron dendrites (Fig. 3d, Methods). Using a 10-ms activation pulse to drive CsChrimson, we were able to reliably evoke a minimal GCaMP6s response that rapidly decayed (Fig. 3e). Increasing the pulse length to 50 ms increased the size of the GCaMP6s response and somewhat slowed its decay (Fig. 3f), while remaining within physiological ranges. Increases in neural activity might be expected to result in increased consumption of ATP and a reduction in the iATPSnFR signal. However, the observed changes were instead dominated bya rapid and robust increase in the iATPSnFR signal that peaked within 500 ms of stimulation, and decayed much more slowly than observed changes in intracellular calcium concentration (Fig. 3g, h). Specifically, with 10-ms activation pulses, GCaMP6s signals decayed exponentially with a time constant of τ = 3 s, whereas iATPSnFR signals decayed with a time constant of τ = 43 s (Fig. 3e, g). We observed similar results using 50-ms activation pulses (Fig. 3f, h). Importantly, in control flies that lack CsChrimson laser stimulation did not alter either intracellular calcium or ATP concentration (Extended Data Fig. 5c, d). Finally, because laser stimulation of CsChrimson precludes the acquisition of fluorescent signals within 300 ms of the pulse, these observations do not exclude the possibility that neural activity might evoke immediate and briefdecrements inintracellular ATPconcentration.

These results demonstrate that neural activation is sufficient to increase intracellular ATP concentration for prolonged periods. This long-lasting increase probably accounts for the fact that low frequencies dominate the correlations between neural activity and metabolic flux (Fig. 2). For example, in ongoing physiological conditions, correlations between calcium and both pyruvate and ATP signals decay over a frequency range from 10−2 Hz to 10−1 Hz, or from a timescale of 100 s to 10 s (Fig. 2g, h). These timescales are broadly consistent with the timescales of exponential decay of the iATPSnFR signal in response to a transient elevation of calcium (Fig. 3g, h). Moreover, the result that increased neural activity increases ATP concentration also accounts for the positive correlations we observe between calcium and ATP concentrations under physiological conditions (Fig. 2). If neural activity had caused reductions in ATP concentration, these correlations would have been negative.

Our results reveal a disparity in timescales between the duration of the calcium and ATP responses to transient depolarization: ATP concentration rises within 500 ms, but then long outlasts the calcium concentration. We considered the functional importance of this rapid rise and very long decay. We examined the temporal statistics of physiologically relevant calcium signals during ongoing neural activity and found that these calcium fluctuations exhibit a 1/fα power spectrum, in which α = 1.15 ± 0.04 (±s.e.m.) (Fig. 3i). Such power spectra with exponents close to 1 indicate temporal fluctuations with a wide spectrum of time constants, including very slow ones30,31. Consistent with this observation, the temporal autocorrelation function of calcium is not well-fit by a single exponential and possesses a long tail, dropping to half its peak value only after about 90 s (Fig. 3j). Thus, the timescale of the decay of excess ATP levels in our impulse experiments roughly matches the autocorrelation function of calcium under physiological conditions, which suggests a predictive energy allocation hypothesis (as developed in more detail in ‘Discussion’ below).

Behaviour directs activity and metabolism

We wondered how these signals are altered by the initiation of behaviour. We simultaneously imaged either Pyronic and jRGECO1a or iATPSnFR and jRGECO1a while recording leg movements (Methods). We then trained a generalized linear model using either neural activity or metabolic flux to predict bouts of movement (Fig. 4, Extended Data Fig. 6). Changes in neural activity in specific stereotyped regions of the brain predicted the timing of movement bouts, even when these bouts were brief (about 1 s long) (Extended Data Fig. 6b, d). The accuracy of behavioural predictions spanned all but the lowest frequencies we observed, and closely tracked the power spectrum of behaviour itself (Fig. 4b, Extended Data Fig. 7). Conversely, models that attempt to predict bouts of activity from metabolic flux performed relatively poorly, but still above chance (Fig. 4a, b, Extended Data Fig. 6). These correlations were highest at intermediate frequencies, which is consistent with the relationship between the power spectrum of behaviour and with the low-frequency coupling between neural activity and metabolic flux (Fig. 4b, Extended Data Fig. 7). Conversely, given this low-frequency coupling, these data demonstrate that individual bouts of rapidly changing behaviour cannot be captured with metabolic proxies, regardless of sensor speed.

Fig. 4 |. Neural activity and metabolic flux are correlated with behaviour in specific regions.

Fig. 4 |

a, Receiver–operator curve (ROC) showing a good prediction of behaviour across all flies, using models based on jRGECO1a (blue line) (area under curve (AUC) = 0.82, P < 0.0001, one-tailed t-test against 0.5), and poorer but significant prediction of behaviour using Pyronic (orange line) (AUC = 0.54, P < 0.05, one-tailed t-test against 0.5), and iATPSnFR (green line) (AUC = 0.59, P < 0.001) mean ± s.e.m. b, Comparisons of correlations between predictions of behaviour based on jRGECO1a (blue line), Pyronic (orange line) and iATPSnFR (green line) across a range of frequencies. c, Average weights of each ROI generated from the logistic regression model when computed at the peak frequency of correlation for metabolic flux and behaviour (0.04 Hz) mean ± s.e.m. Images are sagittal (left), coronal (middle) and axial (right) views of the central brain, and coloured by weight. A, anterior; D, dorsal; P, posterior; V, ventral. n = 12 flies for jRGECO1a, n = 8 flies for Pyronic, n = 13 flies for iATPSnFR.

To probe the generality of the spatial structure of these generalized linear models across flies, we computed the average weights used in each model for each brain region at the optimal predictive frequency (Fig. 4b). Weights generated from calcium signals revealed a structured map of regions that are predictive of behaviour (Fig. 4c). Weights generated from metabolic flux signals were also structured; they captured a subset of the most strongly weighted regions in the neural activity maps and correlated with the overall structure observed with calcium (R = 0.36 for Pyronic; R = 0.5 for iATPSnFR) (Fig. 4c, Extended Data Fig. 6f, g). Thus, there is a region-specific pattern of common neural and metabolic load associated with behaviour.

To better define the regions that are correlated with behaviour initiation, we imaged GCaMP6s while recording leg movements at greater spatiotemporal resolution and trained generalized linear models on these datasets. The regions of the brain that predict behavioural activity were those that are highly enriched for dendritic processes of descending neurons, which are effectors of movement that provide all of the connections between the central brain and the ventral nerve cord32 (Extended Data Fig. 8ad). The spatial weightings of these generalized linear models were very similar to those constructed with jRGECO1a (R = 0.82) (Extended Data Fig. 8e). Finally, correlations across brain regions slightly increased during behaviour but did not change in structure, which suggests that intrinsic functional connectivity is stable over short timescales (Extended Data Fig. 9).

Discussion

Changes in intracellular calcium levels in neurons are tightly coupled to spatially local changes in ATP and pyruvate concentrations in vivo. Changes in metabolic flux emerge less than 500 ms after an increase in neural activity but persist for many tens of seconds, effectively low-pass-filtering neural activity and setting a fundamental limit on the ability of metabolic sensors to capture high-frequency components of neural signals. However, by providing fiducial benchmarks across both space and time, our data support the power of metabolic proxies such as BOLD and FDG PET to capture slow changes in neural activity.

Our work reveals a relationship between neural activity and metabolism: increases in neural activity are dominated by increases rather than decreases in ATP concentration. This result suggests a hypothesis of predictive energy allocation. We propose that metabolism predicts and meets the energy demands of future neural activity through increased ATP production, which is then (on average) balanced through increased ATP consumption by subsequent activity-dependent processes. Under physiological conditions, the expected time course of future neural activity can be approximated by the temporal autocorrelation function of calcium, which predicts elevated levels of neural activity over many tens of seconds. In our optogenetic experiments, the excess ATP generated by an isolated transient calcium pulse thus lasts about as long as neural activity would have been elevated on average under physiological conditions. Thus, evolution appears to have tuned the coupling between neural activity and metabolism to meet both immediate energy demands as well as future activity-dependent needs.

Even minimal behavioural movements could be well-predicted by models that positively weighted large regions of the brain that are enriched for the dendritic processes of descending neurons, while negatively weighting other regions. This result was surprising because increasing or decreasing the activities only of pairs of descending neurons is sufficient to initiate or suppress bouts of walking behaviour, respectively, which argues for a relatively simple motor command structure33. By contrast, our finding that the movements we measured are associated with large-scale changes in neural and metabolic activity argue for a much more complex control framework. Thus, even in the relatively compact fly brain, distributed neural and metabolic networks similar to those described in vertebrates have essential roles in guiding behaviour3438.

Methods

No statistical methods were used to predetermine sample size. The experiments were not randomized, and investigators were not blinded to allocation during experiments and outcome assessment.

Fly preparation

GCaMP6s flies were females of the genotype w+/w−;UAS-myr::tdTomato/UAS-GCaMP6s;nSyb-Gal4/+. iATPSnFR flies were females of the genotype w+/w−;UAS-iATPSnFR/UAS-myr::tdTomato;nSyb-Gal4/+. Dual iATPSnFR and jRGECO flies were of the genotype w+/w−; UAS-iATPSnFR/+;UAS-jREGECO1a/nSyb-Gal4. Pyronic flies were females of the genotype w+/w−;UAS-myr::tdTomato/+;nSyb-Gal4/UAS-Pyronic. Dual Pyronic and jRGECO1a flies were females of the genotype w+/w−;+/+;nSyb-Gal4/UAS-Pyronic,UAS-jRGECO1a. CsChrimson activation flies were of the genotype w+/w−;iATPSnFR/GH146-Ga l4;UAS-CsChrimson::tdTomato/+, and w+/w−;GCaMP6s/GH146-Gal 4;UAS-CsChrimson::tdTomato/+. Flies were raised on molasses medium at 25 °C with a 12/12-h light/dark cycle. Flies were housed in mixed male/female vials and 5-day-old female flies were selected for whole-brain imaging, and 5–10-day-old female flies were selected for CsChrimson activation experiments, and were transferred to medium containing 1 mM all trans-retinal 2 days before experiments.

Flies were prepared as previously described3. In brief, flies were cold-immobilized on ice and placed into a mount separating the head from the body. The frontal parts of the head were removed to allow optical access to the central brain. In sessions in which behaviour was not monitored, legs were immobilized. In sessions monitoring leg movements, legs were kept free.

Image alignment and registration

High-resolution images were aligned to a template brain and atlas as previously described, except that in dual Pyronic and jRGECO1a-imaged flies, a high-resolution anatomical scan was made of the jRGECO1a signal instead of myr::tdTomato3. Motion correction was performed using 3dvolreg of AFNI, as previously described3.

Two-photon imaging

Flies were imaged at room temperature on a Bruker Ultima system with resonant scanning capability, a piezo objective mount and GaAsP-type photomultiplier tubes using a Leica 20× HCX APO 1.0 NA water immersion objective lens. GCaMP6s and iATPSnFR signals were excited with a Chameleon Vision II femtosecond laser (Coherent) at 920 nm, and collected through a 525/50-nm filter. myr::tdTomato signals were excited at 920 nm and collected through a 595/50-nm filter. Pyronic signals were excited at 860 nm and collected through a 525/50-nm filter. jRGECO1a signals were excited at 1,070 nm using a Fidelity II femtosecond laser (Coherent) and collected through a 595/50-nm filter. GCaMP6s, Pyronic and iATPSnFR functional data in Fig. 1 and Extended Data Fig. 6, as well as all dual imaging experiments with iATPSnFR and jRGECO1a, were collected in resonant scanning mode (8-kHz line scan rat and bidirectional scanning) and were volumetrically imaged at a resolution of 128 × 128 (3 × 3 μm) with 68 z-sections (3-μm steps, and effective frame rate of about 100 Hz). Dual imaging experiments, representing all other datasets using Pyronic and jRGECO1a, were collected in galvo scanning mode alternating between 1,070-nm and 860-nm lasers line by line at a resolution of 32 × 32 (12 × 12 μm) with 15 z-sections (12-μm steps and effective frame rate of about 15 Hz). In CsChrimson activation experiments, the 1,070-nm femtosecond laser was directed using a separate set of galvanometers than the imaging set, and was set to activate specific regions during planer imaging using the 920-nm laser imaging at 7 Hz. The 1,070-nm laser ran an activation pattern comprising up to 10 ROIs in a sample in succession, with each ROI being scanned with a spiral pattern that was 5 μm in diameter.

Quantification of iATPSnFR responses in whole brains

Standard flies expressing iATPSnFR pan-neuronally were prepared similarly to those for imaging experiments, except that the head capsule was fully removed and glued to the bottom of an imaging chamber before dissection. Flies were dissected in modified fly saline that contained 30 μM saponin to permeabilize the membranes to ATP. Whole volumes were collected as in standard resonant imaging sessions at 128 × 128 (3 × 3 μm) with 68 z-sections (3-μm steps and effective frame rate of about 100 Hz). Standard fly saline containing 30 μM saponin was perfused across the sample for several minutes to establish baseline fluorescence. Then, 10 ml of fly saline containing 30 μM saponin and 0.1, 0.5, 1, 2, 3 or 4 mM ATP was perfused over the brain. Change in fluorescence was measured as the per cent change from baseline to the peak during ATP perfusion and was normalized to the highest value observed for each individual brain.

Quantification of calcium, Pyronic and ATP coupling between ROIs

To measure the coupling between ROI activities in each fly, we first averaged the calcium, Pyronic or ATP signals from all voxels in each ROI to produce a single time series for each ROI and each sensor. We then computed the Pearson correlation of the time series of each ROI pair to generate a 60 × 60 correlation matrix for each fly that represents the couplings between ROIs. We averaged these correlation matrices across all flies to obtain representative correlation matrices (n = 12 flies for GCaMP6s, n = 10 for Pyronic, n = 10 for iATPSnFR, n = 24 for dual-imaged jRGECO1a and Pyronic flies). To compare the correlation matrices obtained for these signals, we computed the Pearson correlation between the corresponding average correlation matrices.

Temporal frequency analysis of neural activity and metabolic flux correlations

Correspondence between neural activity and metabolic flux was measured at a range of frequencies between 0.01 Hz and 0.5 Hz. Using the SciPy open-source mathematical library in Python39,40, we applied a Tukey window to the brain signals and then performed a Ricker wavelet transform to decompose the signals into 30 frequency bands. At each frequency band, we measured the Pearson correlation between the filtered calcium and Pyronic or iATPSnFR signals for each ROI independently, and then averaged this correlation over all ROIs and all flies. We tested against spatially shuffled signals. To obtain the spatial shuffle, we randomly permuted the identity of the ROIs independently for the Pyronic or iATPSnFR and calcium signals in each fly. Error bars represent s.e.m. over n = 24 flies. Additionally, we low-passed and high-passed filtered one example calcium trace and its corresponding Pyronic or iATPSnFR trace by setting to zero the Fourier coefficients of these signals above and below 0.1 Hz, respectively, and computing the inverse Fourier transform of the resulting coefficients.

TTX application and effect quantification

The jRGECO1a and Pyronic signals were imaged for 1,000 s before TTX application. TTX was then added to the bath through the perfusion at a concentration of 1 μM. After a waiting period of 1,200 s, the brain was imaged again for another 1,000 s. Analyses were performed on n = 8 flies. The effect of TTX on the Fourier spectrum of the calcium and Pyronic signals was measured in two ways. First, for each ROI we estimated variance by integrating the spectrum between 0.01 Hz and 0.5 Hz (the range of frequencies for which we could correctly estimate the spectrum on a recording of 1,000 s) before and after addition of TTX (n = 8 flies, error bars are s.e.m.). Second, to visualize the influence of TTX at different frequencies, we represented the relative power (difference between the power after addition of TTX and before addition of TTX) as a function of frequency, averaged over all flies and ROIs (n = 54 ROIs, error bars are 95% confidence intervals). We also measured the influence of TTX on the coupling between ROIs. For each fly, we computed the correlation matrix between ROI activity over three periods of 500 s, with two of the periods taken before the addition of TTX and one period taken after addition of TTX. We evaluated the self-consistency of each coupling before addition of TTX by measuring the Pearson correlation between the first two matrices, and we evaluated the effect of TTX on coupling by measuring the Pearson correlation between the second and third correlation matrices. We also measured the effect of TTX on the coupling between calcium and Pyronic signals in two ways. First, we computed the correlation of their correlation matrices before and after addition of TTX. Second, for each individual ROI, we measured the correlation of calcium and Pyronic signals before and after addition of TTX.

Chrimson activation

Before experiments, adult flies were put on fly food containing 1 mM all trans-retinal for 2 days. Flies were prepared for CsChrimson activation by first removing the head capsule and gluing it to the base of a dish similar to that used for whole-fly mounts. The head removal substantially reduces background activity that would interfere with measurements, and provides a baseline of low activity with which to work. Heads are prepared in a manner otherwise identical to that described in ‘Fly preparation’ and perfused with the same saline solution as in other experiments. GCaMP6s and iATPSnFR were imaged using the standard galvos on a Bruker Ultima at 7 Hz using 920-nm light. Crimson was activated using the uncaging galvo light path on the microscope using 1,070-nm light. Five-μm ROIs were drawn on the relevant portions of the antennal lobes and pulses ranging from 10 to 100 ms were delivered during imaging. These pulses consisted of 5 spirals covering the 5-μm ROIs. In most cases, up to 10 ROIs were pulsed in sequence in any given experiment. The power of the laser was set such that a 10-ms pulse would deliver a minimal GCaMP6s response (1–10% change) of about 17 mW at the stage.

Computation of autocorrelation and spectra

To compute the temporal autocorrelation function of calcium, for each fly we z-scored the activity trace of each ROI independently (that is, subtracted the temporal mean and divided by the s.d.), computed the autorrelation function for each ROI on a window of 200 s, and averaged the resulting autorrelograms over ROIs and flies. To compute the power spectrum of calcium, for each fly and each ROI we subtracted the temporal mean activity, computed the spectrum, divided it by total variance of the ROI so as to preserve the shape of the spectrum but not its overall amplitude (total area under the spectrum curve is 1), and then averaged the resulting spectra across ROIs and flies. We fit a linear function to the log–log spectra of each fly to estimate the decay slope and s.e.m.

Examination of behaviour-related fluctuations in neural and metabolic activity

To measure behaviour, we imaged the body of the fly with a c-mount camera (640 × 512 pixels at 20 frames per s, Flir Blackfly S BFS-U3-04S2M-CS) with a 50-mm f./2.0 lens (Edmund Optics). Bouts of activity were manually scored using behavioural observation research interactive software (BORIS)41. Flies were scored as behaving if the proximal segments of any of the legs moved. The analyses below were performed on n = 12 flies for jRGECO1a signals, and n = 8 flies for Pyronic signals, all for 2,000 s. We predicted behaviour by fitting a logistic regression (a special case of generalized linear model) on the brain signals of all ROIs. To avoid overfitting, we used an L2 penalty of 1 × 105 on the weights of the logistic regression. We fitted the model weights on half of the recording and tested the model prediction on the other half for cross-validation (all predictions presented are from the testing phase). Before this analysis, to remove slow signal fluctuations that were not predictive of behaviour, we fitted for each ROI a 10-degree polynomial and subtracted this polynomial curve from the signal. To assess the predictability of behaviour from jRGECO, Pyronic and iATPSnFR signals, we computed a ROC curve and measured the AUC. To assess the predictive power of brain signals at different frequencies, we applied a Ricker wavelet decomposition to both brain signals and behaviour and fit a logistic regression model independently for each frequency band. To compare the spatial weight maps of the logistic regression with the smooth processes of descending neurons, we used n = 6 flies imaged at 1.2 Hz for GCaMP6s only. To test whether behaviour affected coupling between ROIs for jRGECO1a, Pyronic and iATPSnFR signals, we measured the average difference in coupling across all ROI pairs, between rest and behaviour, for each fly independently, and performed a two-tailed t-test to decide whether this average difference was different from 0.

Statistics

Comparisons of correlation matrices (Fig. 3c) were performed using a two-tailed paired t-test. AUC analysis (Fig. 4a) was performed using a one-tailed t-test against 0.5 (no predictive value). Comparisons of correlations during behaviour and at rest (Extended Data Fig. 9) were calculated using a one-tailed t-test between the respective correlation values for each ROI. All data were collected from distinct samples (flies for whole-brain imaging or ROIs for CsChrimson experiments).

Extended Data

Extended Data Fig. 1 |. Normalized iATPSnFR responses in whole brains to ATP.

Extended Data Fig. 1 |

Normalized ∆F/F values for different concentrations of ATP measured in whole brains expressing iATPSnFR pan-neuronally. n = 10 flies, mean ± s.e.m.

Extended Data Fig. 2 |. Example traces and correlations of Pyronic, jRGECO1a and iATPSnFR.

Extended Data Fig. 2 |

a, Pyronic traces over an imaging session in different regions. b, A pair of traces that exhibit high correlation over time. c, Scatter plot of these two regions demonstrating correlation. d, A pair of traces that exhibit lower correlation over time. e, Scatter plot of these two regions demonstrating correlation. fj, As in ae, but with jRGECO1a. ko, As in ae, but with iATPSnFR.

Extended Data Fig. 3 |. Correlation matrices of GCaMP6s, Pyronic and iATPSnFR.

Extended Data Fig. 3 |

ac, Correlation matrices for GCaMP6s, Pyronic and iATPSnFR, reproduced and enlarged from Fig. 1, and labelling each individual region.

Extended Data Fig. 4 |. Correspondence of functional networks derived from simultaneous jRGECO1a, Pyronic and iATPSnFR measurements.

Extended Data Fig. 4 |

a, Left, traces displaying iATPSnFR (green) and corresponding jRGECO1a signal (blue). Right, Pyronic signals (orange) and corresponding jRGECO1a signals (blue) across six different brain regions b, Correlation matrix derived from jRGECO1a in the simultaneous imaging experiments from a and Fig. 2. c, Correlation matrix derived from Pyronic in the simultaneous imaging experiments from a and Fig. 2. d, Scatter plot of the pairwise correlations between jRGECO1a and Pyronic. eg, As in bd, but with jRGECO1a and iATPSnFR. n = 23 flies for Pyronic and n = 9 flies for iATPSnFR. hm, Comparison of jRGECO1a and Pyronic signals within a single brain region (saddle (SAD)). h, Traces of Pyronic and jRGECO1a signals including all frequency components. i, Pairwise comparison of Pyronic and jRGECO1a signals including all frequency components and the correlation between these signals. j, k, As in h, i, but filtered to include only low-frequency (<0.1 Hz) components. l, m, As in h, i, but filtered to include only high-frequency (>0.1 Hz) components.

Extended Data Fig. 5 |. Neural activity drives metabolic flux in the brain.

Extended Data Fig. 5 |

a, jRGECO1a (blue), Pyronic (orange) and iATPSnFR (green) traces in three different brain regions before (left) and after (right) application of TTX. b, Region-by-region correlations between jRGECO1a and Pyronic signals (orange) and between jRGECO1a and iATPSnFR signals (green), across all flies, before TTX application (top row) and after TTX application (bottom row). Mean ± s.e.m. c, GCaMP6s response to 100-ms activation pulse in flies that lack CsChrimson. n = 45 ROIs, mean ± s.e.m. d, As in c, but with iATPSnFR. n = 45 ROIs, mean ± s.e.m.

Extended Data Fig. 6 |. Example model predictions of behaviour and CsChrimson controls.

Extended Data Fig. 6 |

a, Schematic of the data processing and analysis pipeline used: (i) traces of Pyronic, iATPSnFR, jRGECO1a and behaviour (movement of the legs); (ii) half of the dataset was used to train a logistic regression model relating neural activity and metabolic flux to behaviour; (iii) predicted behavioural outputs were generated using the withheld data and were compared to the actual behaviour during those time periods; and (iv) model prediction was evaluated by correlating predicted behaviour to observed behaviour. b, Left, four example flies showing the prediction based on the model for jRGECO1a (blue) with the corresponding behaviour trace (black). Correlation between signals shown above each trace. Right, weights for each ROI generated by the model shown on right (oriented as in Fig. 4c). c, As in b, but with Pyronic (orange). d, e, As in b, c, but with a different set of four flies, with jRGECO1a (blue), iATPSnFR (green) and behaviour trace (black). f, Correlation between model weights derived from iATPSnFR and jRGECO1a. g, Correlation between model weights derived from Pyronic and jRGECO1a.

Extended Data Fig. 7 |. Frequency spectra of jRGECO1a, Pyronic, iATPSnFR and behaviour.

Extended Data Fig. 7 |

Normalized spectra from data presented in Fig. 4.

Extended Data Fig. 8 |. Correlation of model weights for GCaMP6s and descending-neuron innervation.

Extended Data Fig. 8 |

a, Model weights for each brain region generated using GCaMP6s. b, The number of descending-neuron processes in each brain region (abbreviations defined as in ref. 32). c, Graphical representation of model weights, similar to Fig. 4c. d, Correlation between model weights and descending-neuron innervation by each region. e, Correlation between model weights derived from GCaMP6s and jRGECO1a.

Extended Data Fig. 9 |. Changes in correlations across regions during behaviour for both jRGECO1a and Pyronic.

Extended Data Fig. 9 |

a, Functional connectivity map of jRGECO1a during bouts of rest. b, Functional connectivity map of jRGECO1a during bouts of activity. c, Correlation of functional connectivity maps during resting and behaving bouts. Correlations increase across the vast majority of regions (P = 0.004, n = 12 flies, one-tailed t-test). df, As in ac, but for Pyronic (P = 0.13, n = 7 flies, one-tailed t-test). gi, As in ac, but for iATPSnFR (P = 0.38, n = 13 flies, one-tailed t-test).

Supplementary Material

Suppl 1
Suppl 2

Acknowledgements

We thank C. Gallen for providing discussion and support. This work was supported by the Simons foundation (T.R.C. and S.G.), an NSF Career Award 1845166 (S.G.) and the Stanford Wu Tsai neuroscience institute (K.M.)

Footnotes

Online content

Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/s41586-021-03497-0.

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this paper.

Code availability

Analysis scripts are available upon request from the corresponding authors.

Competing interests The authors declare no competing interests.

Additional information

Supplementary information The online version contains supplementary material available at https://doi.org/10.1038/s41586-021-03497-0.

Peer review information Nature thanks Marcus Raichle and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available.

Data availability

Raw imaging data are available upon request to the corresponding authors.

References

  • 1.Liska A, Galbusera A, Schwarz AJ & Gozzi A Functional connectivity hubs of the mouse brain. Neuroimage 115, 281–291 (2015). [DOI] [PubMed] [Google Scholar]
  • 2.Ahrens MB, Orger MB, Robson DN, Li JM & Keller PJ Whole-brain functional imaging at cellular resolution using light-sheet microscopy. Nat. Methods 10, 413–420 (2013). [DOI] [PubMed] [Google Scholar]
  • 3.Mann K, Gallen CL & Clandinin TR Whole-brain calcium imaging reveals an intrinsic functional network in Drosophila. Curr. Biol 27, 2389–2396.e4 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Prevedel R et al. Simultaneous whole-animal 3D imaging of neuronal activity using light-field microscopy. Nat. Methods 11, 727–730 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Power JD, Schlaggar BL & Petersen SE Studying brain organization via spontaneous fMRI signal. Neuron 84, 681–696 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Logothetis NK What we can do and what we cannot do with fMRI. Nature 453, 869–878 (2008). [DOI] [PubMed] [Google Scholar]
  • 7.Magistretti PJ & Allaman I A cellular perspective on brain energy metabolism and functional imaging. Neuron 86, 883–901 (2015). [DOI] [PubMed] [Google Scholar]
  • 8.Horwitz B, Soncrant TT & Haxby JV in Advances in Metabolic Mapping Techniques for Brain Imaging of Behavioral and Learning Functions (eds Gonzalez-Lima F et al. ) 189–217 (1992). [Google Scholar]
  • 9.Sokoloff L, Kennedy C & Smith CB in Carbohydrates and Energy Metabolism (eds Boulton AA et al. ) 155–193 (1989). [Google Scholar]
  • 10.Passow S et al. Default-mode network functional connectivity is closely related to metabolic activity. Hum. Brain Mapp 36, 2027–2038 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Schölvinck ML, Maier A, Ye FQ, Duyn JH & Leopold DA Neural basis of global resting-state fMRI activity. Proc. Natl Acad. Sci. USA 107, 10238–10243 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Migault G et al. Whole-brain calcium imaging during physiological vestibular stimulation in larval zebrafish. Curr. Biol 28, 3723–3735.e6 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Harris DT, Kallman BR, Mullaney BC & Scott K Representations of taste modality in the Drosophila brain. Neuron 86, 1449–1460 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Lemon WC et al. Whole-central nervous system functional imaging in larval Drosophila. Nat. Commun 6, 7924 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Aimon S et al. Fast near-whole-brain imaging in adult Drosophila during responses to stimuli and behavior. PLoS Biol 17, e2006732 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Palva JM & Palva S Infra-slow fluctuations in electrophysiological recordings, blood-oxygenation-level-dependent signals, and psychophysical time series. Neuroimage 62, 2201–2211 (2012). [DOI] [PubMed] [Google Scholar]
  • 17.Mitra A et al. Spontaneous infra-slow brain activity has unique spatiotemporal dynamics and laminar structure. Neuron 98, 297–305.e6 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Biswal B, Yetkin FZ, Haughton VM & Hyde JS Functional connectivity in the motor cortex of resting human brain using echo-planar MRI. Magn. Reson. Med 34, 537–541 (1995). [DOI] [PubMed] [Google Scholar]
  • 19.San Martín A et al. Imaging mitochondrial flux in single cells with a FRET sensor for pyruvate. PLoS ONE 9, e85780 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Plaçais P-Y et al. Upregulated energy metabolism in the Drosophila mushroom body is the trigger for long-term memory. Nat. Commun 8, 15510 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Gonzalez-Gutierrez A, Ibacache A, Esparza A, Felipe Barros L & Sierralta J Monocarboxylate transport in Drosophila larval brain during low and high neuronal activity. Preprint at 10.1101/610196 (2019). [DOI] [Google Scholar]
  • 22.Lobas MA et al. A genetically encoded single-wavelength sensor for imaging cytosolic and cell surface ATP. Nat. Commun 10, 711 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Chen T-W et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Jenett A et al. A GAL4-driver line resource for Drosophila neurobiology. Cell Rep 2, 991–1001 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Ito K et al. A systematic nomenclature for the insect brain. Neuron 81, 755–765 (2014). [DOI] [PubMed] [Google Scholar]
  • 26.Dana H et al. Sensitive red protein calcium indicators for imaging neural activity. eLife 5, e12727 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Saitoe M, Schwarz TL, Umbach JA, Gundersen CB & Kidokoro Y Absence of junctional glutamate receptor clusters in Drosophila mutants lacking spontaneous transmitter release. Science 293, 514–517 (2001). [DOI] [PubMed] [Google Scholar]
  • 28.Klapoetke NC et al. Independent optical excitation of distinct neural populations. Nat. Methods 11, 338–346 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Stocker RF, Heimbeck G, Gendre N & de Belle JS Neuroblast ablation in Drosophila P[GAL4] lines reveals origins of olfactory interneurons. J. Neurobiol 32, 443–456 (1997). [DOI] [PubMed] [Google Scholar]
  • 30.Wagenmakers E-J, Farrell S & Ratcliff R Estimation and interpretation of 1/fα noise in human cognition. Psychon. Bull. Rev 11, 579–615 (2004). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Weissman MB 1/f noise and other slow, nonexponential kinetics in condensed matter. Rev. Mod. Phys 60, 537–571 (1988). [Google Scholar]
  • 32.Namiki S, Dickinson MH, Wong AM, Korff W & Card GM The functional organization of descending sensory-motor pathways in Drosophila. eLife 7, e34272 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Bidaye SS, Machacek C, Wu Y & Dickson BJ Neuronal control of Drosophila walking direction. Science 344, 97–101 (2014). [DOI] [PubMed] [Google Scholar]
  • 34.Hugdahl K, Raichle ME, Mitra A & Specht K On the existence of a generalized non-specific task-dependent network. Front. Hum. Neurosci 9, 430 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Cong L et al. Rapid whole brain imaging of neural activity in freely behaving larval zebrafish (Danio rerio). eLife 6, e28158 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Nguyen JP et al. Whole-brain calcium imaging with cellular resolution in freely behaving Caenorhabditis elegans. Proc. Natl Acad. Sci. USA 113, E1074–E1081 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Steinmetz NA, Zatka-Haas P, Carandini M & Harris KD Distributed coding of choice, action and engagement across the mouse brain. Nature 576, 266–273 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Selemon LD & Goldman-Rakic PS Common cortical and subcortical targets of the dorsolateral prefrontal and posterior parietal cortices in the rhesus monkey: evidence for a distributed neural network subserving spatially guided behavior. J. Neurosci 8, 4049–4068 (1988). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Oliphant TE Python for scientific computing. Comput. Sci. Eng 9, 10–20 (2007). [Google Scholar]
  • 40.Millman KJ, Jarrod Millman K & Aivazis M Python for scientists and engineers. Comput. Sci. Eng 13, 9–12 (2011). [Google Scholar]
  • 41.Friard O & Gamba M BORIS: a free, versatile open‐source event‐logging software for video/audio coding and live observations. Methods Ecol. Evol 7, 1325–1330 (2016). [Google Scholar]

Associated Data

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

Supplementary Materials

Suppl 1
Suppl 2

Data Availability Statement

Raw imaging data are available upon request to the corresponding authors.

RESOURCES