Introduction

Animal species display enormous interindividual differences in behavior. The temporal stability of these interindividual differences allows for defining these idiosyncrasies as animal individuality, also called animal temperament, behavioral syndrome, or even personality 14. Animal individuality has been described for numerous species and behaviors, including: mouse exploration behavior 5, great tit feeding preferences 6, octopus threat and feeding behavior 7, pea aphid threat responses 8, as well as vinegar fly handedness 9,10, olfaction 11, phototaxis 12, and object orientation 13. The temporal stability of individuality allows for discriminating it from short-term behavioral changes, like internal state variations. Furthermore, temporal stability of behavior allows modifications by learning 14 and behavior-based natural selection 15. Historically, the ‘nature vs. nurture’ debate (i.e., genome vs. environment) has shaped our understanding of the origins of behavioral individuality 16. Stochastic developmental processes are a more recently found factor 13,17, providing an additional layer to gene-environmental interactions 18. Most experimental studies on animal individuality have focused on a single behavior set in a singular environment, yet commonly used definitions of animal individuality in predominantly field-based disciplines such as behavioral ecology 3, and the definition of human personality entails behavioral stability across situations 19. Similar to humans, animals will never re-encounter the exact same situation under natural conditions, and individuality can be an important factor in determining the ecological success of an animal and, as a consequence, its entire population 20. It is, therefore, crucial to understand how an animal’s individuality interacts with variable environments. Despite decades of interest in animal individuality across situations, the experimental evidence remains insufficient, and the results are contradictory, with studies arguing for 2124 and against 25,26 individuality across situations with many finding mixed results 2729. Here we sought to systematically investigate the stability of individual behavioral differences across situations using laboratory-controlled variable environmental conditions.

There is ample evidence for the stability of human personality and animal individuality over time 30,31. Intuitively, humans attribute stable personalities to other humans 32. The stability of human behavior across situations, including environmental context, nevertheless remains highly debated, with several studies arguing for 30,33 and against it 19,34. Summarized as the ’person-situation debate’, psychologists have argued for over a century about the relationship between personality and the situational environment, placing this question at the core of personality psychology 19. Animal models for behavioral stability across situations provide an opportunity to address this question. In our study, the situation is the sum of all environmental features where a specific behavioral task is performed. The work presented here establishes a quantitative animal model to investigate this and related questions about behavioral stability across environmental situations.

The vinegar fly Drosophila melanogaster provides an enormous toolset for studying individuality and its origins across multiple scales, from neurons to circuits, to behavior. This comprises a rapidly unfolding connectome 35,36, an extensive collection of cell type-specific, binary expression systems 37,38, and a similarly extensive collection of tools for manipulating neuronal function, including neuronal silencers 39,40, activators 41, and thermogenetic 42 and optogenetic 43,44 effectors. Hence, the availability of tools and reagents for manipulating small, defined sets of neurons is no longer a major limitation in answering questions about individual behavioral differences. Instead, what has been missing is an integrative approach combining different high-throughput behavioral assays, which would allow for behavioral screening and classification of large quantities of individual flies for several different behavioral parameters across a variety of environmental contexts.

In recent years, mainly low-throughput, single-fly visual assays like the classical two-stripe Buridan assay 45,46, arenas for tethered walking 47 or virtual flight 48 have been used to study behavioral individuality in vison-based tasks 13,49. In Buridan’s paradigm, flies walk between two inaccessible visual targets (two vertical high-contrast stripes). The stripes are presented in a homogenously illuminated surrounding with no other visual or non-visual cues. Apart from work on individuality involving Dorsal Cluster Neurons (DCNs) 50, also known as Lobula Columnar Neuron 14 (LC14) 51, Buridan’s paradigm has been used to show the importance of the central complex for normal walking speed 52 and for studying photoreceptor function or development 53,54, and visual memory 55. Other circular arenas have been frequently used to study locomotory activity without visual stimuli 5658.

In contrast to these low throughput assays, high throughput assays for studying the behavioral responses of large amounts of animals have been used primarily for genetic screens. Examples include apparatuses to study phototaxis 59, geotaxis 60, olfactory learning 61,62, and circadian rhythms 63. The Ethoscope 64 and MARGO 65 are recent additions to this repertoire that offer several additional high-throughput assays. Except for the Drosophila activity monitors (DAM, Trikinetiks), Ethoscope, and MARGO, these group assays cannot distinguish individual behavioral differences. Only the Ethoscope and MARGO provide some visual modules. Hence, progress towards understanding individuality in visually guided behaviors in a high-throughput fashion remains meager, with few exceptions 9,10,12.

To investigate the influence of the environment on the stability of visually guided individuality and, to systematically quantify individuality across many behavioral traits and their dependency on the environment in walking flies, we built a new multi-parameter assay called Indytrax. Indytrax is a compact and affordable Mathworks MATLAB-based modular assay and tracker for high-throughput individual ethological quantification. The assay includes swappable modules for multiple high-throughput Buridan paradigms, a Y-maze choice assay for studying the decision-making and locomotor handedness 10, and a simple setup to quantify locomotor activity in large groups of flies 57. We used this tracker to determine the relative contribution of various environmental features (temperature, visual cues, arena shape) to the stability of individual behavior. Our results show that identically defined visual stimuli (stripe color, width, and length) do not necessarily evoke the same behavior in an individual when presented in different environments. Conversely, we find that specific individual behavioral traits (attention, exploration, and anxiety, categorized via multiple behavioral parameters) remain stable even in different environments. Finally, using an LED-based virtual flight arena, we show that attention towards a stimulus remains stable even across different modalities of locomotion (walking versus flying) when using the same Buridan-type visual stimulus. Hence, we find stable behavioral traits across situations in our fly model, in analogy to what has been demonstrated for humans 30,33. Altogether, our results provide the foundation for understanding the complex interaction between individuality and the environment, including the question of why individual behavior is more unpredictable in variable naturalistic conditions, much like the stability across situations in human subjects 19.

