Why flying insects gather at artificial light

Explanations of why nocturnal insects fly erratically around fires and lamps have included theories of “lunar navigation” and “escape to the light”. However, without three-dimensional flight data to test them rigorously, the cause for this odd behaviour has remained unsolved. We employed high-resolution motion capture in the laboratory and stereo-videography in the field to reconstruct the 3D kinematics of insect flights around artificial lights. Contrary to the expectation of attraction, insects do not steer directly toward the light. Instead, insects turn their dorsum toward the light, generating flight bouts perpendicular to the source. Under natural sky light, tilting the dorsum towards the brightest visual hemisphere helps maintain proper flight attitude and control. Near artificial sources, however, this highly conserved dorsal-light-response can produce continuous steering around the light and trap an insect. Our guidance model demonstrates that this dorsal tilting is sufficient to create the seemingly erratic flight paths of insects near lights and is the most plausible model for why flying insects gather at artificial lights.


Statistics
For all statistical analyses, confirm that the following items are present in in the figure legend, table legend, main text, or or Methods section.

n/a Confirmed
The exact sample size (n) for each experimental group/condition, given as as a discrete number and unit of of measurement A statement on on whether measurements were taken from distinct samples or or whether the same sample was measured repeatedly The statistical test(s) used AND whether they are one-or or two-sided Only common tests should be described solely by name; describe more complex techniques in the Methods section.

A description of of all covariates tested
A description of of any assumptions or or corrections, such as as tests of of normality and adjustment for multiple comparisons A full description of of the statistical parameters including central tendency (e.g.means) or or other basic estimates (e.g.regression coefficient) AND variation (e.g. standard deviation) or or associated estimates of of uncertainty (e.g.confidence intervals) For null hypothesis testing, the test statistic (e.g.F, t, r) with confidence intervals, effect sizes, degrees of of freedom and P value noted Give P values as exact values whenever suitable.
For Bayesian analysis, information on on the choice of of priors and Markov chain Monte Carlo settings For hierarchical and complex designs, identification of of the appropriate level for tests and full reporting of of outcomes Estimates of of effect sizes (e.g.Cohen's d, Pearson's r), ), indicating how they were calculated Our web collection on statistics for biologists contains articles on many of the points above.

Data analysis
For manuscripts utilizing custom algorithms or or software that are central to to the research but not yet described in in published literature, software must be be made available to to editors and reviewers.We We strongly encourage code deposition in in a community repository (e.g.GitHub).See the Nature Portfolio guidelines for submitting code & software for further information.

