Skip to main content
eLife logoLink to eLife
. 2020 Jan 21;9:e51921. doi: 10.7554/eLife.51921

Emergence of social cluster by collective pairwise encounters in Drosophila

Lifen Jiang 1,2, Yaxin Cheng 2,3, Shan Gao 2,3, Yincheng Zhong 2,3, Chengrui Ma 2,3, Tianyu Wang 2,3, Yan Zhu 2,3,4,
Editors: Mani Ramaswami5, K VijayRaghavan6
PMCID: PMC6989122  PMID: 31959283

Abstract

Many animals exhibit an astonishing ability to form groups of large numbers of individuals. The dynamic properties of such groups have been the subject of intensive investigation. The actual grouping processes and underlying neural mechanisms, however, remain elusive. Here, we established a social clustering paradigm in Drosophila to investigate the principles governing social group formation. Fruit flies spontaneously assembled into a stable cluster mimicking a distributed network. Social clustering was exhibited as a highly dynamic process including all individuals, which participated in stochastic pair-wise encounters mediated by appendage touches. Depriving sensory inputs resulted in abnormal encounter responses and a high failure rate of cluster formation. Furthermore, the social distance of the emergent network was regulated by ppk-specific neurons, which were activated by contact-dependent social grouping. Taken together, these findings revealed the development of an orderly social structure from initially unorganised individuals via collective actions.

Research organism: D. melanogaster

Introduction

Throughout the animal kingdom, collective behaviours are commonly observed at every scale, ranging from insect swarming to wildebeest migration (de Bono and Bargmann, 1998; Mogilner et al., 2003; Ben Jacob et al., 2004; Buhl et al., 2006; Bazazi et al., 2008; Deisboeck and Couzin, 2009). Assembling into social groups is a crucial survival strategy for many animals. For example, social groups are required for cooperative foraging (Dombrovski et al., 2017; Dombrovski et al., 2019), coordinating individuals’ actions and enhancing vigilance (Couzin, 2009; Nagy et al., 2010; Moussaïd et al., 2011; Jolles et al., 2017).

Numerous investigations have attempted to quantify the collective behaviours of animal groups, often by extracting high-level features of massive structures emerging from seemingly stochastic actions of individuals (Buhl et al., 2006; Nagy et al., 2010; Kim et al., 2012; Schneider et al., 2012; Ramdya et al., 2015; Jolles et al., 2017; Dombrovski et al., 2017; Jezovit et al., 2017). One shared feature of collective behaviours is the maintenance of a certain distance, or social space, between nearby individuals. For example, individuals within a group of tufted ducks (Conder., 1949), cliff swallows (Hutton, 1978) or sheep (King et al., 2012) maintain particular distances from each other within a group, which are also dynamically modulated by environmental stimuli (Bertrand et al., 2004). However, it remains unclear how individuals act together to form a cohesive social group and how social distance is regulated or maintained.

The transmission and perception of social signals within a group also plays an essential role in collective behaviour, particularly in coordinating group-level actions. In locusts, mechanosensation of abdominal tactile stimuli promotes the coordination of mass migration, while vision is required to detect the approach of others from behind (Buhl et al., 2006; Bazazi et al., 2008). In ants, tactile and chemosensory signals play an important role in cooperative foraging (Billen, 2006). Moreover, when traveling in a hierarchical group, pigeons rely on visual input from the left eye to respond quickly to the manoeuvres of others (Nagy et al., 2010). However, a systematic analysis of major sensory modalities to elucidate the functions underlying the assembly and sustainment of a social group has not yet been undertaken, partially due to a lack of suitable model organisms allowing for the effective manipulation of all members in a group with high precision and reproducibility.

Drosophila melanogaster is often overlooked when it comes to investigating group-level behaviours, despite the observation that fruit flies do indeed aggregate (Guo et al., 2017). In addition to assembling on food and oviposition sites (Lihoreau et al., 2016; Dombrovski et al., 2017), flies also exhibit local congregation without external artificial stimuli (Stalker and Harrison, 1961; Navarro and del Solar, 1975; Simon et al., 2012; Burg et al., 2013). The existing group-based behaviours, together with carefully controlled experimental conditions and powerful genetic tools, make fruit flies a promising neuroethological model for studying the mechanisms of collective behaviours (Ramdya et al., 2015; Ramdya et al., 2017; Dombrovski et al., 2017).

There are two major approaches among investigations of collective behaviours in Drosophila. One approach focuses on measuring the static end result, the last ‘snapshot’, of social aggregation and identifying potential sensory inputs (Stalker and Harrison, 1961; Navarro and del Solar, 1975; Simon et al., 2012; Burg et al., 2013), but does not examine the grouping process and its dynamics. The other approach is engaged in the study of patterns of interactions between individuals in a confined space, using networks of social interactions to understand information transmission (Schneider et al., 2012), but whether or how those described network properties contribute to social aggregation is not immediately clear. Interestingly, a study of the panic reactions of a group of flies to an aversive odour revealed features of collective avoidance (Ramdya et al., 2015). Social aggregation, in which individuals come together to eventually form a group, is distinct in many aspects from panic escape, where members of an existing group scatter. To date, there is no mechanistic framework explaining how dynamic social interactions between individuals (as a process) lead to a stable social aggregation (as a result), particularly in the absence of external stimuli.

In the current study, we established a paradigm for investigating connections between the collective actions of flies en masse and the process of social clustering, in which flies form a network with regularity. Analysis of the interaction dynamics of individual flies revealed that they rely on multiple sensory inputs, while collective local interactions drive the initiation and development of a stable, well-structured social cluster.

Results

Spontaneous formation of social clusters

Although previous work has focused on social spacing (Simon et al., 2012; Burg et al., 2013) and modelling social interaction networks (SINs) (Schneider et al., 2012) in Drosophila, the mechanisms by which social clusters are formed remain unclear. To clarify this question, we developed an improved behavioural paradigm enabling the distribution of flies in a two-dimensional space to be determined using a programmable 8-megapixel digital camera (Figure 1—figure supplement 1A). In our set-up, a group of 50 male or female flies was allowed to walk freely on the surface of an agar pad (1% agar) in a horizontally placed circular arena (diameter: 90 mm) without external stimuli. The agar pad provided a moist environment for prolonged observation, and a soft substrate for flies to walk on, thus constituting a controlled but relatively naturalistic setting associated with minimal stress or disturbance to the flies (Figure 1—figure supplement 1A).

After a short exploration period, a group of wild-type flies (Canton-S, CS) spontaneously aggregated toward a small region of the arena (Figure 1A–C; Figure 1—figure supplement 1B,C; Figure 1—video 1). Each fly was fitted to an ellipse to obtain its geometric parameters including length, width, orientation and centre of mass (Figure 1B,C). In subsequent quantifications, the location of a fly was represented by its centre of mass, and the distance between the centres of two flies was designated the inter-fly distance. To quantify the spatial distribution pattern of these flies, we first determined the accumulative distribution of all surrounding flies of each individual (designated as the reference fly) of one arena by aligning the centres of these individuals to the origin point and superimposing the surrounding flies onto a plane (Figure 1—video 2). The superimposed patterns of all arenas with the same experimental conditions were then merged again (Figure 1D; Figure 1—figure supplement 2A–D). In distribution plots of the number of merged surrounding flies over distances, we found more flies in proximity to the origin than the outside, suggesting a strong tendency for aggression (Figure 1D,E; Figure 1—figure supplement 2A–D).

Figure 1. Spontaneous clustering of wild-type flies exhibits distinct spatial features.

