RESUMEN
Animals are often bombarded with visual information and must prioritize specific visual features based on their current needs. The neuronal circuits that detect and relay visual features have been well-studied. Yet, much less is known about how an animal adjusts its visual attention as its goals or environmental conditions change. During social behaviors, flies need to focus on nearby flies. Here, we study how the flow of visual information is altered when female Drosophila enter an aggressive state. From the connectome, we identified three state-dependent circuit motifs poised to selectively amplify the response of an aggressive female to fly-sized visual objects: convergence of excitatory inputs from neurons conveying select visual features and internal state; dendritic disinhibition of select visual feature detectors; and a switch that toggles between two visual feature detectors. Using cell-type-specific genetic tools, together with behavioral and neurophysiological analyses, we show that each of these circuit motifs function during female aggression. We reveal that features of this same switch operate in males during courtship pursuit, suggesting that disparate social behaviors may share circuit mechanisms. Our work provides a compelling example of using the connectome to infer circuit mechanisms that underlie dynamic processing of sensory signals.