To faithfully encode complex stimuli, sensory neurons should correct, via adaptation, for stimulus 2 properties that corrupt pattern recognition. Here, we investigate sound intensity adaptation in the 3 Drosophila auditory system, which is largely devoted to processing courtship song. Mechanosensory 4 neurons (JONs) in the antenna are sensitive not only to sound-induced antennal vibrations, but also to 5 wind or gravity, which affect the antenna's mean position. Song pattern recognition therefore requires 6 adaptation to antennal position (stimulus mean) in addition to sound intensity (stimulus variance). We 7 discover fast variance adaptation in Drosophila JONs, which corrects for background noise over the 8 behaviorally relevant intensity range. We determine where mean and variance adaptation arises and how 9 they interact. A computational model explains our results using a sequence of subtractive and divisive 10 adaptation modules, interleaved by rectification. These results lay the foundation for identifying the 11 molecular and biophysical implementation of adaptation to the statistics of natural sensory stimuli.