Animals, including humans, form oppositely valenced memories for stimuli that predict the occurrence versus the termination of a reward: appetitive ‘reward’ memory for stimuli associated with the occurrence of a reward and aversive ‘frustration’ memory for stimuli that are associated with its termination. We characterized these memories in larval Drosophila melanogaster using a combination of Pavlovian conditioning, optogenetic activation of the dopaminergic central-brain DAN-i1864 neuron, and high-resolution video-tracking. This reveals their dependency on the number of training trials and the duration of DAN-i1864 activation, their temporal stability, and the parameters of locomotion that are modulated during memory expression. Together with previous results on ‘punishment’ versus ‘relief’ learning by DAN-f1 neuron activation, this reveals a 2×2 matrix of timing-dependent memory valence for the occurrence/termination of reward/punishment. These findings should aid the understanding and modelling of how brains decipher the predictive, causal structure of events around a target reinforcing occurrence.

Pleasurable events induce positive affect when they occur, and negative affect when they terminate. Accordingly, humans and other animals alike form appetitive memory for stimuli that are associated with the occurrence of reward (‘reward’ memory), and aversive memory for stimuli associated with its termination (‘frustration’ memory) (Hellstern et al., 1998; Solomon and Corbit, 1974) (the same is observed for painful events, with inverted signs; Gerber et al., 2014; Solomon and Corbit, 1974). Although the mechanisms of reward memory are understood in considerable detail (Schultz, 2015; Waddell, 2013), much less is known about frustration memory (Felsenberg et al., 2013; Hellstern et al., 1998). Such an incomplete picture of how pleasurable events are processed may lead both computational modelling of neural networks and the understanding of related pathology astray. In this context, we provide the first characterization of learning from the occurrence and termination of a central-brain reward signal.

For such an endeavour, larval Drosophila melanogaster are an attractive study case. Robust paradigms of associative learning and resources for cell-specific transgene expression are available (Eschbach et al., 2020; Li et al., 2014; Saumweber et al., 2018). Moreover, their central nervous system is compact and consists of only approximately 10,000 neurons (Bossing et al., 1996; Larsen et al., 2009). This has allowed for the reconstruction of its chemical-synapse connectome, including the mushroom bodies as the associative memory centre of insects (Eichler et al., 2017). It has turned out that the circuits and mechanisms underlying associative learning in larvae largely parallel those of adults (Eschbach and Zlatic, 2020; Thum and Gerber, 2019; adult flies: Li et al., 2020; Takemura et al., 2017). Sensory projection neurons establish a sparse, combinatorial representation of the sensory environment across the mushroom body Kenyon cells (KCs). The KC axons are intersected by mostly dopaminergic modulatory neurons (DANs) and by mushroom body output neurons (MBONs), which eventually connect towards the motor system to adapt the parameters of locomotion (Eschbach et al., 2021; Paisios et al., 2017; Schleyer et al., 2020; Thane et al., 2019). Axonal regions of DANs and MBONs dendritic regions are organized as compartments in which matched-up individual DANs and MBONs form local circuits with the KCs (Fig. 1A). Of the eight DANs innervating the mushroom body, two mediate rewarding effects and three mediate punishing effects (Eschbach et al., 2020; Saumweber et al., 2018). When an odour is encountered, and a reward or punishment signal reaches a given compartment, the strength of the local synapses from the odour-activated KCs to the MBON(s) of that same compartment is modified. As a result, the animal's behaviour towards the odour in question is changed when the odour is encountered again.

Fig. 1.

Reward and frustration memory by optogenetic DAN-i1864 activation. (A) Schematic of the DAN-i1 neuron (blue) innervating the i-compartment of the mushroom body. Kenyon cells (KCs) feature a higher-order odour representation. a to k refer to the different mushroom body compartments (Eichler et al., 2017). (B,C) Larvae were trained with three trials of odour (cloud) and DAN-i1864 activation (blue square) and subsequently tested for their odour preference. Positive and negative memory scores reflect appetitive or aversive associative memory, respectively (Fig. S1). (B) Upon forward training, only the experimental genotype showed appetitive memory. (C) Upon backward training, aversive memory was only shown by the experimental genotype. (D,E) Larvae received three trials of forward or backward training with varying durations of DAN-i1864 activation. (D) For forward training, odour presentation always preceded DAN-i1864 activation by 10 s. Appetitive memory of equal strength was observed in all cases. (E) For backward training, odour presentation always started at the offset of the DAN-i1864 activation. Increased durations of DAN-i1864 activation supported increased aversive memory. (F,G) With a single training trial, forward training established appetitive memory (F), whereas backward training established no aversive memory (G). (H,I) When three training trials were conducted, larvae showed appetitive memory up to at least 40 min after forward training (H), whereas aversive memory after backward training has decayed after just 20 min. Note that the training trial duration in these experiments was 8 min instead of 12 min as in B–G. (J,K) Results show that such a difference in trial duration does not affect memory scores. Box plots represent the median as the midline and the 25/75% and 10/90% quantiles as box boundaries and whiskers, respectively. Sample sizes are displayed within the figure. #Significance relative to chance levels. *Significance in MWU or KW tests (n.s., not significant). Statistical results are reported along with the source data in Dataset 1. See Fig. S2 for preference scores underlying the memory scores.

