Daily rewiring of a neural circuit generates a predictive model of environmental light

See allHide authors and affiliations

Science Advances  24 Mar 2021:
Vol. 7, no. 13, eabe4284
DOI: 10.1126/sciadv.abe4284


Behavioral responsiveness to external stimulation is shaped by context. We studied how sensory information can be contextualized, by examining light-evoked locomotor responsiveness of Drosophila relative to time of day. We found that light elicits an acute increase in locomotion (startle) that is modulated in a time-of-day–dependent manner: Startle is potentiated during the nighttime, when light is unexpected, but is suppressed during the daytime. The internal daytime-nighttime context is generated by two interconnected and functionally opposing populations of circadian neurons—LNvs generating the daytime state and DN1as generating the nighttime state. Switching between the two states requires daily remodeling of LNv and DN1a axons such that the maximum presynaptic area in one population coincides with the minimum in the other. We propose that a dynamic model of environmental light resides in the shifting connectivities of the LNv-DN1a circuit, which helps animals evaluate ongoing conditions and choose a behavioral response.


The brain assigns valence to incoming sensory stimuli, allowing responsiveness to be context dependent. To do this, it must continually check ongoing sensations against expectations, an idea known as predictive coding (1). Discrepancy between expectation and reality is famously reflected in the activity of dopaminergic neurons (2), which have been proposed to generate an error signal (3) that can bias behavior (4). The mechanisms that give rise to this integrated signal are not clear, but are thought to require convergence, on dopaminergic neurons, between ongoing sensory signals and expectations generated from previous outcomes (1). While sensory circuits have been successfully mapped in many systems, there is almost no understanding of how sensory expectations are encoded by the brain. We took advantage of arguably the most predictable occurrence in the natural environment, the back-and-forth between bright days and dark nights, to explore this question.

The day-night oscillations are represented on the cellular level by the circadian clock, a molecular program shaped by environmental light—key clock proteins are light sensitive, so that under light-oscillating conditions their levels rise and fall rhythmically (5). The clock organizes various physiological processes on a ~24-hour scale (6). For example, it instructs the timing of cell division (7) and hormone secretion (8) and enables animals to seek food and shelter before nightfall (9). Predictability, enabled by the circadian clock, needs to be balanced with flexibility. What if conditions in the environment suddenly changed and no longer matched the expectation set by the clock? A mismatch between reality and prediction (bright light during the night or darkness during daytime) could be interpreted as an error signal and lead to behavioral modification. Using a paradigm in which flies report their time-of-day estimates, we found that the circadian system assists in evaluating light conditions relative to time of day, and that mismatch between prediction and reality shapes behavioral responsiveness to light. The internal sense of daytime versus nighttime, against which light is evaluated, is generated by a microcircuit within the network of circadian neurons. Two functionally opposed neuronal populations use cellular remodeling as a strategy to organize slowly shifting internal predictions. The experimental paradigm we established provides a new way to study timekeeping, as well as how expectations are encoded and evaluated.


Locomotor reactivity to light depends on time of day

We asked if the internal sense of time is used to contextualize light. That is, when daytime turns into nighttime, is the same light stimulus interpreted differently? The protocol that we used was similar to the one used by Lu et al. (10): Flies experienced light and darkness alternating every 12 hours for several days, which entrained their circadian clocks, and then all lights were turned off. After at least one full 24-hour cycle spent in darkness, animals were exposed to light for an hour at different times of day (Fig. 1A).

Fig. 1 Circadian clocks bidirectionally modulate light responsiveness.

(A) Locomotor activity (15-min bins) of wild-type flies (w+iso31) during entrainment, baseline, and testing with 1-hour light pulse. Activity is shown in; error bars, SEM. Yellow, light. (B) Locomotor responsiveness to light at 2 p.m. (CT6), 8 p.m. (CT12), 2 a.m. (CT18), or 8 a.m. (CT0). Twenty minutes of baseline, 60 min of light exposure. Bottom, averaged activities of all wild-type animals; top, representative raster plots of individuals (n = 1 per row). Shading, SEM in all figures. (C) Reactivity to light across 24 hours. Independent wild-type cohorts tested at each point. (D) Schematic responsiveness to light depends on time of day. (E) Left: Circadian neurons visualized with GFP driven by Tim-Gal4. Bruchpilot (Brp), a presynaptic protein, helps visualize the brain. Because of glial Tim-Gal4 expression (106), repo-Gal80 was always included with this driver. Right: Clock neurons labeled with anti-Clock antibodies. Scale bars, 20 μm. (F) Light reactivity across 24 hours in controls (black, gray), and flies with disrupted clocks (red, purple). (G) A closer view of mid-day (2 p.m., CT6) and mid-night (2 a.m., CT18) light responsiveness. Two-way analysis of variance (ANOVA), Tukey’s post-test, ****P < 0.0001. Table S1 shows sample sizes, detailed statistics, and genotypes. (H) Model: Light is contextualized according to time of day due to the circadian system.

When light was presented during the nighttime, wild-type (11) flies immediately increased locomotion (Fig. 1, A and B, and movie S1). During subjective daytime (daytime, but in darkness), their reaction was the opposite—they immediately slowed down or stopped moving (Fig. 1, A and B, and movie S1). Baseline locomotion fluctuates from day to night even in total darkness (Fig. 1A and fig. S1A), but we found that baseline differences could not account for differential responsiveness during daytime versus nighttime: For example, prestimulus locomotion was similar at 8 p.m. and 8 a.m., but diverged when lights turned on (Fig. 1B). Furthermore, in individual animals, responsiveness showed a weak correlation with baseline locomotion, and no correlation with sleep status (fig. S1, B and C). Normalizing light-evoked locomotion to baseline did not change the results (fig. S1D). Although males generally sleep during the day, while females do not (12), both sexes responded to daytime light by decreasing activity (Fig. 1, A and B, and fig. S1, E and F).

