Skip to main content
eLife logoLink to eLife
. 2026 Oct 16;14:RP106148. doi: 10.7554/eLife.106148

Individual dopaminergic neurons induce unique, yet overlapping combinations of behavioural modulations, including safety learning, memory retrieval, and acute locomotion

Naoko Toshima 1,2, Arman Behrad 1,†, Franziska Behnke 1, Gauri Kaushik 2,3, Alice Weiglein 1,‡, Martin Strauch 4,§, Juliane Thoener 1, Oliver Kobler 1, Maia Lisandra M Wang 2,5, Ayaka Fukushima 2,5, Markus Dörr 1,#, Michael Schleyer 1,2,5,✉
Editors: Meet Zandawala6, Albert Cardona7
PMCID: PMC13675010  PMID: 42885570

Abstract

Two evolutionary highly conserved functions of dopamine are to carry ‘teaching’ signals during associative learning and to control movement. In mammals and humans, these functions are generally thought to be produced by different populations of neurons. Here, we investigated in the larva of Drosophila melanogaster whether both these functions can be induced by the same individual dopaminergic neurons in the central brain. Focusing on the dopaminergic neurons of the DL1 cluster, we asked whether the optogenetic activation of individual neurons established associative punishment and/or safety memories, controlled the retrieval of the established memories, and acutely modulated locomotion. We found that each neuron had a unique yet overlapping set of behavioural effects. Several individual neurons both established a memory and modulated acute locomotion by increasing the animals’ bending and decreasing their velocity. Our results demonstrate that individual dopaminergic neurons can fulfil a surprisingly broad range of functions in different behavioural contexts. Given the highly conserved roles of the dopaminergic system across the animal kingdom, this study raises the question whether a similarly diverse functionality can be found also in other animals, including humans.

Research organism: D. melanogaster

Introduction

Dopamine has many functions in the brain. Among them, two turned out to be highly conserved throughout the animal kingdom: to carry ‘teaching’ signals during associative learning and to initiate and control movement (Schultz, 2015; Kaun and Rothenfluh, 2017; Gershman and Uchida, 2019; Speranza et al., 2021; Ryczko and Dubuc, 2023). In mammals and humans, it is widely accepted that these two functions are brought about by different populations of dopaminergic neurons (DANs): effects regarding learning are thought to be elicited by the mesolimbic pathway, effects regarding movement by the nigro-striatal pathway (Speranza et al., 2021). Here, we study in the larva of the fruit fly Drosophila melanogaster whether in contrast the same individual central brain-DANs can induce both functions regarding memory and movement.

The fruit fly larva is an established model organism to study the neuronal and genetic mechanisms underlying associative learning (Widmann et al., 2018; Thum and Gerber, 2019). Due to the numerical simplicity of its brain and the available toolbox for transgene expression, the larva allows investigating these mechanisms at tractable levels of complexity. In D. melanogaster, distinct sets of DANs convey appetitive and aversive unconditioned stimuli (US), respectively (larvae [Widmann et al., 2018; Thum and Gerber, 2019]; adults [Kaun and Rothenfluh, 2017; Boto et al., 2020]) (a similar scenario may be emerging in vertebrates, too [Lammel et al., 2014; Schultz, 2015; Groessl et al., 2018; Menegas et al., 2018; de Jong et al., 2019; Kutlu et al., 2023]). Each of the DANs synapses onto a different compartment of the parallel fibres of Kenyon cells (KCs) that form a higher-order brain structure called mushroom body (larvae [Thum and Gerber, 2019]; adults [Modi et al., 2020]). Odours are combinatorially coded across the array of these KCs, which, in turn, give output to mushroom body output neurons (MBONs). The MBONs collect information across the KCs and send it towards efferent circuitry, promoting either approach or avoidance (larvae [Thum and Gerber, 2019]; adults [Modi et al., 2020]). Within the KCs, the coincidence of odour presentation and activity in DANs is detected and enables a memory trace to be formed. The respective memory engram is thought to come by synaptic depression between the KCs and the MBONs of the same mushroom body compartment, such that the net effect of the activity across the MBONs is tilted towards approach or avoidance, respectively (larvae [Eschbach et al., 2020; Eschbach et al., 2021]; adults [Cohn et al., 2015; Owald et al., 2015]). Electron microscope reconstructions further revealed a direct within-compartment connection from the DANs onto the MBONs (larvae [Eichler et al., 2017]; adults [Takemura et al., 2017]). Thus, each DAN has two main targets: the KCs and the MBONs of its own compartment. The general organisation of this DAN-KC-MBON matrix is likely shared with other insects (Menzel, 2001; Strausfeld et al., 2009; Schürmann, 2016; Kaun and Rothenfluh, 2017).

Three pairs of identified DANs of the dorso-lateral cluster 1 (DL1) have been shown to support aversive learning upon optogenetic activation during Pavlovian conditioning (Eschbach et al., 2020; Weiglein et al., 2021; Weber et al., 2023). In this study, we ask whether those same DANs have additional functions. Specifically, we ask for their role for safety learning, i.e., learning that a cue predicts the absence of a threat; memory retrieval, i.e., whether a memory will be retrieved and affect behaviour; and modulations of acute, innate locomotion. Little is known about how the dopaminergic system controls any of these functions – if at all. By systematically testing the functions of the same DANs across diverse behavioural tasks, we investigate the fundamental organisation of the dopaminergic system: do different individual neurons specialise in each function, or does a single neuron serve multiple functions? Given the highly conserved functionality of the dopaminergic system across the animal kingdom, this study has the potential to provide valuable insights into the dopaminergic organisation of behaviour in any brain.

Results

We focus our study on the DANs that support aversive learning when optogenetically activated, called DAN-d1, DAN-f1, and DAN-g1. We investigated the transgenic expression pattern of the driver strains covering each DAN, and the effects of activating each DAN on learning, memory retrieval, and locomotion.

The used driver strains drive transgene expression in identified DANs

Previous studies had described the expression patterns of the used split driver strains in the central nervous system in detail (Selcho et al., 2009; Rohwedder et al., 2016; Eschbach et al., 2020; Weber et al., 2023). Here, we extended the view on the expression within the whole body. Towards this end, we applied a recent protocol for whole-body visualisations (Kobler et al., 2021). We confirmed the highly specific transgene expression in the brain of the four split-Gal4 driver strains without any detectable expression in the rest of the body (Figure 1A–D, Figure 1—figure supplements 1–4). TH-Gal4 is known to cover almost all DANs in the brain, with the notable exception of the neurons of the primary protocerebral anterior medial (pPAM) cluster (Selcho et al., 2009). We confirm this pattern of transgene expression and in addition found strong expression outside of the brain, in particular in the proventriculus and in hypodermal melanin-producing cells (Figure 1E, Figure 1—figure supplement 5, Figure 1—video 1). This pattern fits to the reported function of dopamine in the hardening and darkening of the insect cuticle (Neckameyer and White, 1993; Verlinden, 2018) and a recent report of TH-Gal4 expression in the adult proventriculus (Erhardt et al., 2023). This result means that any genetic manipulation using TH-Gal4 may affect cells outside of the central nervous system. Finally, we confirm that R58E02-Gal4 covers three of the four pPAM DANs that are missing in the TH-Gal4 expression pattern (Rohwedder et al., 2016), with no expression outside of the central nervous system (Figure 1F, Figure 1—figure supplement 6).

Figure 1. Whole-body expression patterns of dopaminergic neuron (DAN) driver strains.

All driver strains were crossed to an MB247-mCherry-CAAX, UAS-mIFP double effector that will show a mCherry signal (magenta) in the mushroom body and an mIFP signal (yellow) controlled by the driver strain. In addition, autofluorescence in the green range is shown in white. The insert shows a volume-restricted magnification of the CNS region. For images of each separate channel, as well as for genetic controls, see Figure 1—figure supplements 1–6. (A) MB328B, (B) SS02180, (C) SS01716, and (D) MB054B each drive expression in one to three cells per hemisphere (arrowheads) innervating the mushroom body as described previously (Eschbach et al., 2020; Weber et al., 2023). No additional cells were found in the body. (E) TH-Gal4 drives additionally to the expression in the central nervous system (CNS) (arrowheads indicate the dorso-lateral cluster 1 [DL1] cluster) also outside of the brain, most prominently in the melanin-producing cells at the segment barriers and the proventriculus (blue arrows). (F) R58E02-Gal4 drives expression in three cells per hemisphere (arrowheads) innervating the medial lobe of the mushroom body, as previously described (Rohwedder et al., 2016; Schleyer et al., 2020). Scale bars represent 250 µm for the whole body and 50 µm for the inserts.

Figure 1.

Figure 1—figure supplement 1. Full body expression of MB328B>MB247-mCherry-CAAX, UAS-mIFP, and the genetic controls.

Figure 1—figure supplement 1.

(A) The three channels (autofluorescence, mCherry, mIFP) for the experimental genotype (MB328B crossed to MB247-mCherry-CAAX, UAS-mIFP) that are shown as merged image in Figure 1A. (B) Driver control lacking the UAS construct. (C) Effector control crossed to yw. Note that this effector control is shared for all driver strains displayed in the following figure supplements. Next to the whole body, the insert shows a volume-restricted magnification of the CNS region. Blue arrowheads indicate dopaminergic neuron (DAN) cell bodies. Scale bars represent 250 µm for the full body and 50 µm for the inserts.
Figure 1—figure supplement 2. Full body expression of SS02180>MB247-mCherry-CAAX, UAS-mIFP, and the genetic controls.

Figure 1—figure supplement 2.

(A) The three channels (autofluorescence, mCherry, mIFP) for the experimental genotype (SS02180 crossed to MB247-mCherry-CAAX, UAS-mIFP) that are shown as merged image in Figure 1B. (B) Driver control lacking the UAS construct. Next to the whole body, the insert shows a volume-restricted magnification of the CNS region. Blue arrowheads indicate dopaminergic neuron (DAN) cell bodies. Scale bars represent 250 µm for the full body and 50 µm for the inserts.
Figure 1—figure supplement 3. Full body expression of SS01716>MB247-mCherry-CAAX, UAS-mIFP, and the genetic controls.

Figure 1—figure supplement 3.

(A) The three channels (autofluorescence, mCherry, mIFP) for the experimental genotype (SS01716 crossed to MB247-mCherry-CAAX, UAS-mIFP) that are shown as merged image in Figure 1C. (B) Driver control lacking the UAS construct. Next to the whole body, the insert shows a volume-restricted magnification of the CNS region. Blue arrowheads indicate dopaminergic neuron (DAN) cell bodies. Scale bars represent 250 µm for the full body and 50 µm for the inserts.
Figure 1—figure supplement 4. Full body expression of MB054B>MB247-mCherry-CAAX, UAS-mIFP, and the genetic controls.

Figure 1—figure supplement 4.

(A) The three channels (autofluorescence, mCherry, mIFP) for the experimental genotype (MB054B crossed to MB247-mCherry-CAAX, UAS-mIFP) that are shown as merged image in Figure 1D. (B) Driver control lacking the UAS construct. Next to the whole body, the insert shows a volume-restricted magnification of the CNS region. Blue arrowheads indicate dopaminergic neuron (DAN) cell bodies. Scale bars represent 250 µm for the full body and 50 µm for the inserts.
Figure 1—figure supplement 5. Full body expression of TH-Gal4>MB247-mCherry-CAAX, UAS-mIFP, and the genetic controls.

Figure 1—figure supplement 5.

(A) The three channels (autofluorescence, mCherry, mIFP) for the experimental genotype (TH-Gal4 crossed to MB247-mCherry-CAAX, UAS-mIFP) that are shown as merged image in Figure 1E. (B) Driver control lacking the UAS construct. Next to the whole body, the insert shows a volume-restricted magnification of the CNS region. Blue arrowheads indicate dopaminergic neuron (DAN) cell bodies of the dorso-lateral cluster 1 (DL1) cluster. Scale bars represent 250 µm for the full body and 50 µm for the inserts.
Figure 1—figure supplement 6. Full body expression of R58E02-Gal4>MB247-mCherry-CAAX, UAS-mIFP, and the genetic controls.

Figure 1—figure supplement 6.

(A) The three channels (autofluorescence, mCherry, mIFP) for the experimental genotype (R58E02-Gal4 crossed to MB247-mCherry-CAAX, UAS-mIFP) that are shown as merged image in Figure 1F. (B) Driver control lacking the UAS construct. Next to the whole body, the insert shows a volume-restricted magnification of the CNS region. Blue arrowheads indicate dopaminergic neuron (DAN) cell bodies. Scale bars represent 250 µm for the full body and 50 µm for the inserts.
Figure 1—video 1. An animation through the data set used in Figure 1E.
Download video file (12.6MB, mp4)
TH-Gal4 was crossed to MB247-mCherry-CAAX, UAS-mIFP, and both the mCherry-CAAX (magenta) and the mIFP (yellow) signals are shown. The video starts with the larva’s head towards the front left. The second half shows the animal from top. At the end, the z-layers covered by the proventriculus and the melanin-producing cells were removed to allow the cells of the CNS to become visible. Grid spacing: 200 µm.

Some individual DANs establish and retrieve associative memories

In larvae, for many kinds of aversive US, learned behaviour is only observed if the US is present at the moment of memory retrieval (Gerber and Hendel, 2006; Niewalda et al., 2008; Eschbach et al., 2011; El-Keredy et al., 2012; Toshima et al., 2019). For example, we trained groups of larvae with an odour as the conditioned stimulus (CS) and quinine as US and observed an aversive associative memory when we tested the animals in the presence of quinine, but not in its absence (Figure 2A). Learned aversive behaviour therefore can be viewed as an escape from the US, guided by the respective memory – an escape that is pointless in absence of anything to escape from (Schleyer et al., 2011; Schleyer et al., 2013; Schleyer et al., 2015a; Paisios et al., 2017).

Figure 2. Individual dopaminergic neurons (DANs) are sufficient to establish and retrieve aversive memory.

(A) After training wild-type larvae with quinine as unconditioned stimuli (US), associative memory is observed only in the presence of the US but not in its absence. (B) When animals were trained with DAN-d1 activation as US and tested in darkness, memory was retrieved in neither genotype. When tested in the presence of blue light, negative memory scores only in the experimental genotype indicated aversive associative memory. For independent repetitions, see Figure 2—figure supplement 2A–D. (C) As in (B), but with DAN-f1 activation. For an independent repetition, see Figure 2—figure supplement 2E. (D) In the case of DAN-g1, aversive memory scores were observed in the experimental genotype, even in darkness. When tested in blue light, aversive memory scores were observed in all genotypes, but significantly stronger in the experimental genotype. (E) As in (D), but with a combination of DAN-f1 and DAN-g1. For independent repetitions, see Figure 2—figure supplement 2F and G. (F) As in (D), but with the broad TH-Gal4 pattern. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]), * below boxes indicate memory scores significantly different from zero (Wilcoxon signed-rank tests [WSR]). For the underlying source data and the results of the statistical tests, see Source data 1.

Figure 2.

Figure 2—figure supplement 1. Innate odour preferences.

Figure 2—figure supplement 1.

(A) Groups of about 20 larvae were tested for 3 min for their odour preference, either in darkness or blue light. (B) Innate odour preferences of the genotypes used in Figure 2B, tested in darkness or blue light. No differences were found. (C) Innate odour preferences of the genotypes used in Figure 2C. The experimental genotypes displayed a higher odour preference than the controls, independent of the testing condition. Note that this cannot explain the difference in memory score between testing conditions found in Figure 2C. (D) Innate odour preferences of the genotypes used in Figure 2D. No differences were found. (E) Innate odour preferences of the genotypes used in Figure 2E. When tested in light, the experimental genotype displayed a higher odour preference than the effector. Note that this cannot explain the difference in memory score between genotypes tested in darkness as seen in Figure 2E. (F) Innate odour preferences of the genotypes used in Figure 2F. When tested in light, the experimental genotype displayed a higher odour preference than the controls. Note that this cannot explain the difference in memory score between genotypes tested in darkness as seen in Figure 2F. ns above a line indicates non-significance across the whole data set (Kruskal-Wallis test [KW]), * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.
Figure 2—figure supplement 2. Replications of the experiments shown in Figure 2.

Figure 2—figure supplement 2.

(A) Larvae were trained with odour presented either paired or unpaired with blue light activation and tested either in darkness or in blue light. (B) Larvae of the experimental genotype, expressing ChR2-XXL in DAN-d1, showed associative memory only when tested in the presence but not in the absence of the blue light. (C) Larvae of the experimental genotype showed associative memory only when trained with the standard weak light and tested in the presence of light (of the same strength). When they were trained and tested with a higher light intensity, no memories were observed. (D) Larvae of the experimental genotype showed associative memory only when raised in standard food and tested in the presence of light. When they were raised in food with all-trans-retinal added, which has been shown to increase the light sensitivity of ChR2-XXL (von Essen et al., 2011), no memories were observed. (E) Larvae expressing ChR2-XXL in DAN-f1 showed associative memory only when tested in the presence but not in the absence of the blue light. (F) Only the larvae of the experimental genotype, expressing ChR2-XXL in DAN-f1 and DAN-g1, showed associative memory independent of the presence or absence of the unconditioned stimuli (US). The genetic controls displayed no significant associative memory. (G) Larvae of the experimental genotype showed associative memory only when tested in the presence but not in the absence of the blue light. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]), * below boxes indicate memory scores significantly different from zero (Wilcoxon signed-rank tests [WSR]). For the underlying source data and the results of the statistical tests, see Source data 1.
Figure 2—figure supplement 3. Dopaminergic neuron (DAN) activation with CsChrimson establishes memories that are retrieved independent of DAN activation during the test.

Figure 2—figure supplement 3.

(A) Larvae were trained with the odour presented either paired or unpaired with blue (UAS-ChR2-XXL) or red (UAS-CsChrimson) light activation and tested either in darkness or the respective light. (B) In a replication of the experiment shown in Figure 2B, larvae displayed an associative memory only if DAN-d1 was activated also during the test (left). However, if instead of ChR2-XXL the red-shifted channel CsChrimson was used as effector, associative memory scores were observed independent of the activation of DAN-d1 during the test. (C) As in (B), but for DAN-f1. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]), * below boxes indicate memory scores significantly different from zero (Wilcoxon signed-rank tests [WSR]). For the underlying source data and the results of the statistical tests, see Source data 1.

We then asked for the roles of the DL1-DANs for both establishing and retrieving associative memories by employing the same learning experiment, but instead of quinine we used optogenetic DAN activation by blue light as a virtual US. We also tested the innate odour preference of all genotypes, both in darkness and in blue light (Figure 2—figure supplement 1) and observed no evidence that the innate odour preference was modified by activating the respective DANs.

After training with DAN-d1 as virtual US, zero memory scores were observed when the animals were tested in darkness. When tested in blue light, however, the animals of the experimental genotype, but not the controls, showed aversive associative memory (Figure 2B, Figure 2—figure supplement 2A, B). Interestingly, a recent study observed no significant memory with DAN-d1 as virtual US in a similar kind of experiment (Weber et al., 2023). We wondered whether this difference could be attributed to the strength of DAN activation in different experimental setups. We therefore repeated the experiment with two different light intensities and observed an aversive memory only when using the low intensity that we use in all other learning experiments in this study, but not with a 10-fold higher intensity (Figure 2—figure supplement 2C). Moreover, when raising the larvae in food supplemented with all-trans-retinal, which had been shown to increase the effectiveness of our effector ChR2-XXL (Dawydow et al., 2014), no aversive memory could be detected (Figure 2—figure supplement 2D). Thus, it seems that a too strong activation of DAN-d1 prevents the establishment and/or retrieval of an aversive memory.

For DAN-f1, we likewise found an aversive memory that was retrieved only when DAN-f1 was activated also during the test (Figure 2C, Figure 2—figure supplement 2E). Our results indicate that each DAN-d1 and DAN-f1 each is sufficient to establish an aversive memory, which requires the respective DAN to be activated for retrieval.