Materials and Methods

Animals

All experiments were performed using one week old wild-type Drosophila melanogaster (CantonS (Source: Bassem Hassan) and TopBanana 66) reared on a standard Drosophila yeast cornmeal medium (7.5g Agar, 64g cornmeal, 160g yeast, 85.5ml sugar cane syrup in 1L of water) at 25°C and 50% relative humidity under a 12/12 light/dark rhythm. Individual flies were placed into the behavioral arenas using a fine brush and were allowed to accommodate for about 10 minutes before any experiment. The behavioral arenas and flies were cooled on ice for Y-maze experiments before gently loading single flies into the chambers using a fine brush. For experiments with clipped wings, the wings were clipped close to the hinge under CO2 anesthesia, and flies were tested after being allowed to recover within individual vials for at least two days.

Setups

Setup 1: Standard Buridan Arena

Assay

Two Buridan setups were used: type A uses fluorescent tubes for background illumination (as described in 13,67). Type B utilizes a panoramical LED matrix (RGB, 384×128 pixels, pixel size 0.9°, 120Hz frame rate, 5kHz refresh rate, < 1ms Pixel update latency), which is easily addressable via HDMI for stimulus presentation (see Fig. 1a). For a detailed description of the assays and tracking procedures, see supplemental Fig. S1. Flies were walking on a circular platform (diameter 12cm) between two opposing black vertical stripes (angular extent 12° horizontal and 90° vertical measured from the center of the platform). A trench of water surrounded the platform to prevent the flies from escaping (type A) or a clear plastic hemispherical dome coated with Sigmacote (Sigma-Aldrich, SL2-25ML) from the inside (type B). Single-fly walking behavior was recorded at 25°C and 50% relative humidity for 15 minutes (450×450, 8-bit greyscale, 20 Hz, AVI, Mjpeg compression, 90% quality). Before changing an experimental condition, flies were placed back into single vials for recovery.

Setups for studying individuality walking flies.

a Overview of a classical (left, fluorescent tubes) and LED (middle) Buridan assay (behavioral platform diameter = 120mm). A MATLAB script provides single fly tracking and analysis of behavioral key components (right). b-d persistence of individual walking patterns across time (b), different stripe numbers (c), and changes in background illumination (d).

Automated tracking procedure

Data was analyzed either in real-time using previously described code (type A, see 67) or offline using a custom-written MATLAB code (type B, available for download from github.com/LinneweberLab/individuality-assays, see supplemental Fig. S1c), respectively. Thresholded video frames and overlaying trajectories are displayed continuously in a separate window to allow the experimenter to assess tracking quality. The MATLAB code works as follows: the circular region of interest (ROI) is automatically detected based on adaptive thresholding and subsequent filtering of the thresholded ROI based on area. Once the ROI is detected, a background image is generated by calculating the maximum intensity between a recorded video’s first and last frames. All flies that moved between those frames will not appear in this background-only image. During tracking, the background image is subtracted from each consecutive frame to simplify the thresholding of the fly. For each frame, the centroid of these thresholded pixels is stored. Should more than one object be detected within a ROI (e.g., through pixel noise), the x-/y-coordinates of the object closest to the fly’s position in the previous frame are stored. If a fly is lost, the tracker keeps the last known position of the fly until it is detected again.

Data output

Once tracking is completed, the raw tracking results are converted to real-world units (mm) and saved into a .mat-file. Before further analysis, minimal movements are filtered out by only updating the fly’s position if a certain walking threshold (0.8mm/frame) is detected. For each fly, a figure can be saved, allowing for a quick overview of the walking trajectory, and a variety of behavioral parameters are also saved into a separate .txt-file to simplify further data analysis. For a detailed explanation of calculated parameters, see supplemental table 1. For an in-depth analysis of Buridan data, sophisticated data analysis routines describing many behavioral parameters were previously developed 67. To simplify data integration and compatibility, the raw trajectories can also be saved to a pair of .TXT and .DAT files which can later be read and analyzed by previously available software 67.

Setup 2: IndyTrax multi-arena platform

Assay

To allow for high-throughput behavioral quantification under various tightly controlled environmental contexts, we designed the novel assay system IndyTrax. In short: single flies are transferred to an array of small behavioral arenas. They are filmed from below against near-infrared (850nm + Lee filters 87C IR-pass filter on camera objective) LED illumination (Fig. 3). Compared to published Buridan assays 67, this allows tracking flies in the absence of visible light, but also has the advantage that flies cannot see the camera lens which might otherwise appear as a high-contrast object from within the arena. The assay was designed to allow for the tracking of flies in various possible arena shapes and numbers. We created three different 3D-printable arena types (supplemental Fig. S4e-g), which can be downloaded from github.com/LinneweberLab/individuality-assays. For individuality analysis, we used the multi-Buridan and Y-maze arenas. The setup was built from commercially available and 3D-printed parts. For a part list, see the supplemental table 2. All 3D-printed parts and behavioral assays were printed on a Prusa i3 mk3 printer using black or white PLA filament (Verbatim 55318) and can be downloaded from github.com/LinneweberLab/individuality-assays. Similarly, the MATLAB code tracking and data analysis can be downloaded from there. For detailed instructions on how to install and run the code, see supplemental information. With a computer running MATLAB already available, we estimate the building cost for a complete, temperature- and humidity-controlled enclosure, including all behavioral assays, at about 3500€.

Temperature- and humidity-controlled enclosure

Behavioral arenas are located within a black climate-controlled metal enclosure. Temperature and humidity within the enclosure can be regulated using two 3D-printed humidifiers and a heating plate (see supplemental Fig. S4a). Ambient temperature and humidity can be set at any desired value using this configuration and kept stable over a long time (see supplemental Fig. S4c). Since small enclosed arenas are prone to heat build-up, we placed all temperature- and humidity-sensors within the center arena (arena 13) for Buridan experiments and close to the flies in Y-maze experiments. For Buridan experiments, this limits the number of simultaneously trackable arenas to 24 but allows more accurate climate control within the chambers.