When locomotor responsiveness to light was examined every hour, two states of responsiveness lasting ~12 hours each became apparent (Fig. 1C). In agreement with observations by Lu et al. (10), light-responsive states were centered around mid-day and mid-night, correlating with the schedule of light and darkness previously experienced during entrainment. To confirm that time-of-day light responses are instructed by previous experience, we entrained flies to shortened or lengthened light schedules (fig. S2A). At the same hour (7 p.m.), a light pulse either suppressed or evoked locomotor activity, depending on whether light had been on at 7 p.m. during entrainment (fig. S2, B to F).

Locomotion always seemed triggered by subjective mismatch (i.e., experiencing different conditions than expected at that time of day). In support of this idea, locomotor activity was evoked not only by nighttime light (Fig. 1, A to C) but also by daytime darkness (fig. S2, G and H), suggesting that this is a startle response. Consistent with such framework, flies that are transferred to continuous darkness have higher levels of locomotor activity specifically during the daytime (fig. S1A), and this higher activity normalizes over the course of several days (fig. S2I), as if animals eventually habituate to new environmental conditions. Locomotor reactivity to light pulses therefore reports internal estimates of daytime versus nighttime (Fig. 1D) with moment-to-moment resolution.

Circadian clocks contextualize environmental light

On the basis of the time scales involved, the involvement of circadian clocks in contextualizing light seemed likely. We disabled the clock by depleting core proteins Clock (Clk) (13) or Period (Per) (1416) from the network of ~150 circadian neurons (17) (Fig. 1E and fig. S3, A to D). Without the functional clock, flies lost the ability to contextualize light relative to time of day, and always responded with a startle, but this startle was weak relative to the nighttime startle in controls (Fig. 1, F and G). The implication is that the circadian system bidirectionally modifies a stereotyped behavioral response to an abrupt change in luminance—during daytime (when light is appropriate), clocks suppress the startle, but they enhance it during nighttime (when light is inappropriate) (Fig. 1H). Predictions originate from molecular clock oscillations, as mutants with faster clocks (14) cycled through light-responsive states faster (fig. S3, E and F, and table S2).

Separate clock neuron subpopulations contextualize daytime and nighttime light

To find the neuronal mechanism that organizes predictions about environmental light, we first examined LNvs (Fig. 2, A and B) (13). This small group of neurons regulates normal locomotor activity rhythms (i.e., the pattern of activity seen under basal conditions, where periods of high and low activity occur at predictable times of day) (18). Using the green light–gated chloride channel GtACR1 (19), we silenced LNvs conditionally, limiting potential developmental artifacts (Materials and Methods). Here, light served as both a visual stimulus and an effector for GtACR1. LNv silencing caused flies to startle in response to light during subjective daytime (Fig. 2C), as if they no longer held the expectation that light during the daytime is appropriate—mimicking the daytime phenotype of flies lacking clocks entirely (Fig. 1G). The near-instantaneous nature of optogenetics allows us to conclude that LNvs contextualize daytime light on a moment-by-moment basis. Unexpectedly, unlike general clock disruption (Fig. 1G), LNv silencing produced no nighttime phenotype (Fig. 2C). Daytime-specific phenotypes were also seen with RNA interference (RNAi)–mediated depletion of the LNv-specific neuropeptide pigment dispersing factor (PDF; fig. S4A) (20) and with hypomorphic mutations in the PDF receptor (PDFR) (fig. S4, B and C) (21). Although knocking down PDF in the small LNv subpopulation (fig. S4, D, E, and G) (20) was sufficient to disrupt daytime light responsiveness (fig. S4, F and H), the phenotype was stronger when the small and large LNvs were manipulated simultaneously (fig. S4B), so we treated them as a unit.

Fig. 2 Different clock neurons control daytime versus nighttime light reactivity.

(A) Left: Brain neurons labeled with LNv-Gal4, a driver expressed downstream of pdf regulatory elements (18, 107). Right, asterisk: non-LNv expression in the ventral nerve cord. (B) Clock staining in LNvs. In (A) and (B), arrows point to cell bodies. (C) Light-evoked locomotion for controls (black, gray) and for animals expressing the light-gated chloride channel GtACR1 in LNvs (blue). (D) In pdfr mutants (han3369 or han5304 alleles), PDFR was expressed in candidate neuronal populations. (E) Activity of flies in which PDFR is expressed using R23E05-Gal4 (dark green) or R23E05-Gal4 with teashirt-Gal80 (DN1a-Gal4, light green) in han3369 mutants. (F) DN1a-Gal4 expression. (G) Clock and Period staining in DN1as. In (F) and (G), arrows point to cell bodies. (H) Light-evoked locomotion for controls (black, gray) and for flies expressing GtACR1 in DN1as (green). (I) Light-evoked locomotion for flies expressing t-PDF in DN1as. (J) Model of LNv and DN1a roles in contextualizing light. In this figure, all daytime light pulses were at 2 p.m. (CT6) and nighttime light pulses were at 2 a.m. (CT18). Scale bars, 20 μm. ***P < 0.001, ****P < 0.0001. Table S1 shows sample sizes, detailed statistics, and genotypes.

Because LNvs are considered to be a central pacemaker (18), a reasonable concern is that LNv-disrupted flies lack circadian rhythms entirely. Several lines of evidence argue for specific, rather than general, loss of clock function. As mentioned, LNv silencing did not affect nighttime responsiveness to light (Fig. 2C and fig. S4B), unlike when the entire clock network was disabled (Fig. 1G). Second, the arrhythmic phenotypes of LNv disruption have been argued to stem from developmental problems (22), which is mostly avoided with conditional optogenetics (Materials and Methods). Third, it takes many days for LNv silencing to cause arrhythmicity—most animals are rhythmic during the first 2 days of constant darkness (table S2) (18), which is when our testing is done. Last, other subpopulations can support timekeeping in the absence of LNv function (22). We conclude that LNvs signal that light is appropriate during daytime but are dispensable for contextualizing light during nighttime.

A screen for LNv-downstream neurons that contextualize light