A previous study used the same driver strains crossed to UAS-CsChrimson as the optogenetic effector in a similar learning experiment and observed learned behaviour also in darkness (Eschbach et al., 2020). Using the same effector and the same intensity of red light stimulation, we were able to replicate these results (Figure 2—figure supplement 3). Thus, the memories induced by either effector differed in the conditions of how they could be retrieved. These results call for caution against using different optogenetic effectors interchangeably.

Some DANs establish memories that can be retrieved independently of the test conditions

Activation of DAN-g1, too, established an aversive memory (Figure 2D). However, in contrast to DAN-d1 and DAN-f1, we found aversive associative memory scores in the experimental genotype independently of the test condition (Figure 2D).

Next, we employed two driver strains that each covers a combination of DANs and activated them using ChR2-XXL. One of them covers DAN-f1 and DAN-g1, the other one, TH-Gal4, covers all three of them, plus many additional cells (Figure 1E). In both cases, we observed associative memories in the experimental genotype both in the absence and in the presence of the US during the test (Figure 2E, F, Figure 2—figure supplement 2F and G).

Notably, in the experiments with these driver strains, we also observed significantly aversive memory scores in the genetic controls when tested in light (Figure 2D–F). Given that this result was found in both driver and effector controls, it was most likely caused by the light itself. Light is known as an aversive US in larvae (von Essen et al., 2011) and has been seen to affect the results of optogenetic experiments before (Weiglein et al., 2021; Toshima and Schleyer, 2024). It is likely that the light naturally activated some aversive DANs through the visual system in addition to those we activated optogenetically in each experiment. Why this aversive effect of the light remained a non-significant trend in the previous experiments (Figure 2B and C) remains unknown. In any case, this observation suggests that any effect of optogenetically activating DANs occurred on top of the light-induced effects. Therefore, we base our conclusions on the comparisons between the genotypes tested under the same light conditions and understand any effect of optogenetically activating a DAN as being additional to potential light-induced DAN activations.

Taken together, activating DAN-g1, alone or with additional DANs, established aversive memories that were retrieved independent of whether the respective DANs were activated during the test.

Individual DANs are sufficient for establishing safety but not punishment memories

Animals can associate stimuli not only with the presence of a threat but also with its absence (Rescorla, 1967; Malaka, 1999). Such safety memory has been found in D. melanogaster but received little attention by the community until recently (larvae [Paisios et al., 2017; Schleyer et al., 2018; Schleyer et al., 2020; Sen et al., 2024]; adults [Jacob and Waddell, 2020; Zhao et al., 2021]). That means a US, such as bitter taste, can establish two different memories: punishment memory after paired training and safety memory after unpaired training (Schleyer et al., 2011; Schleyer et al., 2018; Figure 3A). Critically, our results so far demonstrate that each of the individual DANs was sufficient to establish an associative memory – but not whether this was a punishment memory, a safety memory, or both. Therefore, we next focussed on the animals’ odour preference after paired and unpaired training, respectively, compared to the odour preference of the pooled genetic controls as a baseline. A punishment memory would reveal itself by decreased odour preferences after paired training, a safety memory by increased preferences after unpaired training, compared to the baseline. Due to the rather small effect sizes and high variability of odour preferences, we pooled the data of all independent replications of the experiments (Figure 2, including Figure 2—figure supplements 2 and 3), as well as the genetic controls of each experiment for a post hoc analysis of the odour preference.

Figure 3. Individual dopaminergic neurons (DANs) are sufficient to establish safety memory.

Figure 3.

(A) With quinine as unconditioned stimuli (US), odour preferences after paired training were more negative in the presence than in the absence of the US (left, indicating punishment memory), and after unpaired training were more positive (right, indicating safety memory). (B) Left: after paired training, the animals of the pooled genetic controls and the experimental genotype (DAN-d1>ChR2-XXL) showed the same odour preference, both when tested in darkness or light. Right: after unpaired training, the experimental genotype showed a more positive odour preference than the genetic controls only when tested in light, indicating safety memory. (C) As in (B), but with DAN-f1 activation. (D) Left: for DAN-g1, after paired training, the animals of both the controls and the experimental genotype showed lower odour preferences when tested in the presence than in the absence of light. Right: after unpaired training, animals of the experimental genotype showed higher odour preferences than the controls, irrespective of the testing condition (right). (E) For a combination of DAN-f1 and DAN-g1, the animals of the experimental genotype showed more negative odour preferences than the controls after paired training (left, indicating punishment memory) and more positive preferences after unpaired training (right, indicating safety memory), irrespective of the testing condition. (F) For the TH-Gal4-DANs, similar results as in (E) were observed. ns above a line indicates non-significance across the whole data set (Kruskal-Wallis test [KW]), * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.

For the case of DAN-d1, after paired training, there was no difference in odour preference between the genetic controls and the experimental genotype, nor between the two testing conditions (Figure 3B, left). After unpaired training, in contrast, the larvae of the experimental genotype exerted increased odour preferences when tested under blue light compared to all other groups (Figure 3B, right). This suggests that the activation of DAN-d1 established no punishment memory, but a safety memory. For DAN-f1, we found analogous results (Figure 3C). In the case of DAN-g1, after paired training, we found more negative odour preferences when tested in the presence than in the absence of light, but no difference between the controls and the experimental genotype (Figure 3D, left). This suggests a potential punishment memory by the light, but not by the activation of DAN-g1. After unpaired training, the animals of the experimental genotype showed higher odour preferences than the controls, both in darkness and in light (Figure 3D, right).

Taken together, we found that all three DANs induced only a safety memory after unpaired training, but no punishment memory after paired training (confirming similar results using CsChrimson; Eschbach et al., 2020). The safety memory established by DAN-d1 and DAN-f1 was retrieved only if the respective neuron was activated during the test, whereas the safety memory established by DAN-g1 was, at least partially, also retrieved without neuronal activation.

Combinations of DANs are sufficient for establishing both safety and punishment memories

We next wondered whether the activation of a combination of DANs would be sufficient to induce a punishment memory. For the combination of DAN-f1 and DAN-g1, after paired training, we indeed found more negative odour preferences in the experimental group than in the genetic controls, irrespective of the testing condition (Figure 3E, left). After unpaired training, we found higher odour preferences in the experimental genotype than in the genetic controls (Figure 3E, right). With TH-Gal4, we observed analogous results (Figure 3F).

Taken together, activating DAN-f1 and DAN-g1 together, or activating most DANs in the brain, did establish both a punishment and a safety memory. Both kinds of memory were retrieved irrespective of whether the DANs were activated in the test or not.

Activating the DANs covered by TH-Gal4 modulates the animals’ bending and velocity

Next, we investigated which effect activating the DL1-DANs would have on locomotion.

Using the novel IMBA (Individual Maggot Behaviour Analysis) software for behavioural analyses, we recently had found strong locomotor effects upon optogenetic activation of the DANs covered by TH-Gal4 (Thane et al., 2023). Within the current study, we repeated this experiment in total five times, in two different laboratories and with different parameters (Figure 4—figure supplement 1A). This gave us the opportunity to probe the behavioural effects upon DAN activation for their robustness across experimental repetitions. Groups of around eight experimentally naïve larvae of either the experimental genotype or the driver or effector controls were allowed to crawl freely on an agar-filled Petri dish in darkness. After 30 s, blue light was activated for 30 s, followed by darkness. We video-recorded the animals’ behaviour and analysed it afterwards with the IMBA software (Figure 4A).

Figure 4. Two sets of dopaminergic neurons (DANs) induce opposite effects on locomotion.

(A) Behaviour of cohorts of experimentally naïve larvae was recorded. After 30 s of darkness, blue light was activated for 30 s. The second halves of the dark and light periods are henceforth referred to as ‘baseline’ and ‘stimulation’, respectively. (B) Based on the data from five experiments involving TH>ChR2-XXL and genetic controls within this study, the cross-correlation of 17 behavioural attributes during the baseline period revealed three clusters of inter-correlated attributes. Displayed is the Spearman’s correlation coefficient R for each pair of attributes. Values of 1 (red) indicate perfect positive, values of –1 (blue) perfect negative correlations. (C) A random forest algorithm was trained to classify individuals of the experimental genotype and either genetic control, using their change in behaviour between the baseline and stimulation. Displayed is the relative importance of each behavioural attribute, scaled from 0 (least important) to 100 (most important). (D) Average bending and tail velocity over time. The black and blue bars at the bottom indicate the light regimen. (E) The change in bending upon light stimulation. (F) As in (E), but for the tail velocity. (G) The average relative importance of each attribute cluster, as provided by the random forest. (H–L) As in (D–G), but using R58E02-Gal4 as driver. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.

Figure 4.

Figure 4—figure supplement 1. Random forest analysis of five independent repetitions of the same locomotion experiment.

Figure 4—figure supplement 1.

(A) Summary of the experimental conditions of five independent replications of the locomotion experiment with TH-Gal4 and ChR2-XXL. For the right-most experiment, the larvae were placed on a yeast paste for 4 hr before the experiment (see Materials and methods for details). (B–D) Each column shows the relative importance based on the random forest algorithm of a given experimental replication. (B), (C), and (D) show the attributes of clusters 1, 2, and 3, respectively.
Figure 4—figure supplement 2. Light responses of genetic controls.

Figure 4—figure supplement 2.

(A) Bending over time. Black and blue bars at the x-axis indicate the light regimen. Each line represents the average bending of one genetic control of one of this study’s experiments using strong blue light (specifically, the experiments shown in Figures 4 and 9). The curve of each control was normalised to its bending during the time period between 15 and 30 s to allow comparisons of the shape of the curves independently from the baseline behaviour. Please note that some experiments included only one cycle of light stimulations (these curves end at time point 120 s), others included two cycles. (B) As in (A), but for experiments using weak blue light (shown in Figure 5—figure supplement 1, Figure 9—figure supplement 2). (C) The highest value during the first stimulation of each curve was determined. This peak value was higher for strong than for weak light. (D) The time until the peak of the first stimulation of each curve. No differences were seen between the light intensities. (E–H) As for (A–D), but for the tail velocity. As ‘peak’ value, the lowest tail velocity of each curve during the first stimulation was used. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.
Figure 4—figure supplement 3. Replication of the experiment shown in Figure 4D–G with three stimulation cycles.

Figure 4—figure supplement 3.

(A) Average bending and tail velocity over time. Larvae of all genotypes increased bending and decreased tail velocity upon light stimulation. Both effects were enhanced in the experimental genotype. The black and blue bars at the bottom indicate the light regimen. (B) The average relative importance of all behavioural attributes within each cluster, as provided by the random forest algorithm. (C) A ∆ bending value was calculated in each individual to quantify the change in bending upon light stimulation. This change was significantly increased in the experimental genotype for each light stimulation. (D) As in (C), but only including individuals that were recorded during all three light stimulations. Differences across light stimulations are compared within individuals. The change in bending was reduced for the second and third stimulations in all genotypes. (E–G) As in (C–D), but for the tail velocity. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). In (D) and (F), # and ns above brackets indicate pairwise within-animal significance or non-significance, respectively (Wilcoxon signed-rank tests [WSR]). For the underlying source data and the results of the statistical tests, see Source data 1.
Figure 4—video 1. A sample video of the experiment presented in Figure 4D-G with TH/ChR2-XXL larvae.
Download video file (1,017.6KB, mp4)
The video is played in double speed. Blue light (not visible in the video) was switched on at timestamp 15 s (30 s in real time) and off at timestamp 30 s (60 s in real time). Larval heads are marked in green, tails in red.
Figure 4—video 2. A sample video of the experiment presented in Figure 4H-L with R58E02/ChR2-XXL larvae.
Download video file (1MB, mp4)
The video is played in double speed. Blue light (not visible in the video) was switched on at timestamp 15 s (30 s in real time) and off at timestamp 30 s (60 s in real time).

The IMBA software provides a rich variety of behavioural attributes for individual animals. We selected 17 attributes (for a list and descriptions, see Table 1) and first asked how these attributes relate to each other. Towards this end, we performed a Spearman’s correlation analysis of all 17 attributes based on the animals’ baseline behaviour in darkness. We found three clusters of inter-correlated attributes (Figure 4B). Cluster 1 consists of attributes measuring different aspects of directional changes, e.g., the animals’ bending, or the rate of lateral head movements, the so-called head casts (HC). All attributes of cluster 2 relate to the speed of the larvae’s peristaltic movement. Finally, cluster 3 consists of attributes dealing with the directional bias of the animals’ behaviour. For example, the bending bias measures to which extent an animal was bent more towards one side than another.

Table 1. A list and description of all behavioural attributes used for locomotion analysis in this study.

Name Unit Description Cluster
Bending ∘ The bending angle (BA) is the angle between the larva’s tail vector and a vector from the middle of the larva to its head. Positive values indicate the larva bending to the left, negative values bending to the right.
‘Bending’ in this study refers to the absolute, i.e., direction-independent BA.
1
Bending bias The absolute of the average of all BA values of a larva, divided by the average of all absolute BA values: abs(BA¯)/(abs(BA)¯). The bending bias is constrained between 0 and 1, with 0 indicating a larva was bending equally to left and right, and 1 indicating a larva was only bending into one direction (no matter which direction). 3
HV angular speed ∘s The head vector angular speed (HVAS) is the angular speed of the head vector (HV) through the head of the larva. Positive values indicate movement of the head to the right, negative values to the left.
‘HV angular speed’ in this study refers to the absolute, i.e., direction-independent HVAS.
1
HV angular speed bias Calculated analogous to the bending bias. Constrained between 0 and 1, with 0 indicating a larva was moving its head equally fast to left and right, and 1 indicating a larva was moving its head only into one direction. 3
HV angular acceleration ∘s2 The absolute angular acceleration of the head vector (HV). 1
TV angular speed ∘s The tail vector angular speed (TVAS) is the angular speed of the tail vector (TV) through the rear half of the larva. Positive values indicate movement to the right, negative values to the left.
‘TV angular speed’ in this study refers to the absolute, i.e., direction-independent TVAS.
1
TV angular speed bias Calculated analogous to the bending bias. Constrained between 0 and 1, with 0 indicating a larva was moving its tail equally fast to left and right, and 1 indicating a larva was moving its tail only into one direction. 3
TV angular acceleration ∘s2 The absolute angular acceleration of the tail vector (TV). 1
HC rate HCs The number of head casts (HC) per second. HCs were defined as events of an HVAS larger than 35 °/s or smaller than –35 °/s, respectively. 1
HC rate bias The HC rate of HCs to the left minus the HC rate of HCs to the right, divided by the total HC rate. Constrained between 0 and 1, with 0 indicating a larva had equal HC rates to left and right, and 1 indicating a larva was making HCs in only one direction. 3
HC angle ∘ The head cast angle (HCA) indicates how much the orientation of the animal changes upon each HC. It is defined as the difference between the BA at the end and the beginning of the HC. Positive values indicate that the larva changes its orientation to the left, negative values that it changes its orientation to the right.
‘HC angle’ in this study refers to the absolute, i.e., direction-independent HCA.
1
HC angle bias Calculated analogous to the bending bias. Constrained between 0 and 1, with 0 indicating a larva was making equally large HCs to left and right, and 1 indicating a larva was making HCs in only one direction. 3
Distance travelled bl The distance of the complete path a larva travels during the observation period (measured in body lengths [bl]). 2
Midpoint speed bls The speed of the larva’s midpoint, irrespective of direction. 2
Midpoint acceleration bls2 The absolute acceleration of the larva’s midpoint. 2
Tail velocity bls The velocity of the larva’s tail point in a forward direction, i.e., in the direction of the tail vector. 2
Tail acceleration bls2 The absolute acceleration of the larva’s tail in the direction of the tail vector. 2

Then, we wondered how much each attribute would change upon light stimulation. Towards this end, we calculated a ∆-value of each attribute as an individual’s behaviour during the second half of the light stimulation minus its baseline behaviour during darkness (Figure 4A). We used only the second half of the stimulation to exclude any potential startle-like response to the sudden light. Then, we used a random forest classification algorithm to classify individual larvae between the genotypes based on the 17 ∆-attributes. Crucially, the random forest provides the relative importance of each attribute for the classification. In other words, it can be used to obtain an unbiased measure of how relevant each attribute is for discriminating the behaviour of different genotypes (Thane et al., 2023). We found consistently the attributes of clusters 1 and 2 to be much more important than those of cluster 3 (Figure 4C). Within each cluster, most attributes were on average similarly important, with strong variability both within and across data sets (Figure 4—figure supplement 1).

We concluded that there does not appear to be a single ‘most important’ behavioural attribute that accounts for the differences between the experimental genotype and the genetic controls. Rather, the differences are best described by clusters 1 and 2, representing the amount of bending and directional changes and the peristaltic speed, respectively. Within each cluster, the attributes were strongly correlated (Figure 4B) and varied in importance (Figure 4—figure supplement 1). Therefore, we decided to present the relative importance of each attribute cluster along with each experiment. Additionally, we present one representative attribute of each cluster 1 and cluster 2. We picked bending and tail velocity as intuitive behavioural descriptors that have been used previously (Thane et al., 2023).

Activating different subsets of DANs modulates locomotion in opposite directions

In accordance with our previous results (Thane et al., 2023), we found that the control genotypes increased their bending and decreased their tail velocity upon light stimulation (Figure 4D, Figure 4—video 1). Such responses to blue light have been reported before (Xiang et al., 2010) and were consistently seen throughout this study (Figure 4—figure supplement 2). Both types of behavioural changes were significantly enhanced in the experimental genotype in which the TH-Gal4-DANs were activated (Thane et al., 2023; Figure 4D–F). More specifically, when the DANs were activated, the larvae kept high bending and low velocity throughout the 30 s of light stimulation, whereas the controls gradually reverted towards their normal behaviour (Figure 4D). These results were confirmed by a repetition of the experiment using larger Petri dishes and multiple light stimulations (Figure 4—figure supplement 3). For the random forest, the attributes from clusters 1 and 2 were equally important (Figure 4G).

As TH-Gal4 covers all DANs except those of the pPAM cluster, we next asked whether activation of the pPAM DANs would have a similar effect on locomotion. Towards this end, we used R58E02-Gal4, which covers three out of four pPAM DANs (DAN-h1, DAN-i1, and DAN-j1) (Rohwedder et al., 2016). To our surprise, activation of these DANs decreased bending and increased tail velocity compared to the controls (Figure 4H–K, Figure 4—video 2). More precisely, after an initial reaction to switching on the light, when the pPAM DANs were activated, the larvae reverted to their normal behaviour much quicker than the controls (Figure 4H). Again, the attributes of clusters 1 and 2 were similarly important for the random forest classification (Figure 4L).

Thus, the activation of two non-overlapping sets of DANs had opposite effects on behaviour: activating the TH-Gal4-DANs (including the aversive US-signalling DANs) increased bending and decreased velocity, whereas activating the R58E02-Gal4-DANs (which were shown to signal appetitive US in larvae [Rohwedder et al., 2016; Saumweber et al., 2018; Schleyer et al., 2020] and adults [Liu et al., 2012; Yamagata et al., 2015]) decreased bending and increased velocity.

DANs modulate locomotion independently of the light responses

In the previous experiments, animals of all genotypes displayed a very strong response to the light stimulation. We therefore wondered whether the observed effects upon DAN activation were due to a modulation of this light response or an independent modulation of the animals’ locomotion.

We compared the animals’ behavioural changes in three sets of experiments, activating the DANs with strong blue light, weak blue light, or red light, respectively (Figure 5). When using the about 10-fold lower light intensity, we nevertheless observed rather strong light responses in the controls (Figure 4—figure supplement 2) and robust differences in behaviour upon activation of either set of DANs (Figure 5—figure supplement 1).

Figure 5. Dopaminergic neuron (DAN) activations modulate locomotion independently of light.

