Source-linked AI summary

Mapping the stereotyped behaviour of freely-moving fruit flies

Gordon J. Berman, Daniel M. Choi, William Bialek, Joshua W. Shaevitz

arXiv:1310.4249v2q-bio.QMcs.CVphysics.bio-phstat.ML

TL;DR

Behavioural studies often rely on coarse metrics or subjective categories, leaving stereotypy insufficiently tested. This paper maps fly behaviour from postural dynamics using dimensionality reduction, wavelet features, and local-preserving embedding, revealing structured stereotyped and non-stereotyped activity.

  • Problem

    A comprehensive mathematical framework was lacking for experimentally probing stereotyped behaviour while retaining the full complexity of animal movement.

  • Method

    The method converts registered fly images into PCA postural modes, wavelet spectrograms, normalized spectral features, and a t-SNE behavioural-space embedding.

  • Results

    122 density regions and a pause–move dynamic structure reveal localized stereotyped-behaviour states interspersed with non-stereotyped actions.

  • Takeaways & Limitations

    Behavioural spaces can organize recognizable actions directly from underlying movement statistics, supporting comparisons of behavioural repertoires and subtle distinctions between groups.

Abstract

from arXiv · show

Most animals possess the ability to actuate a vast diversity of movements, ostensibly constrained only by morphology and physics. In practice, however, a frequent assumption in behavioral 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 the behavioral space of organisms, relying only upon the underlying structure of postural movement data to organize and classify behaviors. We find that six different drosophilid species each perform a mix of non-stereotyped actions and over one hundred hierarchically-organized, stereotyped behaviors. Moreover, we use this approach to compare these species' behavioral spaces, systematically identifying subtle behavioral differences between closely-related species.

I. INTRODUCTION

The paper addresses the lack of a comprehensive framework for experimentally probing stereotypy by mapping freely moving fruit-fly behaviour directly from postural dynamics. It combines high-resolution imaging with an unsupervised behavioural-space approach to identify stereotyped and non-stereotyped actions.

  • Behavioural stereotypy describes discrete, reproducible actions that recur across time, individuals, and sometimes species.
  • Existing approaches either measure coarse activity or classify user-defined categories, limiting behavioural resolution and introducing subjective bias.
  • The proposed framework treats behaviour as a trajectory through postural-dynamics space, with pauses near repeatable positions representing stereotyped behaviours.
  • Approximately 100 stereotyped behaviours are interspersed with frequent non-stereotyped bouts in freely moving Drosophila melanogaster.
  • The study records complex locomotor and grooming behaviours from individual flies using video resolution sufficient to resolve legs, wings, and proboscis.
  • The dataset includes 59 male and 51 female Oregon-R flies, each imaged for one hour at 100 Hz.

III. BEHAVIOURAL ANALYSIS

The analysis converts registered fly images into a compact postural representation suitable for behavioural mapping. PCA reduces image data to 50 postural modes while preserving approximately 93% of observed variation.

  • Images are segmented and registered to isolate the fly and enforce translational and rotational invariance before postural analysis.
  • B. Postural decomposition: PCA of image Radon transforms produces postural time series in a 50-dimensional space.
  • B. Postural decomposition: 50 modes explain approximately 93% of the observed image variation.
  • B. Postural decomposition: Postural modes are directions of correlated variation that convert each movie into a multivariate time series.

C. Spectrogram generation

The method represents posture dynamically through wavelet spectrograms, normalizes mode-frequency power, and embeds the resulting feature vectors to preserve local behavioural similarity. This design accommodates behaviours involving multiple appendages and time scales.

  • Instantaneous postural-mode values are insufficient because stereotypy is defined by dynamical patterns rather than posture alone.
  • C. Spectrogram generation: Morlet wavelets represent power across time and frequency, capturing postural dynamics occurring at several time scales.
  • C. Spectrogram generation: Each time point becomes a 1,250-dimensional feature vector from 25 frequency channels across 50 postural modes.
  • D. Spatial embedding: t-SNE is chosen because it minimizes local distortions, preserving nearby relationships while allowing larger-scale distances to change.
  • D. Spatial embedding: Because t-SNE scales with N^2 memory complexity, importance sampling trains the embedding on 35,000 points before reembedding the remainder.
  • C. Spectrogram generation: The feature vectors are normalized so mode-frequency power can be treated as a probability distribution and compared using KL divergence.

IV. RESULTS

