SUMMARY
The olfactory system is divided into processing channels (glomeruli), each receiving input from a different type of olfactory receptor neuron (ORN). Here we investigated how glomeruli combine to control behavior in freely walking Drosophila. We found that optogenetically activating single ORN types typically produced attraction, although some ORN types produced repulsion. Attraction consisted largely of a behavioral program with the following rules: at fictive odor onset, flies walked upwind, and at fictive odor offset, they reversed. When certain pairs of attractive ORN types were co-activated, the level of the behavioral response resembled the sum of the component responses. However, other pairs of attractive ORN types produced a response resembling the larger component (max pooling). Although activation of different ORN combinations produced different levels of behavior, the rules of the behavioral program were consistent. Our results illustrate a general method for inferring how groups of neurons work together to modulate behavioral programs.