Welcome to our new website

Flies dynamically anti-track, rather than ballistically escape, aversive odor during flight
Sara Wasserman, Patrick Lu, Jacob W. Aptekar, Mark A. Frye


Tracking distant odor sources is crucial to foraging, courtship and reproductive success for many animals including fish, flies and birds. Upon encountering a chemical plume in flight, Drosophila melanogaster integrates the spatial intensity gradient and temporal fluctuations over the two antennae, while simultaneously reducing the amplitude and frequency of rapid steering maneuvers, stabilizing the flight vector. There are infinite escape vectors away from a noxious source, in contrast to a single best tracking vector towards an attractive source. Attractive and aversive odors are segregated into parallel neuronal pathways in flies; therefore, the behavioral algorithms for avoidance may be categorically different from tracking. Do flies plot random ballistic or otherwise variable escape vectors? Or do they instead make use of temporally dynamic mechanisms for continuously and directly avoiding noxious odors in a manner similar to tracking appetitive ones? We examine this question using a magnetic tether flight simulator that permits free yaw movements, such that flies can actively orient within spatially defined odor plumes. We show that in-flight aversive flight behavior shares all of the key features of attraction such that flies continuously ‘anti-track’ the noxious source.


One of the most interesting features of the brain is its ability to identify, discriminate and assign subjective value to salient signals amidst a noisy sensory backdrop. The neuronal and algorithmic mechanisms by which valence is assigned to sensory signals, and then translated into appropriate seeking or avoidance responses, is a central question of behavioral neuroscience. Fruit flies seek the source of attractive fruit odors that indicate food, refuge, congregation, mating and egg-laying habitats. Additionally, noxious odors representing unsuitable or toxic substances would need to be avoided. The high-performance behavior and numerically limited computational capacity of the fly brain make it an excellent model with which to examine the computational algorithms and neuronal circuits for discriminating, identifying and responding to sensory signals of categorically different value.

Chemotaxis requires the identification and direction of an odor gradient and subsequent orientation and navigation either up (towards attractive odorants) or down (to avoid aversive odorants) the gradient. Chemotaxis behavior in walking fruit flies has been measured using a variety of behavioral assays that have demonstrated orientation, aggregation and jumping behavior in response to attractive odor cues such as apple cider vinegar and banana (Reed, 1938; Heisenberg, 2003; Semmelhack and Wang, 2009). Additionally, flies avoid the aversive odorant benzaldehyde in a number of the same walking assays (Borst and Heisenberg, 1982; Helfand and Carlson, 1989; Störtkuhl et al., 2005). The underlying olfactory anatomy that supports chemotaxis behaviors in Drosophila melanogaster relies on a ‘labeled line’ strategy that provides a reliable mechanism for responding to a wide number of attractive and aversive olfactory cues (Semmelhack and Wang, 2009). Whereas chemotaxis behavior has been extensively studied in walking flies, a quantitative analysis of in-flight chemotaxis behaviors, specifically in response to aversive odorants, is missing from the literature.

Adult flies actively search for an appetitive odorant (whilst presumably avoiding noxious ones) by distributing their random move lengths between turns in a statistically efficient manner [for a review of olfactory search behavior, physiology and ecology, see Chow and Frye (Chow and Frye, 2009)]. However, upon encountering an odor plume, they stop searching and start tracking upwind along generally straight trajectories (Budick and Dickinson, 2006). Suspended on a free-yaw magnetic tether within a visual–olfactory flight simulator (Fig. 1A), D. melanogaster robustly track attractive narrow food odor plumes of apple cider vinegar or banana by: (1) following the peak spatial gradient of intensity that spans the two antennae, (2) integrating temporal fluctuations and (3) reducing the amplitude and frequency of rapid steering maneuvers called saccades (Duistermars and Frye, 2008b; Frye and Duistermars, 2009), which in combination are consistent with the free-flight tracking responses to the same odors within a free flight wind tunnel (Budick and Dickinson, 2006). Here, we investigate how stimulus valence affects the behavioral transformation and integration of olfactory signals by comparing the in-flight response to benzaldehyde (BA), known to be behaviorally aversive to fruit flies (Acebes and Ferrús, 2001; Störtkuhl and Kettler, 2001; Hallem et al., 2004; Störtkuhl et al., 2005) with apple cider vinegar (ACV), a strong attractant to ‘vinegar flies’.


Drosophila melanogaster strains