(A) Average difference in bending and tail velocity of the experimental group from the control groups over time. Black and blue bars at the x-axis indicate the light regimen. Each curve represents the behaviour of the experimental group minus the pooled controls of a given experiment to indicate the effect of DAN activation, ‘purified’ from the light responses. Compared are experiments using strong blue light (dark blue, Figure 4D) and weak blue light (light blue, Figure 5—figure supplement 1A) with ChR2-XXL as effector and red light (red, Figure 5—figure supplement 2A) with CsChrimson. (B) As in (A), but for the experiments shown in Figure 4H, Figure 4—figure supplements 1E and 2E. (C) For each of the six experiments, the average ∆ bending (left) or ∆ tail velocity (right) of the pooled control groups was taken as the effect size of the light response (x-axis). The ∆ bending or ∆ tail velocity of the experimental group minus those of the pooled control groups was taken as the effect size of DAN activation (y-axis). Note that the left and right graphs use different axes and scaling. The colours match those of (A–B). All experiments using the same driver resulted in similar effect sizes of DAN activation, despite strong differences in effect sizes of the light response.

Figure 5.

Figure 5—figure supplement 1. Dopaminergic neuron (DAN) activations modulate locomotion independently of light intensity.

Figure 5—figure supplement 1.

Replication of the experiments and analyses of the experiments displayed in Figure 4D–L, but using weak blue light during the stimulations. (A, E) Average bending and tail velocity over time. (B, F) Change in bending upon light stimulation. (C, G) Change in tail velocity upon light stimulation. (D, H) Average relative importance of the behavioural attributes within each cluster, as provided by the random forest algorithm. For TH-Gal4, cluster 1 was less important than in the case of strong light, but the change in bending was nevertheless significant. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.
Figure 5—figure supplement 2. Dopaminergic neuron (DAN) activations modulate locomotion independently of effector.

Figure 5—figure supplement 2.

Replication of the experiments and analyses of the experiments displayed in Figure 4D–L, but using CsChrimson as effector and red light stimulation. The experimental groups were larvae expressing CsChrimson in TH-Gal4-DANs (A–D) or R58E02-Gal4-DANs (E–H), fed with all-trans-retinal. The control groups were of the same genotype in standard food without all-trans-retinal. Note that these control animals behaved comparably to an effector control (Figure 5—figure supplement 3), indicating that the DANs were not activated in the controls. (A, E) Average bending and tail velocity over time. (B, F) Change in bending upon light stimulation. (C, G) Change in tail velocity upon light stimulation. (D, H) Average relative importance of the behavioural attributes within each cluster, as provided by the random forest algorithm. Cluster 1 was less important than in the case of blue light, but the changes in bending were nevertheless significant. Strikingly, activating R58E02-Gal4-DANs decreased bending below baseline and increased velocity above baseline rather than just reverting the behaviour back to baseline. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]), * below boxes indicate memory scores significantly different from zero (Wilcoxon signed-rank tests [WSR]). For the underlying source data and the results of the statistical tests, see Source data 1.
Figure 5—figure supplement 3. Comparison of controls for the experiments shown in Figure 5—figure supplement 2.

Figure 5—figure supplement 3.

The change in (A) bending and (B) tail velocity of larvae expressing CsChrimson either under the control of TH-Gal4 or R58E02-Gal4 was compared with the heterozygous effector control. None of the genotypes were raised with all-trans retinal. Overall, the controls showed almost no reaction to the light. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.

Red light reportedly triggers only very mild light responses (Xiang et al., 2010; Eschbach et al., 2021). We therefore next used the red-shifted effector CsChrimson (Liu et al., 2012) and raised larvae either with or without all-trans-retinal, which is necessary for the Chrimson channels to function (Klapoetke et al., 2014). When the larvae were raised with retinal, we observed similar effects as when using ChR2-XXL (Figure 5—figure supplement 2). The control without retinal, in contrast, displayed only very weak responses to the red light (Figure 5—figure supplement 3).

In order to compare the effects of DAN activation between the three experiments, we defined the behaviour of the pooled controls in each experiment as zero and displayed the difference of each experimental group from their respective controls. The behavioural effects of the DAN activations were strikingly similar in the three conditions, both in magnitude and in time course (Figure 5A and B). The only obvious difference was an extended reduction of the tail velocity beyond the activation of the TH-Gal4-DANs that could be seen only when using ChR2-XXL (Figure 5A). This ‘after-effect’ may be due to the reportedly slow closing times of the ChR2-XXL channel (Dawydow et al., 2014).

We wanted to further quantify the relation between the light responses elicited in each experiment and the behavioural effects of the DAN activation. Therefore, we used the mean behavioural changes upon light stimulation of the pooled controls of each experiment as an indicator for the effect size of the light response and the difference in behavioural changes between the experimental groups and the respective controls as an indicator for the effect size of the DAN activation. We found that the effect sizes of the DAN activation were all relatively similar and completely unrelated to the effect sizes of the light responses (Figure 5C).

In summary, we concluded that the observed modulations of bending and tail velocity upon DAN activation occurred independently of the animals’ responses to the light stimulation itself.

Modulations of locomotion do not determine olfactory behaviour

The experiments shown in Figure 5—figure supplement 1 used the same light intensity and genotypes as our previous olfactory experiments with TH-Gal4-DANs (Figure 2F, Figure 2—figure supplement 1F, Figure 3F). Considering the results of both kinds of experiments, two questions arise: how can larvae approach or avoid an odour while the TH-Gal4-DANs are activated (as seen e.g. in Figure 3F) if activating TH-Gal4-DANs completely stops forward locomotion (as seen in Figure 5—figure supplement 1)? And is it possible that the modulations upon DAN activation directly determine the odour preference? To address these questions, we analysed video-recordings of the test phases of the experiments shown in Figure 3F, Figure 2—figure supplement 1F. During innate olfactory preference (Figure 6A–C), we found increased bending and decreased tail velocity when the experimental genotype was tested in light rather than in darkness. Both effects were weaker than those during the locomotion experiments and declined further over time (Figure 6B and C). In other words, in this experiment the animals’ locomotion was only moderately altered, in a way that still allowed them to reach their goal (Figure 6A). A possible reason for the differing strengths of behavioural responses may be the different handling of the animals: in the olfactory experiments, the Petri dish was loaded with the larvae in dimmed room light and placed in the experimental setup, followed by an immediate start of the light stimulation and video-recording. In the locomotion experiments, the larvae were kept in darkness for at least 40 s before the light stimulation started. The sudden light stimulus after a period of darkness may trigger stronger modulations of locomotion.

Figure 6. Dopaminergic neuron (DAN) activation during innate odour preference and learning experiments causes weak locomotion modulations.

Figure 6.

(A) Larvae were video-recorded and their behaviour analysed during the experiment displayed in (A–C) Figure 2—figure supplement 1F (innate odour preference), (D–F) Figure 3F (paired training), and (G–I) Figure 3F (unpaired training). (A) Larvae of all genotypes and conditions approached the odour over time, with the experimental genotype (TH>ChR2-XXL) tested in light (blue) having the strongest preference (see Figure 2—figure supplement 1F). (B) The larvae of the experimental genotype had a higher average bending in blue light (blue) than in darkness (black). The driver control, too, had a higher bending in light (pink) than in darkness (dark grey) for the first third of the experiment. (C) The larvae of the experimental genotype showed a lower tail velocity in light than in darkness during the first half of the experiment. (D) After paired training, the larvae avoided the odour over time, with the experimental genotype showing the strongest aversion, especially when tested in light (see Figure 3F, left). (E) Only in the first 10 s of the experiment, the larvae of the experimental genotype showed stronger bending in light than in darkness. (F) The larvae of all genotypes and conditions had a similar tail velocity, with a small peak in the first 20 s. (G) After unpaired training, the larvae approached the odour, with the larvae of the experimental genotype having the highest preference, especially when tested in light (see Figure 3F, right). (H–I) As in (E–F), but after unpaired training. (K) No correlation between the bending of individual animals during the first 60 s of all three experiments and their odour preference in the following 60 s. (L) As in (K), but for the tail velocity. Displayed is Spearman’s correlation coefficient R as an indicator of the correlation. For the underlying source data and the results of the statistical tests, see Source data 1.

During the testing phase after paired training (Figure 6D–F) and unpaired training (Figure 6G–I), the locomotion effects were even weaker: the experimental genotype showed only a small peak in bending within the first approximately 10 s of the test (Figure 6E and H) and was not different from the other genotypes in terms of forward velocity (Figure 6F and I). It appears that the repeated exposure to both light and DAN activation during the training further reduced the modulations of locomotion.

Notably, although bending and velocity were very similar after paired and unpaired training in the experimental genotype, the animals’ odour preference was drastically different, with strong avoidance after paired training (Figure 6D) and approach after unpaired training (Figure 6G). This suggests that the preference is not directly dependent on locomotion modulations. Next, we addressed this question more directly. We asked whether the bending or tail velocity of each individual larva within the first 60 s would be correlated with its average preference (i.e. its position on the dish) during the following 60 s, which would be indicative of a causal relationship. However, no such correlation was found (Figure 6K and L), suggesting that the types of locomotion modulations we study here do not have a direct impact on odour preference. This is consistent with previous studies, which identified the timing and direction of reorientation events with respect to the odour as the major determinants of olfactory preference (Gomez-Marin et al., 2011; Schleyer et al., 2015b; Paisios et al., 2017; Thane et al., 2023).

Different subsets of DANs convey opposite acute valence when activated

Next, we asked how to interpret the behavioural effects of activating DANs. Stopping and turning around upon a sudden activation of TH-Gal4-DANs can be interpreted as a reaction to an aversive signal (Xiang et al., 2010; Eschbach et al., 2021) – on the other hand, slowing down and turning on the spot could also be a behavioural strategy to stay in a pleasant situation. Likewise, going straight and speeding up upon R58E02-Gal4-DAN activation can be interpreted as a ‘go on’ reaction to an appetitive signal or a strategy to escape. In both larvae and adult flies, the artificial activation of TH-Gal4-DANs and R58E02-Gal4-DANs induce aversive and appetitive memories, respectively (Liu et al., 2012; Yamagata et al., 2015; Rohwedder et al., 2016; Felsenberg et al., 2018; Saumweber et al., 2018; Schleyer et al., 2020; Lozada-Perdomo et al., 2025). However, studies in adults suggest that acute valence (approach/avoidance) and associative valence (appetitive/aversive US) are often not correlated (Rohrsen et al., 2021; Mohammad et al., 2024; Lozada-Perdomo et al., 2025). Therefore, to test for the valence of activation of either set of DANs in larvae, we performed choice experiments between a dark and an illuminated half of a Petri dish (Figure 7A). Larvae of all genotypes avoided the illuminated half as expected (Xiang et al., 2010; von Essen et al., 2011). Relative to the genetic controls, larvae with TH-Gal4-DANs activated showed more avoidance, and larvae with R58E02-Gal4-DANs showed more approach (Figure 7B and C, Figure 7—videos 1–2). With CsChrimson as effector and red instead of blue light, larvae had a positive preference for having their R58E02-Gal4-DANs activated (Figure 7—figure supplement 1A). We next analysed the animals’ behaviour near the dark-light border. When activating TH-Gal4-DANs, the animals’ bending was increased and their velocity decreased on the illuminated half compared to the controls (Figure 7D–F), similar to our previous experiments (Figure 4). When activating R58E02-Gal4-DANs, the animals’ bending was decreased and their velocity increased compared to the controls everywhere on the dish (Figure 7G–I, Figure 7—figure supplement 1B–D).

Figure 7. Different subsets of dopaminergic neurons (DANs) convey opposite acute valence when activated.

(A) Larvae were given the choice between a dark and an illuminated (weak blue light) half of a Petri dish and their behaviour was recorded for 3 min. Animals were placed into the dark half at the dish. Displayed are two sample tracks for animals of TH>ChR2-XXL. (B) The light preference after 3 min. All genotypes showed light avoidance, which was enhanced in the experimental genotype. (C) As in (B), but for R58E02-Gal4 as driver. The experimental genotype showed less light avoidance than the controls. (D) Average bending and tail velocity of TH>ChR2-XXL and genetic controls over the X coordinate of the Petri dish, with 0 indicating the midline. The black and blue bars at the bottom indicate which half was illuminated. (E) The average bending on the illuminated side of the dish. We limited the analysis to an area up to 15 mm from the midline (indicated as stippled line in A) to capture the behaviour in the choice zone. (F) As in (E), but for the tail velocity. (G–I) As in (D–F), but for R58E02-Gal4 as driver. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.

Figure 7.

Figure 7—figure supplement 1. Independent repetition of the experiment of the experiment shown in Figure 7C with CsChrimson as effector.

Figure 7—figure supplement 1.

(A) The light preference after 3 min. Larvae raised on food with ATR showed a preference for the light, whereas control larvae raised without ATR did not. This indicates that the larvae preferred to have the neurons covered by R58E02-Gal4 activated. (B) Average bending and tail velocity of R58E02>CsChrimson raised with or without ATR over the X coordinate of the Petri dish, with 0 indicating the midline. The black and red bars at the bottom indicate which half was illuminated. (C) The average bending on the illuminated side of the dish. We limited the analysis to an area up to 15 mm from the midline to capture the behaviour in the choice zone. (D) As in (C), but for the tail velocity. Overall, the effects on bending and tail velocity were qualitatively comparable to the experiments with ChR2-XXL, but with a reduced magnitude (please note the truncated y-axis). * above brackets indicate pairwise significance (Mann-Whitney U-tests [MW]), * below boxes indicate significant differences from zero (Wilcoxon signed-rank tests [WSR]). For the underlying source data and the results of the statistical tests, see Source data 1.
Figure 7—video 1. A sample video of the experiment presented in Figure 7B with TH/ChR2-XXL larvae.
Download video file (1.5MB, mp4)
The video is played in double speed. The right half of the dish was illuminated with blue light (not visible in the video) throughout the experiment.
Figure 7—video 2. A sample video of the experiment presented in Figure 7C with R58E02/ChR2-XXL larvae.
Download video file (1.4MB, mp4)
The video is played in double speed. The right half of the dish was illuminated with blue light (not visible in the video) throughout the experiment.

Taken together, we concluded that activating TH-Gal4-DANs conveys an acute aversive signal and activating R58E02-Gal4-DANs conveys an acute appetitive signal. The animals’ reaction to the sudden activation of these DANs should therefore be interpreted as aversive and appetitive behaviour, respectively.

The modulations of bending and velocity are dopamine-dependent

Several DANs have been found to have additional neurotransmitters (Eichler et al., 2017; Aso et al., 2019). Therefore, we wondered whether the observed effects on locomotion were indeed dependent on dopamine signalling. Towards this end, we combined optogenetic activation by ChR2-XXL with TH-RNAi, which knocks down the expression of tyrosine hydroxylase, the rate-limiting enzyme of dopamine synthesis. Thus, when both effectors are expressed in a set of DANs, these DANs can get activated by light but have a reduced dopamine synthesis. We found that animals with the ple-dsRNA (TH-RNAi) construct have a higher baseline bending before stimulation than without, irrespective of the presence of TH-Gal4 (Figure 8A and B). In addition, the baseline tail velocity was increased in the animals expressing both effectors in the TH-Gal4-DANs (Figure 8A and C). These observations suggest that the TH knockdown was effective in modulating behaviour. Upon stimulation, we found an increased bending in both genotypes that expressed ChR2-XXL compared to the genetic controls. This increase was slightly smaller in animals with the TH-RNAi (Figure 8D, 3rd and 5th group from left). The change in tail velocity upon DAN activation was unaffected by the TH-RNAi (Figure 8E, 3rd and 5th group from left). The attributes of clusters 1 and 2 were both important to discriminate between the genotypes, suggesting that the TH-RNAi did also affect attributes related to forward locomotion to some extent (Figure 8F and G). Nevertheless, the effects of the TH-RNAi were overall rather weak. There are several possible reasons for this lack of effects, including a too weak knockdown of tyrosine hydroxylase by the ple-dsRNA construct used, or a developmental adaptation to the reduced dopamine levels. Therefore, we next sought to inhibit tyrosine hydroxylase by an independent and acute technique.

Figure 8. The effects on locomotion upon dopaminergic neuron (DAN) activation are dopamine-dependent.

(A) Average difference in bending and tail velocity of the experimental groups from the control groups over time. Black and blue bars at the x-axis indicate the light regimen. (B) The animals’ average bending during the baseline period (15–30 s) in darkness. Both genotypes including the ple-dsRNA (TH-RNAi) construct displayed increased bending, suggesting a genetic background effect. (C) As for (B), but for the tail velocity. Animals expressing ple-dsRNA had an increased velocity compared to all other genotypes. (D) The change in bending upon the first light stimulation. This change was significantly increased in the experimental genotype and slightly reduced when in addition expressing ple-dsRNA. (E) As in (D), but for the tail velocity. (F) The average relative importance of all behavioural attributes within each cluster, as provided by the random forest algorithm when comparing TH>ChR2-XXL with the genetic controls. (G) The average relative importance of each attribute cluster for a comparison between animals with and without TH-RNAi. (H–O) As for (A–G) but feeding the TH inhibitor 3IY instead of inducing TH-RNAi. The changes in both bending and tail velocity upon light stimulation for animals fed the TH inhibitor 3IY were statistically different from animals without 3IY feeding and not statistically different from the genetic controls. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.

Figure 8.

Figure 8—figure supplement 1. Two independent replications of the experiments shown in Figure 8H–O.

Figure 8—figure supplement 1.

(A, G) Average bending and tail velocity over time. The black and blue bars at the bottom indicate the light regimen. (B, H) The average relative importance of all behavioural attributes within each cluster, as provided by the random forest algorithm. (C, I) The animals’ average bending during the baseline period (15–30 s) in darkness. (D, K) As for (C,I), but for the tail velocity. Feeding 3IY reduced the tail velocity. (E, L) The change in bending upon the first light stimulation. This change was significantly decreased in animals fed with 3IY. (F, M) As in (E, L), but for the tail velocity. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.

Larvae were fed the tyrosine hydroxylase inhibitor 3IY for 4 hr before the experiment, following established protocols (Neckameyer, 1996; Thoener et al., 2021). 3IY-fed larvae showed different baseline behaviour compared to animals without 3IY, but overall, the differences were less pronounced than in the case of TH-RNAi (Figure 8H–K). Interestingly, the baseline tail velocity was decreased rather than increased compared to animals without 3IY feeding (Figure 8K). This means inhibiting the activity of tyrosine hydroxylase acutely or during the whole development had opposite effects on the baseline tail velocity. Upon DAN activation, 3IY-fed animals increased their bending less and reduced their tail velocity less than animals without 3IY, in both cases to levels comparable to the genetic controls (Figure 8L–O). These effects, both regarding the changes in bending and tail velocity, as well as the shifted baseline velocity, were replicated in two independent experiments (Figure 8—figure supplement 1).

Taken together, we concluded that the locomotor effects upon activation of the TH-Gal4-DANs were largely dopamine-dependent, although we note that this conclusion is based mostly on inhibiting the tyrosine hydroxylase acutely with 3IY.

Individual DANs are sufficient to increase bending and decrease velocity

Given the broad expression pattern of TH-Gal4, we wondered which cells were responsible for the observed modulations of bending and velocity. Therefore, we probed the DANs of the DL1 cluster individually with experiments that included two cycles of light stimulation (Figure 9—figure supplement 1). Overall, we found similar differences between the experimental genotype and the controls upon both stimulations, but more enhanced during the second stimulation.

For DAN-d1, we found that the experimental genotype displayed an increased bending and decreased tail velocity compared to the controls that remained trends for the first stimulation (Figure 9—figure supplement 1A–C) and were statistically significant for the second stimulation (Figure 9A–D). The effect on bending seemed to be somewhat weaker than for TH-Gal4 and expressed itself in a delayed peak rather than a general increase. The tail velocity, in contrast, was reduced to zero in both cases (compare Figures 4D–G–9A–D). However, using weaker light did not result in any significant differences between the experimental genotype and the controls, in contrast to the case of TH-Gal4 (compare Figure 5—figure supplement 1A–C, Figure 9—figure supplement 2A–C). Thus, activating DAN-d1 individually has similar effects as activating all neurons covered by TH-Gal4, but two stimulations of strong light were required to fully induce these effects.