The embedded behavioural space preserves local similarities and exhibits distinct density peaks and pause–move dynamics. Low-velocity periods are localized near repeatable regions, whereas high-velocity periods are more dispersed.

  • Nearby embedded points have similar postural-mode power despite normalization removing variation in total postural-motion power.
  • Three-dimensional embedding reduces the cost function by less than 2% relative to the two-dimensional structure.
  • Gaussian-smoothed density reveals resolved local maxima, whose locations represent candidate stereotyped behaviours.
  • Embedded trajectories show long stationary periods interspersed with quick movement bouts, forming a two-state pause–move pattern.
  • Approximately 45% of time points belong to the localized low-velocity state, while high-velocity points are more uniformly distributed.

B. Behavioural states

The behavioral embedding forms 122 density-defined regions whose pauses correspond to recognizable stereotyped actions. These regions are visited consistently across flies, while many stereotyped behaviors also exhibit periodic postural dynamics.

  • Behavioral states: 122 regions were delineated in the embedded behavioral space, each containing one local probability-density maximum.The regions were identified with a watershed transform applied to the z1, z2 density map.
  • Behavioral states: Pauses lasting 0.05–nearly 25 s corresponded to distinct, recognizable behaviors that emerged from the data rather than predefined categories.Observed examples included walking, running, front-leg grooming, and proboscis extension.
  • Behavioral states: 104 of 122 regions were visited by over 50 of 59 flies, while the remaining low-probability behaviors comprised less than 3% of total activity.The classification was consistent across individuals, and most regions were visited by almost all flies.
  • Periodic orbits: Many stereotyped behaviors produce periodic orbits in postural space, suggesting that much behavior is confined to low-dimensional postural dynamics.These periodic trajectories emerged despite the wavelet-based feature vectors not preserving phase information.

D. Differences in behaviour between males and females

The behavioral maps reveal broad and fine-scale differences between male and female flies, including altered locomotion, resting, slow motions, and wing-grooming movements. These distinctions emerge from comparisons of the mapped behavioral distributions and postural orbits, although their ethological relevance and dependence on the experimental paradigm remain unresolved.

  • Global differences: Female flies showed enhanced locomotory behaviors and suppressed resting and slow motions relative to males.Female postural time series were embedded into a behavioral space derived from male flies.
  • Fine-scale differences: Sex differences in the wing-movement space were tested pointwise with a Wilcoxon rank-sum test at p-value < .01.Male and female region-normalized probability density functions were compared within the wing-movement region.
  • Fine-scale differences: Left-wing grooming was sexually dimorphic: male-preferred grooming included an additional middle-leg kick that female-preferred grooming lacked.The difference was verified using the mean postural-space orbits associated with the regions.
  • Robustness: The reported distinctions did not require fine-tuning the spatial structure of the behavioral map.The results remained unchanged under the stated map-structure variation.
  • Limitations: The ethological relevance of the findings and the contribution of the experimental paradigm to observed variance require future study.The authors note that unsupervised classification lacks ground truth because the method avoids a priori behavioral definitions.
  • Applications: The framework is positioned for extensions involving sensory inputs, genetic manipulation, or multiple individuals, and for comparisons beyond fruit flies.The authors state that the only Drosophila-specific pipeline step is generating postural eigenmodes.

Appendix A: Image processing

The pipeline isolates and registers fly images, reduces posture to time series, and represents postural dynamics with multiscale wavelet features. These features support behavioral-space analysis and identification of behavioral states.

  • Image segmentation: Canny edge detection, morphological dilation and erosion produce a mask that isolates the fly from each image.The mask is applied to the original image after filling closed curves and removing spurious holes.
  • Image registration: Rotational and translational registration align isolated fly images to a template, enforcing invariance to position and orientation.Rotational alignment uses polar Fourier cross-correlation with a digitally ablated fly template.
  • Postural decomposition: PCA on Radon-transformed images retains 6,763 of 18,090 measurements and approximately 95% of total image variation.The retained measurements are selected above the minimum in the pixel-value standard-deviation distribution.
  • Postural decomposition: 50 postural modes exceed the largest shuffled eigenvalue and account for slightly more than 93% of observed variation.The shuffled-column null model supplies a resolution limit for distinguishing signal from finite-sampling noise.
  • Wavelet representation: Morlet continuous wavelet transforms generate multiresolution spectrograms for the first 50 postural modes across frequencies from 1 Hz to the Nyquist frequency of 50 Hz.The representation measures power at frequency f around each time point and uses dyadically spaced frequencies.

Appendix D: t-SNE implementation

