Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2014 Oct 6;11(99):20140672.
doi: 10.1098/rsif.2014.0672.

Mapping the stereotyped behaviour of freely moving fruit flies

Affiliations

Mapping the stereotyped behaviour of freely moving fruit flies

Gordon J Berman et al. J R Soc Interface. .

Abstract

A frequent assumption in behavioural science is that most of an animal's activities can be described in terms of a small set of stereotyped motifs. Here, we introduce a method for mapping an animal's actions, relying only upon the underlying structure of postural movement data to organize and classify behaviours. Applying this method to the ground-based behaviour of the fruit fly, Drosophila melanogaster, we find that flies perform stereotyped actions roughly 50% of the time, discovering over 100 distinguishable, stereotyped behavioural states. These include multiple modes of locomotion and grooming. We use the resulting measurements as the basis for identifying subtle sex-specific behavioural differences and revealing the low-dimensional nature of animal motions.

Keywords: Drosophila; behaviour; phase reconstruction; stereotypy; unsupervised learning.

PubMed Disclaimer

Figures

Figure 1.
Figure 1.
Schematic of the imaging apparatus.
Figure 2.
Figure 2.
Overview of the data analysis pipeline. Raw images of the D. melanogaster are segmented from the background, rescaled to a reference size and then aligned, creating a stack of images in the co-moving and co-rotating frame of the fly. These images are then decomposed via PCA into a relatively low-dimensional set of time series. A Morlet wavelet transform is subsequently applied to these time series, creating a spectrogram for each postural mode separately. After normalization, each point in time is mapped into a two-dimensional plane via t-SNE [18]. Lastly, a watershed transform is applied to a Gaussian-smoothed density over these points, isolating individual peaks from one another.
Figure 3.
Figure 3.
Generation of spectral feature vectors. (a) Raw image of a fly in the arena. (b) Pictorial representation of the first five postural modes, formula image, after inverse Radon transform. Black and white regions represent highlighted areas of each mode (with opposite sign). (c) First 1000 eigenvalues of the data matrix (black) and shuffled data (red). (d) Fraction of cumulative variation explained as a function of the number of modes included. (e) Typical time series of the projection along postural mode 6 and (f) its corresponding wavelet transform.
Figure 4.
Figure 4.
Embedding of feature vectors. (a) Training set points embedded into two dimensions via t-SNE. Colour coding is proportional to the logarithm of the normalization factor ∑k,f S(k, f; t). (b) Probability density function (PDF) generated from embedding all data points and convolving with a Gaussian (σ = 1.5).
Figure 5.
Figure 5.
Dynamics within behavioural space. (a) Typical trajectory segment through behavioural space, z1(t) (blue) and z2(t) (red). (b) Histogram of velocities in the embedded space fitted to a two-component log-Gaussian mixture model. The blue bar chart represents the measured probability distribution, the red line is the fitted model, and the cyan and green lines are the mixture components of the fitted model.
Figure 6.
Figure 6.
Concentration of behavioural space during stereotyped movements. Comparison between the densities generated during (a) stereotyped and (b) non-stereotyped epochs.
Figure 7.
Figure 7.
Segmentation into behavioural regions. (a) Boundary lines obtained from performing a watershed transform on the PDF from figure 4b. (b) Integrated probabilities within each of the regions. (c) The organization of behavioural space into regions of similar movement types. Definition of regions is performed through visual assessment of movies.
Figure 8.
Figure 8.
Behavioural state dynamics. (a) A distribution of occupancy times in all behaviours. (b) Number of individuals (out of 59 possible) that visit each behaviour at some point during observation.
Figure 9.
Figure 9.
Behavioural space peaks correspond to specific stereotyped behaviours. Selected regions within behavioural space are shown and are labelled via the colour-coded legend on the right. Instances of dwells within each of these regions can be seen in the electronic supplementary material, movies S3–S11. The examples displayed in these movies are randomly selected and contain clips from many different flies, showing that the behavioural space provides a representation of behaviour that is consistent across individuals.
Figure 10.
Figure 10.
Periodic dynamics within behavioural states. (a) Periodic oscillations in the third and fourth postural eigenmodes during a typical high-frequency running sequence. (b) Average power spectral density (PSD) for all instances of this behaviour (the bottom-most region in (h)). Panels (c) and (d) represent phase reconstruction of the data in (a) for modes 3 and 4, respectively. Panels (e) and (f) represent probability densities of projections along the third and fourth modes, respectively, for all instances of the behaviour shown in (ad). The black line is the phase-averaged curve (via (E 1)). (g) Comparison between the phase-averaged curves for seven different locomotion gaits. Line colours are proportional to the mean gait frequency. (h) Locomotion gaits from figure 7c, colour-coded by mean frequency. The colour scale here is the same as in (g). (i) Three-dimensional plots of the phase-averaged trajectories for five different behaviours. The first three postural modes are plotted here. (j) Regions corresponding to the orbits shown in (i) (coded by colour).
Figure 11.
Figure 11.
Comparison between male and female behaviours. (a) Measured behavioural space PDF for male (left) and female (right) flies. (b) Difference between the two PDFs in (a). Here, we observe large dimorphisms between the sexes, particularly in the ‘locomotion gaits’ and ‘idle and slow movements’ regions. (c) PDFs for behaviours in the ‘wing movements’ portion of the behavioural space (the lower left of the full space). These PDFs (male on the left and female on the right) are normalized so that they each integrate to one. The black lines are the boundaries found from a watershed transform and are included to guide the eye. (d) Difference between the two normalized behavioural spaces in (c). Dashed lines enclose regions in which the median male and the median female PDF values are statistically different via the Wilcoxon rank sum test (p < 0.01). (e) Zoom-in on the boxed region in (d). Both of these regions correspond to left-wing grooming, but with behaviours within the male-preferred region incorporating an additional leg kick (electronic supplementary material, movies S12 and S13). (f) Average periodic orbits for postural eigenmodes 1, 2, 6 and 7. The area surrounding the lines represents the standard error of the mean at each point along the trajectory. Average periodic orbits for all of the first 25 postural modes are shown in the electronic supplementary material, figure S6.

Similar articles

Cited by

References

    1. Altmann J. 1974. Observational study of behavior: sampling methods. Behaviour 49, 227–267. (10.1163/156853974X00534) - DOI - PubMed
    1. Lehner PA. 1996. Handbook of ethological methods, 2nd edn Cambridge, UK: Cambridge University Press.
    1. Gould JL. 1982. Ethology: the mechanisms and evolution of behavior. New York, NY: W. W. Norton and Company.
    1. Stephens GJ, Osborne LC, Bialek W. 2011. Searching for simplicity in the analysis of neurons and behavior. Proc. Natl Acad. Sci. USA 108, 15 565–15 571. (10.1073/pnas.1010868108) - DOI - PMC - PubMed
    1. Glimcher PW, Dorris M. 2004. Neuronal studies of decision making in the visual-saccadic system. In The cognitive neurosciences III (ed. Gazzaniga MS.), pp. 1215–1228. Cambridge, MA: MIT Press.

Publication types

LinkOut - more resources