(A) Representative images show the distribution of a group of Canton-S (CS) male flies at the indicated time points. Figure 1—video 1. (B) Enlarged view showing the distribution of six flies in the last image of (A). (C) Representation of flies in (B) by their centres of body mass. (D) Image showing the merged distribution of all surrounding flies in 31 arenas with female CS flies. The origin was the aligned centres of each reference fly. Figure 1—video 2. (E) Quantification of distributions of merged surrounding flies at a distance from the centre. Dark red: CS female; dark blue: CS male; light red: random female (RF); light blue: random male (RM). N = 31, 35, 44 arenas. The insert plot on the left shows an enlarged view of the region near zero. (F) Images showing the enlarged views of the merged distribution of surrounding flies near the origin in wild-type female flies (up) and random female flies (bottom). N = 10 arenas. (G) Distributions of the area-adjusted number of surrounding flies over distance in female (red) and random female flies (grey). The bold lines indicate the average values over all arenas of the same type of fly, with the shaded areas indicate values within one s.e.m (N = 31, 40). (H) Distributions of the density of surrounding flies over distance in female and random female flies. The bold lines indicate the averaged values over all arenas for the same types of fly, with the shaded areas indicate values within one standard deviation (N = 31, 40). (I) Illustration of the measurements of all possible distances from one fly (#40) to others in the arena. Red dots represent individual flies, and numbers indicate their IDs. (J) Matrix of inter-fly distances between all 50 flies in the fly group in (I). The colour bar indicates the distance values. Orange dots marked the positions of shortest distance along each column, resulting in the NND and corresponding nearest neighbour of each fly on the bottom. All flies were females. (K) Circular representation of distance relationship between all 50 flies in (J). The intensities of the blue arcs connecting two flies correspond to the inverse distances between them. (L) Distributions of sorted NNDs of female and random female flies. Bold lines indicate the averaged distribution curve of sorted NNDs over all arenas, with the shaded areas indicate values within one standard deviation. N = 31, 40 arenas. (M) Distribution of the averaged NNDs of all flies in an arena. The flies were female (red), male (blue) and random female flies (grey), in 31, 35 and 40 arenas, respectively. (N) Illustration the first (left) and up to eighth (right) nearest neighbours of the designated reference fly (#27) in a group. Numbers indicate the fly IDs of the identified near neighbours. (O) Distribution of the mean multi-neighbour distances over the number of near neighbours. First the averaged n-near neighbour distance of all flies in an arena was calculated, then the distance values were averaged over all arenas (bold lines). The shaded areas indicate values within one standard deviation. Red indicates female flies and grey indicates random female flies. N = 31 and 40 arenas. (P) Histogram of flies with NNDs in the indicated ranges of distance, with bin 1 = 0–5 mm, bin 2 = 5–10 mm, and bin 3 = 10–15 mm. The types of flies were female (red), male (blue) and random female (grey). N = 31, 35 and 40 arenas, respectively. (Q) Social Space Index was calculated from (P) by subtracting the value of bin2 from that of bin1 in each arena. N = 31, 35, 40 arenas for female (red), male (blue) and random female (grey), respectively. In a box and whisker plot, the scatter points show all data points, the box includes the 25th to 75th percentile, the whiskers mark minimum and maximum, and the middle line indicates the median of the data set. ***: p<0.001 (one-way ANOVA followed with Tukey’s post hoc test for multiple comparisons).

Figure 1—source data 1. Figure 1M, P-Q source data and related summary statistics.

Figure 1.

Figure 1—figure supplement 1. Experimental setup.

Figure 1—figure supplement 1.

(A) Schematic of the setup for the social cluster paradigm. 50 flies in the circular arena were illuminated by a LED array from bottom and their distributions were recorded by a camera or camcorder. Light blue indicates the agarose pad on the bottom of the arena. (B) A representative image showing a cluster of male wild-type flies at 60 min. (C) Representative sequences of images showing distribution patterns of CS female (top) and male (bottom) flies at the indicated time points. At time zero, briefly anaesthetised flies were transferred to the centre regions of the arenas.
Figure 1—figure supplement 2. Merged distribution of surrounding flies.

Figure 1—figure supplement 2.

(A) An example of the distribution of superimposed surrounding flies from one arena with wild-type female flies. The plot was generated by superimposing the all surrounding flies for all flies in that arena, with each fly serving as the reference fly in turn. The origin point (red-cross) is the aligned body centre of the reference flies. The thin circle marks a distance of 90 mm from the origin. (B) A plot combining the superimposed surrounding flies of 10 arenas with wild-type female flies. (C, D) Heat map representations of the merged distributions of surrounding flies of females (C, 31 arenas) and males (D, 35 arenas). The colour bar indicates the number of flies. Data in (C) were replicated from Figure 1D. (E, F) Plots presenting the merged distributions of surrounding flies from a single arena (E) and 10 arenas (F) in random females. (G, H) Heat map representations of the merged distribution of surrounding flies of random females (G, 40 arenas) and random males (H, 41 arenas). (I) Plot showing the distribution of superimposed surrounding flies of a cluster from an arena of wild-type females. (J) Plots showing the merged distributions of surrounding flies of the same clusters from 31 arenas of wild-type females. For each arena, both reference flies and surrounding flies were from the same clusters. (K) A heat map image representation of the merged distribution of surrounding flies within clusters. Data were clustered female flies from 31 arenas. (L) Quantification of the distributions of merged surrounding flies over a distance from the origin in female (dark red), random female (pink), male (dark blue) and random male (light blue) flies. N = 31, 40, 35, 41 arenas, respectively. For (I)-(L), the criterial set for clustering is 5 (see Figure 2 for more).
Figure 1—figure supplement 2—source data 1. Figure 1—figure supplement 2 source data related summary statistics.
Figure 1—figure supplement 3. Quantification of area-adjusted number of surrounding flies and density of surrounding flies.

Figure 1—figure supplement 3.

(A) Schematic for making adjustments to the area when calculating the number of surrounding flies and the density of surrounding flies for a reference fly. The red-cross represents the reference fly, blue dots indicate its surrounding flies, and the green circle indicates the edge of the arena. Thin concentric circles indicate various distances from the reference fly. The bold red circle indicates the distance after which the area-correction was necessary. The red area of the intersection of the green and a thin-lined circle is the actual area (Areain) allowed for the flies to occur, whereas the grey area outside of the intersection of the green and the thin-lined circle (Areaout) would not contain flies, and would therefore need to be compensated. Cumulative distribution function of area-adjusted numbers of surrounding flies vs. a designated distance (from a reference fly)=number of surrounding flies (with that distance)*(Areaout + Areain)/Areain. From the cumulative distribution functions, the probability density functions in (B) and (C) were derived. Density of surrounding flies (within a designated distance from a reference fly)=number of surrounding flies (within that distance)/Areain. (B) Distribution of the area-adjusted number of surrounding flies over distance. Each thin line represents the average over all flies (each serving as the reference fly once) in one arena, the bold lines represent the average over all arenas of a type of flies. Red and grey indicate female and random flies; the number of arenas was 31 and 40, respectively. (C) Averaged distributions of the area-adjusted number of surrounding flies from all arenas of each type of flies, female (red), male (blue) and random female (grey); the number of arenas was 31, 35, and 40, respectively. (D) Distribution of the density of surrounding flies over distance. Each thin line represents the average of all flies (each serving as the reference fly once) in one arena. The bold lines represent the average of all arenas of the designated type of flies: female (red), male (blue) and random female (grey). The number of arenas was 31 and 40 for females and random females, respectively. The horizontal green line near 0.01 indicates the theoretical limit of density when distance reached the diameter of the arena. (E) Averaged distribution of the density of surrounding flies from all arenas, for each type of fly; female (pink), male (blue) and random female (grey); the number of arenas was 31, 35, and 40, respectively. Data in (B–C) were replicated in Figure 1G–H.
Figure 1—figure supplement 3—source data 1. Figure 1—figure supplement 3 source data related summary statistics.
Figure 1—figure supplement 4. Estimating inter-fly connections via distance matrices.

Figure 1—figure supplement 4.

(A) Example plot showing the inter-fly connections from a reference fly (ID: 26) to all other flies in an arena of wild-type females (CS). Red dots represent individual flies, the number near each dot indicates the fly ID, and grey lines represent connections. The grey circle indicates the edge of the arena. (B) A matrix showing distances between all possible pairs from the group in (A). The colour bar indicates the distance values. (C) Circular visualisation of inter-fly connections between all flies in (A). The numbers outside indicate fly IDs. The colour of each arc connecting two flies is correlated to the inverse distance between them; therefore, a darker colour indicates a shorter distance (and a stronger connection). (D) Example plot showing the inter-fly connections from a reference fly (ID: 28) to all other flies in an arena of random female flies. The colours and labels are the same as in (A). (E) Matrix showing distances between all possible pairs from the group in (D). (F) Circular visualisation of inter-fly connections between all flies in (D). The colours and labels are the same as in (C). Data in (A–C) were replicated in Figure 1I–K.
Figure 1—figure supplement 4—source data 1. Figure 1—figure supplement 4 source data.
Figure 1—figure supplement 5. Analysing the distribution of Nearest Neighbour Distance.

Figure 1—figure supplement 5.

(A) Representative plot showing all of the nearest neighbours in an arena of females. The red dots mark all flies, the blue circle represents a reference fly, the green circle indicates its nearest neighbour, the thick red line indicates the shortest among the distances from the reference fly to its surrounding flies (thin red lines). The bold blue lines connect all pairs of nearest neighbours. (B) Arrangement of all NNDs in (A) from small to large. Connecting the top red dots formed a curve reflecting distribution of NNDs within this arena. The two numbers under the vertical blue lines indicate the fly IDs of each pair. (C) The distribution of sorted NNDs in female (red) and random female (grey). Each thin line represents the distribution curve of sorted NNDs from one arena, the bold lines represent the average NNDs of all arenas (N = 31 and 40). (D) Averaged distributions of sorted NNDs in female (red), male (blue) and random female (grey) (N = 31, 35, and 40 respectively). (E) Comparing the averaged minimal NNDs. Data represent the distribution of the minimal NND of each arena in females (red), males (blue) and random females (grey) (N = 31, 35, and 40, respectively). Data in (C) were replicated in Figure 1O. In a box and whisker plot, the scatter points show all data points, the box includes 25th to 75th percentiles, and the middle line indicates the median of the data set. ***: p<0.001 (one-way ANOVA followed by Tukey’s post hoc test for multiple comparisons).
Figure 1—figure supplement 5—source data 1. Figure 1—figure supplement 5A-E source data related summary statistics.
Figure 1—figure supplement 6. Characterisation of averaged distance to multiple near neighbours.

Figure 1—figure supplement 6.

(A–D) Plots of a group of flies from an arena showing examples to calculate the distances from a reference fly (blue dot, ID: 27) up to its 1st (A), 2nd (B), 5th (C) and 8th (D) nearest neighbours, referred as 1-, 2-, 5-, and 8-th near neighbour distances. For this arena, the N-th near neighbour distance was a collection of the averaged values over specific number of near neighbours of each reference flies (the neighbour count, N = 1–8). (E–H) The distributions of multi-neighbour distances in wild-type females. The thin lines represent the individual arenas and the bold lines represent averaged values over all arenas for each neighbour count: 1 (E), 2 (F), 5 (G) and 8 (H). (I–P) Comparing the distributions of averaged multi-neighbour distances in female (red), male (blue) and random females (grey). (Q–S) Comparing distributions of averaged multi-neighbour distances for different neighbour counts. The shades of colours from dark to light correspond to the neighbour count from 1 to 8. The coloured lines indicate female (red, (Q), male (blue, (R) and random female (grey, (S). (T) A plot showing the tendency of averaged multi-neighbour distances as the neighbour counts increased. The coloured lines indicate females (red), males (blue) and random females (grey). In this figure, the number of arenas was N = 31, 35, and 40 for females, males and random females, respectively. The values in (E)-(S) were the numbers of relevant events.
Figure 1—figure supplement 6—source data 1. Figure 1—figure supplement 6 source data related summary statistics.
Figure 1—figure supplement 7. Distribution of distance to the 1st nearest neighbours in wild-type flies and simulated flies.

Figure 1—figure supplement 7.

(A–D) Histograms of the distance to the 1st nearest neighbours (same as NND) in female (A, red), male (B, blue), random females (C, grey) and the average of them (D). (A) and (D) were replicated of Figure 1—figure supplement 6E and I. In (A–C), the thin lines show histograms of all NNDs in each arena, while thick lines show averaged histograms of NNDs over all arenas of each types of fly. The coloured lines in (D) are replicas of the thick lines in (A–C). N = 31, 35, and 40 arenas. (E) Changes of averaged NNDs over the period of 32–120 min in female (red), male (blue), random flies (grey) (N = 21, 22, 24 arenas). Error bars indicate s.e.m.
Figure 1—figure supplement 7—source data 1. Figure 1—figure supplement 7E source data and related summary statistics.
Figure 1—video 1. supplement to Figure 1.
Download video file (3.4MB, mp4)
A representative video showing the process of social clustering in wild-type (CS) female flies. The video covers the first 0–23 min of observation. The recording frame rate was 25 fps, sped up 125×.
Figure 1—video 2. supplement to Figure 1D.
Download video file (6MB, mp4)
A video illustrating how to obtain the superimposed distribution of surrounding flies in order to quantitatively analyse the spatial distribution of an arena (and a genotype).

We next addressed whether such aggregation arose just by chance when individuals walked independently in the arena. We compared the spatial distributions of these social flies with that of ‘random flies’, which were presumed to act independently, with no social interactions between them (see Materials and methods). As shown in Figure 1E and Figure 1—figure supplement 2E-H, random flies exhibited different spatial distributions of merged surrounding flies, with more flies dispersed away from the origin, suggesting a dependency between individuals of wild-type groups to form spatial patterns, which was absent in a random distribution. Closely examining the distributions near the origin revealed that wild-type flies maintained a longer distance from their nearest neighbours than random flies (Figure 1F). Thus, wild-type flies maintained a larger impermissible zone regarding social space.

We then calculated the distribution of surrounding flies using area-adjustment. As shown in Figure 1—figure supplement 3A, because flies were located only inside the circular arena, directly counting the number of surrounding flies may cause biased results, as the measuring distance (from the centre of each reference fly) increased beyond the arena edge. To compensate for under-estimation of the number of surrounding flies, we made an adjustment with the actual area within the arena (the intersecting area between the circle of the arena and the circle with a radius of the measured distance and a centre at the reference fly) (Figure 1—figure supplement 3A). As shown in Figure 1G and Figure 1—figure supplement 3B and C, compared with random flies, the wild-type flies had a greater number of surrounding flies over most of the measured distances. In other words, at a distance from any individual, there were, on average, more surrounding flies in a group of wild-type flies, suggesting a strong social aggregation of wild-type flies. Similarly, we calculated the density of surrounding flies within a distance. In wild-type flies, the density of surrounding flies decreased gradually as the measuring distance increased, whereas the density in random flies was lower and decreased faster (Figure 1H; Figure 1—figure supplement 3D,E).

Besides quantifying the number of surrounding flies, we analysed the distance properties between the neighbouring flies. First, we calculated the distance matrix describing the distances between all possible pairs of flies in the group (Figure 1I,J). The distance matrix enabled us to identify the nearest neighbour of each fly (Figure 1J; Figure 1—figure supplement 4A,B,D,E) and to visualise inter-fly spatial nearness at the group level (Figure 1K; Figure 1—figure supplement 4C,F). Apparently, in wild-type flies, there were more near neighbours with similar short inter-fly distance than in random females (Figure 1K; Figure 1—figure supplement 4C,F), which was further confirmed when analysing the distribution of the nearest neighbour distance (NND) of all flies in an arena (Figure 1L; Figure 1—figure supplement 5). In contrast, the inter-fly distance of random flies began low but quickly exceeded that of wild-type flies when more additional pairs were considered (Figure 1L; Figure 1—figure supplement 5A–E). The average NND over all arenas also indicated that wild-type flies in a group had a smaller social distance on average than random flies (Figure 1M).

We set to quantify the nearness of a fly to its neighbours by measuring the average distance of a fly to its multiple near neighbours (up to 8-th nearest neighbours, including the nearest neighbours, Figure 1N; Figure 1—figure supplement 6). For both wild-type flies and random flies, the averaged multi-neighbour distance increased as more near neighbours were included (Figure 1O; Figure 1—figure supplement 6T), however, multi-neighbour distances in wild-type flies were smaller and increased more slowly than those of random flies (Figure 1O; Figure 1—figure supplement 6T). As the trend was consistent for the numbers of near neighbours from 1 to 8, we used the distance to the 1st nearest neighbour (equivalent to NND) as the basis for further quantifying the fly group (Figure 1—figure supplement 7A–D).

NND has been associated with social space (Mogilner et al., 2003; Simon et al., 2012). Wild-type flies displayed surprisingly consistent population NND for up to 50 min, and exhibited much lower NND than random flies (Figure 1M; Figure 1—figure supplement 5E). Consistent with previous observations (Simon et al., 2012; Navarro and del Solar, 1975), a large proportion of wild-type flies (84 ± 9% for females, 87 ± 7% for males) exhibited a social distance within 5 mm from each other, approximately 1.5–2 body lengths (Figure 1P; Figure 1—figure supplement 7D), while a significantly lower proportion (10%–11%) of wild-type flies lay within 5–10 mm of their nearest neighbour. Conversely, random flies exhibited a lower proportion within 0–5 mm (51 ± 8%) but a higher proportion within 5–10 mm (40 ± 7%) compared with wild-type flies.

We employed the ‘Social Space Index’ (SSI), based on the NND, to quantify distribution en masse, as described previously (Simon et al., 2012). A histogram of NND values for all flies in an arena was built using bins of 5 mm increments (Figure 1P). SSI values were calculated as the percentage of flies in the first bin (NND range: 0–5 mm) minus that in the second bin (NND range: 5–10 mm) (Figure 1P,Q); a larger SSI value indicates a smaller inter-fly distance. Our results revealed that wild-type fly groups exhibited significantly higher SSI values than the random flies (72%–77% vs 10%), in accord with previous studies (Figure 1Q) (Burg et al., 2013; Simon et al., 2012).

Our comparison between the empirical results of wild-type flies with simulations of random flies suggested that self-organised clusters of wild-type flies would not emerge without interactions between individuals.

Social clusters in fruit flies are well-structured networks

To elucidate the local relationships of clustered flies, we designed a six-step procedure to define a cluster and further quantify the local regularity of the resultant cluster (Figure 2A; Figure 2—video 1). Our algorithm used two criteria to build a cluster: area threshold and distance threshold. The algorithm first identified and grouped flies with residing areas smaller than an area threshold into a basic cluster, then repeatedly incorporated nearby flies within a threshold distance (Figure 2A). Due to the inherent uncertainty of determining whether an object belongs to a cluster, we evaluated five criterial sets for clustering (CSC), with stringency from high to low (Figure 2B, see Materials and methods). Higher stringency limited the number of qualified flies, and resulted in smaller clusters or no clusters at all (Figure 2—figure supplement 1).

Figure 2. Social cluster represents a well-structured network.

(A) A six-step procedure to automatically reconstruct a cluster from a group of flies in two dimensional space. Step 1: Using digital image processing methods to extract the pixels of each fly from a raw image and calculating the geometric properties of the pixel set of that fly. Step 2: Dividing the area between all flies and the edge of arena. The divided area surrounding each fly is designated as its residing area. Step 3: Establishing the basic cluster by combining flies whose residing areas are smaller than an area threshold. Each red ellipse indicates a fly incorporated by the cluster; the corresponding pink shaded area indicates its residing area. Step 4: Repeatedly expanding the cluster to include surrounding flies (green) within a threshold distance. The leftover fly was coloured grey. Step 5: In the resultant cluster, identifying the insiders (red) and outsiders (blue). Step 6: Quantifying the local regularity of the cluster. Figure 2—video 1. (B) Showing the area threshold and distance threshold (as a set) to reconstruct clusters in (A). Five criterial settings for clustering (CSC), with stringency from high to low, were defined and evaluated in the following panels. (C) Comparing the percentages of arenas formed a cluster under the CSC from 1 to 5. N = 31, 34, 40 arenas for female, male and random female flies, respectively. (D) Average percentage of clustered flies (CSC = 2). (D) Average percentage of clustered flies (of total flies in an arena) (CSC = 2). (E) Average percentage of insiders of total flies (CSC = 2). (F) Average number of connections from an insider to its contiguous neighbours (CSC = 2). (G) Average distance of an insider to its contiguous neighbours (CSC = 2). N = 31, 34, 40 arenas in (C–E) and N = 31, 34, five arenas in (F–G) for female, male and random female flies, respectively. Data in (D, E) were part of Figure 2—figure supplement 2A and C; Data in (F,G) were part of Figure 2—figure supplement 3F and G. In a box and whisker plot, scatter points show all data points, the box includes 25th to 75th percentile, the whiskers mark minimum and maximum, and the middle line indicates the median of the data set. ***: p<0.001 (one-way ANOVA followed with Tukey’s post hoc test for multiple comparisons).

Figure 2—source data 1. Figure 2D-G source data and related summary statistics.

Figure 2.

Figure 2—figure supplement 1. Patterns of clusters reconstructed with different clustering criteria.

Figure 2—figure supplement 1.

(A–C) Examples of clusters formed by wild-type females (A) and random females (B and C). In a single arena, more flies were assigned into the cluster as the stringency decreased (from left to right). The CSC for building each cluster was indicated at the bottom. Red dots: cluster insiders; blue dots: cluster outsiders; grey dots: flies not associating with a cluster; red lines: connections of insiders. (A) Patterns of changing clusters in wild-type females. (B) Patterns of changing clusters in random females. This arena exhibited cluster formation across all clustering criteria (CSC = 1 ~ 5), among all arenas with random flies. (C) Patterns of changing clusters in random females. This arena exhibited the highest number of flies joining clusters at the relaxed condition (CSC = 5), among all arenas with random flies.
Figure 2—figure supplement 2. Exploring the settings of cluster criteria on cluster reconstruction.

Figure 2—figure supplement 2.

(A) Comparing the CT values (percent of clustered flies in an arena) evaluated with different settings of criteria. Thin lines indicate the CT values of each arena; the thick lines show the averaged CT values of all arenas. Red: female, N = 31 arenas; grey: random females, N = 40 arenas, respectively. (B) Averaged percentage of clustered flies in females (red, N = 31 arenas), males (blue, N = 35 arenas), and random females (N = 40 arenas). Data for females and random females were replicated from (A). (C) Comparison of IT values (the percentage of insiders within an arena) evaluated with different sets of criteria. Thin lines indicate the values of each arena, the thick lines show the average IT values of all arenas. Red: female, N = 31 arenas; grey: random females, N = 40. (D) Averaged percentage of insiders for different types of fly: female (red, N = 31 arenas), male (blue, N = 35 arenas), and random female (grey, N = 40 arenas). Data for females and random females were replicated from (C). (E) Comparison of IC values (the percentage of insiders of the clustered flies in an arena) evaluated with different sets of criteria. Thin lines indicate the values of each arena; the thick lines show the average IT values of all arenas. The number of arenas for CSC from 1 to 5 were: 29, 30, 30, 30 and 30 in female (red), and 1, 5, 22, 31 and 40 in random females (grey), respectively. In random flies, quantification of the first two data points of the averaged IC values was tenuous, because only a few arenas containing identified clusters under high stringency (when CSC was 1 and 2, the number of clusters was 1 and 5, respectively). (F) Averaged percentage of insiders of clustered flies, for different types of flies. The number of arenas in males for CSC from 1 to 5 were: 33, 34, 35, 35 and 35, respectively. Data for females and random females were replicated from (E).
Figure 2—figure supplement 2—source data 1. Figure 2—figure supplement 2 source data and related summary statistics.
Figure 2—figure supplement 3. Characterising the properties of identified clusters.

Figure 2—figure supplement 3.

(A) Illustration of the residing areas of three cluster insiders. Each pink region including an insider was separated automatically with red lines, the area of which was designated as the residing (or inhabited) area of that fly. (B–D) Distributions of the averaged residing areas of insiders in females (B), males (C) and random females (D) evaluated with stringency for cluster reconstruction from high to low. The five shades of each colour from light to dark correspond to CSC from 1 to 5. The numbers of arenas were 29–31 (female) and 33–35 (male). For random females, the numbers of arenas were 1, 5, 22, 31 and 40 for CSC from 1 to 5, respectively. (E) Comparing the distributions of the averaged residing areas of insiders under different criterial settings. The number of arenas for each type of flies were the same as in (C–E). (F) Averaged number of connections of insiders with contiguous neighbours under clustering criterial settings from 2 to 5. The number of arenas were 31 in females (red), 34–35 in males (blue). In random female flies (grey), the number of arenas were 5, 22, 31 and 40 for CSC from 2 to 5, respectively. (G) Averaged distance between insiders with contiguous neighbours under cluster criterial settings from 1 to 5, in females (red), males (blue) and random females (grey) flies. The number of arenas for each type of fly was the same as in (B–D).
Figure 2—figure supplement 3—source data 1. Figure 2—figure supplement 3 source data and related summary statistics.
Figure 2—figure supplement 4. Analysing the variation within distances of the contacting neighbours.

Figure 2—figure supplement 4.

(A) Example arenas showing the peripheral (grey) and inner (purple) flies. The flies were classified based on whether they bordered with the edge of arena. Left: an arena with wild-type females; right: an arena with random females. (B) Histogram of the standard deviations of the distances of contiguous neighbors (DCN) of all inner flies. The number of flies was: 883 (female, red), 1013 (male, blue), 911 (random female, light grey) and 917 (random males, grey). (C) Quantification of the variation of the distance of contiguous neighbors in subpopulations. In each arena, the standard deviations of DCN falling into an indicated range (within percentile of 0 ~ 50 th, 0 ~ 75 th or 25th ~ 75 th) were averaged to generate a data point representing the arena. The number of arenas was: 30 (female, red), 35 (male, blue), 40 (random female, light grey) and 41 (random males, grey).
Figure 2—figure supplement 4—source data 1. Figure 2—figure supplement 4 source data and related summary statistics.
Figure 2—figure supplement 5. Social clustering is independent of arena size.

Figure 2—figure supplement 5.

(A) Representative images showing the distribution of flies in arenas of different diameters. The number of tested flies was 50. (B) SSIs of flies tested in the arenas with the indicated diameter (N = 13–20 arenas). (C) Nearest neighbour distance (of various numbers of wild-type flies in arenas of 90 mm diameter (N = 4–8 arenas). All experimental conditions are indicated with the plots. In a box and whisker plot, scatter points show all data points, the whiskers mark minimum and maximum, and the middle line indicates median of the data set. Error bars in (C) show s.e.m. n.s. (p>0.05) indicates not significant (Student’s t-test for two-group comparisons, one-way ANOVA followed with Tukey’s post hoc test for multiple comparisons).
Figure 2—figure supplement 5—source data 1. Figure 2—figure supplement 5B-C source data and related summary statistics..
Figure 2—figure supplement 6. Comparing spatial patterns of random dots with that of real flies.

Figure 2—figure supplement 6.

(A) Example of spatial distribution of a group of 70 simulated random dots in an arena. The minimal allowed distance (D; i.e., hard-core distance) between random dots was 4 mm. Blue dots represent random dots, light blue circles marked the impermissible regions of random dots. The grey circle indicates the edge of the arena (diameter = 90 mm). For simplification, the random dots were allowed to stay close to the edge of arena, regardless of their hard-core distance. (B) Same as (A) except that the minimal allowed distance between random dots was 8 mm. (C, D) Examples of spatial distribution of 50 random dots with hard-core distances of 5 mm (C) and 10 mm (D). (E) Distributions of NND over the size of a group in an arena. Different colours indicate different minimal allowed distances between random dots. The thin lines indicate individual distributions; the bold lines indicate the averaged value for each group with the same hard-core distance (N = 20 arenas for each hard-core distance). (F) Averaged NNDs over group size for minimal allowed distances ranging from 0 mm to 10 mm (N = 20 arenas for each hard-core distance). (G) Comparison of the averaged NNDs over group size in females (red, N = 4–8 arenas), male (blue, N = 4–8 arenas) and random dots (grey, N = 20 arenas. Average NNDs of random dots were replicated from (E), and the values for the wild-type flies were replicated from Figure 2—figure supplement 5C. Different shades of grey indicate random dots with hard-core diameters of 0, 4, 7, and 10 mm. Error bars show s.e.m.
Figure 2—figure supplement 6—source data 1. Figure 2—figure supplement 6 source data and related summary statistics.
Figure 2—figure supplement 7. A simple model of clustering by the combined effects of global attraction and local repulsion in a two-dimensional space.

Figure 2—figure supplement 7.

(A) Distance functions of attractive and repulsive forces by individual flies. To simplify the comparison, the area under each curve was one for the distance range from −20 to 20 mm. The blue curve is an arbitrarily-selected attraction profile defined by a Gaussian function, Fa = a*EXP(−(distance-µ)^2/ (2*σ^2))/ (σ*sqrt(2*pi)), with µ = 0 mm, σ = 5 mm and a = 1.0001. The light blue curve is another arbitrarily-selected attraction profile (Fa = b/4, when distance ≤2 mm; Fa = b/distance2, when distance >2 mm; b = 0.5263 mm). The red curve is a repulsive force resembling a step function (Fr = 0.1, when distance <5 mm; Fr = 0, when distance ≥5 mm). (B) Illustration of the summation of the attractive and repulsive forces on a fly. The small circles represent three flies establishing a small cluster and the hexagrams represent the testing fly. Left: attractive forces (light blue arrows) and their combined effect (blue arrow) perceived by the testing fly. Middle: repulsive forces (orange red arrows) and their combined effect (red arrow) perceived by the testing fly. Right: the net force (purple arrow) perceived by the testing fly. (C) The distributions of net force within a field of a narrow stripe. The upper panel shows the net forces that are repulsive (red). The lower panel shows the net forces that are attractive (blue). The relative strength and direction of the force vector at each randomly-selected location are represented by an arrow. (D) Computing the net force along a horizontal line (y = 0) in (C) with varying strengths between attractive function, Fa (distance), and repulsive function, Fr (distance). The net force: F = Fa + C*Fr. Left: the force of repulsion (red curves) increases as C factor increases. Right: the net force (green curves) switches from repulsion (<0) to attraction (>0) after a critical distance, when the C factor is sufficiently large (C ≥ 2). A positive value of net force indicates attraction, whereas a negative value indicates repulsion. Blue curve: attractive force. (E) Part of a force field generated by a set of nine flies. At each illustrated location, the direction of force is depicted by an arrow, while the strength of force is colour-coded. Red arrows indicate repulsion while arrows of other colours indicate attraction. Owing to the high dynamic range of the dataset of attractive forces, the colours of attraction arrows represent the percentile ranges in this dataset, instead of the force values. In (BE), all distances between nearby flies in a set are 5 mm. The attraction functions used were the Gaussian function in (A); the other attraction function shown in (A) also produced similar results. In (CE), the small cluster contains a set of nine flies as shown in (E). The C factors are 10 and 2 for (C) and (E), respectively.
Figure 2—figure supplement 8. Social experience, physiological state, age and circadian rhythm modulate social clustering in wild-type flies.

Figure 2—figure supplement 8.

(A) Social isolation adversely affected social clustering. ‘Group’ indicates flies raised together after eclosion; ‘isolation’ indicates newly hatched flies reared alone for 7 days before the behavioural test (N = 10–12). (B) SSI representing the aggregation tendency of CS flies with different ages. The flies were tested 3 days, 10 days and 30 days after eclosion. Older flies exhibited decreased social clustering. (N = 10–12). (C) Starved CS flies exhibited decreased SSIs. Female flies were starved for 12 or 24 hr (N = 8–20). (D) The circadian oscillation of the tendency to form social clusters in male and females (N = 6–15). All experimental conditions are indicated with the plots. In a box and whisker plot, scatter points show all data points, the box includes 25th to 75th percentiles, the whiskers mark minimum and maximum, and the middle line indicates the median of the data set. N indicates the number of arenas. Error bars indicate s.e.m. n.s. indicates non-significance (p>0.05); *: p<0.05, ***: p<0.001 (Student’s t-test).
Figure 2—figure supplement 8—source data 1. Figure 2—figure supplement 8A-D source data and related summary statistics.
Figure 2—figure supplement 9. Grooming did not affect social clustering.

Figure 2—figure supplement 9.

(A) Representative images show body surfaces of untreated (top) and dusted (middle and bottom) flies. (B) Grooming performance of individual female flies during 2 min trials. Top: untreated wild-type flies (control); bottom: dusted wild-type flies. Various colours indicate individual flies, and the lengths of horizontal bars indicate the durations of individual grooming events. (C) Quantification of the duration of grooming events (N = 5). (D) Comparison of Social Space Index of dusted flies with that of untreated flies. SSI was obtained at 60 min of the trial. (N = 10). All experimental conditions are indicated with the plots. In a box and whisker plot, scatter points show all data points, the box includes the 25th to 75th percentiles, the whiskers mark the minimum and maximum, and the middle line indicates median of the data set. Error bars indicate s.e.m. ***: p<0.001 (Student’s t-test).
Figure 2—figure supplement 9—source data 1. Figure 2—figure supplement 9C-D source data and related summary statistics.
Figure 2—video 1. supplement to Figure 2A.
Download video file (1.7MB, mp4)
A video showing steps to reconstruct a cluster out of an image of an arena with flies.

With each set of criteria, clusters in all arenas were automatically identified, and the percentage of arenas with clusters was then calculated for three types of flies: male, female, and random female (Figure 2C). Furthermore, the percentage of the number of clustered flies, out of the total flies in an arena (designated as CT value), was calculated then averaged over all arenas. As shown in Figure 2—figure supplement 2A,B, starting with criterial set #3, random flies began to show substantial cluster contents. Overall, male and female wild-type flies exhibited similar tendencies of increasing cluster size as the criteria became less stringent. The CT values of random flies also increased, but were far smaller than those of wild-type flies (Figure 2—figure supplement 2B). The maximal difference between wild-type flies and random flies occurred when using criterial set #2, by which only a smaller number of random flies were close enough to form clusters (Figure 2D; Figure 2—figure supplement 2B).

Based on their locations in a cluster, flies were further classified into outsiders (the flies constituting the periphery of a cluster) and insiders (those being inside of a cluster) (Figure 2A, Step 5). Plotting the percentage of the number of insiders out of the total flies in an arena (designated IT value), revealed tendencies similar to the CT values in female, male and random female flies (Figure 2E; Figure 2—figure supplement 2C,D). Furthermore, when comparing the composition of clusters in three types of flies, the clusters formed by wild-type flies had more insiders than random flies (Figure 2—figure supplement 2E,F). Therefore, even when random flies formed clusters under relaxed criteria, the organisation of such clusters still differed from that of wild-type flies (Figure 2—figure supplement 1A–C; Figure 2—figure supplement 2E–F), suggesting that the formation of clusters by wild-type flies minimises the perimeter of the cluster, thus displaying higher efficiency in packing the cluster, while still maintaining impermissible distances between the members (Figure 1—figure supplement 5E).

The residing area of individuals, particularly the insiders, was an important parameter describing the local properties of a cluster. We found that as the criteria became relaxed, the residing area increased greatly in random flies, but increased only slightly in female and male flies (Figure 2—figure supplement 3A–E), indicating that different settings of cluster-defining criteria did not significantly influence the cluster properties under consideration.

The social clusters of wild-type flies exhibited unique structural features of a typical distributed network (Baran, 1964), with individual flies as the interlinked nodes (Figure 2A, Step 6). Thus, the flies self-organised into a structure with nearly uniform near-neighbour connections, similar to the lattice arrangement of atoms in a crystal. The number of links of a fly to its contiguous neighbours, a measure of connectivity (Figure 2A, Step 6), was 5.53 ± 0.19 for males and 5.49 ± 0.30 for females when evaluated with criterial set #2 (Figure 2F; Figure 2—figure supplement 3F). Furthermore, the average distance between these contiguous neighbours (the length of links) was 4.70 ± 0.36 for males, 4.65 ± 0.41 for females and 4.27 ± 1.13 for random flies (Figure 2G; Figure 2—figure supplement 3G).

We noticed the near-uniform distributions of the flies in arenas and proceed to quantify the variation in the inter-fly spacing. To simplify the analysis, we considered the variation in the distance of contiguous neighbours (DCN) of inner flies, who did not border the arena edge (Figure 2—figure supplement 4A). The distribution of standard deviations of DCN in wild-type flies displayed a narrower peak and a smaller median (1.66 ~ 1.76 mm) than that in random flies (median: 4.07 mm) (Figure 2—figure supplement 4B). Furthermore, when evaluating an arena with the variation of DCN of only the inner flies with smaller standard deviations, which were likely associated with clustered flies, we found that the wild-type flies also exhibited smaller variations (Figure 2—figure supplement 4C). As a small variation of a dataset is indicative of the homogenous nature of the measured property, the similar distances between contacting neighbours reflected a regular organisation of local near-neighbours across the entire social network of wild-type flies. The regularity of local spacing in the social clusters implied that cluster formation possibly involves cascades of local interactions guided by a set of common principles.

Behaviours of Drosophila in general are reported to be regulated by external (environmental) cues, internal (physiological) states and social experiences (Lihoreau et al., 2016; Ramdya et al., 2015; Kent et al., 2008; Krupp et al., 2008; Battesti et al., 2012; Levine et al., 2002; Guo et al., 2017). As shown in Figures 1 and 2, both male and female wild-type flies exhibited similar abilities to form clusters.

Quantification of cluster formation of 50 flies in circular arenas of different diameters (ranging from 90 mm to 170 mm) demonstrated that cluster formation was independent of the diameter or area of the testing arena, whereas the spatial features of random distribution were severely influenced by the size of arena (Figure 2—figure supplement 5A,B). Additionally, our results revealed that clusters were readily formed only when the number of testing flies was greater than 10 (Figure 2—figure supplement 5C).

We next surveyed the impacts of various factors on social clustering in wild-type flies. To better understand the relationship between the size of arena, the number of flies and social distance, we established groups of ‘random dots’ with random locations, which are set a minimal distance (impermissible distance or hard-core distance, see Materials and methods) away from each other (Figure 2—figure supplement 6A-F) (Baddeley et al., 2015). Average NND decreased as the population increased in random dots (Figure 2—figure supplement 6E,F) and in actual flies (Figure 2—figure supplement 6G). These NND hard-core distance curves also revealed that, in random dots, the NNDs of populations with long hard-core distances were also greater than those of NNDs in populations with short distances (Figure 2—figure supplement 6E,F). Importantly, the NND- hard-core distance curve of wild-type flies exhibited even lower values than that of random dots with 0 minimal distance (Figure 2—figure supplement 6G), suggesting that social clusters of actual flies, even with average minimal contact distances of approximately 2.5 mm (Figure 2—figure supplement 6E), behave in opposition to the Matérn hard-core point process (Baddeley et al., 2015). As a hard-core distance is indicative of local repulsion, tightness of clusters by actual flies suggested a global force of attraction on top of the local repulsion during cluster formation.

To evaluate whether the patterns of social clustering develop solely from interactions of attractive and repulsive cues without considering specific dynamic processes, we established a simplified model in which a fly walks under the combined influence of attraction and repulsion (Figure 2—figure supplement 7), based on three assumptions. First, every fly in the arena generates fields of attraction and repulsion with different distance profiles (Figure 2—figure supplement 7A). Second, the net result of these forces on a single fly can be calculated based on vectorial addition (Figure 2—figure supplement 7B). Third, a set of flies already establish a small cluster, which is relatively stable and not affected by an approaching fly (Figure 2—figure supplement 7B,C). Using Monte Carlo simulation, we found that a fly is strongly repelled by the fly set at close distances, but when the distance increases beyond a certain limit, the net force changes into attraction (Figure 2—figure supplement 7C). Even when the relative strength between repulsion and attraction (defined as the C factor) is adjusted over a broad range, such the abrupt switch from repulsion to attraction remains unchanged (Figure 2—figure supplement 7D). Importantly, the net force decreases quickly to a very low level as distance increases, but remains attractive. As a result, a fly walking in a force field generated by a set of relatively stable flies, - consistently exhibits a tendency to move toward the set, if it is far away, but eventually stops approaching when it reaches the interface of zero net force at a critical distance to the set (Figure 2—figure supplement 7E). The opposite forces on each side of the interface squeeze the fly to a defined distance from the set, and apparently to become a new member of the set. Therefore, the antagonistic interaction between broad yet weak attractions and local but strong repulsions leads to a regular spacing between the clustered flies.

Furthermore, the SSI (Social Space Index) values of socially isolated flies (Xie et al., 2018; Simon et al., 2012), hungry flies and aged flies were lower than those of corresponding controls, suggesting a positive influence of social experience, and negative impacts of hunger and aging on clustering (Figure 2—figure supplement 8A–C). Notably, social clustering in females exhibited strong oscillations closely related to circadian rhythm (Figure 2—figure supplement 8D).

To evaluate the influence of self-grooming, we artificially increased grooming events by dusting flies with fine particles (Seeds et al., 2014) (Figure 2—figure supplement 9A–C). Compared with untreated controls, dusted flies exhibited increased grooming events, but no significant changes in SSI values (Figure 2—figure supplement 9D).

Overall, we demonstrated that fruit flies self-organised collectively into an orderly cluster with the topology of a distributed network. The robustness and unique features of such social clustering prompted us to further investigate the dynamic processes and mechanisms underlying cluster formation.

Collective dyadic interactions contribute to the clustering process

To better understand the dynamic process of social clustering, we recorded the arena with a camcorder from above and analysed the performance of groups of flies from video sequences. Massive sporadic movements of flies resulted in location changes for every individual by the end of the process. Individual flies walked for various distances, sometimes exploring the arena for a long time before occupying a final position in the cluster. During the period, flies involved numerous interactions with other flies.

It took wild-type flies approximately 4 min (3.6 ± 0.3 min for female flies and 3.8 ± 0.2 min for male flies), 8–10 min (9.9 ± 0.8 min for female flies and 7.6 ± 0.2 min for male flies) and 22 min (22.2 ± 0.6 min for female flies and 21.9 ± 1.2 min for male flies) to reach cluster sizes of 10, 25 and 45 flies, respectively (Figure 3A). As the clusters grew quickly from 5 to 20 min, we subdivided this period into three 5 min phases (Stage 1, Stage 2 and Stage 3; Figure 3A).

Figure 3. Dyadic encounter events are the main form of interactions during cluster formation in wild-type flies.

(A) Rapid increase of the cluster size (number of flies) through incorporating more flies during clustering (N = 7 arenas). (B) Total encounter events during the period between 5 and 20 min (N = 5 arenas). (C) The number of encounter events in three stages of cluster growth (N = 5 arenas). (D) Schematic of an encounter event to show the appendage touch-points on the Interactee. Eight touch-points were defined: F (Frontal), L1-L3 and R1-R3 (Legs), R (rear or wings). (E) The proportion of body points touched by an ‘Interactor’ in male flies. Flies are shown in white at the centre and the proportion of each touch point is presented by the length of colour-coded bar. N = 5 arenas, and the number of encounter events = 203, 180, 140 for stages 1, 2 and 3. (F, G) Percentage of behavioural responses of the ‘Interactee’ after touching by the ‘Interactor’, in males (F) and females (G). The ‘Interactee’ used wings (Wing) or legs (Leg) to repel the ‘Interactor’ after being touched. N = 5 arenas, number of events = 471 (male) and 199 (female). (H) Three images from a video sequence showing behaviours by the ‘Interactor’ and ‘Interactee’ during an encounter event. The red dashed line indicates the locomotion trajectory of ‘Interactor’. Figure 3—video 1. (I, J) Behaviour outputs after social encounters in the ‘Interactor’ and ‘Interactee’ in females (I) and males (J). Left panel: percentage of behavioural responses in the three stages; Right panel: percentage of net movement of encountered pairs (all three stages combined, quantified from the left panel). Stay: stay at the original location after encountering. Move: move away after encountering. N = 5 arenas, number of events = 1046 (male) and 474 (female).

Figure 3—source data 1. Figure 3A–C, E–G, and I–J source data and related summary statistics.

Figure 3.

Figure 3—figure supplement 1. Quantification of touched sites and behavioural outputs of encounters in wild-type female flies.

Figure 3—figure supplement 1.

(A) Timed-event data showing quantification of the details of encounter responses of fly pairs in three stages of cluster development in one arena. Each row indicates a specific type of actions or events, the corresponding labels were as follows: Frontal, L1-3, R1-3 and Rear (appendage touch-points on ‘Interactee’), ‘B_Leg’ and ‘B_Wing’ (touch-evoked responses of ‘Interactee’), ‘A_Move’ or ‘A_Stay’ (‘Interactor’ moving away or staying at the encounter site after encountering), ‘B_Move’ or ‘B_Stay’ (‘Interactee’ moving away or remaining unmoved after encountering). (B) The distribution of touch points on the ‘Interactee’. The flies are shown in white at the centre. The proportion of the number of touches at each touch point is represented by the length of a colour-coded bar (N = 5 arenas).
Figure 3—figure supplement 1—source data 1. Figure 3—figure supplement 1B source data.
Figure 3—figure supplement 2. An image sequences of an encounter event in males.

Figure 3—figure supplement 2.

A sequence of frames from a high-speed video showing direct interactions (appendage touches) between a moving fly and a stationary fly. The moving fly is labelled with a green circle on its centre of body mass, and the trace of the centre of mass during the displayed period is plotted as pink dots in the last frame. The grey crosses mark the same location across all frames.
Figure 3—video 1. supplement to Figure 3.
Download video file (5MB, mp4)
A high-speed video showing an encounter event between two male flies and the exchange of appendage touches. The recording frame rate was 500 fps. The time zero was set arbitrarily.

Inter-fly interactions occurred exclusively between two flies, and the timing of these dyadic interactions appeared to be stochastic. We used two criteria to define an encounter event for a pair of flies: a) the distance between them was within 1.5 body length, and b) the approaching fly was facing and walking toward the other fly (i.e., the other fly was within its frontal 180° view). As shown in Figure 3B, numerous encountering events occurred during cluster formation with the overall number of encountering events in males (509 per group) being twice that in females (237 per group). Further, by surveying all dyadic interaction events, we calculated the frequency of inter-fly encounters at each phase across the entire arena. Interaction events were more frequent at first (100 ± 5 for females and 203 ± 9 for males in Stage 1) and then decreased over each consecutive 5 min (Figure 3C). These observations indicated that inter-fly interactions might contribute to the nucleation, growth and maturation of the social cluster.

Asymmetric interactions and stereotypic consequences of pair-wise social encounters

Closer inspection revealed that, in wild-type flies, inter-fly encounters were mainly asymmetric, occurring by one walking fly actively approaching a stationary fly, similar to findings reported by Schneider et al. (2012). The proportions of such asymmetric interactions among all encounter events in Stages 1–3 were 99%, 100%, and 100% in female groups, and 99%, 98%, and 98% in male groups, respectively. Adequate behavioural responses were elicited by the active fly through gentle touches of peripheral appendages when approaching the stationary fly (Figure 3—video 1).

To characterise the dyadic interactions for an encounter event, we defined the actively approaching fly as the ‘interactor’ and the stationary fly as the ‘interactee’ in our behavioural observation (Figure 3D). The encounters mostly (probability of 94%) led to active physical contact via legs and wings of both flies. The appendage-touch points were classified into eight types of actions from the point of view of the ‘interactee’, namely, frontal touch (F), rear touch (Rear or Wing) and leg touches (Legs: L1–L3 and R1–R3) (Figure 3D). With an interactive behavioural labelling program, we obtained details of encounter events, including appendage-touch points and responses of the pair of flies after encountering, as in the example data from wild-type females shown in Figure 3—figure supplement 1A and Figure 3—video 1. The approaching flies preferred to use their forelegs. Furthermore, in male encounters, the frequencies of rear-touches on the ‘interactee’ were higher than that on other sites (Figure 3E), and the ‘interactee’ responded more frequently with wings (61%, percentage of all responses over three stages) than with legs (39%) (Figure 3F). In females, however, the ‘interactor’ was more likely to approach the ‘interactee’ from the side and behind (Figure 3—figure supplement 1B), and responses of the ‘interactee’ relied mainly on legs (99%) and rarely on wings (1%) (Figure 3G), revealing that female and male flies adopt different strategies for social encounters. These results suggest that sexually dimorphic neural mechanisms mediate social aggregation behaviour in flies.

We next examined the consequences of encounters in pairs of flies, focusing on changes of locomotion of the pair, which collectively contribute to the group dynamics. After encountering, one or both flies would subsequently move away, but also become stationary (‘interactor’) or remain stationary (‘interactee’) (Figure 3H; Figure 3—figure supplement 2; Figure 3—video 1). As shown in Figure 3I and J, female and male flies exhibited different tendencies for movement after encountering. In females, the ‘interactor’ tended to ‘move-away’ (‘A Move’, with alteration of walking trajectory) after encountering (Figure 3I). However, over time, in the growing and maturation phases, the proportions of ‘interactors’ that moved-away and stayed (‘A Move’ and ‘A Stay’) became similar (Figure 3I). For the female ‘interactee’, the tendencies to ‘move-away’ or ‘stay’ after encountering were approximately equal, with a slight increase of stay response over time (Figure 3I). In contrast, in male flies, a large proportion of ‘interactors’ preferred to ‘move-away’ rather than becoming stationary, while a higher proportion of ‘interactees’ remained stationary rather than walking away (Figure 3J). We observed an intriguing common pattern among males and females, by which, after a social encounter, the stationary fly tended to remain standing, whereas the incoming fly tended to move again and further ‘probe’ multiple stationary flies before settling down (Figure 3I,J). The scale and scope of social encounters and stereotypic ‘stay-or-move’ responses suggested that social encounters not only generated the group-level dynamics prerequisite for cluster formation, but also actively drove cluster development.

Clustering grows by social encountering at the border

To understand how seemingly spontaneous pairwise interactions result in a structured social network, we examined the contribution of encounter responses to cluster development. We focused on encounter events occurring at the periphery of a cluster. When a moving fly reached the cluster, it was likely (97% in male, 77% in female) to interact with flies composing the border, who were stationary. These ‘moving’ and ‘stationary’ flies were classified into three categories according to their final decisions after an encounter: stay in place, move out of the cluster, and move into the cluster (Figure 4A; Figure 4—video 1). For both males and females, most encounters by a pair of ‘moving’ and ‘stationary’ flies resulted in either moving in or staying at the border of the cluster, thereby increasing the number of flies in the cluster (Figure 4B–H; Figure 4—figure supplement 1A–G).

Figure 4. Dyadic interactions drive clusters to grow.

(A) A schematic showing possible events occurring near the border of a cluster. Letter ‘A’ and ‘B’ are designated as the walking fly and the stationary fly (standing at the border of a cluster), respectively. ‘Move out’: move away to leave the cluster. ‘Move in’: move to join the cluster. ‘Stay’: stay near the cluster edge. ‘Directly move in’: the walking fly joins the cluster without first interacting with any flies. (B) Percentage of different encounter outputs of male walking flies after encounters at the cluster edge at the indicated stages. (N = 4 arenas, total number of encounter events = 92). (C) Total behavioural outputs of male walking flies after encountering at the cluster edge. Data were from (B). (D) Percentage of encounter responses of male stationary flies at the cluster edge after encountering (N = 4 arenas, total number of encounter events = 92). (E) Total behavioural outputs of male stationary flies at the cluster edge after encountering. Data were from (D). (F, G) The combined percentage of joining or leaving the cluster of walking flies (F) and stationary flies (G) after encountering at the cluster edge. Data sets came from (C) and (E), respectively. ‘in’ includes ‘move in’ + ‘stay’ + ‘directly move in’, ‘out’ is ‘move out’. (H) Total percentage of behavioural output of the pairs after encountering, indicating the combined contributions by walking and stationary flies to cluster growth. Data were from (F) and (G). Values shown in (F–H) are mean ± s.e.m.

Figure 4—source data 1. Figure 4B, D, F, and G–H source data and related summary statistics.

Figure 4.

Figure 4—figure supplement 1. Quantifying behavioural outputs of female encountering at the cluster edge.

Figure 4—figure supplement 1.

(A) Percentage of different behavioural outputs of female moving flies after encounters at the cluster edge. The outputs of the previously moving flies are: ‘Move out’ (moving away to leave the cluster), ‘Move in’ (moving in to join the cluster), ‘Stay’ (staying at the encountering site near the cluster edge), ‘Directly move in’ (walking into the cluster without first interacting with any flies at the edge). Number of encounter events = 56, number of arenas = 4. (B) Total behavioural outputs of female moving flies after encountering at the cluster edge, combining all three stages in (B). (C) Percentage of behavioural outputs of female stationary flies after encountering at the cluster edge. Number of encounter events = 56, number of arenas = 4. (D) Total behavioural outputs of female stationary flies after encountering at the cluster edge, combining all three stages in (C). (E, F) Combined percentage of joining or leaving the cluster after encountering at the cluster edge in female ‘Moving’ flies (E) and ‘stationary’ flies (F). Data sets came from (B) and (D). ‘in’ includes ‘move in’ + ‘stay’ + ‘directly move in’;‘out’ indicates ‘move out’. (H) Total percentage of behavioural output of the pairs after encountering. The values indicated the combined contributions of both moving and stationary flies to cluster growth. Data sets came from (E) and (F). Values shown in (A–G) were mean ± s.e.m.
Figure 4—figure supplement 1—source data 1. Figure 4—figure supplement 1A-G source data.
Figure 4—figure supplement 2. Characterising distributions of encounter events in typical regions of arena during clustering of wild-type female flies.

Figure 4—figure supplement 2.

(A) A Schematic showing encounters occurring in three typical regions in an arena. (B) Proportions of encounter events at three typical regions during clustering stages (left) and their corresponding proportions of all observed encounter events (right) in wild-type female flies (number of arenas = 6).
Figure 4—figure supplement 2—source data 1. Figure 4—figure supplement 2B source data.
Figure 4—video 1. supplement to Figure 4.
Download video file (3.3MB, mp4)
A video with close-up views of pairwise interactions at the cluster edge and inside a cluster. The recording frame rate was 25 fps, sped up 2×.

Specifically, as shown in Figure 4B–C, the ‘moving’ males were inclined to ‘Move-in’ (76%) to join the cluster after an encounter, while a small proportion (3%) of ‘moving’ males directly walked into a cluster without any prior interactions with others at the border. Only 10% of ‘moving’ male flies that chose to walk away after encounters at the cluster edge (Figure 4B,C). The ‘moving’ female flies displayed a similar tendency to join the cluster, with only 3% of moving females leaving the cluster (Figure 4—figure supplement 1A,B). The ‘stationary’ flies, which stayed at the cluster edge before encounters, showed a high rate (89% in males and 67% in females) of remaining within the cluster after an encounter (Figure 4D,E; Figure 4—figure supplement 1C,D).

The combined high rate of joining the cluster (‘Move in’ + ‘Stay’ + ‘Directly move in’) and low rate of leaving the cluster (‘Move out’) by both ‘moving’ and ‘stationary’ flies effectively contributed to cluster expansion in both males and females (Figure 4F–H; Figure 4—figure supplement 1E–G). Over 5 to 20 min (stage 1–3), almost every event at the cluster edge accounted for an increase in cluster size (Figure 4H; Figure 4—figure supplement 1G).

The final positions of the flies joining the cluster were also dynamically determined. From video sequences, we observed that a new fly usually walked inside the cluster, disturbing other flies along the way (Figure 4—video 1), before it finally stopped. As the number of members of a cluster increased, the number of inter-fly interactions inside the cluster also increased (Figure 4—figure supplement 2). These redistribution activities might lead to fine adjustment of the cluster toward its final structure, but did not affect cluster growth.

Taken together, our results suggest that numerous encounter events occurring at the cluster edge directly drive the steady growth of a social cluster, despite the highly dynamic and sporadic nature of these events.

Multiple sensory modalities are required for cluster formation

To disentangle how sensory modalities mediate social aggregation, we quantified social clustering after selectively disrupting each sense, including vision, olfaction, gustation, audition and mechanosensation. Previous studies suggested that visual input is essential for mediating aggregation in both larvae (Dombrovski et al., 2017; Dombrovski et al., 2019) and adult flies (Simon et al., 2012; Burg et al., 2013), suggesting that vision might be necessary in our paradigm. When depriving wild-type flies of visual inputs by testing under infrared light, SSI values markedly decreased, compared with those of control flies tested under regular white light (Figure 5A). Furthermore, flies with visual deficiency, norpA33 (Pak et al., 1970) failed to form clusters, instead dispersing throughout the arena and exhibiting large social space, suggesting that the absence of visual cues impaired social aggregation (Figure 5A).

Figure 5. Sensory deficits impede formation of social clusters.

(A) The levels of SSI in flies without vision: wild-type flies under dark (illuminated by arrays of infrared LED (850 nm) and the norpA33 mutants (N = 10–25). (B) The levels of SSI of anosmic flies: wild-type flies without antennae and maxillary palps and the Orco-/- mutants (N = 8–20). (C) The levels of SSI in mutants with defective gustatory sensation (PoxnΔm22) (N = 9–26). (D) The levels of SSI in auditory/proprioceptive mutants (inactive1 and nanchung36a) and nociceptive touch mutants (ppkESB and PiezoKO) (N = 10–25). (E) Sequential images showing the spatial distribution of wild-type flies (top) and PiezoKO mutants (bottom) at 0, 1 and 5 min after the occurrence of a small cluster in each arena. Red arrows point to the sites of small clusters. (F) Representative data from an arena with the wild-type flies of indicating the onset and duration of transient clusters (blue) and mini-clusters (red). Transient clusters would be dissolved within 1 min, while a mini-cluster would last over 1 min, and served as the potential core to develop into a mature cluster. (G) Example data showing the events of transient clusters (blue) and mini-clusters (red) emergent in female CS, PiezoKO and norpA33 groups during the first 20 min of observation. Four arenas for each genotype. (H) Latency of emergence of the first transient cluster in the flies of different genotypes during 20 min (N = 6–8 arenas). (I) Number of transient clusters in flies of different genotypes during 20 min (N = 6–8 arenas). (J) Average durations of transient clusters in different genotypes during 20 min (N = 6–8 arenas). (K) Comparison of Nucleus Stability Index in flies with indicated genotypes. NSI describes the change in the size of the nascent cluster within 1 min. All genotypes and experimental conditions are indicated with the plots. In a box and whiskers plot, scatter points show all data points, the whiskers mark minimum and maximum, and the middle line indicates the median of the data set. n.s. indicates not significant (p>0.05); ***: p<0.001, **: p<0.01 (Student’s t-test within each genotype for two-group comparisons, one-way ANOVA with Dunnett’s test for multiple comparisons to control [CS]). In a bar graph plot, error bars in (H–K) indicate s.e.m.

Figure 5—source data 1. Figure 5A–D, H-K source data and related summary statistics.

Figure 5.

Figure 5—figure supplement 1. Evaluating social clustering with blockage of specific sensory inputs.

Figure 5—figure supplement 1.

(A) SSI of female flies with defective gustatory sensation or loss of contact pheromone perception (N = 4–15). (B) SSI of wild-type female and male flies with bilateral arista surgically removed (N = 7–16). All genotypes and experimental conditions are indicated with the plots. In a box and whisker plot, scatter points show all data points, the box includes 25th to 75th percentiles, the whiskers mark the minimum and maximum, and the middle line indicates the median of the data set. Error bars indicate s.e.m. n.s. indicates not significant. * indicates p<0.05; ***: p<0.001 (Student’s t-test for two-group comparisons, one-way ANOVA followed with Dunnett’s test post hoc test for multiple comparisons).
Figure 5—figure supplement 1—source data 1. Figure 5—figure supplement 1A-B source data and related summary statistics.

To test whether the olfactory pathway mediates social interaction during network formation, we analysed flies with impaired olfaction by mutating Orco, a gene that encodes an olfactory coreceptor in Drosophila (Larsson et al., 2004). The SIN analysis revealed that male Orco mutants moved slowly and exhibited a reduced ability to form SINs, but SINs that were formed had a higher proportion of reciprocated interactions and a longer average network distance between individuals (Schneider et al., 2012). On the other hand, the olfactory deficit in Orco males did not affect social space (Simon et al., 2012). Interestingly, while female Orco mutant flies exhibited lower SSI values, impaired olfaction in male Orco mutants had no effect on social clustering (Figure 5B). Furthermore, the impaired behaviour in Orco-/- females was rescued by re-expressing the Orco gene in the olfactory system (Figure 5B). To further study the involvement of olfactory inputs in social clustering, we performed surgical experiments to eliminate olfactory inputs, removing antennae and maxillary palps housing olfactory receptors (Vosshall and Stocker, 2007). As shown in Figure 5B, without antennae and maxillary palps, female flies, but not male flies, displayed dramatically decreased SSI, confirming the phenotypes in female Orco mutants. This result suggests the possibility that the olfactory modality plays a sexually dimorphic role in social clustering behaviour.

To assess whether the gustatory system is required for social interactions, we studied flies with mutations in the Poxn gene (Dambly-Chaudière et al., 1992). This mutation transforms sensilla that are typically destined for chemical detection into mechanosensory sensilla (Awasaki and Kimura, 1997; Nottebohm et al., 1994). Mutations in Poxn reduced the ability to form SINs, while the structural features of the SINs formed were similar to those without social interactions (Schneider et al., 2012). We found that Poxn mutant flies showed significantly impaired social cluster formation (Figure 5C). Although Poxn mutants exhibited strong deficits in forming networks of social interactions (Schneider et al., 2012) and failed to form clusters, we speculated that the drastic slow-walking of Poxn mutants would not lead to sufficient social encounter events for effective clustering. Therefore, instead of pursuing Poxn mutants further, we tested flies with disruptions of specific gustatory sensations, including chemical sensory related mutants Gr33a1 (bitter) (Moon et al., 2009), Gr64f -/- (sweet) (Jiao et al., 2008), Ir76b1 (salt and fatty acid) (Ahn et al., 2017; Zhang et al., 2013a) and contact pheromone related mutants ΔGr32a1 (Miyamoto and Amrein, 2008) and ΔPPK23 (Lu et al., 2012; Toda et al., 2012). All these mutant flies failed to form social clusters (Figure 5—figure supplement 1A). Taken together, these data suggest that multiple chemical cues are required for social clustering.

To investigate the contribution of mechanosensory inputs to social aggregation behaviour, we tested several mutants, including inactive, nanchung (Gong et al., 2004) (Li et al., 2016), ppk (Adams et al., 1998; Zhong et al., 2010; Olds and Xu, 2014) and Piezo (Kim et al., 2012) which participate in mechanosensation in Drosophila. As shown in Figure 5D, the flies with defective mechanosensation had a dramatically decreased level of cluster formation, compared with controls. It was suggested that inactive and nanchung functioned both for audition (in Johnston’s organ) and for mechanosensation (in other chordotonal organs over the body) (Gong et al., 2004; Karak et al., 2015). Surgical removal of a pair of aristae to block auditory detection by Johnston’s organ did not impair SSI (Figure 5—figure supplement 1B), excluding the mechanosensory contribution by Johnston’s organ to social clustering.

Together, our surveys of basic sensory modalities suggested that social clustering depends on intact perception of multiple sensory cues, as disruption of any basic sensory input results in impaired cluster formation. The surprisingly high demand on precise perception of sensory cues was in accord with our observations that collective social behaviour was mediated by complicated interactions between highly mobile individuals within a constantly changing social environment.

Abnormal encounter dynamic, rather than locomotion deficits, precluded cluster formation

To investigate why sensory disrupted flies failed to form social clusters, we examined the period of cluster initiation. We identified the occurrence of small clusters (aggregations of at least five flies in close proximity, within 1.5 body lengths), which would develop into social clusters by incorporating additional members. Small clusters arose in the group of mutant flies similar to wild-type flies, but were quickly disrupted, within minutes; for example the PiezoKO flies in Figure 5E. Accordingly, we classified small clusters into two types: transient clusters (stable for at least 5 s, but no more than 1 min) and mini-clusters (stable for over 1 min, which is the potential core of the cluster growth). In the wild-type population, while transient clusters occurred earlier and more frequently, a mini-cluster occurred once and lasted for the entire observation period (Figure 5F). Interestingly, in the population of PiezoKO and norpA33, transient clusters appeared much later than wild-type, and a stable mini-cluster never emerged in mutant flies despite multiple occurrences of transient clusters (Figure 5G). It took substantially longer for occurrence of transient clusters in other mutants as well (Figure 5H). The success in forming social clusters by wild-type flies did not depend on the frequency of transient clusters (Figure 5I). However, compared with wild-type flies, these mutants showed shorter durations of transient clusters, suggesting an inability to maintain a budding cluster (Figure 5J). We introduced the Nucleus Stability Index (NSI) to quantify changes in the size of nascent small clusters within 1 min. While nascent mini-clusters (nuclei) in wild-type flies were stable and grew steadily, small clusters in mutant flies shrank quickly and collapsed when flies dispersed (Figure 5K). These results demonstrated that sensory deficits affect the ability to develop or maintain a sizeable cluster.

To better understand the mechanisms underlying the ways in which sensory inputs mediate social clustering, we performed detailed analyses of encounter responses over the course of clustering in mutants including norpA, Orco, inactive, nanchung, and Piezo. Interestingly, comparing with wild-type flies, all of the mutant flies displayed a high frequency of social encounter events (Figure 6A) and a short duration of social interaction (Figure 6B), suggesting that the high encounter frequency in mutant populations did not lead to effective social clustering. Further quantification of behavioural responses after dyadic encounters revealed that mutant ‘interactors’ exhibited a similar tendency to ‘move away’ after encounters compared with wild-type flies (Figure 6C). Conversely, mutant ‘interactees’ exhibited a significantly reduced tendency to ‘stay’ (Figure 6C). Considering the net results for encounters in mutants, the difference between the likelihood for both flies to stay and for both to move away, it was more frequent for both flies to ‘move’ than for both to ‘stay’ (Figure 6D). Therefore, the mutant pairs dispersed more effectively away from the encounter site.

Figure 6. Mutant flies exhibit abnormal encounter dynamics.

(A) Quantification of the number of encounter events during the indicated time periods in female flies of different genotypes (N = 4 arenas, n = 1090–10,205 encounters). (B) Average duration of encounters in different genotypes (60–120 encounters). The duration of an encounter is the time length from the beginning of physical contacts of two flies to the end of their last contact. (C) Percentage of behavioural outputs after encounter of the Interactor (A, red) and Interactee (B, pink), ‘A move’ and ‘B move’ indicate flies showing changes in locations after encounter, while ‘A stay’ and ‘B stay’ indicate flies that stayed at the encountering location (N = 3–5 arenas, n = 60–100 encounters). (D) Net behavioural output of the encounter events in (C). If only one fly moved away (either ‘A stay and B move’ or ‘A move and B stay’) would not change the number of flies at the encounter site since before the encounter, one fly (‘A’) walked into the site. Thus, we compared the likelihood of both A and B staying with that of both A and B moving away. The bar graph shows the difference in the percentages of these two types of outputs for each genotype (N = 3–5 arenas, n = 60–100 encounters). (E) The transient velocities of Interactors of different genotypes during the course of encounter. (N = 3 arenas, n = 30–60 encounters). (F) The average velocities of Interactors before and after encounter (N = 3 arenas, n = 30–60 encounters). (G, H) The transient velocities (G) and average velocities (H) of Interactees before and after encounter (N = 3 arenas, n = 30–60 encounters). All genotypes and experimental conditions are indicated with the plots. Error bars in (A–B) indicate s.e.m.

Figure 6—source data 1. Figure 6A–C, E-H source data and related summary statistics.

Figure 6.

Figure 6—figure supplement 1. Mutants failed to form social clusters, but were capable of locomotion manoeuvers.

Figure 6—figure supplement 1.

(A–C) Spontaneous locomotion activity and exploration of the flies with indicated genotypes. The speed data were obtained from short walking bouts (10 s) of individual flies 5 min after they were introduced to a dish). The duration of each step is 0.04 s. For each genotype, the number of flies were 30–60 (from 3 to 6 arenas). (A) The distribution of the walking speeds of pooled walking events of indicated genotypes. The numbers of sampled events were 7438–14,871. (B) Comparison of the average walking speed of individual flies of the indicated genotype. (C) Comparison of the maximal walking speed of individual flies of different genotypes. (D–G) Quantifying changes of speed in flies of different genotypes over a walking bout. The speed of a fly was calculated at different times, and the change of speed was then divided by the step time, 0.04 s, to obtain an acceleration/deceleration event of that fly. (D) Comparison of the distribution of pooled acceleration and deceleration events of indicated genotypes. The number of sampled events were 7406–14,790. (E) Enlarged view of (D) showing deceleration events (left half) and acceleration (right half) events. (F) Comparison of the averaged acceleration and averaged deceleration of individual flies. Data shown were mean ± s.e.m. (N = 30–60 flies). (G) Comparison of the maximal acceleration and maximal deceleration of individual flies. Data shown were mean ± s.e.m. (N = 30–60 flies). ns. indicates not significant (p>0.05); ***: p<0.001; **: p<0.01 (one-way ANOVA with Dunnett’s test for multiple comparisons to control [CS]).
Figure 6—figure supplement 1—source data 1. Figure 6—figure supplement 1B-C, F-G source data and related summary statistics.

To understand the encountering process in more detail, we analysed the transient velocities of flies before and after encounter events (+ /- 0.8 s). ‘Interactors’ exhibited decreased velocity before impact (Figure 6E–F) while ‘interactees’ exhibited increased velocities after encounters (Figure 6G–H). Compared with wild-type flies, mutant flies generally exhibited higher transient speeds either before or after encounters (Figure 6E–H).

To confirm that these mutant flies are capable of walking faster than wild-type flies, we observed the spontaneous walking and exploration of individual flies in a dish (diameter: 90 mm). As shown in Figure 6—figure supplement 1A–C, large proportions of mutant flies exhibited normal or faster spontaneous locomotive speeds (walking with higher average and maximum speeds). This strongly suggested that the inability to achieve formation of social clusters in these mutants was not due to locomotion deficits. In addition, the overall profiles of change of speed (acceleration and deceleration) in mutants were similar to or higher than the wild-type flies (Figure 6—figure supplement 1D–E). Importantly, compared with wild-type flies, the rapid change of locomotion speed (reflected through average- and maximum- acceleration [and deceleration]) in these mutants strongly suggested that sensory disruptions did not affect their locomotion controls when walking on a horizontal surface (Figure 6—figure supplement 1F–G).

Therefore, abnormal social interactions stemmed from defective inter-fly communications, rather than locomotion per se, contributing to unsuccessful formation, maintenance or growth of social clusters. The increased population dynamics, including high locomotion speed, frequent encounters, short interaction duration, and effective dispersion after encounter, in mutants likely indicated their elevated but failed attempts to compensate for the loss of social cues mediating cluster formation.

ppk-specific neurons participate in establishing normal social space

Stereotypic responses from dyadic interactions helped to build up the social cluster, these local interaction events highlighted the importance of physical contact in contributing to the clustering process, possibly by transducing mechanical and chemical signals. To further examine the neuronal basis of social clustering, we used neurogenetic approaches to modulate activities in target neurons while analysing behaviour change. The ubiquity of appendage-touch in eliciting encounter response prompted us to screen neurons potentially occurring in appendage organs using specific GAL4s, including all olfactory receptor-GAL4s, gustatory receptor-GAL4s, GAL4s labelling ion channels participating in mechanosensation in Drosophila including ppk (Adams et al., 1998; Zhong et al., 2010; Olds and Xu, 2014), inactive, nanchung (Gong et al., 2004; Karak et al., 2015; Li et al., 2016), nompC (Walker et al., 2000; Yan et al., 2013) and Piezo (Kim et al., 2012), and GAL4s targeted to the systems of neurotransmitters, neuropeptides, mechanosensation and those based on the expression patterns of a GAL4 driver line resource (Jenett et al., 2012; Ramdya et al., 2015; Tuthill and Wilson, 2016; Mamiya et al., 2018).

We utilised the GAL4/UAS binary system to express an optogenetic activator, CsChrimson (Klapoetke et al., 2014), to forcibly activate selected neurons during social clustering. Interestingly, among the approximately 500 lines screened, ppk >CsChrimson flies exhibited extensive aggregation with significantly decreased social space in male and female flies (Figure 7A,B,D; Figure 7—figure supplement 1A,B). Optogenetic activation of the mechanosensory neurons in iav >CsChrimson, nompC > CsChrimson or Piezo > CsChrimson flies reduced SSIs, while nan >CsChrimson flies behaved normally as wild-type controls (Figure 7—figure supplement 1A,B).

Figure 7. ppk-specific neurons are important for social cluster and social space.

(A–C) Representative images showing the spatial distributions of flies of genetic control (A), flies with optogenetically-activated ppk neurons (B), and flies with silenced ppk neurons (C). Bottom: the enlarged views of regions in corresponding arenas on the top, marked by red squares. (D) SSIs of flies with optogenetic activation of ppk neurons (red) and genetic controls (grey). (N = 16 arenas). (E) SSIs of flies with silenced ppk neurons (blue) and genetic controls (grey) (N = 16 arenas). (F) Comparing the cluster sizes (number of flies in a cluster) of female flies over the course of clustering (N = 8 arenas). (G) Comparing the locomotion speed in flies with optogenetically activated ppk neurons (red) and genetic controls (grey) (N = 3 arenas, n = 30 flies). (H–K) Expression pattern of ppk-GAL4 in the peripheral. Green channel shows GFP signals from ppk-GAL4 >UAS-mCD8-GFP and magenta channels show autofluorescence from the cuticle. Body parts shown are: foreleg (H, scale bar: 50 μm), wing (I, scale bar: 100 μm), tip of the tarsus (J, scale bar: 10 μm), and portions of a wing (K1: pre-wing margin, K2: vein in wing, K3: post-wing margin, scale bars in K2-3: 30 μm). All genotypes and experimental conditions are indicated with the plots. In a box and whisker plot, scatter points show all data points, the box includes the 25th to 75th percentiles, the whiskers show the minimum and maximum, and the middle line indicates the median of the data set. n.s. indicates not significant (p>0.05); **p<0.01, ***: p<0.001 (Student’s t-test). Error bars in (F) indicate s.e.m.

Figure 7—source data 1. Figure 7D–G source data and related summary statistics.

Figure 7.

Figure 7—figure supplement 1. Quantification of social clustering after activating or silencing neurons related to mechanosensory function.

Figure 7—figure supplement 1.

(A–D) Comparison of SSIs of flies with subpopulations of mechanosensory-related neurons being activated (A-B, A: females, B: males) or blocked (C-D, C: females; D: males). Different GAL4s labelled neurons involved in auditory/proprioceptive sensation (iav-GAL4 and nan-GAL4), nociceptive touch (ppk-GAL4 and Piezo-GAL4) and gentle touch (nompC-GAL4). Cha-GAL80 was used with Piezo-GAL4 to restrict Piezo neurons to legs. (N = 10–25). All genotypes are indicated with the plots. In a box and whisker plot, scatter points show all data points. The box includes 25th to 75th percentile, the whiskers mark minimum and maximum and the middle line indicates median of the data set. n.s. indicates not significant (p>0.05); * indicates p<0.05; ** indicates p<0.01; *** indicates p<0.001 (Student’s t-test).
Figure 7—figure supplement 1—source data 1. Figure 7—figure supplement 1A-D source data and related summary statistics.
Figure 7—figure supplement 2. Expression patterns of mechanosensory GAL4s in the wings and legs.

Figure 7—figure supplement 2.

GFP fluorescence signals from various Gal4s driven UAS-mCD8-GFP were superimposed on an image acquired by transmitted light. The four images of each row show the wing margin and three segments of the foreleg of flies with corresponding genotypes. Red stars indicate the GFP-positive neurons. The scale bar is 50 μm.

Moreover, to block the functions of mechanosensory neurons, we expressed tetanus toxin light chain (TNT) (Sweeney et al., 1995) in different candidate neurons. All flies with the corresponding neurons being silenced failed to form social clusters (Figure 7C,E; Figure 7—figure supplement 1C,D), suggesting that the activities of these neurons, including ppk-GAL4-labelled neurons, are required for cluster formation. Notably, video sequences of cluster development revealed that activating ppk-labelled neurons resulted in early formation of clusters, indicating that the emergence of social clusters was faster in ppk >CsChrimson flies than in wild-type flies (Figure 7F). However, the locomotion activity of ppk >CsChrimson flies was comparable to that of genetic controls (Figure 7G), suggesting that faster clustering is unlikely to be due to faster walking.

The reporter protein green fluorescent protein (GFP) revealed that ppk-specific GAL4 labelled various populations in the peripheral nervous system, including legs and wing margins (Figure 7H–K), whereas iav-GAL4, nan-GAL4, nompC-GAL4 and Piezo-GAL4 labelled limited numbers of neurons scattered in the appendages (Figure 7—figure supplement 2). These diverse expression patterns suggest potentially complementary roles of these mechanosensory neurons in social encounters via appendage-touches to mediate social communication.

Together, our results indicated that ppk-specific neurons play a unique role in regulating cluster formation and social distance.

Social grouping elevates activity in tarsal ppk neurons

Two findings, that appendage-touch played an important role in social encounters and that ppk was broadly expressed in the appendage organs, led us to investigate ppk neurons in appendages in more detail. We utilised an activity reporter system, calcium-dependent nuclear import of LexA (CaLexA) (Masuyama et al., 2012), to assess whether the activity of ppk neurons correlates with inter-fly physical interactions. Female flies were reared under isolated or social conditions, and the activities of ppk neurons were subsequently quantified. As shown in Figure 8A–C, flies raised in a group exhibited significantly increased activities in a small group of ppk neurons in the tip of the tarsus, compared with those raised alone. In contrast, there were no differences in CaLexA signals in neurons on the wing margin under single- or group-raised conditions (Figure 8—figure supplement 1A–D). Notably, grouping previously singly-raised flies together for 30 hr evoked substantial activity in ppk neurons in the tarsus (Figure 8B,C), suggesting that frequent inter-fly interactions involving appendage-touches while living in a group might increase the activity of ppk neurons in the tarsus.

Figure 8. Contact-dependent activation of ppk-labelled neurons by social grouping.

(A) A schematic showing the imaging area (tip of tarsus) for (B) and (D). (B) Representative images showing CaLexA signals in ppk neurons of female flies with different social experience. Single: individual flies were raised in isolation for 16 days after eclosion; Group: flies were raised in a group for 16 days after eclosion; Re-grouped: 10 singly-raised flies were combined together and maintained for 30 hr. Cyan: autofluorescence from the cuticle, Red: maximal intensity of CaLexA signals. Dashed lines trace the tip of tarsus as ROIs for calculating GFP signals. Scale bar, 10 μm. (C) Comparing the average intensity of CaLexA signals in ppk neurons from flies treated with indicated conditions shown in (B) (N = 8 arenas). (D) Schematics of different treatments (top) and the corresponding representative images (bottom) of the tip of the tarsus of ppk-GAl4 >CaLexA flies. Single: flies raised in single isolation for 16 days after eclosion; Netted single: single fly raised in a netted tube (diameter: 12 mm, covered by double-layered net on the top end) alone for 16 d; Netted in a group: single fly raised in a netted tube which was surrounded 50 flies (inaccessible) for 16 d; Re-grouped: 10 singly-raised flies were combined and maintained for 24 hr. Cyan: autofluorescence from the cuticle, Red: maximal intensity of CaLexA signals. Dashed lines trace the tip of the tarsus (as a ROI for computing the GFP signals). Scale bar, 10 μm. (E) Comparing the average intensity of CaLexA signals in ppk neurons from flies treated with indicated conditions shown in (D) (N = 8 arenas). All genotypes and experimental conditions are indicated with the plots. In a box and whisker plot, scatter points show all data points, whiskers mark minimum and maximum, and the middle line indicates median of the data set. n.s. indicates not significant (p>0.05); **: p<0.01, ***: p<0.001 (Student’s t-test within each genotype for two-group comparisons, one-way ANOVA with Tukey’s post hoc test for multiple comparisons).

Figure 8—source data 1. Figure 8C, E source data and related summary statistics.

Figure 8.

Figure 8—figure supplement 1. The activity of ppk-labelled neurons of wing margins under different treatments.

Figure 8—figure supplement 1.

(A) Schematic showing the imaging areas of wing margins. The red boxes indicate the pre-wing and post-wing areas evaluated in (B–D). (B) Comparison of the CaLexA signal intensities in ppk-positive neurons of singly-raised or group-raised female flies. Single: flies were raised in isolation for 16 days; Group: flies were raised in a group of 50 flies for 16 days. (N = 8). (C, D) Representative images of wing margins in female ppk-GAL4 >CaLexA flies, raised either in isolation (C) or in a group (D). Top: magenta channel shows autofluorescence signals from cuticles, and green channel shows the maximal intensity of CaLexA signal in wing margins. White brackets indicate the areas of quantification for (B). Bottom: images of corresponding regions with the GFP channel superimposed on the channel with transmitted light. Scale bar, 10 μm. All genotypes and experimental conditions are indicated with the plots. For bar graphs, mean ± s.e.m. is shown. n.s. indicates not significant, Student’s t-test.
Figure 8—figure supplement 1—source data 1. Figure 8—figure supplemnet 1B source data and related summary statistics.

To discern the possible effects of contact pheromones, volatile chemicals and physical touch under grouped conditions, we raised a fly in a group but deprived it of direct contact with others. As shown in Figure 8D, each ‘netted in a group’ fly was grown in a small case and separated from the other flies via a double-layered net on top of the cage, while, as a control, ‘netted single’ flies were not in the presence of other flies outside the net. The net allowed odours, sounds and certain visual information to pass through, but blocked contact-dependent cues. Surprisingly, both ‘netted single’ and ‘netted in a group’ flies showed similar CaLexA signals in the tarsal ppk neurons as singly-raised flies (Figure 8D,E), while re-grouping the ‘netted single’ flies for 24 hr was sufficient to induce an increase in CaLexA signals (Figure 8D,E).

Together, these data suggested that the ppk-labelled neurons in the tarsus responded to physical touch, specifically from other flies. The elevated activities of tarsal ppk neurons from social contact highlighted their function in dyadic encounters to mediate appendage touches, which are important for social clustering.

Discussion

In this study, we established a simple collective behaviour paradigm using Drosophila as a model system to investigate how loosely distributed individuals come together to form a stable and orderly social cluster. Thus, we linked a dynamic progress (collective physical interactions) with its outcome (a structured cluster). We demonstrated that a group of individuals self-organised into a social cluster with topological features of a distributed network. This process relied on multiple sensory modalities as well as internal state and previous social experience. Moreover, the order emerged dynamically from stereotypical responses of numerous asymmetric encounters between pairs of individuals, while, abnormal encounter responses exhibited by mutant flies resulted in a failure of social clustering. These dyadic interactions, particularly near the border of a cluster, contributed to cluster growth, eventually incorporating all individuals. Physical contact in a group induced dramatic increases in the activity of tarsus ppk neurons, the activation of which caused flies to group quickly and form more compact clusters, demonstrating the important roles of ppk neurons in mediating dyadic interactions to promote clustering.

Many species exhibit massive collective behaviour, such as starling flocks (Nagy et al., 2010), schools of blue jack mackerel (Bertrand et al., 2004), stickleback shoals (Jolles et al., 2017), swarms of desert locusts (Buhl et al., 2006), and swarms of C. elegans (de Bono and Bargmann, 1998; de Bono, 2003). While Drosophila are commonly considered ‘solitary’ (Guo et al., 2017), increasing evidence suggests that Drosophila form social groups (Stalker and Harrison, 1961; Navarro and del Solar, 1975; Simon et al., 2012; Schneider et al., 2012; Burg et al., 2013; Ramdya et al., 2017; Guo et al., 2017). The lack of strikingly visible collective behaviour like that exhibited by birds and fish is made up for by the unique advantages of Drosophila for experimentally investigating the neural mechanisms underlying collective actions, including simple brain structure, tractable behaviour and a smaller genome. Additionally, in our paradigm, flies interacted collectively in a defined two-dimensional space, whereas many collective behaviours, including those of starlings and locusts, occur in an open three-dimensional space; thereby, our system reduced the difficulties of modelling. Furthermore, in a laboratory setting, we took into account the location and locomotion of all flies from the beginning, when individuals were still dispersed, to the end of the process, when all individuals joined to form a social cluster. Moreover, working with fruit flies allowed us to control many influential factors, including temperature, time of day, diet, physiological status of the animals (such as genetic background, age, and gender) and previous social experience. It is extremely difficult to control these factors in wild animals, despite the importance of such controls for social behaviour analysis. Homogenous data can help identify principal components by reducing undesirable variation and noise. Drosophila offers a simpler alternative for examining the basic principles of collective behaviour by modelling with data from field observations.

Although neural substrates in the peripheral and central nervous systems for controlling interactions between a pair of flies (such as in typical courtship and aggression behaviour) are increasingly well understood, little is known about the dynamics and structures of social groups in fruit flies. Built upon the investigations of aggregation of a group of Drosophila (Simon et al., 2012; Burg et al., 2013), our improved paradigm generates a relatively naturalistic environment with minimal perturbations to the flies, and reveals the unique structure of fly assemblage. The robust tendency to form organised social clusters provides an interesting entry point to investigate collective behaviours in fruit flies. As rudimentary as a Drosophila cluster appears compared with a swarm-like flock of starlings, the flies were not simply clumped together in a random manner. Rather, the arrangement of flies in clusters strongly resembled that of a distributed network, rather than a centralised or decentralised network (Baran, 1964). Previous studies revealed that maintaining appropriate social space in flies requires visual input (Simon et al., 2012; Burg et al., 2013), and is modulated by previous social experience (Simon et al., 2012) and anaesthetic treatment (Burg et al., 2013). Our quantitative behavioural analysis, in conjunction with neurogenetic approaches and surgical experiments, revealed that cluster formation by groups of flies is a highly dynamic process, requiring integration of visual, olfactory, gustatory, auditory and mechanosensory inputs. Impaired sensory functions resulted in abnormal encounter responses, and, in turn, a failure in cluster formation. Notably, we found sexual dimorphism in olfactory-mediated social aggregation, suggesting that, in male and female flies, different neural circuits regulate the process of social aggregation. Importantly, our data suggested that different sensory pathways are not functionally redundant, and even different mechanosensory neurons play different roles in shaping the formation and spacing of social clusters. Taken together, our results indicate that social clustering behaviour in fruit flies is more sophisticated than previously assumed and a model of dynamic integration of various sensory inputs is required to explain group-level aggregation behaviour.

We modelled how a fly behaves at different distances in response to influences from others, using a force field computed from putative attractive and repulsive forces. The attraction, likely mediated by vision and olfaction, is generally weak over a broad range of distances, whereas repulsion, likely through mechanosensation and gustation, is strong at short distances. The simulation results suggested that the antagonistic interaction between these forces is sufficient to generate the required social distance for cluster formation. Notably, Turing first proposed a theoretical model utilizing local activation and a long-range inhibition to explain a variety of patterns in biology (Turing, 1952). Similar models were developed to account for the self-organing pattern formation from cells to organisms, suggesting that diverse patterns of social structures do not necessitate the assumption of complex behavior (Detrain and Deneubourg, 2006). However, without the perspective of dynamic processes, our static models cannot account for the active process of pair-wise encounters. Our results demonstrated that a large number of random dyadic interactions can serve as a driving force for the emergence of an orderly social cluster. Generalized into a system of self-propelled particles (SPP), flies are likely to achieve clustering by a parallel process involving all individuals, each of which has only a strong local view, without a clear sense of other individuals or the final structure of the cluster.

Although the timing and locations of pair-wise encounters are highly variable, the types and consequences of these encounters are stereotypic, and, importantly, the net outcome of these collective events over time is the growth of a cluster to include all flies in the arena. Interestingly, in wild-type flies, the frequency of encounters decreases after the initiation of the social cluster, indicating that an increasing number of flies settle down through dyadic interactions. In addition, a large proportion of flies gradually joined the nascent cluster (nucleus), despite its sporadic occurrence and erratic location. Similar approaches have been observed in ‘food searching-aggregation’ behaviour of adult flies, in which signals were emitted from ‘primers’ for the subsequent arrival of ‘followers’ (Tinette et al., 2004), and in cooperative digging behaviour of larvae (Ben Jacob et al., 2004; Dombrovski et al., 2017; Dombrovski et al., 2019). Besides foraging, grouping together benefits individuals in other aspects of Drosophila life. For example, evidence suggests that grouping in flies can synchronise circadian rhythms (Levine et al., 2002), modulate gene expression (Krupp et al., 2008), change pheromone profiles (Krupp et al., 2008; Liu et al., 2011), facilitate social learning (Chabaud et al., 2009; Battesti et al., 2012) and generate a heightened awareness of environmental stressors (Ramdya et al., 2015). Therefore, our data support the existence of a generalised assembling strategy for a group of flies to form a well-structured social network with or without external stimuli.

Although flies also exhibit pairwise interactions during courtship and aggression, the dyadic actions of encounter events during social clustering are relatively distinct in several aspects. First, the duration of each encounter event is brief, lasting for less than 1 s. Second, two flies from an encounter event are unlikely to meet again within a short period. This might be partially due to the sheer number of flies in the arena. However, in settings with many flies, individuals during their aggression or courtship exhibit a strong tendency for object fixation, as the pairs chase and interact repeatedly despite surrounding flies. Third, the frequent mode of dyadic encounter is between a walking fly and a stationary fly. The typical output of encounter is one moving-away while the other staying. During courtship and aggression, however, it is more common for both flies to be moving before and after the interaction. The distinct behavioural characteristics of encounter events suggest that, during social clustering, flies are likely exhibiting a unique ‘mental’ state.

Social clustering is not the only instance in which a fly group uses pairwise interactions to convey information between individuals. Benton and colleagues demonstrated that enhanced CO2-avoidance of a group of flies over individual performance also depends on pairwise interactions (Ramdya et al., 2015). It is likely that additional situations exist in which Drosophila exhibit stereotypic pairwise interactions that serve as general driving force for the emergence of order from an initially disordered group. In ants, spontaneously mobilized individuals in nests can contact and excite other ants thereby spreading rhythmic activity across the colony (Couzin, 2009). In swarms of insects, schools of fish and flocks of birds, once the entire group accomplishes pattern formation and moves cohesively with high dynamics, an individual gathers information from near neighbors to adjust its own speed and direction (Sumpter et al., 2008; Buhl et al., 2011; Katz et al., 2011). In these examples to maintain a relatively uniformed distance between moving individuals, spreading information depends on non-contact pairwise interactions, unlike those seen in Drosophila mediated via physical touches. Previous studies have suggested that an individual engaged in collective movements ‘averages’ its pairwise interactions with near neighbors, although features of residual three-body interactions are also present (Katz et al., 2011; Herbert-Read, 2016). Furthermore, it is possible that pairwise interactions play roles before collective movements unfold, such as to accumulate a sufficient number of individuals into a small space to escalate the group density beyond a threshold. or to influence the collective mood or decision-making of the group for departure (Petit and Bon, 2010). Overall, there appear to be common rules in the collective behaviors of flies and other animals. Information is processed and exchanged at a local scale between near neighbors, and individuals do not (and do not need to) have a global view (Buhl et al., 2011). Furthermore, ordered organization only emerges when the group reaches to a certain size (Buhl et al., 2006).

Inspection of all dyadic encounters in our analysis demonstrated that touches of peripheral appendages between a pair of flies evoke stay-or-go responses, which is an important element during the initiation, growth and maintenance of the SIN. Similarly, cascades of appendage-touch elicited interactions between fly pairs are reported to be responsible for the collective avoidance of CO2 (Ramdya et al., 2015). Drosophila possess an extensive mechanosensation system involving different types of mechanosensory neurons (Karkali and Martin-Blanco, 2017). Remarkably, our results demonstrated that manipulating neural activities of mechanosensory neurons caused aberrant social clustering, suggesting an important role of mechanosensation in regulating social networks in adult fruit flies. Considering the broad expression of mechanosensory genes, it is possible that multiple mechanosensory pathways mediate inter-fly tactile interactions in a coordinated and/or redundant way. Ants are also reported to use antennae to communicate with each other via tactile signals and chemosensation (Billen, 2006). In addition, crowding of solitary locusts induces transformation into the gregarious phase. Tactile signals via appendage touches between individuals play an important role in this process (Höltje and Hustert, 2003; Buhl et al., 2006; Bazazi et al., 2008). Interestingly, we found that in grouped flies, the activity of ppk neurons was elevated via a contact-dependent mechanism, suggesting a conserved role of tactile perception in social grouping. Taken together, our study not only revealed a novel role of appendage-mediated tactile signals in the dynamic formation of social networks in flies, but also provides evidence of common features of collective behaviours among different species.

Our modelling and observations indicated that animals use attractive signals to assemble a large group, whereas repulsive signals between individuals prevent them from forming a jumbled mass. Although this study did not pinpoint the attractive signal(s), the regular pattern of social clusters and the ubiquity of appendage interactions between pairs of flies strongly suggest that a stereotypic contact-mediated repulsive force keeps the nearby flies apart at a ‘hard-core’ distance. Mechanosensation is likely to be necessary for flies to both exert and receive physical forces during a dyadic interaction. The tarsal ppk neurons are activated during direct social contact, suggesting the possibility that they may sense social tactile cues. The expression patterns of ppk-positive neurons in the appendages suggest the possibility that the normal function of these neurons is to perceive touches from other flies. However, it is also possible that ppk-neurons are also required on the force-exerting side, for example, to gauge or control the level of force generated to repel other flies. Activating ppk neurons leads to decreased repulsion between flies supports the second hypothesis. Detailed dissection of the roles of each type of ppk-neuron necessitates manipulating the subclasses with high spatial and temporal precision, which should be possible with future genetic tools (Jenett et al., 2012).

In conclusion, we developed a self-organised aggregation paradigm as a model for studying the emergence of ordered structures from collective interactions of individuals. Our findings highlight the importance of stereotypic dyadic interactions and ppk neurons in social clustering and spacing. Further, comprehensive exploration of the dynamics and guiding principles in social clustering in Drosophila could enable the development of a novel framework for understanding the molecular and neural bases of collective behaviour in other animals.

Materials and methods

Key resources table.

Reagent type
(species) or resource
Designation Source or reference Identifiers Additional
information
Strain (Drosophila melanogaster) Canton-S (Zhan et al., 2016) https://doi.org/10.1038/ncomms13633
Strain (Drosophila melanogaster) w1118 Bloomington Drosophila Stock Center RRID:BDSC5905
Strain (Drosophila melanogaster) ppk-GAL4 Bloomington Drosophila Stock Center RRID:BDSC32079
Strain (Drosophila melanogaster) UAS-CsChrimson Bloomington Drosophila Stock Center RRID:BDSC55135
Strain (Drosophila melanogaster) Piezo-GAL4 Bloomington Drosophila
Stock Center
RRID:BDSC58771
Strain (Drosophila melanogaster) ORCO-GAL4 Yi Rao lab,
Peking University
Strain (Drosophila melanogaster) nan-GAL4 Yi Rao lab,
Peking University
Strain (Drosophila melanogaster) iav-GAL4 Yi Rao lab,
Peking University
Strain (Drosophila melanogaster) nompC-GAL4 Yi Rao lab,
Peking University
Strain (Drosophila melanogaster) UAS-TNTE Aike Guo and
Yan Li lab
(Liu et al., 2016)
http://dx.doi.org/10.7554/eLife.13238.001
Strain (Drosophila melanogaster) Tub-GAL80ts Aike Guo and Yan Li lab
(Liu et al., 2016)
http://dx.doi.org/10.7554/eLife.13238.001
Strain (Drosophila melanogaster) Cha3.3kb-GAL80 Aike Guo and Yan Li lab (Zhang et al., 2013b) https://doi.org/10.1523/JNEUROSCI.5365-12.2013
Strain (Drosophila melanogaster) CaLexA Jing Wang lab (Masuyama et al., 2012) https://dx.doi.org/10.3109%2F01677063.2011.642910
Strain (Drosophila melanogaster) UAS-mCD8::GFP (Zhan et al., 2016) https://doi.org/10.1038/ncomms13633
Gene (Drosophila melanogaster) norpA33 Bloomington Drosophila Stock Center RRID:BDSC9047
Gene (Drosophila melanogaster) Gr64f -/- Bloomington Drosophila
Stock Center
RRID:BDSC27883
Gene (Drosophila melanogaster) Δppk23 Bloomington
Drosophila Stock Center
RRID:BDSC33300
Gene (Drosophila melanogaster) Gr33a1 Bloomington Drosophila Stock Center RRID:BDSC31427
Gene (Drosophila melanogaster) IR76b1 Bloomington Drosophila Stock Center RRID:BDSC51309
Gene (Drosophila melanogaster) PiezoKO Bloomington Drosophila Stock Center RRID:BDSC58770
Gene (Drosophila melanogaster) nan36a Bloomington Drosophila Stock Center RRID:BDSC24902
Gene (Drosophila melanogaster) ORCO-/- Yi Rao lab, Peking University
Gene (Drosophila melanogaster) UAS-ORCO Yi Rao lab, Peking University
Gene (Drosophila melanogaster) iav1 Yi Rao lab,
Peking University
Gene (Drosophila melanogaster) PoxnΔm22 Yi Rao lab,
Peking University
Gene (Drosophila melanogaster) ppkESB Zuoren Wang lab (Guo et al., 2014) https://doi.org/10.1016/j.celrep.2014.10.020
Gene (Drosophila melanogaster) ΔGr32a1 Craig Montell lab (Moon et al., 2009) https://doi.org/10.1016/j.cub.2009.07.061
Chemical compound, drug Sigmacote Sigma Aldrich Cat #: SLBF433V
Chemical compound, drug All-trans-retinal Sigma Aldrich Cat #: R2500 200 μM
Software, algorithm Prism 7 GraphPad
Prism https://www.graphpad.com/
RRID:SCR_002798
Software, algorithm MATLAB 2018a MathWorks, Natick, MA https://www.mathworks.com/products/matlab.html RRID:SCR_006752
Software, algorithm Fiji NIH https://fiji.sc/ RRID:SCR_002285
Software, algorithm Adobe Illustrator Adobe https://www.adobe.com/ RRID:SCR_010279
Software, algorithm Adobe Premiere pro Adobe https://www.adobe.com/
Code Simulation of random flies/dots This paper Materials and methods
Other White LED/Infrared LED arrays (850 nm) Xin Xing Yuan Guangdian https://item.taobao.com/item.htmid=20158878058

Fly stocks

Flies were reared on a standard medium at 25°C and 60% relative humidity, under a 12:12 hr light:dark regime. Flies at 3–6 days post-eclosion were used unless otherwise indicated. Canton S was used as a wild-type control. ORCO−/−, ORCO-GAL4, UAS-ORCO, iav1, iav-GAL4, nan-GAL4, nompC-GAL4 and PoxnΔm22 were kindly provided by Yi Rao. ppkESB was kindly provided by Zuoren Wang. ΔGr32a1was kindly provided by Craig Montell. UAS-TNTE, Tub-GAL80ts and Cha-GAL80 were kindly provided by Aike Guo and Yan Li. CaLexA (LexAop-mCD8-GFP-2A-mCD8-GFP; UAS-LexA-VP16-NFAT; LexAop-GFP/Tm6B) flies were kindly provided by Jing Wang. w1118 (BL5905), norpA33 (BL9047), ppk-GAL4 (BL32079), UAS-CsChrimson (BL55135 and BL55136), Piezo-GAL4 (BL58771), PiezoKO (BL58770), nan36a (BL24902), Gr64f -/- (BL27883), ΔPPK23 (BL33300), Gr33a1 (BL31427) and IR76b1 (BL51309) were obtained from the Bloomington Drosophila Stock Center. Mutant flies were outcrossed to CS background for at least eight generations.

Social clustering assay

Social aggregation was tested using 3- to 6-day-old adult flies. Both male and female flies were tested, with the exception of some experiments (Figure 6, Figure 8 and the related supplement material). One day before the experiment, flies were collected under cold anaesthesia and kept with 50 flies per vial (except otherwise noted), with females and males separate. All experiments were conducted around Zeitgeber time 1–7 in a room with 25°C and 60% humidity. Flies were allowed to habituate to the environment for 30 min before the test. The behavioural arenas were modified from glass culture dishes (internal diameter of 90 mm, unless noted otherwise) with the wall and ceiling treated with Sigmacote (Sigma-Aldrich, SLBF433V), in accordance with the product protocol, to prevent flies from walking on the side and top of the arena. The bottom of the arena was covered by 1% agar serving as a water source to keep the arena humidified, with a space of 12 mm height formed between the agar surface and the ceiling of the arena. Prior to experiments, the arenas were allowed to adjust to room temperature overnight. After quick cold anaesthesia on ice (within 1 min), flies were carefully transferred to the centre of the arena. The arenas were back-illuminated by white LED arrays. For visual deprivation experiments, infrared LED arrays (850 nm) were used as the back-light source. The video- or time-lapse recordings started immediately when the flies were introduced to the arena; this was considered the zero hour.

Our system used a typical setting for behavioral observations but with improvements that enabled us to consistently observe social cluster formation. Besides maintaining humidity inside the arena for long-term observation, the agar pad also served as a favorable surface for the flies to walk on, while the ‘slippery’ coating on the side and top of the arena prevented flies from staying on these areas. Moreover, social cluster formation also requires a tightly-controlled external environment, because high temperature (>30°C), sound, vibration of the testing table, and moving shadows (of operators) could deter the clustering process. Our behavioral experiments were conducted in an isolated area within a quiet room. We also noticed that several factors, including small group size (<10 flies), mixed sex, starvation, and social isolation, negatively impacted the formation of clusters. Clustering in wild-type flies develops readily only when the internal and external perturbations discussed above are eliminated.

We estimated that over 225,000 flies of various genotypes were tested for social clustering in this project.

Image and video acquisition and analysis

Digital cameras (Canon A720) were used to capture a sequence of raw images (8 Megapixels) of fly distribution. A custom script was written to control the camera to acquire time-lapse images for 120 min. The recording began as soon as the flies were first introduced into the arena. The captured images were imported to Matlab for further analysis with custom scripts.

For dynamic analysis experiments, videos of fly distribution in the arena were obtained with camcorders (Sony HDR-CX240E), at 50 frames per second (FPS). High-speed videos were captured by a Camera Link camera (Gazelle, FLIR) at 500 FPS and the images were saved as uncompressed files.

Details of touch-evoked encounter responses were analysed semi-automatically. Tracing of flies was aided by custom scripts/GUIs written in Matlab. Throughout this paper, the distance between two flies was measured between body centres, not between body surfaces.

Social Space Index (SSI)

Photographs of the distribution of flies between 28 and 120 min after they were introduced into the arena were used for social space analysis. A Matlab program was written to extract the positions of flies and to quantify the social aggregation by calculating the NND for each fly. The percentages of flies with NNDs in bins of 5 mm were calculated. The SSI was then obtained by subtracting the percentage of flies in the second bin from that in the first bin (SSI = bin1 − bin2), as previously described (Simon et al., 2012).

Simulation with ‘random flies’ and ‘random dots’

Random flies

For simulating flies without interactions between each other in arenas of similar size, we generated ‘random flies’ which followed the natural distribution of actual flies. A Matlab script first randomly picked digital ‘flies’ from the dataset of wild-type flies of corresponding gender and experimental conditions. These flies were plotted onto a digital arena (a circle with a diameter of 90 mm) using their original coordinates, body lengths and orientations. Flies that overlapped with others already existed in the arena were then removed. This process was repeated until the total number of virtual flies in the digital arena finally reached 50. The constituted arenas with ‘scrambled’ flies were then treated similarly to the real arenas, with these flies identified to provide controls for comparison with the actual flies. Because they came from the same dataset, the random flies shared the same overall spatial distribution of the actual flies, including frequent occurrence near the edge of arenas.

Random males and random females were generated from the dataset of wild-type males and females, respectively. Because random males and females displayed almost identical averaged properties in our analysis, only the results from random females were shown in this paper.

Random dots

To generate a group of a given number of random dots, a Matlab script generated a series of dots with random locations within a circular arena (diameter: 90 mm), with the restriction that each dot was not in the proximity of the other dots (within an impermissible distance, or minimal allowed distance). The positions of these randomly generated dots were then used to compute their distribution. When the minimal allowed distance was 0 mm, the distribution of these random dots followed a Poisson distribution. When the minimal allowed distance was larger than 0 mm, their distribution followed a Matérn hard-core point process (type II) with this distance serving as the hard-core distance (Turner, 2015). To simplify the narration, we used the hard-core distance for both distributions.

Using spatial statistics to construct ‘random dots’ in this way enabled us to obtain spatial point processes that would not be observed otherwise in real experiments. In a 90 mm dish, random dots with a total number ranging from 5 to 100 and a hard-core distance ranging from 0 to 10 mm were generated.

Fly identification and cluster reconstruction

Several Matlab scripts worked sequentially to automatically find and join the flies, whose surrounding areas and distances to neighbours met predefined criteria (described in the following section), into a cluster (also see Figure 2A; Figure 2—video 1).

The edge of the arena was manually or automatically labelled to generate a mask that allowed the following calculations to focus on only the inside of the arena. The background of a digital image of an arena with flies was first calculated by collecting the maximal values at each pixel position over the observed period. After background subtraction, the image was converted to a binary with a threshold. In the resultant image, groups of connected pixels were assigned as individual flies, each of which was fitted to an ellipse to obtain geometric parameters (body length, body width, body orientation, the centre of mass).

The inversion of the binary image resulted in a connected area between all flies and the edge of the arena. By repeatedly applying morphological shrink operations on the image while preserving its Euler number, the area was reduced into connected lines that separated individual flies. The region surrounded by some of these lines (serving as borders) for each enclosed fly was designated as the residing area of that fly. Two flies were considered contiguous neighbours (contacting neighbours) only when they shared a common border.

We identified contiguous flies whose residing areas were smaller than a threshold (area), and combined them into a basic cluster. The nearby flies (with larger residing areas) were further incorporated into a basic cluster if their distance to any flies in the basic cluster was shorter than a threshold (distance). The area threshold and distance threshold are described in the following section. The latter step was repeated to expand the cluster until no more flies met the distance criterion. The flies in the resultant cluster were treated equally in the following steps, regardless of whether they joined by area or distance criteria. In rare situations where two or more clusters formed in one arena, each cluster was treated in parallel.

Flies in a cluster were classified into insiders (whose residing area only bordered with residing areas of flies from the same cluster) and outsiders (whose residing area was juxtaposed to regions not belonging to flies of the same cluster). Due to variation among outsiders, we only quantified the connectivity of insiders. Additionally, only connections between contiguous neighbours were considered for calculating the numbers and lengths of these links.

Predefined criterial sets for cluster reconstruction

First, we calculated the area of the arena, the unit area, and the unit distance with the following formulas:

AreaofArena=π(RadiusofArena)2.
UnitArea=AreaofArena/TotalNumberofFlies.
UnitDistance=sqrt(4UnitArea/π)or2RadiusofArena/sqrt(TotalNumberofFlies).

Unit Area is the area per fly, assuming the area of the arena is divided evenly among all flies. Unit Distance is the diameter of a circle with an area equal to the Unit Area.

Each criterial set was based on one of five Stringent Factors (0.25, 0.302, 0.423, 0.49 and 0.723, from most stringent to most relaxed), the square roots of which were 0.5, 0.55, 0.65, 0.70 and 0.85, respectively. The thresholds for maximal allowable area and distance for each criterial set were calculated with the corresponding Stringent Factor:

AreaThreshold=UnitAreaStringentFactor
DistanceThreshold=UnitDistancesqrt(0.5StringentFactor)

A pair of Area Threshold and Distance Threshold form a criterial set; thus, five Stringent Factors resulted in five criterial settings for clustering (CSCs) (with stringency from high to low, Figure 2B).

Surgical manipulation

For surgical removal of bilateral antenna, maxillary palps and arista, 3-day-old adult Canton S flies were used. The flies were anaesthetised on a CO2 pad and specific operations were conducted with fine forceps under a stereo microscope (Leica, S6E). To minimise CO2 toxicity, we operated on five flies in each batch. After the operations, the flies (50 in a group) were transferred to a standard food vial and maintained at 25°C with 60% humidity for 2 days before behavioural testing.

Dust-induced grooming

The dust-induced grooming experiment was modified from a previous study (Seeds et al., 2014). A group of 50 flies was cold anaesthetised on ice and transferred to grooming chambers containing green phosphor (modified from a glass vial with a diameter of 31.8 mm and height of 80 mm). The chamber was gently shaken to uniformly coat each fly. Excess dust was removed by tapping the flies against nylon mesh before the flies were transferred to behavioural testing chambers for video recordings. Images of dusted flies in the behaviour chamber were checked at 0, 15 and 60 min under a fluorescence stereo microscope (Leica M205). Most body parts were almost clean at 15 min.

Optogenetic stimulation

A group of 50 flies were collected within 3 days after eclosion and transferred into a vial with regular food containing 200 μM all-trans retinal (Sigma R2500). The vials were wrapped in aluminium foil for protection from light, then kept at 25°C and 60% humidity for 2–4 days. After transferral to the test arena, flies were allowed to recover for 1 min, and then stimulated with light. An array of white LEDs was used as the source of stimulation. Unless otherwise noted, light stimulation was presented continually throughout the observation period. The light intensity was 28 mW/cm2, measured using a spectrometer (CCS200/M, Thorlabs).

Inducible inactivation

To deactivate mechanosensing neurons, the tetanus toxin light chain, TNT, was expressed in the indicated GAL4 labelled neurons continuously from the embryonic stage, except for nompC-GAL4. As inactivation of nompC neurons at an early stage is lethal, TNT was expressed exclusively in the adult stage using the TARGET system (McGuire et al., 2004). Flies with nompC-GAL4, UAS-TNT and Tub-GAL80ts were reared at 22°C and collected within 5 days of eclosion. A 2-day temperature shift to 30°C was applied to inhibit GAL80 activity, in order to induce TNT expression. Flies were collected and combined into 50 flies per vial one day prior to the test. The behavioural test was conducted at room temperature.

Expression patterns

Dissection and staining of the central nervous system were performed as previously described, with slight modification (Zhan et al., 2016). Dissection of intact brains of adult female flies was performed in cold phosphate buffered saline (PBS) under stereo microscopy and fixed in 4% fresh paraformaldehyde solution for 2 hr on ice. The tissues were then washed with PBT (0.1% Triton X-100 in 1 × PBS) five times (15 min each), blocked for 30 min with PBT containing 5% normal goat serum, and incubated with anti-nc82 antibody (1:100) in blocking buffer for 24 hr at 4°C. After washing with PBT five times, the tissues were incubated with secondary antibody (1:100) in PBT for 48 hr at 4°C. Samples were then washed with PBT three times (15 min each) before mounting.

For the imaging of expression in the peripheral systems, wings and legs were bilaterally removed from adult flies 4 days post-eclosion with forceps on a CO2 plate. For imaging of legs, after fixation in 4% freshly prepared paraformaldehyde solution for 2 hr on ice, legs were washed with PBT (0.1% Triton X-100 in 1 × PBS) three times (15 min each) before mounting.

Samples were mounted in mounting medium (Vector, H-1000) under a coverslip. All of the fluorescent images were collected using a confocal microscope (Leica SP8) and processed with ImageJ (NIH).

CaLexA measurements

Flies with various social experiences were used for CaLexA experiments. ‘Single’: flies raised individually in isolation in a rearing tube (diameter: 31.8 mm, height: 80 mm) after hatching; ‘Group’: 50 flies (female and male) raised together after hatching; ‘Re-Grouped’: the singly-raised flies grouped together (10 flies/vial, diameter: 21 mm) and reared for additional 30 hr prior to imaging. ‘Netted’: single fly housed in a netted top tube cage with food at the bottom (diameter: 12 mm). ‘Netted in group’: single fly raised in a net house and surrounded by a group of untouchable flies. ‘Netted re-grouped’: 10 single isolated flies were put together to form a new group for 24 hr prior to testing.

For CaLexA imaging, the ppk-GAL4 >CaLexA flies, 16 days old, were cold anaesthetised on ice for 5 min. The legs or wings were quickly removed with forceps, and mounted in mounting medium (Vector, H-1000) under a coverslip. Confocal images were acquired under a 40 × oil immersion objective lens with a confocal microscope (Leica SP8). The sum of all pixel intensities of stacks comprising the whole regions of interest (ROI) were calculated in GFP and autofluorescence channels. Average GFP signal was used for analysis.

Statistics

Statistical analysis was performed using Prism 7 (GraphPad Software). All experiments were performed in parallel with both experimental and control genotypes. In box and whisker plots, all data points in a data set were plotted; each box includes data from the 25th to the 75th percentile, and the line within the box indicates the median. P values were determined using the unpaired two-tailed Student’s t-tests for pairwise comparisons, one-way ANOVA with Tukey’s or Dunnett’s test for comparison of multiple groups. For bar graphs, the values shown were mean ± s.e.m.

Source data files

The source data for the behavioral analyses, summary statistics, and source code are included in the source data files.

Acknowledgements

We thank all members of the Y Zhu lab for stimulating discussions. We especially thank A Guo, L Liu, L Tao, K Zhang, ZG Han and G Li for helpful discussion. We also thank FT Ji for contributions at the early phase of this project. In addition, we are grateful to A Guo, Y-N Jan, Y Li, Y Rao, J Wang, Z Wang and W Zhang for providing flies. We are also grateful to M Huang for scientific and administrative support, YP Zhan for helpful discussions and help with the organization of the manuscript, and DK Feng for assistance with the figures.

This work was supported by NSFC grants (9163210042), Key Research Program of Frontier Sciences of Chinese Academy of Sciences (CAS, QYZDY-SSW-SMC015), CAS Interdisciplinary Innovation Team, and Bill and Melinda Gates Foundation (OPP1119434) to Y Zhu.

Funding Statement

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Contributor Information

Yan Zhu, Email: zhuyan@ibp.ac.cn.

Mani Ramaswami, Trinity College Dublin, Ireland.

K VijayRaghavan, National Centre for Biological Sciences, Tata Institute of Fundamental Research, India.

Funding Information

This paper was supported by the following grants:

  • National Natural Science Foundation of China 9163210042 to Yan Zhu.

  • Chinese Academy of Sciences QYZDY-SSW-SMC015 to Yan Zhu.

  • Bill and Melinda Gates Foundation OPP1119434 to Yan Zhu.

Additional information

Competing interests

No competing interests declared.

Author contributions

Conceptualization, Investigation, Methodology, Data analysis, Validation.

Data analysis, Software.

Data analysis, Software.

Data analysis, Software.

Data analysis, Software.

Data analysis, Software.

Conceptualization, Software, Analysis, Visualization, Methodology, Supervision, Funding acquisition.

Additional files

Source code 1. randomdot_simfunc.
elife-51921-code1.m (3.1KB, m)
Source code 2. randomfly_from_dataset.
elife-51921-code2.m (10.2KB, m)
Transparent reporting form

Data availability

All data generated or analysed during this study are included in the manuscript and supporting files.

References

  1. Adams CM, Anderson MG, Motto DG, Price MP, Johnson WA, Welsh MJ. Ripped pocket and pickpocket, novel Drosophila DEG/ENaC subunits expressed in early development and in mechanosensory neurons. The Journal of Cell Biology. 1998;140:143–152. doi: 10.1083/jcb.140.1.143. [DOI] [PMC free article] [PubMed] [Google Scholar]
  2. Ahn J-E, Chen Y, Amrein H. Molecular basis of fatty acid taste in Drosophila. eLife. 2017;6:e30115. doi: 10.7554/eLife.30115. [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Awasaki T, Kimura K. pox-neuro is required for development of chemosensory bristles in Drosophila. Journal of Neurobiology. 1997;32:707–721. doi: 10.1002/(SICI)1097-4695(19970620)32:7&#x0003c;707::AID-NEU6&#x0003e;3.0.CO;2-8. [DOI] [PubMed] [Google Scholar]
  4. Baddeley A, Rubak E, Turner R.  Methodology and Applications with R. CRC Press; 2015. Spatial Point Patterns. [Google Scholar]
  5. Baran P. On distributed communications networks. IEEE Transactions on Communications. 1964;12:1–9. doi: 10.1109/TCOM.1964.1088883. [DOI] [Google Scholar]
  6. Battesti M, Moreno C, Joly D, Mery F. Spread of social information and dynamics of social transmission within Drosophila groups. Current Biology. 2012;22:309–313. doi: 10.1016/j.cub.2011.12.050. [DOI] [PubMed] [Google Scholar]
  7. Bazazi S, Buhl J, Hale JJ, Anstey ML, Sword GA, Simpson SJ, Couzin ID. Collective motion and cannibalism in locust migratory bands. Current Biology. 2008;18:735–739. doi: 10.1016/j.cub.2008.04.035. [DOI] [PubMed] [Google Scholar]
  8. Ben Jacob E, Becker I, Shapira Y, Levine H. Bacterial linguistic communication and social intelligence. Trends in Microbiology. 2004;12:366–372. doi: 10.1016/j.tim.2004.06.006. [DOI] [PubMed] [Google Scholar]
  9. Bertrand A, Barbieri MA, Córdova J, Hernández C, Gómez F, Leiva F. Diel vertical behaviour, predator–prey relationships, and occupation of space by jack mackerel (Trachurus murphyi) off Chile. ICES Journal of Marine Science. 2004;61:1105–1112. doi: 10.1016/j.icesjms.2004.06.010. [DOI] [Google Scholar]
  10. Billen J. Signal variety and communication in social insects. Proc. Neth. Entomol. Soc. Meet. 2006;17:9–25. [Google Scholar]
  11. Buhl J, Sumpter DJT, Couzin ID, Hale JJ, Despland E, Miller ER, Simpson SJ. From disorder to order in marching locusts. Science. 2006;312:1402–1406. doi: 10.1126/science.1125142. [DOI] [PubMed] [Google Scholar]
  12. Buhl J, Sword GA, Clissold FJ, Simpson SJ. Group structure in locust migratory bands. Behavioral Ecology and Sociobiology. 2011;65:265–273. doi: 10.1007/s00265-010-1041-x. [DOI] [Google Scholar]
  13. Burg ED, Langan ST, Nash HA. Drosophila social clustering is disrupted by anesthetics and in narrow abdomen ion channel mutants. Genes, Brain, and Behavior. 2013;12:338–347. doi: 10.1111/gbb.12025. [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Chabaud MA, Isabel G, Kaiser L, Preat T. Social facilitation of long-lasting memory retrieval in Drosophila. Current Biology. 2009;19:1654–1659. doi: 10.1016/j.cub.2009.08.017. [DOI] [PubMed] [Google Scholar]
  15. Conder. PJ. Individual distance. Ibis. 1949;91:649–655. doi: 10.1111/j.1474-919X.1949.tb02315.x. [DOI] [Google Scholar]
  16. Couzin ID. Collective cognition in animal groups. Trends in Cognitive Sciences. 2009;13:36–43. doi: 10.1016/j.tics.2008.10.002. [DOI] [PubMed] [Google Scholar]
  17. Dambly-Chaudière C, Jamet E, Burri M, Bopp D, Basler K, Hafen E, Dumont N, Spielmann P, Ghysen A, Noll M. The paired box gene pox neuro: a determinant of poly-innervated sense organs in Drosophila. Cell. 1992;69:159–172. doi: 10.1016/0092-8674(92)90127-X. [DOI] [PubMed] [Google Scholar]
  18. de Bono M. Molecular approaches to aggregation behavior and social attachment. Journal of Neurobiology. 2003;54:78–92. doi: 10.1002/neu.10162. [DOI] [PubMed] [Google Scholar]
  19. de Bono M, Bargmann CI. Natural variation in a neuropeptide Y receptor homolog modifies social behavior and food response in C. elegans. Cell. 1998;94:679–689. doi: 10.1016/S0092-8674(00)81609-8. [DOI] [PubMed] [Google Scholar]
  20. Deisboeck TS, Couzin ID. Collective behavior in Cancer cell populations. BioEssays. 2009;31:190–197. doi: 10.1002/bies.200800084. [DOI] [PubMed] [Google Scholar]
  21. Detrain C, Deneubourg J. Self-organized structures in a superorganism: do ants “behave” like molecules? Physics of Life Reviews. 2006;3:162–187. doi: 10.1016/j.plrev.2006.07.001. [DOI] [Google Scholar]
  22. Dombrovski M, Poussard L, Moalem K, Kmecova L, Hogan N, Schott E, Vaccari A, Acton S, Condron B. Cooperative behavior emerges among Drosophila larvae. Current Biology. 2017;27:2821–2826. doi: 10.1016/j.cub.2017.07.054. [DOI] [PubMed] [Google Scholar]
  23. Dombrovski M, Kim A, Poussard L, Vaccari A, Acton S, Spillman E, Condron B, Yuan Q. A plastic visual pathway regulates cooperative behavior in Drosophila larvae. Current Biology. 2019;29:1866–1876. doi: 10.1016/j.cub.2019.04.060. [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Gong Z, Son W, Chung YD, Kim J, Shin DW, McClung CA, Lee Y, Lee HW, Chang DJ, Kaang BK, Cho H, Oh U, Hirsh J, Kernan MJ, Kim C. Two interdependent TRPV channel subunits, inactive and Nanchung, mediate hearing in Drosophila. Journal of Neuroscience. 2004;24:9059–9066. doi: 10.1523/JNEUROSCI.1645-04.2004. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Guo Y, Wang Y, Wang Q, Wang Z. The role of PPK26 in Drosophila larval mechanical nociception. Cell Reports. 2014;9:1183–1190. doi: 10.1016/j.celrep.2014.10.020. [DOI] [PubMed] [Google Scholar]
  26. Guo A, Gong Z, Li H, Li Y, Liu L, Liu Q, Lu H, Pan Y, Ren Q, Wu Z, Zhang K, Zhu Y. 1.27 - Vision, Memory, and Cognition in Drosophila. In: Byrne J ohnH., editor. Learning and Memory: A Comprehensive Reference. Second. Oxford: Academic Press; 2017. pp. 483–503. [Google Scholar]
  27. Herbert-Read JE. Understanding how animal groups achieve coordinated movement. The Journal of Experimental Biology. 2016;219:2971–2983. doi: 10.1242/jeb.129411. [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Höltje M, Hustert R. Rapid mechano-sensory pathways code leg impact and elicit very rapid reflexes in insects. Journal of Experimental Biology. 2003;206:2715–2724. doi: 10.1242/jeb.00492. [DOI] [PubMed] [Google Scholar]
  29. Hutton AE. Spatial relationships in perching barn and cliff swallows. The Wilson Bulletin. 1978;93:396–403. [Google Scholar]
  30. Jenett A, Rubin GM, Ngo TT, Shepherd D, Murphy C, Dionne H, Pfeiffer BD, Cavallaro A, Hall D, Jeter J, Iyer N, Fetter D, Hausenfluck JH, Peng H, Trautman ET, Svirskas RR, Myers EW, Iwinski ZR, Aso Y, DePasquale GM, Enos A, Hulamm P, Lam SC, Li HH, Laverty TR, Long F, Qu L, Murphy SD, Rokicki K, Safford T, Shaw K, Simpson JH, Sowell A, Tae S, Yu Y, Zugates CT. A GAL4-driver line resource for Drosophila neurobiology. Cell Reports. 2012;2:991–1001. doi: 10.1016/j.celrep.2012.09.011. [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Jezovit JA, Levine JD, Schneider J. Phylogeny, environment and sexual communication across the Drosophila genus. The Journal of Experimental Biology. 2017;220:42–52. doi: 10.1242/jeb.143008. [DOI] [PubMed] [Google Scholar]
  32. Jiao Y, Moon SJ, Wang X, Ren Q, Montell C. Gr64f is required in combination with other gustatory receptors for sugar detection in Drosophila. Current Biology. 2008;18:1797–1801. doi: 10.1016/j.cub.2008.10.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Jolles JW, Boogert NJ, Sridhar VH, Couzin ID, Manica A. Consistent individual differences drive collective behavior and group functioning of schooling fish. Current Biology. 2017;27:2862–2868. doi: 10.1016/j.cub.2017.08.004. [DOI] [PMC free article] [PubMed] [Google Scholar]
  34. Karak S, Jacobs JS, Kittelmann M, Spalthoff C, Katana R, Sivan-Loukianova E, Schon MA, Kernan MJ, Eberl DF, Göpfert MC. Diverse roles of axonemal dyneins in Drosophila auditory neuron function and mechanical amplification in hearing. Scientific Reports. 2015;5:17085. doi: 10.1038/srep17085. [DOI] [PMC free article] [PubMed] [Google Scholar]
  35. Karkali K, Martin-Blanco E. Mechanosensing in the Drosophila nervous system. Seminars in Cell & Developmental Biology. 2017;71:22–29. doi: 10.1016/j.semcdb.2017.06.014. [DOI] [PubMed] [Google Scholar]
  36. Katz Y, Tunstrøm K, Ioannou CC, Huepe C, Couzin ID. Inferring the structure and dynamics of interactions in schooling fish. PNAS. 2011;108:18720–18725. doi: 10.1073/pnas.1107583108. [DOI] [PMC free article] [PubMed] [Google Scholar]
  37. Kent C, Azanchi R, Smith B, Formosa A, Levine JD. Social context influences chemical communication in D. Melanogaster males. Current Biology. 2008;18:1384–1389. doi: 10.1016/j.cub.2008.07.088. [DOI] [PubMed] [Google Scholar]
  38. Kim SE, Coste B, Chadha A, Cook B, Patapoutian A. The role of Drosophila piezo in mechanical nociception. Nature. 2012;483:209–212. doi: 10.1038/nature10801. [DOI] [PMC free article] [PubMed] [Google Scholar]
  39. King AJ, Wilson AM, Wilshin SD, Lowe J, Haddadi H, Hailes S, Morton AJ. Selfish-herd behaviour of sheep under threat. Current Biology. 2012;22:R561–R562. doi: 10.1016/j.cub.2012.05.008. [DOI] [PubMed] [Google Scholar]
  40. Klapoetke NC, Murata Y, Kim SS, Pulver SR, Birdsey-Benson A, Cho YK, Morimoto TK, Chuong AS, Carpenter EJ, Tian Z, Wang J, Xie Y, Yan Z, Zhang Y, Chow BY, Surek B, Melkonian M, Jayaraman V, Constantine-Paton M, Wong GK, Boyden ES. Independent optical excitation of distinct neural populations. Nature Methods. 2014;11:338–346. doi: 10.1038/nmeth.2836. [DOI] [PMC free article] [PubMed] [Google Scholar]
  41. Krupp JJ, Kent C, Billeter JC, Azanchi R, So AK, Schonfeld JA, Smith BP, Lucas C, Levine JD. Social experience modifies pheromone expression and mating behavior in male Drosophila Melanogaster. Current Biology. 2008;18:1373–1383. doi: 10.1016/j.cub.2008.07.089. [DOI] [PubMed] [Google Scholar]
  42. Larsson MC, Domingos AI, Jones WD, Chiappe ME, Amrein H, Vosshall LB. Or83b encodes a broadly expressed odorant receptor essential for Drosophila olfaction. Neuron. 2004;43:703–714. doi: 10.1016/j.neuron.2004.08.019. [DOI] [PubMed] [Google Scholar]
  43. Levine JD, Funes P, Dowse HB, Hall JC. Resetting the circadian clock by social experience in Drosophila melanogaster. Science. 2002;298:2010–2012. doi: 10.1126/science.1076008. [DOI] [PubMed] [Google Scholar]
  44. Li J, Zhang W, Guo Z, Wu S, Jan LY, Jan YN. A defensive kicking behavior in response to mechanical stimuli mediated by Drosophila wing margin bristles. The Journal of Neuroscience. 2016;36:11275–11282. doi: 10.1523/JNEUROSCI.1416-16.2016. [DOI] [PMC free article] [PubMed] [Google Scholar]
  45. Lihoreau M, Clarke IM, Buhl J, Sumpter DJ, Simpson SJ. Collective selection of food patches in Drosophila. The Journal of Experimental Biology. 2016;219:668–675. doi: 10.1242/jeb.127431. [DOI] [PubMed] [Google Scholar]
  46. Liu W, Liang X, Gong J, Yang Z, Zhang YH, Zhang JX, Rao Y. Social regulation of aggression by pheromonal activation of Or65a olfactory neurons in Drosophila. Nature Neuroscience. 2011;14:896–902. doi: 10.1038/nn.2836. [DOI] [PubMed] [Google Scholar]
  47. Liu Q, Yang X, Tian J, Gao Z, Wang M, Li Y, Guo A. Gap junction networks in mushroom bodies participate in visual learning and memory in Drosophila. eLife. 2016;5:e13238. doi: 10.7554/eLife.13238. [DOI] [PMC free article] [PubMed] [Google Scholar]
  48. Lu B, LaMora A, Sun Y, Welsh MJ, Ben-Shahar Y. ppk23-Dependent chemosensory functions contribute to courtship behavior in Drosophila melanogaster. PLOS Genetics. 2012;8:e1002587. doi: 10.1371/journal.pgen.1002587. [DOI] [PMC free article] [PubMed] [Google Scholar]
  49. Mamiya A, Gurung P, Tuthill JC. Neural coding of leg proprioception in Drosophila. Neuron. 2018;100:636–650. doi: 10.1016/j.neuron.2018.09.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  50. Masuyama K, Zhang Y, Rao Y, Wang JW. Mapping neural circuits with activity-dependent nuclear import of a transcription factor. Journal of Neurogenetics. 2012;26:89–102. doi: 10.3109/01677063.2011.642910. [DOI] [PMC free article] [PubMed] [Google Scholar]
  51. McGuire SE, Mao Z, Davis RL. Spatiotemporal gene expression targeting with the TARGET and Gene-Switch systems in Drosophila. Science Signaling. 2004;2004:pl6. doi: 10.1126/stke.2202004pl6. [DOI] [PubMed] [Google Scholar]
  52. Miyamoto T, Amrein H. Suppression of male courtship by a Drosophila pheromone receptor. Nature Neuroscience. 2008;11:874–876. doi: 10.1038/nn.2161. [DOI] [PMC free article] [PubMed] [Google Scholar]
  53. Mogilner A, Edelstein-Keshet L, Bent L, Spiros A. Mutual interactions, potentials, and individual distance in a social aggregation. Journal of Mathematical Biology. 2003;47:353–389. doi: 10.1007/s00285-003-0209-7. [DOI] [PubMed] [Google Scholar]
  54. Moon SJ, Lee Y, Jiao Y, Montell C. A Drosophila gustatory receptor essential for aversive taste and inhibiting male-to-male courtship. Current Biology. 2009;19:1623–1627. doi: 10.1016/j.cub.2009.07.061. [DOI] [PMC free article] [PubMed] [Google Scholar]
  55. Moussaïd M, Helbing D, Theraulaz G. How simple rules determine pedestrian behavior and crowd disasters. PNAS. 2011;108:6884–6888. doi: 10.1073/pnas.1016507108. [DOI] [PMC free article] [PubMed] [Google Scholar]
  56. Nagy M, Akos Z, Biro D, Vicsek T. Hierarchical group dynamics in pigeon flocks. Nature. 2010;464:890–893. doi: 10.1038/nature08891. [DOI] [PubMed] [Google Scholar]
  57. Navarro J, del Solar E. Pattern of spatial distribution in Drosophila melanogaster. Behavior Genetics. 1975;5:9–16. doi: 10.1007/BF01067577. [DOI] [PubMed] [Google Scholar]
  58. Nottebohm E, Usui A, Therianos S, Kimura K, Dambly-Chaudière C, Ghysen A. The gene poxn controls different steps of the formation of chemosensory organs in Drosophila. Neuron. 1994;12:25–34. doi: 10.1016/0896-6273(94)90149-X. [DOI] [PubMed] [Google Scholar]
  59. Olds WH, Xu T. Regulation of food intake by mechanosensory ion channels in enteric neurons. eLife. 2014;3:e04402. doi: 10.7554/eLife.04402. [DOI] [PMC free article] [PubMed] [Google Scholar]
  60. Pak WL, Grossfield J, Arnold KS. Mutants of the visual pathway of Drosophila Melanogaster. Nature. 1970;227:518–520. doi: 10.1038/227518b0. [DOI] [PubMed] [Google Scholar]
  61. Petit O, Bon R. Decision-making processes: the case of collective movements. Behavioural Processes. 2010;84:635–647. doi: 10.1016/j.beproc.2010.04.009. [DOI] [PubMed] [Google Scholar]
  62. Ramdya P, Lichocki P, Cruchet S, Frisch L, Tse W, Floreano D, Benton R. Mechanosensory interactions drive collective behaviour in Drosophila. Nature. 2015;519:233–236. doi: 10.1038/nature14024. [DOI] [PMC free article] [PubMed] [Google Scholar]
  63. Ramdya P, Schneider J, Levine JD. The neurogenetics of group behavior in Drosophila Melanogaster. The Journal of Experimental Biology. 2017;220:35–41. doi: 10.1242/jeb.141457. [DOI] [PubMed] [Google Scholar]
  64. Schneider J, Dickinson MH, Levine JD. Social structures depend on innate determinants and chemosensory processing in Drosophila. PNAS. 2012;109:17174–17179. doi: 10.1073/pnas.1121252109. [DOI] [PMC free article] [PubMed] [Google Scholar]
  65. Seeds AM, Ravbar P, Chung P, Hampel S, Midgley FM, Mensh BD, Simpson JH. A suppression hierarchy among competing motor programs drives sequential grooming in Drosophila. eLife. 2014;3:e02951. doi: 10.7554/eLife.02951. [DOI] [PMC free article] [PubMed] [Google Scholar]
  66. Simon AF, Chou MT, Salazar ED, Nicholson T, Saini N, Metchev S, Krantz DE. A simple assay to study social behavior in Drosophila: measurement of social space within a group. Genes, Brain, and Behavior. 2012;11:243–252. doi: 10.1111/j.1601-183X.2011.00740.x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  67. Stalker OJS, Harrison D. Spacing patterns of female Drosophila paramelanica. Animal Behaviour. 1961;9:77–78. [Google Scholar]
  68. Sumpter D, Buhl J, Biro D, Couzin I. Information transfer in moving animal groups. Theory in Biosciences. 2008;127:177–186. doi: 10.1007/s12064-008-0040-1. [DOI] [PubMed] [Google Scholar]
  69. Sweeney ST, Broadie K, Keane J, Niemann H, O'Kane CJ. Targeted expression of tetanus toxin light chain in Drosophila specifically eliminates synaptic transmission and causes behavioral defects. Neuron. 1995;14:341–351. doi: 10.1016/0896-6273(95)90290-2. [DOI] [PubMed] [Google Scholar]
  70. Tinette S, Zhang L, Robichon A. Cooperation between Drosophila flies in searching behavior. Genes, Brain and Behavior. 2004;3:39–50. doi: 10.1046/j.1601-183x.2003.0046.x. [DOI] [PubMed] [Google Scholar]
  71. Toda H, Zhao X, Dickson BJ. The Drosophila female aphrodisiac pheromone activates ppk23(+) sensory neurons to elicit male courtship behavior. Cell Reports. 2012;1:599–607. doi: 10.1016/j.celrep.2012.05.007. [DOI] [PubMed] [Google Scholar]
  72. Turing AM. The chemical basis of morphogenesis. Phil Trans Roy Soc London. 1952;237:37–72. doi: 10.1098/rstb.1952.0012. [DOI] [Google Scholar]
  73. Turner AB. Spatial point patterns: methodology and applications with R. Chapman & Hall/CRC Interdisciplinary Statistics; 2015. [Google Scholar]
  74. Tuthill JC, Wilson RI. Parallel transformation of tactile signals in central circuits of Drosophila. Cell. 2016;164:1046–1059. doi: 10.1016/j.cell.2016.01.014. [DOI] [PMC free article] [PubMed] [Google Scholar]
  75. Vosshall LB, Stocker RF. Molecular architecture of smell and taste in Drosophila. Annual Review of Neuroscience. 2007;30:505–533. doi: 10.1146/annurev.neuro.30.051606.094306. [DOI] [PubMed] [Google Scholar]
  76. Walker RG, Willingham AT, Zuker CS. A Drosophila mechanosensory transduction channel. Science. 2000;287:2229–2234. doi: 10.1126/science.287.5461.2229. [DOI] [PubMed] [Google Scholar]
  77. Xie T, Ho MCW, Liu Q, Horiuchi W, Lin CC, Task D, Luan H, White BH, Potter CJ, Wu MN. A genetic toolkit for dissecting dopamine circuit function in Drosophila. Cell Reports. 2018;23:652–665. doi: 10.1016/j.celrep.2018.03.068. [DOI] [PMC free article] [PubMed] [Google Scholar]
  78. Yan Z, Zhang W, He Y, Gorczyca D, Xiang Y, Cheng LE, Meltzer S, Jan LY, Jan YN. Drosophila NOMPC is a mechanotransduction channel subunit for gentle-touch sensation. Nature. 2013;493:221–225. doi: 10.1038/nature11685. [DOI] [PMC free article] [PubMed] [Google Scholar]
  79. Zhan YP, Liu L, Zhu Y. Taotie neurons regulate appetite in Drosophila. Nature Communications. 2016;7:13633. doi: 10.1038/ncomms13633. [DOI] [PMC free article] [PubMed] [Google Scholar]
  80. Zhang YV, Ni J, Montell C. The molecular basis for attractive salt-taste coding in Drosophila. Science. 2013a;340:1334–1338. doi: 10.1126/science.1234133. [DOI] [PMC free article] [PubMed] [Google Scholar]
  81. Zhang Z, Li X, Guo J, Li Y, Guo A. Two clusters of GABAergic ellipsoid body neurons modulate olfactory labile memory in Drosophila. Journal of Neuroscience. 2013b;33:5175–5181. doi: 10.1523/JNEUROSCI.5365-12.2013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  82. Zhong L, Hwang RY, Tracey WD. Pickpocket is a DEG/ENaC protein required for mechanical nociception in Drosophila larvae. Current Biology. 2010;20:429–434. doi: 10.1016/j.cub.2009.12.057. [DOI] [PMC free article] [PubMed] [Google Scholar]

Decision letter

Editor: Mani Ramaswami1
Reviewed by: Craig Montell2

In the interests of transparency, eLife publishes the most substantive revision requests and the accompanying author responses.

Acceptance summary:

The work examines the origins of collective behaviour by developing and studying the dynamics and neural basis for group formation in a paradigm that they establish and describe for Drosophila melanogaster. One main finding is that Drosophila can spontaneously assemble into a stable cluster through a mechanism that involves dyadic interactions between individual flies. By analysis of several sensory mutants in flies, the work shows that these encounters are mediated by appendage touches and that the social distance of the cluster is regulated by pickpocket-specific mechanosensory neurons. It nicely combines new organismal biology, with genetics and mathematical modelling to provide insight to how social clusters can form through simple mechanisms.

Decision letter after peer review:

[Editors’ note: the authors submitted for reconsideration following the decision after peer review. What follows is the decision letter after the first round of review.]

Thank you for submitting your work entitled "Emergence of social cluster by collective dyadic actions in Drosophila" for consideration by eLife. Your article has been reviewed by three peer reviewers, and the evaluation has been overseen by Mani Ramaswami as Reviewing Editor and a Senior Editor. The following individual involved in review of your submission has agreed to reveal their identity: Mario de Bono (Reviewer #2).

Our decision has been reached after consultation between the reviewers. Based on these discussions and the individual reviews below, we regret to inform you that your work will not be considered further for publication in eLife.

The manuscript does provide an elegant assay for social clustering of Drosophila in an arena, and several interesting and innovative analyses to address the underlying mechanisms. However, as elaborated in the reviews below, there is a consensus among the reviewers that it will require several additional experiments and much more work to represent progress necessary for publication in eLife. The reviewers however are also supportive enough to suggest that, should the authors choose to do so, then eLife should remain willing to examine a completely revised and resubmitted manuscript as a new submission to the journal.

Reviewer #1:

Zhu and colleagues focus on using fruit flies to characterize the behavioral mechanisms underlying social clustering. They document that cluster formation occurs spontaneously over the course of minutes. It is effected by a variety of parameters such as social experience, hunger and the time of day. The authors tested the contributions of different sensory modalities to clustering, and conclude that vision, olfaction (in females) and mechanosensation contribute to clustering. The work also explores the interactions of pairs of flies and the consequences on moving in or out of the cluster to result in cluster growth. They conclude that wing length affects the social space, with longer wings increasing social space. Overall, this work is interesting. However, there are many issues and deficits that need to be addressed in order for this work to be clear and convincing.

1) The whole paper is concerned with cluster formation, but it is never properly defined. For example, in examining Figure 1C, it not clear why some flies on the edges are included in the cluster and others are excluded. Also, the authors define stages of clustering (1, 2 and 3) based on the number of flies in the cluster. However, the clusters are dynamic. How do they account for some flies moving out and reversion of stage 3 to 2 or 2 to 1? Also, how do they decide which flies on the edges are included?

2) Some additional detail would be helpful to clarify how the analysis of 50 virtual flies was performed. The code should be provided. In addition, add pictures showing the distribution of the virtual flies. An important related issue concerns edge effects. It appears that the clusters form on the edges of arenas. Therefore, the effects of the edges should be included in the modeling of the virtual flies.

3) The calculation to obtain SSI as provided in the Materials and methods is not clear. The cluster index as defined in the Materials and methods is CI = Nclustered flies/Ntotal flies. Therefore, the maximum value should be a maximum of 1.0. Yet, in the figures is scored from 0 to 100.

The term “near-neighbor” is not defined. The term "encounter" is also not defined formally. How close do flies have to be for an encounter? Does an encounter require touching? Define in the main text what is meant by "inter-fly interactions."

4) The authors mentioned that they "observed frequent appendage touches between flies when analyzing the social encountering events during the process of socialclustering." Quantification of this behavior needs to be provided.

5) To test the contributions of different sensory modalities to cluster formation, the authors surgically removed appendages and used mutants. Some mutants, such as nan and iav affect locomotion and coordination. The authors cannot use mutants such as these to conclude that mechanosensation has a role in cluster formation without devising a strategy to mitigate effects of locomotion and coordination.

6) Examining the poxn mutant to assess whether or not there is a role for the gustatory response for clustering is too cursory. The effects of mutations that disrupt broadly required taste receptors such as Gr66a should be examined. Also, by eliminating the GRNs with poxn, both the gustatory and contact pheromone responses are affected. The authors need to discern between these possibilities.

7) To examine a contribution of vision, the authors mention that they used IR light. I presume this is indicated as "dark" conditions, which should be relabeled as IR for clarity. It is inaccurate to conclude that a defect in cluster formation exhibited by w1118 flies supports a role for vision. The w gene encodes an ABC transporter that is expressed in many cell types. Therefore, the w1118 mutation could affect behavior through altering any of several sensory modalities.

8) Related to the previous point regarding w1118 is the genetic background used for the control. Throughout the paper, the authors use Canton S (CS) as the control. However, they do not indicate whether the various mutants analyzed have been outcrossed to CS. If the backgrounds of some of their lines is w1118, then their conclusions as to the contributions of a given mutant to cluster formation are suspect. The authors need to outcross all of their mutants to a standard control background.

9) The data need to be presented using a consistent scheme. For example, in Figure 1—figure supplement 4, CI is expressed either as bar graphs, whisker plots, or simply by a dot plot with a horizontal line, which is not defined. The type of bar and whisker plots are also not described in the legends. It is essential that the authors are consistent throughout all figures.

10) Figure 5: To study the effect of wing length, leg length and body size on social space the authors adjusted the length of the fly wing by cutting or gluing another wing onto the existing wing to extend it. Similar methods are used to shorten legs or extend body length. However, cutting wings and legs may affect locomotor activity, which is critical for social cluster formation. Moreover, there are many gustatory neurons and mechanosensory neurons on the wing margins and tarsi. Therefore, cutting the wings would affect gustation and mechanosensation, which appear to be required for cluster formation. Gluing wings or adding copper wires to the flies could stress the flies and may strongly affect their overall activity. This manipulation might also induce glooming behavior, which could impact on cluster formation. Gluing wings or wires to a fly has too many potential unintended consequences, and cannot be properly interpreted in terms of effects on wing or body length on cluster formation. The authors need to find another way to test their hypotheses.

