ABSTRACT
Sensory stimuli evoke spiking activities patterned across neurons and time that are hypothesized to encode information about their identity. Since the same stimulus can be encountered in a multitude of ways, how stable or flexible are these stimulus-evoked responses? Here, we examined this issue in the locust olfactory system. In the antennal lobe, we found that both spatial and temporal features of odor-evoked responses varied in a stimulus-history dependent manner. The response variations were not random, but allowed the antennal lobe circuit to enhance the uniqueness of the current stimulus. Nevertheless, information about the odorant identity became confounded due to this contrast-enhancement computation. Notably, a linear logical classifier (OR-of-ANDs) that can decode information distributed in flexible subsets of neurons generated predictions that matched results from our behavioral experiments. In sum, our results reveal a simple computational logic for achieving the stability vs. flexibility tradeoff in sensory coding.
INTRODUCTION
The key task of a sensory system is to transduce and represent information about environmental cues as electrical neural activities so that the organism may generate an appropriate behavioral response. The precise format in which neural activities represents stimulus specific information i.e. ‘the neural code’ has been a topic of great debate in neuroscience1-6. Both patterns of spiking activities distributed across an ensemble of neurons7-14 (i.e. ‘the spatial code’), and the temporal features of these neural spike trains such as their synchronicity15,16, relative response latencies17-19, dynamics4,20-26 (i.e. ‘the temporal code’) have been shown to be important for sensory coding. While stimulus-specific information exists in both spatial and temporal dimensions, what is not understood is the stability or constancy with which these neural coding schemes allow recognition of the same stimulus encountered in a variety of different ways. We examined this issue in this study.
Alternately, flexibility in sensory representation will be necessary for carrying out certain computations. Often, sensory cues encountered by an organism change dynamically, and the same sensory cue can be encountered in a variety of different contexts (for example, coffee beans in a coffee shop or in a perfume shop). Therefore, emphasizing novelty/uniqueness or suppressing/masking redundancies becomes necessary for detecting changes in the environment. Previous electrophysiological24,27-30, imaging31, and psychophysical32 studies do indeed reveal such interactions exists particularly when sensory cues are dynamically encountered. Can certain aspects of the neural responses be adapted to allow the flexibility needed for adaptive computations, while at the same time maintaining stable recognition of stimulus identity?
We examined this issue in the locust olfactory system. The insect olfactory system has been widely used for studying odor coding9,14-16,22-25,33-36. In this system, an odor stimulus is detected by olfactory receptor neurons (ORNs) in the antenna and the transduced electrical signals get relayed downstream to the antennal lobe (analogous to the olfactory bulb in the vertebrates). In the antennal lobe, cholinergic projection neurons (PNs) and GABAergic local neurons (LNs) interact to reformat the sensory input received from the ORNs. The spatiotemporal activity patterns of the PNs are thought to represent odor identity and intensity14,23,24,35,37,38. In this work, we examined how the spatial and temporal aspects of neural responses are altered when a target stimulus is delivered in several non-overlapping distractors-target odor sequences. Our results suggest a surprisingly simple neural encoding solution that provides an adequate tradeoff between the representational stability needed for robust recognition and flexibility needed for adaptive sensory computations.
RESULTS
PN responses vary depending on stimulus history
We began by examining how stable or variable were odor-evoked individual PN responses when the same stimulus was delivered with different stimulus histories. Variations in stimulus histories were introduced by delivering the same odorant (‘target stimulus’) in various distractor-target odor sequences. A 500 ms inter-stimulus interval was used to separate the two stimuli delivered. Five different odorants were used as distractor cues and two target stimuli were used in all our experiments (Fig. 1a,b). It is worth noting that the distractor odorants comprised of four odorants belonging to different functional groups (2octanol (2oct) – an alcohol, isoamyl acetate (iaa) – an ester, benzaldehyde (bzald) – an aldehyde, citral – a terpene), and a complex blend (apple). The target odorant comprised of an odorant that has been shown previously as suitable for associative conditioning (hexanol), and an innately attractive odorant (geraniol)24.
We found that although responses of individual PNs during solitary introductions of the target stimulus were reliable across trials, they became variable when the same stimulus was delivered with different stimulus histories (Fig. 1c,d). When compared to the solitary target odor responses, the number of spikes increased for some stimulus histories (e.g. PN2 2oct-hex vs. PN2 hex) but reduced for others (PN2 bzald-hex vs PN2 hex). Further, note that increase/decrease in target stimulus response was not based on the chemical similarity between the two cues delivered in the sequence. Our results indicate a simple rule for crosstalk: if a PN responded strongly to the first cue in the sequence (i.e. the distractor) then its response to the second stimulus (i.e. the target) was likely to be reduced. Alternately, if the spiking activity reduced below baseline levels during exposure to the distractor cue, then its response to the following target increased in most cases (all comparison made with respect to the response evoked by the solitary target stimulus; Supplementary Fig. 1a–d).
Next, we examined how the variations observed at the individual PN level affected the ensemble neural representation of the target stimuli. To visualize odor-evoked population PN responses, we used a dimensionality reduction analysis. Individual PN responses were aligned with the odor onset and binned in 50 ms time windows. The spike count per time bin of each PN became a vector component, and the spike counts of all recorded PNs in that same time bin were regarded as the high-dimensional neural response. The time series of high-dimensional PN responses during the entire target stimulus presentation (4 s duration) was then projected along three principal component axes (see Methods). We found that introduction of the same stimulus generated not one ensemble neural response trajectory but a family of trajectories, one for each stimulus history. Further, consistent with the earlier studies24,34,36,38, we found that all introductions of the target stimuli generated ensemble neural trajectories that included a fast-transient response component (~1 – 1.5 s from odor onset) that subsequently stabilized into steady state responses. Notably, the direction of the high-dimensional vectors (indicates variation in the set of PNs activated), and the direction of their evolution (variation in spatiotemporal patterning) during the target stimulus presentation varied in a history dependent manner. This can be clearly noted from the misalignment between the family of neural response trajectories generated during the exposure to the same target stimulus (Fig. 1e,f).
How distinct or separable are these responses generated by the same stimulus? To examine this, we used a supervised dimensionality reduction technique (linear discriminant analysis or LDA) that seeks to capture the differences between the ensemble neural responses evoked by the target odorant. Projecting the data along the LDA axes, we found that the target stimulus evoked PN responses created multiple, separable clusters, one for each stimulus history with which it was presented (Fig. 1g,h). This qualitative observation was further quantified using a classification analysis (Supplementary Fig. 1e,f; see Methods). Therefore, we conclude that both at the individual and population levels, PN responses that are thought to mediate identification of an olfactory stimulus in the insect olfactory system can vary significantly when the same stimulus is encountered with different histories.
Stimulus-history dependent contrast enhancement
Are these variations in odor-evoked ensemble neural responses random? To examine this issue, we compared the neural responses evoked by solitary and sequential presentations of the target stimulus with the distractor cue (Fig. 2a,b). Our results indicate each olfactory stimulus evoked a closed-loop trajectory that evolved in a unique direction. As can be expected from our earlier analysis, the solitary and the sequential introductions of the same target stimulus generated two different neural response trajectories. As a rule, compared to the solitary target stimulus response, when presented following the distractor cue, the ensemble response trajectory shifted further away from the responses evoked by the distractor cue. This is consistent with individual and ensemble PN response analyses (Fig. 1c,d and Supplementary Fig. 2) where we found that during sequential presentations of the target stimulus, common neurons were suppressed (i.e. responds to both target and the preceding distractor stimulus), whereas those that responded uniquely to the target odorant tended to increase.
As a direct consequence, the angular separation between neural response trajectories between the target and distractor cues increased, which can be expected to enhance discriminability between these two odorants. To quantify this, we used a correlation analysis where we compared the similarity between ensemble PN activities evoked by the target stimulus and the distractor cue. We made this comparison for both the solitary exposure of the target stimulus and the sequential presentations (Fig. 2c,d). As can be noted, the correlation between the distractor cue and the target stimulus significantly reduced during sequential presentation of the target stimulus. Hence, our results indicate that alterations in the ensemble neural responses allow the antennal lobe circuit to enhance the uniqueness of the target stimulus with respect to the preceding cue i.e. dynamic, history-dependent contrast enhancement.
Same stimulus can activate varying combinations of neurons
To enhance contrast with different distractor odorants, the same target stimulus must activate a different subset of the PNs. So, we wondered if there exists a unique set of neurons that is activated during all the target stimulus presentations to allow stable recognition. To understand this, we classified the PN responses into ‘responsive’ or ‘non-responsive’ categories (see Methods). We found that the percentage of neurons activated and the composition of the set of responding neurons varied when the same target stimulus was presented with different histories (Fig. 3a,b). Further, the percentage of PNs that consistently responded to all introductions of hexanol and geraniol (the two target stimuli) was a smaller fraction of the set that responded to the solitary introductions of these two target stimuli.
To represent the identity of the target stimulus, the set of neurons must be consistent as well as unique. So, we examined how many of these consistent neurons were also unique responders i.e. respond to target stimuli alone (Fig. 3c,d). Surprisingly, we found that there was not a single PN that responded uniquely and consistently to hexanol in all the conditions. Only 2% neurons responded uniquely and consistently to geraniol presented with different stimulus histories. Therefore, our results indicate that combinatorial code involving a consistent and unique set of neurons may not be a suitable approach for achieving stable recognition of a sensory stimulus encountered with varying stimulus histories.
Temporal response features also vary with stimulus history
How robust are temporal features such as response latency and pattern of stimulus-evoked spike trains in allowing stable odor recognition? To examine this, we defined the response latency as the first time bin when a neuron’s response exceeded a certain threshold value (see Methods; Supplementary Fig. 3a,b). We then classified neurons as early responders (latency < 600 ms) or late/non-responders (latency > 600 ms). Note that the early responders were PNs that responded before behavioral response onset (median ~600 ms24,35). For visualization, we represented this classification of the response latency across the ensemble of PNs as a color bar (Fig. 4a,b). The response latency vector was generated for different introductions of the target stimulus and shown as a color bar to allow comparisons. Our results indicate that depending on the stimulus history, some of the early responding projection neurons to the solitary presentations of the target stimulus became late/non-responsive in the sequential presentations, while some of the late/non-responders became early-responders. Furthermore, only a small subset of neurons consistently responded early to the target stimuli. Similar to the combinations of PNs activated (Fig. 3), the sets of consistent early responders that were also unique responders to the target stimuli were empty or near empty sets (Fig. 4c,d).
How robust are other features of PN responses such as the pattern of their stimulus-evoked spike trains? To examine this, we considered the evolution of trial-averaged PN spike counts over time (during the four second of target stimulus presentation) as the temporal response vector. We computed the correlation between the PN temporal response vectors generated by the same target stimulus presented with different stimulus histories (Supplementary Fig. 3c,d). The distribution of this temporal pattern similarity metric for each target-history combination revealed that more correlation values were closer to a value of ‘zero’ rather than ‘one’ (Fig. 4e,f). This indicated that the temporal patterns of PN spiking activities also change considerably with stimulus history.
Taken together, these results indicate that temporal features of PN responses are also highly variable and may not allow robust recognition of a stimulus when it is encountered with different stimulus histories.
Robust behavioral recognition
Our electrophysiological results indicated that combinations of neurons and their temporal response features changed when the same stimulus was presented with different histories. Therefore, we wondered if locusts can behaviorally recognize a conditioned stimulus if it is presented in a similar fashion. To determine this, we trained locusts using an appetitive-conditioning paradigm. Briefly, during the training phase, starved locusts were presented a conditioned stimulus (hexanol; also target stimulus in electrophysiology experiments) followed by a food reward (wheat grass) with significant stimulus-reward overlap (see Methods). Six such training trials were sufficient for the locusts to learn the association between the olfactory cue and the reward. In an unrewarded test phase, locusts that learned this association between the stimulus and reward opened their sensory appendages close to their mouths called maxillary palps in anticipation of the reward. The distance between the palps was tracked using a custom-written software and used as a metric for successful recognition (see Methods). Notably, responses of the trained locusts to the conditioned stimulus were consistent even when the same stimulus was presented multiple times without reward during the test phase. Therefore, we assayed the palp-opening responses of the trained locusts to the conditioned stimulus presented with varying stimulus histories (Fig. 5a-f).
We observed that trained locusts responded to the conditioned stimulus (hexanol) irrespective of whether it was presented solitarily or in a sequence following a distractor cue (Fig. 5g; see Methods). While three of the five distractor cues did not elicit a palp-opening response (POR), two odorants (2oct and iaa) evoked POR responses that were weaker than those observed during solitary presentations of the conditioned stimulus (Fig. 5h, Fig. 5b-f). In some cases, POR response to the distractor diminished the response magnitude to the conditioned stimulus (Fig. 5c; iaa-hex). Even when the distractor did not elicit a POR response, we found that the response magnitude to the conditioned stimulus can be reduced (Fig. 5f; app-hex). Although the POR magnitude varied, the trained locusts responded with an above baseline-level response to almost all presentations of the conditioned stimulus. Based on these observations, we conclude that although there is some interference from the distractor cues, locusts can robustly recognize the conditioned stimulus presented with varying stimulus histories.
Decoding with optimal linear classifiers
Can the behavioral responses to distractor-conditioned stimulus sequences be predicted from the ensemble PN neural activities? To understand this, we first sought to determine whether the target can be robustly recognized in a distractor-target sequence (i.e. pairwise odor classification). For this approach, we constructed a linear contrast-enhancement kernel based on the solitary responses evoked by the distractor and target odorants (Supplementary Fig. 4a-c). Ensemble PN activities in 50 ms time bins were convolved with this kernel and input to a perceptron-like classifier with fixed weights (see Methods) for classification into target odor ‘present’ or ‘absent’ categories. The bin-by-bin, trial-by-trial classification results were then converted into probabilities of robust target odor recognition and plotted as a function of time (Supplementary Fig. 4d). This approach was largely successful in recognizing the target odorants in a given distractor-target odor sequence. However, there were two main drawbacks in this approach: (i) the response to each distractor and target stimulus need to be known to construct the contrast enhancement kernel and to set the classifier threshold, and (ii) the number of free parameters involved is extremely large (for a dataset with ‘n’ neurons: n x (n-1)/2 kernel parameters + 1 classifier threshold parameter needed). Nevertheless, this result indicated that PN ensemble neural activities encoded the information needed to robustly recognize a target odorant in each of the five distract-target sequences.
As a final approach, we used a linear optimal classifier (linear support vector machine11,39) to separate the target odorants from all five distractor stimuli (Fig. 6a). Surprisingly, we found that this was indeed feasible and the target stimuli can be robustly discriminated and recognized (Fig. 6b). While this approach used a lot fewer parameters (for ‘n’ neurons this approach would require ‘n+1’ free parameters; n for the weight vector vsvm and 1 threshold parameter), it still requires that the PN responses to target odor and all the distractor odorants be known to determine the right set of parameters. Furthermore, even though the classification results show that robust recognition of the target stimulus is feasible from the ensemble PN activities, it still does not match well with the behavioral POR observed for these stimuli. Particularly, it is worth noting that none of the approaches generated false positives for 2oct and iaa.
Flexible neural decoder: OR-of-ANDs
We sought to determine the simplest approach to transform ensemble PN responses into behavioral PORs. To design this decoder, we exploited the observation that for pairs of target stimulus presentations with varying histories there was a substantial overlap in the set of neurons activated (Fig. 3a). This was used to design a pairwise odor classifier that robustly recognized the target stimulus in each distractor-target sequence (Supplementary Fig. 4d). However, when all stimulus histories were considered simultaneously, the set of consistent and unique PNs reduced significantly. Therefore, we reasoned that a decoder capable of exploiting information distributed in a flexible subset of neurons would allow robust recognition of the target stimulus.
To design the flexible classifier, we summed the contributions of all neurons activated by solitary introductions of the target stimulus and disregarded the contributions of all other projection neurons (i.e. weight of ‘1’ for each neuron activated by solitary introductions of the target stimulus, and ‘0’ for all others). Next, the classification threshold (m) was set to a value less than the number of neurons (n) assigned a weight of ‘1’ (i.e. m < n). It is worth to note that the classifier becomes analogous to an OR-of-ANDs logical operation: m-1 ANDs and n choose m ORs (or combinations) can generate an output of ‘target present’ from the classifier (Fig. 6c). Any m-out-of-n neurons that respond to the solitary introductions of the target stimulus are sufficient for robust recognition of the target stimulus. Also, note that the composition of the m neurons is allowed to vary across stimulus histories under this scheme.
We examined performance of both analog (PN firing rates were retained) or digital (binarized into ‘responsive’ and ‘non-responsive’) versions of this linear classifier (Fig. 6d – analog classifier, Supplementary Fig. 5 – digital classifier). In both cases, the classification results from the OR-of-AND classifier revealed robust recognition of all presentations of the target stimulus. Interestingly, misclassifications were made for 2oct, iaa, and apple. It is worth noting that both 2oct and iaa evoked POR in locusts trained for recognizing hexanol. However, any further manipulation of classifier’s free parameter (i.e. threshold or value of m) to reduce misclassification for apple, resulted in overall recognition performance degradation.
An earlier work showed that following termination of an odor pulse, a nearly non-overlapping set of neurons are activated(OFF ensemble neural response)25. These odor-evoked OFF responses are stimulus-specific. More importantly, a pattern-match with the ON neurons allowed prediction of palp-opening response and a pattern-match with the OFF neurons were better indicators of palp-closing. Therefore, we modified the decoding scheme to include two OR-of-AND classifiers, one for monitoring similarity with the set of hex-ON neurons, and the second to track the similarity with the set of hex-OFF neurons (Fig. 7a,b). Our results indicate that the performance of this ON-OFF flexible decoder (Fig. 7c–i) was comparable to the ON response model except for one important difference. We found that unlike 2oct and iaa, distractor cues that evoked POR, apple alone activated comparable pattern-matches with both hex-ON and hex-OFF neurons. When the classifier outputs were transformed into behavioral responses (Fig. 7i), these contributions cancelled each other out (palp-opening vs. palp-closing). Therefore, the ON-OFF flexible decoder predicted mean POR trends that tightly matched with those observed in our behavioral experiments for all distractor-target odor sequences.
In sum, we conclude that a decoding scheme based on flexible combinations of neurons would allow stable recognition of an odorant while allowing the antennal lobe circuits to adapt their ensemble responses in a stimulus-history dependent manner.
DISCUSSION
What is the neural code for a sensory stimulus is a fundamental question in sensory neuroscience. Several encoding schemes that depend on a unique set of neurons activated (‘the combinatorial or spatial code’), or the temporal features of neural electric discharges (‘the temporal code’), or their combination (‘spatiotemporal schemes’) have been proposed for representing stimulus-specific information in sensory circuits. While it is well established that stimulus-specific information can indeed exist in both spatial and temporal dimensions, how robust are these schemes to extrinsic (for example, stimulus history27,35 or ambient conditions40), or intrinsic (for example, plasticity41 or internal-state such as hungry vs. satiated42) perturbations? This is what we sought to determine in this study.
We examined the stability of neural representations to odorants when only the stimulus history was systematically varied. Surprisingly, this manipulation was enough to induce variations in spatial, temporal and spatiotemporal features of neural responses elicited by an odorant. Nevertheless, locusts trained to recognize a conditioned stimulus could robustly recognize and respond to the same. This mismatch between the lack of stability in the neural representation and robustness in behavior necessitated a re-examination of potential mapping schemes between neural inputs and behavioral outputs. Notably, our results indicate that a linear scheme that decodes information from flexible subsets of neurons was sufficient to achieve this transformation.
The flexible decoding approach can be easily understood if the problem is recast as one of object recognition (Supplementary Fig. 6). A simple approach to recognize an object, say a ‘chair’, is to first segment it into simple features (such as 4 legs, seat, back rest, and hand rest). While the presence of all relevant features (all four features in this example) allows robust recognition of the prototype chair, it may not allow generalization when other instantiations of this object are presented. Therefore, to allow generalization, it would be necessary to relax the constraint that all the relevant features need to be present. Instead, determining the presence or absence of a meaningful subset of these features, any m features out of the possible n features (m < n), can be used for achieving robustness. Higher values of m allow more specificity, whereas lower values allow generalization. Our results indicate that such a decoding approach can indeed allow robust recognition of odorants presented with different stimulus histories (note that odor identity is analogous to the object to be recognized, and activation of a projection neuron is analogous to the presence of a feature). While results presented used weight vectors with components that were either a 0 or 1, we found further improvements in classification results could be achieved by using negative weights for non-responsive neurons (not shown).
Could such a flexible decoding scheme be implemented by the insect olfactory system? To understand this issue, it would necessary to identify the basic components of the decoder: (i) convergence of input from multiple PNs onto downstream neurons, (ii) linear combination of the inputs, and (iii) a detection threshold that does not require all input neurons to be simultaneously co-active. Existing anatomical and functional studies have shown that downstream Kenyon cells in the mushroom body linearly combine inputs from multiple projection neurons43,44. Further photostimulation of Kenyon cell dendritic claws in fruit flies have revealed that activating more than half of these input regions is sufficient for driving these cells to spike45 (i.e. n/2 < m < n is sufficient). Therefore, anatomical and functional evidences suggest that the downstream centers in the mushroom body can indeed implement such a decoding approach.
Our results also indicate that variations in the neural responses with stimulus history were not random. Rather, the response evoked by the current stimulus was reshaped to suppress any overlap with the preceding cue and increase the responses of those PNs that responded uniquely to the current cue. This simple manipulation at the level of individual PNs resulted in contrast enhancement of population neural responses. Note that contrast enhancement in olfaction happens between stimuli over time, rather than in the spatial domain as in vision.
Can such dynamic contrast enhancement lead to other potential confounds? For example, how are PN responses altered when back-to-back pulses of the same odorant are presented? To determine this, we reanalyzed a recently published PN response dataset to two back-to-back pulses of hexanol (Supplementary Fig. 7). Our analysis revealed that in addition to reduction in responses to the subsequent pulses36, a few PNs that did not respond to the first pulse were activated in the second pulse, and some responding to the first pulse were inactivated. Note that the same OR-of-ANDs classifier can robustly recognize the stimulus after this subtle response perturbation.
While our results do not provide mechanistic insights on how this adaptive computing may arise, a few candidate mechanisms can easily be identified. Activity-dependent synaptic depression between the sensory neurons and projections neurons46,47, interference due to stimulus-evoked OFF responses25 or adaptation at the level of sensory neurons48,49 can all contribute to the results observed in this study. Lastly, while we perturbed odor-evoked neural responses using variations in stimulus histories, other factors such as ambient conditions (humidity, temperature, air flow), presence of competing odorants, plasticity in central circuits have all been shown to introduce variations different from those that were examined here. Whether the same flexible decoding scheme proposed here can provide a generic framework for achieving tradeoff between stability and flexibility remains to be determined.
AUTHOR CONTRIBUTIONS
B.R. conceived the study and designed the experiments/analyses. S.N. did all the analyses, generated all the figures and wrote the first draft of the manuscript. D.S. performed the electrophysiological recordings. R.C. did the behavioral experiments. B.R. revised the paper taking inputs from all the authors. S.N., D.S., and R.C. are equally contributing first authors.
METHODS
Odor stimulation
Odor stimuli were delivered using a standard procedure24,25,35,36. The following odor panel was used: hexanol, geraniol, 2-octanol, isoamyl acetate, benzaldehyde, citral, and apple. All odorants were diluted to their 1% concentration by volume (v/v) in mineral oil. A carrier stream of desiccated and filtered air stream (0.75 L min−1) was directed at the antenna to provide a constant flux. A constant volume (0.1 L min−1) from the odor bottle headspace (60 ml sealed bottles contained 20 ml diluted odor solutions) was injected into the carrier stream using a pneumatic pico-pump (WPI Inc., PV-820) during stimulus presentations. A vacuum funnel placed right behind the locust antenna ensured removal of odor vapors. Each solitary or sequential presentation of an odorant was delivered in a pseudorandomized manner (blocks of 10 trials) with 60 s inter-trial intervals.
Olfactory electrophysiology
Young locusts (Schistocerca americana) of either sex with fully developed wings (post fifth instar) were selected from a crowded colony. After immobilizing locusts, the brain was exposed, desheathed, and continually perfused with locust saline as reported previously36,50. Extracellular recordings from the antennal lobe were made using a 16-channel, 4×4 silicon probes (NeuroNexus). Each electrode contact pad was gold plated such that its impedance was in the 200 – 300 kΩ range. Raw extracellular signals were filtered between 0.3 to 6 kHz and amplified at 10 k gain using a custom made 16-channel amplifier (Biology Electronics Shop; Caltech, Pasadena, CA). Raw data were acquired at 15kHz sampling rate using a LabView data acquisition system.
PN spike sorting
For spike sorting, we used a conservative approach that was described in earlier works51. We used the following criteria for the single-unit identification: cluster separation > 5 noise s.d., the number of spikes within 20 ms < 6.5%, and spike waveform variance < 6.5 noise s.d. Using this approach, a total of 85 PNs were identified from 9 locusts (11 antennal lobes).
Dimensionality reduction analyses
We used two dimensionality reduction techniques for visualizing ensemble PN responses: principal component analysis (PCA) and linear discriminant analysis (LDA). For both analyses, spiking activity of each PN was binned in 50 ms non-overlapping time bins and averaged across trials. Spike counts of all recorded PNs were aligned with respect to the stimulus onset and concatenated to form an 85-dimensional PN response vector per 50 ms time window. Therefore, for each odorant, we obtained a response matrix of the following dimensions: 85 neurons (rows) x 80-time bins (columns; 4s of activity).
To perform the PCA analysis shown in Fig. 1, we first concatenated the responses of the 85 PNs to solitary and sequential presentations of hexanol or geraniol (85 PNs x 480 time bins [6 presentations x 80 time bins]). Response covariance matrices (85 x 85) were computed for these concatenated data matrices. Each 85-dimensional PN response vector was then projected onto the three principal eigenvectors (for visualization).
PCA trajectories shown in Fig. 2 were computed using a different response covariance matrix. Here, the PN ensemble responses to three stimuli were concatenated to form the data matrix: solitary target stimulus (hex or ger; 4s), solitary distractor stimulus (4s), target stimulus after distractor stimulus (4s of hex or ger exposure). This resulted in 85 PNs x 240 time bins data matrices [3 stimuli x 80 time bins].
For generating figures shown in Fig. 1 and Fig. 2, PN responses after PCA dimensionality reduction were linked in the temporal order of occurrence to create odor trajectories. The pre-stimulus baseline activity in the first time bin was subtracted before plotting each response trajectory. The odor trajectories shown were also smoothed using a three-point moving-average, low-pass filter.
LDA dimensionality reduction39 analysis was also performed by first concatenating all high-dimensional PN response vectors that needed to be visualized. The projection vectors were determined such that they maximized separation between responses of different stimuli while at the same time also reducing variance within responses generated by a single stimulus.
To quantify results, we performed a classification analysis. We performed a leave-one-trial-out cross validation (i.e. PN response of one trial for one hex or ger introductions was left out). LDA projection vectors were computed using all other hex or ger introductions. The test trial to be classified was projected using the computed LDA eigenvectors and then assigned the same class label as the nearest cluster of data points (centroid of data points belonging to a particular class; class, in this case, is the hex or ger presentations with a particular stimulus history). This was repeated systematically leaving out each trial and computing its class label. The classification results are then shown as a confusion matrix in Supplementary Fig. 1e,f.
PN response categorization
For analysis in this work we classified a projection neuron as ‘responders’ if the spike counts in any time bin during the stimulus presentation exceeded mean + 6.5 s.d. of pre-stimulus activity (2 s window just before onset of any stimulus). All PNs that did not meet this threshold were regarded as ‘non-responders.’
Response latency for PNs
We defined PN response latency as the first 50 ms time bin when the criterion for the responsive neuron was met (i.e. spike counts exceed mean + 6.5 s.d. of pre-stimulus activity). For sequential presentations, the response latency was determined as the first time bin after the derivative of PSTH became positive (used in Fig. 4 and Supplementary Fig. 3).
Contrast enhancement kernel for pairwise odor classification
For the calculation of contrast enhancement kernel, we followed a method that has been previously reported52. Let suppose that the mean PN response (averaged over 4 s of stimulus exposure) is pi (n-dimensional vector). We rectified the values of this vector so that each element 0. If the response patterns of two different odorants were p1 and p2, then the weight vector W was calculated as follows: where p0 is the mean pre-stimulus response averaged over a two second window.
support vector machine (SVM)
The PN response patterns to solitary introductions of hexanol, 2oct, iaa, bzald, cit, and app were used as training samples. We regarded this as a binary classification problem, where hex responses were considered as one class, and all other responses were regarded as the second class. We used a slack variable to avoid overfitting and the box constraint was taken to be 0.01 (fitcsvm in MATLAB). The optimal weight vector was determined using training samples and used to classify response patterns generated during sequential stimulus presentations as follows: where x(t) is the 85-dimensional PN spike counts in a 50 ms time bin, the sign function results in ‘1’ when the input is classified as ‘hexanol present’ and ‘0’ corresponded to ‘hexanol absent.’
Behavior experiments
Behavioral experiments were performed using locusts of either sex. All locusts used were from a crowded colony that was kept on a 12 h day – 12 h night cycle (7 am – 7 pm day). All behavioral experiments were performed between 10 am – 3:30 pm.
Locusts were starved for 24 hours prior to their use in the appetitive-conditioning assay. The protocols that we used in this study for training locusts and tracking their palp-movements were identical to an earlier study35. The odor delivery setup and the stimulus sequences used were identical to that described for the electrophysiology experiments.
Hexanol diluted in mineral oil (hex 1%) was used as the conditioned stimulus for all behavioral experiments in this study. Wheat grass was used as the unconditioned stimulus. During each training trial, the conditioned stimulus was presented for 6 s. Food reward was given 3 s after the onset of the conditioned stimulus. Food was given manually for the duration of approximately 10 seconds. The training phase included a total of six training trials with a ten-minute interval between successive trials. Only locusts that accepted food reward in at least four out of the six training trials and had a palp-opening response (POR) in at least three training trials were regarded as ‘trained locusts’ and retained for the testing phase (75% of the locusts (30/40) fell into this category). The imaging software was not able to robustly track the palp movements of three of the trained locusts (3/30) and, therefore, these locusts were excluded from all analyses.
In the unrewarded testing phase, locust PORs were evaluated using six test trials. The first trial in all tests was the solitary presentation of 4 s of hexanol. This was done to ensure that trained locusts were able to recognize the solitary presentations of the trained stimulus (26/27 locusts had a strong POR to solitary hexanol). In the subsequent five trials, the conditioned stimulus was presented in non-overlapping two odor sequences used in electrophysiology experiments. The two odor stimulus sequences were presented in a pseudo-randomized manner. The inter-trial delay between test phase trials was set to 25 minutes.
Locust response categorization
For analysis in Fig. 5g,h, we classified a locust to be ‘responsive’ when the POR to an odor presentation was 6.5 s.d. above pre-stimulus baseline response. Further, the POR during odor presentation had to remain greater than 20% of its peak value for at least 1 s. All the other cases were marked as ‘non-responsive’.
ACKNOWLEDGMENTS
We thank Dirk Albrecht (Worcester Polytechnic Institute), Shinung Ching, Keith Hengen and members of the Raman Lab (Washington University in St. Louis), and Nitin Gupta (Indian Institute of Technology, Kanpur) for feedback on the manuscript. This research was supported by an Office of Naval Research grant (N00014-16-1-2426) and an NSF CAREER grant (#1453022) to B.R.