Fig. 1.

Reward and frustration memory by optogenetic DAN-i1864 activation. (A) Schematic of the DAN-i1 neuron (blue) innervating the i-compartment of the mushroom body. Kenyon cells (KCs) feature a higher-order odour representation. a to k refer to the different mushroom body compartments (Eichler et al., 2017). (B,C) Larvae were trained with three trials of odour (cloud) and DAN-i1864 activation (blue square) and subsequently tested for their odour preference. Positive and negative memory scores reflect appetitive or aversive associative memory, respectively (Fig. S1). (B) Upon forward training, only the experimental genotype showed appetitive memory. (C) Upon backward training, aversive memory was only shown by the experimental genotype. (D,E) Larvae received three trials of forward or backward training with varying durations of DAN-i1864 activation. (D) For forward training, odour presentation always preceded DAN-i1864 activation by 10 s. Appetitive memory of equal strength was observed in all cases. (E) For backward training, odour presentation always started at the offset of the DAN-i1864 activation. Increased durations of DAN-i1864 activation supported increased aversive memory. (F,G) With a single training trial, forward training established appetitive memory (F), whereas backward training established no aversive memory (G). (H,I) When three training trials were conducted, larvae showed appetitive memory up to at least 40 min after forward training (H), whereas aversive memory after backward training has decayed after just 20 min. Note that the training trial duration in these experiments was 8 min instead of 12 min as in B–G. (J,K) Results show that such a difference in trial duration does not affect memory scores. Box plots represent the median as the midline and the 25/75% and 10/90% quantiles as box boundaries and whiskers, respectively. Sample sizes are displayed within the figure. #Significance relative to chance levels. *Significance in MWU or KW tests (n.s., not significant). Statistical results are reported along with the source data in Dataset 1. See Fig. S2 for preference scores underlying the memory scores.

Given this separation of reward and punishment signalling at the level of the DANs, it was striking to observe that in both larval and adult D. melanogaster, individual DANs can confer timing-dependent valence reversal. In the case of larvae, presentation of an odour followed by optogenetic activation of the DAN-i1 neuron (as covered by the SS00864-Gal4 strain, henceforth DAN-i1864) (forward training) leads to appetitive reward memory, whereas presentation of the odour upon termination of DAN-i1864 activation (backward training) establishes aversive frustration memory (Saumweber et al., 2018; adults: Handler et al., 2019). Whether the mechanisms of frustration memory established by termination of DAN-i1864 activation differ from those of the likewise aversive memory established by unpaired presentations of odour and DAN-i1864 activation (Schleyer et al., 2018, 2020) remains to be tested. The DAN-f1 neuron, in contrast, supports aversive punishment memory upon forward training and appetitive ‘relief’ memory upon backward training (Weiglein et al., 2021; using SS02180-Gal4 as the driver, henceforth DAN-f12180) (adults: Aso and Rubin, 2016; Handler et al., 2019; König et al., 2018). For DAN-f12180, Weiglein et al. (2021) have characterized punishment and relief memories in some detail; however, no further analysis has been performed for the reward and frustration memories established by DAN-i1864 activation. Here, we undertake such an analysis to provide a more complete picture of the timing-dependent valence reversal conferred by dopaminergic neurons.

Animals

Experiments were performed on third instar foraging larvae of Drosophila melanogaster Meigen 1830 raised on standard food at 25°C, 60–70% relative humidity, in a room running on a 12 h light:12 h dark cycle but in vials wrapped with black cardboard to keep them in darkness.

We used the split-Gal4 driver strain SS00864 (HHMI Janelia Research Campus, Ashburn, VA, USA; Saumweber et al., 2018), supporting strong and reliable transgene expression in DAN-i1 of both hemispheres, plus expression from a few additional cells that is stochastic between hemispheres and preparations (Saumweber et al., 2018; Schleyer et al., 2020; Weiglein et al., 2019). As argued before, such stochastic expression is unlikely to cause systematic effects in the behavioural mass assays employed in the present study (Saumweber et al., 2018; Schleyer et al., 2020). We refer to this driver strain and the covered neurons as DAN-i1864.

For optogenetic activation, offspring of the UAS-ChR2-XXL effector strain (Bloomington Stock Centre no. 58374; Dawydow et al., 2014) crossed to DAN-i1864 were used. The driver control resulted from DAN-i1864 crossed to w1118 (Bloomington Stock Centre nos. 3605, 5905, 6326), and the effector control from UAS-CHR2-XXL crossed to a strain carrying both split-Gal4 landing sites (attP40/attP2) but without Gal4 domains inserted (‘empty’) (HHMI Janelia Research Campus; Pfeiffer et al., 2010).

Odour–DAN associative learning

Procedures followed Saumweber et al. (2018) and Weiglein et al. (2021). Variations in the following procedures will be mentioned in the Results section.

