Herbivory is a key innovation in insects, yet has only evolved in onethird of living orders. The evolution of herbivory likely involves major behavioral changes mediated by remodeling of canonical chemosensory modules. Herbivorous flies in the genus Scaptomyza (Drosophilidae) are compelling species in which to study the genomic architecture linked to the transition to herbivory because they recently evolved from microbe-feeding ancestors and are closely related to Drosophila melanogaster. We found that Scaptomyza flava, a leaf-mining specialist on plants in the family (Brassicaceae), was not attracted to yeast volatiles in a four-field olfactometer assay, whereas D. melanogaster was strongly attracted to these volatiles. Yeast-associated volatiles, especially short-chain aliphatic esters, elicited strong antennal responses in D. melanogaster, but weak antennal responses in electroantennographic recordings from S. flava. We sequenced the genome of S. flava and characterized this species' odorant receptor repertoire. Orthologs of odorant receptors, which detect yeast volatiles in D. melanogaster and mediate critical host-choice behavior, were deleted or pseudogenized in the genome of S. flava. These genes were lost step-wise during the evolution of Scaptomyza. Additionally, Scaptomyza has experienced gene duplication and likely positive selection in paralogs of Or67b in D. melanogaster. Olfactory sensory neurons expressing Or67b are sensitive to green-leaf volatiles. Major trophic shifts in insects are associated with chemoreceptor gene loss as recently evolved ecologies shape sensory repertoires.plant-herbivore interactions | gene loss | olfaction | Drosophila melanogaster | Scaptomyza flava U nderstanding the origins and consequences of trophic shifts, especially the transition to herbivory, has been a central problem in evolutionary biology. The paleontological record suggests that evolutionary transitions to herbivory have been rare in insects (1), and the first transitions to herbivory in vertebrates occurred long after the colonization of land (2). However, species radiations result from herbivorous transitions in insects and vertebrates, suggesting that herbivory is a key innovation (3, 4). Identifying functional genomic changes associated with the evolutionary transition to herbivory could yield insight into the mechanisms that have driven their success. However, the origins of the most diverse clades of herbivorous insects are ancient and date to the Jurassic or earlier (5), limiting meaningful genomic comparisons. In contrast, herbivory has evolved more times in Diptera than in any other order (3). The Drosophilidae is an excellent system to study the evolution of herbivory from a functional genomic perspective because it includes several transitions to herbivory, and the genomic model Drosophila melanogaster (6, 7).The transition to herbivory involves adaptations in physiology (8-10), morphology (11), and behavior (12). The evolution of sensory repertoires could reinforce or even precipitate these adapt...