Small-scale Buridan-stimuli arrays

We modified the basic design of previously published behavioral arenas optimized for Buridan object orientation behavior 67 by implementing changes in four major areas to allow for high throughput tracking: Firstly, we reduced the arena diameter to allow for filming an array (5×5) of optically isolated Buridan arenas with only a single camera (Fig. 3). Secondly, flies are walking on circular translucent acrylic plates (49mm diameter) which allows for filming flies from below against infrared back-illumination, hence avoiding problems with dead angles that would arise when filming cylindrical arrays from above. Thirdly, during experiments, flies are contained on their respective acrylic platform by clear hemispherical plastic domes (Fig. 3b). This removes the necessity of cutting the flies’ wings before experiments and saves space by making the water-filled moats of the original design superfluous. Plastic domes were coated with Sigmacote (Sigma-Aldrich, SL2-25ML) from the inside to prevent the flies from sitting on the dome surface. Fourthly, to provide a scalable, homogeneously illuminated white background for optical stimulus presentation, the fluorescent tubes of the original design were replaced with electroluminescent (el-)foil wrapped around translucent acrylic cylinders (Fig. 3b). Such el-foils can be cut to size and have low heat emission. They emit light evenly over the whole surface, minimizing unwanted intensity cues within the arenas. El foils are driven at 2 kHz, thus providing virtually flicker-free white illumination to the flies. For creating the Buridan object orientation stimulus, thin black stripes (12° wide as measured from the arena center) were 3D printed and glued vertically to the inside of the arena walls 180° apart, thereby creating high-contrast objects against a uniform white background (Fig. 3b). Individual arenas were fitted into a 5×5 array. Every other arena within the array was rotated by 90° counter-clockwise to increase the robustness of behavioral readouts by canceling out possible directional artifacts created within the enclosure.

Walking behavior was recorded at 50% relative humidity for 15 minutes (1200×1200 pixel, 8-bit greyscale, 15 Hz, AVI, Mjpeg compression, 90% quality) with either the el-foil-illumination on, in darkness, at 23°C or 32°C, respectively. After being tested in the Buridan assay, the flies were put back into single vials overnight to allow for recovery before testing them in the Y-maze assay the next day around the same time.

Y-maze array

We constructed a modular 3D-printable Y-maze array (144 arenas, 300×300×2mm) based on a previously published design 65. The Y-maze plates were placed between two 320×320×3mm borosilicate glass plates. The bottom side of the upper glass plate was coated three times using Sigmacote (Sigma-Aldrich, SL2-25ML) to prevent the flies from walking on the upper plate (Fig. 3c). Directly below the arenas and above the upper glass plate, we placed a layer of white paper (Evercopy premium 80g, Ref. 1902C) for light diffusion and to restrict the view of the flies outside of the arenas. For individuality experiments, we covered the outer arenas with black tape and tracked flies only within 100 arenas located in the center. This made keeping track of individual fly identities easier when switching between the different behavioral assays. Videos of walking flies were recorded at 50% relative humidity for 30 minutes (1200×1200 pixel, 8-bit greyscale, 15 Hz, AVI, Mjpeg compression, 90% quality) under white light illumination, in darkness, at 23°C or 32°C, respectively. For white light illumination, we placed a 30×30cm LED panel (Tween Light 30 x 30 cm LED panel, 4000k, 16W) on top of the arenas and temporarily removed the infrared-pass filter from the camera objective. Y-maze experiments were all done consecutively on the same day (light on 23°C, light off 23°C, light on 32°C, light off 32°C).

Automated tracking procedure

We developed a fully-automated MATLAB-based tracking code that allows users to adjust parameters like arena number and size and generates output data for all videos within a user-selectable folder. The code assumes only one fly per region of interest. This saves processing time and increases tracking robustness by not having to match multiple fly identities between frames. Before running the code, the experimenter must create a camera calibration file using the MATLAB camera calibration toolbox (see supplemental information). This allows for more accurate tracking results by correcting lens distortions (supplemental Fig. S4d). If the camera stays immobile, this procedure must be done only once, usually only a few minutes. As long as the arenas filmed are arranged in rows and columns, the code can handle virtually any shape or number of arenas, making it ideal for tracking flies across different behavioral assays (supplemental Fig. S4e-g). Regions of interest (ROIs) are detected based on adaptive thresholding and subsequent filtering of thresholded ROI-objects based on the area (supplemental Fig. S4e-g, middle). Once the ROIs are detected and sorted, a background-subtracted image is generated, allowing the user to determine a detection threshold, above which all pixels will be interpreted as foreground objects (supplemental Fig. S4e, third from left). During tracking, background subtraction and object thresholding is performed for each frame, and for each ROI the centroid of the thresholded fly is extracted and saved. Thresholded pixels and trajectories are displayed continuously in a separate window to allow the experimenter to assess tracking quality. If more than one object is detected within a ROI (e.g. through pixel noise), the x-/y-coordinates of the object closest to the fly’s position in the previous frame is stored. If a fly is lost, the tracker keeps the last known position of the fly until it is detected again. The average tracking speed for 24 ROIs/flies was about 20hz with MATLAB running on an Intel i5 3Ghz CPU. For tracking 400 ROIs/flies average tracking speed was about 5hz.

Data output

Data output is the same as described for our standard Buridan arenas.

Setup 3: Virtual flight simulator

Assay