Figure 9. Individual dopaminergic neurons (DANs) are sufficient to modulate bending and tail velocity.

(A) Average bending and tail velocity over time. The black and blue bars at the bottom indicate the light regimen. Note that the second light stimulation is shown. For the full time course and a quantification of the first stimulation, see Figure 9—figure supplement 1. (B) The change in bending upon the second light stimulation was significantly increased when DAN-d1 was activated. (C) As in (B), but for the tail velocity. (D) The average relative importance of each attribute cluster, as provided by the random forest algorithm. Cluster 2 was clearly most important. (E–G) As in (A–C), but for DAN-f1. As no effects of DAN-f1 activation were seen, no random forest was applied. (H–L) As in (A–D), but for DAN-g1. (M–P) As in (A–D), but for a combination of DAN-f1 and DAN-g1. ns above a line indicates non-significance across the whole data set (Kruskal-Wallis test [KW]), * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.

Figure 9.

Figure 9—figure supplement 1. Individual dopaminergic neurons (DANs) are sufficient to modulate bending and tail velocity.

Figure 9—figure supplement 1.

(A) Average bending and tail velocity over time. Notably, the difference between controls and experimental genotype (DAN-d1>ChR2-XXL) was more pronounced at the second stimulation. Partially, this was due to a more transient light response of the controls. The black and blue bars at the bottom indicate the light regimen. (B) The change in bending upon the first light stimulation. (C) As in (B), but for the tail velocity. (D–F) As for (A–C), but for DAN-f1. (G–I) As for (A–C) but for DAN-g1. (K–M) As for (A–C) but for a combination of DAN-f1 and DAN-g1. ns above a line indicates non-significance across the whole data set (Kruskal-Wallis test [KW]), * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.
Figure 9—figure supplement 2. Activation of individual dopaminergic neurons (DANs) with weak light is not sufficient to modulate locomotion.

Figure 9—figure supplement 2.

(A) Average bending and tail velocity over time. The black and blue bars at the bottom indicate the light regimen. (B) The change in bending upon the second light stimulation. There was no difference between the genotypes. (C) As in (B), but for the tail velocity. (D–F) As for (A–C), but for DAN-f1. (G–I) As for (A–C) but for DAN-g1. (K–M) As for (A–C) but for a combination of DAN-f1 and DAN-g1. ns above a line indicates non-significance across the whole data set (Kruskal-Wallis test [KW]), * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1.

Next, we repeated the same experiments for DAN-f1 and DAN-g1. We found no effects on locomotion upon activating DAN-f1 (Figure 9E–G, Figure 9—figure supplement 1D–F, Figure 9—figure supplement 2D–F). For DAN-g1, we found both significantly increased bending and decreased velocity, again only for strong light and clearer during the second activation, just like for DAN-d1 (Figure 9H–L, Figure 9—figure supplement 1G–I, Figure 9—figure supplement 2G–I). Finally, we activated DAN-f1 and DAN-g1 simultaneously and found increased bending and decreased velocity comparable to the activation of DAN-g1 alone (Figure 9M–P, Figure 9—figure supplement 1K–M, Figure 9—figure supplement 2K–M).

Taken together, our experiments demonstrated that two of the three tested DANs, when activated individually, induced qualitatively similar effects on bending and velocity that also the combination of almost all DANs induced.

Discussion

In this study, we found that the optogenetic activation of the same individual DANs can have multiple effects in establishing associative memories, retrieving memories and acutely modulating innate locomotion (Figure 10A). How can such diverse functions be integrated into the same neuronal circuit?

Figure 10. Summary and working hypothesis.

(A) A table summarising the findings of this study as well as of a related recent study (Schleyer et al., 2020) for each dopaminergic neuron (DAN). (B) Aversive and appetitive memories are established via synapses between aversive US-signalling DANs (DAN-AV) and appetitive US-signalling DANs (DAN-AP) with Kenyon cells (KCs). Memories are stored in the strength of the synapses between the KCs and the respective mushroom body output neurons (MBONs), and memory retrieval is thought to be controlled via the DAN→MBON synapses. The balance of the MBON signals determines the resulting behaviour (appetitive or aversive). (C) The synapses on the DAN are organised in clusters with DAN→KC and DAN→MBON in the centre, surrounded by KC→DAN synapses. One sample cluster is schematically displayed. For more details, see Figure 10—figure supplement 1. (D–G) For clarity, only DAN-AV is shown. Thickness of arrows indicate relative strength of synapses and MBON activity, respectively. (D) Paired training with DAN-AV activation depresses the KC→MBON-AP synapses, shifting the balance towards aversion. (E) Unpaired training, in turn, potentiates the KC→MBON-AP synapses, shifting the balance towards approach. (F) DAN-AV activation may directly inhibit the MBON-AP, inducing acute aversive locomotor changes. (G) Alternatively, DAN-AV activation may acutely depress signals from the KC to the MBON-AP.

Figure 10.

Figure 10—figure supplement 1. Synaptic organisation of the dorso-lateral cluster 1 (DL1) cluster dopaminergic neurons (DANs).

Figure 10—figure supplement 1.

(A) Top: conditioned stimulus (CS) information is signalled towards the mushroom body Kenyon cells (KCs). DAN-d1 and most KCs on both hemispheres establish mutual synapses, and both DAN-d1 and KCs provide output to four mushroom body output neurons (MBONs). For simplicity, only synapses with the left DAN-d1 are shown. Middle: truncated dendrogram of the left DAN-d1 based on EM microscopy of stage 1 larvae (Eichler et al., 2017; Saumweber et al., 2018). The positions of all synapses with MBONs are indicated in the colours shown in the top sketch. Bottom: the positions of all synapses with KCs are indicated in purple. (B–C) As in (A), but for DAN-f1 and DAN-g1, respectively. Note that DAN-g1 only innervates the contralateral mushroom body. *: this MBON has no synapses with the respective DAN in stage 1, but innervates the compartment in stage 3; #: this MBON establishes synapses with the respective DAN in stage 1 but is not found in stage 3 (Eichler et al., 2017; Saumweber et al., 2018). (D) The synapses are organised in clusters. Displayed are six sample clusters of the left DAN-f1. (E) Distances of all synapses within each cluster from the cluster centre. For all six DANs, KC→DAN synapses are further away from the centre than the other synapse types. * and ns above brackets indicate pairwise significance or non-significance, respectively (Mann-Whitney U-tests [MW]). For the underlying source data and the results of the statistical tests, see Source data 1. For high-resolution dendrograms of both the left and right DANs, see Figure 10—figure supplements 2–7.

Figure 10—figure supplement 2. High-resolution dendrograms of the left DAN-d1.

Figure 10—figure supplement 2.

For clarity, the synapses with Kenyon cells (KCs) and other synapses are displayed separately. (A) Only synapses with mushroom body output neurons (MBONs); (B) only synapses with KCs. All other synapses are represented with transparent grey symbols. Circles display synapses from the given dopaminergic neuron (DAN) to other neurons, triangles synapses from other neurons to that DAN. The colour code is given on the top left.

Figure 10—figure supplement 3. High-resolution dendrograms of the right DAN-d1.

Figure 10—figure supplement 3.

For clarity, the synapses with Kenyon cells (KCs) and other synapses are displayed separately. (A) Only synapses with mushroom body output neurons (MBONs); (B) only synapses with KCs. All other synapses are represented with transparent grey symbols. Circles display synapses from the given dopaminergic neuron (DAN) to other neurons, triangles synapses from other neurons to that DAN. The colour code is given on the top left.

Figure 10—figure supplement 4. High-resolution dendrograms of the left DAN-f1.

Figure 10—figure supplement 4.

For clarity, the synapses with Kenyon cells (KCs) and other synapses are displayed separately. (A) Only synapses with mushroom body output neurons (MBONs); (B) only synapses with KCs. All other synapses are represented with transparent grey symbols. Circles display synapses from the given dopaminergic neuron (DAN) to other neurons, triangles synapses from other neurons to that DAN. The colour code is given on the top left.

Figure 10—figure supplement 5. High-resolution dendrograms of the right DAN-f1.

Figure 10—figure supplement 5.

For clarity, the synapses with Kenyon cells (KCs) and other synapses are displayed separately. (A) Only synapses with mushroom body output neurons (MBONs); (B) only synapses with KCs. All other synapses are represented with transparent grey symbols. Circles display synapses from the given dopaminergic neuron (DAN) to other neurons, triangles synapses from other neurons to that DAN. The colour code is given on the top left.

Figure 10—figure supplement 6. High-resolution dendrograms of the left DAN-g1.

Figure 10—figure supplement 6.

For clarity, the synapses with Kenyon cells (KCs) and other synapses are displayed separately. (A) Only synapses with mushroom body output neurons (MBONs); (B) only synapses with KCs. All other synapses are represented with transparent grey symbols. Circles display synapses from the given dopaminergic neuron (DAN) to other neurons, triangles synapses from other neurons to that DAN. The colour code is given on the top left.

Figure 10—figure supplement 7. High-resolution dendrograms of the right DAN-g1.

Figure 10—figure supplement 7.

For clarity, the synapses with Kenyon cells (KCs) and other synapses are displayed separately. (A) Only synapses with mushroom body output neurons (MBONs); (B) only synapses with KCs. All other synapses are represented with transparent grey symbols. Circles display synapses from the given dopaminergic neuron (DAN) to other neurons, triangles synapses from other neurons to that DAN. The colour code is given on the top left.

A working model for the establishment and retrieval of punishment and safety memories

All the DANs of the mushroom body share a similar circuitry (Figure 10B). They receive various input outside of the mushroom body neuropil, both from post-sensory interneurons and feedback pathways from the mushroom body output (Eichler et al., 2017; Eschbach et al., 2020; Weber et al., 2023). A previous analysis of the inputs to the DANs of the DL1 cluster revealed that they integrate gustatory, somatosensory, thermosensory, and olfactory input along with internal signals (Weber et al., 2023). The two major downstream partners of each DAN are the KCs of the mushroom body, as well as the MBONs innervating the same compartment as the DAN (Eichler et al., 2017; Widmann et al., 2018; Thum and Gerber, 2019; Eschbach et al., 2021; Figure 10—figure supplement 1A–C, Figure 10—figure supplements 2–7). The behavioural effects of the DANs are most likely executed via the MBONs, as they are the only obvious connection from the DANs to motor control (Eschbach et al., 2021). Most evidence, both from larval and adult Drosophila, suggests that memories are established via the DAN→KC synapses (see below). We suggest that, in turn, the DAN→MBON synapses may gate the memory retrieval (Figure 10B). Notably, these two kinds of synapse are not spatially segregated. Rather, DAN→KC, DAN→MBON, and KC→DAN synapses form several dense clusters on the DAN, with the DAN→KC and DAN→MBON synapses more to the centre, and the KC→DAN synapses more on the outside of each cluster (Figure 10—figure supplement 1D–E). In many cases, one cluster contains synapses with several different MBONs, and several clusters contain synapses with the same MBON (Figure 10C). We had demonstrated the same clustered pattern already for DAN-i1 (Schleyer et al., 2020). The potential function of this arrangement remains speculative, but it may indicate that these clusters form functional units, each of them with all necessary synaptic connections for both memory formation and memory retrieval.

In the following, we use the d-compartment (lateral appendix) of the mushroom body as an example. During training, the presence of an aversive US is signalled by DAN-d1 towards the mushroom body. The coincidence of dopaminergic input and activation of the KC by an odour during paired training is detected by the type I adenylate cyclase and results in presynaptic depression of the KC→MBON synapses (larvae [Widmann et al., 2018; Thum and Gerber, 2019]; adults [Cognigni et al., 2018; Tumkaya et al., 2018]). This leads to less drive towards approach-promoting MBONs and hence to odour avoidance (Figure 10D) (larvae [Eschbach et al., 2021]; adults [Aso et al., 2014b; Hige et al., 2015; Owald et al., 2015; Felsenberg et al., 2018]). For the case of the larval d-compartment, MBON-d1 was shown to be indeed approach-promoting, MBON-d2 and d3 did not show any behavioural effect, and MBON-p1 has not been tested so far (Eschbach et al., 2021). Thus, the KC→MBON-d1 synapses are the best candidates for harbouring a memory established by DAN-d1.

Presenting an odour unpaired from DAN activation can lead to potentiation of the KC→MBON synapses (Cohn et al., 2015; Figure 10E). The details of this process are not well understood, but at least two scenarios seem plausible: (1) It has been shown that some DANs can confer opposite valence when activated or inhibited, respectively (Yamagata et al., 2016). In our experiments, DANs may be inhibited after a previous US presentation via the feedback neurons from the MBONs to the DANs (Aso et al., 2014a; Eschbach et al., 2021). Alternatively, a decrease in the dopamine signal after activating the DAN could have an effect similar to an inhibition. In either case, this opposite-valence dopamine signal could be associated with the unpaired odour. (2) The same dopamine signal has been shown to have opposite effects on the internal signalling in KCs depending on their activity state (Handler et al., 2019). Such an effect could lead to opposite modulations of the KC→MBON synapse, depending on whether the DAN signal is detected while the KC is active (during paired training) or not (during unpaired training). These opposite modulations would drive avoidance or approach towards the odour, respectively. In the case of DAN-d1, only the odour approach after unpaired training, indicating safety learning, was observed (Figures 3B and 10E).

Previous studies in both adult and larval Drosophila have demonstrated that an odour that was paired with the end of an aversive US gains a positive learned valence through a process called relief learning (Tanimoto et al., 2004; Gerber et al., 2014; Handler et al., 2019; Weiglein et al., 2021) (an analogous process has been observed for appetitive US, too [Saumweber et al., 2018; Thoener et al., 2022]). The fact that both kinds of learning establish appetitive valences for stimuli paired with the absence (safety) or the end (relief) of the aversive US raises the question whether the same learning process may underlie both observations. As our experiments include three training cycles following each other immediately, the odour was presented several times after the virtual US in each of our unpaired training experiments. However, in a previous study, optogenetic activation of only DAN-f1 but not DAN-d1 supported relief learning (Weiglein et al., 2021), whereas we observed similar levels of safety learning for both neurons (Figure 3). In a recent study, we observed unpaired memory with an appetitive US even with only a single presentation of first the odour and then the US, and thus, with the odour never being presented after the US (Rahman et al., 2026). To clarify whether safety learning is a different process from relief learning, an analogous experiment with an aversive US would be required. In any case, it remains possible that these learning processes share the underlying circuit mechanisms.

During the test, the presence of the US is signalled by DAN-d1 and provides a gating signal. This signal is most likely received by the MBONs, which are known to be necessary for the expression of learned behaviour (larvae [Saumweber et al., 2018; Eschbach et al., 2021]; adults [Séjourné et al., 2011; Plaçais et al., 2013; Bouzaiane et al., 2015; Owald et al., 2015; Shyu et al., 2017; Wu et al., 2017]). Such a gating signal in the simplest case could be a logical ‘AND’ gate: for learned behaviour to occur, both the changed drive from the KC onto the MBON and the DAN gating signal to the MBON are required. The consequence is that any associative memory established by the modified KC→MBON-d1 synapses can only take effect behaviourally if DAN-d1 is activated also during the test, just as we observed (Figure 2B).

How the mushroom body circuit can account for the modulations of acute locomotion

So far, very little is known about how the mushroom body-innervating DANs could modulate innate locomotion. We consider two simple scenarios to explain our observations, a reduced velocity and increased bending upon activation of DAN-d1 (Figure 9A–D): (1) the DAN-d1→MBON-d1 synapse acts inhibitory such that an activation of DAN-d1 silences the approach-promoting MBON-d1 (Figure 10F); (2) the signal from the DAN-d1→KC synapse reduces the drive from the KCs onto the MBON-d1 (Figure 10G). In both cases, the net output of the mushroom body would be tilted towards aversion.

Scenario 1 seems straightforward, but two studies in adults caution against such a simple model: First, it was found that activating a DAN while pharmacologically blocking output from the KCs activated the MBON of the respective compartment rather than inhibiting it (Takemura et al., 2017). So, we would need to assume that the ‘sign’ of the DAN→MBON synapses differs either between developmental stages or between different mushroom body compartments, or even changes in certain conditions. Different dopamine receptors can either excite or inhibit a neuron (Karam et al., 2020), and many DANs likely release additional neurotransmitters (Eichler et al., 2017; Aso et al., 2019; Mohammad et al., 2024). Thus, it remains possible that activation of a DAN causes either activation or inhibition of the downstream MBON dependent on the exact composition of receptors.

Second, a recent study compared the innate valence induced by optogenetically activating DANs (of the PAM cluster) and MBONs and found that in the case of DANs valence was brought about largely by differences in speed in darkness or light, but in the case of MBONs by modulations of turns at the dark-light border (Mohammad et al., 2024). This discrepancy makes a simple, direct inhibition unlikely.

Scenario 2 resembles the effects of the DAN signal in paired learning (Figure 10D and G). However, the observed modulations of locomotion occurred within a few seconds, much faster than in our learning experiments. In addition, some activation of the KCs and therefore some drive of the MBONs would be required, otherwise an acute down-regulation of the KC→MBON synapse would be without any effect. To which extent the KCs were active during our experiments remains unknown.

Previous studies provide conflicting evidence for the involvement of the KCs: on the one hand, a recent study in adults found that KC activity was dispensable for the innate preference for PAM-DAN activation (Mohammad et al., 2024). On the other hand, the same study found that knocking down the Dop2R receptor in the KCs reduced the innate preference for PAM-DAN activation (Mohammad et al., 2024). In addition, a study in larvae found an increased locomotion when the Dop1R1 receptor was knocked down in the KCs (Silva et al., 2020).

Considering these discrepancies, it is very likely that both scenarios are too simplistic, by ignoring, for example, asymmetric body side effects of DAN and/or MBON activities (Schleyer et al., 2020), or cross-compartmental connections between DANs and MBONs (Eschbach et al., 2020). It can also not be excluded that DANs exert their acute locomotion effects independent of the MBONs. Future research has to disentangle the neuronal mechanisms of how DAN activity modulates innate locomotion and valence.

Each DAN induces a different combination of effects

Strikingly, each DAN in this study (as well as in a previous study regarding the appetitive domain) induced a different set of behavioural effects (Figure 10A).

The optogenetic activation of DAN-d1 and DAN-f1 can have two effects with respect to memories: during training, the virtual US signal they confer can induce a safety memory. During testing, this memory is only retrieved when the same DAN is activated (Figure 2B and C). This mimics many natural US such as tastants or mild mechanical disturbance (Gerber and Hendel, 2006; Niewalda et al., 2008; Eschbach et al., 2011; El-Keredy et al., 2012; Toshima et al., 2019), or formic acid in adult flies (Schnaitmann et al., 2010). We propose that this mechanism serves to ensure that memories only influence behaviour when it is adaptive to do so.

In contrast, the activation of DAN-g1, as well as of two different combinations of DANs (which both happen to include DAN-g1), establishes memories that can be retrieved also without the respective DANs being activated (Figure 2D–F). This mimics US like electrical shocks that induce memories that are retrieved in absence of the US (Khurana et al., 2009; Pauls et al., 2010). It has been shown that memories in larvae can be specific for the kind of US and are retrieved independently (Schleyer et al., 2015a). It is conceivable that memories regarding relatively harmless types of US, like a bad taste, require the US to be present in order to be retrieved and guide behaviour. Memories regarding more severe US which threaten the body integrity of the animal, such as electrical shocks, are retrieved without the actual US being present. The activation of DAN-d1 or DAN-f1 on the one hand, and DAN-g1 on the other hand, may correspond to such harmless and dangerous US, respectively.