11) Figure 6: The ppk-GAL4 is expressed in multiple types of neurons. Therefore, the authors use of the ppk-GAL4 to manipulate the activities of mechanosensor neurons is rather preliminary, and should be followed up with similar experiments targeting different types of mechanosensory neurons.

12) Add videos illustrating various behaviors.

13) There are many examples of statements in the manuscript without referring to the relevant figure. As a result, this manuscript is unnecessarily difficult to read. Some examples are:

In the third paragraph of the subsection “Spontaneous formation of orderly social cluster”, change Figure 1—figure supplement 2B to Figure 1—figure supplement 3B.

In the fourth paragraph of the aforementioned subsection it should be Figure 1G, not Figure 1F.

In the third paragraph of the subsection “Collective dyadic interactions contribute to the clustering process”, change Figure 3B to 3C.

In the first paragraph of the subsection “Cluster grows by social encountering at its border”, change the second mention of Figure 4B-F to Figure 4—figure supplement 1.

14) The authors state that "The approaching flies preferred to use their frontal legs," however, this is not shown in Figure 3 and should be added.

Reviewer #2:

The paper by Jiang et al. studies clustering of Drosophila in a 2D environment. The authors use machine vision to extract parameters for fly-fly interactions in populations of wild-type and mutant flies. Using these data they build a picture of how flies form clusters. Their data suggest pairwise interactions sustained by multisensory inputs and modifiable by experience hold the group together. The paper is well written, and the experiments described are well-executed (although see comments below).