LNv silencing recapitulates only the daytime phenotype of clock disruption, suggesting that other populations might have analogous function during the nighttime. Because LNvs signal through the peptide PDF, we looked for their targets by restoring expression of PDFR to various neuronal populations in the receptor mutants (Fig. 2D and fig. S5A). For this pdfr rescue screen, we predominantly tested Gal4 lines expressed sparsely in the nervous system and also looked at lines expressed in sleep- and locomotion-regulating centers, circadian subpopulations, and neurons expressing specific neurotransmitters or peptides (table S3). Restoring PDFR to most neuronal populations, including known LNv targets (2325), could not fully suppress the pdfr mutant phenotype (table S3). Only a few of the 274 tested Gal4 lines allowed complete rescue; of these, we focused on the lines with the most restricted expression. When PDF transmission was enabled onto neurons labeled by R23E05-Gal4 (26), normal responsiveness to daytime light (decrease in locomotor activity) was restored in two pdfr mutant alleles (Fig. 2, D and E, and fig. S5B). R23E05-Gal4 labels ~20 neurons in the ventral nerve cord and ~10 neurons in the brain (fig. S5, C and D). The brain neurons include the four dorsal-anterior clock neurons (DN1as; Fig. 2, F and G, and fig. S5E). DN1a cell bodies are in the dorsomedial protocerebrum, their dendrites wrap around the mushroom body calyx, and their axons descend toward the accessory medulla (fig. S5F) (20, 2730). We restricted expression of R23E05-Gal4 to mostly DN1as with addition of teashirt-Gal80 (tsh-Gal80), a Gal4 inhibitor expressed in the ventral nerve cord (fig. S5G). We refer to this intersectionally derived driver as DN1a-Gal4.

DN1a silencing had the opposite effect from LNv silencing, perturbing only the nighttime response to light (Fig. 2H). The phenotype—a less robust startle—was similar to the nighttime phenotype of clock-disrupted flies (Fig. 1G), suggesting that without DN1as flies can no longer evaluate light as inappropriate during the night. Little is known about the function of DN1as in the adult. These cold-sensitive (29) neurons signal onto LNvs using the neuropeptide CCHamide1 (CCHa1; fig. S6A) (30) to promote wakefulness in the morning (29, 30). In our assay, there was no effect of depleting CCHa1 or its receptor CCHa1R (fig. S6, B to D), showing that the light-contextualizing function of DN1as is distinct from the wake-promoting role. We concluded that DN1as signal that light is inappropriate during nighttime, complimenting the daytime function of LNvs.

Attenuated responsiveness to nighttime light could reflect general locomotor and visual deficits, so we tested whether all genotypes were capable of robust visual and motor function. We reanalyzed data from key experiments (Figs. 1G and 2, C and H) to see whether the animals whose responsiveness to light was attenuated ever reached high levels of locomotor activity (i.e., they are not physically impaired). There was no statistically significant difference in peak locomotor activity between experimental animals and their parental controls (fig. S6E). The lower population-averaged responsiveness in DN1a-silenced, or clock-disrupted, flies is instead accounted for by infrequency of high activity bouts (fig. S6F), which suggests that these animals were less likely to be in a startled state. To further assess locomotor vigor, we tested animals with mechanical stimulation and found that DN1a- and LNv-silenced flies reacted with high levels of locomotor activity, easily exceeding levels elicited by light (fig. S6G). A visually guided behavior, courtship (31, 32), was also normal (fig. S6H and Materials and Methods). Together, these data argue that clock neuron manipulations do not simply impair sensory or motor output, but instead disrupt the ability to contextualize light.

The signaling from LNvs to DN1s could be inhibitory, based on the fact that these neurons have opposing functions. We expressed membrane-tethered PDF (33) in DN1as; this version of PDF is anchored to the membrane and has short-range, cell-autonomous effects on cells that (natively) express PDFR (34). PDFR activation in DN1as attenuated the nighttime startle to light (Fig. 2I), a phenotype similar to the one produced by DN1a silencing (Fig. 2H). This result supports the finding that DN1as express PDFR (29, 35, 36), and suggests that PDF can inhibit DN1as. Together, data presented thus far suggest that LNvs and DN1as have opposite roles in contextualizing light during daytime versus nighttime, and that the peptide PDF is a crucial organizational signal between these subpopulations (Fig. 2J).

LNvs and DN1as are mutually interconnected

The interdigitated arrangement of LNv and DN1a projections (Fig. 3A, fig. S7A, and movie S2) is suggestive of reciprocal communication. To study the populations simultaneously, we created an R23E05-LexA line (fig. S5D). The LexA/LexAop system (37) functions similarly to the Gal4/UAS system (38), but does not interact with it, allowing us to study the subpopulations in parallel. Genetically encoded markers of pre- and postsynaptic sites (39, 40) showed that LNv axons terminate onto DN1a dendrites within the superior lateral protocerebrum (20), while DN1a axons terminate onto LNv dendrites within the accessory medulla (Fig. 3B and movies S3 and S4). The trans-synaptic tracing tool trans-Tango (41) reported LNvs and DN1as as mutual synaptic targets (Fig. 3B and fig. S7, B and C). Specifically, we observed that one of the two DN1a neurons was an LNv-downstream target.

Fig. 3 Reciprocal targeting between LNvs and DN1as.

(A) Expression of GFP in DN1as, and tdTomato in LNvs, reveals overlapping projections. (B) LNv axons overlap with DN1a dendrites (left) and vice versa (right). Synaptotagmin (Syt), presynaptic marker; Denmark, postsynaptic marker. Left: Area outlined on the top in (A). Right: Area outlined on the bottom in (A). (C) Postsynaptic targets labeled by trans-Tango indicate that LNvs and DN1as target each other. Arrows point to target cells expressing Clock. Asterisks: DN1as and LNvs not labeled by trans-Tango. (D) Chemogenetic activation of LNvs during the nighttime diminishes DN1a activity ex vivo. (E) Chemogenetic activation of DN1as during the daytime attenuates LNv activity ex vivo. In all conditions, a steady decline in GCaMP6s fluorescence was seen in LNvs, likely due to photobleaching (Materials and Methods). For (D) and (E), measurements were taken from flies that were in light-dark cycles {at ~2 p.m. [Zeitgeber time 6 (ZT6)] for daytime, at ~2 a.m. (ZT18) for nighttime}. Minimal and maximal changes in calcium are reported for each trial. One-way ANOVA with Tukey’s post hoc test. (F) Model of LNv and DN1a inhibitory circuit connectivities. All scale bars represent 20 μm. *P < 0.05 and **P < 0.01. Table S1 shows sample sizes, detailed statistics, and genotype details.

