Flies display transient social interactions in groups. However, whether fly-fly interactions are stochastic or structured remains unknown. We hypothesized that groups of flies exhibit patterns of social dynamics that would manifest as nonrandom social interaction networks. To test this, we applied a machine vision system to track the position and orientation of flies in an arena and designed a classifier to detect interactions between pairs of flies. We show that the vinegar fly, Drosophila melanogaster, forms nonrandom social interaction networks, distinct from virtual network controls (constructed from the intersections of individual locomotor trajectories). In addition, the formation of interaction networks depends on chemosensory cues. Gustatory mutants form networks that cannot be distinguished from their virtual network controls. Olfactory mutants form networks that are greatly disrupted compared with control flies. Different wild-type strains form social interaction networks with quantitatively different properties, suggesting that the genes that influence this network phenotype vary across and within wild-type populations. We have established a paradigm for studying social behaviors at a group level in Drosophila and expect that a genetic dissection of this phenomenon will identify conserved molecular mechanisms of social organization in other species.social network | emergent phenotypes | complex systems F lies engage in a variety of social behaviors that include courtship, aggression, mating, and egg-laying (1-5). Recent studies also indicate that individuals have the ability to recognize others (6) and regulate their behavior according to group membership (7). The composition of such Drosophila groups forms a social environment that influences gene transcription, pheromone displays, and mating frequency among group members (7-9). However, the genetic and sensory determinants that underlie these observations are unknown.To explore the possibility that Drosophila form organized social interaction networks (SINs), we quantified interactions formed by pairs of individuals within groups of 12 flies of the same sex placed in a circular arena (10). Using video sequences, three classes of behavior suggesting social interactions were identified: frontal approach, rear approach, and social preening (also known as "grooming," in which a fly rubs its legs together, or uses the leg(s) to rub its own wings, head, or abdomen). Social preening has been previously associated with social interactions in Drosophila (11, 12). These behaviors were verified in detail using video sequences captured at high spatial and temporal resolution (Movie S1). Inspection of video sequences indicated that these classes of behaviors often involve physical contact between the fore-and middle legs of the interacting flies, and these were scored to evaluate their relative frequency of occurrence (Table S1). Drosophila legs harbor both touch-and tastesensitive sensillae (13), suggesting that flies might exchange somatosensory and gustatory ...