Experiments were performed in a custom-made setup, consisting of a wooden box equipped with a light table featuring 24×12 LEDs (peak wavelength 470 nm; Solarox, Dessau-Roßlau, Germany) and a 6 mm thick diffusion plate of frosted acrylic glass on top to ensure uniform blue light for ChR2-XXL activation (120 μW cm–2). On top of the diffusion plate, Petri dishes were placed into a polyethylene diffusion ring illuminated by 30 infrared LEDs (850 nm; Solarox). For video recording, a camera (acA204090umNIR, Basler, Ahrensburg, Germany) equipped with an infrared-pass filter was placed approximately 25 cm above the Petri dish. The Petri dishes were filled with 1% agarose solution (electrophoresis grade; CAS: 9012-36-6, Roth, Karlsruhe, Germany) as the substrate on which cohorts of approximately 30 larvae were free to move once transferred from their food vials.

During training, one set of larvae was presented with an odour paired with optogenetic activation of DAN-i1864 at the mentioned inter-stimulus interval (ISI), whereas a second set of larvae received the odour and the DAN-i1864 activation in an unpaired manner (Fig. S1). Two different ISIs were used: −10 s for forward training (the 30-s odour presentation preceded the 30-s DAN-i1864 activation by 10 s) and 30 s for backward training (the odour presentation occurred 30 s after DAN-i1864 activation had started) (Fig. S1).

For the presentation of the odour (n-amylacetate, AM; CAS: 628-63-7, Merck, Darmstadt, Germany, diluted 1:20 in paraffin oil; CAS: 8042-47-5, AppliChem, Darmstadt, Germany) or of paraffin oil as the solvent control (S), we used Petri dish lids equipped with four sticky filter papers onto which 5 µl of either substance could be applied. Paraffin oil does not have behavioural significance as an odour (Saumweber et al., 2011).

After three training trials, the larvae were placed in the middle of a fresh test Petri dish and given the choice between AM and S on opposite sides. After 3 min, the number of animals (n) on either side and in a 1-cm wide middle stripe was determined and the preference (P) for the odour was calculated as:
formula
(1)

Thus, values can range between 1 and −1, with positive values indicating attraction and negative values aversion to AM.

From paired–trained versus unpaired–trained sets of larvae, a memory score (MS) was calculated as:
formula
(2)

Thus, memory scores range between 1 and −1, with positive values indicating appetitive associative memory and negative values aversive associative memory. Each sample (N=1) thus reflects the behaviour of two cohorts of approximately 30 larvae, one paired–trained and the other unpaired–trained.

Video-tracking of locomotion

During the test, larval behaviour was video-recorded and analysed offline (Paisios et al., 2017). The typical zig-zagging larval behaviour was classified as either a head cast (HC) or a run, and was characterized by the HC rate, the change in orientation that results from a HC, and the run speed. All measurements are presented combined for around 30 larvae on a given Petri dish as one sample (N=1).

The HC rate-modulation (Mrate,HC) was defined as:
formula
(3)
where nHC is the number of HCs. Positive scores indicate that larvae carry out more HCs per second (HC s−1) while heading away from the odour than while heading towards it, and thus indicate attraction. In contrast, negative scores indicate aversion.
To calculate the difference in the HC rate-modulation of animals after paired versus unpaired training, we calculated the difference in HC rate-modulation (ΔHC rate-modulation, ΔMrate,HC) as:
formula
(4)
The reorientation per HC (RHC) was defined as:
formula
(5)

The absolute heading angle (θabs) was defined as 0 deg when the animal's head was pointing towards the odour and 180 deg when pointing away from it. HCs reorienting the animals towards the odour thus reduce this absolute heading angle and yield positive scores indicative of attraction, whereas HCs reorienting the animal away from the odour result in negative scores indicative of aversion.

To calculate the difference in reorientation of animals after paired versus unpaired training, we calculated the difference in reorientation per HC (ΔReorientation per HC, ΔRHC) as:
formula
(6)
Run speed-modulation (MS) was defined as:
formula
(7)
where S is run speed. Thus, positive scores result if animals run faster when heading toward the odour than when heading away, indicating attraction, whereas negative scores imply aversion.
To calculate the difference in run speed-modulation of animals after paired versus unpaired training, we calculated the difference in run speed modulation (ΔRun speed-modulation, ΔMS) as:
formula
(8)
In all three cases, positive Δ scores would thus indicate appetitive memory. In turn, negative Δ scores would indicate aversive memory.

Statistics

Non-parametric statistics were performed throughout (Statistica 13, StatSoft, Tulsa, OK, USA). For comparisons with chance level (zero), one-sample sign tests (OSS) were used. To compare across multiple independent groups, we conducted Kruskal–Wallis tests (KW) with subsequent pair-wise comparisons by Mann–Whitney U-tests (MWU). To ensure a within-experiment error rate below 5%, Bonferroni–Holm correction (Holm, 1979) was applied. Box plots show the median as the middle line, the 25 and 75% quantiles as box boundaries, and the 10 and 90% quantiles as whiskers. Sample sizes were chosen based on previous, similar studies. Experimenters were blind with respect to genotype when applicable. The results of the statistical tests and the source data of all experiments performed are documented in Dataset 1.

