Visual attention-related processes in desert locusts' collective-motion related decision making
Data files
Apr 28, 2026 version files 42.30 KB
-
gaze_shift_data.xlsx
15.93 KB
-
README.md
7.36 KB
-
spatial_selective_attention_data.xlsx
19.01 KB
May 21, 2026 version files 71.97 KB
-
figure_5___6_analysis.py
12.46 KB
-
figure_5b_analysis.py
5.06 KB
-
figure_7_analysis.py
4.14 KB
-
figures_3___4_analysis.py
7.24 KB
-
gaze_shift_data.xlsx
15.93 KB
-
README.md
8.14 KB
-
spatial_selective_attention_data.xlsx
19.01 KB
Abstract
Collective motion is generated and sustained by locally interacting individuals in the group, navigating within a crowded and noisy social environment. Although it is widely accepted that collective-motion sensory processing involves focusing on the most behaviorally relevant cues, the underlying cognitive mechanisms remain poorly understood. Here, we tested for the presence of attention-related processes in marching last-instar nymphs of the desert locust. Using carefully controlled visual stimuli presented to individually tethered locusts in a natural walking posture, we integrated the evaluation of body kinematics and gaze direction to investigate two attention-related strategies: spatial selective attention and gaze-shift movements. Our results indicate that locusts are sensitive to specific swarming-related features, independent of their position within the visual field. Moreover, the nymphs exhibited complex behavioral responses to conflicting scenarios, suggesting attention-related selectivity, with distinct gaze-shift patterns that facilitate visual processing. Our findings highlight the complexity of the cognitive mechanisms underlying vision-based, swarming-related decision making in desert locusts, mechanisms that are likely common to other organisms engaged in collective motion.
Dataset DOI: 10.5061/dryad.g79cnp64g
Description of the data and file structure
Dataset supporting the associated article, comprising behavioral data from experiments
Files and variables
File: spatial_selective_attention_data.xlsx
Description:
Data used for the elaboration of figures 3 and 4
Metadata for tab "restricted"
| Column | Entry | Explanatation |
|---|---|---|
| A | Locust | The identity of the locust used in the experiment |
| B | Group | stimulus type identified by group number as in figure 3 |
| C | walking fraction | Number of frames in which the locust walked divided by total frame number (walking frames/total frames) |
| D | average pause duration | average duration of pausing bouts in seconds |
Metadata for tab "conflicting"
| Column | Entry | Explanatation |
|---|---|---|
| A | Locust | The identity of the locust used in the experiment |
| B | group | stimulus type identified by group number as in figure 4 |
| C | walking fraction | Number of frames in which the locust walked divided by total frame number (walking frames/total frames) |
| D | average pause duration | average duration of pausing bouts in seconds |
File: gaze_shift_data.xlsx
Description:
Data used for the elaboration of figures 5 and 6
Metadata for tab "gaze shifts"
| Column | Entry | Explanatation |
|---|---|---|
| A | Locust | The identity of the locust used in the experiment |
| B | Group | stimulus type (aligned , opposite or mixed) |
| C | total | total number of gaze shifts identified during the experiment |
| D | walking | number of gaze shifts identified during walking bouts |
| E | pause | number of gaze shifts identified during pausing bouts |
| F | time from walking initiation | time in frames (25 fps) from closest walking initiation of all pauses |
Data used for the elaboration of figure 7
Metadata for tab "figure 7"
| Column | Entry | Explanatation |
|---|---|---|
| A | Locust | The identity of the locust used in the experiment |
| B | group | stimulus type (aligned , opposite or mixed) |
| C | response classification | behavioral response classification - a - marching aligned with heading b-turning opposite to heading |
| D | walking | number of gaze shifts identified during walking bouts |
| E | pause | number of gaze shifts identified during pausing bouts |
| F | side motion aligned | side motion towards the screen presenting motion aligned with heading (in frames, 25 fps) |
| G | side motion opposite | side motion towards the screen presenting motion opposite to heading (in frames, 25 fps) |
| H | average pause duration | average duration of pausing bouts in seconds. Time values are reported in seconds and were derived from frame counts acquired at 25 frames per second (1 frame = 0.04 s) |
Code/software
All data files are provided in comma-separated values (CSV) format and can be accessed using widely available free software
The figures were produced using the Python matplotlib (v3.10.8) library
Included analysis scripts figures_3___4_analysis.py
Performs the statistical analyses presented in Figures 3 and 4 using the file spatial_selective_attention_data.xlsx. The script analyzes the worksheets 'restricted' (Figure 3) and 'conflicting' (Figure 4). Kruskal-Wallis tests followed by Dunn's post-hoc multiple-comparisons tests with Bonferroni correction are performed on the predefined experimental groups.
figure_5___6_analysis.py
Performs the statistical analyses presented in Figures 5 and 6 using the file gaze_shift_data.xlsx. The script first compares gaze-shift counts between all experimental groups using Kruskal-Wallis and Dunn's post-hoc tests. It then converts walking and pause measurements into derived subgroup labels (e.g., aligned-walking, aligned-pause) and performs additional Kruskal-Wallis and Dunn's post-hoc analyses across these combined groups.
figure_5b_analysis.py
Plots the histogram of gaze-shift timing relative to walking initiation. This script reads the Excel workbook gaze_shift_data.xlsx, selects the worksheet named "gaze shifts", extracts the values stored in the column "time from walking initiation", and plots them as a histogram.
figure_7_analysis.py
Performs the statistical analyses presented in Figure 7 using the file gaze_shift_data.xlsx. Within each response group, Wilcoxon signed-rank tests compare the number of frames during which locust motion was directed toward the screen displaying motion aligned with the nymph's heading versus motion in the opposite direction. Between response groups, Mann-Whitney U tests compare gaze shifts during pauses, gaze shifts during walking, and average pause duration.
Software requirements
The scripts were written in Python 3 and require the following packages: pandas 3.0.2
scipy 1.17.1
scikit-posthocs 0.13.0
openpyxl 3.1.5
Changes after Apr 28, 2026:
Python scripts used for the statistical analyses and plotting were added to the repository.