Drosophila melanogaster Meigen 1830 strains were maintained at 25°C under a 12 h:12 h light:dark cycle. All experiments were performed with wild-caught (WC) flies (Venice, CA) 3–5 days post-eclosion unless otherwise noted. WC flies were initially collected from the wild in 2004 and have been maintained in laboratory conditions since. WC flies have been successfully mated with laboratory wild-type strains and genetic mutants.

Magnetic tether flight simulator and odor delivery

The olfactory magnetic tether arena has been previously described in detail (Duistermars and Frye, 2008b; Duistermars and Frye, 2008a; Maimon et al., 2008; Frye and Duistermars, 2009; Krishnan et al., 2011). Briefly, adult female flies 3–6 days post-eclosion were cold-anesthetized and tethered to minutien pins (Fine Science Tools, item no. 26002-20, Foster City, CA, USA) using ultraviolet glue (Plas-Pak Industries, Norwich, CT, USA) cured with a UV light from a light-curing gun (ELC-410, Electro-Lite, Bethel, CT, USA) and suspended between two magnets, allowing for free rotation along the yaw axis. Odor was delivered using a mass-flow controlled gas multiplexer (Sable Systems, Las Vegas, NV, USA) that delivered air at a rate of 7 l min−1 to tubes containing filter paper saturated with 25 μl of odorant or water. An odor plume was generated via a vacuum set to 13 l min−1 (flow regulator, Cole-Parmer, Vernon Hills, IL, USA) placed beneath the fly. Odor intensity measurements were made with a miniature photoionization detector (mini-PID) (Aurora Scientific, Aurora, ON, Canada) across a 9 mm2 planar grid at 500 μm increments. The tracer gas was ethanol (ionization potential of 10.62 eV). We sampled the grid 11 times and averaged the measurements at each point, then smoothed using piecewise linear interpolation in MATLAB (The MathWorks, Natick, MA, USA). A visual display of LEDs surrounded the fly in azimuth and reached 60 deg above and below the visual horizon. Flies were illuminated for digitizing (Fire-I infrared firewire camera, Unibrain, San Ramon, CA, USA) via infrared lights. Odor stimuli included ACV and BA reagent plus (≥99% pure, Sigma-Aldrich, St Louis, MO, USA). Experiments were performed in the dark to avoid precipitation of BA.

Each experiment began by rotating a 30 deg wide vertical stripe around the arena for 60 s to verify that individual flies were able to appropriately orient at any point around the arena. The same vertical bar was then oscillated at either 90 or 270 deg for 8 s to visually drag the flies to the desired starting location. Water vapor and/or the desired odorant were activated during this initial positioning and a static wide-field pattern (30 deg spatial wavelength, 94% pattern contrast, 78 cd m−2) or uniform visual pattern (0% pattern contrast, 80 cd m−2) was presented for the duration (25 s) of each experiment. Each fly was not run more than three times through any one experiment and was removed if it stopped flying more than three times during a trial.

Antennal occlusions were performed by applying a thin layer of UV glue on the third antennal segment (Duistermars et al., 2009).

Analyses were performed with custom-written MATLAB software. A saccade was defined as a change in heading with an angular velocity between 150 and 1500 deg s−1. Turn ratio was determined by subtracting the number of leftward turns from the number of rightward turns and dividing by the total number of turns, resulting in a positive ratio favoring rightward turns and a negative ratio favoring leftward turns [(R−L)/(R+L)]. Plume width was previously determined and validated herein to be ±10 deg around 0 deg (Duistermars et al., 2009). The same envelope of space (±10 deg around 180 deg) determined the area termed the anti-plume. Time to plume or anti-plume acquisition was determined by how much time it took the fly to enter the 20 deg envelope surrounding 0 or 180 deg, respectively. Time in plume or anti-plume was calculated by summing the seconds (minimum of 1 s) spent in the envelope described for plume or anti-plume acquisition.

Rigid tether flight simulator and odor delivery

The fixed tether arena has been described in detail previously (Reiser and Dickinson, 2008; Chow et al., 2011). Briefly, adult female flies 3–6 days post-eclosion were cold-anesthetized and tethered to 0.1 mm-diameter tungsten pins with UV-curing glue and a light gun, as described above. The arena is made of a computer-controlled LED display, and an infrared diode projects light onto the beating wings, casting a shadow onto an optical sensory beneath the fly. A wingbeat analyzer (JFI Electronics, Chicago, IL, USA) extracts wingbeat amplitude and frequency (500 Hz sample rate). The voltage differences between the left and right wingbeat amplitudes were fed back into the computer to alter the visual display in real time to simulate the fly's active control over the visual stimuli. An odor delivery system has been previously described (Chow and Frye, 2008; Duistermars and Frye, 2008b). Briefly, odors were delivered by bubbling air at 40 ml min−1 controlled via a mass flow controller (Sable Systems) through test tubes containing filter paper with water, ACV vapor or 40% BA vapor.

