Safety in numbers is mediated by motion cues and depends on lobula columnar neurons 1 in Drosophila melanogaster 2 3

Being in a group can increase the chances of survival upon an encounter with a predator. 10 This safety in numbers effect allows animals to decrease their defenses when in groups. 11 Despite its wide prevalence, the mechanisms by which group size regulates defensive 12 behaviors remains largely unknown. Here we show that fruit flies displayed a graded 13 decrease in freezing behavior, triggered by an inescapable threat, with increasing group 14 sizes. Furthermore, flies used the cessation of movement of other flies as a cue of threat and 15 its resumption as a cue of safety. Finally, we found that lobula columnar neurons, LC11, 16 mediate the propensity for freezing flies to resume moving in response to the movement of 17 others. Taken together our results suggest that flies rely on motion cues of others to infer 18 danger, allowing a decrease in defensive behaviors when in groups. By identifying neurons 19 implicated in this process this study sets the stage for the search of the neuronal basis of 20 safety in numbers. 21


Main body 23
Predation is thought to be a key factor driving group formation and social behavior (reviewed 24 in 1). It has long been established that being in a group can constitute an anti-predatory 25 strategy (2, 3), as it affords the use of social cues to detect predators (4, 5), enables 26 coordinated defensive responses (6) or simply dilutes the probability of each individual to be 27 predated(3). A major consequence of the safety in numbers effect, reported in taxa 28 throughout the animal kingdom, is that animals tend to decrease their individual vigilance 29 (reviewed in 4), stress levels or defensive behaviors when in a social setting (8). Despite its 30 wide prevalence the mechanisms that lead to a decrease in defensive behaviors are largely 31 unknown. Hence, in order to gain mechanistic insight into how increasing group size impacts 32 defense behaviors, we decided to use Drosophila melanogaster since it allows the use of 33 groups of varying size, the large number of replicates required for detailed behavioral 34 analysis and genetic access to specific neuronal subtypes. Importantly, fruit flies display 35 social behaviors in different contexts (9-14), namely social regulation of anti-predation 36 strategies, such as the socially transmitted suppression of egg laying in the presence of 37 predatory wasps (10) or the reduction in erratic turns during evasive flights when in a group, 38 compared to when alone, in the presence of dragonflies (14). 39 To simulate a predator's attack, we used a looming stimulus ( Figure 1A), an expanding dark 40 disc, that mimics an object on collision course and elicits defense responses in visual 41 animals, including humans (reviewed in 12-14). Individually tested fruit flies respond to 42 looming stimuli with escapes in the form of jumps (18,19), in flight evasive maneuvers (20) 43 or running as well as with freezing (21, 22) when in an enclosed environment. In our setup, 44 the presentation of 20 looming stimuli ( Figure 1A) elicited reliable freezing responses for flies 45 tested individually and in groups of up to 10 individuals ( Figure 1B-E, Figure S1 shows that 46 running and jumps are less prominent in these arenas). The fraction of flies freezing 47 increased as the stimulation period progressed for flies tested individually and in groups of 48 up to 5 flies; in groups of 6 to 10 individuals, the fraction of flies freezing only transiently 49 increased with each looming stimulus ( Figure 1B). The fraction of flies freezing was maximal 50 for individuals and minimal for groups of 6 to 10, while groups of 2 to 5 flies showed 51 intermediate responses ( Figure 1B). At the level of each individual fly's behavior, flies tested 52 alone spent more time freezing, 76.67%, IQR 39.75-90.42%, during the stimulation period 53 than flies in any of the groups tested ( Figure 1C; statistical comparisons in Table S1). Flies 54 in groups of 2 to 5 spent similar amounts of time freezing (for groups of 2: 31.67%, IQR 9.46-55 64.38% and for groups of 5: 43.08%, IQR 11.79-76.50%), while flies in groups of 6 to 10 56 displayed the lowest levels of freezing (for groups of 6: 8.08%, IQR 3.04-17.46% and for 57 groups of 10: 3.33%, IQR 2-7.67%) ( Figure 1C; statistical comparisons in Table S1). The 58 decrease in time spent freezing for flies tested in groups of 2 to 5, compared to individuals, 59 was not due to a decrease in the probability of entering freezing after a looming stimulus 60 ( Figure 1D; statistical comparisons in Table S2), but rather to an increase in the probability 61 of stopping freezing, i.e. resuming movement, before the following stimulus presentation 62 (individually tested flies: P(Fexit)=0.08, IQR 0-0.21, groups of 2: P(Fexit)=0.31 IQR 0.11-0.78, 63 groups of 5: P(Fexit)=0.54 IQR 0.31-0.90) ( Figure 1E; statistical comparisons in Table S3).