The paper follows previous work, notably Schneider et al., 2012 and Simon et al., 2012, both referenced in the work. There is overlap with these papers, both in methodology and results. This overlap is my main concern, as it diminishes the novelty of this paper. One way to overcome this limitation is to test if selectively inhibiting ppk expressing neurons in the foreleg, or the wing margin, inhibits clustering. Another is to examine in more detail why mutants described in Figure 4—figure supplement 2 fail to cluster, by careful analysis of pairwise encounters.

1) Subsection “Spontaneous formation of orderly social cluster”, third paragraph. For the simulation the authors required virtual flies to not be closer to each other than 2 mm (Materials and methods, subsection “Social cluster index and social space index”, last paragraph). It is not clear to me how this can be justified, given that many real flies approach within 1 – 2 mm of each other (Figure 1—figure supplement 3C. It seems to me the modeling needs to be redone with a 1 mm minimum distance. How does reducing the minimum distance to 1 mm effect the modeling?

2) Subsection “Cluster grows by social encountering at its border”, third paragraph. Can the authors examine further why cluster formation is delayed in mutants, and why the clusters formed rapidly dispersed in these animals? This will require looking at the formation of clusters and measuring the behavior of animals following an encounter (e.g. speed).

3) Subsection “Mechanosensory neurons are necessary for establishing normal social space”. To extend the novelty of their work, can the authors pinpoint if mechanosensory neurons in the fore-leg, or wing margin, promote clustering, by using drivers that selectively target these neurons?