To test whether these putative connections are functional, we activated each population at times when their activity is predicted to be low, and looked at the response of the other population ex vivo. When LNvs were stimulated via the adenosine 5′-triphosphate (ATP)–gated cation channel P2X2 (42, 43), the calcium sensor GCaMP6s (44) reported transient inhibition in DN1as (Fig. 3D and fig. S7, D and E). Conversely, stimulating DN1as led to transient LNv inhibition (Fig. 3E and fig. S7, F and G), although the effect was not as strong. The weaker effects of DN1a stimulation could be due to biological reasons or because R23E05-LexA is a weaker driver than PDF-LexA (fig. S7H). Others have found that PDF excites, rather than inhibits, DN1as (29); the discrepancy may be due to differences in experimental conditions—we measured calcium levels rather than electrophysiological firing rate (29). Furthermore, we looked at DN1as specifically during the nighttime, a period during which these neurons are active (Fig. 2H); starting from high levels of activity may have allowed us to observe activity decreases. Our results are consistent with the fact that larval DN1as inhibit LNvs (45), and suggest that a reciprocal inhibition motif within the Drosophila circadian circuit contributes to opponent predictions about light (Fig. 3F).

Presynaptic structural plasticity regulates behavioral state transitions

LNv and DN1a neurons are required to contextualize light at different times of day, are mutually connected, and have the ability to inhibit each other. How does the LNv-DN1a circuit alternate between functional states? It was known that s-LNv axons undergo daily structural remodeling, spreading out in the morning and bundling up at night (Fig. 4A) (4649), but the function of this change has remained mysterious (5054). We found that DN1a axons are also remodeled daily, on a schedule that is antiphase to LNvs (Fig. 4A); their axons are extended at night and retracted during the day. The fluorescently tagged presynaptic protein Bruchpilot (Brp) showed that changes in presynaptic area correspond with changes in synapse number (Fig. 4B and fig. S8, A and B). The rhythmicity of axonal remodeling is set by the circadian clock, as it was absent in period mutants (Fig. 4C). These results raise the possibility that daily changes in connectivity within the LNv-DN1a microcircuit underlie transitions between light-predictive states.

Fig. 4 Axon remodeling in LNvs and DN1as is required for normal light reactivity.

(A) Antiphase oscillations in LNv and DN1a axon morphology, measured in light-dark cycles [2 p.m. (ZT6), daytime; 2 a.m. (ZT18), nighttime]. Each dot, one brain hemisphere. (A to E) t test in LNvs, two-way ANOVA with Tukey’s post hoc test in DN1as unless stated otherwise. DN1a ventrolateral (VL) tracts change; ventromedial (VM) tracts are internal controls. (B) Daily changes in presynaptic site number, reported by a synaptic marker Brp:mCherry. (C) Period mutants lack plasticity rhythms. n.s., not significant. (D) Manipulating Rho1 in LNvs [Rho1-RNAi versus Rho1 overexpression (OE)] bidirectionally changes axonal fasciculation. One-way ANOVA with Tukey’s post hoc test. (E) Manipulating Rho1 in DN1as bidirectionally changes axonal fasciculation. One-way ANOVA with Tukey’s post hoc test. (F) Light responsiveness in flies with fasciculated (bundled) dorsal LNv axons (blue) or short DN1a axons (green). “GFP control”: LNv > GFP during the daytime, DN1a > GFP during the nighttime. Daytime light pulses were at 2 p.m. (CT6); nighttime light pulses were at 2 a.m. (CT18). (G) Schematic summary of morphological changes between daytime and nighttime. (H) Schematic summary of LNv-DN1a circuit state transitions that regulate opponent predictions about light. Scale bars, 20 μm. *P < 0.05, **P < 0.01, ***P < 0.001, and ****P < 0.0001. Table S1 shows sample sizes, detailed statistics, and genotypes.

The LNv-DN1a circuit appears in distinct physical configurations during the day (more LNv output sites) versus night (more DN1a output sites). For each population, the time of day when their axons occupy the most space correlates with the time when that population is necessary. To test the idea that axonal structural remodeling contributes to the light-predictive internal model, we looked for manipulations that can affect remodeling in the two populations. DN1as seem to use similar cellular programs as LNvs (49), because manipulating the guanosine triphosphatase (GTPase) Rho1 levels bidirectionally affected remodeling in both populations. For both LNvs and DN1as, Rho1 overexpression decreased axonal area, while RNAi-mediated Rho1 depletion increased axonal area (Fig. 4, D and E).

In agreement with the idea that remodeling supports transitions between opponent predictive states, Rho1 overexpression in LNvs caused increased locomotion in response to daytime light, while overexpression in DN1as attenuated the startling effect of nighttime light (Fig. 4F). That is, preventing presynaptic area from increasing resembles silencing phenotypically (Fig. 2, C and H). Rho1 overexpression did not appear to overtly damage the LNv neurons, as animals had relatively intact locomotor activity rhythms (fig. S8C and table S2) and did not have accelerated evening locomotor activity onset, which occurs when LNvs are ablated or constitutively silenced (fig. S8C) (18, 55). The daytime phenotype of Rho1 overexpression in LNvs and nighttime phenotype of Rho1 overexpression in DN1as, together, match the light response phenotypes seen when circadian clocks are disabled (Fig. 1G). These data fit a model in which daily structural plasticity (Fig. 4G) biases the outcome of LNv-DN1a reciprocal inhibition, leading to a flexible internal model of what the light conditions should be at any moment (Fig. 4H).


Alterations of neuronal activity, rather than morphology, are usually considered the cause of cognitive flexibility (56). The mechanism that we describe relies on physical cellular restructuring. What are the advantages of a system like this? While near-instantaneous electrical activity is the basic language of neurons, many behaviors and internal states occur on much longer time scales. Morphological remodeling is a slow process, aligning with functions that change over the course of hours. In support of this view, changes in neuronal morphology have been found to underlie appetite (57), sexual experience (58), and foraging history (59). Although seemingly wasteful, physical remodeling may be particularly useful for encoding relatively stable states, due to presumably high energetic barrier.