64
Flies in groups of 6 to 10, were not only more likely to stop freezing (groups of 6: 65 P(Fexit)=0.93, IQR 0.80-1, groups of 10: P(Fexit)= 1, IQR 0.83-1) ( Figure 1E; statistical 66 comparisons in Table S3), but also less likely to enter freezing (groups of 6: P(Fentry)=0.35, 67 IQR 0.20-0.46, groups of 10: P(Fentry)= 0.21, IQR 0.10-0.36) ( Figure 1C; statistical 68 comparisons in Table S2) compared to the other conditions. The decrease in persistent 69 freezing with the increase in group size suggests that there is a signal conveyed by the other 70 flies that increases in intensity with the increase in the number of flies tested together. 71 We next examined whether flies respond to each other. We started by exploring the effect on 72 freezing onset, as freezing has been shown to constitute an alarm cue in rodents, such that 73 one rat freezing can lead another to freeze (4). We decided to focus on groups of 5 flies, 74 which showed intermediate freezing levels (Figure 1). The onset of freezing both for 75 individually tested flies and in groups of 5 occurred during and shortly after a looming 76 stimulus ( Figure 2A). This window, of ~1s, in principle allows for social modulation of 77 freezing onset. Indeed, the probability of freezing onset at time t gradually increased with 78 increasing numbers of flies freezing at time t-1 (see methods), indicating that flies increase 79 their propensity to freeze the more flies around them were freezing. This synchronization in 80 freezing could result from flies being influenced by the other flies or simply time locking of 81 freezing to the looming stimulus. To disambiguate between these possibilities we shuffled 82 flies across groups, such that the virtual groups thus formed were composed of flies that 83 where not together when exposed to looming. If the looming stimulus was the sole source of 84 synchrony for freezing onset, then we should see a similar increase in probability of freezing 85 by the focal fly with increasing number of 'surrounding' flies freezing in the shuffled group. 86 We found a weaker modulation of freezing onset by the number of flies freezing in randomly 87 shuffled groups compared to that of the real groups of 5 flies ( Figure 2B; G-test, p<0.0001).

