ABSTRACT
Detection of the temporal structure of stimuli is crucial for prediction. While perception of interval timing is relevant for immediate behavioral adaptations, it has scarcely been investigated, especially in invertebrates. Here, we examined whether the fruit fly, Drosophila melanogaster, can acquire rhythmic behavior in the range of seconds. To this end, we developed a novel temporal conditioning paradigm utilizing repeated electric shocks. Combined automatic behavioral annotation and time–frequency analysis revealed that behavioral rhythms continued after cessation of the shocks. Furthermore, we found that aging impaired interval timing. This study thus not only demonstrates the ability of insects to acquire behavioral rhythms of a few seconds, but highlights a life-course decline of temporal coordination, which is also common in mammals.
INTRODUCTION
Information of time in the environment is crucial to optimize physiology and behavior of organisms from amoebae to humans (Buhusi and Meck, 2005; Saigusa et al., 2008). Insects, for example, change their behavior according to a wide range of time scales, from sub-second to a day, such as in the generation of courtship songs and in circadian rhythm (Chouhan et al., 2015; Dubowy and Sehgal, 2017; Konopka and Benzer, 1971; Kyriacou and Hall, 1982; Shirangi et al., 2013; von Philipsborn et al., 2011). Perception of interval timing in the seconds range has scarcely been investigated, especially in invertebrates, despite its relevance to immediate behavioral adaptations (Buhusi and Meck, 2005; Gallistel and Gibbon, 2000).
Temporal conditioning is a direct experimental procedure which can behaviorally demonstrate the perception of interval timing (Lockhart, 1966; Pavlov, 1927). It was first developed more than a century ago and has been applied to multiple different species (Lockhart, 1966; Pavlov, 1927; Saigusa et al., 2008; Sumbre et al., 2008; Toda et al., 2017). In temporal conditioning, animals receive repeated stimuli that induce behavioral responses (unconditioned stimulus, US) at a regular interval. After a given number of US presentations, the subject is tested to see whether it retains its behavior responses at the trained interval (Pavlov, 1927). Dogs and amoeba acquire a rhythmic conditioned response (CR) at minutes-range intervals (Pavlov, 1927; Saigusa et al., 2008). Fish and mammals can remember seconds-range intervals after dozens to hundreds or even thousands of training stimulations (Lockhart, 1966; Sumbre et al., 2008; Toda et al., 2017). While it is known that insects use temporal information for associative learning (Boisvert and Sherry, 2006; Galili et al., 2011; Ito et al., 2008; Shuai et al., 2011; Szyszka et al., 2011; Tanimoto et al., 2004; Vogt et al., 2015; Yarali and Gerber, 2010), it is still unclear whether they can measure precise time intervals.
Electric shock is a powerful US, given the accurate temporal control and strong punitive effects on behavior. As a result, it has been employed for associative learning of Drosophila for decades (Aso et al., 2014; Chadha and Cook, 2014; Quinn et al., 1974; Vogt et al., 2016). Electric shocks induce a wide range of behavioral responses in flies (Chadha and Cook, 2014), although avoidance of the shock has been most widely measured (Appel et al., 2015; Hu et al., 2018). The difficulty of measuring shock responses, especially in freely moving flies, lies in their fast and diverse locomotor changes (i.e. jumping, flying, etc.).
By establishing a novel experimental system for temporal conditioning using repeated electric shocks, we report here that Drosophila melanogaster can remember seconds-range time intervals. By devising an image-based behavioral classification method, we efficiently detected shock responses. To quantify rhythmic behaviors, we applied time–frequency analysis, revealing that CRs continued after cessation of the shocks. We also examined variables critical for the acquisition of rhythmic behavior, such as inter-stimulus interval (ISI) and aging.
MATERIALS AND METHODS
Flies
Male wild-type Drosophila melanogaster strain Canton S were used for the entire study. Flies were reared in a mass culture at 24°C under a 12 h:12 h light:dark cycle on a standard cornmeal-based food. The male flies were transferred to the conditioning arenas right before the experiment. All flies were handled without anesthesia throughout the study. We used 2–7 day old flies unless otherwise specified.
Conditioning apparatus
To enable simultaneous video recording and the presentation of electric shocks, a transparent shock grid was used, similar to Vogt et al. (2014) (Fig. 1A). Briefly, laser-structured indium tin oxide on a glass plate delivered a foot shock (9×9 cm; Diamond Coatings Ltd). Delivery of the shocks was controlled by a custom-written program via a PCI-interface and a custom device.
A single fly was introduced into a spatially confined arena using a plastic ring (diameter 26 mm, height 8 mm) and a glass lid (30 mm×30 mm) placed on the shock grid. The inner surface of the plastic ring and the glass lid were coated with Fluon and Sigmacote, respectively, to prevent climbing (Insect-a-Slip PTFE30, BioQuip Products, Sigma-Aldrich). Typically, 8 arenas were used simultaneously for one measurement.
The behavior of the individual fly in the arena was video recorded from above via a camera with a frame rate of 60 frames s−1 (Nikon 1 J5, Nikon). Flies were illuminated from beneath the shock grid using an LED light box (400-TBL003, SANWA supply).
Behavioral classification
Behavior was classified as jumping, walking, small movements, righting and resting, based on linear velocity, which was measured using open-source tracking software, TPro (Fig. 1A,B; Okuno et al., 2019; Sirigrivatanawong et al., 2017). Consecutive frames from each local minimum to the next local minimum of linear velocity were defined as a single unit and each unit was classified into a behavior based on the local maximum. Except for jumping, we set the minimal duration of behavior to 83 ms (5 frames). Jumping and walking were defined as showing a local maximum of the linear velocity at more than 63 mm s−1 and between 8 and 63 mm s−1, respectively. Climbing attempts with a local maximum of the linear velocity above 11 mm s−1 were excluded from the walk behavior based on the circularity of the elipse fitted to the fly. To distinguish walking from righting responses, which are often induced by electric shocks, those bouts above 21 mm s−1 in a local maximum of the sideways velocity were excluded from walking. We checked the accuracy of these filters with manual annotation and the accuracy was 92% and 99% for jumping and walking, respectively. Movement with a local maximum of the linear velocity below 10 mm s−1 was classified into small movements or rest, by applying the 1.5 mm s−1 threshold. The whole behavioral analysis was performed with R version 3. 5. 2 (http://www.R-project.org/).
Temporal conditioning
A single male fly was directly transferred from a food vial into each arena by using an aspirator, 15 min prior to conditioning. Ten pulses (each 0.1 s) of 50 V (50 Hz AC) electric shocks were presented at regular or variable intervals (Fig. 2). We chose 9 different intervals and shuffled those intervals randomly in order to make variable ISI protocols. The 9 intervals were evenly distributed between 0.4 s and twice ISI (e.g. from 0.4 to 4 s for an ISI of 2 s). We used 19–30 different variable ISI protocols for each condition. The test phase of experimental and control groups started at the same time (Fig. 2). We excluded flies that did not receive an electric shock even once, as a result of sticking on the wall or ceiling, from subsequent analysis.
Time–frequency analysis
We compared the power of the experimental and control groups at the trained frequency in the time window of 0.5 s, centered on the time of the first expected shock after training. Generally, lower frequency components have lower temporal precision. Therefore, periodicity in training can be detected in adjacent time points, thus potentially confounding the CR. We controlled this ‘leakage’ by confirming no significant power differences before training (see also Results).
Permutation test
We performed a permutation test to assess the statistical significance of the trained periodicity of the flies' behavior (Fig. 2). For the test, experimental and control animals were pooled and then randomly classified into simulated datasets of the same size as in the original data. The power of the trained periodicity was calculated for each of 1000 randomly permutated datasets, and the normal distribution was fitted to describe the histogram of the differences between the permutated ‘experimental’ and ‘control’ groups. The P-value was defined as twice the area fraction from the tail at the observed difference in the fitted distribution. The bootstrap estimate of the standard error was calculated as the standard deviation of the bootstrap distribution. The bootstrap distribution of trained periodicity was created by random resampling (1000 times) of data points with replacement from the raw data pool. Other datasets (Fig. 6C,F) were analyzed by the Kruskal–Wallis test followed by the Mann–Whitney test with Bonferroni correction. The significance level of all statistical tests was set to 0.05 (two-sided test). All statistical analyses were performed with R version 3.5.2 (http://www.R-project.org/).
RESULTS
Diverse behavioral responses to electric shocks
The temporal precision of US presentations is a critical factor in temporal conditioning with short ISIs. Flies show an array of electric shock responses, some of which are too fast for manual scoring. To systematically characterize the shock responses, we developed a system for high-speed image acquisition and behavioral classification (Fig. 1A). We video recorded an individual fly in a circular arena on transparent shock grids at 60 frames s−1 (Fig. 1A). Intense LED backlight allowed high-contrast capturing of the fly shape at the shutter speed of 0.5 ms (Vogt et al., 2016). The positions and angles of flies in each frame were determined using TPro open-source tracking software (Okuno et al., 2019; Sirigrivatanawong et al., 2017). We categorized the behavioral state of the fly into four classes: jumping, walking, small movements and resting (Fig. 1A,B).
In response to a single 50 V shock lasting 100 ms, flies sharply increased movements, such as jumping and walking, with short latency: 70 and 220 ms of the peak time of jumping and walking, respectively (Fig. 1B). These immediate locomotor responses ceased within 1 s (Fig. 1B). In contrast, a single electric shock induced a longer-lasting decrement in resting, perhaps shifting behavioral states (Fig. 1B). Therefore, ISI in temporal conditioning should be longer than 1 s in order to detect rhythmic jumps and walks.
Time–frequency analysis reveals the acquisition of rhythmic behavior in temporal conditioning
To examine whether flies can perceive time intervals in the range of seconds, we sought to establish temporal conditioning by presenting the experimental group with repeated electric shocks at regular intervals (Fig. 2). Subsequently, we measured whether the subject retained behavioral responses at the trained interval (Lockhart, 1966; Pavlov, 1927). We presented the same number of electric shocks over the same total duration to the control group but with variable ISIs (Fig. 2). The CR was defined by the post-training difference in periodic behavior of the experimental and control groups (Fig. 2).
To quantify whether flies acquired behavioral periodicity, we applied time–frequency decomposition using a complex Morlet wavelet to the time course of behavioral rate (Fig. 2). Wavelet analysis detects the periodicity characteristics of data over time (Berman et al., 2014). The time course of the data series for each behavioral component was converted into a spectrogram by wavelet transformation. To measure the CR, we analyzed the power of the trained frequency at the time of the first expected shock after training (Fig. 2). Finally, we quantitatively compared the power of the experimental and control groups using a permutation test (for further details, see Materials and Methods).
We subjected flies to a repetition of 10 electric shocks at a 2 s ISI. First, we applied wavelet analysis to velocity data of each fly, and averaged spectrograms for the experimental and control groups. The trained frequency component of the experimental group was clearly increased during the training phase, although a significant post-training power difference was not detected (Fig. S1). This result motivated us to analyze the time course of each behavioral component, because various responses were represented in the velocity data and these behavioral responses contributed differently to the power.
The time course of jumps in the experimental group showed clear regularity in response to each shock (Fig. 3A). However, the histogram data do not distinguish individuals with variable behavioral responses. Analysis of selected flies that consistently jumped during conditioning revealed clear post-training anticipated jumps peaked at the expected timing of shock (Fig. S2). In the time–frequency representation of jump data of the entire population, the regularity of jumps was notable during the training phase, and lasted even after termination of the shock (Fig. 3B). This post-training periodicity in jumping was much reduced in the variable ISI control group (P<0.05; Fig. 3B,C). While wavelet transformation is suited to localizing dynamic frequency structures in time, power at a given time point is also influenced by neighboring time points (Cohen, 2014). To control the carry-over of large power during training, we artificially created a ‘pseudo-control’ with the hybrid time series of the experimental (until the last shock) and control (post-training) jump rates. Wavelet transformation of the pseudo-control showed decreased post-training periodicity compared with the experimental group (Fig. S3). Furthermore, we analyzed pre-training periodicity at equal timing, where frequency information during training has a similar influence, and found no significant difference between the experimental and control groups (Fig. 3D). We thus conclude that the post-training power at the expected shock represents sustained rhythmic jumping.
For the other types of behavior, post-training power differences were not statistically significant, despite a strong tendency for small movements (Fig. 3C). These results indicate that flies acquired 2 s rhythmic behavior following the presentation of repeated electric shocks.
Critical factors influencing acquired rhythmic behavior
Effective numbers of stimulus presentations in temporal conditioning are different among species (Saigusa et al., 2008; Sumbre et al., 2008; Toda et al., 2017). Mice, for example, need to be trained with hundreds of repeats to acquire a robust CR (Toda et al., 2017). To examine whether higher numbers of stimulus presentations improve the CR in the fly, we conditioned flies with 4, 10, 20 and 40 regular shocks (Fig. 4A). We found that post-training periodicity in jumping peaked at conditioning with 10 shocks, and extended training did not improve performance (Fig. 4B,C). This may be due to fatigue upon repeated shock responses. We indeed observed a delay in shock-induced jumps after many trials (data not shown). Other than jumping, we did not detect statistically significant post-training power differences in any stimulus repetitions (data not shown). Thus, flies acquire rhythmic jumps optimally with around 10 shocks.
To characterize the time range over which flies can acquire behavioral rhythms, we trained them with four different ISIs: 1.4, 2, 3 and 5 s. For all tested ISIs, periodic jumping in the experimental groups tended to be higher than that of the corresponding control groups, while a statistically significant difference was only detected for the group with the 2 s ISI (Fig. 5A,B). We examined other types of CRs, and identified an increase of periodicity in small movements (Fig. 5C,D). The periodic small movements were significant for the 1.4 s ISI group, but not for ISIs of 2 s or longer (Fig. 5D). It is intriguing that the optimal CR changes depending on the ISI. These results suggest that flies can acquire behavioral rhythms up to an ISI of 2 s.
Past studies in mammals have suggested an association between age and the accuracy of interval timing (Rannie and Russell, 2017; Wild-Wall et al., 2008). To address this in the fly, we examined standard temporal conditioning of flies in four different age groups ranging from 1 to 4 weeks old. We found that shock-induced jump bouts declined with age (Fig. 6C). Post-conditioning periodic jumping in 1 and 2 week old flies persisted strongly (Fig. 6A,B), but was dramatically decreased in 3 and 4 week old flies (Fig. 6A,B). Interestingly, the period of jumping right after conditioning became shorter than the trained frequency in the older flies (Fig. 6A). An age-dependent decline in jumping and a post-training shift of periodicity can thus explain the decreased power of periodic jumps in the older flies.
As jumping may be a demanding locomotor behavior for aged flies, we examined the periodicity of walking in the same age groups during and after temporal conditioning. Shock-induced walking bouts indeed did not decrease with age (Fig. 6F). Interestingly, there was robust post-training periodic walking in the older groups, whereas younger flies performed much less (Fig. 6D,E). Periodic walking at the trained frequency between the experimental and control groups was significantly different in the 3 week old flies (P<0.05, Fig. 6E). Although the 3 week old flies did not show significant conditioned jumping (Fig. 6A,B), they still can acquire interval timing, but they perhaps shift the behavioral expression to the less demanding walking behavior.
DISCUSSION
New temporal conditioning paradigm in fruit flies
To study seconds-range interval timing in D. melanogaster, we developed a new temporal conditioning task and established an analysis pipeline to characterize acquired rhythmic behavior. After presenting repeated electric shocks at regular intervals to the flies, we showed that they can acquire rhythms of various behaviors up to an ISI of at least 2 s.
While studies on time perception of animals with fixed interval tasks have a history of more than 100 years (Pavlov, 1927), our new behavioral paradigm has several advantages over existing ones. First, our control group with the US presentations at variable ISIs is critical to precisely interpret conditioning-dependent rhythms (Fig. 2). The US is known to induce late-onset behavioral changes in addition to immediate responses (Lockhart, 1966). In our case, the resting behavior was decreased more than 5 s following the electric shock application (Fig. 1B). Baseline jumping also increased during repetitive shock delivery via conditioning (Fig. 3A). These timing-irrelevant behavioral changes can confound the CR, especially if these changes emerge at the same time as the trained interval.
Thus far, the most widely used evaluation method of interval timing is the peak procedure (Roberts, 1981). This is useful when the time course of behavioral counts has a bell shape (Roberts, 1981). In contrast, the time–frequency analysis we applied here can detect periodicity in time–series data of complex dynamics as well as simpler peaks (Fig. 3; Fig. S2). This versatility is powerful as the time courses of shock responses are distinct among different behavioral measures (Fig. 1B).
Understanding the control of time perception and locomotion
Time perception is a delicate cognitive faculty influenced by many internal and external variables (Buhusi and Meck, 2005; Matthews and Meck, 2014). Flies acquired interval timing with much less repetition than mice (Fig. 4; Toda et al., 2017); however, many studies with mice used an appetitive stimulus as the US (Balci et al., 2008; Narayanan et al., 2012; Toda et al., 2017). Acquisition speed of temporal conditioning might thus depend on the valence of the US (Saigusa et al., 2008; Sumbre et al., 2008).
Aging is a widely known factor that can affect time perception (Turgeon et al., 2016). Our evaluation of the CR with multiple behavioral metrics indeed identified age-dependent changes in shock responses and CRs (Fig. 6). Post-training rhythms of jumping in older flies became shorter than the trained interval, as shown by the upward frequency shift of the power spectrogram (Fig. 6A). Similarly, aged human subjects were reported to reproduce shorter intervals than the trained interval when they were asked to reproduce intervals in the supra-second range, such as 1.5 s (Bangert and Balota, 2012; McAuley et al., 2006). Interestingly, 3 week old flies are indeed capable of perceiving interval timing as expressed by periodic walking (Fig. 6D,E). This behavior-selective impairment implies that jumping and walking may be controlled by different interval timing systems. Alternatively, aging can simply alter sensory thresholds of shocks, such that the same intensity of shocks does not induce jumping in older flies (Simon et al., 2006).
As in Parkinson's disease, the dopaminergic system is known to deteriorate with aging in different species including Drosophila, although the pathology of dopamine neurons is species dependent (Naoi and Maruyama, 1999; Navarro et al., 2014; Riemensperger et al., 2013; Rodriguez et al., 2015). Intriguingly, dopamine circuits in mammalian brains are proposed to play a central role in seconds-range time perception (Buhusi and Meck, 2005; Narayanan et al., 2012; Soares et al., 2016; Turgeon et al., 2016). Dopamine neurons in the fly are known to convey electric shock reinforcement (Aso et al., 2012; Claridge-Chang et al., 2009; Schwaerzel et al., 2003) and are amenable to aging (Riemensperger et al., 2013). It would therefore be exciting to examine the commonality in circuit usage between time perception and other associative learning tasks (Vogt et al., 2014).
Beyond aging, future studies can examine critical factors for interval timing, such as feeding state, temperature and genetic mutations, as they drastically affect locomotion (Aggarwal et al., 2019; Lee and Park, 2004; Ostrowski et al., 2018). Combined with precise genetic manipulation, temporal conditioning in Drosophila will provide a useful experimental platform to tackle the neuronal mechanism of seconds-range time perception.
Acknowledgements
We thank Toshiharu Ichinose, Pavel Masek and Vladimiros Thoma for discussions and suggestions; Takuto Okuno and Pudith Sirigrivatanawong for constructing the behavioral analysis method; Yasumasa Matsuda and Ajayrama Kumaraswarmy for the implementation of time–frequency analysis; and Katrina Lynn for reviewing the manuscript.
Footnotes
Author contributions
Conceptualization: M.I., H.T.; Methodology: M.I., H.T.; Software: M.I.; Validation: M.I., H.T.; Formal analysis: M.I.; Investigation: M.I.; Resources: H.T.; Data curation: M.I.; Writing - original draft: M.I., H.T.; Writing - review & editing: M.I., H.T.; Visualization: M.I.; Supervision: H.T.; Project administration: H.T.; Funding acquisition: H.T.
Funding
This study was supported by the Ministry of Education, Culture, Sports, Science and Technology – Japan/JSPS KAKENHI (16H01496, 19K22577 to H.T.).
Data availability
Raw tracking data and R scripts used in this study are available from the GIN repository: https://gin.g-node.org/Tanimoto_lab/Tracking_data_and_Analysis_codes_in_Ikarashi_2021
References
Competing interests
The authors declare no competing or financial interests.