Understanding the mechanisms of circuit state transitions may help clarify the etiology of mood disorders like depression of bipolar disorder. These disorders are characterized by excessive or insufficient transitions between extreme states and, as such, may reflect a collapse of organizational principles that permit flexible circuit function. It is generally unknown how behavioral states can be stable across long time scales while also being able to undergo flexible transitions. Motifs from the LNv-DN1a circuit illustrate one solution to this apparent contradiction. LNvs and DN1as are arranged in a mutually inhibitory system, which may help ensure stability, consistency, and accuracy over long time scales. In the absence of external influences, reciprocal inhibition can stabilize a winner-take-all steady state (60). Structural plasticity is a potential way to overcome rigidity by providing a molecular mechanism to surmount electrical inhibition.

In our model, the molecular oscillations of the circadian clock direct oscillations in cell shape through molecular effectors such as Rho1, ultimately leading to changes in behavior. Rho1 overexpression experiments suggest that neuronal morphology causally influences behavior. However, we cannot rule out the possibility that high levels of Rho1 cause off-target effects that we have not accounted for. Previous work used conditional methods to determine that Rho1 regulates daily LNv remodeling rhythms (49), but we used constitutive Rho1 overexpression (to avoid using high temperatures required for the conditional experiment), and thus cannot exclude the possibility of developmental confounds.

It is possible, if not likely, that other circadian neuronal populations also contribute to generating predictions about light. In our study, the optogenetic silencing phenotypes of LNvs and DN1as together recapitulate the phenotype produced by network-wide loss of clock function. However, the native circuit signal may be built by the cooperative action of multiple subpopulations with overlapping tuning. Hints of subpopulation cooperativity are apparent in our data; there was a stronger phenotype when PDF was knocked down in both small and large LNvs, compared to small LNvs alone. Glycine was recently found to be a fast, inhibitory neurotransmitter that is co-released from s-LNvs in addition to the neuropeptide PDF (61). While we found a necessary and sufficient role for the neuropeptide PDF in our behavioral assay, we cannot rule out the possibility that glycine instead mediates the fast inhibition we saw during ex vivo calcium imaging. Furthermore, we focused on two time points, but other populations may be more influential during other times of day. In support of this theory, it was recently found that lateral dorsal neurons also show axon remodeling rhythms centered around the evening (62), a time point we did not study. Because the other clock neuron subpopulations are active at different times (6365), and recurrent inhibition is prevalent in the fly circadian network (61, 6567), it is likely that LNv-DN1a interactions are necessary, but not sufficient, for circadian network operations in the context we describe.

What we call “startle” is commonly referred to as “masking” (68) because acute reactivity to lights-on and lights-off can distort measurements of circadian rhythmicity (69, 70). For this reason, most assays of circadian function are done in unchanging environmental conditions (e.g., constant darkness) (71). We show that startle to lights-on can also be an informative indicator of internal timekeeping. Our conditional experiments using optogenetics suggest that clock neuron activity contextualizes light on an ongoing basis. However, because our animals were exposed to daytime light during the habituation period, we cannot exclude the possibility that LNv and DN1a activity is also required during entrainment. Another consideration is that light resets the molecular clock (72). One hour of nighttime light can advance or delay circadian rhythms, which is apparent in the timing of rest and activity on subsequent days (73). It is unknown if this phase-shifting phenomenon affects the acute reactivity we observed.

Circadian clocks have evolved in the context of consistent light schedules, and this predictability has been relatively unchallenged across evolutionary history. Ubiquitous artificial lighting introduces new strains on the circadian system. Misalignment between internal rhythms and the external world can have profound consequences on health and cognition. The feeling of jetlag demonstrates the acute physical and mental burden of when internal clocks are in conflict with the external world (74). Chronic misalignment, such as in the case of night-shift workers, causes increased rates of cancer (7578). The use of electronic devices before bedtime has been linked to delays in sleep onset and reductions in sleep quality (79). The system we describe in Drosophila presents a model to understand the acute consequences of circadian misalignment.

A predictive nervous system enables continual evaluation of reality relative to context. One result of this is that a fixed stimulus can evoke a multitude of behaviors depending on an animal’s history, needs, and external context. We show how the Drosophila circadian system creates a dynamic internal reference of what environmental conditions should be. Many of the motifs we observed are conserved: Mammalian circadian clock neuron subpopulations are also active at different times (8083) and are linked by recurrent inhibition (8488), suggesting that mammalian temporal estimation may operate using similar principles. The paradigm that we developed offers opportunities to understand the interface between internal models and sensory evidence. Circadian neurons are sensitive to environmental inputs—can they autonomously compute prediction error? They communicate with downstream dopaminergic populations (64, 89): Are those analogous to mammalian midbrain dopaminergic neurons whose activities reflect prediction error? We propose that flies assign valence to experienced environmental conditions, a computation that uses an internal model generated through circuit remodeling.


Drosophila melanogaster stocks

All Drosophila genotypes used in this study are listed in table S1. Flies were grown on cornmeal agar medium at 25°C under 12-hour light:12-hour dark conditions in a room with ~70 lux white light. The lights turned on at 8 a.m. and turned off at 8 p.m., except for in fig. S2 where we used different lighting schedules. UAS-myr::GFP (green fluorescent protein), UAS-mCD8::GFP, UAS-tethered PDF, and UAS-Dicer2 lines were outcrossed six or seven times into the control iso31 background. No differences in light responses were observed between outcrossed and non-outcrossed lines. One experiment (Fig. 1, F and G, 2 p.m. and 2 a.m. only) had UAS-mCD8::GFP controls in the GFP condition, whereas the genotype is UAS-myr::GFP elsewhere in the paper. No behavioral differences were seen between UAS-mCD8::GFP and UAS-myr::GFP. RNAis were coexpressed with Dicer2 (Dcr) to increase efficiency (90). LNv-Gal4 used in this study has two copies of Pdf-Gal4, on the second and third chromosomes. Similar results for silencing and neuropeptide knockdown were found using a single copy of Pdf-Gal4 on the second chromosome, although effect sizes were smaller (our observation). Wild-type w+iso31 wild-type strains were created by backcrossing Canton S six times into the iso31 background. Detailed genotypes and sample sizes for each experiment are provided in table S1. Origin of each fly stock is shown in table S4. Stocks are available upon request.