We designed a novel, easy-to-assemble, and easy-to-use virtual flight simulator using affordable 3D-printable and off-the-shelf parts (Fig. 5a-c) to quantify behavioral responses during flight. For a detailed description of the setup and custom code, see supplemental Fig. S9. In short, using a tethering station (for description, see 48), flies were cooled down for immobilization and glued to a steel pin (0.1mm diameter, 10mm length, www.entosphinx.cz) using UV-cured glue (Bondic). Once tethered, single flies were put between two neodymium magnets (magneto-tether; upper magnet: diameter 5mm, lower magnet: ring, outer diameter 10mm, inner diameter 5mm). Once the appropriate distance between the magnet is found (about 20mm), the magnetic field allows the flies to rotate freely around their yaw-axis while keeping the steel pin in place (Fig. 5b). The tip of the steel pin is inserted into a V-shaped sapphire bearing (1mm diameter) to reduce friction. For re-initiation of flight, air puffs can be delivered from below via a membrane pump. A panoramic LED matrix surrounding the magneto-tether was used for Buridan stimulus presentation (RGB, 256×128 pixels, 120Hz frame rate, 5kHz refresh rate, pixel size 1.4°, angular extent 360° horizontal x 100° vertical, stripe width: 12°). The LED matrix controller is connected to a computer via HDMI, allowing an easy and flexible stimulus creation and presentation (Novastar mctrl 660 pro, 120Hz, < 1ms Pixel update latency). Flies were filmed from below under near-infrared illumination (Fig. 5c), and each fly’s heading was tracked in real-time (90 Hz) using a custom-written MATLAB code (available for download from github.com/LinneweberLab/individuality-assays). Before starting the experiment, each fly was tested for 120s with an optomotor stimulus (rotating stripe pattern, 120°/s, 40x CW and 40x CCW, respectively) to assess the flies’ ability to rotate smoothly (Fig. 5d, left). After this, flies were presented with the Buridan stimulus with varying contrast (100%, 50%, 100% inverted; stripe width 30°), and their heading was tracked for 3×4 min. Flies were then carefully separated from the steel pin and transferred into single vials for overnight recovery before being re-tethered and tested the following day around the same time. For flight vs. walking experiments, flies were tested for 10 min while flying under a 100% contrast Buridan stimulus (stripe width 12° from a fly’s perspective) before being gently separated from the steel pin and being transferred into the LED Buridan assay (Type B), where they were tested for 15min under a 100% contrast Buridan stimulus (stripe width 12° from a fly’s perspective).

Automated tracking procedure

The code for tracking a fly’s heading in 360° can be downloaded from github.com/LinneweberLab/individuality-assays. Flight tracking is done in real-time at 90fps (see supplemental Fig. S9c). A timestamp is created for each incoming camera frame, and two different thresholded images are computed with different Gaussian filter settings. A strong filter setting blurs out the legs of the fly and allows for thresholding only the fly’s body and calculating a heading angle between 0° and 180° through ellipse fitting. By subtracting the thresholded body pixels from a weaker filtered version of the same frame, the limbs and wings (visible when the fly stops flying) can also be tracked separately if the experimenter wants. To calculate the heading between 0° and 360°, the centroid of thresholded body pixels is set to (0,0) within a fictive coordinate system (see supplemental Fig. S9c), and the body axis is aligned with the x-axis. The head region is assigned based on the sum of pixels within the 4 axis quadrants (smallest area of either I+IV or II+III, respectively). Once the heading is calculated, it is stored together with the original video frame for additional offline data analysis, if desired. When a fly stops flying (wings get detected in the video), a command is sent to a connected Arduino, which controls a relay to switch on a membrane pump and provide an air puff to reinitiate flight. During tracking, the thresholded video is displayed together with the computed heading to allow the experimenter to assess tracking quality.

Data output

After tracking, raw heading data, a graphical overview image, and a table containing computed behavioral parameters are saved automatically for each fly which can be used for further data analysis. For a detailed explanation of all calculated parameters, see supplemental table 1.

Data analysis

All data analysis was performed with MATLAB. For angular calculations, we used algorithm presented in 68. After a test for normality (Shapiro-Wilk-Test), behavioral data between groups was compared using the paired T-test. For correlating individual data, we calculated Pearson correlation coefficients. For walking data, an arena’s center region (edge-corrected area) was defined as the circular area around the center with a radius of 80% of the arena radius. The maximum color value (red) for generating heatmaps was set to the 95%-quantile of the count distribution to increase data visibility.

Results

The goal of our study was to understand to what extent animal individuality is influenced by situational changes in the environment, i.e., how much of an animal’s individuality remains after one or more environmental features change. Based on our previous work on animal individuality 13, we started our analysis in the multiparametric two-stripe Buridan’s paradigm (Fig. 1a, supplemental Fig. S1 for technical details) 13,67. As expected, we measured interindividually variable, yet remarkably stable behavioral responses, both on the individual (Fig. 1b, Fig. 2a, supplemental Fig. S3a) and mean group level (supplemental Fig. S2a), when tested in the exact same situation with all environmental features kept the same. This was true for the five representative behavioral parameters (out of 20 parameters total, see supplemental Table T1 and supplemental Fig. S8), defined as falling into three behavioral traits: exploration (% of time walked, walking speed), attention (vector strength, angular velocity), and anxiety (centrophobicity).

Individual traits of walking flies persist over time but depend on the visual scenery.

a-c Correlation of key behavioral parameters over time (a), different stripe numbers (b), and changes in background illumination (c). Correlation coefficients are displayed in the upper left corner of each plot. *=p<0.05, **=p<0.01, ***=p<0.001, for detailed fly numbers per experimental condition, see supplemental Fig. S2.