88
We corroborated this result by testing single flies surrounded by 4 fly-sized magnets whose 89 speed and direction of circular movements we could control ( Figure 2C-F). During baseline, 90 the magnets moved at the average walking speed of flies in our arenas, 12 mm/s, with short 91 pauses as the direction of movement changed. Stopping the magnets upon the first looming 92 stimulus and throughout the entire stimulation period led to increased time freezing ( Figure  93 2D) and increased probability of freezing entry upon looming ( Figure 2E), compared to all 94 controls -individuals alone, magnets not moving throughout the entirety of the experiment 95 and the exact same protocol (magnets moving during baseline then freezing) but in the 96 absence of looming stimuli. The transition from motion to freezing is thus important, but not 97 sufficient to drive freezing, since flies surrounded by magnets that do not move for the entire 98 experiment froze to individually-tested levels, but flies exposed to magnets that move and 99 then freeze in the absence of looming stimuli did not freeze. Together these results suggest 100 that flies use freezing by others as an alarm cue, which increases their propensity to freeze 101 to an external threat, the looming stimulus. 102 As the strongest effect observed across all group sizes was on freezing exit, i.e. the 103 resumption of movement, we asked whether the propensity to exit freezing was also 104 dependent on the number of surrounding flies that were freezing. To this end, we performed 105 a similar analysis as for freezing onset and found that the higher the number of flies freezing 106 the lower the probability of the focal fly to exit from freezing. This effect was also decreased 107 in shuffled groups ( Figure 3A; G-test, p<0.0001). We then examined the contribution of 108 mechanosensory signals in the decrease in freezing and found that collisions between flies 109 play a minor role in the observed effect ( Figure S2; statistical comparisons in Tables S4-S6),  110 contrary to what happens with socially-mediated odor avoidance (9). Next, we explored our 111 intuition that motion cues from the other flies were the main players affecting exit from 112 looming-triggered freezing. We formalized the motion signal ( Figure 3B), perceived by a 113 focal fly, as the summed motion cues produced by the other four surrounding flies (we 114 multiplied the speed of each fly by the angle on the retina, a function of the size of the fly and 115 its distance, to the focal fly, Figure 3B). We then analyzed separately the summed motion 116 cue perceived by focal flies during freezing bouts that terminated before the following 117 looming stimulus (freezing with exit) and continuous freezing bouts (with no breaks in 118 between looming stimuli) (representative examples in Figure 3B). Freezing bouts with exit 119 had higher motion cue values ( Figure 3C) compared to continuous bouts (p<0.0001, 120 Freezing without exit=0.64 IQR: 0.00-2.11, Freezing with exit=2.79 IQR: 1.28-5.08). This 121 difference raised the possibility that motion cues produced by others could constitute a 122 safety signal leading flies to resume activity. 123 To test whether motion cues from others constitute a safety signal, we manipulated the 124 motion cues perceived by the focal fly, while maintaining the number of flies in the group 125 constant. An increase in the social motion cues, should enhance the group effect, and hence 126 decrease the freezing responses of a focal fly. We compared groups of 5 wild-type flies with 127 groups of 1 wild-type and 4 blind flies ( Figure 3D). Blind flies don't perceive the looming 128 stimulus and walk for the duration of the experiment; when a focal fly freezes surrounded by 129 4 blind flies it is thus exposed to a higher motion signal during the stimulation period than a 130 focal fly in a group of 5 wild-type flies ( Figure 3D). When surrounded by blind flies, the 131 fraction of focal flies freezing throughout the stimulation period was lower than the fraction of 132 flies freezing in a group of wild-type flies ( Figure 3E). Further, the increase in motion cues in 133 groups with blind flies decreased the amount of time a fly froze compared to that of groups of 134 wild-type flies (6.17% IQR 2.17-15.25% versus 19.58% IQR 8.20-57.12; p<0.0001) ( Figure  135 3F). This reduction in freezing resulted mostly from a decreased probability of freezing entry 136 (wild-type groups: P(Fentry)=2.57 IQR 0.15-0.39, groups with blind flies: P(Fentry)=0.49 IQR 137 0.25-0.61, p<0.0001) ( Figure 3G) and slightly increased probability of exiting freezing (wild-138 type groups: P(Fexit)= 0.83 IQR 0.39-1, groups with blind flies: P(Fexit)= 0.89 IQR 0.71-1) 139 ( Figure 3H). Hence, a focal fly surrounded by 4 blind flies behaves similarly to flies in groups 140 of more than 6 individuals. Importantly, the decrease in persistent freezing was not due to an 141 increased role of collisions on freezing breaks ( Figure S3). We further tested whether any 142 type of visual signal could alter individual freezing in the same manner as the motion cues 143 generated by flies in the group, by presenting a visual stimulus with randomly appearing 144 black dots with the same change of luminance as the looming stimulus but without motion.

