ABSTRACT
Insects can detect bilateral differences in odor concentration between their two antennae, enabling them to sense odor gradients. While gradients aid navigation in simple odor environments like static ribbons, their role in navigating complex plumes remains unknown. Here, we use a virtual reality paradigm to show that Drosophila use bilateral sensing for a distinct computation: detecting the motion of odor signals. Such odor direction sensing is computationally equivalent to motion detection algorithms underlying motion detection in vision. Simulations of natural plumes reveal that odor motion contains valuable directional information absent from the airflow, which Drosophila indeed exploit when navigating natural plumes. Olfactory studies dating back a century have stressed the critical role of wind sensing for insect navigation (Flügge, 1934; Kennedy and Marsh, 1974); we reveal an entirely orthogonal direction cue used by flies in natural environments, and give theoretical arguments suggesting that this cue may be of broad use across the animal kingdom.
INTRODUCTION
Odor plumes in the wild are spatially complex and rapidly fluctuating structures carried by turbulent airflows (Riffell et al., 2008). Odors arrive in bursts of high concentration interrupted by periods of undetectable signal (Murlis et al., 1992; Murlis et al., 2000), and the temporal statistics of these odor encounters can vary by orders of magnitude (Celani et al., 2014). To successfully navigate odor plumes in search of food and mates, insects must extract and integrate multiple features of the odor signal, including the odor encounters’ intensity (Alvarez-Salvado et al., 2018; Pang et al., 2018), spatial distribution (Jung et al., 2015; Tao et al., 2020), and temporal aspects such as timing (Mafra-Neto and Cardé, 1994; van Breugel and Dickinson, 2014), duration (Alvarez-Salvado et al., 2018), and frequency (Demir et al., 2020; Jayaram et al., 2021; Kanzaki et al., 1992; Mafra-Neto and Cardé, 1994; Vickers and Baker, 1994). Effective plume navigation requires balancing these multiple streams of olfactory information and integrating them with other sensory inputs including visual and mechanosensory cues (Budick et al., 2007; Suver et al., 2019; van Breugel and Dickinson, 2014).
Like many animals, insects sense odors using two spatially separated sensors – their antennae which provides an information stream whose role in navigation still remains unclear. Indeed, Drosophila can detect inter-antennal concentration differences, and use them to navigate simple plumes such as static ribbons, where gradients are resolvable and informative (Duistermars et al., 2009; Gaudry et al., 2013). But the relevance of bilateral sensing for natural plume navigation is less clear, since odor gradients in turbulent flows fluctuate rapidly and do not reliably point toward the source (Alvarez-Salvado et al., 2018). Assessing whether insects use these gradients in complex plumes would require imaging odor signals in real-time during navigation, which was done for the first time only recently (Demir et al., 2020). While theoretical studies have suggested that gradients may be informative in near-surface turbulent plumes (Boie et al., 2018), this is not yet supported by observations (Alvarez-Salvado et al., 2018).
Here, we reveal a distinct role for bilateral sensing: detecting the direction of motion of odor signals. A waft of odor, such as a thin odor filament, passing laterally over an insect hits the two antennae sequentially; the filament’s direction of motion could in principle be inferred by resolving differences in firing rate between the antennae over time. Indeed, by reanalyzing data from an experiment in which odor plumes were measured simultaneously with fly behavior (Demir et al., 2020), we find a significant correlation between fly turning and odor motion direction. To investigate causality, we develop an optogenetic approach to deliver fictive odor signals with high temporal and spatial precision, and completely divorced from wind, to freely-walking Drosophila. In this setup, flies reliably turn against the direction of fictive odors, even in the absence of wind fly turning responses are odor direction selective. Leveraging stimuli from experiments exploring direction selectivity in the fly eye (Salazar-Gatzimas et al., 2016), we find that odor direction selectivity is consistent with elementary correlation-based algorithms underlying visual motion detection (Hassenstein and Reichardt, 1956), revealing the generality of these computations across sensory modalities. Naively, since odors are transported by the wind, odor motion and wind motion could be considered redundant directional cues. Instead, we find that odor direction sensing integrates with wind-driven responses in a mostly additive manner, and we show, using simulations of complex plumes, that odor motion contains valuable directional information absent in the airflow. Finally, we demonstrate the utility of odor direction sensing in a goal-directed task, by delivering complex fictive odor plumes and assessing flies’ ability to localize the source. Selectively perturbing odor direction, while leaving all other aspects of the plume and airflow unaltered, significantly degrades flies’ navigational performance. Our work reveals a key information stream for natural plume navigation and suggests a valuable role for spatiotemporal sensing in environments which lack reliable odor gradients.
RESULTS
Flies respond direction selectively to odor motion in the absence of wind
To investigate if flies sense and react to odor direction, we first re-analyzed a dataset of walking Drosophila navigating a complex, visualizable odor plume whose odor statistics resemble those in turbulent flows (Demir et al., 2020) (Fig. 1a). In this plume, gradients can be randomly oriented relative to the source, and often differ substantially from the odor direction (Fig. 1a; green and magenta vectors). Since the odor is visible, we can quantify the odor signal perceived during navigation, as well as infer the projections along the antennae of the odor gradient and of the odor motion direction (Fig. 1b and Supplementary Fig. 1), while simultaneously measuring fly behavior (Fig. 1b). Insects turn upwind when encountering odor signals (Alvarez-Salvado et al., 2018; Budick and Dickinson, 2006; Demir et al., 2020; van Breugel and Dickinson, 2014), which we verified for flies oriented slightly away from the upwind direction (blue and red curves in Fig. 1c). For flies already oriented upwind, there was no odor-elicited turning bias, nor any turning bias relative to the perceived odor gradient (Fig. 1d). However, in this case, fly turning correlated significantly with odor direction (Fig. 1e), suggesting that flies use directional odor cues when directional information from the wind is minimized.
Still, since odors are transported by the airflow, odor direction and wind motion are inherently correlated. To break this correlation, we turned to optogenetic stimulation of olfactory receptor neurons (ORNs) using the red-shifted channelrhodopsin Chrimson (Bell and Wilson, 2016; Klapoetke et al., 2014; Mafra-Neto and Cardé, 1994; Tao et al., 2020). We reasoned that not only would optogenetics allow us to adjust the airflow independently of the odor signal, it would also give us tight (< 300 μm) and fast (< 16 ms) control of the stimulus. We combined two experimental paradigms into a single optogenetic setup. The first is a large arena, high-throughput wind tunnel for walking fruit flies, also used to collect the data in Fig. 1 (Demir et al., 2020). The second is a method for patterned optogenetic stimulation using a light projector mounted above the arena (DeAngelis et al., 2020) (Fig. 2a). Our setup can deliver spatially complex light patterns throughout the arena, and individual flies can be optogenetically stimulated with sub-mm resolution. Due to Chrimson’s high sensitivity (Klapoetke et al., 2014), the relatively low light intensity of the projector (4.25 μW/mm2) over the large 27×17 cm2 arena was sufficient to stimulate a sustained firing response in ORNs, as verified with electrophysiology (Supplementary Fig. 2a). As a proof-of-concept, we projected fictive “odor ribbons” onto the arena while flowing laminar wind (Supplementary Fig. 2b), and recorded flies in which the olfactory co-receptor Orco drove the expression of Chrimson. Though flies are only weakly responsive to red light, we used blind flies throughout to remove any visual effects. Previous studies have shown that optogenetic stimulation of Orco-expressing neurons acts as an attractive fictive odor signal (Bell and Wilson, 2016; Tao et al., 2020). Indeed, flies turned and followed the fictive ribbons upwind, mirroring fly responses to streaming ribbons of attractive odors such as ethyl acetate and apple cider vinegar (Demir et al., 2020) (Supplementary Fig. 2b). By aligning the coordinate systems of the camera and projector, we can track flies’ behaviors simultaneously with their perceived fictive odor signal, giving us spatiotemporally precise measurements of fictive odor stimuli (Methods, Supplementary Fig. 2c).
Next, we presented a simple stimulus consisting of traveling fictive odors bars in the absence of wind. Flies oriented perpendicular to the bar motion receive differential stimulation across their antennae when the edges of each bar pass across them. If flies responded selectively to the direction of fictive odor motion, we would expect opposing behaviors for bars traveling rightward versus leftward. We thus presented 5mm-wide bars traveling 15 mm/s either left or right, in 5s-long blocks followed by a 5s-long block of no stimulus (Fig. 2b). Right-moving bars elicited a net displacement of fly position to the left, and vice versa (Fig. 2c). Further, flies oriented against the direction of motion during the 5s stimulus block, but exhibited no asymmetry during the 5s blank (Fig. 2d). Notably, both of these behaviors were absent in Orco>Chrimson flies with one antenna ablated (Supplementary Fig. 3a-b), but were preserved when Chrimson was expressed only in ORNs expressing the receptor Or42b (Supplementary Fig. 3c-d), which is known to drive olfactory attraction to vinegar (Semmelhack and Wang, 2009). These experiments suggested that flies’ olfactory responses were direction selective, and that direction selectivity is enabled by bilateral sensing from the two antennae. The key indicator of direction selectivity was counterturning against bar motion – a reasonable response for locating an odor source emitting propagating odor signals.
Direction selective responses to ON and OFF edges are computed with a timescale of tens of milliseconds
Since insects and vertebrates both detect spatial gradients of odor concentration and use them to navigate (Duistermars et al., 2009; Gardiner and Atema, 2010; Rajan et al., 2006; Wu et al., 2020), we wondered if gradient sensing could explain the directional biases we observed. We repeated the experiments above with wider (30-45 mm) bars, which allowed us to quantify responses to each edge individually – the ON edge, when the fictive odor first passes over the fly, and the OFF edge, when fictive odor leaves the fly (Fig. 3a). Responses to these stimuli would clearly distinguish direction selectivity from gradient sensing, since gradient sensing would result in opposing behaviors at the ON and OFF edges while direction sensing responses would be the same (Fig. 3a). We calculated fly turning bias, defined as the sign of the cumulative change in orientation between 150 and 300 ms after the edge hit, as a function of the fly’s orientation relative to the moving edge. For both ON and OFF edges, these plots had strong positive peaks for fly’s oriented parallel to the edge, indicating that flies are responding to the odor direction, not the spatial gradient (Fig. 3b). Meanwhile, the responses were flat for control flies (Fig. 3b). Repeating this for various bar speeds |vbar| showed strong direction selectivity for bars at 10 and 15 mm/s, and a suppression for lower speeds down to 1 mm/s (Supplementary Fig. 4). For slower speeds — 1 and 5 mm/s — the ON response was still significant, while the OFF response was absent, which could result from gradient sensing in nearly static odor environments. Finally, directional turning responses were essentially absent in two negative controls – flies in which Chrimson is not activated, or those with 1 antenna ablated (Supplementary Fig. 4).
We next tested the extent to which our observations were consistent with elementary motion detection algorithms. Odor motion creates a difference in latency ΔT between the stimulation of the two spatially separated antennae, the sign and magnitude of which determines the output of direction-selective models such as the classical Hassenstein-Reichardt correlator (HRC) (Hassenstein and Reichardt, 1956). In our assay, ΔT can be inferred from the velocity of the bars relative to the flies using simple geometric considerations (Fig. 3c). This allows us to express turning bias as a function of ΔT, thereby directly testing predictions of an HRC model. In a rightward-selective HRC (Fig. 3d), a signal from the left antenna is multiplied with the delayed signal from the right antenna, where the delay is implemented as an exponential filter e−t/τ. Subtracting this from a similar computation with the antennae switched gives the detector output r(t). We modeled the turning bias as the time integral of r(t), for which the HRC predicts a turning bias proportional to 1 − e−ΔT/τ for rightward moving edges. Importantly, plotting turning bias against ΔT would allow us to extract the filter time constant τ and reveals the timescale of olfactory motion detection (Fig. 1e). Pooling the data from both ON and OFF edges, we found that the prediction was fit well, with filter timescales in the range τ = 25 ± 12 ms. Though this estimate is approximate and limited by the temporal and spatial resolution of the projector, it is notable that the timescale is comparable to the timescales of visual motion detection in Drosophila vision (Salazar-Gatzimas et al., 2016).
Turning responses to odor motion and wind motion are summed
Insects universally bias their heading upwind in the presence of odor (Alvarez-Salvado et al., 2018; Baker et al., 2018; Budick and Dickinson, 2006; Demir et al., 2020; Kanzaki et al., 1992; Kennedy and Marsh, 1974; Mafra-Neto and Cardé, 1994; Vickers and Baker, 1994), but the role of odor direction in this upwind response is unknown. Our patterned optogenetic setup allowed us to investigate this by independently controlling the wind and odor direction, which is otherwise impossible in natural environments. Above, we quantified turning bias in response to odor motion, but without wind (Fig. 3). We reasoned that in the presence of both wind and odor motion, fly responses would reflect some sort of summation of these responses in isolation, so we now presented fictive odors in wind, but without the motion of odor. To remove odor motion, we flowed laminar wind and flashed the entire arena for 2.5 seconds, followed by 2.5 seconds of no stimulus (Fig. 4a). This stimulates both antennae simultaneously, removing bilateral information — an artificial stimulus that is difficult to deliver with natural odors. In this situation, flies bias their heading upwind (against the wind) at the onset of the flash (Fig. 4b; left plot), reminiscent of their tendency to turn “against” the odor motion in the absence of wind (Fig. 3b). The similarity of turning responses to wind and odor motion separately is illustrated by fitting the turning bias versus orientation plots to a sinusoid (Fig. 4b; dashed lines). In both cases, the plots are well fit by Acos θ, where Awind = −0.40 and Aodor = −0.30.
These simple functional forms encouraged us to consider a simple hypothesis for how flies respond to fictive odor edges moving at a given angle relative to the wind. We hypothesized that the response to the combined signal is a sum of the bar motion and odor motion responses. This hypothesis predicts that when the odor and wind direction are aligned, the peak response should increase in magnitude and remain centered at 0° and 180° (Fig. 4c; first row). If odor and wind motion oppose each other, these peaks should nearly cancel (Fig. 4c; middle row). Finally, in the interesting case of wind and odor directions perpendicular to each other, the peaks should shift leftward to ~145° and ~325° (Fig. 4c; bottom row). To test these predictions, we presented fictive odor bars either parallel, antiparallel, or perpendicular to 150 mm/s laminar wind. When the wind and odor were aligned, the turning bias at ON edges was nearly perfectly fit by the additive prediction (Fig. 4d). The antiparallel motion of bars and odors was also fit well – extrema remained at 0° and 180°, though the cancellation overshot slightly. Notably, the response to perpendicularly oriented wind and odor reproduced the shift of the response curve peak from ~180° to 145°, and nearly reproduced the shift of the minimum from ~360° to ~325°. These results suggest that odor direction selective responses integrate with directional information from the wind in a largely, but not entirely, additive fashion. Moreover, universally observed upwind turning responses are more than naive mechanosensory reactions triggered by the presence of odor – they can be enhanced and even cancelled by directional information from the odor itself.
Flies use spatiotemporal correlations in odor intensity to detect odor direction
Elementary motion detection algorithms respond fundamentally to correlations in the signal over space and time. To better compare against the predictions of the HRC, we moved beyond ON and OFF odor edges and turned to correlated noise stimuli, which have been used to characterize direction selective computations in fly vision (Salazar-Gatzimas et al., 2016). A snapshot of a correlated noise stimuli is a pattern of 1-pixel wide bars, each of which is either bright or dark (Fig. 5a). The pattern updates in time in such a way that it contains well-defined positive or negative correlations between adjacent pixels. Intuitively, a positive correlation in the +x direction means that bright bar at a given x is likely to be proceeded, in the subsequent frame, by a bright bar 1 pixel to its right; visually, this would appear to be a rightward moving pattern. To enhance the effects, we simultaneously flowed laminar wind as in the experiments in Fig. 4. Thus, there were four types of correlated noise stimuli, corresponding to the possible combinations of correlation direction (with or against wind) and polarity (negative or positive), each of which is uniquely defined by its correlation matrix C(Δx, Δt) (Fig. 5b).
In this experiment, turning responses to positively-correlated noise stimuli mimicked those to moving bars: upwind turning was suppressed when the correlation direction opposed the wind (Fig. 5c; first plot). Importantly, spatial gradients in these stimuli quickly average to zero, so only a computation sensitive to spatiotemporal correlations — and not gradients — could account for behavioral suppression when the correlation direction and wind were misaligned. Repeating for negative correlations, we found that upwind turning was suppressed when the correlation and wind were aligned (Fig. 5c; second plot). Notably, this response is also consistent with a correlation-based algorithm, which predicts a reversal of behavior when the correlation polarity flips sign (Salazar-Gatzimas et al., 2016). In fact, this “reverse phi” phenomenon is actually an illusion – a byproduct of a pairwise correlator algorithm – that has been observed in visual responses of several species (Clark et al., 2011; Livingstone et al., 2001; Orger et al., 2000; Salazar-Gatzimas et al., 2018; Tuthill et al., 2011), including humans (Anstis and Rogers, 1975). Subtracting the with-wind and against-wind responses for each polarity indicated clearly that the reverse phi prediction was satisfied (Fig. 5d).
We corroborated our results using gliders, another class of correlated stimuli (Clark et al., 2014; Hu and Victor, 2010). Visually, a glider is a random pattern of light and dark bars moving in one direction (Supplementary Fig. 6a). Unlike correlated noise, the bars are correlated not only with a neighboring bar in the subsequent frame, but also with more distant bars at later times. However, unlike the weaker 1/3 correlations for correlated noise, the correlations in glider stimuli are perfect (Supplementary Fig. 6b), so we expected similar trends as before, but with larger effect sizes. For positively correlated gliders, we found similar trends as with correlated noise, but much larger separations between the with-wind and against-wind responses (Supplementary Fig. 6c). We were also able to explore a range of correlation times by adjusting the frame update times. For update times in the range of 17-30 ms, we find direction selective responses, while for shorter update times (11 ms), direction selectivity disappeared (Supplementary Fig. 6d). Interestingly, the maximum separation of with-wind and against-wind responses was with a frame update of 17-22 ms, consistent with the estimate of the HRC filter constant using moving bars (Fig. 3e).
For flies to sense these correlations in our assay, their antennae must be optogenetically stimulated by distinct pixels. We satisfied this requirement by mounting the projector such that the x-pixel width (~290 μm) approximated the D. melanogaster antennal separation (Supplementary Fig. 6e) (Miller and Carlson, 2010). Consistent with this, effects must also reduce for bars that are wider than the antennal separation. Indeed, repeating the experiments with double the bar width, we found no significant differences between with-wind and against-wind responses (Supplementary Fig. 6f). Together, these results suggest that Drosophila olfactory direction sensing obeys a correlation-based algorithm.
Odor direction encodes crosswind position and aids navigation in complex plumes
Animals could use measurements of odor direction to help them navigate complex plumes, provided this information complements other directional cues such as gradients or wind. To quantify the distribution of odor signal directions in a naturalistic plume, we ran numerical simulations of an environment replicating the plume from Fig. 1. These simulations provide not only a more finely resolved concentration field, but also the airflow velocity field (Fig 6a), which is experimentally inaccessible. We first compared, for a few fixed points in the plume, the odor velocity vodor and the airflow vwind at a single time. Both vodor and vwind had x-components comparable to the mean flow speed 150 mm/s. However, vodor also had large crosswind components vy,odor pointing outward from the plume centerline, which were noticeably absent from vwind (Fig. 6b; left). Averaging over all detectable odor filaments in the 120s simulation revealed a similar trend: away from the plume centerline, the distribution of vodor spanned a tight angular range, pointing consistently outward in the crosswind direction (Fig. 6b; middle column). Meanwhile, vwind was distributed largely downwind, with much smaller outward angles (Fig 6b; right column). To visualize the “flow” of odor motion, we calculated the time-average of ⟨vodor⟩ at all locations in the plume. We compared this to the time-average of the wind vector conditional on the presence of odor, ⟨vwind|odor⟩. We used the latter rather than the unconditional wind velocity, ⟨vwind⟩, since for an ideal point source of odor within homogeneous turbulence, the latter does not encode the lateral location of the source. Throughout the plume, ⟨vodor⟩ flowed strongly outward from the plume center, while ⟨vwind|odor⟩ was directed essentially downwind (Fig. 6c).
This analysis suggests that in naturalistic odor plumes emanating from a point source, odor direction is a strong indicator of the direction towards the centerline of the plume. This directional cue is not necessarily reflected in the local wind, nor in the local gradients, though we did find that odor gradients have a similar crosswind structure closer to the source, where the plume is less intermittent (Supplementary Fig. 7a). Of course, to be useful for navigation, odor direction must be resolvable on realistic timescales. By calculating the running average of the odor direction at a fixed location, we found that in most of the plume extent, only several hundred milliseconds were necessary to resolve the lateral components (Supplementary Fig. 7b-c). Since odor bursts occurred at ~1-5 Hz in this particular plume, a navigator could estimate the direction of odor motion orthogonal to the mean flow after only a few odor hits.
To investigate how Drosophila use odor motion during a navigation task, we designed a fictive odor plume whose boundaries were subtended by a cone — as if emanating from a source — and within which thin bars moved laterally outward from or inward toward the centerline, while laminar wind flowed along the cone axis (Fig. 6d). We reasoned that inward moving bars, which are reversed from their natural flow, would degrade localization to the odor “source,” i.e. the tip of the cone. For both bar directions, flies stayed within the conical fictive odor region, but were significantly more likely to reach the upwind source region when the bars moved naturally outward (9.8% versus 4.8% reached the source for outward versus inward bars, respectively, p < 0.01, two-tailed t-test) (Fig. 6e-f). Notably, the fictive odor signals in these two paradigms do not differ by location, frequency, duration, or spatial gradient — differences in performance (Fig. 6f) can only be explained by odor direction alone. We then tried the more realistic case of projecting a video of a recorded plume (Fig. 1a) onto the arena (Fig. 6g), playing the video not only normally, but also in reverse. As in the previous paradigm, reverse playback reverses odor direction without perturbing any other spatial or temporal information measured at each point. Remarkably, the likelihood to reach the odor source significantly degraded when the plume was played in reverse (3.0% versus 0.7%; p < 0.05, two-tailed t-test) (Fig. 6h-i). Together, these results indicate that the odor motion provides a directional cue complementary to odor gradients and wind motion, and strongly enhances navigation in complex odor plumes, even when all other aspects of the odor signal remain unchanged.
DISCUSSION
Olfactory navigation relies on integrating various sensory signals that contain information about the odor source. Which features exist, and how much information they carry, can vary considerably between plume structures (Boie et al., 2018; Jayaram et al., 2021; Rigolli et al., 2021). Gradient sensing can provide reliable directional information when navigating laboratory-controlled plumes, such as static ribbons (Duistermars et al., 2009), or very close to the source of natural plumes before odor patches have dispersed (Supplementary Fig. 7). Further away from the source however, turbulent air motion stretches and fragments odor regions as they are carried downstream, producing odor signals that are patchy and intermittent (Celani et al., 2014; Riffell et al., 2008), and which span many spatial scales – the so-called inertial convective range – from macroscopic eddies to molecular diffusion (Sreenivasan, 2019). In these regions, odor concentration gradients tend to point in random directions relative to the source, and so have limited value. Even in turbulent boundary layers, where concentrations are more regular (Connor et al., 2018), gradients can aid navigation, but require unnaturally amplifying the gradient to an extreme degree not consistent with data (Alvarez-Salvado et al., 2018).
Our work confronts some of the limitations of gradients by revealing an entirely distinct role for bilateral sensing: measuring odor direction by comparing concentrations in both space and time. This information stream is especially relevant to the statistical features present in the inertial convective range of turbulent plumes. Parallel to the plume axis, odor motion is mainly determined by, and redundant with, the average wind direction. But perpendicular to the plume axis, turbulence spreads odor packets by random continuous motions, with an effective diffusivity much larger than molecular diffusion (Pope, 2011; Taylor, 1922). What results is a flux of odor patches directed away from the plume centerline, providing a strong directional cue orthogonal – and thus complementary – to the mean wind. Theoretical analysis of a simple turbulent plume model (Methods) suggests that the outward flow of odor motion we found in simulations (Fig. 6c) is likely a feature of turbulent odor plumes more generally (Supplementary Fig. 8a-b), and that lateral odor velocity components can be detected by computing local correlations between two nearby points (Supplementary Fig. 8c).
Insects universally bias their heading upwind when odors become longer, more intense, or more frequent (Alvarez-Salvado et al., 2018; Baker et al., 2018; Demir et al., 2020; Kanzaki et al., 1992; Kennedy and Marsh, 1974; Mafra-Neto and Cardé, 1994; van Breugel and Dickinson, 2014). This strategy fails at the plume edges, where insects then resort to local search or downwind or crosswind motion to re-enter the plume (Alvarez-Salvado et al., 2018; Budick and Dickinson, 2006; Mafra-Neto and Cardé, 1994). In this sense, the value of the lateral odor motion is evident, providing cues about which crosswind direction to take to reenter the plume. Our work does not explore odor direction sensing in the z-dimension – say, for flying insects. The role of odor direction sensing would likely be different, since odors traveling upward would not be sensed bilaterally unless the fly were flying with nonzero roll. In flight, directional cues from the optic flow also shape navigation (Budick et al., 2007). How odor direction contributes in this locomotor regime remains an avenue for future work.
Our setup allows us to test the predictions of the HRC using artificial correlation-type stimuli which would be prohibitive to reproduce with natural odors. In particular, we generated a reverse phi illusory percept for negative correlations, an signature of correlation-based algorithms observed in visual motion detection in flies (Clark et al., 2011; Eichner et al., 2011; Salazar-Gatzimas et al., 2018; Salazar-Gatzimas et al., 2016) and other species (Hassenstein and Reichardt, 1956; Livingstone et al., 2001; Orger et al., 2000; Tuthill et al., 2011), including humans (Anstis and Rogers, 1975). The HRC computes only second-order correlations – correlations between pairs of points in space and time – but, at least in vision, higher-order correlations can elicit direction-selective behaviors (Clark et al., 2014), and may improve motion detection by exploiting the statistics of natural scenes (Chen et al., 2019; Fitzgerald and Clark, 2015; Fitzgerald et al., 2011). Natural odor landscapes also exhibit universal highly-structured statistics (Celani et al., 2014) to which odor direction selective computations may likewise be tuned.
In mouse retina and fly vision, motion detection circuits have been characterized in detail and have many parallels (Borst and Helmstaedter, 2015; Clark and Demb, 2016), though much remains unknown. In both, visual motion is computed separately for ON and OFF edges (Euler et al., 2002; Famiglietti, 1983; Maisak et al., 2013), and it is likely that a similar split may exist in odor motion computations, given the difference in responses to ON and OFF edges in the presence of wind (Supplementary Fig. 5). In contrast to the canonical HRC architecture, three inputs feed into direction selective neurons in the fly visual circuit (Shinomiya et al., 2019; Takemura et al., 2017). This is unlikely to be the case in olfaction, if direction sensing is indeed enabled by bilateral segregation. Still, our results do not implicate any specific circuit architecture or mechanism. In fly vision, direction selective behaviors and signals are frequently well-described by a pairwise correlator model (Clark et al., 2011; Haag et al., 2016), while the underlying neural architectures and functional interactions remain incompletely understood and quite complex (Badwan et al., 2019; Gruntman et al., 2018, 2019; Haag et al., 2016; Salazar-Gatzimas et al., 2018; Shinomiya et al., 2019; Strother et al., 2017; Takemura et al., 2017; Wienecke et al., 2018). Ultimately, comparisons between odor and visual motion detection systems will reveal how circuits in these distinct modalities accomplish similar tasks.
Where could direction selectivity occur in the olfactory circuit? Most ORNs project to both antennal lobes, but ipsilateral and contralateral signals differ in magnitude and timing (Gaudry et al., 2013; Tobin et al., 2017), which could be amplified further downstream to enact bilateral computations. One potential region of interest is the third-order olfactory center, the lateral horn (LH), which mediates innate odor responses (Jefferis et al., 2007). Output neurons from the LH to the ventrolateral protocerebrum (VLP) have been shown to enhance existing bilateral differences through contralateral inhibition (Mohamed et al., 2019). Though this may be an isolated effect, the VLP region is highly suggestive: it lives in the ventral region of the LH, which receives inputs from wind-sensing wedge neurons – a potential integration center for bilateral odor information and wind (Dolan et al., 2019).
The lack of smooth concentration fields in naturalistic plumes has inspired a number of studies focusing on how animals use the temporal features of the odor signal, such as the frequency of encounters with odorized air packets. This reliance on timing is enabled by the remarkable degree of temporal precision in olfactory circuits (Ackels et al., 2021; Gorur-Shandilya et al., 2017; Martelli et al., 2013; Park et al., 2016; Shusterman et al., 2011). Here, we show that odor timing can be combined with spatially-resolved sensing to produce a complementary information stream, encoding directions that do not exist in the only other directional cue, the wind. Our work reveals a novel role for bilateral sensing in turbulent plume navigation, beyond measuring simple gradients.
COMPETING INTERESTS
The authors declare no competing interests.
CONTRIBUTIONS
NK, DC and TE designed the research. NK and MD built the assay with inputs from DC and TE. NK performed all experiments and data analysis. MD performed the electrophysiology. BM and MR performed the numerical simulations for Fig 1. NK and TE performed the theoretical analysis of the turbulent plume. NK, DC and TE validated the data. NK, DC, and TE discussed the data analysis. NK, DC, and TE wrote the initial draft and all revisions. All authors approved the final manuscript.
METHODS
Fly strains and handling
Flies were reared at 25°C and 60% humidity on a 12 hour/12 hour light-dark cycle in plastic vials containing 10 mL standard glucose-cornmeal medium (i.e. 81.8% water, 0.6% agar, 5.3% cornmeal, 3.8% yeast, 7.6% glucose, 0.5% propionic acid, 0.1% methylparaben, and 0.3% ethanol. Media was supplied by Archon Scientific, NC). All flies used in behavioral experiments were females. Between 10 and 30 females were collected for starvation and placed in empty vials containing water-soaked cotton plugs at the bottom and top. All flies were 3–10 days old and 3 days starved when experiments were performed. Optogenetically active flies were fed 1 mM all trans-Retinal (ATR) (MilliporeSigma; previously Sigma Aldrich) dissolved in water. ATR was fed to flies 1 day prior to recording.
All flies used throughout the study had copy of the GMR-hid gene to make them blind. Optogenetic activation was achieved by expressing Chrimson (20X-UAS-CsChrimson) in Orco-expressing olfactory receptor neurons (Orco-GAL4) in almost all experiments. The one exception was the single-Or experiments (Supplementary Fig. 3c-d), which expressed Chrimson in only neurons expressing the olfactory receptor Or42b.
Behavioral assay and optogenetic stimulation
The fly walking assay is identical to the one used in a previous study (Demir et al., 2020). All experiments were done in a behavioral room held at 21-23°C and 50% humidity. The walking arena is 270×170×10mm (see Fig. 2a), and consists of top and bottom glass surfaces and acrylic sidewalls. The upwind end is an array of plastic coffee straws, which laminarize the airflow (when wind is turned on); downwind end is a plastic mesh. For experiments with wind, dry air is passed through the straws at a flow rate giving a laminar flow at 150 mm/s within the arena. Flies are introduced by aspirating through a hole near the downwind plastic mesh. Flies were illuminated using 850 nm IR LED strips (Waveform Lighting) placed parallel to the acrylic sidewalls.
Experiments were recorded with a FLIR Grasshopper USB 3.0 camera with IR-pass filter at 60 Hz. Optogenetic stimuli were delivered using a LightCrafter 4500 digital light projector mounted 310 mm above the arena, illuminating an area larger than in the original method (DeAngelis et al., 2020). Only the red LED (central wavelength 627 nm) was used throughout this study. We used the native resolution of the projector (912 ×1140 pixels), which illuminated the entire walking arena with pixels of size 292 μm (along wind axis) x 292 (perpendicular to wind axis) μm. The majority of our experiments used a 60 Hz stimulus update rate; the exception is the glider experiments (Supplementary Fig. 6d), for which we used a 180 Hz update rate to get faster updating stimuli. The average intensity of the red light within the walking arena was 4.25 μW/mm2. Though all data presented in this article used blind flies, initial exploratory experiments used flies that were not blind. To remove visual effects from the stimulating red light, we shone green light using an LED (Luxeon Rebel LED 530 nm) throughout the arena to flood the visual response. Though this was not necessary for blind flies, we retained the green light throughout the experiments presented here to compare to past data.
The projector and camera have distinct coordinate axes – camera and projector pixels are different sizes and their native coordinates systems are not even the same handedness. To infer the virtual perceived stimuli for navigating flies, the transformation between a 2D camera coordinate xcam and a 2D stimulus coordinate xstim. We assume that the two are related by a combination of linear transformations and translations:
To estimate the matrix A and vector B, 3 mm diameter dots were projected at random locations in the arena while recording with the camera; camera coordinates were determined in the imaged frame using the SimpleBlobDetector function in OpenCV. The 6 elements of A and B were then determined by minimized the least squares difference:
We verified manually that this procedure generated accurate transformations. We generated all stimuli using custom-written scripts in Python 3.7.4, and delivered these stimuli to the projector using the Python package PyschoPy, version 2020.2.4.post1.
Electrophysiology
Single sensillum recordings from Drosophila antennae were performed as described previously (Gorur-Shandilya et al., 2017). The recording electrode was inserted into a sensillum on the antenna of an immobilized fly and a reference electrode was placed in the eye. Electrical signals were amplified using an Ext-02F extracellular amplifier (NPI electronic instruments). The ab2 sensillum was identified by i) its size and location on the antenna, and ii) test pulses of Ethyl 3-HyrdoxyButyrate, to which the B neuron is very sensitive. Spikes from the A and B neurons in this sensillum were identified and sorted as described previously (Gorur-Shandilya et al., 2017), using a spike-sorting software package written in MATLAB (Mathworks, Inc.) (https://github.com/emonetlab/spikesort).
Experimental protocol
Experiments were carried out between 9 and 12 AM. All videos were 1 minute long, unless otherwise noted. Flies numbering between 10 and 30 were aspirated into the arena and let to acclimate for 2 minutes before experiments began. Before all experiments, optogenetic activation was verified by presenting static fictive odor ribbons (as in Supplementary Fig. 2c) with laminar wind for 120 seconds, and ensuring that flies followed the ribbons upwind as a positive control. Unless otherwise noted, each experiment ran for 60 seconds, with 60 seconds in between experiments. Throughout, experiments were interleaved such that the directions of the moving stimuli were randomized. No more than 30 videos were recorded on a single set of flies.
Quantification of fly behavior and perceived fictive odor stimulus
Extraction of fly position, speed, and orientation from videos
All scripts were written in Python 3.7.4. Fly centroids were determined using SimpleBlobDetector in OpenCV, assuming a minimum area of 5 mm2. Given the centroids, fly identities were determined using custom tracking scripts. Briefly, centroids in subsequent frames were matched to the nearest centroid, and if the centroids could not be matched, they were marked as disappeared. Flies marked as disappeared for more than 30 frames (0.5 seconds) were then deregistered. Subsequent detected centroids were then marked as new fly tracks. Fly orientations θ were determined by first using the canny function in the Python module scikit-image to determine the points defining the fly edges around the centroid, then fitting these to an ellipse using custom-written Python scripts. Fly orientations are defined on the interval [0, 360°], but ellipse-fitting does not distinguish head (0°) from rear (180°). We properly resolved this using the fly velocity (below).
The above data defines the fly positions (x, y) and orientations θ. To remove measurement noise, we filtered each of these quantities with a Savitsky-Golay filter using a 4th-order polynomial and window size of 21 points (to avoid branch cuts in θ, it was first converted to an un-modded quantity). Velocities and and angular velocity were defined by taking the analytical derivative of the fitted Savitsty-Golay polynomials for x, y, and θ. To resolve the two-fold symmetry in the fitted ellipses, and therefore distinguish the fly head from the rear, we used the fly velocity. For fly speeds greater than a given speed threshold, we matched the orientation to the fly velocity vector since flies walked forward. For other times, we matched the fly heading at the beginning and end of bouts when fly speed was below the speed threshold. The result was an estimate that may still have errors which occur as unnatural jumps in orientation. We repeated this process for various speed thresholds from 1 to 4 mm/s, and chose the orientation trace with the least number of jumps. We verified manually with several tracks that this procedure was highly reliable.
We noticed that during the experiments, particularly those with long fictive odor encounters such as the wide bars in Figs. 3 and 4, there was a slow, gradual bias toward one side of the arena (along the shorter axis of the arena). This only occurred for optogenetically active flies, and we reasoned it was due to a shadowing effect of the projector light from one antenna onto the other, since the projector lens is nearer to the bottom of its projected image. This shadowing effect essentially creates a static fictive odor gradient across the antenna. To account for this bias, we repeated all experiments that had an asymmetry in the perpendicular direction, such as bars perpendicular to the wind (Fig. 4d; 3rd row), in both directions. We then averaged the turning biases from these two directions, after flipping the orientations appropriately. This would retain the effects due to direction sensing but remove the bias, under the assumption that this bias was an additive effect.
Estimation of perceived fictive odor stimulus in antennae
Given these smoothed and corrected x, y, θ, we then estimated the perceived fictive odor signal in the antenna region by defining a virtual antenna at a location 1.5 mm from its centroid along the ellipse major axis toward the fly head. To generate stable estimates – i.e. not relying on a single pixel value – we use the stimulus value averaged over a box of 0.25 mm2 around this location. Stimulus values in the antennal region are not measured by imaging, since the images are IR-pass filtered. Rather, they are obtained from knowledge of the stimulus pattern and the stimulus-to-camera coordinate transformation defined above. In PsychoPy, stimulus values are defined as 8-bit integers, from 0 to 255, but in practice we only deliver stimuli as max intensity (255) or 0. Accordingly, we treat the signal in the virtual antenna as binary, equal to 1 when the average stimulus value in the 0.25 mm2 region is above 200, and 0 otherwise.
Calculation of turning bias at bar edges
For the bar stimuli in Figs. 3–4, we identified ON and OFF edge hits as the times that the antennal signal switched from 0 to 1 or 1 to 0, respectively, where this binarization was calculated as described above. Correlated noise and glider stimuli (Fig. 5) were presented in blocks of 4s stimulus interleaved with 4s of no stimulus; thus the stimulus ON times were 0, 8, 16 seconds, etc. To calculated turning biases, we followed prior work and considered saccadic turning events, identified as points at which the absolute value of the angular velocity exceeded 100°/s, and ignored small jitters. Turn biases at a given time ti (e.g. at an ON or OFF edge hit (Fig. 3–4)), were defined as the sign of the change in fly orientation from ti + 150 ms to ti + 300 ms, provided the absolute value of angular velocity in that window exceeded 100°/s at some point in that window. We used this 150 ms latency after ti to account for uncertainties in ti due to uncertainties in exact position of the antenna, which we estimated as being upper bounded by 2 mm. For correlated noise and glider stimuli, we considered orientation changes from ti to ti + 300 ms; the 150 ms latency was not needed in this case since the signal was independent of fly behavior, so the hit time was known to the precision of the inverse frame rate (16 ms). For all plots, to remove tracks in which flies may have been turning before the hit, we ignored points for which the absolute angular velocity exceeded 100°/s between 300 ms and 150 ms before the hit.
Plume simulations
Direct numerical simulations were generated using the CFX® hydrodynamic simulation software package of ANSYS 2019. Parameters were chosen to emulate the flow and intermittent odor structure of the plume analyzed in Fig. 1 (Demir et al., 2020). An odorant with molecular diffusivity Dm = 7.3e-6 m2/s was injected mid-stream (vertically and horizontally). The odorant was modeled as a conservative, neutrally buoyant tracer. The dimensions of the computational model domain were 30×18×1 cm, approximately matching those of the walking arena (Demir et al., 2020). The computational air inlet boundary was modeled as a uniform velocity condition, representing an idealized collimated flow. The outlet boundary condition was modeled as a zero-pressure gradient opening allowing for bidirectional flow across the boundary. Walls were modeled using hydraulically smooth, no-slip boundary conditions. To reproduce the stochastic airjets creating the complex flow and plume, alternating jet pulses of air were applied from two orifices on opposite sides of the flume. The time series of pulses were identical to the experiments (Demir et al., 2020). The model domain was broken up into 4.7e6 tetrahedral elements where velocity and concentration were computed, with the largest element’s length at 5 mm with an inflation layer along the domain boundaries and a refined mesh around the inlet orifices.
The flow was simulated at a 2.5 ms time step using a k-ϵ eddy viscosity model (Pope, 2011), which solves the Reynold-averaged Navier Stokes equations, where the momentum equation is defined as: and the continuity equation as: where ρ is the fluid density, p is pressure and μeff is the effective fluid viscosity. The turbulent eddy viscosity is treated analogously to viscosity in laminar flow such that μeff = μt + μ where μt is the turbulent viscosity and μ the fluid viscosity. The k-ϵ model assumes the local turbulent viscosity is related to the local turbulent kinetic energy (k) and the eddy dissipation rate (ε) as follows:
The advection-diffusion equation for conservative tracers was used to model the chemical transport of the odorant: where Cx is the tracer concentration, u is the velocity field, Dx is the molecular diffusivity and ε is the local eddy diffusivity solved from the turbulence model. For all further analysis, we used the concentration and velocity in a plane 1 mm above the bottom of the domain, in the approximate z-plane of the fly antennae.
Mathematical modeling and data analysis
Inter-antennal latency of edge hit ΔT
The inter-antennal latency ΔT as a function of fly walking speed |vfly| and bar speed |vbar| can be calculated with basic geometric considerations. Here, we assume that the fly speed along the bar direction is sufficiently slow such that the bar passes over the fly. Consider a coordinate system in the frame of the moving bar, where the bar direction is +y (i.e. the bar’s edge is in x). The fly velocity in this frame is where ϕ is the angle of rotation from vbar to vfly in the experimenter frame. The inter-antennal latency ΔT is then the projection of the antennal spacing L along vbar divided by the projection of vr along vbar. The former is L sin ϕ and the latter is the y-component of vr; the sign of L sin ϕ is treated as meaningful, so that a positive/negative value means the left/right antenna is hit first. Thus: where the sign is given by the numerator since the denominator is always positive for bars passing over the fly.
This expression ignores the fly’s angular velocity while walking. Assuming that the fly is walking forward while also turning at a rate ω, then the total accumulation of orientation over the ΔT interval is ωΔT, which for typical values of the maximum rotation rate during normal turns ω ~ 300°/s and typical inter-antennal latencies without turning, ΔT < 15 ms, is less than 5 degrees. This would be if the fly were turning at a maximum angular velocity. For more typical jitters, rotation rates are approximately 20°/s (Demir et al., 2020), giving an accumulated angle during of less than 1 degree. If we incorporate this error as an uncertainty on ϕ, δϕ, then ΔT acquires an error of
With the values assumed throughout, |δΔT| < 1 ms, so ω is safely ignored to the resolution of our experiments.
HRC output versus ΔT for traveling edges
Our prediction for the turning bias as a function of the latency ΔT at which an edge of odor hits the right antenna after hitting the left, is based on the output r(t) of the mirror-symmetrized Hassenstein-Reichardt correlator (Salazar-Gatzimas et al., 2016). To calculate r(t), we model the correlator architecture as depicted in Fig. 3d. Specifically, the time-varying signals from the 2 sensors are sL(t) and sR(t). In one arm of the computation, sL(t) is linearly filtered with an exponential , while sR(t) is transmitted unchanged; these are then multiplied. For a traveling ON edge moving left to right, we have sL(t) = H(t) and sR(t) = H(t − ΔT), where H(⋅) is the Heaviside function. Then the product of the filtered values is:
The other arm is similar, except that s2(t) is filtered and s1(t) is transmitted unchanged. Then the product of the filtered inputs is:
The correlator output is therefore:
Assuming that flies sense odor direction using this computation, the output of the correlator, r(t), must be converted to a behavior; here, we model this behavior as the turning bias being proportional to ∫ r(t)dt: provided that behavioral timescales T− and T+, over which the correlator response is integrated to produce the turning response, are large compared to τ and to ΔT. Long after the edge hit, t ≫ T−, the signals are both sL = sR = 1, giving an HRC output of 0, as expected for the anti-symmetric architecture.
To estimate the filtering constant τ, we minimize: over A, τ. The turning bias is plotted in increments of ΔT = 4 ms, where the value at a given ΔT includes values from ± 4 ms. Neighboring points therefore contain overlapping data; this has the effect of smoothing – but not biasing – the turning bias vs. ΔT curve.
Responses to rightward moving OFF edges are analogous. The signal switches from 1 to 0 at the OFF edge (set it to t = 0), so the signal on the left sensor is sL(t) = 1 − H(t) and for the right sensor is sR = 1 − H(t − ΔT). Then one arm of the HRC is: and sLR(t) = 0 for t > ΔT and sLR(t) = 1 for t < 0. The other arm output is simply sRL = 1 for t < 0 and sRL = 0 for t > 0, since the non-delayed arm drops to zero as soon as the edge passes it at t = 0. Thus the output is:
Integrating this quantity over time gives the same turning bias as the ON edge.
Generation of correlated noise stimuli and C(Δx, Δt)
Correlated noise stimuli were generated as previously described (Salazar-Gatzimas et al., 2016). We used optogenetic bars that were parallel to the short axis (y) of the arena (e.g. perpendicular to the wind direction, which runs along x). Each bar has a width of one x-pixel – thus, refer to an x-pixel as a “pixel,” since correlations are defined just in the x-direction. The stimulus value (where −1 and 1 are for dark and bright bars, respectively) of a bar at pixel location x and time t is given by c(x, t) = sgn(η(x, t) + αη(x + βΔx, t + Δt)), where each η(x, t) is independently chosen from a standard normal distribution. Δx is the pixel spacing; Δt is the inter-frame interval. The constant β governs the direction of the correlations: +1 for stimuli correlated in the +x direction (“with-wind” in the main text) and −1 for stimuli correlated in the −x direction (“against-wind”). The constant α governs the polarity of the correlations; +1 or −1 for positive or negative correlations, respectively.
The correlations can be computed straightforwardly (Salazar-Gatzimas et al., 2016). Assume that α = β = 1; the other cases are analogous. The correlations between two pixels separated by spacing x′ and timing t′ we denote C(x′, t′) = ⟨c(x, t)c(x + x′, t + t′)⟩. In general, where ηi is one sample of η. For most choices of t′, x′, all ηi are distinct, so the correlation reduces to 0 since the sums are independent. For x′ = t′ = 0, the correlation reduces to the variance of c(x, t), which is 1. However, for t′ = Δt and x′ = Δx, η2 = η3. Then, since the random variables are symmetric about 0. The sign depends only on the ordering of the ηi, which are 3 independent samples from a standard normal distribution. There are 6 ways to uniquely order the ηi, only two of which give a positive sign (η1 > η2 > η4 and η1 < η2 < η4); thus the expected value is 1/3 (Salazar-Gatzimas et al., 2016). An analogous property holds for t′ = −Δt,x′ = −Δx. Finally, the α and β factors are incorporated straightforwardly as scale factors, giving:
Note that the correlation can be calculated by averaging over all of spacetime, or just in space for a fixed set of times, or just in time for a fixed set of points. The latter is our interpretation for the HRC output from fixed antennae, assuming the correlation direction is perpendicular to the fly body.
Generation of glider stimuli
Here, the stimulus value of a bar at pixel location x and time t is given by c(x, t) = B(x − βtΔx/Δt), where B = 2X − 1 with X ~ Bernoulli(p = 0.5), Δx is the pixel spacing, and Δt is the inter-frame interval. The correlation between two pixels separated by spacing x′ and timing t′ is
Then, C(x′, t′) = 1 when – i.e., the correlation matrix has a diagonal or antidiagonal structure for β = 1 and β = −1, respectively. These stimuli are a class of glider stimuli with a two-point correlation structure. Visually, these gliders are a frozen pattern of random light dark bars moving statically at constant speed in the βx direction.
HRC output for correlated noise stimuli
Here we calculate the HRC output for correlated noise stimuli. Assume that the antennae are held at approximately the spacing of the correlation shift Δx (see last section), and that the correlation direction is +x (rightward over the fly body), so β = 1 from the last section. Then one arm of the HRC gives:
Averaging over time gives:
Since β = 1, then only the last term in the correlation equation applies:
This equation holds for Δt being positive. The other arm is analogous, for Δt < 0.
Thus, the full correlator output is
Note that the correlator output response switches sign if the correlation polarity α flips – this is the reverse phi response. There is a slight artificiality in this expression, in that the response is discontinuous at Δt = 0. We have assumed an exponential filter, which technically has an immediate response time, violating causality. In addition, the optimal response occurs for an inter-frame interval Δt that is arbitrarily small. As a more realistic filter, one can use , which has zero response at time zero and maximal response at t = τ. Then:
This filter is continuous at Δt = 0, and the maximum correlator output occurs when the filter timescale τ matches the interframe interval Δt. In either case, the salient point is that the response is antisymmetric in both the temporal shift Δt and the correlation polarity α, as expected.
Analysis of imaged plume
We re-analyzed behavioral data previously extracted from Drosophila navigating an imaged complex plume of smoke (Demir et al., 2020) in the same walking assay used throughout this study. The signal in the virtual antenna was quantified as described previously; briefly, the virtual antenna is defined as an ellipse perpendicular to the body axis with the long axis given by the size of the fly (1.72 ± 0.24 mm) and the small axis equal to one-fifth the minor axis of the fly (0.46 ± 0.24 mm). We re-analyzed the imaged fly and signal data to resolve the virtual antenna signal into 14 pixels along its long axis (averaged along its short axis). Thus, the signal is a vector sant(t) = [s(x1, t), s(x2, t), …, s(x14, t)] defined at locations along the antenna’s long axis xant = [x1, …, x14] for a given time t.
The overall concentration in the antenna was calculated as the average signal over the center of the virtual antenna – at the locations [x5, x6, x7, x8]. The gradient ∇cant in the virtual antenna at a given t was calculated by regressing sant against xant and extracting the slope. The odor velocity in the virtual antenna was estimated by calculating correlations of the virtual antenna signal over space and time. For a given t, we calculated , where Δx spanned integers from −7 to 7, and Δt is the interframe interval (11 ms), and s(⋅) were mean subtracted. This gives the signed number of pixels for which the correlation between two successive frames is maximized, up to the length of the antenna. The odor velocity was then defined as ⋅ frame rate ⋅ resolution, where the frame rate is 90 frames per second and the spatial resolution is 0.153 mm per pixel. We disregarded points for which was ±7, since those may not represent local maxima but were instead limited by the size of the antenna. All three quantities – total concentration, gradient, and odor velocity – were smoothed in time using a Savitsky-Golay filter of order 2 and smoothing window of 25 timepoints ~ 270 μs.
To remove boundary effects from the arena extent, we only used for Fig. 1c-e points for which the fly was in the central region of the arena, 100 < x < 250 mm, |y − y0| < 40 mm, where y0 is the plume’s central axis, and only points for which fly speed was greater than 0.1 mm/s. Angular velocity was calculated as the average orientation change over 200 ms.
Analysis of simulated plume
The simulation generated concentration fields c(xi, yi, t) and flow velocity fields vwind(xi, yi, t) defined on grid points (xi, yi) of a non-uniform mesh. We first generated values on a 0.5 mm square lattice, by triangulating the data and performing barycentric linear interpolation over each triangle (scipy.interpolate.griddata in Python, with method ‘linear’). Fields in Fig. 6 and Supplementary Fig. 7 were plotted every 1 cm, (i.e. every 20 pixels on the original 0.5 mm lattice). Wind speed vectors at each point on this 1 cm lattice were generated by averaging vwind over the 20 x 20 values in a 1 cm2 box. The plotted vwind|odor field was generated by only considering wind vectors for which the odor concentration was above 1e-3. Odor gradients were generated by calculating local differences ∇cx and ∇cy in the x- and y-directions, respectively. Specifically, for ∇cx, we calculated (x+ − x−)/(x+ + x−), where x+ and x− were the averages in the right and left half of a 1 cm2 box centered at each lattice point, respectively. ∇cy was calculated analogously, using the top and bottom half of the same box. Odor velocities were calculated similarly to those in the imaged plume used in Fig. 1, by correlating the values in a given spatial region between two frames. Specifically, to get vx, odor at a given time t, we calculated , where s(xj, t) was the odor concentration in a 1 cm2 box averaged over the y-direction for each xj pixel spaced by 0.5 mm. The shifts Δx ran from −20 to 20 pixels (±1 cm). This quantity was multiplied by the frame rate 100 frames per second and by the spatial resolution 0.5 mm per pixel to get vx, odor in mm/s. An analogous operation was done for vy, odor using the same 1 cm2 box. All odor gradient and odor velocity values for very low odor concentrations were set to Nan, as were any odor velocity values that produced a maximum shift |Δx| = 20. The resulting wind speed, gradient, and odor velocity were all smoothed in time using a Savitsky-Golay filter of order 1 and window length 11 (110 ms).
Theoretical analysis of odor motion in turbulent odor plumes
Here we investigate the motion of odor signals perpendicular to the mean flow using a toy model of turbulent plume similar in spirit to those used in (Balkovsky and Shraiman, 2002; Goldstein, 1951; Taylor, 1922). Odor packets are released from a point source at a given rate. The concentration around the center of each packet is given by a local diffusive process that spreads the concentration via molecular diffusion of the odor. Meanwhile, the packets themselves are advected downwind by the mean flow, while being dispersed by the fluctuating velocity u (Taylor, 1922). We consider the simple case of an isolated packet and calculate its expected velocity crosswind to the flow, at different locations throughout the plume. For analytical simplicity, we model the turbulent velocity u as a telegraph process that switches between left motion and right motion at speed v, where the switching rates from left to right and vice versa are both λ = 1/T. Thus, 2T is equivalent to the Lagrangian integral time scale and the packet speed v to the r.m.s. of the turbulent velocity field. While the velocity u switches discontinuously between +v and −v, its time correlation function is the same as that of the Ornstein-Uhlenbeck (O-U) process often used to model homogeneous isotropic turbulence (Pope, 2011; Taylor, 1922):
Our goal is an estimate of the average odor motion velocity at a given lateral distance from the plume, at a given time t, ⟨v⟩y,t. Since packets are advected downwind at some speed U ≫ v, we have t ≈ x/U, so that this is equivalent to finding the average lateral velocity at some x, y position in the plume (Pope, 2011). Run times are distributed as , so packets reaching a given y will have been traveling for some distance , where is distributed as . If the packets were originally uniformly distributed, then the average velocity at y would be 0. However, an asymmetry arises due to the non-uniform packet distribution, which is dispersing laterally from a delta function at y = 0. For times t ≫ T, the distribution of packets is approximately the diffusion kernel with effective turbulent diffusivity DT = Tv2/2:
Under these assumptions, the average velocity at the fixed point ⟨v⟩y,t is:
The first term in the numerator is for packets reaching y that have come from its left (these are traveling in the +y direction), while the second is for those reaching y that have come from the right, which are traveling in the −y direction. The denominator is a normalization factor given by the total number of packets reaching y at time t. This equation can be integrated numerically. To obtain an analytical approximation, we neglect the change in the packet distribution over the time of traveling one correlation time, approximating p(y′, t − y′/v) by p(y′, t), since the packet distribution does not change appreciably over that time (the validity of this assumption was verified by simulations). Integrating: where for |y| < vt, and 0 otherwise. We are interested in i) whether the average lateral velocity of the packets is directed outward from the plume, which would be indicated by an asymmetrical dependence in y, and ii) how this asymmetry depends on the correlation time T. The profile of ⟨v⟩y,t is odd for all T (Supplementary Fig. 8a), indicating that for any T, the velocity of odor packets in the crosswind direction points away from the plume’s central axis. Moreover, for higher T, the velocity component points more strongly outward through a larger portion of the plume, indicating that correlations in the packet motion underlie this directional cue (Supplementary Fig. 8a).
We next investigate how the combination of packet diffusion and packet centroid motion together can influence a spacetime correlation of the odor concentration, as would be computed by time-resolved bilateral measurements. We define a lateral correlator 〈ΔyΔt|yi〉 at a position y and time t, assuming a packet is traveling nearby with trajectory yi(t). The correlator has the following form: where and where yi(t) is the centroid of a nearby packet and p(⋅) is the local concentration at a given location and time around the packet. Thus, the correlator 〈ΔyΔt〉 is a time-antisymmetrized quantity that compares the correlation of the odor concentration between two points in the direction perpendicular to the mean wind, separated by Δy at times separated by Δt, given a packet whose center is at (xi, yi) and which is released at t = 0. We stress that we do not imply that this correlator is being enacted by any circuitry, nor is it a unique definition. However, it has key features – namely comparisons across space and time, and time antisymmetry – which we will show to be sufficient to detect the lateral odor velocity. Expanding this correlator gives to lowest order. For the packet model, at appreciable times t ≫ T, this gives: Note that this is for a single packet, and must be averaged over the packet distribution p(yi, t) to get the correlator at a fixed y, t: where for t ≫ T, as above. We can approximate by – the average velocity for a packet at position yi as derived above. The expression for ⟨ΔyΔt⟩ does not lend itself to a closed-form expression due to the complexity of ; we integrate it numerically. We find that for Dp ≪ DT = v2T/2, ⟨Δy Δt⟩ has a clear asymmetry about y = 0 as expected, and that the peaks are stronger with increasing correlation time T (Supplementary Fig. 8b). Moreover, ⟨ΔyΔt⟩ increases on average with v, while decreasing with Dp (Supplementary Fig. 8c), indicating that the response essentially derives from correlated motion over the detector rather than molecular diffusion alone.
Statistical quantification
All error bars, when shown, represent standard error of the mean. Statistical tests used and significance levels (p value) for given comparisons are indicated in the main text. Throughout, *, **, ***, and **** refer to p-values of < 5e-2, <1e-2, <1e-3, and <1e-4. In some instances, **** may refer to p < 1e-6, if indicated in the text.
SUPPLEMENTARY FIGURES
ACKNOWLEDGEMENTS
We thank Brian DeAngelis for helpful conversations and advice on the design of the optogenetic component to the walking assay, Omer Mano for help with projector troubleshooting, and Aarti Sehdev for help with behavioral experiments, fly rearing, and discussions. We also thank Viraaj Jayaram, John Carlson, Jamie Jeanne, and members of the Emonet Lab for helpful discussions and advice on the project. NK was supported by a postdoctoral fellowship through the Swartz Foundation for Theoretical Neuroscience, by postdoctoral fellowship NIH F32MH118700, and by postdoctoral fellowship NIH K99DC019397. MD and TE were partially supported by the Program in Physics, Engineering, and Biology at Yale. BM and MR were supported by National Science Foundation grant IIS-1631864. DAC was supported by NIH R01EY026555 and NIH R01NS121773.