As previously described in Chow and Frye (Chow and Frye, 2008), flies were presented with a biased closed-loop experiment where they were presented with a wide-field rotational pattern under closed-loop control. Additionally, A frequency-modulated bias signal was also presented and made from fixed amplitude sine waves varying in frequency (1, 2, 4 and 8 Hz), resulting in a pattern that swept along a sinusoid increasing in frequency. This experiment was presented in the presence of water or 40% BA. Analyses were performed with custom-written MATLAB software (Chow and Frye, 2008).

Statistical analyses

Comparisons of saccade frequency, amplitude and turn ratios were performed using a paired t-test with P<0.05. Time to plume/anti-plume acquisition and probability of acquiring plume/antiplume were compared using a chi-square goodness-of-fit test. Comparisons of heading variance were compared using a vector strength (v) measurement (Goldberg and Brown, 1969; Batschelet, 1981): Embedded Image (1) where n is the number frames in each trial and ϕ is the mean heading at each frame. Comparisons of the percentage of flies that acquired the plume or anti-plume were performed using a chi-square goodness-of-fit measurement. Change in wingbeat amplitude (ΔWBA) was compared with a one-way ANOVA, and a two-sample Kolmogorov–Smirnov test was used to compare the heading distributions. All statistical analyses were performed using MATLAB.


Drosophila melanogaster track an aversive odor gradient in-flight

Suspended on a free-yaw magnetic tether (Fig. 1A, left panel), we show here that by comparison to a water control (Fig. 1B,C), flying D. melanogaster readily located and oriented towards a low-flow ACV plume (Fig. 1D,E). Measurements from a mini-PID indicate that the odor plume generates a stimulus gradient that spans the arena, thus resulting in antennal stimulation at any location (Fig. 1A, right panel). Briefly, a high-contrast black-and-white grating surrounds the arena, providing self-induced wide-field visual motion cues, previously shown to enhance plume tracking of attractive odors (Duistermars and Frye, 2008b). Given robust active tracking of ACV, with flight trajectories focused tightly at the odor nozzle, we tested the hypothesis that when presented with BA, flies by contrast employ erratic steering to escape the noxious odor by simply avoiding the narrow region of the arena near the odor nozzle. This would manifest in a distribution of flight-heading trajectories resembling that of the water control (Fig. 1B,C), but including an empty ‘notch’ at the position of the nozzle. Whereas flies did indeed avoid the nozzle, we were surprised by the manner in which they avoided it. In response to a range of BA concentrations, flight heading was focused in the direction precisely opposite the odor source (Fig. 1F,G). We will refer to the area angle opposite from the plume as the ‘anti-plume’, which represents the position in the arena where the fly actively centers its heading in order to continuously and dynamically avoid the noxious stimulus.

Fig. 1.