Modifying the visual stimulus within the Buridan arena (0, 1, and 2 stripes were tested, Fig. 1c, Fig. 2b, and supplemental Fig. S2b and S3b) significantly affected the mean group behavior across all three behavioral traits (supplemental Fig. S2b). Especially the population means of three parameters (% of time walked, vector strength, and centrophobicity) were strongly affected by the stimulus modification. Surprisingly, despite this change in population means, we observed only a minor effect on individuality (Fig. 1c and Fig. 2b, measured by a high Pearson correlation coefficient and a consistent rank within the distribution). The individuality for the traits exploration and anxiety persisted even upon modulation (variation of stripe number) and after removing visual cues from the arena. Only those parameters describing the fly’s attention towards visual cues showed an unsurprising reduction in behavioral stability upon removal of the visual stimuli (Fig. 2b). Altogether, these results demonstrate that individuality persisted after stimulus modifications within the same arena, even when the modifications resulted in altered population responses.

To further characterize the surprising relationship between individuality and population means upon situational changes, we modified the homogeneity of background illumination in the Buridan arena using two different diffuser materials (paper and acryl-based covers of fluorescent ring lights) and compared these conditions to a newly designed Buridan LED arena displaying the same visual stimulus (stripes of the same color, width, and height) (Fig. 1d, Fig. 2c and supplemental Fig. S2c and S3c). We measured no significant differences between the population means of the two diffuser conditions and only minor group-based changes compared to the LED Buridan (supplemental Fig. S2c). We then tested the correlation of individual behavior across these conditions, as a measurement of behavioral stability, expecting high correlations. Indeed, the different diffusers within the same arenas only had minor effects on the behavior of individual flies (Fig. 1d). Conversely, the individual response changed dramatically when the same fly was tested again in the LED arena (Fig. 1d). A fly’s attention and anxiety parameters quantified within the original arena did not allow for any prediction for the LED arena (Fig. 2c). Significant correlations between the LED arena and the original arenas were only measured for exploration parameters (Fig. 2c). This unpredictability of individual fly behavior across situations was once again particularly surprising since group-based performances remained similar (supplemental Fig. S2c). Finally, a detailed comparison of males and females revealed only quantitative but no qualitative differences across all parameters between the two sexes (supplemental Fig. S2 and supplemental Fig. S3).

Based on the surprising result that individuality 1 of visual orientation behavior is more strongly influenced by the arena type (despite producing very similar population responses) and, only to a lesser degree, dependent on the visual cue (despite strong differences in the population response), we set out to characterize the contribution of environmental situations to individuality even more quantitatively. We therefore built a multiplatform high-throughput assay (Indytrax) to quantitatively study the behavior of the same individual flies in different environmental situations (Fig. 3, technical details supplemental Fig. S4).

A high-throughput assay for studying the influence of temperature, illumination, and arena shape on individuality.

a Setup overview. Flies are filmed from below against a near-infrared backlight and are walking within a 5×5 array of small Buridan chambers (b) or one of up to 144 Y-maze arenas (c). The setup is housed within a temperature- and humidity-controlled enclosure (600 x 450 x 820 mm). The provided MATLAB code corrects lens distortions, automatically detects the arenas, and tracks each fly’s position over time, allowing for generating high-throughput single-fly behavioral data (d).

Using Indytrax, we compared the behavioral parameters of each fly in eight different environmental situations (Fig. 4, supplemental Fig. S6, S7, S8). The flies were tested in two independent arenas (Buridan and Y-maze) at two different temperatures (23°C and 32°C, supplemental Fig. S5) and under both light and dark conditions. Our analysis showed that temperature significantly affected exploration parameters on the population mean level. As expected, most animals tested were more explorative at higher than at lower temperatures (reviewed in: 69) (supplemental Fig. S6). Despite these population changes, individuals kept their rank within the population independent of the changed baseline activity. For example, fly #1 was the least explorative, fly #2 exploration performance ranked medium, and fly #3 the highest (Fig. 4a). The graphical analysis of exploration parameters (Fig. 4b) confirmed that most individuals maintain their rank in the distribution under different temperatures and light-dark conditions, whereas the individual distribution rank changed between the different arena types. This relationship was less pronounced for attention parameters. The detailed correlative analysis between individuals underscores these observations (Fig. 4c and supplemental Fig. S7 and full analysis supplemental Fig. S8): Amongst the exploration parameters, the percentage of time walked significantly correlated between individuals (Pearson r=0.263-0.398) independently of temperature, illumination, and arena. Walking speed was highly correlated between individuals (Pearson r=0.81, 0.825) under temperature and illumination changes but uncorrelated in different arena types (Pearson r=0.091). Vector strength was the most correlated attention parameter. The individual correlations ranged from Pearson r=0.533 to -0197. Angular velocity significantly correlated for temperature and illumination (Pearson r=0.246, 0.354) but not in different arenas (Pearson r=0.087). The same is true for anxiety measured through centrophobicity (Pearson r=0.694, 0.740, 0.033). In summary, these data revealed that individuality measured as three traits is mostly unaffected by temperature and illumination but strongly affected by the arena type. Our analysis confirmed that even in situations with a large effect on the mean group behavior (like temperature), individual behavioral stability of idiosyncrasies remained high, while conversely, other environmental situations like the arena type had little impact on the mean but a rather massive effect on individual behavioral stability (Fig. S6). Qualitatively similar results leading to the same conclusions were obtained for both sexes (Fig. S6a, S7a) and two different genotypes (Fig. S6b, S7b)

The influence of temperature, illumination, and arena shape on individuality in walking flies.

A Individuality in walking patterns across different temperatures, illumination, and arena type. Diameter circular arena = 49mm, arm length from center Y-maze = 13.5mm. b changes in the % of time walked for all tested flies depending on environmental conditions. c Changes in the % of time walked grouped by temperature, illumination, and arena. d Correlation of key behavioral parameters across temperature, illumination, and arena type. For detailed fly numbers per experimental condition, see supplemental Fig. S6.