We crossed the DAN-i1864 driver to the UAS-ChR2-XXL effector and trained larvae such that the odour was presented either 10 s before DAN-i1864 activation started (forward paired training) or 30 s after the start of DAN-i1864 activation (backward paired training; Fig. S1). To determine the memory score in each case the odour preference of the larvae was compared with the preference of larvae that had undergone presentations of the odour unpaired from DAN-i1864 activation (unpaired). Forward training induced appetitive, reward memory, which was not the case in the genetic controls (Fig. 1B) (Saumweber et al., 2018). In contrast, backward training resulted in aversive, frustration memory (Fig. 1C) (Saumweber et al., 2018). Given the reports of a punishing effect of light (von Essen et al., 2011), the data for the driver control suggest a moderate appetitive relief memory introduced by backward training with light; notably, such an effect would lead us to underestimate the aversive frustration memory in the experimental genotype (Fig. 1C).

To further analyse reward and frustration memory by DAN-i1864 activation, we first enquired into the impact of the duration of DAN-i1864 activation. Despite a trend, this manipulation did not affect reward memory upon forward training (Fig. 1D). After backward training, however, we observed that frustration memory increased with longer-lasting DAN-i1864 activation before odour presentation (Fig. 1E).

Second, given that a single training trial can be sufficient to establish memory for some natural tastant reinforcers (Weiglein et al., 2019), we tested for one-trial memory using DAN-i1864 activation. We observed reward memory after one-trial forward training with DAN-i1864 activation, but no frustration memory after one-trial backward training (Fig. 1F,G). Accordingly, when compared across experiments, reward memory does not benefit from repeated training (Fig. 1B, Fig. 1D middle plot versus Fig. 1F), whereas frustration memory does (Fig. 1C, Fig. 1E middle plot versus Fig. 1G).

Third, we were interested in how temporally stable reward and frustration memories established by DAN-i1864 activation are. Reward memory lasted at least 40 min and indeed only tendentially decayed across this time period (Fig. 1H). In contrast, frustration memory was observed for only up to 10 min after training (Fig. 1I). We note that the experiments shown in Fig. 1H,I used a shortened protocol with reduced idle times before and after the actual training events, such that the total trial duration was 8 min rather than 12 min. In a direct comparison, this difference in procedure was without effect (Fig. 1J,K).

Fourth, we wondered whether reward and frustration memories established via DAN-i1864 activation differ in their locomotor ‘footprint’; that is, whether these two kinds of associative memory can modulate both rate and direction of lateral head movements (HCs) (Paisios et al., 2017; Thane et al., 2019; Toshima et al., 2019). In comparison to larvae that underwent unpaired training, forward training promoted head casts when crawling away, rather than when crawling towards the odour, whereas the opposite was the case upon backward training (Fig. 2A). Likewise, forward and backward training promoted HCs reorienting the larvae towards and away from the odour, respectively (Fig. 2B). In addition, upon forward training we observed that the runs towards the odour were faster than those away from it (Fig. 2C); this was surprising given that in 13 previous datasets, tendencies for such run speed modulation, which can be recognized in about half of the cases, had never reached statistical significance (Paisios et al., 2017; Saumweber et al., 2018; Schleyer et al., 2015, 2020; Thane et al., 2019; Toshima et al., 2019; Weiglein et al., 2019, 2021). In any event, these analyses show that reward and frustration memories established by DAN-i1864 are behaviourally expressed through opposite modulations of the same aspects of locomotion.

Fig. 2.

Locomotion footprint of reward and frustration memory by DAN-i1864 activation. Larvae were video-tracked during testing, and for three behavioural variables the difference between larvae undergoing forward or backward paired training versus unpaired training (Δ) was calculated. (A) Forward training promoted head casts (HCs) when the larvae were crawling away from the odour rather than when crawling towards it. After backward training, the opposite was observed. (B) Forward and backward training prompted larvae to reorient their HCs towards and away from the odour, respectively. (C) Forward training resulted in faster runs towards the odour than away from it, whereas backward training had no effect upon run speed. Data are combined from Fig. 1B–E (30 s light duration) and Fig.1J,K (12 min trial duration). Other details as in Fig. 1. See Fig. S3 for results separated for forward and backward paired training versus unpaired training. Statistical results are reported along with the source data in Dataset 1.

Fig. 2.

Locomotion footprint of reward and frustration memory by DAN-i1864 activation. Larvae were video-tracked during testing, and for three behavioural variables the difference between larvae undergoing forward or backward paired training versus unpaired training (Δ) was calculated. (A) Forward training promoted head casts (HCs) when the larvae were crawling away from the odour rather than when crawling towards it. After backward training, the opposite was observed. (B) Forward and backward training prompted larvae to reorient their HCs towards and away from the odour, respectively. (C) Forward training resulted in faster runs towards the odour than away from it, whereas backward training had no effect upon run speed. Data are combined from Fig. 1B–E (30 s light duration) and Fig.1J,K (12 min trial duration). Other details as in Fig. 1. See Fig. S3 for results separated for forward and backward paired training versus unpaired training. Statistical results are reported along with the source data in Dataset 1.

