The arena assay experiment was performed in a rectangular perspex arena (40 cm length×30 cm width×10 cm height) with opaque walls and a clear top (Figure S14A ) according to previous study [17] . One of the separated chambers (7.5 cm length×30 cm width×10 cm height) contained 15 fourth-instar gregarious locusts as a stimulus group, and the other chamber was left empty. Before measurement, the locusts were restricted in a Perspex cylinder for 2 min. Then, locusts were released into the arena and monitored for 300 s. EthoVision video tracking system (Netherlands, Noldus Information Technology) was used to automatically record individual behavior. Eleven behavioral variables were acquired: entry frequency in stimulus area (stimulus area was defined as 25% of the arena closest to the stimulus group, 14A in red), latency of first occurrence in stimulus area, total duration in area close to the wall, entry frequency in area close to the wall, entry frequency in the region opposite to stimulus area (opposite of stimulus area was defined as the 25% of the arena at the opposite end to the stimulus group, Figure S14A in blue), latency of first occurrence in the opposite of stimulus area, mean distance to the stimulus group, attraction index (total duration in stimulus area, total duration in the opposite of stimulus area and total duration in middle area were weighted by 1, −1 and 0, respectively. Attraction index = 1×total duration in stimulus area+(−1)×total duration in the opposite of stimulus area+0×total duration in middle area), total distance moved, total duration of movement, and frequency of movement. Based on the data from 86 gregarious and 69 solitarious fourth-instar nymphs, a forward stepwise approach was performed to construct the binary logistic regression model: Pgreg = eη/ (1+eη), where η = β0+β1·X1+β2·X2+…+βk·Xk. Pgreg indicates the probability of a locust being considered as the gregarious. Pgreg = 1 means fully gregarious behavior and Pgreg = 0 means fully solitarious behavior. This model shared similar features with previous logistic model [11] (link), [17] as the retained variables indicated: total distance moved and total duration of movement represent the activity levels, and attraction index represent the attraction or repulsion to the stimulus group.
A Y-tube olfactometer was used to analyze the behavioral responses of individual locust to volatiles (including volatiles from body and feces) from 30 fourth-instar gregarious locusts in the absence of any visual cues (Figure S14B ). Individual locust was recorded as “first choice” for volatile or air (whenever the locust moved more than 5 cm into either arm) or “no choice” (N.C) in 5 min.
A Y-tube olfactometer was used to analyze the behavioral responses of individual locust to volatiles (including volatiles from body and feces) from 30 fourth-instar gregarious locusts in the absence of any visual cues (