145
(as in 19) 4.5 seconds after each looming presentation. This stimulus, which could work as a 146 distractor, did not alter the proportion of time freezing nor the probability of freezing entry or 147 exit ( Figure S4). 148 Having identified motion cues of others as the leading source of the group effect on freezing, 149 we decided to test the role of visual projection neurons responsive to the movement of small 150 objects, lobula columnar 11 (LC11) (23, 24) in our paradigm. The behavioral relevance of 151 these neurons was as yet unidentified. We used two fly lines, an LC11-GAL4 (24) and an 152 LC11-splitGAL4 (23), to drive the expression of Kir 2.1 (25), a potassium channel that 153 hyperpolarizes neurons. Anatomically, both fly lines encompass LC11 neurons ( Figure 4A  154 and B) but LC11-splitGAL4 is more specific as it does not contain the neurons in the 155 subesophageal zone that descend to the thoracico-abdominal ganglion present in the LC11-156 GAL4. Constitutively expressing Kir 2.1 in LC11 neurons did not alter looming-triggered 157 freezing of flies tested individually, when compared to parental controls ( Figure S5). 158 Conversely, for LC11-silenced flies tested in groups of five, the fraction of flies freezing 159 increased throughout the experiment ( Figure 4A and B). Moreover, experimental flies in 160 groups of 5 froze longer (~6 fold increase for LC11-GAL4 >Kir2.1, and ~2 and 7 fold 161 increase for LC11-splitGAL4 >Kir2.1 compared to parental controls) ( Figure 4C), which was 162 not due to an increase in the probability of freezing entry ( Figure 4D), but rather to a 163 decrease in the probability of freezing exit ( Figure 4E)  (a fly at the maximal possible distance, 6.5 cm has an angular size of 2.6º while flies with a 170 4.4º angular size would be at a distance of ~3.4 cm from a focal fly). Interestingly, silencing 171 these neurons did not affect the use of freezing as an alarm cue, since these flies showed an 172 increased probability of freezing the more surrounding flies were freezing ( Figure S6). 173 Finally, expressing Kir2.1 in another LC neuron class, LC20, (23) which are not know to 174 respond to small moving objects, does not alter group behavior ( Figure S7). In summary, 175 silencing LC11 neurons renders flies less sensitive to the motion of others, specifically 176 decreasing its use as a safety cue that down regulates freezing. 177 In summary, flies in groups show a reduction in freezing responses that scales with group 178 size. Detailed behavioral analysis together with behavioral and genetic manipulations, 179 allowed us to identify freezing as a sign of danger and activity as a safety cue. These 180 findings are consistent with the hypothesis that safety in numbers may partially be explained 181 by the use of information provided by the behavior of others. lines; Gil Costa for the illustrations in Figure 1A and Figure 3B (2)) was presented on an Asus monitor running at 144 289 Hz, tilted 45º over the stage ( Figure 1A). For the experiments with random dots, 4.5 s after 290 the looming presentation we presented a visual stimulus consisting of appearing black dots 291 at random locations on the screen to reach the same change in luminance as the looming 292 stimulus (2). 293 The stage contained two arenas, backlit by a custom-built infrared (850 nm) LED array. 294 Videos were obtained using two USB3 cameras (PointGrey Flea3) with an 850 nm long pass 295 filter, one for each arena. 296 For the experiments with the magnets (Figure 2

Data analysis 321
Data were analyzed using custom scripts in spyder (python 3.5). Statistical testing was done 322 in GraphPad Prism 7.03, and non-parametric, Kruskal-Wallis followed by Dunn's multiple 323 comparison test or Mann-Whitney tests were chosen, as data were not normally distributed 324 (Shapiro-Wilk test). Probabilities were compared using the χ2 contingency test in python (G-325 test). 326 Freezing was classified as 500 ms periods with a median pixel change over that time period 327 < 30 pixels within the ROI. The proportion of time spent freezing was quantified as the 328 proportion of 500 ms bins during which the fly was freezing. 329 We calculated the proportion of freezing entries upon looming and exits between looming 330 stimuli (Figure 1) using the following definitions: 1) freezing entries corresponded to events 331 where the fly was not freezing before the looming stimulus (a 1 s time window was used) 332 and was freezing in the first 500 ms bin after the looming stimulus; 2) freezing exits were 333 only considered if sustained, that is when the fly froze upon looming but exited from freezing 334 and was still moving by the time the next looming occurred, i.e. the first 500 ms bin after 335 looming the fly was freezing and in the last 500 ms bin before the next looming the fly was 336 not freezing. 337 To determine the time of freezing onset or offset (Figure 2A,B and Figure 3A), we used a 338 rolling window of pixel change (500 ms bins sliding frame by frame) and the same criterion 339 for a freezing bin as above). Time stamps of freezing onset and offset were used to calculate 340 the probability of entering and exiting freezing as a function of the number of flies freezing. 341 For freezing entries after looming as well as probabilities of entering and exiting freezing, we 342 considered only instances in which the preceding 500 ms bin was either fully non-freezing or 343 freezing. To determine the numbers of others freezing at freezing entry or exit we used a 10 344 frame bin preceding the freezing onset or offset timestamp. 345 Distances between the center of mass of each fly were calculated using the formula 346 �( 2 − 1) 2 + ( 2 − 1) 2 , and we considered a collision had taken place when the flies 347 reached a distance of 25 pixels. Motion signal was determined as ∑ × 348 To analyze the motion signal for freezing bouts with and without exit ( Figure 3B, C), we 350 defined freezing bouts with exit as bouts where flies were freezing in the 500 ms following 351 the looming stimulus offset and resumed moving before the next looming stimulus (up until 352 the last 500 ms before the looming stimulus onset) and freezing bouts without exit as those 353 where freezing persisted until the next looming. presented in Table S1. D) Probability of freezing entry in the 500 ms bin following looming 8 presentation. Statistical comparisons between conditions presented in Table S2. E) 9 Probability of freezing exit in the 500 ms bin before the following looming stimulus. Statistical 10 comparisons between conditions presented in Table S3.     looming presentation. E) Probability of freezing exit in the 500 ms bin before the following 7 looming stimulus. P-values result from Kruskal-Wallis statistical analysis followed by Dunn's 8 multiple comparisons test. 9