We present a detailed characterization of the learning from the occurrence and termination of a central-brain reward signal, using optogenetic DAN-i1864 activation as a study case. Together with previous mirror-symmetric results concerning DAN-f12180 (Weiglein et al., 2021), this reveals a 2×2 matrix of memory valence showing memories of opposite valence (appetitive or aversive) for stimuli that are associated with the occurrence or termination of central-brain reinforcement signals (Fig. 3A). Such a push–pull organization makes it possible to decipher the predictive, causal structure of events around a target occurrence and could be inspiring for computational modelling. Indeed, using notably broader drivers for effector expression, a similar organization was reported for adult flies (Handler et al., 2019) and may thus reflect a more general principle (Gerber et al., 2019). Elegant and general as such a 2×2 organization appears to be, there are a number of differences in the memories established. (1) In both life stages, reinforcing effects were strongly determined by the time point of the occurrence/termination of reinforcement, whereas its duration was only of impact for memories related to reinforcement termination (Fig. 1B–E; larval DAN activation: Weiglein et al., 2021; adult DAN activation: König et al., 2018; electric shock: Diegelmann et al., 2013; Jacob and Waddell, 2020). (2) Memories established through the occurrence of an event last longer than those established through its termination, in both larval and adult D. melanogaster (Fig. 1H–J; Weiglein et al., 2021; adults: Diegelmann et al., 2013; Yarali et al., 2008). With due caveats concerning rates of acquisition in mind, it might thus be that memories related to the occurrence of reinforcement are more stable than memories related to its termination. (3) Fewer trials were sufficient to establish reward memory than frustration memory (Fig. 1F,G), which is in line with the opponent-process theory of Solomon and Corbit (1974). However, punishment and relief memory seem to benefit in a similar way from repeated training (larvae: Weiglein et al., 2021; adults: König et al., 2018). (4) So far, only two out of three reinforcing DANs tested in larvae and two out of nine reinforcing DANs tested in adult D. melanogaster have been found to mediate opposing memories for stimuli associated with the occurrence versus termination of their activation (larvae: Saumweber et al., 2018; Weiglein et al., 2021; adults: Aso and Rubin, 2016; König et al., 2018). In other words, reinforcement signals that do not feature timing-dependent valence reversal need to be considered.

Fig. 3.

Summary matrix of timing-dependent valence reversal. Summary of the present and previously published data, showing a 2×2 matrix of timing and valence for DAN-i1864 (left) and DAN-f12180 (right). Larvae underwent pairings of odour and optogenetic activation of the respective DAN (blue box) with different inter-stimulus intervals (ISIs). Odour presentation preceding DAN activation results in negative ISIs (forward training); the reversed sequence results in positive ISIs (backward training). The graph in the middle displays the results of the genetic controls. Shown are medians and 25/75% quantiles of independent experiments from the present study and Saumweber et al. (2018) (top left) as well as Weiglein et al. (2021) (top right). Data and their original publication are documented in Dataset 1. The table summarizes features of reward and frustration memory, and of punishment and relief memory established by pairing odour with the occurrence or termination of DAN-i1864 and DAN-f12180.

Fig. 3.

Summary matrix of timing-dependent valence reversal. Summary of the present and previously published data, showing a 2×2 matrix of timing and valence for DAN-i1864 (left) and DAN-f12180 (right). Larvae underwent pairings of odour and optogenetic activation of the respective DAN (blue box) with different inter-stimulus intervals (ISIs). Odour presentation preceding DAN activation results in negative ISIs (forward training); the reversed sequence results in positive ISIs (backward training). The graph in the middle displays the results of the genetic controls. Shown are medians and 25/75% quantiles of independent experiments from the present study and Saumweber et al. (2018) (top left) as well as Weiglein et al. (2021) (top right). Data and their original publication are documented in Dataset 1. The table summarizes features of reward and frustration memory, and of punishment and relief memory established by pairing odour with the occurrence or termination of DAN-i1864 and DAN-f12180.

As both DAN-i1 and DAN-f1 are dopaminergic (Eichler et al., 2017), it appears straightforward that reward and frustration learning as well as punishment and relief learning are mediated by dopamine. This is likely to be the case, given related results using broader drivers, at least for reward memory (Rohwedder et al., 2016; Thoener et al., 2021) and punishment memory (Selcho et al., 2009), and it is consistent with findings in adult D. melanogaster (Aso et al., 2019; Handler et al., 2019) and in mammals (Navratilova et al., 2015; but see König et al., 2018; Niens et al., 2017).

Taken together, our results complete the characterization of memories brought about by the timed activation of different larval DANs. The current data regarding DAN-i1864 activation and the data regarding DAN-f12180 (Weiglein et al., 2021) provide a critical step to understand the fundamental features of reinforcement processing, and pave the way both for an improved modelling of neural networks of reinforcement learning (Springer and Nawrot, 2021) and for further research into the underlying molecular mechanisms.

Discussions with Christian König (Leibniz Institute for Neurobiology), Paul Stevenson (Universität Leipzig) and Philippe N. Tobler (Universität Zürich), as well as technical and experimental assistance by Anna Ciuraszkiewicz-Wojciech, Bettina Kracht, Thomas Niewalda, Lukas Riemen, Madeleine v. Maydell, Lukas Kuhn, Louisa Warzog and Irina Feldbrügge, are gratefully acknowledged. We thank R. D. V. Glasgow (Zaragoza, Spain) for language editing.

Author contributions