Next, we drastically modified the behavioral situation while keeping the visual stimulus as constant as possible. We, therefore, decided to investigate the influence of a fly’s modality of locomotion (walking versus flying) on individuality. To do this, we designed a new virtual flight arena for tethered flight utilizing the exact same LED panels as were used in the LED Buridan arena (Fig. 5a-c and supplemental S9 for technical details), to maximize the similarity of the visual context. This flight simulator tracked a fly’s heading in real-time in response to dynamic or static panoramic visual stimuli with high resolution (1.4° pixel size). This allowed us to quantitatively compare the visual decisions of both walking and flying flies in response to standard optomotor and Buridan-like stimuli (Fig. 5d-e). We first tested individuality in flying flies over time under the same and a set of modified visual stimuli (Fig. 6, supplemental Fig. S10 and S11). Each fly was tested over two consecutive days under three different visual conditions (dark stripes on a bright background with either 50% or 100% contrast, and an inverted Buridan with bright stripes on a dark background and 100% contrast) (Fig. 6a). Overall, the flies showed some individuality in visual attention across days and contrast. This was also true for the inverted Buridan stimulus, in which the flies oriented themselves toward the dark areas, similar to previous results 70. To allow a quantitative comparison across behavioral traits between walking and flight behavior, we derived an adapted set of parameters for exploration and attention quantification (exploration parameters: # of pauses, Absolute angular velocity; attention parameters: Vector strength, Angular velocity, and Median heading axial, Fig. 6b). The resulting analyses revealed individuality in flying flies (Fig. 6c). Only the inversion of the Buridan stimulus resulted in variable angles towards the black background on different days. However, it is remarkable that on a given day, each fly selected an arbitrary heading that was kept for the entire experimental length (Fig. 6a). Again, the quantitative analysis between males and females did not reveal qualitative differences (Fig. S11).

A virtual flight simulator for studying individuality in flying flies.

a Setup overview (225 x 225 x 600 mm). Flies are glued to a steel pin and placed in a magneto-tether surrounded by an LED matrix for stimulus presentation. b Close-up photo of a tethered flying fly. c Schematic setup overview. Flies are filmed from below through an IR-pass filter against near-infrared back illumination. A connected pump provides air puffs to reinitiate flight if necessary. We provide a mounting port for an optional IR-laser for heat punishment via a dichroic mirror. d A MATLAB script controls stimulus presentation (optomotor or Buridan stimulus) with an angular extent of 360° azimuthally and 100° vertically and provides simultaneous real-time tracking of flight-heading over 360° (e). Before an experiment, each fly’s ability to rotate was tested using a 120°/s CW or CCW stripe rotation (optomotor stimulus), resulting in measured rotational flight movements close to the rotational velocity of the stripe pattern (e, upper left) and uniform distribution of angles (e, lower left). This was followed by each fly flying under the Buridan stimulus for 10min (d, right) and an analysis of heading choices (e, upper right) and their angular distribution (e, lower right).

Individual traits of flying flies persist over time but depend on the visual scenery.

a Angular histograms show the persistence of individual heading choices over consecutive days and across different contrast ratios. b,c Correlation of key behavioral parameters over time (b) and depending on changes in visual contrast (c). For detailed fly numbers per experimental condition, see supplemental Fig. S10.

After confirming that individuality also existed in flying flies, we tested how different locomotion modalities affected a given animal’s behavioral individuality. Behavioral parameters of both walking and flying flies were quantified in response to the same panoramic LED screen displaying an identical two-stripe Buridan stimulus (Fig. 7a, supplemental Fig. S12 and S13).

Visual attention persists across different behavioral states.

a Experimental overview. Flies were untethered after flying within the flight simulator for 10 min (left) and walking for 15 min (right) under the same Buridan stimulus (stripe size=11°). Single fly data (middle) and population data (bottom) reveal stripe fixation behavior when walking and during flight. b Correlation of key behavioral parameters depending on the behavioral state (flight=x-axis, walking=y-axis). For detailed fly numbers per experimental condition, see supplemental Fig. S12.

We expected one of three possible outcomes: 1. There is no stability of individual behavioral traits across flying and walking, 2. Only some behavioral traits are similar across flying and walking. 3. The fly’s individuality remains stable across the same visual cue, independent of the locomotive modality. Subsequent quantitative analysis indeed revealed a significant correlation for angular velocity between flying and walking flies (Fig. 7b), indicating that a fly’s attention is, to some degree, preserved independent of the locomotor modality. In contrast, we found no statistically significant correlations for any of the exploration parameters between flying and walking. Finally, a more detailed analysis revealed mostly comparable results for male and female data (supplemental Fig. S12 and S13).

In summary, the data presented here reveal a hierarchical influence of different parameters within the environmental context on individuality (Fig. 8): First, we conclude that time (at least within the frame of days) has a negligible influence on individual behavioral responses (the basis of the definition of animal individuality in a single situation), since we found stability of individual behavioral traits and parameters over time in both locomotor modalities, walking and flying. Second, temperature had the second weakest impact on individuality (although only tested for walking behavior). This contrasts the dramatically altered population mean responses, a difference that can be explained by scaled individual responses in which individuals keep the rank in the population. Third, the nature of the visual input appears to influence the individual orientation responses but has little impact on the exploration parameters. Finally, we identified the most critical situational environmental features that determine individual responses as both the arena type and the locomotor modality (walking vs. flying). Therefore, we conclude that the individuality of visually guided behaviors persists specifically in some traits across situations, but the environmental context plays a prominent role in defining individual behavioral responses.

A hierarchy of environmental and behavioral contexts based on their influence on individuality.

a Overview summarizing correlation coefficients (p<0.05) for key behavioral parameters depending on behavioral context, time, temperature, and visual input. b Quantification of the influence of behavioral and environmental contexts on the persistence of individuality.

Discussion

Our work presented here focused on the question of whether the combination of stable behavioral parameters ranging across different traits and therefore defining an animal’s individuality are invariable across situations or whether they are re-shaped by different environmental contexts. This question is closely related to the questions in the human ‘person-situation debate‘ 19. Until now, in the neurosciences individuality across situations has been largely ignored since, the commonly used definition of animal individuality only refers to the repeatability of behavior over time in a single environmental situation 1. The contrary is true for mainly field and observation-based sciences such as ethology and behavioral ecology that have since decades acquired observations for 28,29 or against 25,26 behavioral stability across situations, with some of the most convincing work probably found in hermit crabs 21,22, blue tits 23, and geese 24. Our work establishes animal individuality across situations under several tightly controlled laboratory conditions, revealing that animal individuality shares remarkable similarities to what has been described in human personality research. In agreement with Vansteelandt, 2004 our results are in line with the concept of the personality triad, emphasizing the interplay of individual, situation, and behavior (in humans: person, situation, and behavior)71.

Our results confirm that under the same environmental situation and stimulus, animals produce interindividually variable, but extremely stable behavioral responses when being retested 72. Therefore, stable and individually variable behaviors likely result from individual brain properties that persist over long timescales (in this paper days as shown in previous papers months 13), contrasting unstable random behavioral variations like sudden internal state variations. Hence, when presented with the same stimulus in the same situation, each individual responds variably but repetitively so, pointing towards a deterministic and hardwired basis of individual properties 10,13.

The variability of the situational environmental context makes individual animal behavior in the wild much less predictable than that under laboratory conditions 73. In opposition to the vast human literature on the ‘person-situation debate’ 19,31,33,71,74, the importance of environmental context in shaping individual animal behavior remains descriptive 24 and experimentally largely unexplored, with few exceptions 21,22,27,75. Here we closed this gap in knowledge by quantitatively demonstrating how situational environmental and locomotor context changes individual behavior and individuality in animals. Our results demonstrate that situational environmental context has a pronounced effect on individual behavioral responses, be it an alternative stimulus representation, a different arena, or another locomotive modality.

Similar to the human literature 19, the correlation coefficients are lower across situations than in the same situation or environmental context. From this, we can conclude that under more natural conditions with varying contexts, the stability of individual traits will be reduced but remain measurable; therefore, for each situational context, the brain computes the appropriate behavior. This is like the situation-behavior profile of the individual in the personality psychology literature 76,77. Each time the individual is placed in the same situational context, the same behavior will be evoked, in a different context, a modified behavior. But despite these modifications, the individual remains stable. In line with this, a vast literature demonstrates the importance of animal individual differences for ecological communities under natural conditions reviewed in: 20,78.

Our quantitative analysis of the effect of environmental and locomotor context on behavioral stability revealed a hierarchy. As expected from animal and human studies, the time frame of days had little effect on the behavioral outcome 8,10,13,19,32,72,79. The hierarchy revealed by our experiments argues for differences in the relevance of environmental features for the traits we measured, which aligns with Mischel’s strong or weak situations 80. Therefore, it is unsurprising that exploration can be best measured across situations within experiments of walking flies, and attention towards a stimulus can be measured across movement modalities. Our quantitative analysis demonstrates that situational context can be the most significant factor in determining the individual behavioral outcome, even in a per-design visual assay. This argues that individual behavior is determined by the entirety of the situation consisting of both the stimulus and the environmental context. For each situation, each individual manifests its individual behavior.

In the future, it will be important to investigate which individual neurophysiological responses change when tested under exactly the same stimulus, but different situations. A systematic analysis of relevant circuit elements for different behaviors will allow for determining the exact neuronal substrates underlying individual behavioral computations within a fly’s or other animals’ brains. This future research on animal models will provide important new insight into the ‘person-situation debate‘.

On a more practical level, the importance of the situational environmental context for shaping individual behavioral outcomes is also very important when comparing the results of different research groups when using similar behavioral paradigms. In many instances, it is impossible to replicate all components of a specific assay, let alone the conditions of the experimental room. Our results show that such details substantially impact individual behavioral responses and contribute to errors in replicating the results from another lab 81,82. Only meticulous and detailed reporting of as many environmental features as possible will hopefully alleviate some of these problems in the future.

In conclusion, our work confirms that animals including flies have, like humans, individuality across situations. Similar to humans, animal individuality across situations is also marked by lower correlation coefficients than repetitions of a single situation. The individual is stable across situations producing individualistic behavior through an interaction with the situation. This involves a hierarchy of influence of different environmental features on the predictability of behavior across situations.

Acknowledgements

The authors thank the Bloomington stock center and Eugenia Chiappe for fly stocks and reagents. This work was supported by the Deutsche Forschungsgemeinschaft (DFG) through the DFG research unit 5289 RobustCircuit (G.A.L, M.F.W), through grants LI 2640/1-1, FOR5289 LI 2640/2-1 (G.A.L.), WE 5761/2-1 and WE 5761/4-1 (M.F.W.), SPP 2205 (M.F.W.), through AFOSR grant FA9550-19-1-7005 (M.F.W.), and with support from the Fachbereich Biologie, Chemie & Pharmazie of the Freie Universität Berlin, as well as the Division of Neurobiology at Freie Universität Berlin. We thank members of the Linneweber and Wernet labs, Randolf Menzel and Robin Hiesinger for helpful discussions.

Author Contributions

Conceptualization, T.F.M., G.A.L. and M.F.W.; Methodology, T.F.M., G.A.L. and M.F.W.; Investigation, T.F.M., C.K., M.A.H., F.F., T.M.; Resources, M.F.W.; T.F.M., G.A.L. and M.F.W.; Supervision, G.A.L. and M.F.W.; Funding Acquisition, M.F.W. and G.A.L

Declaration of Interests

The authors declare no competing interests.

Supplemental figure legends

Construction of Buridan assays. a Two different types of Buridan assays (fluorescent tubes left, flexible LED matrix right) and the parts necessary for construction. Part numbers are referenced in supplemental table T2 and for 3D printed parts under github.com/LinneweberLab/individuality-assays for replication. Black numbers indicate off-the-shelve parts; blue numbers indicate 3D-printed parts. b construction of Buridan bottom plates. An 850nm LED strip is wrapped around a translucent acrylic disk (11), providing homogeneous near-infrared background illumination from below. c schematic illustration of the tracking procedure. The provided MATLAB script automatically reads video frames, tracks the X- and Y-coordinates of individual flies over time, and saves data for further analysis.

Population responses over time, varying stripe numbers and background illumination. a-c Boxplots illustrating key behavioral parameters for the whole population (blue) and separately for females/males (green/magenta) over time (a), varying stripe numbers (b) and background illumination (c). Animal numbers are indicated next to each plot.

Sex-specific differences in individual traits. a-d Correlation of key behavioral parameters for females and males over time (a), different stripe numbers (b), changes in background illumination (c), and depending on the usage of a clear dome around the arena (d). Magenta=females, green=males. Correlation coefficients are displayed in the upper left corner of each plot. *=p<0.05, **=p<0.01, ***=p<0.001, for detailed fly numbers per experimental condition, see supplemental Fig. S2.

Construction of a high-throughput assay for studying the influence of temperature, illumination, and arena shape on individuality. a Overview of parts necessary for constructing the assay. Part numbers are referenced in supplemental table T2 and for 3D printed parts under github.com/LinneweberLab/individuality-assays for replication. Black numbers indicate off-the-shelve parts; blue numbers indicate 3D-printed parts. b Schematic illustration of the tracking procedure. The provided MATLAB script automatically reads video frames, detects single arenas, tracks the X- and Y-coordinates of individual flies over time, and saves data for further analysis. c Exemplary temperature- and humidity curves were measured within the center arena during heat-up to 25 and 30°C, respectively. Stable plateaus are reached after ∼20min. d The camera was calibrated using the MATLAB calibration toolbox. The provided MATLAB script uses these camera parameters to correct lens distortion artifacts during tracking. e Screenshots of the tracking procedure using the multi-Buridan assay. Arenas are detected automatically, and individual flies get thresholded after background subtraction, resulting in reliable trajectories of each individual fly. f Same as e, but for the Y-maze assay. The box on the right shows an enlarged depiction of a single arena. g Same as e, but for linear assays, demonstrating the usability of the setup with other arena shapes. The box on the right shows an enlarged depiction of a single arena.

Preliminary data of a fly population (TopBanana) illustrating orientational responses. Flies walk between the 2 stripes and show randomly distributed headings in darkness, independent of temperature. a Velocity- (left, transparency added to tracks), transition- (middle), and angular plots (right, angles from moving periods only, non-axial) for vertical stripes positioned at 0° (top), 90° (middle) or in complete darkness (bottom), respectively for all tested flies at 25°C. Scale bar = 10mm. b) Same as a) but at 30°C. Fly numbers are indicated in the velocity plots.