Reviewer #3:

This manuscript addresses the baseline clustering properties of adult fruit flies. This is an area of rapid advancement and so any work here is well placed in time. The authors examine self-assembling clusters in terms of average approach distance and then use this metric to examine various sensory mutants. They conclude that ppx neurons, neurons normally associated with pain, are important. Finally, they conduct a set of prosthetic experiments, shortening or extending wings to conclude that wings size is important for social distance. There are a number of places where this work has some strengths, the big issue is that this is in fact very similar to a better conducted work published in 2012 in PNAS (Schneider et al., 2012, referenced in paper). The figures and conclusions are very similar but Schneider et al. conduct a more sophisticated analysis and arrive at more sophisticated conclusions. The authors really need to address head-on why their work is an extension of this previously published work. I am therefore not very favorable for this manuscript to be published in eLife.

[Editors’ note: further revisions were suggested prior to acceptance, as described below.]

Thank you for submitting your article "Emergence of social cluster by collective pairwise encounters in Drosophila" for consideration by eLife. Your article has been reviewed by two peer reviewers, and the evaluation has been overseen by Mani Ramaswami as Reviewing Editor and K VijayRaghavan as the Senior Editor. The following individual involved in review of your submission has agreed to reveal their identity: Craig Montell (Reviewer #2).

The reviewers have discussed the reviews with one another and the Reviewing Editor has drafted this decision to help you prepare a revised submission.

Summary:

The work examines the origins of collective behaviour by developing and studying the dynamics and neural basis for group formation in a paradigm that they establish and describe for Drosophila melanogaster. One main finding is that Drosophila can spontaneously assemble into a stable cluster through a mechanism that involves dyadic interactions between individual flies. By analysis of several sensory mutants in flies, the work shows that these encounters are mediated by appendage touches and that the social distance of the cluster is regulated by pickpocket-specific mechanosensory neurons. It nicely combines new organismal biology, with simple genetics and mathematical modelling to provide insight to how social clusters can form through simple mechanisms.

Essential revisions:

1) The Discussion should clearly address why social clusters that form so efficiently in these studies have not been observed previously. The careful rebuttal seems to suggest that this cannot be explained by number of flies involved or in size of the arena. A major hope is that these interesting observations can be easily reproduced in other labs. A deeper engagement with possible external needs for cluster formation will be valuable to readers in the field.