However, as we use optogenetic DAN activation as a virtual US rather than a natural US, our results do not allow for any further conclusions about the content of the established memory. Overall, our knowledge of what kind of information each DAN confers remains limited. Previous physiological studies demonstrated that DAN-d1, DAN-f1, and DAN-g1 respond differently to high concentrations of salt as well as to activation of mechanosensory, nociceptive, and multisensory neurons in the ventral nerve cord (Eschbach et al., 2020; Weber et al., 2023). A systematic overview of how different US are coded across the DANs is still missing. A recent study showed that DAN-g1 is required for aversive learning about high salt concentrations, but not about quinine (Weber et al., 2023). As salt memories usually require the presence of salt during the test in order to be retrieved (Gerber and Hendel, 2006; Niewalda et al., 2008), DAN-g1 also appears to be important for learning about such relatively harmless US.

In a previous study we found that the appetitive US-signalling DAN-i1 can establish memories of opposite valence when it was activated paired or unpaired with an odour (Schleyer et al., 2020). This suggested that both kinds of memory rely on the activity of the same DANs. In the aversive domain, DAN-d1, DAN-f1, and DAN-g1 each establish only safety memory but not punishment memory, whereas activating combinations of DANs did establish both kinds of memory (Eschbach et al., 2020; Figure 3). The reason for these discrepancies is not known yet. To our knowledge, no natural US is known that only induces safety, but no punishment memory, in larvae. This may suggest that all natural US tested so far activate combinations of DANs.

Most strikingly, DAN-d1 and DAN-g1 (but not DAN-f1) also modulate innate locomotion (Figures 4 and 9). Interestingly, recent studies in mammals suggested that the nigro-striatal ‘movement’ pathway also plays a role for carrying reward signals, in addition to the traditional mesolimbic ‘reward’ pathway (Wise, 2009). Together, these results point towards a neuronal organisation in which the same DANs can have multiple functions that are as diverse as instructing learning processes and modulating movements. Whether these multiple functions are rooted in different molecular mechanisms within the DANs or are brought about by different downstream neurons receiving the same dopaminergic signals remains to be resolved.

A recent study in adult flies focusing on the DANs of the PAM cluster found largely separated functions for different DAN subsets (Lozada-Perdomo et al., 2025): activating all PAM-DANs (R58E02-Gal4-DANs) induced appetitive memories, acute avoidance, modulations of locomotion, and decreased feeding. Specific subsets of the adult PAM-DANs induced appetitive learning and acute preference but had very little effect on locomotion. Another subset increased feeding but induced no memory, no acute preference, and no effect on locomotion (Lozada-Perdomo et al., 2025).

In larvae, R58E02-Gal4-DANs also induce appetitive memories (Rohwedder et al., 2016), but we observed acute approach rather than aversion, consistent with another study in adults (Mohammad et al., 2024; Figure 7C, Figure 7—figure supplement 1A). For now, the reasons for these discrepancies remain unclear. As we did not test individual pPAM-DANs for acute preference or locomotion, it remains possible that in both larvae and adults some of the pPAM/PAM neurons promote approach and others avoidance, yet the net effect of activating all of them differs. Notably, the DL1 and pPAM clusters have very different fates during metamorphosis. The four DL1-DANs will be part of the PPL1 cluster in adults and either continue to provide input to the adult mushroom body or trans-differentiate to innervate other adult brain regions (Truman et al., 2023). In total, adults have eight types of PPL1-DANs, with one or two neurons per cell type (Aso et al., 2014a). The four larval pPAM-DANs, in contrast, die during metamorphosis and are replaced by about 120 adult PAM-DANs (Aso et al., 2014a; Truman et al., 2023). It is possible that the larger number of PAM-DANs promotes more functional distinctions compared to a more overlapping-function organisation across the few DL1/PPL1-DANs. Alternatively, it is possible that the larval pPAM-DANs are functionally equivalent to just one subset of the adult PAM-DANs, promoting appetitive learning and acute approach, whereas other PAM-DANs have different sets of functions. The larval equivalent of those neurons, if it exists, has not been identified yet.

Our results suggest a combinatorial-like neuronal organisation, at least within the DL1 cluster, with each neuron having a unique yet overlapping set of functions. This raises a question: given that all mushroom body compartments share the same basic circuitry (Eichler et al., 2017; Figure 10B), how can such functional differences be explained? It is conceivable that they depend on the specific properties of the involved MBONs or its synapses with the KCs and the respective DANs. For example, if the synapses between the KCs and a given MBON are weak to begin with (e.g. the MBONs of the d- and f-compartment), they can be easily potentiated by unpaired training, but any depression by paired training will be minute. Such weak depression may need to happen in several compartments before it becomes behaviourally measurable.

Moreover, the impact of the gating signal by the DAN to the MBON may vary depending on the circumstances: the memories established by DAN-d1 or DAN-f1 bypassed the retrieval control by the DANs if those memories were established with CsChrimson, but not with ChR2-XXL (Figure 2—figure supplement 3; Eschbach et al., 2020). The memory established by DAN-g1 bypassed this control even when using ChR2-XXL (Figure 2D). Little is known about the molecular mechanisms of memory retrieval in MBONs, and future research has to uncover which factors may determine its dependence on dopamine signals.

Our study revealed that individual DANs can induce surprisingly diverse effects, from establishing and retrieving memories to modulating innate locomotion. The mushroom body circuit – which is shared with adult flies and other insects – provides an excellent study case to advance our understanding of the complex functions of the dopaminergic system. Given the highly conserved roles of DANs in mediating ‘teaching’ signals and modulating movement across the animal kingdom, including vertebrates and humans, a deeper understanding of this circuit and its functions should provide new insights about the principles of DAN function in general.

Materials and methods

Key resources table.

Reagent type (species) or resource Designation Source or reference Identifiers Additional information
Strain, strain background (Drosophila melanogaster) UAS-ChR2-XXL Bloomington Stock Center BDSC:58374
Strain, strain background (D. melanogaster) 20xUAS-CsChrimson-mVenus Bloomington Stock Center BDSC:55134
Strain, strain background (D. melanogaster) TH-Gal4 Bloomington Stock Center BDSC:8848
Strain, strain background (D. melanogaster)(D. melanogaster) R58E02-Gal4 Bloomington Stock Center BDSC:41347
Strain, strain background (D. melanogaster) w1118 Bloomington Stock Center BDSC:3605; BDSC:5905; BDSC:6326
Strain, strain background (D. melanogaster) y[1] w* Bloomington Stock Center BDSC:1495
Strain, strain background (D. melanogaster) y[1] v[1];P {TRiP.JF01813} attP2 Bloomington Stock Center BDSC:25796
Strain, strain background (D. melanogaster) MB328B Eschbach et al., 2020 Covers DAN-d1
Strain, strain background (D. melanogaster) MB054B Eschbach et al., 2020 Covers DAN-f1 and DAN-g1
Strain, strain background (D. melanogaster) SS02180 Eschbach et al., 2020 Covers DAN-f1
Strain, strain background (D. melanogaster) SS01716 Eschbach et al., 2020 Covers DAN-g1
Strain, strain background (D. melanogaster) Empty-Gal4 (attP40/attP2) Pfeiffer et al., 2010
Strain, strain background (D. melanogaster) y[1] w*;;MB247-mCherry-CAAX, UAS-mIFP-T2A-HO1;
MB247-mCherry-CAAX, UAS-mIFP
Kobler et al., 2021
Strain, strain background (D. melanogaster) y[1] w*;;MB247-mCherry-CAAX Kobler et al., 2021
Chemical compound, drug Sodium hypochlorite Roth Order # 9062.1
Chemical compound, drug Ethyl cinnamate; ethyl 3-phenyl-2-propenoate Sigma-Aldrich Order # 112372-100G
Software, algorithm Imaris Bitplane Version 10.1
Software, algorithm Adobe Premiere Pro 2020 Adobe Version 14.9.0
Software, algorithm Fiji Schindelin et al., 2012
Software, algorithm IMBA (Individual Maggot Behaviour Analyser) Thane et al., 2023

Animals

Third-instar feeding-stage larvae (D. melanogaster), aged 4–5 days after egg laying, were used throughout. Flies were maintained in mass culture at 25°C, 60–70% relative humidity, and a 12/12 hr light/dark cycle. Two kinds of food medium were used.

Food medium #1 was used for all learning and olfactory experiments, as well as for some of the locomotion experiments. Per 1 l water, 45 ml sugar beet molasses, 45 ml malt, 147.5 g cornmeal, 10 g soy flour, 18.75 g dry yeast, 6.25 g agar, and 2.5 g methyl-4-hydroxybenzoate (Merck, Darmstadt, Germany) were added as described in detail previously (Michels et al., 2018).

Food medium #2 was used for most of the locomotion experiments, as well as the optogenetic stimulation preference experiments. Per 1 l water, 100 g glucose, 50 g cornmeal, 31.65 g wheat germ, 40 g dry yeast, 8 g agar, 2 ml propionic acid (Kanto-kagaku, Tokyo, Japan), and 5 ml 10% butyl p-hydroxybenzoate (Wako, Osaka, Japan) in ethanol were added as described in detail previously (Sugime et al., 2017).

We took a spoonful of food medium from a food vial, randomly selected the desired number of larvae, briefly rinsed them in tap water and started the experiment.