Sex- and genotype-specific population responses over varying temperature, illumination and arena shape in walking flies. a Boxplots illustrating key behavioral parameters for the whole tested CantonS population (left, blue=23°C, red=32°C) and separately for females/males (green/magenta) over varying temperature, illumination and arena shape. Animal numbers are indicated next to each plot. b Same as a, but for all tested TopBanana flies.

Sex- and genotype-specific differences based on the influence of temperature, illumination, and arena shape on the persistence of individual traits in walking flies. a Correlation of key behavioral parameters for females and males depending on temperature, illumination, and arena. Magenta=females, green=males. Correlation coefficients are displayed in the upper left corner of each plot. *=p<0.05, **=p<0.01, ***=p<0.001, for detailed fly numbers per experimental condition, see supplemental Fig. S6. b same as a but sorted by genotype (red=CantonS, blue=TopBanana).

Complete correlation matrix across all behavioral parameters and contexts. Correlation coefficients with p<0.05 are color coded.

Construction of a virtual flight simulator for studying the persistence of individual traits in flying flies. a Overview of parts necessary for constructing the assay. Part numbers are referenced in supplemental table T2 and for 3D printed parts under github.com/LinneweberLab/individuality-assays for replication. Black numbers indicate off-the-shelve parts; blue numbers indicate 3D-printed parts. b schematic illustration of the tracking procedure. The provided MATLAB script works in real-time at ∼90Hz on a 4GHz processor. The code automatically reads camera frames, computes the heading angle over time, and saves data for further analysis. c Illustration of the tracking procedure. The camera frame is thresholded using 2 different Gaussian filter settings to separately threshold the body (yellow) and legs/wings (dark blue). An ellipse is fitted around the thresholded body pixels, and its main axis is used to measure the distribution of body pixels within 4 virtual quadrants whose origin is the centroid of the fly. The head region can be determined because it appears smaller in the camera images than the abdominal region of the fly.

Population responses over time and different visual contrasts in flying flies. Boxplots illustrating key behavioral parameters for the whole population (blue) and separately for females/males (green/magenta) over time and varying stripe contrasts (b). Animal numbers are indicated next to each plot.

Sex-specific differences of individual traits in flying flies persist over time but depend on the visual scenery. a Correlation of key behavioral parameters for females and males over time and dependent on stimulus contrast. Magenta=females, green=males. Correlation coefficients are displayed in the upper left corner of each plot. *=p<0.05, **=p<0.001, ***=p<0.0001, for detailed fly numbers per experimental condition, see supplemental Fig. S10.

Population responses of orientational parameters across different behavioral states. Boxplots illustrating orientational parameters under different behavioral states for the whole test population (blue) and separately for females/males (green/magenta). Animal numbers are indicated next to each plot.

Attention persists across different behavioral states in males but not females. a Correlation of key behavioral parameters for females and males depending on the behavioral state. Magenta=females, green=males. Correlation coefficients are displayed in the upper left corner of each plot. *=p<0.05, **=p<0.001, ***=p<0.0001, for detailed fly numbers per experimental condition, see supplemental Fig. S12.

Description of automatically computed output parameters

Part list for setup replication