The t-SNE implementation builds a behavioral embedding from a representative training set and re-embeds additional data by matching transition probabilities. The procedure addresses memory limits while preserving comparable male and female embeddings.

  • Embedding: The embedding uses t-SNE to reduce spectral feature vectors while minimizing local distortions around stereotyped behavioral states.Longer-range structure is not required to be preserved.
  • Optimization: The optimization uses gradient descent with early exaggeration, while Nelder-Mead restarts improve the solution in approximately 5% of cases.The additional initialization uses a mapped point associated with the nearest candidate solution.
  • Training-set construction: Memory complexity limits the practical embedding to approximately 35,000 points, so importance sampling constructs a representative training set.The training set contains roughly 600 points from each of 59 individuals and totals 35,000 points after behavioral-space sampling.
  • Re-embedding: New feature vectors are embedded by choosing a point whose transition probabilities best match those between the new vector and the training set.The method compares transition distributions in the original and embedded spaces using Kullback-Leibler divergence.
  • Cross-sex embedding: Female data re-embedded into the male-derived space have median costs of 5.08 bits versus 5.12 bits for male data.The female median re-embedding cost is only 1% higher than the male cost.

Appendix E: Phase-averaged orbits

Phase-averaged orbits summarize repeated postural bouts by aligning reconstructed phases and averaging mode projections with von Mises weighting. The procedure uses κ ≈ 50.3, corresponding to σ_vM = .1.

  • Orbit averaging: The phase-averaged orbit for each eigenmode is computed as a von Mises weighted average of mode projections over phase.The projection onto eigenmode k, its associated phase, and the concentration parameter κ determine the average orbit.
  • Orbit averaging: κ ≈ 50.3 produces a von Mises standard deviation of .1 for the phase weighting.The modified Bessel function appears in the relationship between κ and the von Mises variance.
  • Phase alignment: Phase offsets between 50-dimensional orbits are aligned using cross-correlation maxima and summarized by the median phase shift.This alignment resolves the additive-constant ambiguity in phase reconstruction.

Appendix F: Supplementary Tables

The supplementary tables document parameter settings for eigen-decomposition, wavelet analysis, t-SNE implementation, and behavioral segmentation.

  • Supplementary parameters: Table S1 lists the parameters used in eigen-decomposition.
  • Supplementary parameters: Table S2 lists the parameters used in wavelet analysis.
  • Supplementary parameters: Tables S3 and S4 list parameters for t-SNE implementation and behavioral segmentation, respectively.

Appendix G: Supplementary Figures

The supplementary figures examine adaptation, representations, embedding dimensionality, individual variation, sex differences, and periodic orbits in the behavioural analysis.

  • Adaptation: 5 minutes captures almost all arena adaptation, and this initial period is excluded from analysis.The figure reports median movement velocity for 59 male flies across 65 minutes; pink regions indicate the 25% and 75% quantiles.
  • Image representation: A clear minimum in Radon pixel standard deviations enables reducing the number of pixels needed to represent the data.
  • Embedding: 3-D embedding improves the error function by 2% relative to 2-D, yielding 2.9 versus 3.3 bits out of 20.6 bits.
  • Individual variation: Inter- and intra-individual behavioural-space variation are compared using Jensen-Shannon divergence between probability densities.Intra-individual variation compares maps from the first and last 20 minutes of each individual dataset.
  • Sex differences: Sex-related wing-movement distinctions remain detectable across smoothing parameters when female and male region-normalized densities are compared.Regions marked by lines have Wilcoxon rank-sum p-values below .01.
  • Periodic orbits: Average left-wing-grooming postural-space orbits differ between regions (i) and (ii), with line thickness indicating the standard error of the mean.

Appendix H: Supplementary Movie Legends

The supplementary movie legends describe raw and processed fly videos, behavioural-space dynamics, and mosaics showing repeated instances of specific behavioural regions.

  • Movie S1: Movie S1 pairs raw video of a behaving fly with segmented and aligned data.
  • Movie S2: Movie S2 combines fly video with arena coordinates and embedded behavioural-space position, highlighting behaviours and providing coarse labels.The first five seconds play in real time; the subsequent portion is slowed fivefold.
  • Movies S3–11: Movies S3–11 mosaic multiple instances of specific behavioural-space regions from many individuals, slowed fourfold for clarity.
  • Movie index: Table S5 is the behavioural-movies table accompanying the supplementary movie legends.
  • Cross-reference: A supplementary entry refers to a behavioural region in Fig. 11 of the main text.
Loading 1310.4249v2…