Generation of R23E05-LexA and R23E05-Gal80

Standard Gateway cloning protocols (Thermo Fisher Scientific, 11791020 and 11789020) were followed to derive constructs in which either LexA or Gal80 is driven by the R23E05 enhancer. Gtcccgatttcgtcgaaggattcaa forward and gctaaccggatgacggtaccaggag reverse primers were used to polymerase chain reaction (PCR)–amplify a 644-kb enhancer fragment from R23E05-Gal4 flies. This product was subcloned into pBPLexa:P65UW [Addgene plasmid #26231, (91)] or pBPGal80uw-6 [Addgene plasmid #26236, (91)], which were gifts from G. Rubin. Resulting constructs were inserted into the attP2 landing site by embryo injection (Rainbow Transgenics).

Locomotor activity measurements

Male flies, 1 to 9 days old, were collected and individually housed in 65-mm glass tubes with approximately 20 mm of cornmeal agar medium. To avoid cumulative effects of repeated exposure to light, separate cohorts were tested for each trial. They were moved into DigiTherm CircKinetics incubators (Tritech Research, DT2-CIRC-TK) at 25°C and given at least 48 hours to acclimate before experiments began. Female flies were collected as virgins upon eclosion (<1 day old) and group-housed for at least 3 days before testing. Activity and sleep were measured using the TriKinetics Drosophila Activity Monitor System, which counts infrared beam crosses through the midline of the glass tube. Aside from optogenetics experiments, light pulses were delivered using white incubator lights (~260 lux white fluorescent bulbs, ~102 μW/mm2 in the 470-nm range). Most experiments in Fig. 2D and all experiments in fig. S6G and movie S1 were conducted in larger incubators (Percival, DR-41VL) to accommodate video cameras, the mechanical stimulation apparatus, or the large number of locomotor activity monitors required to screen for LNv-downstream neurons (Fig. 2D).


To limit silencing during development and entrainment, flies were entrained by indirect light: They were raised in the same room with ~70 lux white light as other flies undergoing entrainment, but they were kept underneath a shelf. These indirect lighting conditions were sufficient for normal entrainment (table S2). We confirmed that this amount of light had no effect on flies when VGLUT-Gal4 was used to express GtACR1 in motor neurons. We confirmed that the green light stimulus used for our experiments led to an immediate and dramatic paralysis phenotype when GtACR1 was expressed in motor neurons (our observation) (19). For 48 to 96 hours before the experiment, control and experimental flies were fed 50 mM all-trans-retinal (Sigma-Aldrich R2500) that was diluted in 100% ethanol (Koptec, V1001) and coated onto rehydrated potato food (Carolina Bio Supply Formula 4-24 Instant Drosophila Medium, Blue). All-trans-retinal is necessary for GtACR1 to be functional (92), so we hypothesized that supplementing it during adulthood allowed us to avoid some of the off-target consequences of silencing during development or entrainment.

For GtACR1 experiments, six 530-nm green light-emitting diodes (LEDs) (Luxeon Rebel, LXML-PM01-0100) were driven by a 700-mA constant current driver (LuxDrive BuckPuck, 03021-D-E-700) and pulse-width modulated signal to an average intensity of ~202 μW/mm2. LEDs were placed along the wall of the incubator and controlled with an Arduino Uno Rev3 (Arduino, A000066) microcontroller using a custom script. Between replicates, genotypes were positionally counterbalanced within the incubator to control for nonuniform illumination from the light source (LEDs or white fluorescent bulb). Silencing motor neurons with VGlut-Gal4 allowed us to confirm that all flies received enough illumination to access neurons expressing GtACR1 (19, 92), regardless of position within the incubator. Light intensity measurements were recorded using a power meter (Thorlabs, PM100D). Lux measurements were recorded using a light meter (Extech, LT300). The spectra of ambient white light in the laboratory and in experimental incubators were measured with a spectrometer (Thorlabs, CCS200). All reported measurements were taken with devices facing the light source. Power measurements for white light were taken at 470 nm.

Mechanical stimulation

Flies were shaken using a multitube vortexer (TriKinetics TVOR-120) modified to house Drosophila Activity Monitors (TriKinetics). The vortexer was programmed to deliver medium intensity vibrations continuously for an hour.

Courtship assay

Courtship assays were conducted as previously described (93). Briefly, male flies were isolated at least 5 days before the assay to allow recovery of mating drive (93, 94). On the day of the assay, one male was aspirated into a cylindrical chamber (10 mm diameter and 3 mm height) with one virgin w+iso31 female. Flies were videotaped from above using a handheld camera (Canon, Vixia HRF800), and videos were manually scored for courtship behaviors. Courtship indices were calculated from the percentage of time males spent courting females during a 5-min window following courtship initiation (as indicated by unilateral wing extension). If flies did not engage in courtship throughout the entire 15-min assay, they were given a courtship index value of 0. Flies were illuminated from below (~3.7 μW/mm2 measured at 475 nm) using a light pad (Artograph, LightPad 930), in addition to aforementioned overhead white room lighting. Because optogenetic LEDs interfered with the ability to visualize and record flies, we relied on the white light from the light pad as an optogenetic effector. While the lightpad was less intense than the LEDs used in our optogenetic silencing experiments, our control experiments with other drivers showed that this light could penetrate the cuticle to effect GtACR1 in the nervous system. For positive controls, we verified the lightpad’s efficacy in inducing paralysis or extending mating duration in flies where GtACR1 was expressed by VGLUT-Gal4 or Corazonin-Gal4, respectively (our observation) (19, 95).


Flies were anesthetized under CO2. Brains were then dissected in cold Schneider’s medium (Gibco, 21720-001) and immediately fixed in 4% paraformaldehyde (PFA; Electron Microscopy Sciences, 15710). After a 20-min fixation at room temperature, brains were washed three times with phosphate-buffered saline (PBS) containing 0.3% Triton X-100 (Amresco, M143-1L), 20 min per wash, and blocked overnight with 10% donkey serum (Jackson ImmunoResearch, 017-000-121) at 4°C. Primary and secondary antibodies were diluted in donkey serum and incubated with brains for 48 hours each. For Brp (nc82) stainings, the primary antibody incubation was conducted for 72 hours due to the large number of Brp epitopes in the brain. Three 20-min washes were done after primary and secondary antibody incubations.

The following primary antibodies were used: guinea pig anti-Clock antibody (gift from P. Hardin, 1:2000 dilution), chicken anti-GFP antibody (Aves, GFP-1020, 1:1000 dilution), mouse anti-Brp antibody [Developmental Studies Hybridoma Bank (DSHB), NC82, 1:7 dilution], mouse anti-PDF antibody (DSHB, PDF C7, 1:100 dilution), rabbit anti-DsRed antibody (Clontech, 632496, 1:100 dilution), guinea pig anti-Period antibody (gift from A. Sehgal, 1:50 dilution), and rabbit anti-CCHa1 [our laboratory raised antibodies against the peptide QIDADNENYSGYELT (96), Genscript, 1:50 dilution]. The following secondary antibodies were used: donkey anti-mouse 488 (Thermo Fisher Scientific, A-21202, 1:1000 dilution), donkey anti-rabbit 568 (Thermo Fisher Scientific, A-10042, 1:1000 dilution), donkey anti-mouse 647 (Thermo Fisher Scientific, A-31571, 1:1000 dilution), donkey anti–guinea pig 488 (Jackson ImmunoResearch, 703-545-148, 1:100 dilution), donkey anti-chicken 488 (Jackson ImmunoResearch, 703-545-155, 1:100 dilution), donkey anti–guinea pig Cy3 (Jackson ImmunoResearch, 706-165-148, 1:100 dilution), and donkey anti–guinea pig 647 (Jackson ImmunoResearch, 706-605-148, 1:100 dilution).

Tissues were whole-mounted in Prolong Gold antifade reagent (Invitrogen, 1942345) on glass slides and coverslips (Electron Microscopy Sciences, 64321-10, 72230-01). Confocal images were obtained using a Leica SP8 confocal microscope at 10×, 2.4-μm intervals for morphology quantifications, 20×, 1-μm intervals for expression patterns, and 63×, 0.3-μm intervals for imaging of pre- and postsynaptic sites. Maximum projection images and quantifications were obtained using FIJI. Levels of brightness and contrast were adjusted across the whole image using FIJI or Adobe Photoshop.

For quantifications comparing neurite morphologies between mid-day and mid-night, decapitated heads, rather than dissected brains, were fixed because prolonged exposure to light (required for dissections) can modify the operation of the clock. Heads were fixed for 50 min at room temperature with fixative containing 4% PFA and 03.% Triton X-100. For mid-night samples, heads were fixed with minimal light exposure. Decapitations were conducted under dim red light that is less disruptive to the light-sensitive clock protein Cryptochrome (97100). Acquisitions were conducted at 10× due to the large number of samples; as the drivers we used are expressed sparsely, this resolution was sufficient. Because the z axis of the slide/coverslip chamber is slightly shorter than the height of the brain, all of the brains were pressed slightly and in similar orientation.

For trans-Tango experiments, flies were raised for 5 weeks at 18°C, which permits stronger expression than 25°C (41). We often noticed aberrant morphology in cells expressing the trans-Tango construct, likely due to overexpression of neurexin and the cell adhesion molecule ICAM1 at presynaptic sites (41).

Calcium imaging

Experiments were conducted in a 6-hour window centered around periods of putative peak activity (mid-day for DN1a → LNv and mid-night for LNv → DN1a), alternating between control and experimental samples. Ex vivo whole-mount brains were explanted in Nunclon cell culture dishes (Thermo Fisher Scientific, 150318), which contained 3 ml of chilled Drosophila saline [gift from R. Wilson; 103 mM NaCl, 3 mM KCl, 5 mM N-tris (hydroxymethyl) methyl-2-aminoethane-sulfonic acid, 8 mM trehalose, 10 mM glucose, 26 mM NaHCO3, 1 mM NaH2PO4, 1.5 mM CaCl2, and 4 mM MgCl2 (osmolarity adjusted to 270 to 275 mOsm)]. Saline was bubbled with 95/5% carboxygen before the experiment. Brains were dissected in the same medium used to conduct the experiment. Brains in which GCaMP was expressed in LNvs were allowed to rest for 2.5 min before the experiments under the blue imaging light. Brains in which GCaMP was expressed in DN1as were allowed to rest for 5 min before the experiments under the blue imaging light. During this baseline period, we noticed increased large calcium transients (fig. S7, D and F), likely due to control of clock neuron activity by the light-sensitive protein Cryptochrome (101, 102). During pilot experiments, we chose baseline intervals that were usually sufficient to allow activity to stabilize. Two trials were excluded (one experimental and one control) because baseline activities were not stable. These trials are shown as red traces in fig. S7E. For P2X2 experiments, 20 μl of 150 mM ATP (Sigma-Aldrich, A2383), diluted in Drosophila saline, was pipetted gently down the side of the dish to a final concentration of 1 mM. Positive control experiments in which both P2X2 and GCaMP were expressed in LNvs showed that ATP delivered this way could start inducing small changes within a few frames of delivery. Acquisition occurred at 1 frame/s.

Quantifying locomotor activity

Sleep and activity data were analyzed using custom MATLAB software (available on GitHub at and plotted in GraphPad Prism 8 for Macintosh. Activity counts were collected at 1-min intervals. A sleep episode was defined as inactivity lasting at least 5 min (103, 104).

Circadian analysis was conducted using the Cycle-P function in FaasX using 30-min bins (71). Our experiments occurred during the second day of darkness, but rhythmicity, tau, and power of locomotor rhythms (table S2) were calculated during 4 days in darkness. Additional days of analysis allowed us to acquire more accurate measurements (71, 105). This analysis is conservative, because circadian deficits grow stronger with more time spent in darkness (18).

Quantifying morphological imaging data

Measurements were conducted blind using the segmented line tool in FIJI on the maximum intensity projection of whole-brain z-stacks. No obvious daytime-nighttime differences were observed in the z axis for the DN1a ventrolateral tract. For Brp quantifications, acquisitions were done at 63×. The sparsity of synaptic sites along the ventrolateral DN1a tract allows visualization and counting of individual punctae. Brp counts were conducted blind. Each hemisphere was computed as an independent sample because of variability between hemispheres.

Quantifying immunostaining intensity

For quantifications of fluorescence intensities used to validate the efficiency of RNAi, the experimenter was not blinded during quantification, which we deemed acceptable due to the large and consistent effect sizes. Regions of interest were selected using the freehand selection tool in FIJI, on summed intensity projections of whole-brain z-stacks. For measurements of Clock and Period RNAi, intensity measurements were taken within the most visible s-LNv cell body per brain because all 5 s-LNvs could not be easily identified in the knockdown conditions. For measurements of GFP intensity, when comparing the strength of LexA drivers, there was substantial variability between hemispheres. Thus, measurements were taken for both hemispheres and subsequently averaged.

Quantifying ex vivo calcium imaging

Data were analyzed with ImageJ, using the freehand selection tool to choose ~100-μm2 regions of interest from s-LNv dorsal terminals. Only the brighter hemisphere was used for analysis. LNv axons and DN1a dendrites were chosen for quantification because these regions were consistently identifiable, whereas DN1a axons and LNv dendrites were not usually visible with GCaMP6s. For Fig. 3, two to three frames (2 s) of data were removed from each sample because of motion artifacts from pipetting. Unaltered trials are in reported in fig. S7 (E and G). Baseline fluorescence was calculated from the average of 10 frames before ATP delivery, excluding the first frame before ATP. Minimum and maximum fluorescence was calculated using standard Excel functions from all frames after ATP delivery, except for the first five frames, to exclude potential residual motion artifacts. One to three samples per condition showed drift after pipetting; thus, we used an ImageJ registration plugin (TurboReg) to create a new series corrected against a time-series averaged reference. Two nonrepresentative trials (one experimental trial and one control) were excluded from averaged results shown in Fig. 3E. These excluded trials are shown in fig. S7E and were excluded due to unusually large and early depolarizations that were putatively due to the effects of blue light stimulation.

Statistical analysis

All statistical tests were conducted with Prism 8 for Macintosh (GraphPad). All data are presented as means ± SEM. For significance indicators (asterisks) referring to multiple post hoc tests, we conservatively report the largest (least significant) P value from each of the tests. Exact P values are in table S1. Only significant comparisons are indicated in figures. For light probe experiments, group means were compared using a two-way analysis of variance (ANOVA) with Tukey’s post hoc comparisons against all possible conditions. For all behavioral panels using two-way ANOVA, multiple comparisons between time points are not reported, except for fig. S1A. Significant differences between control genotypes are not indicated in figures. We report them here: In Fig. 2I, the two parental controls significantly differed during the day (P = 0.0111); the two parental controls in fig. S4B significantly differed from each other at night (P < 0.0001); and, in fig. S6C, DN1a > GFP was significantly different from both other conditions during the day, P = 0.0384 versus DN1a > CCHa1-RNAi and P = 0.0005 versus UAS-CCHa1-RNAi. Behavioral experiments in main figures each had at least three replicates of approximately 16 flies each. In cases where genotypes were only tested at one time point, we used a one-way ANOVA followed by Tukey’s post hoc test. For imaging experiments where we quantified LNv or DN1a morphology, we treated each hemisphere as a single sample because we noticed substantial variability between hemispheres. In Fig. 4, comparisons between Rho1 overexpression and Rho1-RNAi are also not reported. Power analyses to predetermine sample size were not conducted. Experimenters were not blind to conditions except during quantifications of morphology. Sample sizes are shown in table S1.


Supplementary material for this article is available at

This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial license, which permits use, distribution, and reproduction in any medium, so long as the resultant use is not for commercial advantage and provided the original work is properly cited.


Acknowledgments: We thank our laboratory, the Crickmore laboratory, C. Weitz, M. Do, M. Pecot, G. Fishell, and M. Rosbash for advice and comments on the manuscript. T. Kane assisted with experiments. S. Zhang helped with coding and curated a collection of sparse driver lines from FlyLight. S. Thornquist helped with optogenetics. We thank R. Wilson and laboratory for saline and for calcium imaging advice and C. Harwell for microscope access. For fly stocks, we thank D. Anderson, A. Bergmann, J. Blau, A. Claridge-Chang, M. Crickmore, B. Dickson, P. Hardin, R. Kittel, M. Nitabach, M. Pecot, J. Price, O. Shafer, A. Sehgal, P. Taghert, and R. Wilson. We are especially grateful to G. Rubin and the Howard Hughes Medical Institute’s Janelia Research Campus for access to JRC_SS00681-Gal4 and JRC_SS00645-Gal4 lines before publication. These strains will be described further in Dionne, Rubin, and Nern (manuscript in preparation). For antibodies, we thank P. Hardin and A. Sehgal. Funding: This work was supported by the NSF Graduate Research Fellowship Program (B.J.S., NSF grant no. DGE1144152). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF. B.J.S. was also supported by the NIH (F31 EY027252). D.R. is a New York Stem Cell Robertson investigator. This work was supported by a New York Stem Cell Foundation grant and a Klingenstein-Simons Fellowship Award in the Neurosciences. Author contributions: B.J.S. and D.R. designed the study. B.J.S., S.J.S., and D.R. performed experiments. B.J.S. and D.R. analyzed the data and wrote the paper. Competing interests: The authors declare that they have no competing interests. Data and materials availability: All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Additional data related to this paper may be requested from the authors.

Stay Connected to Science Advances

Navigate This Article