Data Policy information about availability of of data
All manuscripts must include a data availability statement This statement should provide the following information, where applicable: -Accession codes, unique identifiers, or or web links for publicly available datasets -A description of of any restrictions on on data availability -For clinical datasets or or third party data, please ensure that the statement adheres to to our policy Data analysis was performed using MATLAB 2021a and python using custom scripts.Example scripts have been provided with the supporting data made available with this article (https://doi.org/10.6084/m9.figshare.24771978).
Example high-speed videos of of our experiments are provided in in Supplementary Videos 1-7.These data include both the video-tracked 3D 3D trajectories and 6-DoF

Field-specific reporting
Please select the one below that is the best fit for your research.If you are not sure, read the appropriate sections before making your selection.

Life sciences Behavioural & social sciences Ecological, evolutionary & environmental sciences
For a reference copy of the document with all sections, see nature.com/documents/nr-reporting-summary-flat.pdf

Ecological, evolutionary & environmental sciences study design
All studies must disclose on these points even when the disclosure is negative.

Research sample
Sampling strategy

Data collection
Timing and spatial scale laboratory motion capture trajectories of insects around light.All processed data used to make figure panels is available in a source data file.The source data file also contains the all the required data to replicate our statistical testing of hypotheses.

Not applicable
Not applicable

Not applicable
Not applicable

Not applicable
Our study recorded the flight behaviour of night-flying insects around artificial lights.We used stereo high-frame-rate stereo videography in the field and infrared motion capture within the laboratory to reconstruct the trajectory and orientation of insects in free flight.We were able to reconstruct 345 trajectories from the field, and 599 trajectories from the lab.Exact treatment and species breakdowns are given within Tables 1 & 3 of the manuscript.
Our experiments were designed to test a large sample of flying insects represented at nocturnal light traps.We also included diurnal species to test for whether measured effects were specific to nocturnal species.Our sample encompassed species with greatly differing body lengths (3mm to 7 cm) and different flight styles.Within the field, we were unable to distinguish the exact insect taxa filmed with certainty.A majority of field trajectories came from night-flying moths (Lepidoptera), we identified the insects to order where possible and provide this metadata with the videos (Supplemental Data 1).For a small fraction of insects, we identified them to the genus or species where possible, by capturing and photographing them prior to their use in experiments (Supplemental Data 1).The identifications were made using photographs of live animals which were eventually released and therefore should be treated as tentative.Within laboratory motion-capture experiments, we used adults of 5 species (Sympetrum striolatum (n = 12), Aeshna mixta (n = 2), Noctua sp.(n = 10), Attacus lorquinii (n = 3), and Daphnis nerii (n = 3).The first two represented day-flying insects not normally represented in light-trapping data.The latter three represented night-flying insects known to collect around artificial light.We also used the European honeybee Apis mellifera (n = 6), wild-caught Drosophila spp.(n = 21), other Diptera (n = 31), and other small insects (See Table 4) for a coarse assessment of reactions to light-source direction in smaller flying insects, since we could not easily attach motion-capture markers onto them.Light switching experiments were conducted with wild insects, largely moths, butterflies and wasps (See Table 5) for a breakdown.
We did not choose a predefined sample size, but tried to equalize the number of samples for each condition.We obtained a minimum 50 recordings per field condition, the upper limit being constrained by the duration of the field trip.Our rationale for deciding against further sampling was the recovery of robust pattern within each experimental treatment.To confirm the identity of the various insect orders flying to light, we caught and identified different orders at a light sheet and after allowing them to dark adapt, released them close to the light in a smaller indoor chamber.Similarly, for our laboratory motion capture experiments, data collection was primarily constrained by number of animals available and the duration of flight bouts they displayed.Finding highly robust trends after analyzing the data between groups, we surmised our sample sizes were sufficient.
Field data was recorded by YS, SF and JT with the assistance of PA using high-speed cameras and infrared lights and different light sources.For most videos, we recorded insects as they appeared in the field of view and we could capture in the camera buffer.For the smaller fraction of the videos to identify orders, we captured insects 2-3 hours before the trial at a UV LED light and were released after they were dark adapted and their trajectories were recorded by the two camera setup.For field data, we include all the data collected and provide them as supplementary videos, however, trajectories were analyzed for videos where the tracking software was able to provide a successful 3D path, cases where there were errors in trajectory reconstruction and digitsation are mentioned in the metadata.Flight data from motion-capture were excluded below 0.4 m/s.We excluded these points to avoid including insects that had landed within the arena and were walking rather than flying.Our motioncapture did not provide video feedback, preventing us from determining this visually.
Many of our findings are readily reproducible without specialist equipment.A large proportion of flying wild-insects are influenced by artificial light, and some of the behavioural motifs we describe are visible to the naked eye, once described.We also examine the videos annotating presence or absence of these motifs and provide summaries of the same.Our findings were highly consistent between different individuals (30 individual insects in motion capture) and different insect taxa (accross 10 different insect orders).Findings observed under laboratory conditions matched observations of wild insects recorded in the field.
As per the nature of this study, we did not allocate research organisms into groups for specific treatments.Within our laboratory environment, we attempted to record each species under all the lighting conditions (though this was not always possible due to constraints created by the timing of emergence).Within the field, we did not control the arrival of insects at light-sources, effectively randomising participant species (we recorded at the same site for multiple nights with all lighting conditions).
Blinding was not possible in this study as the light treatments provided are highly salient to the experimenter.
The conditions over 28th Jan -7th Feb 2022 varied between 16C-23 C at night and humidity between 70-85 %.Wind was much less at CIEE (<0.1 m/s) and temperatures were higher (20-23 C), but at Monteverde, the site was more exposed to the wind (0-1.5m/s) and rain.We had light rain on 30 and 31st Jan 2022 with moderate wind, but minimal rain and lower winds on other days where we conducted field recordings.For 20th to 22nd May 2023 in CIEE, temperature was not variable during the recording time 21-23 C with relative humidity between 71 %and 86 %.For 23-24th May at CIEE, it ranged from 18-20 C and 82-87% relative humidity.The light levels are also provided in the paper.
Field recordings were made at the Estacion Biologica, Monteverde, Costa Rica (10.3190, -84.8085) and CIEE(10.2819,-84.7955),Monteverde, Costa Rica Our recordings were made under permit numbers M-P-SINAC-PNI-ACAT-024-2020 and R-SINAC-ACG-PI-016-2022 issued by SINAC (National System of Conservation Areas).We did not capture or kill insects flying near the lights, nor did we take physical samples.In some cases for the purpose of identification, they were caught photographed and released after the experiments.
Our light treatments created a small amount of localised light pollution for a period of up to 4 hours during recording sessions.The effected area was similar to a single standard light trap used to catch insects.Insects were neither captured nor killed, leaving minimal long-term disturbance to the area in which recordings were made.
This study did not use animals that have been reared in a laboratory for multiple generations.

Samuel
video recordings in in the field were made with FasMotion 2.5.3 (fastec).Motion capture recordings in in the laboratory were made with Qualisys Track Manager 2021 (Qualisys).Light measurements were made with OceanView 2.0 and open-source ELF-software (https:// github.com/sciencedjinn/elf).
We require information from authors about some types of materials, experimental systems and methods used in many studies.Here, indicate whether each material, system or method listed is relevant to your study.If you are not sure if a list item applies to your research, read the appropriate section before selecting a response.
Insects were tagged and flown in the laboratory motion capture arena by SF.Footage of flies, bees and moths in the light switching experiments was collected by SF.Field data was collected from sites in Costa Rica: Estación Biológica Monteverde and CIEE field station from January 28th to February 8th, 2022.A subsequent round of data collection took place from May 20th to 24th, 2023, at these same sites.Laboratory data was collected at Dr. Hua-Ti Lin's laboratory in Imperial College London in 2021 and 2022.Light switching field nature portfolio | reporting summary Policy information about studies involving animals; ARRIVE guidelines recommended for reporting animal research, and Sex and Gender in Research Laboratory animals experiments were conduced in Cambridge, UK in summer 2022 and 2023.