Flies actively track and anti-track an attractive and aversive odorant, respectively. (A) Left: a fly is tethered to a pin and suspended in a magnetic tether arena where it can freely rotate in the yaw plane. Panels of LED lights surround the arena and can display a variety of stationary and moving visual patterns at a range of light intensities. A visual bar is used to ‘drag’ the flies to a starting location. Odor ports at 0 and 180 deg deliver a narrow stream of odor that flows over the fly head and is dragged down by a vacuum. The angular heading of the fly is tracked by infrared video and custom-written MATLAB software (see Materials and methods). Right: odor intensity measurements are plotted in pseudo-color and were made with a miniature-photoionization detector (mini-PID). The top panel depicts a fly facing the odor port and the bottom panel depicts a fly anti-tracking an odor. See Materials and methods for further explanation of measurement. (B,D,F) Top: heading trajectories of all individuals in the presence of a wide-field static visual panorama in continuous odor plumes of (B) water, (D) apple cider vinegar (ACV) and (F) 80% benzaldehyde (BA). Odor plume is indicated by a black arrowhead (0±10 deg). Flies began the trial at 270 deg (see Materials and methods). (C,E,G) Histogram of the time individual flies spent in 20 deg regions of the arena, indicated by black circles. Data are means (black line) ± s.e.m. (shaded gray region). Asterisks indicate distributions that are significantly different from water (Kolmogorov–Smirnov, *P<0.05). (H–J) Percentage of total flies that occupy the plume (0±10 deg, black line) or anti-plume (180±10 deg, gray line) over the entire length of the trial. (K) Percentage of flies that occupy the plume or anti-plume in the last second of the experiment. Asterisks indicate a significant difference between the plume and anti-plume within the same odor condition (chi-square goodness-of-fit, *P<0.05); hatch marks indicate a significant difference compared with water in the corresponding plume or anti-plume (#P<0.05). (L–O) Polar plots of mean heading (corresponding individual trajectories in Fig. 1D,F) in response to (L) 100% ACV, (M) 80% BA, (N) 40% BA and (O) 5% BA. Black lines indicate mean heading trajectories; shaded gray areas represent ±s.e.m.; dashed black lines indicate the odor plume. N>70 flies for B–O.

The frequency distributions of how much time each fly spent at different positions within the arena in the presence of ACV (Fig. 1E) or BA (Fig. 1G) are both significantly different from the distributions generated in the presence of water, but they are not different from each other, except of course that the mean tracking angle is centered either at the odor nozzle (0 deg) for attractive ACV plume (Fig. 1E) or opposite the nozzle (180 deg) for aversive BA (Fig. 1G). Similarly, the percentage of flight trajectories located near the mean heading (i.e. toward the plume for ACV and toward the anti-plume for BA) per unit time was similarly elevated for both odorants (Fig. 1I,J). These time-varying measures show that the vast majority of flies in the test trials were oriented within the plume (ACV) or the anti-plume (BA) at the end of the trials, with no significant difference between the two (Fig. 1K).

To best visualize the mean tracking vector, we re-plotted the flight trajectory data in polar coordinates, matching the geometry of the arena, such that time is plotted along the radius. As indicated by the Cartesian plots and associated frequency distributions, visual inspection of the polar plots indicates that the variance about the mean tracking vector is similarly centered at either the plume for ACV (Fig. 1L) or the anti-plume for BA (Fig. 1M) and furthermore, that reducing the concentration of BA by factors of 2 or 16 has little impact on the mean time course or variance of anti-tracking behavior (Fig. 1M–O).

Fig. 2.

Vector strength of mean heading position over time. Values closer to zero represent a wide spread in heading distribution, whereas values closer to one indicate mean heading with a smaller variance. See Materials and methods for the equation used to calculate the r-statistic.

These results suggest that tracking the BA anti-plume is equally robust as tracking the ACV plume. To test this formally, we quantified the robustness of heading orientation over time with vector strength, a temporal measure of variance such that a score approaching zero is reflective of a large variation in trajectory heading, whereas a value approaching one would indicate that heading is held constant (Batschelet, 1981), either towards the odor plume (ACV) or towards the anti-plume (BA). As expected, in response to water we observed vector strengths approaching zero over the duration of the experiment, whereas in the presence of an attractive ACV or an aversive BA plume (at each of three concentrations), we observed vector strengths approaching one, with no extreme differences between the odor treatments (Fig. 2).

Flies utilize similar motor control of body saccades to track both appetitive and aversive odor plumes

In addition to smooth tracking, flies also perform rapid re-orientations in flight heading, called ‘saccades’ for their functional analogy to vertebrate gaze orientations. We quantified the size and frequency of saccades (defined as a transient change in angular velocity of the flight heading between 150 and 1500 deg s−1). Saccades in flight are used during exploratory search, and also to maintain position within the plume itself. Consistent with previous findings, mean saccade amplitude (deg) and frequency (s−1) were reduced in the presence of ACV by comparison to water (Duistermars et al., 2009) (Fig. 3A,B). Similar to ACV tracking, we found that saccade amplitude and frequency were reduced to stabilize flight position within the BA anti-plume (Fig. 3A,B). Additional measures follow and show similar modulation for tracking and anti-tracking. The time required to initially acquire the plume (Fig. 3C) and the probability that a fly enters the plume or the anti-plume (Fig. 3D) were not significantly different when presented with an attractive or aversive odor. Whereas there was no significant difference in the mean acquisition time for BA (Fig. 3C), there was a slightly lower, albeit not significant, probability of acquiring a 5 or 40% BA plume (Fig. 3D). It stands to reason that reduced stimulus intensity could slightly compromise the animal's tracking capability (or anti-tracking capability in this case). We therefore completed the remaining experiments with 80% BA.

Flies require olfactory signals from both antennae to accurately anti-track an aversive odor gradient

Our laboratory has previously shown that flies require bilateral sensory input to accurately track an attractive odor gradient in flight. The results of occluding chemosensory function of single antennae are consistent with a simple algorithm by which the fly steers in the direction of the antenna experiencing the largest odor intensity (Duistermars et al., 2009). We asked whether this was also a requirement for avoiding aversive odor gradients, except of course that the inter-antennal comparison would be logically inverted. We placed UV-cured glue on the third (a3) antennal segment to occlude the olfactory sensilla (see Materials and methods). This method has been shown to effectively suppress odor detection (Duistermars et al., 2009). We examined the ability of occluded flies to locate and track either an ACV or a BA plume. We began by challenging flies to locate the plume by visually ‘dragging’ them 90 deg (ACV) or 270 deg (BA) from the odor nozzle with an oscillating vertical stripe, and then switched on a static high-contrast grating to provide rich visual feedback (see Materials and methods) and examined how unilateral a3 occlusion influences saccade amplitude, frequency and turning ratio. Odor treatment reduces saccade amplitude for both ACV and BA, and unilateral occlusion does not further alter the algorithm for reduced saccade amplitude (Fig. 4A). Whereas there was no significant interaction effect of unilateral antennal occlusion on the odor-evoked control of saccade amplitude, the modulation of saccade frequency was impacted by unilateral occlusion. The heightened role of the left antenna is highlighted as occlusion of the left antenna abolished the suppression of saccade frequency in the presence of either an attractive or an aversive odorant (Fig. 4B), whereas blocking sensory input from the right antenna only resulted in the disruption of saccade frequency dynamics in the presence of BA (Fig. 4B).

Fig. 3.

Active tracking and anti-tracking arise from similar motor control of body saccades. (A) Mean saccade amplitude and (B) frequency over the entire 25 s experiment (corresponding trajectories in Fig. 1B,D,F) for N>70 flies. (C) Mean time to plume/anti-plume acquisition and (D) plume/anti-plume acquisition probability. Asterisks indicate a significant difference compared with water in the same experiment (paired t-test, *P<0.05). Error bars indicate ±s.e.m.

The ratio of left to right turns calculated over the duration of the 25 s experiment (see Materials and methods) in the non-occluded control experiment showed no significant changes upon odor exposure to BA or ACV, by comparison to water, as the flies located the plume and maintained heading by suppressing saccades equally in either direction (Fig. 4C, control). Right-occluded flies showed significantly higher proportion of leftward saccades in the ACV treatment and more rightward saccades in the BA treatment (Fig. 4C). By contrast, odor evoked the opposite steering biases in left-occluded flies, which turned more frequently to the right in ACV and to the left in BA (Fig. 4C). These turning responses are entirely consistent with a comparison of intensity across the two antennae such that flies steered towards the side with the strongest intensity of attractive ACV and away from the side with the strongest intensity BA. Note that although the data are trending, no statistically significant turning bias was observed upon left antennal occlusions in the presence of ACV, presumably as for this experiment, the fly was positioned with the odor nozzle to its left and olfactory detection was thus compromised.

Fig. 4.

Flies track the lowest odor intensity of an aversive odorant. (A,B) Mean saccade amplitude (A) and frequency (B) over the entire 25 s experiment (corresponding mean trajectories in Fig. 5). (C) Mean turning ratio for all turns throughout entire 25 s experiment. A positive number indicates a rightward turning bias and a negative number indicates a leftward turning bias (corresponding raw trajectories in Fig. 5). RO and LO indicate right and left antennal occlusions, respectively. Asterisks indicate a significant difference compared with water in the same experiment (*P<0.05); hatch marks indicate a significant difference compared with the same odor in the control condition (paired t-test, #P<0.05). Data are means ± s.e.m. of N>70 flies.

Like appetitive food odor tracking, aversive odor avoidance requires wide-field motion cues

We sought to investigate whether, as with an attractive odorant such as vinegar or banana, panoramic motion cues served to enhance anti-tracking of an aversive odorant. For this experiment, once the fly was positioned within the plume with a salient visual feature (see Materials and methods), we instantaneously changed the visual display to either a high-contrast panorama of vertical stripes that provided rich visual motion cues generated by self-movement or a uniform mid-level grayscale display of equal mean luminance that provided no contrasting visual self-motion signals. Similar to results published previously (Krishnan et al., 2011), upon presentation of the visually uniform panorama, we observed a global disruption in ACV plume tracking and BA anti-plume tracking (Fig. 5A–F), such that a lower percentage of the trajectories was correctly oriented under uniform visual conditions (Fig. 5G–I).

Bright featureless visual surroundings acted to heighten saccade amplitude across all experimental conditions by comparison to the presence of an equally bright high contrast visual display (Fig. 5J). The interaction between odor and the visual dependence of saccade amplitude significantly reduced saccade amplitude in the presence of ACV, but only with concomitant high contrast visual feedback (Fig. 5J). For BA, it appears that odor-reduced amplitude persisted across visual treatments, whereas for ACV saccade rate was unchanged in the uniform visual arena (Fig. 5J). The strength of available visual motion signals, however, had no influence over mean saccade frequency in the absence of odor (Fig. 5K). Within the high contrast arena, ACV reduced saccade rate further than in the uniform arena. By contrast, visual conditions did not seem to differentially influence odor-reduced saccade rate in a BA plume (Fig. 5K).

To determine how the combined interactions between saccade control parameters and visual feedback influence overall tracking performance, we compared vector strength in each visual condition. Flight heading was somewhat more variable (lower vector strength) for BA than for ACV, but the vector strength was not drastically different for ACV and BA (Fig. 5L). However, for both odors, vector strength was similarly compromised by switching to the featureless uniform visual arena (Fig. 5L, gray line). As a result, the reduced fraction of flies that were localized within the proper odor plume at the end of the trial indicates that both ACV plume tracking and BA anti-plume tracking were equally compromised within the visually featureless arena (Fig. 5M).

These results indicate that, like ACV (Chow and Frye, 2008; Chow et al., 2011), BA acts to directly increase the gain of stabilizing optomotor responses to panoramic visual rotation. To test this hypothesis, we switched to a ‘rigid tether’ flight arena (Reiser and Dickinson, 2008) in which the fly is fixed in place within an LED display, and optomotor control of WBA is measured optically. In response to a striped pattern oscillated back and forth with continually increasing frequency, flies exhibited an optomotor response by following the pattern in an effort to reduce retinal slip and stabilize the image (Fig. 6A). The arena is equipped with mass-flow regulated odor delivery and, as was the case with attractive ACV, presenting the aversive odorant BA similarly resulted in a trending increased optomotor WBA (Fig. 6A,B).


We sought to determine how the valence of an environmental stimulus influences the transformation into aversion or tracking in a fly. We showed that instead of random or erratic escape maneuvers, flies respond to an aversive stimulus in much the same manner as an attractive one, except that they continually adjust their flight heading to dynamically avoid the noxious odor rather than track it. We then tested whether dynamic aversion relies on the same four behavioral algorithms that drive appetitive tracking, which have been described in depth in D. melanogaster. Briefly, in response to attractive appetitive odors such as vinegar or banana, flies suppress the amplitude and frequency of body saccades (rapid yaw deviations). Flies also use bilateral antennal comparisons of the odor gradient, and preferentially saccade in the direction of greater intensity. Finally, flies rely on visual motion cues to enhance plume acquisition and stabilize active plume tracking. Here we show that each of these strategies is also employed by the fly to anti-track an aversive signal.

Fig. 5.

Anti-tracking an aversive odor plume does not initially require wide-field motion vision. (A,C,E) Top: heading trajectories of all individuals in the presence of a uniform visual panorama (as compared with wide-field visual input in Fig. 1B,D,F) in continuous odor plumes of (A) water, (C) ACV and (E) 80% BA. Odor plume is indicated by a black arrowhead (0±10 deg). Flies began the trial at 90 deg (see Materials and methods). (B,D,F) Histogram of the time individual flies spent in 20 deg regions of the arena, indicated by black circles. Data are means (black line) ± s.e.m. (shaded gray region). (G–I) Percentage of total flies that occupy the plume (black line) or anti-plume (gray line) over the entire length of the trial in the presence of (G) water, (H) ACV and (I) BA. (J) Mean saccade amplitude and (K) frequency over the entire 25 s experiment with uniform (UNI) or high-contrast (HC) visual input. Asterisks indicate a significant difference compared with water in the same experiment (*P<0.05); hatch marks indicate a significant difference compared with the same odor in the high-contrast condition (paired t-test, #P<0.05). Error bars indicate ±s.e.m. (L) Vector strength of mean heading position over time in the presence of static high-contrast stripes or uniform visual input. Values closer to zero represent a wide spread in heading distribution, whereas values closer to one indicate a mean heading with a smaller variance. See Materials and methods for the equation used to calculate the r-statistic. (M) Percentage of flies that occupy the plume or anti-plume in the last second of the experiment. Asterisks indicate a significant difference compared with the corresponding odor plume or anti-plume under wide-field visual conditions (chi-square, *P<0.05).

We would like to highlight that our behavioral assay is sensitive, robust and repeatable, but also highly unnatural in that a fly might never have cause to continuously or dynamically avoid a noxious chemical cue in a manner similar to their obvious need to track the plume of a food resource over distance. Because odors are carried by wind, and insects such as flies, moths and mosquitoes are strongly anemotactic, wind tunnels have been classically employed to study chemotaxis in flying insects (Kennedy and Marsh, 1974; Cardé, 1996; Budick and Dickinson, 2006). It is difficult to imagine how a wind tunnel could be employed to study aversive flight responses, as in such a case the mechanosensory and chemosensory reflexes would contrapose and the animal might simply be carried downwind. Our assay is unique in that it examines chemotaxis independently from robust anemotaxis, enabling us to isolate the components of purely chemosensory orientation.

Although our assay may generate a somewhat unnatural ecological scenario, it utilizes both an odor source and an odor sink, providing the fly with the opportunity to locate and orient towards an area devoid of odor. This setup cannot be mimicked in traditional Caenorhabditis elegans and D. melanogaster larval assays, which use an odor source to generate an odor gradient across an experimental dish (Aceves-Piña and Quinn, 1979; Monte et al., 1989; Bargmann et al., 1993). Our assay takes advantage of the architecture of olfactory-motor transformations to ‘trick’ the animal into a behavioral regime that might never occur in nature, but like any good psychophysical test, informs functional mechanism nonetheless.

Flies use the same sensorimotor transformations to dynamically respond to attractive and aversive odors in-flight

Fruit flies appear adept at actively orienting towards an attractive plume source or away from an aversive plume source (Fig. 1D,F) with similar accuracy (Fig. 2). We show that the fly uses bilateral comparisons to determine the direction of odor gradients (Fig. 4) and suppresses saccade amplitude and frequency accordingly (Fig. 3A,B). The combination of reduced saccadic reorientations and spatial gradient evaluation biases overall flight orientation towards either the plume (steering ‘up’ the gradient) or the anti-plume (steering ‘down’ the gradient). This demonstrates that the animal actively tracks the local minimum of aversive BA intensity in a manner qualitatively identical to tracking the local maximum of attractive vinegar intensity (Duistermars and Frye, 2008a; Duistermars et al., 2009).

Fig. 6.

BA increases the gain of the optomotor response to wide-field visual rotation. (A) Mean change in wing beat amplitude (ΔWBA; maximum WBA–minimum WBA; see Materials and methods) (top) in response to a frequency-modulated bias signal made from fixed amplitude sine waves varying in frequency (1, 2, 4 and 8 Hz), generating a pattern that swept along a sinusoid increasing in frequency (bottom). This experiment was presented in the presence of water or 40% BA. (B) Box-and-whisker plots of mean ΔWBA. Boxes indicate the 25th (left boundary), 50th (median indicated by a white horizontal line) and 75th (right boundary) percentiles. Whiskers show the minimum and maximum ΔWBA. Outliers are indicated by plus signs. Asterisk indicates a significant difference from the distribution of water at the same stimulus frequency (Kolmorogov–Smirnov test, *P<0.05). P<0.001 within each water and BA group independently via one-way ANOVA followed by multiple comparisons (N=47).

There was no difference between the mean plume acquisition time or probability in the presence of an attractive or aversive stimulus (Fig. 3C,D), further evidence that flies are as adept at locating and orienting away from an aversive odor source as orienting towards an attractive odor source, even at low concentrations of BA. Taken together, our results show that anti-tracking an aversive odorant is achieved by the same sensorimotor transformation underlying appetitive tracking, including active gradient sampling and saccade suppression (Fig. 3A,B), such that the sign of the gradient tracking is simply inverted for a aversive odorant by comparison to an appetitive one (Fig. 1L,M).

Contrary to our expectations that flies would generate randomly oriented saccades to avoid the highest intensity of the BA plume, the animals instead seem to compute the optimum turning direction for each saccade in a manner reminiscent of the surprisingly complex motor planning maneuvers that precede jumping escape from a looming visual threat (Card and Dickinson, 2008). Given that finding, it is therefore expected that in response to BA, flies with unilateral antennal occlusion would exhibit flight headings biased towards the occluded antenna (Fig. 4C), which to our knowledge is the first quantification of the spatial response in-flight to an aversive stimulus. Additionally, contribution from the right antenna to the overall anti-tracking response is weaker than the contribution of the left antenna (Fig. 4B). This apparent ‘handedness’ in odor tracking is consistent with previous findings with attractive odors (Duistermars et al., 2009), yet the underlying cause and significance remain unknown.

Multi-sensory input enhances the tracking response to both appetitive and aversive odor stimuli

We next described how environmental context (i.e. visual conditions) similarly impacts active tracking of an attractive and aversive odorant (Fig. 5). Previous work from our laboratory and others has demonstrated that flies integrate visual and olfactory stimuli to track appetitive odor plumes in flight (Chow and Frye, 2008; Frye and Duistermars, 2009; Chow et al., 2011; Krishnan et al., 2011), and that saccade amplitude and frequency represent independent control parameters (Wolf and Heisenberg, 1990; Tammero and Dickinson, 2002; Bender and Dickinson, 2006), which are themselves influenced by odor (Duistermars and Frye, 2008a). Here we show that the absence of a bright high-contrast visual display acts to suppress saccade amplitude across all experimental conditions by comparison to the presence of an equally bright featureless visual display (Fig. 5J,K), which is consistent with other flight findings (Krishnan et al., 2011) and presumably reflects the role of visual feedback in regulating the amplitude set-point of saccades (Bender and Dickinson, 2006).

The visual and olfactory influence over saccade frequency (Fig. 5K) is complicated and indicates that wide-field motion cues interact with ACV, but not BA, to suppress saccade amplitude and frequency (Fig. 5J,K). However, although this demonstrates that the olfactory control of saccade amplitude and frequency are visually dependent for ACV, but not for BA, there is not a significant difference in the success of the resulting behavioral endpoint between ACV and BA in the absence of visual motion signals (Fig. 5L,M). This could simply be due to differing levels of sensitivity to the ACV odor blend, which is known to activate a wide breadth of olfactory neurons (Hallem et al., 2004) as compared with the monomolecular compound BA, which is known to activate a smaller population of olfactory neurons (Störtkuhl and Kettler, 2001), indicating that plume tracking (or anti-plume tracking) are equally compromised within the visually featureless arena (Fig. 5). Taken together, these results demonstrate that tracking of both attractive and aversive odorants similarly relies on visual motion. Additionally, we have shown that an aversive odorant trends towards eliciting the type of optomotor enhancement seen in the presence of an attractive odorant (Fig. 6) confirming that olfactory stimulation with either attractive or aversive odorants acts to enhance the optomotor response of fruit flies.

This first-of-its-kind comparison of in-flight responses to attractive and aversive olfactory stimuli in the same animal suggests an elegant strategy whereby the fly uses similar bilateral antennal comparisons of the odor gradient and similar sensorimotor control of saccade amplitude and frequency to track an appetitive and aversive odor signal while merely switching the sign for comparison across the two antennae to respond to an aversive odor signal. We reveal strong similarities between the strategies employed by the fly to track an attractive or aversive signal: first, the fly uses bilateral comparisons to detect either attractive or aversive odor gradients; second, environmental context (i.e. wide-field or uniform light conditions) similarly impacts active tracking of an attractive and aversive odorant; and third, an aversive odorant elicits the type of optomotor enhancement seen in the presence of an attractive odorant.

Previous work in humans has revealed a cooperative relationship between visual and olfactory stimuli whereby input from one modality serves to modulate the other (Gottfried and Dolan, 2003; Seigneuric et al., 2010; Seo et al., 2010; Zhou et al., 2010). Additionally, although recent work has suggested possible sites of visual–olfactory integration in humans (Zatorre and Jones-Gotman, 1991; Savic et al., 2000), the underlying mechanisms of integration remain unknown. It will be interesting to identify the neuronal sites of visual and olfactory integration in D. melanogaster and to determine the mechanisms underlying the behavioral responses to appetitive and aversive odors. Given that the olfactory receptor neurons and their projections to given glomeruli are known for both vinegar and BA, identifying the actual site of the sign switch for attractive and aversive odorants is well within reach, and will help elucidate specific mechanisms by which humans and the fly transform odors of different value states.


We thank Brian Duistermars for conceptual and technical contributions.



    M.A.F. is a Howard Hughes Medical Institute Early Career Scientist. J.W.A. is supported by the National Institutes of Health (T32MH019384, GM08042) and the UCLA Medical Scientist Training Program. Deposited in PMC for release after 6 months.


View Abstract