We used either wild-type larvae from the Canton Special genotype or transgenic larvae to express light-gated ion channels in the respective DAN. Towards this end, one of two effector strains, UAS-ChR2-XXL (Bloomington Stock Center #58374) or 20xUAS-CsChrimson-mVenus (Bloomington Stock Center #55134), was crossed to either TH-Gal4 (Bloomington Stock Center #8848), R58E02-Gal4 (Bloomington Stock #41347), or to one of four split-Gal4 driver strains: MB328B, MB054B, SS02180, or SS01716 (Eschbach et al., 2020) to obtain double-heterozygous offspring. As driver controls, the driver strains were crossed to a local copy of w1118 (Bloomington Stock Center #3605, 5905, 6326). As effector control, a strain carrying the landing sites used for the split-Gal4 (attP40/attP2), yet without a Gal4 domain inserted (‘empty’) (Pfeiffer et al., 2010), was crossed to the respective effector. When using TH-Gal4, we used w1118 instead. As CsChrimson requires feeding of all-trans-retinal (Klapoetke et al., 2014), larvae that were crossed to 20xUAS-CsChrimson-mVenus were raised in standard food medium that additionally contained 400 µM final concentration of all-trans-retinal (CAS: 116-31-4, Sigma-Aldrich). For the TH-RNAi experiments, a double effector strain was used, made from the UAS-ChR2XXL strain and y[1]v[1];P{TRiP.JF01813}attP2 (Bloomington Stock #25796) to express a double-stranded RNA element of the ple gene (König et al., 2018). All larvae used for optogenetic experiments were raised in constant darkness. Whenever the behaviour of animals of different genotypes were compared, the experimenters were blind with respect to the genotype.

For the whole-body anatomy, we crossed each driver strain to a y[1] w*;;MB247-mCherry-CAAX, UAS-mIFP-T2A-HO1 double-effector strain (Kobler et al., 2021) (called MB247-mCherry-CAAX, UAS-mIFP in the main text). As driver control, we crossed each driver strain to y[1] w*;;MB247-mCherry-CAAX (Kobler et al., 2021), as effector control, we crossed y[1] w*;;MB247-mCherry-CAAX, UAS-mIFP-T2A-HO1 to y[1] w* (Bloomington Stock Center #1495).

Experimental setup

For learning and preference experiments, larvae were trained and tested in Petri dishes of 9 cm inner diameter (order #82.1472, Sarstedt) filled with 1% agarose (electrophoresis grade; CAS: 9012-36-6). For the experiments displayed in Figures 2A and 3A, 5 mM quinine (purity: 92%, CAS: 6119-70-6, Sigma-Aldrich) was added into the agarose. As odour, we used n-amyl acetate diluted 1:20 in paraffin oil (AM; CAS: 628-63-7, Merck). For locomotion experiments, either Petri dishes of 15 cm inner diameter (order #82.1184.500, Sarstedt) filled with 1% agarose were used or dishes of 9 cm inner diameter (order #3-1491-01, AS ONE) filled with 2% agar (CAS: 9002-18-0, Fujifilm Wako Pure Chemical Industries).

Experiments were performed inside a 43×43×73 cm3 surrounding box equipped with a custom-made light table featuring a 24×12 LED array (Solarox) and a 6-mm-thick diffusion plate of frosted plexiglass on top to ensure uniform blue light for ChR2-XXL activation (470 nm; 120 µW/cm²; for Figure 2—figure supplement 3C, Figure 4 incl. Figure supplements, Figures 7 and 8 incl. Figure supplements, Figure 9, Figure 9—figure supplement 1: 1000 µW/cm²) or red light for CsChrimson activation (630 nm; 430 µW/cm2). Petri dishes were placed directly on top of the diffusion plate. For additional details regarding the experimental setup, see Saumweber et al., 2018.

Associative learning

Learning experiments followed established protocols (Michels et al., 2017). Odour containers were prepared by adding 10 µl of odour substance into custom-made Teflon containers (5 mm inner diameter with a lid perforated with 7 holes of 0.5 mm diameter each). Petri dishes were covered with modified lids perforated in the centre by 15 holes of 1 mm diameter each to improve aeration.

For paired training with quinine as US, about 20 larvae were placed on a quinine-filled Petri dish equipped with two AM-filled odour containers. After 2.5 min, the animals were transferred to a dish with plain agarose and empty odour containers (EM) on which they spent another 2.5 min. This cycle (AM-/EM) was repeated two more times before the animals were transferred to a test Petri dish, with AM on one side and EM on the other. This dish was either a plain agarose dish or one with quinine added, as mentioned in the Results section. After 3 min, the number of animals on either side as well as on a 1-cm-wide middle stripe were counted, and the odour preference was calculated as:

Preference=#AM-#EM#Total (1)

Thus, preference values are constrained between 1 and –1, with positive values indicating a preference for and negative values indicating avoidance of AM. Note that the training sequence in every other repetition of the experiment was reversed (EM/AM-).

For unpaired training, AM was presented on plain agarose Petri dishes and EM was present on quinine Petri dishes, such that the CS and US were experienced explicitly separated from each other (AM/EM- or EM-/AM). Otherwise, the training was performed analogously, and the final test was performed as described.

From each one paired and one unpaired trained cohort of animals we calculated an associative memory score as:

MemoryScore=Preference(Paired)−Preference(Unpaired)2 (2)

Thus, the values can range from 1 to –1, with negative values indicating that the larvae preferred the odour less after paired than unpaired training. Thus, negative scores indicate an aversive associative memory. Positive values, in turn, would indicate appetitive associative memory.

Learning experiments with ChR2-XXL or CsChrimson as effectors were performed analogously. However, all Petri dishes were filled with plain agarose, i.e., no tastants were added. Rather, for paired training, AM was paired with continuous blue (ChR2-XXL) or red light stimulation (CsChrimson) for 2.5 min, followed by 2.5 min of darkness without an odour. For unpaired training, animals received odour presentation and light stimulation separately from each other. The test was performed as described, either in darkness or with light stimulation as mentioned in the Results section.

Innate olfactory behaviour

Odour containers and Petri dishes were prepared as described above. Cohorts of about 20 larvae were collected from the vial, briefly washed in tap water and placed in a Petri dish with an AM container on one side and an empty container on the other. After 3 min, the innate odour preference was determined according to Equation 1.

Locomotion experiments

Cohorts of about eight larvae were placed in the middle of a Petri dish filled with agarose or agar. The dish was placed in the experimental chamber and video recording was started after about 10 s. After 30 s of video recording in darkness, light was switched on for 30 s followed by 60 s of darkness. In some experiments, two or three light stimulation cycles were applied. Blue or red light was used as mentioned along with the results.

Experiments involving feeding 3IY followed established protocols (Thoener et al., 2021). Before the experiment the larvae were transferred to a yeast paste with or without added 3-iodo-L-tyrosine (3IY; stored at −20°C; CAS: 70-78-0, Sigma-Aldrich) at a concentration of 5 mg/ml. After 4 hr, cohorts of 8 larvae were collected from the yeast paste and the experiment was conducted as described.

Optogenetic stimulation preference experiments

In order to test for the animals’ preference for having sets of DANs activated, we prepared Petri dishes filled with agar of which one half was illuminated by blue or red light, the other half was kept in darkness. Cohorts of about 10 larvae were placed on the dark half of the dish about 1.5 cm from the midline. Their behaviour was video-recorded for 3 min before the animals were counted, and the preference was calculated as:

Lightpreference=#Light−#Darkness#Total (3)

Thus, preference values are constrained between 1 and –1, with positive values indicating a preference for and negative values indicating avoidance of the light.

Video analysis

Video analysis used the IMBA software and followed previously described procedures (Thane et al., 2023). In brief, the positions of head, tail, as well as several spine and contour points of each larva were tracked over the course of the experiment. A combination of computational modelling and statistical approaches allowed keeping the identities of larvae across collisions and thus the analysis of individual animals tested in cohorts. Then, we discarded all tracks that were shorter than half of the time window used for the analysis. This prevented multiple tracks from the same individual animal from entering the analysis.

Larval behaviour was separated into HC phases and run phases. Lateral HCs are a very prominent feature during larval chemotaxis. We quantified these head movements based on the angular speed of the head vector through the front third of the animal. HCs were detected when the angular speed exceeded ±35°/s. Runs were determined as periods in which the animals were not performing HCs, omitting 2 s before and after each HC event to prevent behavioural effects of the HC. We noticed that the rhythmic velocity changes of the tail point provided a reliable indicator for the occurrence of one peristaltic forward movement. We therefore defined each local maximum in the tail forward velocity as one step, and the period between two maxima, i.e., one complete peristaltic cycle, as an inter-step (IS) period. Since the algorithm we employed to detect local-maxima also produced false maxima during intervals of little or no forward motion, we discarded maxima whenever the tail velocity in forward direction was less than 0.6 mm/s.

After the detection of runs, steps, and head casts, we calculated several behavioural attributes.

We summarise all attributes in this study in Table 1. Whenever the average behaviour of a group of larvae is displayed over time, the mean and the 95% confidence intervals of the respective attribute are calculated per 1 s time bin with a 5 s convolution filter. Whenever data are displayed in box plots to compare across experimental conditions, the mean of each attribute is calculated for each individual larva across the indicated time period. As we were interested in the difference in a given attribute X before and during light stimulation, we calculated ∆-values as the difference in X during the last 15 s of light stimulation minus X during the 15 s just before light stimulation (called baseline in the main text).

We used random forest models which are based on classification and regression trees (Mola, 1998; Breiman, 2001). The random forest algorithm works by building N number of decision trees and then predicting the class label of an instance using majority voting. Each tree is trained on a random subspace of the data, only using a sample of the instances. To evaluate the random forest classification, we used fivefold cross-validation, which was repeated three times. Fivefold cross-validation means that the test set for the model is taken from five different, disjunct sets of the data set. The data set is then shuffled and the procedure is repeated three times. Cross-validation is used to make sure that the model is not based merely on the selected data but can explain the full data set.

For the applications of the random forest in this study, we pre-selected 17 behavioural attributes to be included (Table 1). The pre-selection was based on our previous study (Thane et al., 2023) and was warranted to avoid using largely redundant attributes and to exclude non-behavioural attributes such as the size of the larvae. The random forest was always applied to pairwise compare two experimental conditions, typically the experimental groups with one of the genetic controls. In order to provide a good estimate of the importance of each attribute, the complete random forest model (including the cross-validation) was performed 10 times for any given comparison. In the typical case, this means 10 repetitions of the comparison between the experimental genotype with the driver control and 10 repetitions of the comparison with the effector control. In each case, the relative importance rank of each attribute was noted.

Whole-body anatomy

Experimental procedures followed previous work (Kobler et al., 2021). In brief, third-instar larvae were first bleached (4% sodium hypochlorite, order #9062.1, Roth) for 10 min at room temperature. After washing (3×5 min in distilled water), they were fixed in 4% PFA in 0.1 mol/l PB at pH 9, with gentle shaking overnight at 4°C. Fixed samples were briefly rinsed 3× with 0.1 mol/l PB containing 0.2% Triton X-100 (PBT), then washed 2×60 min and left overnight at 4°C in PBT. Dehydration the following day used a graded ethanol (EtOH) series (60 min in 10% and 25% EtOH, followed by 30 min in 50%, 60%, 80%, and 2×100% EtOH). Samples were then cleared by replacing EtOH with ethyl cinnamate (ECi; ethyl 3-phenyl-2-propenoate; order #112372-100G, Sigma-Aldrich). After 30–60 min, the ECi was refreshed once, and the samples stored at room temperature in black boxes in a desiccator.

The samples were placed in ECi-cleared phytagel blocks (1×1×1 cm3, P8169, Sigma-Aldrich) before imaging on an Ultra-Blaze microscope (Miltenyi Biotec). The microscope was equipped with an FIU-15 white light laser (NKT Photonics) for excitation through triple-sheet optics to illuminate samples from one side. The following excitation and emission filters were used: autofluorescence: exc. 480/20, em. 515/30, mcherry: exc. 590/20, em. 625/30, mIFP: exc. 680/20, em. 720/30.

Tiled image stacks were acquired with either a 12× objective with zoom set to 1 or 4× objective with zoom set to 1.66 (both Miltenyi Biotec) with a format of 2048×2048. Using ImSpector software (version 7.3.6, Miltenyi Biotec), a 10% overlap of tiles was set for stitching.

Image files were processed with Imaris software (version 10.1, Bitplane), including file conversion, stitching, further processing, and rendering. Either the ortho slicer, oblique slicer, or clipping plane tool was used to restrict volumes in the z direction to improve the representation of structures that were otherwise covered in the context of the whole body. All inserts were generated using the snapshot function in Imaris. Whole-body 2D maximum-intensity projections were generated in Fiji (Schindelin et al., 2012). Figure 1—video 1 was produced in Imaris with the key frame animation tool; Adobe Premiere Pro 2020 (version 14.9.0, Adobe) was used for cutting and labelling.

Dendrogram analysis

To visualise neuron morphology and synapse locations, we employed neuron dendrograms (Strauch et al., 2018) that are linearised, topologically correct 2D representations of 3D neuron reconstructions with synapse annotations (based on Eichler et al., 2017). Synapse locations and the distances between them are approximately correct, with slight adjustments to avoid overlap and cluttering of the synapse symbols (Strauch et al., 2018).

We formally analysed the spatial organisation of synapses based on geodesic distances along the neuron’s branches (‘cable length distances’). The geodesic distance between two synapses was determined by finding the shortest path between them on the neuron, and then computing the cumulated Euclidean distance, in the 3D coordinate space of the neuron, between points along that path.

In particular, we analysed spatially local clusters of synapses and the distances to the centroid of the cluster. To this end, we clustered the synapses on each neuron based on geodesic distances and using hierarchical clustering with Ward’s criterion (Aggarwal and Reddy, 2014) (implemented in the base R package ‘stats’). The maximum number of clusters per neuron was set to k=10. For analysis, we kept only clusters with at least 5 presynaptic and 5 postsynaptic KC connections.

The centroid of a cluster was defined to be the most central synapse, computed by partitioning around medoids clustering (PAM with k=1 cluster) (Kaufman and Rousseeuw, 2005) based on geodesic distances.

Quantification and statistical analysis

As behavioural data are often non-normally distributed, we used two-tailed non-parametric tests throughout. Our results are displayed as box plots, which allow for a simple visualisation of the data distribution independent of the sample size. The median is presented as the middle line and 25%/75% and 10%/90% as box boundaries and whiskers, respectively, as these descriptors are less sensitive to outliers than the mean. Values were compared across multiple groups with Kruskal-Wallis tests (KW). In case of significance, subsequent pairwise comparisons used Mann-Whitney U-tests (MW). To test whether values of a given group differ from zero, we used Wilcoxon signed-rank tests (WSR). When multiple comparisons were performed within one analysis, a Bonferroni-Holm correction was applied to keep the experiment-wide error rate below 5% (Holm, 1979). The detailed results of all statistical tests are reported in the Source data 1, along with the source data. Experimenters were blind to genotype. Sample sizes (biological replications) were chosen based on previous studies revealing moderate to mild effect sizes (Schleyer et al., 2020; Thane et al., 2023) and are displayed in the figures.

Acknowledgements

This study received institutional support by the Otto von Guericke Universität Magdeburg, the Wissenschaftsgemeinschaft Gottfried Wilhelm Leibniz (WGL), the Leibniz Institute for Neurobiology (LIN), the Hokkaido University, and the RWTH University Aachen. This study received grant support from the Deutsche Forschungsgemeinschaft (DFG) (GE 1091/4-1 and FOR 2705 Mushroom body [to B Gerber]), the CRCNS program of the German Federal Ministry of Education and Research (BMBF) ‘DrosoExpect’ (01GQ2103A [to B Gerber]), the Japan Society for the Promotion of Science (JSPS) (Kakenhi 22K20673), the Goho Life Sciences International Fund, and the German-Israeli Foundation for Science (GIF) (G-2502-418.13/2018). Experimental contributions of J Chen, R Khondaker, T Meyer, S Schuller, M Thane, L Warzog, B Fischer, technical assistance by M Dombach, M Paisios, M Thane and F Unterstab, as well as discussions with C Eschbach, B Gerber, C König, N Mancini, NK Tanaka, A Thum, and A Yarali are gratefully acknowledged. We thank C Eschbach, C König, A Thum, D Weber, and M Zlatic for sharing fly strains and results prior to publication.

Funding Statement

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Contributor Information

Michael Schleyer, Email: m.schleyer@oia.hokudai.ac.jp.

Meet Zandawala, University of Nevada, Reno, United States.

Albert Cardona, University of Cambridge, United Kingdom.

Funding Information

This paper was supported by the following grants:

  • Japan Society for the Promotion of Science 22K20673 to Michael Schleyer.

  • Goho Life Sciences International Fund to Michael Schleyer.

  • German-Israeli Foundation for Scientific Research and Development G-2502-418.13/2018 to Michael Schleyer.

  • Deutsche Forschungsgemeinschaft GE 1091/4-1.

  • Deutsche Forschungsgemeinschaft FOR 2705.

  • German Federal Ministry of Education and Research 01GQ2103A.

Additional information

Competing interests

No competing interests declared.

Author contributions

Conceptualization, Data curation, Investigation, Writing – original draft, Writing – review and editing.

Data curation, Formal analysis, Investigation, Writing – review and editing.

Data curation, Investigation, Writing – original draft, Writing – review and editing.

Investigation, Writing – review and editing.

Investigation, Writing – original draft, Writing – review and editing.

Investigation, Visualization, Writing – review and editing.

Investigation, Visualization, Writing – review and editing.

Investigation, Visualization, Writing – review and editing.

Investigation, Writing – review and editing.

Investigation, Writing – review and editing.

Investigation, Writing – review and editing.

Conceptualization, Data curation, Formal analysis, Supervision, Funding acquisition, Investigation, Visualization, Writing – original draft, Project administration, Writing – review and editing.

Additional files

MDAR checklist
Source data 1. Raw data and results of statistical tests.

This Excel file provides all raw data underlying the figures. Each tab shows the data of one figure or figure supplement, with the results of all statistical tests to the left.

elife-106148-data1.xlsx (6.4MB, xlsx)

Data availability

Source data to all behavioural experiments are included in Source data 1. The IMBA software used for analysis (Thane et al., 2023) is publicly available at GitHub: https://github.com/mthane/IMBA (Thane, 2026).

References

  1. Aggarwal CC, Reddy C. Data Clustering: Algorithms and Applications. Chapman and Hall/CRC; 2014. [Google Scholar]
  2. Aso Y, Hattori D, Yu Y, Johnston RM, Iyer NA, Ngo T-TB, Dionne H, Abbott LF, Axel R, Tanimoto H, Rubin GM. The neuronal architecture of the mushroom body provides a logic for associative learning. eLife. 2014a;3:e04577. doi: 10.7554/eLife.04577. [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Aso Y, Sitaraman D, Ichinose T, Kaun KR, Vogt K, Belliart-Guérin G, Plaçais P-Y, Robie AA, Yamagata N, Schnaitmann C, Rowell WJ, Johnston RM, Ngo T-TB, Chen N, Korff W, Nitabach MN, Heberlein U, Preat T, Branson KM, Tanimoto H, Rubin GM. Mushroom body output neurons encode valence and guide memory-based action selection in Drosophila. eLife. 2014b;3:e04580. doi: 10.7554/eLife.04580. [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Aso Y, Ray RP, Long X, Bushey D, Cichewicz K, Ngo T-T, Sharp B, Christoforou C, Hu A, Lemire AL, Tillberg P, Hirsh J, Litwin-Kumar A, Rubin GM. Nitric oxide acts as a cotransmitter in a subset of dopaminergic neurons to diversify memory dynamics. eLife. 2019;8:e49257. doi: 10.7554/eLife.49257. [DOI] [PMC free article] [PubMed] [Google Scholar]
  5. Boto T, Stahl A, Tomchik SM. Cellular and circuit mechanisms of olfactory associative learning in Drosophila. Journal of Neurogenetics. 2020;34:36–46. doi: 10.1080/01677063.2020.1715971. [DOI] [PMC free article] [PubMed] [Google Scholar]
  6. Bouzaiane E, Trannoy S, Scheunemann L, Plaçais P-Y, Preat T. Two independent mushroom body output circuits retrieve the six discrete components of Drosophila aversive memory. Cell Reports. 2015;11:1280–1292. doi: 10.1016/j.celrep.2015.04.044. [DOI] [PubMed] [Google Scholar]
  7. Breiman L. Random forests. Machine Learning. 2001;45:5–32. doi: 10.1023/A:1010933404324. [DOI] [Google Scholar]
  8. Cognigni P, Felsenberg J, Waddell S. Do the right thing: neural network mechanisms of memory formation, expression and update in Drosophila. Current Opinion in Neurobiology. 2018;49:51–58. doi: 10.1016/j.conb.2017.12.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Cohn R, Morantte I, Ruta V. Coordinated and compartmentalized neuromodulation shapes sensory processing in Drosophila. Cell. 2015;163:1742–1755. doi: 10.1016/j.cell.2015.11.019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Dawydow A, Gueta R, Ljaschenko D, Ullrich S, Hermann M, Ehmann N, Gao S, Fiala A, Langenhan T, Nagel G, Kittel RJ. Channelrhodopsin-2-XXL, a powerful optogenetic tool for low-light applications. PNAS. 2014;111:13972–13977. doi: 10.1073/pnas.1408269111. [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. de Jong JW, Afjei SA, Pollak Dorocic I, Peck JR, Liu C, Kim CK, Tian L, Deisseroth K, Lammel S. A neural circuit mechanism for encoding aversive stimuli in the mesolimbic dopamine system. Neuron. 2019;101:133–151. doi: 10.1016/j.neuron.2018.11.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. Eichler K, Li F, Litwin-Kumar A, Park Y, Andrade I, Schneider-Mizell CM, Saumweber T, Huser A, Eschbach C, Gerber B, Fetter RD, Truman JW, Priebe CE, Abbott LF, Thum AS, Zlatic M, Cardona A. The complete connectome of a learning and memory centre in an insect brain. Nature. 2017;548:175–182. doi: 10.1038/nature23455. [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. El-Keredy A, Schleyer M, König C, Ekim A, Gerber B. Behavioural analyses of quinine processing in choice, feeding and learning of larval Drosophila. PLOS ONE. 2012;7:e40525. doi: 10.1371/journal.pone.0040525. [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Erhardt B, Frenkel L, Marcora MS, Farías MI, Ferrari CC, Pitossi FJ, Leal MC. Downregulation of plasma membrane Ca2+ ATPase driven by tyrosine hydroxylase-Gal4 reduces Drosophila lifespan independently of effects in neurons. Fly. 2023;17:2192457. doi: 10.1080/19336934.2023.2192457. [DOI] [PMC free article] [PubMed] [Google Scholar]
  15. Eschbach C, Cano C, Haberkern H, Schraut K, Guan C, Triphan T, Gerber B. Associative learning between odorants and mechanosensory punishment in larval Drosophila. The Journal of Experimental Biology. 2011;214:3897–3905. doi: 10.1242/jeb.060533. [DOI] [PubMed] [Google Scholar]
  16. Eschbach C, Fushiki A, Winding M, Schneider-Mizell CM, Shao M, Arruda R, Eichler K, Valdes-Aleman J, Ohyama T, Thum AS, Gerber B, Fetter RD, Truman JW, Litwin-Kumar A, Cardona A, Zlatic M. Recurrent architecture for adaptive regulation of learning in the insect brain. Nature Neuroscience. 2020;23:544–555. doi: 10.1038/s41593-020-0607-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  17. Eschbach C, Fushiki A, Winding M, Afonso B, Andrade IV, Cocanougher BT, Eichler K, Gepner R, Si G, Valdes-Aleman J, Fetter RD, Gershow M, Jefferis GS, Samuel AD, Truman JW, Cardona A, Zlatic M. Circuits for integrating learned and innate valences in the insect brain. eLife. 2021;10:e62567. doi: 10.7554/eLife.62567. [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Felsenberg J, Jacob PF, Walker T, Barnstedt O, Edmondson-Stait AJ, Pleijzier MW, Otto N, Schlegel P, Sharifi N, Perisse E, Smith CS, Lauritzen JS, Costa M, Jefferis GSXE, Bock DD, Waddell S. Integration of parallel opposing memories underlies memory extinction. Cell. 2018;175:709–722. doi: 10.1016/j.cell.2018.08.021. [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Gerber B, Hendel T. Outcome expectations drive learned behaviour in larval Drosophila. Proceedings. Biological Sciences. 2006;273:2965–2968. doi: 10.1098/rspb.2006.3673. [DOI] [PMC free article] [PubMed] [Google Scholar]
  20. Gerber B, Yarali A, Diegelmann S, Wotjak CT, Pauli P, Fendt M. Pain-relief learning in flies, rats, and man: basic research and applied perspectives. Learning & Memory. 2014;21:232–252. doi: 10.1101/lm.032995.113. [DOI] [PMC free article] [PubMed] [Google Scholar]
  21. Gershman SJ, Uchida N. Believing in dopamine. Nature Reviews. Neuroscience. 2019;20:703–714. doi: 10.1038/s41583-019-0220-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
  22. Gomez-Marin A, Stephens GJ, Louis M. Active sampling and decision making in Drosophila chemotaxis. Nature Communications. 2011;2:441. doi: 10.1038/ncomms1455. [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Groessl F, Munsch T, Meis S, Griessner J, Kaczanowska J, Pliota P, Kargl D, Badurek S, Kraitsy K, Rassoulpour A, Zuber J, Lessmann V, Haubensak W. Dorsal tegmental dopamine neurons gate associative learning of fear. Nature Neuroscience. 2018;21:952–962. doi: 10.1038/s41593-018-0174-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Handler A, Graham TGW, Cohn R, Morantte I, Siliciano AF, Zeng J, Li Y, Ruta V. Distinct dopamine receptor pathways underlie the temporal sensitivity of associative learning. Cell. 2019;178:60–75. doi: 10.1016/j.cell.2019.05.040. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Hige T, Aso Y, Modi MN, Rubin GM, Turner GC. Heterosynaptic plasticity underlies aversive olfactory learning in Drosophila. Neuron. 2015;88:985–998. doi: 10.1016/j.neuron.2015.11.003. [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Holm S. A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics. 1979;6:65–70. [Google Scholar]
  27. Jacob PF, Waddell S. Spaced training forms complementary long-term memories of opposite valence in Drosophila. Neuron. 2020;106:977–991. doi: 10.1016/j.neuron.2020.03.013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Karam CS, Jones SK, Javitch JA. Come Fly with Me: An overview of dopamine receptors in Drosophila melanogaster. Basic & Clinical Pharmacology & Toxicology. 2020;126:56–65. doi: 10.1111/bcpt.13277. [DOI] [PMC free article] [PubMed] [Google Scholar]
  29. Kaufman L, Rousseeuw PJ. Finding Groups in Data: An Introduction to Cluster Analysis. John Wiley & Sons; 2005. [Google Scholar]
  30. Kaun KR, Rothenfluh A. Dopaminergic rules of engagement for memory in Drosophila. Current Opinion in Neurobiology. 2017;43:56–62. doi: 10.1016/j.conb.2016.12.011. [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Khurana S, Abu Baker MB, Siddiqi O. Odour avoidance learning in the larva of Drosophila melanogaster. Journal of Biosciences. 2009;34:621–631. doi: 10.1007/s12038-009-0080-9. [DOI] [PubMed] [Google Scholar]
  32. Klapoetke NC, Murata Y, Kim SS, Pulver SR, Birdsey-Benson A, Cho YK, Morimoto TK, Chuong AS, Carpenter EJ, Tian Z, Wang J, Xie Y, Yan Z, Zhang Y, Chow BY, Surek B, Melkonian M, Jayaraman V, Constantine-Paton M, Wong GKS, Boyden ES. Independent optical excitation of distinct neural populations. Nature Methods. 2014;11:338–346. doi: 10.1038/nmeth.2836. [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Kobler O, Weiglein A, Hartung K, Chen YC, Gerber B, Thomas U. A quick and versatile protocol for the 3D visualization of transgene expression across the whole body of larval Drosophila. Journal of Neurogenetics. 2021;35:306–319. doi: 10.1080/01677063.2021.1892096. [DOI] [PubMed] [Google Scholar]
  34. König C, Khalili A, Ganesan M, Nishu AP, Garza AP, Niewalda T, Gerber B, Aso Y, Yarali A. Reinforcement signaling of punishment versus relief in fruit flies. Learning & Memory. 2018;25:247–257. doi: 10.1101/lm.047308.118. [DOI] [PMC free article] [PubMed] [Google Scholar]
  35. Kutlu MG, Tat J, Christensen BA, Zachry JE, Calipari ES. Dopamine release at the time of a predicted aversive outcome causally controls the trajectory and expression of conditioned behavior. Cell Reports. 2023;42:112948. doi: 10.1016/j.celrep.2023.112948. [DOI] [PMC free article] [PubMed] [Google Scholar]
  36. Lammel S, Lim BK, Malenka RC. Reward and aversion in a heterogeneous midbrain dopamine system. Neuropharmacology. 2014;76 Pt B:351–359. doi: 10.1016/j.neuropharm.2013.03.019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  37. Liu C, Plaçais PY, Yamagata N, Pfeiffer BD, Aso Y, Friedrich AB, Siwanowicz I, Rubin GM, Preat T, Tanimoto H. A subset of dopamine neurons signals reward for odour memory in Drosophila. Nature. 2012;488:512–516. doi: 10.1038/nature11304. [DOI] [PubMed] [Google Scholar]
  38. Lozada-Perdomo FV, Chen Y, Jacobs RV, Yeo J, Yang MM, Bhalerao J, Devineni AV. Dual roles of Drosophila reward-encoding dopamine neurons in regulating innate and learned behaviors. iScience. 2025;28:113817. doi: 10.1016/j.isci.2025.113817. [DOI] [PMC free article] [PubMed] [Google Scholar]
  39. Malaka R. Models of classical conditioning. Bulletin of Mathematical Biology. 1999;61:33–83. doi: 10.1006/bulm.1998.9998. [DOI] [Google Scholar]
  40. Menegas W, Akiti K, Amo R, Uchida N, Watabe-Uchida M. Dopamine neurons projecting to the posterior striatum reinforce avoidance of threatening stimuli. Nature Neuroscience. 2018;21:1421–1430. doi: 10.1038/s41593-018-0222-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  41. Menzel R. Searching for the memory trace in a mini-brain, the honeybee. Learning & Memory. 2001;8:53–62. doi: 10.1101/lm.38801. [DOI] [PubMed] [Google Scholar]
  42. Michels B, Saumweber T, Biernacki R, Thum J, Glasgow RDV, Schleyer M, Chen Y-C, Eschbach C, Stocker RF, Toshima N, Tanimura T, Louis M, Arias-Gil G, Marescotti M, Benfenati F, Gerber B. Pavlovian conditioning of larval Drosophila: an illustrated, multilingual, hands-on manual for odor-taste associative learning in maggots. Frontiers in Behavioral Neuroscience. 2017;11:45. doi: 10.3389/fnbeh.2017.00045. [DOI] [PMC free article] [PubMed] [Google Scholar]
  43. Michels B, Zwaka H, Bartels R, Lushchak O, Franke K, Endres T, Fendt M, Song I, Bakr M, Budragchaa T, Westermann B, Mishra D, Eschbach C, Schreyer S, Lingnau A, Vahl C, Hilker M, Menzel R, Kähne T, Leßmann V, Dityatev A, Wessjohann L, Gerber B. Memory enhancement by ferulic acid ester across species. Science Advances. 2018;4:eaat6994. doi: 10.1126/sciadv.aat6994. [DOI] [PMC free article] [PubMed] [Google Scholar]
  44. Modi MN, Shuai Y, Turner GC. The Drosophila mushroom body: from architecture to algorithm in a learning circuit. Annual Review of Neuroscience. 2020;43:465–484. doi: 10.1146/annurev-neuro-080317-0621333. [DOI] [PubMed] [Google Scholar]
  45. Mohammad F, Mai Y, Ho J, Zhang X, Ott S, Stewart JC, Claridge-Chang A. Dopamine neurons that inform Drosophila olfactory memory have distinct, acute functions driving attraction and aversion. PLOS Biology. 2024;22:e3002843. doi: 10.1371/journal.pbio.3002843. [DOI] [PMC free article] [PubMed] [Google Scholar]
  46. Mola F. In: Data Science and Classification. Rizzi A, Vichi M, Bock HH, editors. Springer Berlin Heidelberg; 1998. Classification and regression trees software and new developments in advances; pp. 311–318. [DOI] [Google Scholar]
  47. Neckameyer WS, White K. Drosophila tyrosine hydroxylase is encoded by the pale locus. Journal of Neurogenetics. 1993;8:189–199. doi: 10.3109/01677069309083448. [DOI] [PubMed] [Google Scholar]
  48. Neckameyer WS. Multiple roles for dopamine in Drosophila development. Developmental Biology. 1996;176:209–219. doi: 10.1006/dbio.1996.0128. [DOI] [PubMed] [Google Scholar]
  49. Niewalda T, Singhal N, Fiala A, Saumweber T, Wegener S, Gerber B. Salt processing in larval Drosophila: choice, feeding, and learning shift from appetitive to aversive in a concentration-dependent way. Chemical Senses. 2008;33:685–692. doi: 10.1093/chemse/bjn037. [DOI] [PMC free article] [PubMed] [Google Scholar]
  50. Owald D, Felsenberg J, Talbot CB, Das G, Perisse E, Huetteroth W, Waddell S. Activity of defined mushroom body output neurons underlies learned olfactory behavior in Drosophila. Neuron. 2015;86:417–427. doi: 10.1016/j.neuron.2015.03.025. [DOI] [PMC free article] [PubMed] [Google Scholar]
  51. Paisios E, Rjosk A, Pamir E, Schleyer M. Common microbehavioral “footprint” of two distinct classes of conditioned aversion. Learning & Memory. 2017;24:191–198. doi: 10.1101/lm.045062.117. [DOI] [PMC free article] [PubMed] [Google Scholar]
  52. Pauls D, Pfitzenmaier JER, Krebs-Wheaton R, Selcho M, Stocker RF, Thum AS. Electric shock-induced associative olfactory learning in Drosophila larvae. Chemical Senses. 2010;35:335–346. doi: 10.1093/chemse/bjq023. [DOI] [PubMed] [Google Scholar]
  53. Pfeiffer BD, Ngo T-TB, Hibbard KL, Murphy C, Jenett A, Truman JW, Rubin GM. Refinement of tools for targeted gene expression in Drosophila. Genetics. 2010;186:735–755. doi: 10.1534/genetics.110.119917. [DOI] [PMC free article] [PubMed] [Google Scholar]
  54. Plaçais P-Y, Trannoy S, Friedrich AB, Tanimoto H, Preat T. Two pairs of mushroom body efferent neurons are required for appetitive long-term memory retrieval in Drosophila. Cell Reports. 2013;5:769–780. doi: 10.1016/j.celrep.2013.09.032. [DOI] [PubMed] [Google Scholar]
  55. Rahman S, Tanaka NK, Schleyer M. Relative value learning in Drosophila melanogaster larvae. Proceedings. Biological Sciences. 2026;293:20252263. doi: 10.1098/rspb.2025.2263. [DOI] [PubMed] [Google Scholar]
  56. Rescorla RA. Pavlovian conditioning and its proper control procedures. Psychological Review. 1967;74:71–80. doi: 10.1037/h0024109. [DOI] [PubMed] [Google Scholar]
  57. Rohrsen C, Kumpf A, Semiz K, Aydin F, deBivort B, Brembs B. Pain is so close to pleasure: the same dopamine neurons can mediate approach and avoidance in Drosophila. bioRxiv. 2021 doi: 10.1101/2021.10.04.463010. [DOI]
  58. Rohwedder A, Wenz NL, Stehle B, Huser A, Yamagata N, Zlatic M, Truman JW, Tanimoto H, Saumweber T, Gerber B, Thum AS. Four individually identified paired dopamine neurons signal reward in larval Drosophila. Current Biology. 2016;26:661–669. doi: 10.1016/j.cub.2016.01.012. [DOI] [PubMed] [Google Scholar]
  59. Ryczko D, Dubuc R. Dopamine control of downstream motor centers. Current Opinion in Neurobiology. 2023;83:102785. doi: 10.1016/j.conb.2023.102785. [DOI] [PubMed] [Google Scholar]
  60. Saumweber T, Rohwedder A, Schleyer M, Eichler K, Chen Y-C, Aso Y, Cardona A, Eschbach C, Kobler O, Voigt A, Durairaja A, Mancini N, Zlatic M, Truman JW, Thum AS, Gerber B. Functional architecture of reward learning in mushroom body extrinsic neurons of larval Drosophila. Nature Communications. 2018;9:1104. doi: 10.1038/s41467-018-03130-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  61. Schindelin J, Arganda-Carreras I, Frise E, Kaynig V, Longair M, Pietzsch T, Preibisch S, Rueden C, Saalfeld S, Schmid B, Tinevez J-Y, White DJ, Hartenstein V, Eliceiri K, Tomancak P, Cardona A. Fiji: an open-source platform for biological-image analysis. Nature Methods. 2012;9:676–682. doi: 10.1038/nmeth.2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  62. Schleyer M, Saumweber T, Nahrendorf W, Fischer B, von Alpen D, Pauls D, Thum A, Gerber B. A behavior-based circuit model of how outcome expectations organize learned behavior in larval Drosophila. Learning & Memory. 2011;18:639–653. doi: 10.1101/lm.2163411. [DOI] [PubMed] [Google Scholar]
  63. Schleyer M, Diegelmann S, Michels B, Saumweber T, Gerber B. In: Invertebrate Learning and Memory. Menzel R, Benjamin P, editors. Elsevier; 2013. Decision-making’ in larval drosophila; pp. 41–55. [DOI] [Google Scholar]
  64. Schleyer M, Miura D, Tanimura T, Gerber B. Learning the specific quality of taste reinforcement in larval Drosophila. eLife. 2015a;4:e04711. doi: 10.7554/eLife.04711. [DOI] [PMC free article] [PubMed] [Google Scholar]
  65. Schleyer M, Reid SF, Pamir E, Saumweber T, Paisios E, Davies A, Gerber B, Louis M. The impact of odor–reward memory on chemotaxis in larval Drosophila. Learning & Memory. 2015b;22:267–277. doi: 10.1101/lm.037978.114. [DOI] [PMC free article] [PubMed] [Google Scholar]
  66. Schleyer M, Fendt M, Schuller S, Gerber B. Associative learning of stimuli paired and unpaired with reinforcement: evaluating evidence from maggots, flies, bees, and rats. Frontiers in Psychology. 2018;9:1494. doi: 10.3389/fpsyg.2018.01494. [DOI] [PMC free article] [PubMed] [Google Scholar]
  67. Schleyer M, Weiglein A, Thoener J, Strauch M, Hartenstein V, Kantar Weigelt M, Schuller S, Saumweber T, Eichler K, Rohwedder A, Merhof D, Zlatic M, Thum AS, Gerber B. Identification of dopaminergic neurons that can both establish associative memory and acutely terminate its behavioral expression. The Journal of Neuroscience. 2020;40:5990–6006. doi: 10.1523/JNEUROSCI.0290-20.2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
  68. Schnaitmann C, Vogt K, Triphan T, Tanimoto H. Appetitive and aversive visual learning in freely moving Drosophila. Frontiers in Behavioral Neuroscience. 2010;4:10. doi: 10.3389/fnbeh.2010.00010. [DOI] [PMC free article] [PubMed] [Google Scholar]
  69. Schultz W. Neuronal reward and decision signals: from theories to data. Physiological Reviews. 2015;95:853–951. doi: 10.1152/physrev.00023.2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
  70. Schürmann FW. Fine structure of synaptic sites and circuits in mushroom bodies of insect brains. Arthropod Structure & Development. 2016;45:399–421. doi: 10.1016/j.asd.2016.08.005. [DOI] [PubMed] [Google Scholar]
  71. Séjourné J, Plaçais P-Y, Aso Y, Siwanowicz I, Trannoy S, Thoma V, Tedjakumala SR, Rubin GM, Tchénio P, Ito K, Isabel G, Tanimoto H, Preat T. Mushroom body efferent neurons responsible for aversive olfactory memory retrieval in Drosophila. Nature Neuroscience. 2011;14:903–910. doi: 10.1038/nn.2846. [DOI] [PubMed] [Google Scholar]
  72. Selcho M, Pauls D, Han KA, Stocker RF, Thum AS. The role of dopamine in Drosophila larval classical olfactory conditioning. PLOS ONE. 2009;4:e5897. doi: 10.1371/journal.pone.0005897. [DOI] [PMC free article] [PubMed] [Google Scholar]
  73. Sen E, El-Keredy A, Jacob N, Mancini N, Asnaz G, Widmann A, Gerber B, Thoener J. Cognitive limits of larval Drosophila : testing for conditioned inhibition, sensory preconditioning, and second-order conditioning. Learning & Memory. 2024;31:a053726. doi: 10.1101/lm.053726.122. [DOI] [PMC free article] [PubMed] [Google Scholar]
  74. Shyu W-H, Chiu T-H, Chiang M-H, Cheng Y-C, Tsai Y-L, Fu T-F, Wu T, Wu C-L. Neural circuits for long-term water-reward memory processing in thirsty Drosophila. Nature Communications. 2017;8:15230. doi: 10.1038/ncomms15230. [DOI] [PMC free article] [PubMed] [Google Scholar]
  75. Silva B, Hidalgo S, Campusano JM. Dop1R1, a type 1 dopaminergic receptor expressed in Mushroom Bodies, modulates Drosophila larval locomotion. PLOS ONE. 2020;15:e0229671. doi: 10.1371/journal.pone.0229671. [DOI] [PMC free article] [PubMed] [Google Scholar]
  76. Speranza L, di Porzio U, Viggiano D, de Donato A, Volpicelli F. Dopamine: the neuromodulator of long-term synaptic plasticity, reward and movement control. Cells. 2021;10:735. doi: 10.3390/cells10040735. [DOI] [PMC free article] [PubMed] [Google Scholar]
  77. Strauch M, Hartenstein V, Andrade IV, Cardona A, Merhof D. Annotated dendrograms for neurons from the larval fruit fly brain. Eurographics Workshop on Visual Computing for Biology and Medicine.2018. [Google Scholar]
  78. Strausfeld NJ, Sinakevitch I, Brown SM, Farris SM. Ground plan of the insect mushroom body: functional and evolutionary implications. The Journal of Comparative Neurology. 2009;513:265–291. doi: 10.1002/cne.21948. [DOI] [PMC free article] [PubMed] [Google Scholar]
  79. Sugime Y, Watanabe D, Yasuno Y, Shinada T, Miura T, Tanaka NK. Upregulation of juvenile hormone titers in female Drosophila melanogaster through mating experiences and host food occupied by eggs and larvae. Zoological Science. 2017;34:52–57. doi: 10.2108/zs160150. [DOI] [PubMed] [Google Scholar]
  80. Takemura S-Y, Aso Y, Hige T, Wong A, Lu Z, Xu CS, Rivlin PK, Hess H, Zhao T, Parag T, Berg S, Huang G, Katz W, Olbris DJ, Plaza S, Umayam L, Aniceto R, Chang L-A, Lauchie S, Ogundeyi O, Ordish C, Shinomiya A, Sigmund C, Takemura S, Tran J, Turner GC, Rubin GM, Scheffer LK. A connectome of a learning and memory center in the adult Drosophila brain. eLife. 2017;6:e26975. doi: 10.7554/eLife.26975. [DOI] [PMC free article] [PubMed] [Google Scholar]
  81. Tanimoto H, Heisenberg M, Gerber B. Experimental psychology: event timing turns punishment to reward. Nature. 2004;430:983. doi: 10.1038/430983a. [DOI] [PubMed] [Google Scholar]
  82. Thane M, Paisios E, Stöter T, Krüger A-R, Gläß S, Dahse A-K, Scholz N, Gerber B, Lehmann DJ, Schleyer M. High-resolution analysis of individual Drosophila melanogaster larvae uncovers individual variability in locomotion and its neurogenetic modulation. Open Biology. 2023;13:220308. doi: 10.1098/rsob.220308. [DOI] [PMC free article] [PubMed] [Google Scholar]
  83. Thane M. IMBA. 9cb9fcaGitHub. 2026 https://github.com/mthane/IMBA
  84. Thoener J, König C, Weiglein A, Toshima N, Mancini N, Amin F, Schleyer M. Associative learning in larval and adult Drosophila is impaired by the dopamine-synthesis inhibitor 3-Iodo-L-tyrosine. Biology Open. 2021;10:bio058198. doi: 10.1242/bio.058198. [DOI] [PMC free article] [PubMed] [Google Scholar]
  85. Thoener J, Weiglein A, Gerber B, Schleyer M. Optogenetically induced reward and “frustration” memory in larval Drosophila melanogaster. The Journal of Experimental Biology. 2022;225:jeb244565. doi: 10.1242/jeb.244565. [DOI] [PubMed] [Google Scholar]
  86. Thum AS, Gerber B. Connectomics and function of a memory network: the mushroom body of larval Drosophila. Current Opinion in Neurobiology. 2019;54:146–154. doi: 10.1016/j.conb.2018.10.007. [DOI] [PubMed] [Google Scholar]
  87. Toshima N, Kantar Weigelt M, Weiglein A, Boetzl FA, Gerber B. An amino-acid mixture can be both rewarding and punishing to larval Drosophila melanogaster. The Journal of Experimental Biology. 2019;222:jeb209486. doi: 10.1242/jeb.209486. [DOI] [PubMed] [Google Scholar]
  88. Toshima N, Schleyer M. IR76b-expressing neurons in Drosophila melanogaster are necessary for associative reward learning of an amino acid mixture. Biology Letters. 2024;20:20230519. doi: 10.1098/rsbl.2023.0519. [DOI] [PMC free article] [PubMed] [Google Scholar]
  89. Truman JW, Price J, Miyares RL, Lee T. Metamorphosis of memory circuits in Drosophila reveals a strategy for evolving a larval brain. eLife. 2023;12:e80594. doi: 10.7554/eLife.80594. [DOI] [PMC free article] [PubMed] [Google Scholar]
  90. Tumkaya T, Ott S, Claridge-Chang A. A systematic review of Drosophila short-term-memory genetics: Meta-analysis reveals robust reproducibility. Neuroscience and Biobehavioral Reviews. 2018;95:361–382. doi: 10.1016/j.neubiorev.2018.07.016. [DOI] [PubMed] [Google Scholar]
  91. Verlinden H. Dopamine signalling in locusts and other insects. Insect Biochemistry and Molecular Biology. 2018;97:40–52. doi: 10.1016/j.ibmb.2018.04.005. [DOI] [PubMed] [Google Scholar]
  92. von Essen A, Pauls D, Thum AS, Sprecher SG. Capacity of visual classical conditioning in Drosophila larvae. Behavioral Neuroscience. 2011;125:921–929. doi: 10.1037/a0025758. [DOI] [PubMed] [Google Scholar]
  93. Weber D, Vogt K, Miroschnikow A, Pankratz M, Thum AS. Four individually identified paired dopamine neurons signal taste punishment in larval Drosophila. eLife. 2023;12:RP91387. doi: 10.7554/eLife.91387.1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  94. Weiglein A, Thoener J, Feldbruegge I, Warzog L, Mancini N, Schleyer M, Gerber B. Aversive teaching signals from individual dopamine neurons in larval Drosophila show qualitative differences in their temporal “fingerprint”. The Journal of Comparative Neurology. 2021;529:1553–1570. doi: 10.1002/cne.25037. [DOI] [PubMed] [Google Scholar]
  95. Widmann A, Eichler K, Selcho M, Thum AS, Pauls D. Odor-taste learning in Drosophila larvae. Journal of Insect Physiology. 2018;106:47–54. doi: 10.1016/j.jinsphys.2017.08.004. [DOI] [PubMed] [Google Scholar]
  96. Wise RA. Roles for nigrostriatal--not just mesocorticolimbic--dopamine in reward and addiction. Trends in Neurosciences. 2009;32:517–524. doi: 10.1016/j.tins.2009.06.004. [DOI] [PMC free article] [PubMed] [Google Scholar]
  97. Wu JK, Tai CY, Feng KL, Chen SL, Chen CC, Chiang AS. Long-term memory requires sequential protein synthesis in three subsets of mushroom body output neurons in Drosophila. Scientific Reports. 2017;7:7112. doi: 10.1038/s41598-017-07600-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  98. Xiang Y, Yuan Q, Vogt N, Looger LL, Jan LY, Jan YN. Light-avoidance-mediating photoreceptors tile the Drosophila larval body wall. Nature. 2010;468:921–926. doi: 10.1038/nature09576. [DOI] [PMC free article] [PubMed] [Google Scholar]
  99. Yamagata N, Ichinose T, Aso Y, Plaçais P-Y, Friedrich AB, Sima RJ, Preat T, Rubin GM, Tanimoto H. Distinct dopamine neurons mediate reward signals for short- and long-term memories. PNAS. 2015;112:578–583. doi: 10.1073/pnas.1421930112. [DOI] [PMC free article] [PubMed] [Google Scholar]
  100. Yamagata N, Hiroi M, Kondo S, Abe A, Tanimoto H. Suppression of dopamine neurons mediates reward. PLOS Biology. 2016;14:e1002586. doi: 10.1371/journal.pbio.1002586. [DOI] [PMC free article] [PubMed] [Google Scholar]
  101. Zhao B, Sun J, Li Q, Zhong Y. Differential conditioning produces merged long-term memory in Drosophila. eLife. 2021;10:e66499. doi: 10.7554/eLife.66499. [DOI] [PMC free article] [PubMed] [Google Scholar]

eLife Assessment

Meet Zandawala 1

This study presents valuable findings on the role of specific dopamine neurons for aversive learning and modulation of innate behavior in Drosophila larvae. The authors present convincing evidence backed up by detailed behavioral quantification and rigorous testing. Their data confirms previous findings and will be of interest to the learning and memory community.

Reviewer #1 (Public review):

Anonymous

Summary:

The authors investigate the role of different specific dopaminergic neurons in the mushroom body of Drosophila larvae for learning and innate behavior. All the tested neurons are thought to be involved in punishment learning. The authors discover that artificial activation of single DANs in training leads to safety learning, but not punishment learning. Furthermore, activation of single DANs can lead to changes in locomotion behavior, which can affect light preference. The authors provide a deeper understanding of the functional diversity of single dopamine neurons; however, it is unclear how translatable these findings are to learning experiments with real punishment stimuli.

The authors provide a detailed behavioral analysis of locomotion in response to activation of various dopamine neurons. This analysis allows them to exclude that the locomotion defects affect memory recall behavior.

Strengths:

The authors disentangle which kind of memories are formed with the activation of different dopamine neurons - safety learning and/or punishment learning. They further investigate whether the US is required in the test for recall. They do indeed find differences, and the results will be of interest to the learning and memory community.

Interestingly, optogenetic activation of a single DAN during training leads to safety memory, but not punishment memory. Furthermore, DAN activation also affects innate locomotion, and the authors show that optogenetic activation of different DANs affects locomotion differently.

Weaknesses:

All experiments in the manuscript use optogenetic activation of DANs, thus it is not clear what kind of memories are formed. Several stimuli can be used as punishment, such as electric shock, salt, bitter, and light - it is not clear what kind of memory the authors investigate here. The findings could be discussed in the context of what DANs respond to. Furthermore, studies in adults and larvae showed that most DANs can code for both valences - etc., aversive DANs can be activated by punishment, and inhibited by reward. Thus, safety learning might be a result of a decrease in activity in DANs during odor presentation. The authors also do not discuss possible feedback loops from MBONs to DANs across compartments. Could such connections allow for safety learning in larvae?

The authors show that artificial activation with different light intensities can form different memories and that increasing the light intensity sometimes leads to no memories. Also, using different optogenetic tools reveals different results. This again raises the question of how applicable the results will be for learning with real stimuli. Is there a natural stimulus that only induces safety learning, but no punishment learning? The authors discuss these limitations.

Reviewer #2 (Public review):

Anonymous

Summary:

This study provides valuable context for ongoing research on the role of dopamine in memory and locomotion. DANs have been a fascinating area of study due to their complexity, and this work dissects specific DANs, exploring their roles in different memory-related behaviors while offering some explanations. The discussions provided by the authors effectively situates the study in the broader field of learning, memory, DAN circuitry and behavioral computation in insect brains. The study achieves what it sets out to and it does so unequivocally. The experiments were elegantly designed, leaving little room for doubt in the study's claims. However, the study lacks context regarding the molecular pathways underlying these results. While it strengthens current knowledge by providing robust evidence, it does little to explore the molecular mechanisms behind these effects.

Strengths:

(1) Experiment design is one of the strengths of this study. The experiments are thorough and cover the length and breadth of the core findings of the study. Although a lot of work has already been done in studying the role of dopamine in memory and locomotion, the dissection of the functions of distinct DANs in larvae has been done meticulously with well-structured experiments.

(2) This study fits quite nicely into the puzzle of memory, especially in the context of Dopamine. Previous studies in *Drosophila* adults have shown the opposing roles of DANs in locomotion depending on the context of DAN activation. This study drives that point home for larvae, providing conclusive evidence in that regard.

(3) The use of clear figures and simple language is one of the strengths of this paper. The figures are comprehensive, complete and manage to narrate the story by themselves. The flow of information is smooth. The simple and effective language used maintains scientific rigor while remaining accessible to those new to the field. A pleasant read.

Weaknesses:

(1) The authors have done a great job at structuring the figures. But some main figures would benefit from including the controls instead of placing them in supplementary.

(2) The paper would benefit from a deeper discussion regarding molecular mechanisms underlying their results. It would be interesting to see what the authors think about different Dopamine receptors and how they relate to the findings of this paper.

(3) Throughout the paper, the authors have been clear and comprehensive, but in some cases, further explanation of their choices were missing. For example, the choice to compare bending and tail velocity over other parameters within the same clusters is unclear.

Comments on revised version.

Most of the comments have been addressed.

Reviewer #3 (Public review):

Anonymous

Summary

Across species, dopamine release serves seemingly diverse functions, such as reinforcing memories and regulating locomotion and flight. However, whether distinct dopaminergic neurons (DANs) are allocated to each function is unclear. In this study, Toshima et al. have used the numerically simple organization of the Drosophila larval brain to answer this question. They use optogenetic activation to systematically stimulate a small set of DANs, individually and collectively, and study the effect on diverse functions such as memory formation, retrieval, and locomotion. The reproducibility of optogenetic activation is a strength of this approach. At the same time, this is a caveat, as optogenetic activation may not recapitulate natural modes of activation and may lead to outcomes not observed under natural conditions. They find that singly or collectively, DL1 DANs can induce punishment and/or safety memory formation and retrieval. DANs can even gate the expression of memory. Finally, the same DANs also modulate locomotion in the larvae. The authors speculate that dopaminergic neurons in other species may also share such overlapping functions. Their findings are nicely summarised in Figure 9.

Strengths

The study systematically activates neurons in the DL1 cluster. Individual and collective stimulation of the Dl1 DANs has been conducted to assess the induction and gating of aversive punishment memory, safety memory, and acute locomotion.

Specific adult Drosophila DANs are known to induce dual behaviors and functions. The same MP1/y1pedc DANs are recognized for gating appetitive memory expression and representing aversive teaching signals downstream of sensory stimuli such as electric shocks, bitter tastes, and heat. Neurons in the PPL1 cluster regulate adult flight and food-seeking behavior. The authors deserve credit for conducting an organized examination of dopaminergic neuronal functions in larvae, thereby making their findings more comparable and facilitating the proposal of a holistic model.

They have provided substantial evidence for their findings and have frequently presented replicated behavioral datasets. They have been transparent about the results that were difficult to explain. Additionally, they have provided an impressive body of supporting data to strengthen their main findings.

Weaknesses

As mentioned above, optogenetic activation may not recreate natural neuronal activation in response to external stimuli. This could have led to outcomes that will not occur under other natural circumstances.

Comments on revised version.

I appreciate the author's responses, and I do not have any comments or suggestions at this point.

eLife. 2026 Oct 16;14:RP106148. doi: 10.7554/eLife.106148.3.sa4

Author response

Naoko Toshima 1, Arman Behrad 2, Franziska Behnke 3, Gauri Kaushik 4, Alice Weiglein 5, Martin Strauch 6, Juliane Thoener 7, Oliver Kobler 8, Maia Lisandra M Wang 9, Ayaka Fukushima 10, Markus Dörr 11, Michael Schleyer 12

The following is the authors’ response to the original reviews.

Public Reviews:

Reviewer #1 (Public review):

Weaknesses:

All experiments in the manuscript use optogenetic activation of DANs, thus it is not clear what kind of memories are formed. Several stimuli can be used as punishment, such as electric shock, salt, bitter, and light - it is not clear what kind of memory the authors investigate here. The findings could be discussed in the context of what DANs respond to.

This is indeed a caveat of our study and we discuss this issue now in lines 557-566. We refrained from testing necessity to specific US on purpose as we knew that another research group was focussing on this question in parallel (Weber et al., 2023, also published in eLife) and therefore rather focussed on complementary experiments. That study also includes a rather deep discussion about the inputs to individual DANs. We briefly refer to this discussion (lines 442-444) but decided to not go into detail to avoid too much overlap.

Furthermore, studies in adults and larvae showed that most DANs can code for both valences - etc., aversive DANs can be activated by punishment, and inhibited by reward. Thus, safety learning might be a result of a decrease in activity in DANs during odor presentation. The authors also do not discuss possible feedback loops from MBONs to DANs across compartments. Could such connections allow for safety learning in larvae?

We thank the reviewer for raising these points and included a brief discussion of both scenarios in lines 469-474.

The authors show that artificial activation with different light intensities can form different memories and that increasing the light intensity sometimes leads to no memories. Also, using different optogenetic tools reveals different results. This again raises the question of how applicable the results will be for learning with real stimuli. Is there a natural stimulus that only induces safety learning, but no punishment learning?

We do not know of such a stimulus. Based on our data, a US that only activates a single DAN should only make safety memory – however, the available data of which US activates which DAN is very limited in larvae and currently no such US is known. We discuss this point briefly in lines 557-563 and 572-574.

The authors provide a detailed behavioral analysis of locomotion behavior; however, the detailed analysis seems unnecessary for that dataset. Modulation of speed and bending rate has been described before with simpler methods (specifically for MBONs). The revealed locomotion phenotypes probably affect larval locomotion during memory recall with light activation, thus the authors should show that larvae are potentially able to move during light-on memory tests.

We expanded our locomotion analysis of the innate and learned odor preference experiments (new Fig. 6) and show that in these experiments, even with TH-DANs being activated, larvae indeed can move relatively normal and the existing locomotion phenotypes are not correlated to their olfactory choices.

We do not agree that the locomotion analysis is unnecessary. Modulations of speed and bending have been described for MBONs but to our knowledge not for DANs. It is not trivial at all that DANs and MBONs cause the same behavioral modulations (see, for example, this adult study: Mohammad et al., 2024 Plos Biol). There is extremely limited knowledge about the motoric effects of dopaminergic neurons in larvae - we therefore find it important to describe our results in detail. We added some further rationale of why we think it is crucial to explore the functions of DANs for learning and movements together (lines 81-86).

Reviewer #2 (Public review):

Weaknesses:

(1) The authors have done a great job at structuring the figures. But some main figures would benefit from including the controls instead of placing them in supplementary.

We had decided to put the controls into the supplement in some cases to prevent the main figures to be overcrowded. We revised this decision upon the reviewer’s comment for Fig. 8 (previously Fig. 7) but decided to keep other figures unchanged as we feel that the current design best fits the purpose of each figure. We provide a figure-for-figure rationale in our response to the recommendations for the authors.

(2) The paper would benefit from a deeper discussion regarding molecular mechanisms underlying their results. It would be interesting to see what the authors think about different Dopamine receptors and how they relate to the findings of this paper.

We thank the reviewer for the suggestion. Although we agree that such a discussion would be interesting, we hesitate to expand on this topic, as the discussion is already quite long and our study does not contribute any new data to clarify the molecular dopaminergic mechanism.

(3) Throughout the paper, the authors have been clear and comprehensive, but in some cases, further explanation of their choices were missing. For example, the choice to compare bending and tail velocity over other parameters within the same clusters is unclear.

We understand that this choice was not clearly explained and expanded on our rationale in lines 244-251.

Reviewer #3 (Public review):

Weaknesses:

The larvae exhibit directed locomotory action to express punishment or safety memory. If the larvae did not move, we would not be able to assess memory function. Hence, functional activation of DANs could result in one action, which seems like two different functions of memory expression and locomotion. It can also be argued that activation of DANs represents a teaching signal to the KCs, and then eventually, downstream of the MBONs, it results in locomotion modulation. Hence, the seeming functional diversity could be a function of different downstream neuronal pathways and not molecular context-dependent diversity inside dopaminergic neurons. The authors should address this possibility or point out the fallacy in the above argument.

We thank the reviewer for raising this issue. To the first point, we expanded our locomotion analysis of the innate and learned odour preference experiments (new Fig. 6) and show that in these experiments, even with TH-DANs being activated, larvae indeed can move relatively normal. In addition, the existing locomotion phenotypes in these experiments were not correlated with the animals’ olfactory choice. This makes it unlikely that the changed locomotion directly determines our observation during the olfactory experiments.

We do agree that it is possible that both the preference after learning and the changed locomotion could come through the same dopaminergic mechanism via diverse downstream pathways. We cover this hypothesis in Fig. 10G and address this question briefly in lines 580-582.

The finding that activation of TH-GAL4 conveys aversive valence and R58E02-GAL4 conveys appetitive valence seems redundant (Figure 6). I understand they say this in the context of locomotion. However, they may not have mentioned similar findings in adults. In adults, artificial activation of DANs covered by the same GAL4 lines acts as aversive and appetitive teaching signals for memory formation. These references should be cited appropriately in the results and discussion if not currently included.

We thank the reviewer for this comment and tried to include the relevant adult literature (see e.g. lines 351-356 and 583-604). In particular, we added a quite detailed discussion about a paper published after our initial submission that performed similar experiments for the adult PAM-DANs Lozada-Perdomo et al., 2025, iScience.

We do not agree, however, that the experiments in Fig. 7 (previously Fig. 6) are redundant. Recent studies in adults found no correlation between the rewarding/punishing effects and the innate valence a given dopaminergic neuron induces (Rohrsen et al., 2021, bioRxiv; Mohammad et al., 2024, PLOS Biol; Lozada-Perdomo et al., 2025, iScience). To our knowledge, no such studies have been carried out in larvae so far. Therefore, we think that it is not only important to test it but that the respective results compared to the results in adults are of relevance for the readership.

The evidence for the role of dopamine (Figure 7) can be bolstered by using other available RNAi lines against TH. A valium20 vector-based shRNA line is recommended. The current evidence is based mainly on non-specific pharmacological intervention with 3IY.

We agree to this caveat and made it transparent now in lines 387-389 and 401-403. We nevertheless chose, for the time being, to not include further experiments to address this point in the current study.

Recommendations for the authors:

Reviewer #1 (Recommendations for the authors):

Activation of specific or multiple DANs seems to increase naïve odor preference (f1 or TH). Is this due to locomotion defects in TH - how does the odor preference develop over time? Can this increased odor preference explain the safety learning - where they also approach the odor stimulus?

The reviewer is right that in presence of light, we see increased odor preference both innate and after unpaired training – theoretically, that could be the same effect. However, this would not explain why we see the same increased preferences after unpaired learning with all driver strains but increased innate preferences only for some of them. Moreover, when activating TH, we also see increased odor preference in absence of light after unpaired training but not innately. We therefore think that these are independent effects.

We also include a new Fig. 6 providing additional information, including the development of preference over time, and addressing the question whether the modulations in locomotion can explain differences in odor preference.

Locomotion behavior was assessed in 30s light-on periods - was the behavior different from the memory test or naïve preference test which had light on for 3 (or 2.5) minutes - which light intensity was used for the data shown in Figure 5.2? How did the larvae move in the high light concentration/ or with ATR - did they not show memory due to impaired locomotion?

Light intensity for all odour preference and learning experiments with ChR2-XXL was 100 µW/cm2 (except Fig. 2 – S2C), i.e. equivalent to the experiments in Fig. 5 – S1 and Fig. 9 – S2 (weak light). We replaced Fig. 5 – S2 with a new expanded Fig. 6 analysing the locomotion of our experiments shown in Fig. 2F, 3F and Fig. 2 – S1F. We show in this figure that the larvae can move relatively normal and that the locomotion effects are weaker than in our experiments with 30s light periods. Unfortunately, we do not have videos available for all experiments and therefore cannot make a similar analysis for Fig. 2 – S2C and D when we used strong light or ATR feeding. The experimenters did not notice impaired locomotion during the experiment and the animals did show normal odour preferences similar to those shown in Fig. 3 – but the preferences were the same after paired and unpaired training, resulting in zero Memory Scores. Therefore, we do not think that the locomotion prevented the memory expression.

In several experiments, even genetic controls seem to show learning with blue light activation. Thus, the light itself seems to activate DANs. The authors should discuss these effects and explain what this could mean for the findings. The light stimulus might not just activate the specific DAN that expresses the optogenetics, but also additionally other DANs which respond to light.

We thank the reviewer to point this out and point out this caveat in lines 159-165.

The authors speculate about the function of potential MB circuits - the DAN-MBON circuit is not well described so far and might be required for the US in test memory recall. A straightforward experiment to investigate the involvement of this circuit in punishment or safety memory recall would be to block dopamine receptors in the MBON.

We very much agree to this suggestion, but believe these experiments are beyond the scope of the current study. We therefore decided to not perform these experiments for the current paper.

Reviewer #2 (Recommendations for the authors):

(1) As self-explanatory as the figures are, it would be interesting to also see controls in some of them. For example, in Figure 5, the effect size graph (Figure 5C) clarifies to an extent the difference between control genotypes and the experimental genotypes. It would be nice to see the results of genetic controls in Figures 5A and 5B instead of in Figure 4 - supplement 2.

We originally decided to put the controls into the supplement to prevent the main figures to be overcrowded. We revised this decision upon the reviewer’s comment for Fig. 8 (originally 7). For Fig. 4 and 5 specifically, we decided to keep the current layout because each serves a different purpose: Fig. 4D-L, Fig. 5 – S1 and S2 present the actual data with all genotypes that were made in parallel and therefore can be compared directly. Fig. 4 – S2 aims to visualize the effect of the light by comparing all controls across all experiments, normalized to the same starting value. Fig. 5A and B aim to compare the shape and effect size of activating DANs on top of the effect of the light - therefore, we subtracted the controls in each experiment from the experimental group. We think that adding the controls’ behaviour to Fig. 5A and B would undermine the aim of this figure.

(2) It is a bit unclear why bending and tail velocities were the parameters chosen to compare between groups while in most cases they were of lower relative importance according to Figure 4 - supplement 1. Elaborating on this would strengthen the differences in behavior and also the claims of this study.

We thank the reviewer for the suggestion and tried to make our choice clearer. Please see our answer to the respective part of the public review.

(3) In adults, it has been shown that the same DAN can encode opposing valence depending on whether it was activated before or after odor presentation. Discussing the importance of temporal order of stimulus processing would bolster the results regarding paired and unpaired training in Figure 3.

We thank the reviewer for this very good suggestion – also in larvae, this temporal function has been described. We discuss these observations in relation to our results in lines in 481-494.

Reviewer #3 (Recommendations for the authors):

Toshima et al., as stated in the public reviews, have done an admirable job with this manuscript. Below are specific suggestions that could improve the manuscript. It is, of course, up to the authors to decide which ones to attend to.

Treat controls consistently. In Figure 2 and others, parental controls are not pooled, but in Figure 3, for odor preference, controls are pooled.

We agree that the same things should be treated in the same way throughout a study and normally adhere to this principle. We nevertheless made an exception for Fig. 3 only because its goal is to provide a post-hoc analysis across several replications of experiments, some of which included genetic controls, others not (from Fig. 2, Fig. 2-S2 and S3). Due to relatively small effect sizes and high variability in odor preferences, to answer the question of paired and unpaired learning, we need higher sample sizes than each individual experiment provided. We therefore decided to pool all “equivalent” data across all these experiments. We do agree that this is a suboptimal approach but hope the reviewer can understand the rationale behind it. We explained our rationale clearer now (lines 180-183).

I prefer to see all data points in a graph. It is more transparent than the box plots. Also, could you note why the data median is preferable to show over the mean?

Although we in principle agree to the notion that presenting all data points is more transparent, we opted against it as it makes some graphs harder to read in particular with high sample sizes – in some of our figures, we have hundreds of data points per group. We explain our choice, including for using the median, in the method section (lines 835-839).

Please undertake another round of language editing to handle spelling errors, etc. Use consistent British/American English.

We thank the reviewer for their suggestion and tried our best to fix any spelling and grammar errors.

I urge the authors to move beyond the false dichotomy of 'p' value statistics to using the statistical framework of estimation statistics for data analysis. I understand switching from familiar statistical analysis in such a late manuscript stage is very difficult. However, the authors can consider the estimation statistics framework in subsequent studies. https://www.estimationstats.com is a good starting point for biologists to get to know a framework that has been extensively worked on and is arguably a more 'honest' way of analyzing data. Disclaimer: I am not associated with the above website.

We agree that the p-value has problems and are aware of the estimation statistics framework. We had considered applying it here, but we decided against switching to a completely different statistical framework for a research project that was ongoing since several years. However, we are sincerely considering it for our current research projects.

Associated Data

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

    Supplementary Materials

    MDAR checklist
    Source data 1. Raw data and results of statistical tests.

    This Excel file provides all raw data underlying the figures. Each tab shows the data of one figure or figure supplement, with the results of all statistical tests to the left.

    elife-106148-data1.xlsx (6.4MB, xlsx)

    Data Availability Statement

    Source data to all behavioural experiments are included in Source data 1. The IMBA software used for analysis (Thane et al., 2023) is publicly available at GitHub: https://github.com/mthane/IMBA (Thane, 2026).


    Articles from eLife are provided here courtesy of eLife Sciences Publications, Ltd

    RESOURCES