# A primacy code for odor identity

## Abstract

Humans can identify visual objects independently of view angle and lighting, words independently of volume and pitch, and smells independently of concentration. The computational principles underlying invariant object recognition remain mostly unknown. Here we propose that, in olfaction, a small and relatively stable set comprised of the earliest activated receptors forms a code for concentration-invariant odor identity. One prediction of this “primacy coding” scheme is that decisions based on odor identity can be made solely using early odor-evoked neural activity. Using an optogenetic masking paradigm, we define the sensory integration time necessary for odor identification and demonstrate that animals can use information occurring <100 ms after inhalation onset to identify odors. Using multi-electrode array recordings of odor responses in the olfactory bulb, we find that concentration-invariant units respond earliest and at latencies that are within this behaviorally-defined time window. We propose a computational model demonstrating how such a code can be read by neural circuits of the olfactory system.

## Introduction

A substantial computational challenge for the olfactory system lies in resolving odorant identities despite fluctuations in odor concentration arising from proximity to odorant source, air turbulence, and natural breathing1,2,3. Odorants are sensed by olfactory sensory neurons (OSNs), each expressing one out of a large family of olfactory receptor (OR) genes4. Axon terminals from OSNs expressing the same OR gene converge in a few discrete structures in the olfactory bulb (OB) called glomeruli. Odorants evoke responses in an ensemble of glomeruli to create a combinatorial representation of odor identity5, 6. This representation varies not only across odorants, but also across concentrations of a single odorant (Fig. 1a)7,8,9. Low concentrations of odorant evoke activity in only the most sensitive glomeruli, while increases in concentration result in recruitment additional less sensitive glomeruli. Despite this variability, odors’ qualitative identities are preserved across a range of concentrations2, 10, 11.

In several sensory systems, including olfaction, neurons have been shown to convert the strength of excitatory input into latency of response12, and it has been hypothesized that ORs with high affinity will depolarize OSNs earlier than those with low affinity13,14,15. This emerges as a result of multiple processes, including intracellular signal integration16 and temporal dynamics of odorant concentration17,18,19. For air breathing animals, sniffing determines the temporal dynamics of odorant concentration in the nose, resulting in an affinity-defined sequence of OSN recruitment. While these sequences of recruitment vary across odorants, they have been shown to be mostly concentration invariant, as changes in concentration preserve temporal rankings of ORs with different affinities and these latencies are proposed to encode information about odor identity15, 20, 21.

Here we propose a strategy for concentration-invariant odor identification which uses a few earliest activated glomeruli in a coding scheme we call “Primacy Coding”. We assume that the first few glomeruli activated during a sniff are those receiving input from the most sensitive ORs for a given odorant. We propose that solely the members of this small set of early glomeruli encode odor identity. While this primary set varies between odorants, we assume that it is mostly preserved across concentrations of the same odorant. As concentration is increased, responses of less sensitive glomeruli are recruited later than the primary set, thereby maintaining the members of the early set and preserving encoded odor identity information (Fig. 1b, c).

One of the central predictions of primacy coding is that animals use early “slices” of odor-evoked neural activity to define odor identity independently of the remainder of the pattern of evoked activity. To test this hypothesis, we developed an optogenetic masking paradigm in which we could create a temporally controlled masking stimulus during an odor discrimination task (Fig. 1d). Through delayed triggering of this optogenetic masking stimulus relative to inhalation onset, we could preserve early epochs of odor-evoked information while making the overall combinatorial code unreliable through the activation of a large, heterogeneous subset of OSNs. We reasoned that if odor identity can be defined using only a small subset of early-responding primary glomeruli, our mask should not impair odor identification as long as it is initiated after this identity-defining subset. Conversely, activation of the mask before this initial subset of glomeruli is active should impair odor discrimination.

## Results

### Optogenetic masking of late odor-evoked activity

To produce the mask stimulus, we delivered 2 light pulses (25 mW, 2 ms duration, 10 ms inter-pulse interval) to the olfactory epithelium in both nostrils of the transgenic mouse expressing channel rhodopsin-2 (ChR2) in all OSNs22. The light was delivered via optical fiber stubs implanted above the olfactory epithelium. To characterize the neural response to the mask stimulus, we recorded light and odor-evoked activity of mitral-tufted (MT) cells (n = 119: 39 single-unit, 80 multi-unit) in the OB, which are the first recipient of input from OSNs (Fig. 2a, Supplementary Fig. 2A–D). The masking stimulus generated responses occurring after a short delay following light onset (mean = 11.5 ms, mode = 8 ms) (Fig. 2c). The overall mask excitatory response lasts approximately 50 ms, followed by prolonged inhibitory response until approximately 200 ms (Fig. 2b, Supplementary Fig. 2E).

How effective is the mask in eliminating odorant responses? Out of 119 recorded units, 29 responded to one of two odorants (pinene, limonene). The mask, presented at 20 ms latency post inhalation onset, modified most of the odor responses, even though odor responses typically occur later than the mask stimulus (Fig. 2a). To characterize the effect of mask on information available for discrimination, a support vector machine (SVM) was trained to classify MT cell responses to two odorants (limonene vs. pinene) with and without masking stimulus.

Only on the basis of the odor responses of 29 units, classification performance on an individual trial raised from chance level to 100% in the first 260 ms from the inhalation onset. On the masked trials, performance of the classifier stayed at chance level until ~ 180 ms post inhalation onset, and never exceeded 68% (Fig. 2d). We may assume that the mask is efficient in eliminating odor information for at least 100 ms following the mask.

### Scaling of integration time with odorant concentration