2) To broaden the impact of the findings, it will be useful to discuss whether there are other examples/observations consistent with cluster building based on pair wise interactions, and also whether, in theory, more complex models be reduced to simple pairwise rules?

3) It would be useful to formally engage, perhaps using a Monte Carlo analysis, with the possibility that simple hard-core Poisson distribution of attraction and short-scale repulsion can explain these results. If it cannot, as the authors believe, then this should be demonstrated.

eLife. 2020 Jan 21;9:e51921. doi: 10.7554/eLife.51921.sa2

Author response


[Editors’ note: what follows is the authors’ response to the first round of review.]

Reviewer #1:

[…] Overall, this work is interesting. However, there are many issues and deficits that need to be addressed in order for this work to be clear and convincing.

1) The whole paper is concerned with cluster formation, but it is never properly defined. For example, in examining Figure 1C, it not clear why some flies on the edges are included in the cluster and others are excluded.

We thank the reviewer for pointing it out. In this version, we dedicated the second subtitle (“Social cluster in fruit flies is a well-structured network”) as well as Figure 2 and its supplementary figures and Video 3 to define a cluster and explore the various criteria used to identify a cluster.

Generally, deciding whether a nearby individual belongs to a cluster is rather arbitrary without predefined thresholds. We developed a six-step procedure to automatically and objectively reconstruct a cluster from an image of a group of flies (Figure 2A, Video 3). The flies were assigned to a cluster based on the distance threshold and area threshold (Figure 2B). Varying the stringency of the criterial settings of clustering (CSC), we obtained different clusters and chose an optimal setting (CSC = 2) to study the geometric properties of a cluster (Figure 2D-G).

