Two forms of associative learning-delay conditioning and trace conditioning-have been widely investigated in humans and higher-order mammals1. In delay conditioning, an unconditioned stimulus (for example, an electric shock) is introduced in the final moments of a conditioned stimulus (for example, a tone), with both ending at the same time. In trace conditioning, a 'trace' interval separates the conditioned stimulus and the unconditioned stimulus. Trace conditioning therefore relies on maintaining a neural representation of the conditioned stimulus after its termination (hence making distraction possible2), to learn the conditioned stimulus-unconditioned stimulus contingency3; this makes it more cognitively demanding than delay conditioning4. Here, by combining virtual-reality behaviour with neurogenetic manipulations and in vivo two-photon brain imaging, we show that visual trace conditioning and delay conditioning in Drosophila mobilize R2 and R4m ring neurons in the ellipsoid body. In trace conditioning, calcium transients during the trace interval show increased oscillations and slower declines over repeated training, and both of these effects are sensitive to distractions. Dopaminergic activity accompanies signal persistence in ring neurons, and this is decreased by distractions solely during trace conditioning. Finally, dopamine D1-like and D2-like receptor signalling in ring neurons have different roles in delay and trace conditioning; dopamine D1-like receptor 1 mediates both forms of conditioning, whereas the dopamine D2-like receptor is involved exclusively in sustaining ring neuron activity during the trace interval of trace conditioning. These observations are similar to those previously reported in mammals during arousal5, prefrontal activation6 and high-level cognitive learning7,8.
© 2022. The Author(s), under exclusive licence to Springer Nature Limited.