Changes in odorant concentration should change the absolute timing of OSN recruitment and, thus, affect the timing of odor percept formation in our task. We tested this prediction by fitting a Weibull generalized linear model (see “Methods” section) to masking data for two concentrations of odorant and comparing the thresholds of these fits. A 10-fold decrease in concentration delays the recovery of performance in masking trials by 13.3 ms (100.3 vs. 87.0 ms, bootstrapped 95% confidence intervals [94.2, 105.9] and (81.8, 91.5), p = 0.048 (one-tailed Monte Carlo test, R = 50,000). As expected, odor percepts are formed later for lower odorant concentrations, likely due to delayed recruitment of OSN activity12. Very similar dependencies have been observed for other odor pairs and 5 other mice (Supplementary Fig. 1D).

Reaction time (RT) has been used extensively to determine the timing of sensory processing and decision-making based on sensory stimuli. The dependence of performance on both mask latency and RT are qualitatively similar, except that the reaction time curve is shifted by ~66 ms. This relationship is similar for both concentrations tested here (65.5 and 66.2 ms, Fig. 3c, Insert). The concentration-dependent shift in RT vs. performance can be wholly explained by the shift observed in our masking paradigm, indicating that peripheral encoding of odor information limits the timing of olfactory decision making. The observed delay between the RT and mask can be ascribed to a motor delay that is constant across concentrations.

Mask trials may promote the use of a novel strategy to utilize early information. To address this issue, we performed two analyses. First, we compared reaction time in unmasked trials and trials where the mask was presented late (t ≥ 100 ms) and had minimal effect on performance (Fig. 3d and Supplementary Fig. 1G). The Weibull fits to the dependencies of performance on reaction time in both cases are nearly identical. Second, we see no effect of learning on mask trials between early and late behavioral sessions, comparing the performance on the first and last 20 masked trials across all sessions (Fisher-Exact test p > 0.05). (Supplementary Fig. 1F). Together, these results provide evidence that randomly presented masking trials do not change the animal decision strategy and that animals typically use early evoked information in the odor discrimination tasks.

### Scaling of integration time with odor contrast

Does primacy coding strategy apply only to simple tasks? To make the behavioral task more difficult, we trained animals to discriminate between mixtures of carvone enantiomers (60:40 vs. 40:60). Using mixtures to reduce the contrast between stimuli decreases discrimination performance relative to pure carvones (83.3 vs. 90.8%) and delays the mask threshold time (118 ms vs. 101 ms) (Fig. 3e). As with the latency shift between concentrations of odorant, the shift due to decreased contrast is consistent with the measure of reaction time vs. performance (Supplementary Fig. 1H). To generate an equivalent level of performance in the more difficult mixture discrimination task, sensory information must be integrated by the subject over a longer period of time. However, the extension in integration time is relatively small on the scale of the length of a sniff, demonstrating that animals are still using early information to make this more difficult discrimination.

### Neural correlates of concentration-invariant primacy code

Our behavioral results define the temporal window in which odor information is integrated. To determine if primacy codes exist in the OB at timescales consistent with our behavior, we recorded responses of 338 MT cells to 3 odorant concentrations spanning a range of 2 order of magnitude. The primacy coding model predicts the existence of MT neurons that display excitatory responses to odor across a wide range of concentrations in a narrow temporal window at the beginning of the sniff. Among 119 units which exhibit excitatory responses to odorant α-pinene, 15 responded to all three concentrations, a subset that we called “concentration-stable” (Fig. 4a). The remaining 104 units responded only to subset of concentrations, which we called “concentration-unstable” (Fig. 4b). As expected, a number of responsive units grew as concentration increased (Fig. 4c). While the population response at low concentration was dominated by concentration-stable units, unstable units were 3.7 times more numerous at the highest concentration tested.

According to our primacy coding model, the identity of early, stable units that are responsive across concentrations represent odor identity. The stable population’s mean response latency was shorter than the unstable population at all concentrations (conc 10−3: 86.8 ms vs. 177.2 ms, p = 0.0003; conc 10−2: 82.7 ms vs. 148.2 ms, p = 0.0071; and conc 10−1: 85.7 ms vs. 149.0 ms, p = 0.0249; one-sided KS test). While the latencies of the unstable and stable populations overlapped, a subset of stable units responded earlier than all unstable units at the highest concentration, which is consistent with the primacy coding model (Fig. 4d). The latencies of these stable units scaled with concentration, as predicted by the model and behavioral result. The mean latency shift between concentrations for this early, concentration-stable subset was 15.5 ms, (σ: 5.5 ms). This is comparable to the timing shifts in behavioral identification across concentration (13.3 ms). The stable population’s activity encoded odor-identity information and was not representative of non-specific odor responses; only one of these concentration-stable units was responsive to another odorant tested, α-limonene.

Importantly, we find that latencies and even latency relationships are not preserved across concentrations in awake animals, although this has been observed in anesthetized animals (Fig. 4d)20. Instead, both absolute and relative latencies of stable units' responses shift dramatically as concentration increases, clustering into early and late subsets at the highest concentrations. We observed that the excitatory responses of the late set of stable cells was preceded by transient inhibition at high concentrations (Fig. 4a lower panel, 4e). This transient odor-evoked inhibition was observed widely in our recorded population (Supplementary Fig. 3F, H), and we hypothesize that it is due to lateral and feedback inhibition in the OB. For late stable units, we predict that earlier members of the MT population drive inhibition arriving earlier than or in coincidence with feedforward excitation. This shunts the neuron’s initial excitatory response, causing an apparent increase in response latency. As a result, we conclude that these units are not in the primary set, as it is obvious that earlier members of the population must precede them to generate the network activity responsible for this inhibition. So, while short latency is predictive of concentration-invariance, the relationships of response latencies within our recorded population as a whole are not conserved across concentrations and are unlikely to encode odor identity.

### Read out of primacy code by a model neural network

What elements of olfactory networks are sufficient to process primacy information? How does mask affect odor recognition? Our behavioral data show an incomplete suppression of animal performance at small masking delays (Fig. 3b). In a more difficult discrimination task, the effect of mask is slightly delayed compared to easier tasks (Fig. 3e). Are these features expected within the primacy coding mechanism? To address these questions, we developed a computational primacy decoding model based on known features of the OB and piriform cortical (PC) circuits. First, our model includes random feedforward connectivity between the OB and PC which provides the basis for coincidence detection of MT cell activity arriving early in the sniff cycle. Second, our model includes random recurrent inhibitory circuits in the PC (blue in Fig. 5a). The role of this connectivity is to suppress late arriving, “non-primary” input to PC neurons. This architecture is consistent with observed global and broadly tuned inhibition in the PC23 and has been used as a feature of network models for the processing of fine temporal information in the PC, including the proposed mechanism for coincidence detection24. Finally, we assumed that PC neurons have a memory property such that once activated, they can maintain the persistent activity in order to retain the odorant representation in the network until the initiation of action. Although our computational model does not explicitly specify the mechanism of persistency, it has been hypothesized to emerge from voltage dependent synaptic channels, such as NMDAR or GABAB activating KIR channels24. Overall, our network included randomly connected 300 MC and 1000 PC neurons.

Our model provides insights into the mechanism of optogenetic suppression of the animal’s performance for early delivered masks. We simulated odor-evoked activity in MT cells as a random spatiotemporal pattern and the mask as synchronous activity independent of odor (Fig. 5b, c). When the mask follows initial odor-evoked activity, it does not affect odorant-dependent activity patterns in PC (Fig. 5b), due to the broad inhibitory network, which suppresses excitatory inputs from the late mask or odorant-dependent inputs. In contrast, when the mask precedes odor activation, a pattern of activity emerging in the PC is not odorant-dependent and is different from those of the odorants alone (Fig. 5c). This light-evoked pattern can be viewed as a new percept that is unrelated to the original odors.

Our model qualitatively explains an incomplete suppression of discrimination for early masks (t < 0.2) (Figs. 3b and 5d, black and gray lines). This occurs due to the presence of noise: on certain trials, odor-dependent OB responses are more robust than on average, causing failure of the mask on these trials (Supplementary Fig. 4). In case of complex mixture, the behavioral response is delayed compared to an easy stimulus (Fig. 5d, blue vs. black lines), which is consistent with experimental results (Fig. 3e). This occurs because the differences in pools of primary glomeruli emerge slightly later in the sniff cycle, as both of the stimuli have similar sets of initially activated glomeruli. This result implies that primacy read out mechanism does not take the sequence of glomerular activation into account, since such differences are expected to occur early. In a version of the model sensitive to the activation sequence, the delay in performance for complex tasks is strongly reduced (Supplementary Fig. 5). Overall, our computational model confirms that the experimental data is consistent with the identity of primary MT cells rather their recruitment order being important for the coding of odor identity.

## Discussion

We demonstrate here that the earliest evoked neural activity can be used to make olfactory decisions and demonstrate that neural activity in this time window may encode odor identity across concentrations through primacy coding. Previous behavioral studies demonstrate that early epochs of odor-evoked activity are sufficient for the detection of odorants25, 26 and concentration discrimination27 in rodents. However, while these studies allude to fast coding of olfactory stimuli, it is impossible to rule out subjects’ use of intensity cues that are external to odor identity. By scrambling concentrations of odorant, we make intensity cues unreliable and encourage the use of odor identity in these experiments. Studies using activity-dependent imaging have proposed that the most sensitive glomeruli may encode individual odors15, 28; however, to our knowledge, our work provides the first behavioral evidence and computational support for this hypothesis.

Primacy coding and latency coding both attempt to solve the “analog match” problem odor identification through the use of timing, although they each make unique predictions. Central to both models is the expression of input strength to individual sensory neurons into spike latency relative to theta rhythm14 or to inhalation. Apart from the synthesis of these temporal patterns, primacy coding and latency coding differ significantly in the mechanisms by which these spatiotemporal patterns are read out. In general, latency coding describes a family of models that match a vector of response latencies evoked by an unknown stimulus with a prototype latency vector. This comparison has been modeled through a combination of a “delay line” architecture with coincidence detection29, 30. In these models, a decoder cell receives inputs from several glomeruli, each of which is delayed such that their signals arrive coincidentally at the decoder neuron only when a specific odor is encountered. These models imply that relative latencies of different glomeruli must scale equally with concentration to preserve coincidence, while in our data we find that both absolute and relative latencies within the population of odor-responsive MT units are not maintained across concentrations in awake animals (Fig. 4e).

As predicted by Hopfield, computational models of the OB based on the experimental data demonstrate that similarity of these latency vectors across concentrations of the same odorant are more similar than latency vectors generated by different odorants31. If latency vectors for different odors are evaluated in snap-shots that evolve after inhalation, divergence is predicted at short timescales ( < 100 ms) for dissimilar odorants. However, the mechanisms by which these vectors are evaluated on these short timescales has not been fully explored24.

Primacy coding extends latency encoding models by making the assumption that solely the earliest members of the set are representative of odors across concentrations. It proposes that temporal relationships are important only insofar as they help in identifying these early members, and predicts a basic network architecture that can decode this early information to create stable patterns in piriform cortex44. These patterns, by definition, are formed fast and through the use of early divergence of the spatiotemporal pattern of glomerular activity. The primacy model emphasizes the role of the set membership of early-responding neurons rather than the sequence of glomerular activation. Our experiments with mixtures in combination with computational modeling provide indirect evidence towards this prediction. Further experiments with precise temporal control of early activated glomeruli may confirm this prediction.

The primacy model sets limits for information capacity of the olfactory code. The upper bound estimate for the number of odorant identities represented by the primacy code is ~$${N^p}/p!$$ , where N is the number of different OR types and p is size of the subset used to define identity. With p = 5–6 and the N = 350 OR genes found in the human genome, the coding scheme can represent ~ 1010–1012 different odors.

The primacy model emphasizes the role of individual glomeruli for odor coding. In mice, a deletion of a single receptor TAAR4 is sufficient to abolish aversive behavior to a specific odor32. Studies of human genetic variability lends evidence that only highly sensitive receptors predominate in defining odor quality. Subjects with different alleles of a single OR report differences in perceptual qualities for strong ligands of the OR, while they are likely to report similar qualities for weaker ligands33.

The primacy model also makes specific predictions about mixtures of odorants because the earliest activity should dominate perceptual qualities of the mixture. Perceptual masking of slowly perceived odors by fast odors (temporal suppression) has been observed in human psychophysics, but warrants more attention34. If both odorants evoke early activity within the primary set, we predict that this combination will cooperate to synthesize a new odor percept. Finally, primacy coding does not make explicit provision for parallel processing of components in mixtures, a task where humans demonstrate poor performance35.

Primacy coding suggests a relatively simple solution to the complex computational problem of robust concentration-invariant representation of odorant identity in olfaction. It provides inherently rapid odor identification, a vast coding capacity and can be implemented by the architecture of the olfactory system.

## Methods

### Mice

The behavioral concentration series data were collected in 4 OMP-ChR2-YFP heterozygous mice (2 female, 2 male). The mixture data were collected in a separate cohort of 5 OMP-ChR2-YFP heterozygous mice (2 female, 3 male). Electrophysiological data to characterize masking were collected from a separate cohort of mice (n = 2). Five male C57B/6 mice (Jackson Labs) were used for concentration series electrophysiology. Subjects were 8–12 weeks old at implantation and were maintained on 12hr light–dark cycle in isolated cages after implantation. All procedures were approved by the IACUC of NYULMC in compliance with the NIH guidelines for the care and use of laboratory animals.

### Sniff recording

Sniff was monitored via intra-nasal pressure. An 8 mm long, 21-gauge cannula was implanted into the anterior dorsal recess. Total insertion depth from the surface of the nasal bone was 1.5 mm. Pressure change relative to atmospheric pressure was measured using a pressure sensor (24PCEFJ6G, Honeywell) and amplified (AD620, Analog Devices). A Schmitt (dual-threshold) trigger was used to define inhalation and exhalation onsets in real time on an Arduino microcontroller. For concentration series electrophysiology, respiration was measured using an externally mounted pressure sensor placed in front of the subjects’ nares.

### Surgery

Mice were anesthetized using isofluorane gas during surgery. The head bar, pressure cannula and optical fibers were implanted in a single surgery. The nasal cannula was implanted in a small hole in the anterior nasal bone and affixed with glue and dental cement. The optical fibers were implanted bilaterally in two holes drilled in the posterior nasal bones and affixed using the same technique. Two small screws (size #000–120 × 0.0625”, Small Parts, Inc.) used to stabilize the implant and provide electrical connection for lick detection were implanted in the skull at a location approximately corresponding with S1 cortex. Animals were allowed to recover for at least 3 days before water deprivation.

### Stimulus delivery and behavioral control

Behavioral control and data acquisition was computer-controlled using the custom Voyeur software36. For odor stimulus delivery, we used an 8-odor olfactometer (Supplementary Fig. 1A). Odorants were diluted in mineral oil and stored in amber volatile organic analysis vials. Olfactometery manifolds, valves, and tubing contacting odorized air consisted entirely of PTFE to minimize cross-contamination of odorant. During odor presentation, nitrogen carrier gas is diverted through a single vial and enters the main air stream, resulting in an adjustable dilution in a range between 10× and 100×. Airflow rates for carrier and main flow rates were controlled using two mass flow controllers (Bronkhorst). During periods between stimuli, animals were presented with 1 L/min background air and olfactometer air was directed to exhaust using a four-way PTFE final valve (NResearch).

Odorant concentrations were controlled using a combination of gas- and liquid-phase dilution. Through manipulation of the ratio of odorized and clean air flow rates, we were able to achieve a dilution range of 10–1% odorized air (10×). In experiments where more that 10-fold dilution was required, we used liquid dilution to increase our range. Because liquid dilution ratios do not accurately predict headspace (gas-phase) concentrations, liquid dilutions were assayed using a photo ionization detector (Aurora Scientific) to determine relative concentrations of odorant in gas-phase. For concentration-series electrophysiology, all dilutions were made in air-phase by diluting odorized air with unodorized air.

Mixtures of carvone enantiomers were made in liquid phase. Enantiomers have identical vapor pressures and solvent interactions, thereby allowing accurate prediction of component ratios in gas phase from liquid mixture ratios.

Light masking stimulus was provided by two 473-nm, 105 um ID fiber coupled diode laser (Blue Sky Research, PN: FTEC2471) terminated in a ceramic ferrule. During behavioral sessions, the laser source ferrule was mated to a ferrule permanently implanted on the mouse. Implanted ferrules (MM-FER2007-304-4050, Precision Fiber Products, Milpitas, CA) were fabricated with 400 um ID, 0.39 NA fiber (FT400UMT, Thorlabs, Newton, NJ) and etched using hydrofluoric acid to provide diffuse light within the nasal cavity. Laser power was calibrated using a light power meter (Thorlabs) prior to behavioral sessions at the ferrule tip.

Water reward stimulus was delivered through two 21-gauge stainless steel lick tubes (Small Parts) and controlled using pinch valves (BioChem Fluidics).

Licks were detected by measuring change in resistance at the lick port when animals made contact with the lick tube using custom lick detectors (Janelia, HHMI).

### Behavioral procedure and training

Animals were water deprived for at least 5 days prior to start of behavioral training. Animals were housed on a 12:12 light–dark cycle were tested between 1500 and 2400 ZT (where ZT 0 corresponds to beginning of light period). To acclimatize animal to head-fixation and behavioral apparatus, animals were shaped by given water through a single lick tube until animals received their entire 1 ml water ration during a session. In subsequent sessions, a second lick tube was introduced. To encourage exploratory behavior in subsequent training, animals were rewarded for alternating licks between left and right lick tubes. Two-lick shaping sessions persisted until animals successfully received entire 1 ml water ration in a session.

Odor discrimination was trained on subsequent sessions with only slight modifications to the paradigm used in testing sessions (Supplementary Fig. 1C). After a variable inter-trial interval (12–15 s) and with the condition that 1 s had elapsed since the last licking activity was recorded. Odor stimulus was delivered for 500 ms and was initiated on the start of exhalation so that odor stimulus was stable prior to inhalation (Supplementary Fig. 1B). For each trial, odor concentration was drawn randomly. After stimulus onset, a “grace” period was enforced where licks were not scored to reduce impulsive licking prior to odor sampling. To eliminate stereotypic response bias, trials were chosen using a bias correction algorithm during training and testing37. For initial training, this grace period included time point until 500 ms after the first inhalation of odorant. After criterion performance was met, this grace period was shorted in the following session to 300, then to 150 ms for testing. Randomization was preformed using Mersenne Twister RNG (NumPy).

Testing sessions were conducted only after animals reached criterion performance (>80%) on the odor discrimination task. Mask trials was randomly interleaved in sessions for only 2 of the 5 concentrations presented (Fig. 2a). Trial ordering within a session was computer-controlled and the investigator was blind to the conditions of each trial. For masking data at multiple concentrations, masking trials was presented in every other session with both concentrations masked in the same sessions at rate of 17% of total trials. For the masking data for carvone mixtures, masking trials were interleaved throughout each session at a rate of 8.3% of total trials. The data were excluded from animals that did not complete training and testing due to loss of sniff signal, illness, or loss of implant. Two animals were excluded from mixture experiment due to faulty fiber implantation. The data from experiments represented in Fig. 3b and Supplementary Fig. 1D were collected from the same animals.

### Behavioral analysis

All behavioral analysis was conducted using custom scripts on the Anaconda Python distribution (NumPy 1.9.2, SciPy 0.15.1)38. Binomial proportion confidence intervals were calculated using the Clopper–Pearson “exact” method. Trials from sessions in which animals preformed a level of <80% correct responses were excluded from analysis. The data were fit with the Weibull psychometric function using maximum likelihood estimation method:

$${p_x} = \frac{{\gamma + \left( {1 - \lambda } \right)}}{{1 + {e^{ - \beta \left( {x - \alpha } \right)}}}}$$

For the masking data, γ (guess rate: the asymptotic performance at short latencies) was fixed using the average from masking at time points < 60 ms and λ (lapse rate: the asymptotic performance at long latencies) was fixed based on the data obtained in unmasked trials within these sessions. For reaction time analysis, all parameters were fit. Confidence intervals for fit parameters (thresholds) were estimated using the 2.5th and 97.5th percentile of distributions created by fitting each of 10,000 bootstrap simulations for each experimental condition. To bootstrap, trials were randomly drawn with replacement using Mersenne Twister RNG (Numpy).

The reaction time data were taken only from trials in which no mask stimuli were presented. These sessions were interleaved with mask sessions. The reaction time performance data and timing were taken using the first responses following odor stimulus onset irrespective of grace period. These data were fit using the same techniques as above, but with all parameters free. Trials with very long reaction times ( > = 300 ms) were truncated from this analysis, as performance was not monotonic after ~300 ms.

Electrophysiology was conducted in awake animals during using acute recording techniques. Six-shank, 64-ch silicone probes (Buzsaki 64sp, NeuroNexus) were used to record neural activity. The neural data were acquired using “Whisper” acquisition system (Janelia, HHMI) at 20,833 Hz using SpikeGL software (Janelia, HHMI). Action potentials were detected and clustered using SpikeDetekt2 and KlustaKwik with manual clustering preformed using KlustaViewa39.

All basic analysis was done using the Anaconda Python distribution. Mask response latency was determined by comparing baseline (no mask) activity distribution to mask response. To construct baseline sample distribution, PSTHs for 7 sniffs prior to every mask trial were sampled. From these baseline samples, 100,000 samples of the same size as the number of mask trial were drawn with replacement to create a simulated PSTH from the same number of trials as the masked PSTH. Finally, the PSTH from masked trials was compared with the baseline PSTH distribution. Latency to mask response was defined as the first bin where firing rate was > 3 fold greater than the baseline PSTH and the bin was at the 0.0001th percentile of the bootstrapped baseline distribution.

### Linear SVM classifier

Population vectors were assembled from spike trains of recorded unit (n = 29) that responded to one of the odors presented. For each cell and for each trial, a 35-dimensional vector was created by binning action potential events into 10 ms bins from the 0–350 ms after the first inhalation onset of the odorant. Activity vectors from cells were concatenated and standardized to make a population vector for training and testing. Linear classifiers were created using the Scikit-learn v0.16.1 LinearSVC class40. To assess performance of the classifiers on unmasked trials, a leave-one-out cross validation strategy was used. To classify masked trials, classifiers were built using all available unmasked trials (N = 19), and the classifier was scored on its performance at classifying all masked trials.

### Concentration series electrophysiology

NeuroNexus A64 Poly5 2 × 32 probes were used to record acutely from awake animals. Units were detected using Spyking Circus software (v0.3.0)41. Significant odor responses were defined by comparing inhalation-aligned blank odor response distributions with responses to odor presentations (Supplementary Fig. 3A–D). To establish these distributions, blank and odor responses were bootstrapped across trials, summed across trials, and smoothed with a 3-sigma Gaussian kernel of width 30 ms. For each time point, the bootstrapped firing rates were fitted with a Gaussian and the Cohen’s D (discriminability) score was calculated for each time bin. Response latencies were defined as the first time-bin in with a D-score above 5, where overlap is < 0.01 (Supplementary Fig. 3E, G).

### Computational model

Our model was based on random and sparse connectivity between the MT cells and the PC cells, as well as within the cortex as detailed below. Our simulation included 300 MT cells and 1000 cells in the PC. Neurons in PC formed random sparse inhibitory recurrent connections to other cells in PC with 50% probability. Non-zero inhibitory recurrent connection weights within PC were $$W_{ij}^{inPP} = 3$$. MT cells also formed random excitatory connections with the PC cells with 13% probability (each PC cell received inputs from 40 MT cells). Non-zero projections from MT cells to a PC cell were $$W_{ij}^{inPB} = 0.15$$. In the case of order dependent model, we used $$W_{ij}^{inPB} = 0.30$$.

The state of each PC neuron was defined by the input that this neuron receives u i that satisfied the equation

$$\tau {\rm{d}}{u_i}/{\rm{d}}t = - {u_i} + \mathop {\sum }\limits_j W_{ij}^{PP}{f_j} + \mathop {\sum }\limits_j W_{ij}^{PB}{m_j}$$

Here τ = 0.05 is the time constant measured in the fraction of sniffing cycle. The activation state for each PC neuron had a hysteretic dependence on its inputs f i  = F ±(u i ). The activation function F ± was single valued for values of input variable u satisfying u > u +  = 0.2 and u < u  = −150. For these values of parameters, the activation function F ± was equal to 1 and 0, respectively. Within the bistable range, i.e., for u  ≤ u ≤ u +, F ± was bistable and remained constant depending on prior history. Therefore, if a neuron was activated, the activation function within the bistable range remained equal to 1, whereas for an inactivated neuron, the activation function was 0. Activation occurred when inputs exceeded u +, and inactivation happened when inputs fell below u .

Each simulation was carried out over the period of 700 time units using Runge–Kutta method with time step Δt = 0.002. The simulation started at t = −0.2 and lasted until t = 1.2. t = 0 corresponds to the onset of inhalation, and t = 1 is the end of the early stage of the sniff cycle. The masking stimulus was presented between t = 0 and t = 1. This time interval was expected to reproduce the early part of the sniff cycle during which odorant identity is established.

To model MT cell responses to odorants, we generated random spatiotemporal patterns of MT cell activity. For the case of pure odorants (black and gray in Fig. 5d), we used two different random patterns for each of the two odorants. The response of each responsive MT cell was represented by a transient that lasted 0.5 time units (in fractions of the early part of the sniff cycle). The transient response consisted of an increase of the output of a mitral cell m j from 0 to 1 and reset back to 0. For low/high concentration conditions, the earliest transients began at t = 0.4/0.25, respectively and the following MT cell transients were distributed at random times with the time step of 0.02 (every 0.02 a MT cell was recruited). This feature was intended to replicate the tendency of MT cells to respond later in the sniff cycle to lower odorant concentrations42. For the mixture case (Fig. 5d), we generated two sets of random recruitment orders for each of the pure binary compounds within the mixture and combined them into a single sequence by offsetting one of them by 2 positions, depending on which component concentration was bigger (60 + 40% vs. 40 + 60% composition). Following the earliest transient onset at t = 0.25, as in high concentration case, one MT cell was recruited every time interval of 0.02 with the recruitment order as described above. In each trial, MT cell transients had a finite probability to be emitted to mimic the experimentally observed transient event reliability43. The probability was p = 0.8/0.9 for low/high concentration conditions. To simulate the ChR2 stimulation, we added a pulse that began at the time indicated in Fig. 4 and lasted 0.1. The amplitude of the pulse was 0.18. The pulse was present in 75% of MT cells chosen randomly. We added normally distributed white noise with the standard deviation of 0.1 to the activity of MT cells. This was done to reproduce observed features of psychophysical performance. We tested our simulations for a range of parameters and verified that the qualitative conclusions are not sensitive to the exact set of parameters chosen. We ran 500 trials for each of the two odorants and each concentration. After each set of 10 trials, we reset the randomly selected weights and parameters in the model to mimic trials performed by different animals.

The perceived identity of the stimulus in each trial was inferred from the activity of PC cells at the end of the simulation (t = 1.2) from the template pattern of PC response that maximally overlapped the evoked response. To obtain the template, we ran the simulation once without noise for every condition.

### Code availability

The code used for data acquisition is available at https://github.com/olfa-lab. MATLAB code of the computational model is available in ModelDB at http://modeldb.yale.edu/231814

### Data availability

The behavioral data set is available at https://doi.org/10.6084/m9.figshare.5325310. Concentration-series electrophysiological (spike times) data set is available at https://doi.org/10.6084/m9.figshare.5325340. Raw binary electrophysiological data will be made available on request to corresponding author.

## References

1. 1.

Cleland, T. A. et al. Sequential mechanisms underlying concentration invariance in biological olfaction. Front. Neuroeng. 4, 21 (2011).

2. 2.

Uchida, N. & Mainen, Z. F. Odor concentration invariance by chemical ratio coding. Front. Syst. Neurosci. 1, 3 (2007).

3. 3.

Krone, D., Mannel, M., Pauli, E. & Hummel, T. Qualitative and quantitative olfactometric evaluation of different concentrations of ethanol peppermint oil solutions. Phytother. Res. 15, 135–138 (2001).

4. 4.

Chess, A., Simon, I., Cedar, H. & Axel, R. Allelic inactivation regulates olfactory receptor gene expression. Cell 78, 823–834 (1994).

5. 5.

Malnic, B., Hirono, J., Sato, T. & Buck, L. B. Combinatorial receptor codes for odors. Cell 96, 713–723 (1999).

6. 6.

Saito, H., Chi, Q., Zhuang, H., Matsunami, H. & Mainland, J. D. Odor coding by a Mammalian receptor repertoire. Sci. Signal. 2, ra9 (2009).

7. 7.

Meister, M. & Bonhoeffer, T. Tuning and topography in an odor map on the rat olfactory bulb. J. Neurosci. 21, 1351–1360 (2001).

8. 8.

Bozza, T., McGann, J. P., Mombaerts, P. & Wachowiak, M. In vivo imaging of neuronal activity by targeted expression of a genetically encoded probe in the mouse. Neuron. 42, 9–21 (2004).

9. 9.

Niessing, J. O. R. & Friedrich, R. W. Olfactory pattern classification by discrete neuronal network states. Nature 465, 47–52 (2010).

10. 10.

Bhagavan, S. & Smith, B. H. Olfactory conditioning in the honey bee, Apis mellifera: effects of odor intensity. Physiol. Behav. 61, 107–117 (1997).

11. 11.

Gross-Isseroff, R. & Lancet, D. Concentration-dependent changes of perceived odor quality. Chem. Senses 13, 191–204 (1988).

12. 12.

Duchamp-Viret, P., Chaput, M. A. & Duchamp, A. Odor response properties of rat olfactory receptor neurons. Science 284, 2171–2174 (1999).

13. 13.

Schaefer, A. T. & Margrie, T. W. Spatiotemporal representations in the olfactory system. Trends Neurosci. 30, 92–100 (2007).

14. 14.

Hopfield, J. J. Pattern recognition computation using action potential timing for stimulus representation. Nature 376, 33–36 (1995).

15. 15.

Spors, H. & Grinvald, A. Spatio-temporal dynamics of odor representations in the mammalian olfactory bulb. Neuron 34, 301–315 (2002).

16. 16.

Ghatpande, A. S. & Reisert, J. Olfactory receptor neuron responses coding for rapid odour sampling. J. Physiol. 589, 2261–2273 (2011).

17. 17.

Kent, P. F., Mozell, M. M., Murphy, S. J. & Hornung, D. E. The interaction of imposed and inherent olfactory mucosal activity patterns and their composite representation in a mammalian species using voltage-sensitive dyes. J. Neurosci. 16, 345–353 (1996).

18. 18.

Mozell, M. M. Evidence for a chromatographic model of olfaction. J. Gen. Physiol. 56, 46–63 (1970).

19. 19.

Jiang, J. & Zhao, K. Airflow and nanoparticle deposition in rat nose under various breathing and sniffing conditions: a computational evaluation of the unsteady effect. J. Aerosol. Sci. 41, 1030–1043 (2010).

20. 20.

Margrie, T. W. & Schaefer, A. T. Theta oscillation coupled spike latencies yield computational vigour in a mammalian sensory system. J. Physiol. 546, 363–374 (2003).

21. 21.

Junek, S., Kludt, E., Wolf, F. & Schild, D. Olfactory coding with patterns of response latencies. Neuron 67, 872–884 (2010).

22. 22.

Smear, M. C., Shusterman, R., O’Connor, R., Bozza, T. & Rinberg, D. Perception of sniff phase in mouse olfaction. Nature 479, 397–400 (2011).

23. 23.

Poo, C. & Isaacson, J. S. Odor representations in olfactory cortex: ‘sparse’ coding, global inhibition, and oscillations. Neuron 62, 850–861 (2009).

24. 24.

Sanders, H. et al. A network that performs brute-force conversion of a temporal sequence to a spatial pattern: relevance to odor recognition. Front. Comput. Neurosci. 8, 108 (2014).

25. 25.

Wesson, D. W., Carey, R. M., Verhagen, J. V. & Wachowiak, M. Rapid encoding and perception of novel odors in the rat. PLoS Biol. 6, e82–e729 (2008).

26. 26.

Abraham, N. M. et al. Maintaining accuracy at the expense of speed: Stimulus similarity defines odor discrimination time in mice. Neuron 44, 865–876 (2004).

27. 27.

Resulaj, A. & Rinberg, D. Novel Behavioral Paradigm Reveals Lower Temporal Limits on Mouse Olfactory Decisions. J. Neurosci. 35, 11667–11673 (2015).

28. 28.

Sato, T. et al. Supersensitive detection and discrimination of enantiomers by dorsal olfactory receptors: evidence for hierarchical odour coding. Sci. Rep. 5, 14073 (2015).

29. 29.

Hopfield, J. J., Brody, C. D. & Roweis, S. Computing with action potentials. Adv Neural Inf Processing. 10, 166–172 (1998).

30. 30.

Brody, C. D. & Hopfield, J. J. Simple networks for spike-timing-based computation, with application to olfactory processing. Neuron 37, 843–852 (2003).

31. 31.

Schaefer, A. T. & Margrie, T. W. Psychophysical properties of odor processing can be quantitatively described by relative action potential latency patterns in mitral and tufted cells. Front. Syst. Neurosci. 6, 30 (2012).

32. 32.

Dewan, A., Pacifico, R., Zhan, R., Rinberg, D. & Bozza, T. Non-redundant coding of aversive odours in the main olfactory pathway. Nature 497, 486–489 (2013).

33. 33.

Mainland, J. D. et al. The missense of smell: functional variability in the human odorant receptor repertoire. Nat. Neurosci. 17, 114–120 (2014).

34. 34.

Laing, D. G., Eddy, A., Francis, G. W. & Stephens, L. Evidence for the temporal processing of odor mixtures in humans. Brain. Res. 651, 317–328 (1994).

35. 35.

Jinks, A. & Laing, D. G. The analysis of odor mixtures by humans: Evidence for a configurational process. Physiol. Behav. 72, 51–63 (2001).

36. 36.

Smear, M. C., Resulaj, A., Zhang, J., Bozza, T. & Rinberg, D. Multiple perceptible signals from a single olfactory glomerulus. Nat. Neurosci. 16, 1687–1691 (2013).

37. 37.

Knutsen, P. M., Pietr, M. & Ahissar, E. Haptic object localization in the vibrissal system: behavior and performance. J. Neurosci. 26, 8451–8464 (2006).

38. 38.

Van Der Walt, S., Colbert, S. C. & Varoquaux, G. The NumPy Array: A Structure for Efficient Numerical Computation. IEEE Comput. Sci. Eng. 13, 22–30 (2011).

39. 39.

Rossant, C. et al. Spike sorting for large, dense electrode arrays. Nat. Neurosci. 19, 634–641 (2016).

40. 40.

Pedregosa, F. et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011).

41. 41.

Yger, P., Spampinato, G., Esposito, E. & Lefebvre, B. Fast and accurate spike sorting in vitro and in vivo for up to thousands of electrodes. bioRxiv https://doi.org/10.1101/067843 (2016).

42. 42.

Sirotin, Y. B., Shusterman, R. & Rinberg, D. Neural Coding of Perceived Odor Intensity. eNeuro 2, (2015).

43. 43.

Shusterman, R., Smear, M. C., Koulakov, A. A. & Rinberg, D. Precise olfactory responses tile the sniff cycle. Nat. Neurosci. 14, 1039–1044 (2011).

44. 44.

Bolding, K. A. & Franks, K. M. Complementary codes for odor identity and intensity in olfactory cortex. eLife 6, e22630 (2017).

## Acknowledgements

We acknowledge Thomas Bozza, Matt Wachowiak, Kevin Franks and Andreas Schaefer for commenting on this manuscript; Admir Resulaj for his technical assistance in engineering the behavioral apparatus; and Ezequiel Arneodo and Kristina Penikis for critical discussions and for sharing the design of apparatus used for electrophysiological recordings. This work was supported by NIDCD (R01DC013797, R01DC014366) and the Whitehall Foundation. C.D.W. is funded by N.S.F. GFRP.

## Author information

C.D.W. and D.R.: Designed the behavioral and electrophysiological experiments; C.D.W. and G.O.S.: Collected the behavioral data; C.D.W.: Collected the electrophysiological data; C.D.W.: Analyzed the experimental data; A.A.K.: Created the computational model; D.R., C.D.W. and A.A.K.: Wrote the manuscript. All authors discussed results and commented on the manuscript.

Correspondence to Dmitry Rinberg.

## Ethics declarations

### Competing interests

The authors declare no competing financial interests.

Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Wilson, C.D., Serrano, G.O., Koulakov, A.A. et al. A primacy code for odor identity. Nat Commun 8, 1477 (2017) doi:10.1038/s41467-017-01432-4

• ### Olfactory Object Recognition Based on Fine-Scale Stimulus Timing in Drosophila

• Aarti Sehdev
• , Yunusa G. Mohammed
• , Tilman Triphan
•  & Paul Szyszka

iScience (2019)

• ### Complex neural representation of odour information in the olfactory bulb

• Anan Li
• , Xiaoping Rao
• , Yang Zhou
•  & Diego Restrepo

Acta Physiologica (2019)

• ### Partial depletion of dopaminergic neurons in the substantia nigra impairs olfaction and alters neural activity in the olfactory bulb

• Wenfeng Zhang
• , Changcheng Sun
• , Yufeng Shao
• , Zheng Zhou
• , Yiping Hou
•  & Anan Li

Scientific Reports (2019)

• ### Structured Odorant Response Patterns across a Complete Olfactory Receptor Neuron Population

• Guangwei Si
• , Jessleen K. Kanwal
• , Yu Hu
• , Christopher J. Tabone
• , Jacob Baron
• , Matthew Berck
• , Gaetan Vignoud
•  & Aravinthan D.T. Samuel

Neuron (2019)