Also, the authors define stages of clustering (1, 2 and 3) based on the number of flies in the cluster. However, the clusters are dynamic. How do they account for some flies moving out and reversion of stage 3 to 2 or 2 to 1?

We thank the reviewer for careful inspection. With time zero referring to when flies were first introduced into the arena, the time period of 520 minutes is the growing phase of a typical cluster in wild-type flies. We divided this period into 3 successive stages (stage 1, 2 and 3) with an interval of 5 minutes to conveniently describe the changing dynamic properties of the group during cluster growth. Reversion of stages would not happen due to their fixed starting and finishing time.

Additionally, clusters formed by wild-type flies always increased their size (number of flies) during the observation period (stage 1 to 3). While there were some flies leaving the cluster, more flies joined the cluster in the same time period (Figure 3A).

We now make this clear in the text (subsection “Collective dyadic interactions contribute to the clustering process”) and figure legend (Figure 3A, C).

Also, how do they decide which flies on the edges are included?

Please see the first answer on cluster identification as well. Whether a fly near a cluster belongs to that cluster was determined by its distances to the flies belonging to that cluster. If the minimal distance was less than a threshold distance, then this fly would be included in the cluster (line 189 and Figure 2A step 4; Video 3).

On a related topic, the flies belonging to a cluster were classified into insiders and outsiders (those constituting the outer edge of the cluster) (line 205 and Figure 2A step 5).

2) Some additional detail would be helpful to clarify how the analysis of 50 virtual flies was performed. The code should be provided.

We thank the reviewer for the helpful suggestions. We now include two methods to generate random flies and random dots (details are in Materials methods).

The random flies were derived from the data set of wild-type flies of the same gender. Therefore, the random flies ultimately had the same spatial distribution as the wild-type flies, when all arenas were considered together. When a virtual arena was built to have 50 random flies, flies were randomly taken from the set of wild-type flies and added to the arena with their position, shape and orientation preserved, while the fly that would overlap with others already placed in the arena was skipped. Figure 2—figure supplement 1 shows the examples of spatial distribution of wild-type flies and random flies.

The second type of simulation was with random dots. Generated via the point process, these dots randomly distributed in an arena (Figure 2—figure supplement 4). Besides the center location, each dot also has a minimal allowed distance. When this distance is non-zero, the point process is a Hard-Core Matérn point process (Type II) (Baddeley et al., 2015); when this distance is zero, the point process is a Poisson point process.

We generated the random dots for two purposes. First, the point process allowed us to generate various spatial distributions that would not be observed in wild-type flies. Second, we used these distributions to address a related question by reviewer #3 – whether the spatial distribution of wild-type flies are the same or similar to that of Hard-Core Matérn point process.

We are happy to provide the source code in Matlab.

In addition, add pictures showing the distribution of the virtual flies.

A typical distribution of the random flies is provided in Figure 1—figure supplement 4D.

Typical distributions of random dots are provided in Figure 2—figure supplement 6A-D. The quantifications of random dots are in Figure 2—figure supplement 6E, F.

An important related issue concerns edge effects. It appears that the clusters form on the edges of arenas. Therefore, the effects of the edges should be included in the modeling of the virtual flies.

We appreciate the suggestion about the edge effect. The area of a circle increases quadratically as the radius increases. By this factor alone, there would be a higher chance for a cluster to appear near the edge, instead of the center, of an arena. On top of that, the thigmotaxis in Drosophila could also push flies to cluster near the edge.

In most analyses of this version, we compared the properties of wild-type flies with those of random flies. As described earlier, these random flies and the wild-type flies had similar overall spatial distribution, because they belonged to the same data set. Any edge effect in the wild-type flies would also persist in the random flies. Author response image 1 shows the cumulative spatial distribution of wild-type flies and random flies.

Author response image 1.

Author response image 1.

3) The calculation to obtain SSI as provided in the Materials and methods is not clear.

We thank the reviewer for pointing this out. In this version, we included details of the definition of SSI both in the text (subsection “Spontaneous formation of social clusters”, eighth paragraph) and Materials and methods and Figure 1. SSI is based on the histogram of the nearest-neighbor distances of a fly group which were binned with an increment of 5 mm (Figure 1P). For example, SSI in Figure 1Q was calculated as the difference between the first bin and the second bin in Figure 1P:

SSI = percentage of flies in bin1 – percentage of flies in bin2.

The cluster index as defined in the Materials and methods is CI = Nclustered flies/Ntotal flies. Therefore, the maximum value should be a maximum of 1.0. Yet, in the figures is scored from 0 to 100.

We thank the reviewer for careful observation. Cluster Index was defined as CI = Nclustered flies/Ntotal flies x 100%, so the maximum was 100 instead of 1. We found that CI caused confusions while it didn’t provide more information to justify the extra space for the main text, figures and figure legends. After our careful discussion, we decided to remove Cluster Index from this version.

The term “near-neighbor” is not defined.

Near-neighbors are the surrounding flies of a reference fly, and it was not defined strictly because no distance threshold was set to include or exclude the surrounding flies. In this version, when we consider the multiple near-neighbors, we first sorted, in ascending order, the distances of the reference fly to all other flies in the group. The flies having the first Nth smallest distances were called the N-th near-neighbors, and N is the count of near neighbors (N = 1 to 8) (Figure 1N, O; Figure 1—figure supplement 5, 6).

The term "encounter" is also not defined formally. How close do flies have to be for an encounter? Does an encounter require touching?

We thank the reviewer for raising this point. An encounter event between two flies has to meet two criteria: 1. The distance between them is within 1.5 body length; 2. Interactor is facing and walking toward interactee, regardless of the orientation of interactee. We have added the definition to the text (subsection “Collective dyadic interactions contribute to the clustering process”).

Touching does not necessarily accompany an encounter. However, in our study, about 94% of encounters displayed physical touches, and the description is added as well (subsection “Asymmetric interactions and stereotypic consequences of pair-wise social encounters”, second paragraph).

Define in the main text what is meant by "inter-fly interactions."

"Inter-fly interactions" indicates the interactions between flies. In this paper, interactions were almost exclusively between pairs (subsection “Collective dyadic interactions contribute to the clustering process”, last paragraph).

4) The authors mentioned that they "observed frequent appendage touches between flies when analyzing the social encountering events during the process of socialclustering." Quantification of this behavior needs to be provided.

We thank the reviewer for this helpful suggestion. We determined that about 94% of encounters were accompanied with physical touches (subsection “Asymmetric interactions and stereotypic consequences of pair-wise social encounters”, second paragraph). Further analyses on the touching sites, relative frequency and time-stamped touching events were in Figure 3D, E and Figure 3—figure supplement 1A, B.

5) To test the contributions of different sensory modalities to cluster formation, the authors surgically removed appendages and used mutants. Some mutants, such as nan and iav affect locomotion and coordination. The authors cannot use mutants such as these to conclude that mechanosensation has a role in cluster formation without devising a strategy to mitigate effects of locomotion and coordination.

We agree with the reviewer (and other reviewers) that abnormal locomotion and coordination in mutants would potentially affect social clustering. However, in the case of iav1 and nan36a, the mutant flies exhibited sufficient ability of locomotion and coordination, if not better than the wild-type flies (CS) in our tests:

a) When analyzed the spontaneous walking activity, both mutants showed higher locomotion speed (average speed and maximal speed) than the wild-type flies (Figure 6—figure supplement 1A-C). Additionally, both mutants showed higher acceleration and deceleration than the wild-type flies, indicating their coordination of walking is unlikely an inhibitory factor for social events (Figure 6—figure supplement 1D-G).

b) When tested for climbing ability, our results indicated that iav1showed severe impairment in climbing (data of iav1shown in Author response image 2).

Author response image 2.

Author response image 2.

c) The number of social encounter events in either type of mutant is higher than the wild-type flies during the same period (Figure 6A), suggesting these mutants are very active.

Therefore, we conclude that the lack of social clustering in the mutants in our tests (including ia1and nan36a) is unlikely due to defects in coordination and activity.

6) Examining the poxn mutant to assess whether or not there is a role for the gustatory response for clustering is too cursory. The effects of mutations that disrupt broadly required taste receptors such as Gr66a should be examined. Also, by eliminating the GRNs with poxn, both the gustatory and contact pheromone responses are affected. The authors need to discern between these possibilities.

We appreciate the suggested experiments and have conducted these tests accordingly.

In order to differentiate the roles of gustatory and contact pheromone response in clustering, we tested several gustatory receptor mutants, including Gr33a1(bitter), Gr64f -/-(sugar), Ir76b1(fatty acid and salt) and contact pheromone related mutants ΔGr32a1and ΔPPK23. The GRN mutants failed to form social clusters (subsection “Multiple sensory modalities are required for cluster formation”, third paragraph) (Figure 5—figure supplement 1A), suggesting that the poxn phenotype includes at least an abnormal gustatory response. Additionally, loss of sense for contact pheromones also inhibit the clustering process (Figure 5—figure supplement 1A), suggesting that a normal sensation of gustatory cues and contact pheromones are required for social clustering. A key clue is the high frequency (94%) of appendage touches during the encounter event. We supposed that transmitting information of gustatory cues and contact pheromones via a single physical touch during encounter is more effective and therefore is evolutionarily favorable.

The Gr66a mutant (BL28804) suggested by the reviewer #1 was too weak to collect enough flies for testing – we need 50 flies per arena and multiple arenas to repeat. Our preliminary results showed that Gr66a-GAL4 and Gr33a-GAL4 have very similar projection patterns in the brain (though Gr33a-GAL4 labels fewer neurons). Therefore, we tested Gr33a1 instead.

7) To examine a contribution of vision, the authors mention that they used IR light. I presume this is indicated as "dark" conditions, which should be relabeled as IR for clarity.

We thank the reviewer for pointing this out. We used IR to label the flies in “dark” condition in the current version (Figure 5A).

It is inaccurate to conclude that a defect in cluster formation exhibited by w1118 flies supports a role for vision. The w gene encodes an ABC transporter that is expressed in many cell types. Therefore, the w1118 mutation could affect behavior through altering any of several sensory modalities.

We agree with the reviewer for the concern. In the revision, the results of w1118 mutants are now removed. Instead, we tested the norpA33 mutants (visual defective) as well as the wild-type flies in darkness (under IR light). Results from both testes supported that vision is required to mediate the social clustering.

8) Related to the previous point regarding w1118 is the genetic background used for the control. Throughout the paper, the authors use Canton S (CS) as the control. However, they do not indicate whether the various mutants analyzed have been outcrossed to CS. If the backgrounds of some of their lines is w1118, then their conclusions as to the contributions of a given mutant to cluster formation are suspect. The authors need to outcross all of their mutants to a standard control background.

We noticed that genetic backgrounds influence fly’s behavior. In this study, the mutant flies were backcrossed to CS background for 8-10 generations, regardless of their original genetic background. This description is now added to Materials and methods.

9) The data need to be presented using a consistent scheme. For example, in Figure 1—figure supplement 4, CI is expressed either as bar graphs, whisker plots, or simply by a dot plot with a horizontal line, which is not defined. The type of bar and whisker plots are also not described in the legends. It is essential that the authors are consistent throughout all figures.

We thank the reviewer for this thoughtful suggestion and have made a large number of changes throughout the revision. Now we present our results in a consistent style from figure to figure. The results of CI are removed in this version.

10) Figure 5: To study the effect of wing length, leg length and body size on social space the authors adjusted the length of the fly wing by cutting or gluing another wing onto the existing wing to extend it. Similar methods are used to shorten legs or extend body length. However, cutting wings and legs may affect locomotor activity, which is critical for social cluster formation. Moreover, there are many gustatory neurons and mechanosensory neurons on the wing margins and tarsi. Therefore, cutting the wings would affect gustation and mechanosensation, which appear to be required for cluster formation. Gluing wings or adding copper wires to the flies could stress the flies and may strongly affect their overall activity. This manipulation might also induce glooming behavior, which could impact on cluster formation. Gluing wings or wires to a fly has too many potential unintended consequences, and cannot be properly interpreted in terms of effects on wing or body length on cluster formation. The authors need to find another way to test their hypotheses.

We thank the reviewer for the insight. In this revision, we remove all of the results related to surgical manipulations on wings, legs and the body dimension.

11) Figure 6: The ppk-GAL4 is expressed in multiple types of neurons. Therefore, the authors use of the ppk-GAL4 to manipulate the activities of mechanosensor neurons is rather preliminary, and should be followed up with similar experiments targeting different types of mechanosensory neurons.

We thank the reviewer for raising this point. First, the expression patterns of ppk-GAL4 suggested multiple regions in the brain, VNC and the peripheral appendages (leg and wing). The well-known function of the ppk neurons is their response to mechanical stimulation in larvae (Adams et al., 1998, Zhong et al., 2010), or in adult (Olds and Xu, 2014, Shao et al., 2019). Therefore, ppk neurons mediating physical touches being critical for social clustering, is our primary working hypothesis.

As suggested by the reviewer, we had performed additional experiments to forcibly activate the other mechanosensory neurons and more candidate neurons with CsChrimson (see the list below). However, none of them displayed extensive aggregation phenotype comparable with ppk-GAL4, suggesting the specific role of ppk neurons in mediating this behavior.

Additionally, our imaging results suggested that a group of ppk neurons on the tip of the tarsus were activated in a contact dependent manner when flies were in a social group. Although we cannot rule out other possibilities, the most straightforward conclusion is that those tarsal ppk neurons participated in social clustering. We tone down our description of menchanosensation in revision as we still lack direct evidence.

List of new neurons tested:

a) Broadly expressed mechanosensory neurons: R52A06-GAL4 (BL38810), R30B01-GAL4 (BL49517), R81E10-GAL4 (BL48367) (Li et al., 2016, Hampel et al., 2017).

b) Wing mechanosensory neurons: R30B01-AD (BL70175) X R31H10-DBD (BL69835), R31H10-AD (BL69917) X R34E03- DBD (BL69836) (Hampel et al., 2017).

c) Leg mechanosensory neurons: R65A11 (BL39333), R20C06 (BL48884), R55B01 (BL39100), R13E04 (BL48565), R93A02 (BL40635), R46D02 (BL50263), R27E02 (BL49222), R93D11 (BL40654), R86G01, R74B10 (BL41300), R27B07 (BL49212). R39A11 (BL50034), R39D08 (BL50047), R22A04 (BL48963), R14F12 (BL48654), R41A08 (BL50108); R86D09, R95A11 and R46H11 (Ramdya et al., 2015).

d) Unknown neurons with their projection patterns in VNC similar to the mechanosensory GAL4s above: ~80 lines (from fly Light) (Jenett et al., 2012).

12) Add videos illustrating various behaviors.

We thank the reviewer for the suggestion. We now add 3 videos to show the various behaviors:

a) a video showing progress of social clustering in wild-type flies (Video 1);

b) a high-speed video showing the encounter event and appendage touches between the pair (Video 4);

c) a video showing pairwise interactions at the cluster edge (Video 5).

Additionally, we add two videos to help the readers to understand the related quantification methods (Video 2 for Figure 1D and Video 3 for Figure 2A).

13) There are many examples of statements in the manuscript without referring to the relevant figure. As a result, this manuscript is unnecessarily difficult to read. Some examples are:

In the third paragraph of the subsection “Spontaneous formation of orderly social cluster”, change Figure 1—figure supplement 2B to Figure 1—figure supplement 3B.

In the fourth paragraph of the aforementioned subsection it should be Figure 1G, not Figure 1F.

In the third paragraph of the subsection “Collective dyadic interactions contribute to the clustering process”, change Figure 3B to 3C.

In the first paragraph of the subsection “Cluster grows by social encountering at its border”, change the second mention of Figure 4B-F to Figure 4—figure supplement 1.

We amended all of these problems in the revision.

14) The authors state that "The approaching flies preferred to use their frontal legs," however, this is not shown in Figure 3 and should be added.

We thank the reviewer for the suggestion. We added a high-speed video and a sequence of frames from the video to illustrate the frontal leg actions of a pair during an encounter process (Video 4; Figure 3H; Figure 3—figure supplement 2)

Reviewer #2:

The paper by Jiang et al. studies clustering of Drosophila in a 2D environment. The authors use machine vision to extract parameters for fly-fly interactions in populations of wild-type and mutant flies. Using these data they build a picture of how flies form clusters. Their data suggest pairwise interactions sustained by multisensory inputs and modifiable by experience hold the group together. The paper is well written, and the experiments described are well-executed (although see comments below).

The paper follows previous work, notably Schneider et al., 2012 and Simon et al., 2012, both referenced in the work. There is overlap with these papers, both in methodology and results. This overlap is my main concern, as it diminishes the novelty of this paper.

We are grateful to reviewer #2 and highly appreciate the constructive comments by reviewer #2. We would like to articulate the novelty of our results over existing literature.

We highly respect the previous work on social spacing by Simon et al., 2012 and social interaction network (SIN) by Schneider et al., 2012. Not only did we find their results relevant, but also we learned a great deal from both papers. Therefore, both versions of our paper heavily referenced their results.

Schneider et al., 2012 focused on the iterated social interactions between fly pairs in a group of 12 flies. The authors extracted the events of transient interactions in the arena to build SIN then modeled that with social network to evaluate the transmission of information. Following their example, we used “Interacteer” and “interacttee” to describe asymmetric interactions of two flies. Also we learned to simulate independent flies from the data set of actual flies from Schneider et al., 2012.

Notably, Schneider et al., 2012 reported the social structures in a group (SIN is a network composed of interactions), but did not report any social clusters (a network composed of individual flies) or aggregations (composed of flies, but without structures or regularity) -- maybe the flies did not form clusters in their setup. Therefore it is highly likely that we worked on a different social paradigm from that of Schneider et al., 2012.

Simon et al., 2012 focused on social space. The authors are the first to use Social Space Index (SSI), which was also used in our paper. Simon et al., 2012 evaluated both horizontally-placed circular arenas and vertical triangular arenas Flies in both arena showed aggregation but without characters of regularity (see Figure 2A, 2C, 2G in Simon et al., 2012). Furthermore, the vertically placed arena might skew the distribution of flies toward the top due to their negative geotaxis. Simon et al., 2012 focused on the static social space, rather than the dynamic process to get there. In analogues, if this is the same paradigm, we studied video sequences whereas they worked on the last snapshot.

Different research goal. The first and most significant difference of our work from the two previous works is the goal. We found that a group of flies formed a cluster with order and regularity. This was not observed by Schneider et al., 2012 or Simon et al., 2012. The aggregations in Simon et al., 2012 did not reveal any structure features (Figure 2C and Figure 2G in Simon et al., 2012) and, as expected, organization, order or regularity were not analyzed or discussed at all by Simon et al., 2012.

Similarly, Schneider et al., 2012 did not report observing any social aggregations or clusters. Therefore, neither Schneider et al., 2012 nor Simon et al., 2012 studied social clustering, which is the main topic of our paper. In the revision, our goal of characterizing the social clusters and investigating the underlying mechanisms for cluster formation, is indeed unique.

Different paradigms. As discussed earlier, we worked on social cluster – a well-structured social network of individual flies, which is different from either Schneider et al., 2012 or Simon et al., 2012.

