Whole-body expression patterns of DAN-driver strains. All driver strains were crossed to a MB247-mCherry-CAAX, UAS-mIFP double effector that will show a mCherry signal (magenta) in the mushroom body and a 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 supplementary material S1. (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 previously15,25. No additional cells were found in the body. (E) TH-Gal4 drives additionally to the expression in the CNS (arrowheads indicate the 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 described27,47. Scale bars represent 250 µm for the whole body and 50 µm for the inserts.

Individual DANs are sufficient to establish and retrieve aversive memory. (A) After training wild-type larvae with quinine as US, associative memory is observed only in 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 presence of blue light, negative memory scores only in the experimental genotype indicated aversive associative memory. For independent repetitions, see Figure supplement 2A-D. (C) As in (B), but with DAN-f1 activation. For an independent repetition, see 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 supplement 2F-G. (F) As in (D), but with the broad TH-Gal4 pattern. * and ns above brackets indicate pairwise significance or non-significance, respectively (MW), * below boxes indicate memory scores significantly different from zero (WSR). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Innate odour preferences. (A) Groups of about 20 larvae were tested for three minutes for their odour preference, either in darkness or blue light. (B) Innate odour preferences of the genotypes used in Fig. 2B, tested in darkness or blue light. No differences were found. (C) Innate odour preferences of the genotypes used in Fig. 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 Fig. 2C. (D) Innate odour preferences of the genotypes used in Fig. 2D. No differences were found. (E) Innate odour preferences of the genotypes used in Fig. 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 Fig. 2E. (F) Innate odour preferences of the genotypes used in Fig. 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 Fig. 2F. ns above a line indicates non-significance across the whole data set (KW), * and ns above brackets indicate pairwise significance or non-significance, respectively (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Replications of the experiments shown in Fig. 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, show associative memory only when tested in presence but not absence of the blue light. (C) Larvae of the experimental genotype show associative memory only when trained with the standard weak light and tested in 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 show associative memory only when raised in standard food and tested in 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-XXL42, no memories were observed. (E) Larvae expressing ChR2-XXL in DAN-f1 show associative memory only when tested in presence but not absence of the blue light. (F) Only the larvae of the experimental genotype, expressing ChR2-XXL in DAN-f1 and DAN-g1, show associative memory independent of the presence or absence of the US. The genetic controls display no significant associative memory. (G) Larvae of the experimental genotype show associative memory only when tested in presence but not absence of the blue light. * and ns above brackets indicate pairwise significance or non-significance, respectively (MW), * below boxes indicate memory scores significantly different from zero (WSR). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

DAN activation with CsChrimson establishes memories that are retrieved independent of DAN activation during the test. (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 Fig. 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 (MW), * below boxes indicate memory scores significantly different from zero (WSR). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Individual DANs are sufficient to establish safety memory. (A) With quinine as US, odour preferences after paired training were more negative in presence than in 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 presence than in absence of light. Right: after unpaired training, animals of the experimental genotype showed higher odour preferences than the controls, independent 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 control after paired training (left, indicating punishment memory) and more positive preferences after unpaired training (right, indicating safety memory), independent 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 (KW), * and ns above brackets indicate pairwise significance or non-significance, respectively (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Two sets of 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 data from 5 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 (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Random forest analysis of 5 independent repetitions of the same locomotion experiment. (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 hours before the experiment (see Materials & Methods for details). (B-D) Each column shows the relative importance based on the random forest algorithm of a given experimental replication. (B), (C), (D) show the attributes of cluster 1, 2 and 3, respectively.

Light responses of genetic controls. (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 experiment using strong blue light (specifically, the experiments shown in Fig. 4, 8). 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 independent 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 (using the experiments shown in Fig. 5 – Figure supplement 1, Fig. 8 – 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 (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Replication of the experiment shown in Fig. 4D-G with three stimulation cycles. (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 stimulation 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 (MW). # above brackets indicate pairwise within-animal significance (WSR). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

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

DAN activations modulate locomotion independent 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, Fig. 4D) and weak blue light (light blue, Figure supplement 1A) with ChR2-XXL as effector, and red light (red, Figure supplement 3A) with CsChrimson. (B) As in (A), but for the experiments shown in Figures 4H, Figure supplement 1E and 3E. (C) For each of the 6 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.

DAN activations modulate locomotion independently of light intensity. Replication of the experiments and analyses of the experiments displayed in Fig. 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 (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

DAN activation during innate odour preference experiments causes increased bending and decreased velocity. (A) Larvae were video-recorded and their behaviour analysed during the experiment displayed in Fig. 2 – Figure supplement 1F. The larvae of the experimental genotype (TH-Gal4>ChR2-XXL) had a higher average bending in blue light than in darkness. (B) The larvae showed a lower tail velocity in light than in darkness during the first half of the experiment. Both differences were much weaker than in the experiments presented in Figure supplement 1 and diminished with time. (C) Quantification of (A) on the basis of individual animals. From left to right, the average bending during the first, second and third minute was examined. (D) as in (B), but for tail velocity. In summary, with the experimental parameters of the first half of this study, the animals’ locomotion was only altered moderately, in a way that still allowed them to reach their goal. A possible reason for the differently strong light response may be the different handling of the animals: in the learning and preference 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 light responses. * and ns above brackets indicate pairwise significance or non-significance, respectively (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

DAN activations modulate locomotion independently of effector. Replication of the experiments and analyses of the experiments displayed in Fig. 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 supplement 4), 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 was 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 (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Comparison of controls for the experiments shown in Figure supplement 3. The behaviour of larvae expressing CsChrimson either (A) under the control of TH-Gal4 or (B) R58E02-Gal4 were 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 (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Different subsets of 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 three minutes. Animals were placed into the dark half at the dish. Displayed are 2 sample tracks for animals of TH>ChR2-XXL. (B) The light preference after 3 minutes. 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 (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

The effects on locomotion upon 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. Each curve represents the behaviour of an experimental group minus the pooled controls to indicate the effect of DAN activation, “purified” from the light responses. Compared are larvae expressing ChR2-XXL in TH-Gal4-DANs with or without additional TH-RNAi. (B) Change in bending upon DAN activation. The grey line indicates the median of the pooled genetic controls. For the data of all genotypes, see Figure supplement 1. (C) As in (B), but for tail velocity. (D) The average relative importance of each attribute cluster for a comparison between animals with and without TH-RNAi. (E-H) As in (A-D), but for animals of the experimental genotype that were or were not fed the TH inhibitor 3IY. * and ns above brackets indicate pairwise significance or non-significance, respectively (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

The effects on locomotion upon DAN activation are dopamine-dependent. (A) Average bending and tail velocity over time. 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 when comparing the experimental genotype with the genetic controls. (C) The animals’ average bending during the baseline period (15 to 30 s) in darkness. Both genotypes including the UAS-TH-RNAi construct displayed increased bending, suggesting a genetic background effect. (D) As for (C), but for the tail velocity. Animals expressing ple-dsRNA (TH-RNAi) had an increased velocity compared to all other genotypes. (E) 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. (F) As in (E), but for the tail velocity. (G-M) As for (A-F), 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 with 3IY were statistically not different from the genetic controls. * and ns above brackets indicate pairwise significance or non-significance, respectively (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Two independent replications of the experiments shown in 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 to 30 s) in darkness. Feeding of 3IY had no effect. (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 (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Individual 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 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 (KW), * and ns above brackets indicate pairwise significance or non-significance, respectively (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Individual DANs are sufficient to modulate bending and tail velocity. (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 (KW), * and ns above brackets indicate pairwise significance or non-significance, respectively (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Activation of individual DANs with weak light is not sufficient to modulate locomotion. (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 light stimulation. The change was unchanged by activating DAN-d1 with weak light. (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 (KW), * and ns above brackets indicate pairwise significance or non-significance, respectively (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data S1.

Summary and working hypothesis. (A) A table summarizing the findings of this study as well as of a related recent study47 for each 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 KCs. Memories are stored in the synapses between the KCs and the respective 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 organized 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 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.

Synaptic organization of the DL1-cluster DANs. (A) Top: 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 4 MBONs. For simplicity, only synapses with the left DAN-d1 are shown. Middle: Truncated dendrogram of the left DAN-d1 based on EM and light microscopy19,53. 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 319,53. (D) The synapses are organized in clusters. Displayed are 6 sample clusters of the left DAN-f1. (E) Distances of all synapses within each cluster from the cluster centre. For all 6 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 (MW). For the underlying source data and the results of the statistical tests, see Supplementary Data 1. For high-resolution dendrograms of both the left and right DANs, see Supplementary Material S2.