Conceptualization: J.T., A.W., B.G., M.S.; Methodology: J.T., A.W., M.S.; Formal analysis: J.T., M.S.; Investigation: J.T., A.W.; Data curation: J.T., M.S.; Writing - original draft: J.T., B.G., M.S.; Writing - review & editing: J.T., A.W., B.G., M.S.; Visualization: J.T., A.W.; Supervision: B.G., M.S.; Project administration: B.G., M.S.; Funding acquisition: B.G., M.S.

Funding

This study received institutional support by the Wissenschaftsgemeinschaft Gottfried Wilhelm Leibniz (WGL), the Leibniz Institute for Neurobiology (LIN), as well as grant support from the Deutsche Forschungsgemeinschaft (DFG) [GE 1091/4-1 and FOR 2705 Mushroom body to B.G.] and the German-Israeli Foundation for Science (GIF) [G-2502-418.13/2018 to M.S.].

Aso
,
Y.
and
Rubin
,
G. M.
(
2016
).
Dopaminergic neurons write and update memories with cell-type-specific rules
.
eLlife
5
,
e16135
.
Aso
,
Y.
,
Ray
,
R. P.
,
Long
,
X.
,
Bushey
,
D.
,
Cichewicz
,
K.
,
Ngo
,
T. T.
,
Sharp
,
B.
,
Christoforou
,
C.
,
Hu
,
A.
,
Lemire
,
A.
et al. 
(
2019
).
Nitric oxide acts as a cotransmitter in a subset of dopaminergic neurons to diversify memory dynamics
.
eLife
8
,
e49257
.
Bossing
,
T.
,
Udolph
,
G.
,
Doe
,
C. Q.
,
Technau
,
G. M.
(
1996
).
The embryonic central nervous system lineages of Drosophila melanogaster
.
Dev. Biol.
179
,
41
-
64
.
Dawydow
,
A.
,
Gueta
,
R.
,
Ljaschenko
,
D.
,
Ullrich
,
S.
,
Hermann
,
M.
,
Ehmann
,
N.
,
Gao
,
S.
,
Fiala
,
A.
,
Langenhan
,
T.
,
Nagel
,
G.
et al. 
(
2014
).
Channelrhodopsin-2-XXL, a powerful optogenetic tool for low-light applications
.
Proc. Natl. Acad. Sci. USA
111
,
13972
-
13977
.
Diegelmann
,
S.
,
Preuschoff
,
S.
,
Appel
,
M.
,
Niewalda
,
T.
,
Gerber
,
B.
and
Yarali
,
A.
(
2013
).
Memory decay and susceptibility to amnesia dissociate punishment- from relief-learning
.
Biol. Lett.
9
,
20121171
.
Eichler
,
K.
,
Li
,
F.
,
Litwin-Kumar
,
A.
,
Park
,
Y.
,
Andrade
,
I.
,
Schneider-Mizell
,
C. M.
,
Saumweber
,
T.
,
Huser
,
A.
,
Eschbach
,
C.
,
Gerber
,
B.
et al. 
(
2017
).
The complete connectome of a learning and memory centre in an insect brain
.
Nature
548
,
175
-
182
.
Eschbach
,
C.
and
Zlatic
,
M.
(
2020
).
Useful road maps: studying Drosophila larva's central nervous system with the help of connectomics
.
Curr. Opin. Neurobiol.
65
,
129
-
137
.
Eschbach
,
C.
,
Fushiki
,
A.
,
Winding
,
M.
,
Schneider-Mizell
,
C. M.
,
Shao
,
M.
,
Arruda
,
R.
,
Eichler
,
K.
,
Valdes-Aleman
,
J.
,
Ohyama
,
T.
,
Thum
,
A. S.
et al. 
(
2020
).
Recurrent architecture for adaptive regulation of learning in the insect brain
.
Nat. Neurosci.
23
,
544
-
555
.
Eschbach
,
C.
,
Fushiki
,
A.
,
Winding
,
M.
,
Afonso
,
B.
,
Andrade
,
I. V.
,
Cocanougher
,
B. T.
,
Eichler
,
K.
,
Gepner
,
R.
,
Si
,
G.
,
Valdes-Aleman
,
J.
et al. 
(
2021
).
Circuits for integrating learned and innate valences in the insect brain
.
Elife
10
,
e62567
.
Felsenberg
,
J.
,
Plath
,
J. A.
,
Lorang
,
S.
,
Morgenstern
,
L.
and
Eisenhardt
,
D.
(
2013
).
Short- and long-term memories formed upon backward conditioning in honeybees (Apis mellifera)
.
Learn. Mem.
21
,
776
-
784
.
Gerber
,
B.
,
Yarali
,
A.
,
Diegelmann
,
S.
,
Wotjak
,
C. T.
,
Pauli
,
P.
and
Fendt
,
M.
(
2014
).
Pain-relief learning in flies, rats, and man: basic research and applied perspectives
.
Learn. Mem.
21
,
232
-
252
.
Gerber
,
B.
,
König
,
C.
,
Fendt
,
M.
,
Andreatta
,
M.
,
Romanos
,
M.
,
Pauli
,
P.
and
Yarali
,
A.
(
2019
).
Timing-dependent valence reversal: a principle of reinforcement processing and its possible implications
.
Curr. Opin. Behav. Sci.
26
,
114
-
120
.
Handler
,
A.
,
Graham
,
T. G. W.
,
Cohn
,
R.
,
Morantte
,
I.
,
Siliciano
,
A. F.
,
Zeng
,
J.
,
Li
,
Y.
and
Ruta
,
V.
(
2019
).
Distinct dopamine receptor pathways underlie the temporal sensitivity of associative learning
.
Cell
178
,
60
-
75.e19
.
Hellstern
,
F.
,
Malaka
,
R.
and
Hammer
,
M.
(
1998
).
Backward inhibitory learning in honeybees: a behavioral analysis of reinforcement processing
.
Learn. Mem.
4
,
429
-
444
.
Holm
,
S.
(
1979
).
A simple sequentially rejective multiple test procedure
.
Scand. J. Stat. Scand J Stat.
6
,
65
-
70
.
Jacob
,
P. F.
and
Waddell
,
S.
(
2020
).
Spaced training forms complementary long-term memories of opposite valence in Drosophila
.
Neuron
106
,
977
-
991.e4
.
König
,
C.
,
Khalili
,
A.
,
Ganesan
,
M.
,
Nishu
,
A. P.
,
Garza
,
A. P.
,
Niewalda
,
T.
,
Gerber
,
B.
,
Aso
,
Y.
and
Yarali
,
A.
(
2018
).
Reinforcement signaling of punishment versus relief in fruit flies
.
Learn. Mem.
25
,
247
-
257
.
Larsen
,
C.
,
Shy
,
D.
,
Spindler
,
S. R.
,
Fung
,
S.
,
Pereanu
,
W.
,
Younossi-Hartenstein
,
A.
and
Hartenstein
,
V.
(
2009
).
Patterns of growth, axonal extension and axonal arborization of neuronal lineages in the developing Drosophila brain
.
Dev. Biol.
335
,
289
-
304
.
Li
,
H. H.
,
Kroll
,
J. R.
,
Lennox
,
S. M.
,
Ogundeyi
,
O.
,
Jeter
,
J.
,
Depasquale
,
G.
and
Truman
,
J. W.
(
2014
).
A GAL4 driver resource for developmental and behavioral studies on the larval CNS of Drosophila
.
Cell Rep.
8
,
897
-
908
.
Li
,
F.
,
Lindsey
,
J.
,
Marin
,
E. C.
,
Otto
,
N.
,
Dreher
,
M.
,
Dempsey
,
G.
,
Stark
,
I.
,
Bates
,
A. S.
,
Pleijzier
,
M. W.
,
Schlegel
,
P.
et al. 
(
2020
).
The connectome of the adult drosophila mushroom body provides insights into function
.
eLife
9
,
e62576
.
Navratilova
,
E.
,
Atcherley
,
C. W.
and
Porreca
,
F.
(
2015
).
Brain circuits encoding reward from pain relief
.
Trends Neurosci.
38
,
741
-
750
.
Niens
,
J.
,
Reh
,
F.
,
Çoban
,
B.
,
Cichewicz
,
K.
,
Eckardt
,
J.
,
Liu
,
Y. T.
,
Hirsh
,
J.
and
Riemensperger
,
T. D.
(
2017
).
Dopamine modulates serotonin innervation in the Drosophila brain
.
Front. Syst. Neurosci.
11
,
1
-
13
.
Paisios
,
E.
,
Rjosk
,
A.
,
Pamir
,
E.
and
Schleyer
,
M.
(
2017
).
Common microbehavioral “footprint” of two distinct classes of conditioned aversion
.
Learn. Mem.
24
,
191
-
198
.
Pfeiffer
,
B. D.
,
Ngo
,
T.-T. B.
,
Hibbard
,
K. L.
,
Murphy
,
C.
,
Jenett
,
A.
,
Truman
,
J. W.
and
Rubin
,
G. M.
(
2010
).
Refinement of tools for targeted gene expression in Drosophila
.
Genetics
186
,
735
-
755
.
Rohwedder
,
A.
,
Wenz
,
N. L.
,
Stehle
,
B.
,
Huser
,
A.
,
Yamagata
,
N.
,
Zlatic
,
M.
,
Truman
,
J. W.
,
Tanimoto
,
H.
,
Saumweber
,
T.
,
Gerber
,
B.
et al. 
(
2016
).
Four individually identified paired dopamine neurons signal reward in larval Drosophila
.
Curr. Biol.
26
,
661
-
669
.
Saumweber
,
T.
,
Husse
,
J.
and
Gerber
,
B.
(
2011
).
Innate attractiveness and associative learnability of odors can be dissociated in larval Drosophila
.
Chem. Senses
36
,
223
-
235
.
Saumweber
,
T.
,
Rohwedder
,
A.
,
Schleyer
,
M.
,
Eichler
,
K.
,
Chen
,
Y. C.
,
Aso
,
Y.
,
Cardona
,
A.
,
Eschbach
,
C.
,
Kobler
,
O.
,
Voigt
,
A.
et al. 
(
2018
).
Functional architecture of reward learning in mushroom body extrinsic neurons of larval Drosophila
.
Nat. Commun.
9
,
1
-
19
.
Schleyer
,
M.
,
Reid
,
S. F.
,
Pamir
,
E.
,
Saumweber
,
T.
,
Paisios
,
E.
,
Davies
,
A.
,
Gerber
,
B.
and
Louis
,
M.
(
2015
).
The impact of odor-reward memory on chemotaxis in larval Drosophila
.
Learn. Mem.
22
,
267
-
277
.
Schleyer
,
M.
,
Fendt
,
M.
,
Schuller
,
S.
and
Gerber
,
B.
(
2018
).
Associative learning of stimuli paired and unpaired with reinforcement: evaluating evidence from maggots, flies, bees, and rats
.
Front. Psychol.
9
,
1494
.
Schleyer
,
M.
,
Weiglein
,
A.
,
Thoener
,
J.
,
Strauch
,
M.
,
Hartenstein
,
V.
,
Weigelt
,
M. K.
,
Schuller
,
S.
,
Saumweber
,
T.
,
Eichler
,
K.
,
Rohwedder
,
A.
et al. 
(
2020
).
Identification of dopaminergic neurons that can both establish associative memory and acutely terminate its behavioral expression
.
J. Neurosci.
40
,
5990
-
6006
.
Schultz
,
W.
(
2015
).
Neuronal reward and decision signals: from theories to data
.
Physiol. Rev.
95
,
853
-
951
.
Selcho
,
M.
,
Pauls
,
D.
,
Han
,
K. A.
,
Stocker
,
R. F.
and
Thum
,
A. S.
(
2009
).
The role of dopamine in Drosophila larval classical olfactory conditioning
.
PLoS One
4
,
e5897
.
Solomon
,
R. L.
and
Corbit
,
J. D.
(
1974
).
An opponent-process theory of motivation: I. Temporal dynamics of affect
.
Psychol. Rev.
81
,
119
-
145
.
Springer
,
M.
and
Nawrot
,
M. P.
(
2021
).
A mechanistic model for reward prediction and extinction learning in the fruit fly
.
eNeuro
8
,
ENEURO.0549-20.2021
.
Takemura
,
S. Y.
,
Aso
,
Y.
,
Hige
,
T.
,
Wong
,
A.
,
Lu
,
Z.
,
Xu
,
C. S.
,
Rivlin
,
P. K.
,
Hess
,
H.
,
Zhao
,
T.
,
Parag
,
T.
et al. 
(
2017
).
A connectome of a learning and memory center in the adult Drosophila brain
.
Elife
6
,
e26975
.
Thane
,
M.
,
Viswanathan
,
V.
,
Meyer
,
T. C.
,
Paisios
,
E.
and
Schleyer
,
M.
(
2019
).
Modulations of microbehaviour by associative memory strength in Drosophila larvae
.
PLoS One
14
,
e0224154
.
Thoener
,
J.
,
König
,
C.
,
Weiglein
,
A.
,
Toshima
,
N.
,
Mancini
,
N.
,
Amin
,
F.
and
Schleyer
,
M.
(
2021
).
Associative learning in larval and adult Drosophila is impaired by the dopamine-synthesis inhibitor 3-Iodo-L-tyrosine
.
Biol. Open
10
,
bio058198
.
Thum
,
A. S.
and
Gerber
,
B.
(
2019
).
Connectomics and function of a memory network: the mushroom body of larval Drosophila
.
Curr. Opin. Neurobiol.
54
,
146
-
154
.
Toshima
,
N.
,
Weigelt
,
M. K.
,
Weiglein
,
A.
,
Boetzl
,
F. A.
and
Gerber
,
B.
(
2019
).
An amino-acid mixture can be both rewarding and punishing to larval Drosophila melanogaster
.
J. Exp. Biol.
222
,
jeb209486
.
von Essen
,
A. M. H. J.
,
Pauls
,
D.
,
Thum
,
A. S.
and
Sprecher
,
S. G.
(
2011
).
Capacity of visual classical conditioning in Drosophila larvae
.
Behav. Neurosci.
125
,
921
-
929
.
Waddell
,
S.
(
2013
).
Reinforcement signalling in Drosophila; dopamine does it all after all
.
Curr. Opin. Neurobiol.
23
,
324
-
329
.
Weiglein
,
A.
,
Gerstner
,
F.
,
Mancini
,
N.
,
Schleyer
,
M.
and
Gerber
,
B.
(
2019
).
One-trial learning in larval Drosophila
.
Learn. Mem.
26
,
109
-
120
.
Weiglein
,
A.
,
Thoener
,
J.
,
Feldbruegge
,
I.
,
Warzog
,
L.
,
Mancini
,
N.
,
Schleyer
,
M.
and
Gerber
,
B.
(
2021
).
Aversive teaching signals from individual dopamine neurons in larval Drosophila show qualitative differences in their temporal “fingerprint”
.
J. Comp. Neurol.
529
,
1553
-
1570
.
Yarali
,
A.
,
Niewalda
,
T.
,
Chen
,
Y. C.
,
Tanimoto
,
H.
,
Duerrnagel
,
S.
and
Gerber
,
B.
(
2008
).
“Pain relief” learning in fruit flies
.
Anim. Behav.
76
,
1173
-
1185
.

Competing interests

The authors declare no competing or financial interests.

Supplementary information