Different time window – assuming the same paradigm. Schneider et al., 2012 focused on the network of social interactions within a group. As no cluster formed there, it would be equivalent to the initiation phase of social clustering in our study (0-5 min), where no cluster core has yet formed (Figure 5E-G) – even though their analysis was between 15-45 minutes after flies were introduced into the arena. On the other hand, Simon et al., 2012 studied the end results of social interactions of a group, the final social distance, not the dynamic process of aggregation. We investigated how initially dispersed flies form a cluster, covering the initiation, development and final structures of the clusters, with the time period focus of 5-20 min.

Different approaches. Both Simon et al.,2012 and Schneider et al.,2012 tracked the fly’s distributions to reach certain quantifiable parameters and then measure those parameters in mutants to evaluate their roles in the corresponding process. Our paper followed this general scheme as well.

However, besides mutants, we manipulated the activities of target neurons to evaluate the functions of related neurons. We also employed calcium image to measure the activity of neurons after social interaction. Both approaches lead to interesting findings of ppk neurons (Figure 7, 8).

Notably, Schneider et al., 2012 extensively used powerful network analysis algorithms to quantify the social interaction networks between 12 flies. As admirable as an algorithm can be, it would not predict the social interaction network of 50 (or even 13) flies. It could not foresee the qualitative changes when quantitative changes reach a certain limit. For example, we now know that only when the number of flies is greater than 10, clusters are readily formed (Figure 2—figure supplement 5C). Besides the number of flies, it is likely that the size of arena would also influence the key SIN parameters as they ultimately describe the information passage where the distance is rather critical. That is, we would not know how their conclusions hold in an arena of another size.

Simon et al., 2012 varied the number of flies from 10 to 40 to test the social space of the stable aggregates. Similarly, we systematically varied the number of flies and the size of the arena to make sure the conclusions are robust in a broader situations (Figure 2—figure supplement 5, 6). Additionally, a major result that pairwise interactions near the cluster edge drive cluster growth is intrinsically independent of arena size or number of flies (Figure 4).

In Schneider et al., 2012, results of the iterative network analysis reflected the patterns of reciprocal interactions between flies. Nevertheless, their analysis assumed that the SIN is essentially a time-invariant system (Supplementary Figure 4, in Schneider et al., 2012) and the parameters of social interaction networks do not change over time. Additionally, abstraction of interactions into a SIN removes important spatial information, so a SIN inherently contains less information and therefore is less powerful and less robust. In contrast, from our work, we know that as the cluster evolves, the inter-fly interactions vary over time (Figure 3 and Figure 3—figure supplement 1) and location (Figure 4 and Figure 4—figure supplement 1, 2), especially for those interactions that occurred near the cluster edge.

Notably, the speed, duration and behavioral outputs of social interactions were not encoded by the SIN in Schneider et al., 2012. In our analysis, all three of these are critical to explain the failure of cluster formation in mutants (Figure 6). We also showed that the outputs of the encounters near the cluster edge directly promote the cluster growth (Figure 4).

Different results and conclusions. As we only studied the cluster and cluster formation, it would be clear that our results and conclusion are different from both Schneider et al., 2012 and Simon et al., 2012. The subtitles of our revision are: spontaneous formation of orderly social clusters; social cluster in fruit flies is a well-structured network; collective dyadic interactions contribute to the clustering process; asymmetric interactions and stereotypic consequences of pair-wise social encounters; cluster grows by social encountering at its border; multiple sensory modalities are required for cluster formation; abnormal encounter dynamic, rather than locomotion deficits, preclude cluster formation; ppk specific neurons participate in establishing normal social space; social grouping elevates activity in tarsal ppk neurons.

We also included the same mutants tested in Schneider et al., 2012 (iav, Orco, Poxn) and Simon et al., 2012 (Orco). Although the consensus is these mutants exhibit an abnormal behavior in a group, the exact results differ between three papers, even assuming all three groups studied the same process. For example, Schneider, 2012, suggested that olfactory input was necessary for normal global efficiency (a parameter for network organization), based on male Orco mutants, but Simon, 2012, suggested that olfactory input was not essential for social space, based on two male Orco mutants. We concluded that female flies without olfaction had abnormal social distance, but male flies without olfaction were normal, based on both mutants and wild-type flies with antenna removal (Figure 5B). Additionally, the phenotype of Orco in female could be rescued by Orco expression (Figure 5B). Another example; the rate of interactions in CS male is about half of that in CS female (Figure 1D, in Schneider et al., 2012), however, we found, the social encounter frequency in CS male is about 2 fold of that in CS female (Figure 3B, C). We could not attribute such disparity to the slight difference between defining the rate of interactions by Schneider et al., 2012 and the encounter frequency by us.

We would like to propose an ultimate test. Although both Schneider et al., 2012, and Simon et al., 2012, studied social relationships of a group of flies in an enclosed two dimensional space, combining their results could not predict reliably any major conclusions in this revision, even with the assumption that all three groups worked on different aspects of the same behavior. For this, we owe the reviewers for their constructive comments.

One way to overcome this limitation is to test if selectively inhibiting ppk expressing neurons in the foreleg, or the wing margin, inhibits clustering.

We highly appreciate the constructive and thoughtful comments, which have greatly helped us to improve our work.

We took an activity imaging approach to identify the neurons that are activated by social contacts. The ppk neurons in tarsus, rather than in wings, showed increased activity in flies within a group (Figure 8A-C, Figure 8—figure supplement 1). Additional experiments showed that the increase in activity is not only social related, but also social contact dependent (Figure 8D, E). Therefore, our new data suggested that tarsal ppk neurons are involved in social clustering.

Another is to examine in more detail why mutants described in Figure 4—figure supplement 2 fail to cluster, by careful analysis of pairwise encounters.

We assessed the entire process of clustering including initiation and development of a cluster. Interestingly, the abnormality in cluster formation in mutants was evident at the stage of cluster initiation. In wild-type flies, cluster initiation began with a small cluster serving as a core for other flies to join. Although the mutant flies form transient clusters with some delay, these clusters would not last for long (Figure 5E-K). Therefore, the arenas with these mutants would never generate a mini-cluster stable enough for the future cluster to grow.

The impairment in formation of social clusters (or a stable core) in mutants might be explained by their abnormal encountering responses. We then quantified the parameters of transient encounter events including encounter frequency, encounter duration, transient encountering speed (before and after) and behavioral choice after encountering, in mutant flies (Figure 5 and Figure 6). In comparison with the wild-type flies, the mutants displayed higher encounter frequency but shorter encounter social duration (Figure 6A, B). Besides being very active, the mutants exhibited high levels of locomotion speed both before and after the encounter (Figure 6E, H). Quantifying the behavior output after encounter indicated that pairs of mutants have a higher chance of both flies moving away, thereby a high tendency to scatter from the encounter site than wild-type flies (Figure 6C, D). These dynamic properties together might contribute to the difficulty in forming a stable core in these mutants.

1) Subsection “Spontaneous formation of orderly social cluster”, third paragraph. For the simulation the authors required virtual flies to not be closer to each other than 2 mm (Materials and methods, subsection “Social cluster index and social space index”, last paragraph). It is not clear to me how this can be justified, given that many real flies approach within 1 – 2 mm of each other (Figure 1—figure supplement 3C. It seems to me the modeling needs to be redone with a 1 mm minimum distance. How does reducing the minimum distance to 1 mm effect the modeling?

We thank the reviewer for pointing it out. The distance between two flies was measured between their body centers, not between their body surfaces. We added this distinction into the main text (subsection “Spontaneous formation of social clusters”, second paragraph) and Materials and methods (subsection “Fly identification and cluster reconstruction”, third paragraph).

The reported body size of a fly is about 3mm in length, and 2 mm in width (Manning, 1999, Patterson, et al., 1943), so previously a minimal distance of 2 mm was set in the simulation with virtual flies. The wild-type flies recognized from the binary images of arenas were smaller due to background subtraction and thresholding. We had 2.72 ± 0.21 (female) or 2.54 ± 0.19 (male) in length, and 1.05 ± 0.08 (female) or 1.03 ± 0.09 (male) in width.

Inspired by this question, we have systematically explored the minimal distance between virtual flies over a broader range (reducing to zero and increasing to 10 mm) in this version as following.

We used random flies and random dots to replace the virtual flies in the previous version. When modeling with random flies (randomly picked from the data set of wild-type flies), the minimal distance between flies in a two dimensional space allowed them to touch each other but not physically overlap with each other (Figure 1 and Materials and methods). So we set a parameter that two random flies don’t occupy the same pixel(s). This simplification is sufficient because given the high-resolution of the digital cameras used for imaging the arenas, each fly occupies about 474 ± 91 (female) or 415 ± 50 (male) pixels, or each pixel corresponding to 0.069 ± 0.004 mm of the real world. The minimal distance setting here is similar to or smaller than the real world. Nevertheless, the results of simulation with random flies are similar to that of virtual flies in the previous version.

When modeling with random dots (points without size), we analyzed their spatial patterns while varying the minimal distance between them from 0 (Poisson point process) to 10 mm (Hard-Core Matérn point process) (Figure 2—figure supplement 6 and Materials and methods). The resolution in this case is much higher, as the random coordination of flies was digitally generated and encoded with double precision floating-point numbers.

With both methods, we found that varying the minimum distance did not change the results of comparisons, and all our conclusions remained the same as with the virtual flies in the previous version. Notably, the new methods of modeling enable us to identify additional properties of the groups (Figure 1 and Figure 2).

2) Subsection “Cluster grows by social encountering at its border”, third paragraph. Can the authors examine further why cluster formation is delayed in mutants, and why the clusters formed rapidly dispersed in these animals? This will require looking at the formation of clusters and measuring the behavior of animals following an encounter (e.g. speed).

We thank the reviewer for the helpful suggestions.We compared the initiation phase of a cluster in mutants and wild-type flies. Wild-type flies formed small clusters (at least 5 flies) that would last for over a minute and continue to grow into large clusters. In the mutants, however, the appearance of small clusters was delayed, and additionally, as soon as a small cluster formed, it quickly collapsed (Figure 5E-K).We found that the mutants exhibited higher encounter frequency and shorter encounter duration (Figure 6A,B), to which the abnormal initiation of clusters might be attributed.Additionally, we measured the speeds of the flies before and after an encounter. Mutants displayed larger changes in speed (larger decrease of speed before an encounter and larger increase of speed after an encounter, Figure 6E-H). We also analyzed the spontaneous walking bouts of the mutants and wild-type flies, the average and maximal walking speeds in the tested mutants were similar to or higher than wild-type flies (Figure 6-figure supplement 1A-C). Together, these results suggest that the high encounter frequency (and also possibly short encounter duration) would arise from high motility in the mutant flies.

3) Subsection “Mechanosensory neurons are necessary for establishing normal social space”. To extend the novelty of their work, can the authors pinpoint if mechanosensory neurons in the fore-leg, or wing margin, promote clustering, by using drivers that selectively target these neurons?

We thank the reviewer for the constructive suggestion. We conducted additional experiments, optogenetically activating a collection of potential Gal4 drivers (Figure 7—figure supplement 1, please also see the response to question 11 by reviewer #1), which labeled differentially mechanosensory neurons in the leg and wing margin (Figure 7—figure supplement 3). However, none of them displayed the behavioral phenotype comparable with ppk-GAL4 neurons, this is not surprising considering that these drivers do not overlap with the population of ppk neurons. Lacking additional drivers limited us from further pursuing this direction.

Instead, we switched to calcium imaging to monitor the neuronal activity to determine the neurons activated by social interactions. Our data showed that the tarsal ppk neurons were activated by social grouping (Figure 8A-C). Notably, this activation was dependent on direct social contact (Figure 8D-E), suggesting the ppk neurons in the legs are critical for social clustering.

Reviewer #3:

This manuscript addresses the baseline clustering properties of adult fruit flies. This is an area of rapid advancement and so any work here is well placed in time. The authors examine self-assembling clusters in terms of average approach distance and then use this metric to examine various sensory mutants. They conclude that ppk neurons, neurons normally associated with pain, are important. Finally, they conduct a set of prosthetic experiments, shortening or extending wings to conclude that wings size is important for social distance. There are a number of places where this work has some strengths, the big issue is that this is in fact very similar to a better conducted work published in 2012 in PNAS (Schneider et al., 2012, referenced in paper). The figures and conclusions are very similar but Schneider et al. conduct a more sophisticated analysis and arrive at more sophisticated conclusions. The authors really need to address head-on why their work is an extension of this previously published work. I am therefore not very favorable for this manuscript to be published in eLife.

We thank the reviewer for the great effort in reviewing our work, and we appreciate the helpful suggestions and comments. As for major concerns, we would like to discuss point-by-point the comments underlined above in a logical order.

1) The authors really need to address head-on why their work is an extension of this previously published work.

We thank the reviewer for this question. Study of social interactions in Drosophila is a relevant new field with scant papers (Aike Guo, 2017). Schneider et al., 2012 is well-known for studying dynamic aspects of group interactions in Drosophila. Their work provided an elegant approach to model the complex interactions in a group of flies in a two dimensional space. In fact, their results were frequently referred to or compared with in this version and the previous version. However, with due respect, our work here is not an extension of this published work, for several reasons described below.

Schneider et al., 2012 focused on the network of interactions between flies, especially pairs in a circular arena. They observed the events of social interactions in the arena and modeled that into social interaction networks (SIN) to be further analyzed with network algorithms. Following their example, we used the “Interacteer” and “interacttee” scenario to describe asymmetric interactions of two flies. Also we borrowed the idea to generate independent virtual flies for the data set of actual flies, thanks to Schneider et al., 2012.

Goals. We study how the originally loosely distributed flies form a well-organized social cluster via seemingly random interactions between flies. We discovered the phenomenon of social cluster (Figure 1) and characterized its unique properties (Figure 1 and 2). In the process, to understand the formation of such cluster, we analyzed the dynamic of local inter-fly interactions and its contribution to the cluster initiation and development (Figure 3, 4, 5). Our goal of study is different from that of Schneider et al., 2012.

Paradigms. Although also quantifying the social interactions in a group, Schneider et al., 2012 did not describe a social cluster (composed of flies). It is not clear whether social clusters similar to ours actually formed in their setup or not, as there was no mention of it. Neither SIN encoded any info of distribution of flies. If it is not for cluster formation, the network of social interactions described in Schneider et al., 2012, had a different ethological significance from ours. Furthermore, if no social clusters formed in Schneider et al., 2012, then it is dubious that the social dynamic we observed in this paper is the same as that modeled by Schneider et al., 2012. If we have a different behavioral paradigm, our study of dynamics of social interactions in a group would serve a different purpose.

Results. Schneider et al., 2012, suggested that the key parameters of SIN do not evolve over time (Supplementary Figure 4, in Schneider et al., 2012). In contrast, we showed that the pairwise interactions changed through 15 minutes (stages 1-3) of cluster development (Figure 3, 4, 6). Additionally, the interactions vary over different regions of the arena (Figure 4—figure supplement 2). Notably, our results indicated that social interaction near the edge of a cluster effectively help the cluster to grow (Figure 4). We described the initiation of cluster, the tiny cluster that would be the core for future cluster growth, was blocked in mutants (Figure 5E-K). We found that mutant flies had higher numbers of social encounters in the observed period but shorter encounter duration than wild-type flies (Figure 6). We further showed that forcible activated ppk neurons resulted in a compressed social cluster (Figure 7), whereas the ppk neurons in tarsus were activated by social grouping in a contact dependent manner (Figure 8).

In summary, the work we are presenting has a different goal of study, a different paradigm with different ethological meaning, different results and conclusions from Schneider et al., 2012. None of the results mentioned in previous paragraphs were relying on previous conclusions by Schneider et al., 2012. Nor would these findings be directly predicted by Schneider et al., 2012.

Therefore, we would consider this work is not an extension of Schneider et al., 2012.

… this is in fact very similar to a better conducted work published in 2012 in PNAS (Schneider et al., 2012, referenced in paper).

In this paper, we combined multiple approaches to study the social cluster in Drosophila. Besides modeling, we painstakingly quantified pair-wise interactions: frequency, location, duration, behavioral output, and contribution to the clustering process in both wild-type flies and mutants. We activated and silenced various neurons to exam their roles in social clustering. Last but not least, we took calcium imaging approach to observe the activity of ppk neurons induced by social interactions. With our highest regard to Schneider et al., 2012, we are hoping that our work in the current form is not of inferior quality.

Notably, an algorithm could not guarantee that when the size of arena (diameter of 60 mm) changed or even the number of the group (12 flies) changed, the model in Schneider et al., 2012, would still hold. Since only experiments would tell, we measured the cluster formation under different conditions: group size (varying the number of flies from for 5 to 100 in an arena with a diameter of 90mm), arena size (varying diameter of the arena from 90 mm to 170 mm for 50 flies) and compared the data from real flies with simulation of random dots (with hard-core distance ranging from 0 to 10 mm). Additionally, we quantified the influence of clustering by hunger status, age, and social experience.

As discussed earlier, the ethological significance of the social network in Schneider et al., 2012, is unknown. It is at least not related to social clustering, as they did not describe or report the formation of aggregations or clusters. We found it difficult to extend the conclusions in Schneider et al., 2012, to population dynamics in other social systems, such as social clustering.

The figures and conclusions are very similar but Schneider et al. conduct a more sophisticated analysis and arrive at more sophisticated conclusions

Figures. As stated above, the figures in this version are very distinct from Schneider et al., 2012. Even when it might look similar in analyzing social interactions between a pair, our purpose is to understand the underlying driving force of clustering, and the organization of figures reflects our purpose.

Conclusions. As stated above, not only our conclusions are dissimilar to Schneider et al., 2012, but our conclusions are not readily predicted from Schneider et al., 2012.

Sophistication. We have been puzzled by the word “sophisticated”. Merriam-webster defined it as 1. deprived of native or original simplicity; 2. devoid of grossness. It is our guess that here sophisticated analysis could refer to the way to generate random flies as controls or refer to designate “Interacteer” and “interacttee” to analyze the asymmetric interactions between two flies. In our revision, we also employed similar approaches (Figure 1—figure supplement 2E-H, Figure 2—figure supplement 6A-F and Figure 3D-G).

If sophisticated analysis referred to modeling the social interactions with network analysis techniques in Schneider et al., 2012, we did not conduct similar modeling as it is clear this SIN approach was too oversimplified for our purpose. Abstraction of interactions into a network based solely on the directions and numbers of encounter events of flies essentially discards important spatial and temporal information, as well as the other parameters such as speed, duration and behavioral output of each encounter event. All of these are critical to understanding abnormal clustering behavior in mutants as shown in our paper (Figure 3, 4, 6). Specifically, our analysis indicated that pairwise social interactions occurring at different locations had different effects. For example, social encounters near the cluster edge, but not in other regions of the arena, promote cluster to growth (Figure 4). Additionally, as more flies joined the cluster, the overall encounter frequency decreases over time (Figure 3C). Therefore, simply counting social events over the whole arena without taking into account the spatial and temporal variations does not fit our paradigm and analysis.

A major purpose of social network analysis is to characterize the information transmission. However, the loss of information during construction of SIN renders the SIN approach less sensitive. For example, analysis of SIN of iav1 mutants with all four major parameters revealed a similar network organization as that of wild-type controls (Figure 3A-D, in Schneider et al., 2012). On the other hand, in our setup, the iav1 mutants fail to form social cluster during 120 minutes (Figure 5D). Our further analysis indicated that this failure is not due to locomotion defects. Instead the mutants exhibited very high encountering frequency, short encounter duration and strong tendency to disperse away from the encounter site (Figure 6).

We took multiple simple, but effective means to quantify social interactions from different aspects, and the synthesization of these results help to reach conclusions being robust and applicable to broader settings.

In summary, Schneider et al., 2012 is an inspiring work and a solid milestone in understanding the social interactions within a group of flies. It provides tools and insights to encourage a series of future work along SIN or similar directions. However, it becoming a fixed and overgeneralized framework to gauge upcoming works is out of our expectation, as our research goal, paradigm, scope, approaches, results and conclusions are clearly different.

We do appreciate these comments which help to make this revision a better quality.

[Editors’ note: what follows is the authors’ response to the second of review.]

Essential revisions:

1) The Discussion should clearly address why social clusters that form so efficiently in these studies have not been observed previously. The careful rebuttal seems to suggest that this cannot be explained by number of flies involved or in size of the arena. A major hope is that these interesting observations can be easily reproduced in other labs. A deeper engagement with possible external needs for cluster formation will be valuable to readers in the field.

We thank the editors and reviewers for this thoughtful suggestion.

In the current study, we optimized the paradigm and experimental setting to generate a relatively naturalistic environment with minimal perturbations to the flies. The details of these improvements were added to the revised Materials and methodssection as follows: “Our system used a typical setting for behavioral observations but with improvements that enabled us to consistently observe social cluster formation. […] We also noticed that several factors, including small group size (<10 flies), mixed sex, starvation, and social isolation, negatively impacted the formation of clusters. Clustering in wild-type flies develops readily only when the internal and external perturbations discussed above are eliminated”.

2) To broaden the impact of the findings, it will be useful to discuss whether there are other examples/observations consistent with cluster building based on pair wise interactions, and also whether, in theory, more complex models be reduced to simple pairwise rules?

We thank the editors and reviewers for this suggestion.

Although the detailed dynamics vary between different systems, a shared feature in collective behaviors is pairwise-based local interactions. In the Discussion section (seventh paragraph), we added a new paragraph to discuss examples of pairwise interactions in Drosophila and other species commonly investigated for collective behaviors.

3) It would be useful to formally engage, perhaps using a Monte Carlo analysis, with the possibility that simple hard-core Poisson distribution of attraction and short-scale repulsion can explain these results. If it cannot, as the authors believe, then this should be demonstrated.

We appreciate this important suggestion regarding modeling.

We used a static model to understand how a key feature of clustering, regular social space, is achieved by analyzing a fly’s response to the influence of other flies at different distances. In essence, a fly is attracted to walk toward others when they are far away, but is repelled by a strong repulsion when coming too close to other flies, eventually settling down at a critical distance (Figure 2—figure supplement 7).

We added these modeling results in the main text (subsection “Social clusters in fruit flies are well-structured networks”, tenth paragraph) and a new figure (Figure 2—figure supplement 7). In addition, we related our model to the other analyses in the revised Discussion section (fourth paragraph).

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    Figure 1—source data 1. Figure 1M, P-Q source data and related summary statistics.
    Figure 1—figure supplement 2—source data 1. Figure 1—figure supplement 2 source data related summary statistics.
    Figure 1—figure supplement 3—source data 1. Figure 1—figure supplement 3 source data related summary statistics.
    Figure 1—figure supplement 4—source data 1. Figure 1—figure supplement 4 source data.
    Figure 1—figure supplement 5—source data 1. Figure 1—figure supplement 5A-E source data related summary statistics.
    Figure 1—figure supplement 6—source data 1. Figure 1—figure supplement 6 source data related summary statistics.
    Figure 1—figure supplement 7—source data 1. Figure 1—figure supplement 7E source data and related summary statistics.
    Figure 2—source data 1. Figure 2D-G source data and related summary statistics.
    Figure 2—figure supplement 2—source data 1. Figure 2—figure supplement 2 source data and related summary statistics.
    Figure 2—figure supplement 3—source data 1. Figure 2—figure supplement 3 source data and related summary statistics.
    Figure 2—figure supplement 4—source data 1. Figure 2—figure supplement 4 source data and related summary statistics.
    Figure 2—figure supplement 5—source data 1. Figure 2—figure supplement 5B-C source data and related summary statistics..
    Figure 2—figure supplement 6—source data 1. Figure 2—figure supplement 6 source data and related summary statistics.
    Figure 2—figure supplement 8—source data 1. Figure 2—figure supplement 8A-D source data and related summary statistics.
    Figure 2—figure supplement 9—source data 1. Figure 2—figure supplement 9C-D source data and related summary statistics.
    Figure 3—source data 1. Figure 3A–C, E–G, and I–J source data and related summary statistics.
    Figure 3—figure supplement 1—source data 1. Figure 3—figure supplement 1B source data.
    Figure 4—source data 1. Figure 4B, D, F, and G–H source data and related summary statistics.
    Figure 4—figure supplement 1—source data 1. Figure 4—figure supplement 1A-G source data.
    Figure 4—figure supplement 2—source data 1. Figure 4—figure supplement 2B source data.
    Figure 5—source data 1. Figure 5A–D, H-K source data and related summary statistics.
    Figure 5—figure supplement 1—source data 1. Figure 5—figure supplement 1A-B source data and related summary statistics.
    Figure 6—source data 1. Figure 6A–C, E-H source data and related summary statistics.
    Figure 6—figure supplement 1—source data 1. Figure 6—figure supplement 1B-C, F-G source data and related summary statistics.
    Figure 7—source data 1. Figure 7D–G source data and related summary statistics.
    Figure 7—figure supplement 1—source data 1. Figure 7—figure supplement 1A-D source data and related summary statistics.
    Figure 8—source data 1. Figure 8C, E source data and related summary statistics.
    Figure 8—figure supplement 1—source data 1. Figure 8—figure supplemnet 1B source data and related summary statistics.
    Source code 1. randomdot_simfunc.
    elife-51921-code1.m (3.1KB, m)
    Source code 2. randomfly_from_dataset.
    elife-51921-code2.m (10.2KB, m)
    Transparent reporting form

    Data Availability Statement

    All data generated or analysed during this study are included in the manuscript and supporting files.


    Articles from eLife are provided here courtesy of eLife Sciences Publications, Ltd

    RESOURCES