Main

The turbulent nature of air1,2,4,8 and water9,10 flow results in complex temporal fluctuations in odour concentration that depend on the distance and direction of odour sources1,2,3,4,8,10. Insects are thought to use the temporal structure of odour plumes to infer, for example, the location4,7,11,12,13 or composition13,14,15 of an odour source. Mammalian olfaction, by contrast, has generally been considered a slow sense. Individual sniffs are thought to be the unit of information16, implying that fast changes in odour concentration (at sub-sniff resolution) should be inaccessible to the mammalian olfactory system. However, the neural circuitry of, for example, the mouse olfactory bulb (OB) is in principle capable of millisecond-precise action potential firing17,18, and is endowed with rich computational resources that could be used to extract fine temporal information from dynamic inputs19. Here we show that the mouse olfactory system has access to fast, sub-sniff temporal patterns in the odour scenery and that mice can use this information to detect high-frequency odour correlations, thereby enabling source separation.

Fast odour dynamics encoded in OB inputs

Normal airflow is characterized by complex, often turbulent, flow patterns and imposes a rich temporal structure on odour concentration profiles, with substantial power in frequencies well above typical sniff rates (Fig. 1a). To assess whether the mouse olfactory system has access to this frequency regime, we designed an odour delivery system that can reliably present odours with a bandwidth beyond 50 Hz (Fig. 1b, Supplementary Fig. 1). As prototypical, simplistic high-frequency stimuli, we used two 10-ms square pulses of odour separated by 10 or 25 ms (Fig. 1c). Olfactory sensory neurons (OSNs) are known to be slow in responding to odour stimuli20. Both epithelial mucus and the biochemical transduction cascade act as low-pass filters16,20,21, which suggests that individual OSNs cannot directly follow rapidly fluctuating odour stimuli. However, axons from up to tens of thousands of OSNs that express the same olfactory receptor converge onto one or a few glomeruli in the OB22. This organization resembles the auditory system, in which—despite the relatively low temporal resolution of individual cells—population responses faithfully report high-frequency signals23. Thus, we built a model of populations of noisy integrate-and-fire neurons with stimulus filtering and neuronal dynamics that matched experimental data to investigate whether this large convergence could aid in detecting high-frequency stimuli in OSNs (Extended Data Fig. 1). Our simulation results suggest that across the thousands of OSNs that express the same OR—although still not directly following the odour profile—the population can faithfully discriminate between such 10-ms or 25-ms stimuli (Extended Data Fig. 1d, f, h). Key high-frequency information in the odour profile might, therefore, be preserved in the inputs to the OB.

Fig. 1: Sub-sniff detection of odour signals in olfactory bulb inputs.
figure 1

a, Left, example odour plume recorded outdoors under natural, complex airflow conditions using a photoionization detector (PID). Right, averaged power spectrum of all recorded odour plumes (n = 37 plumes, mean ± s.d. of log power); dark grey, typical range of mouse sniff frequencies. b, Left, multi-channel high-bandwidth odour delivery device. Middle, representative odour pulse recordings at command frequencies between 5 and 50 Hz. ppm, parts per million. Right, relationship of frequency and odour pulse signal fidelity (Methods; n = 5 repeats for each frequency, mean ± s.e.m., Supplementary Fig. 1). c, Left, odour and flow traces of stimuli with paired pulse interval (PPI) of 10 ms (top) and 25 ms (bottom); dark grey shading, valve commands. Right, stimuli are presented during the inhalation phase of the respiration cycle. d, The two-photon imaging approach. e, GCaMP6f fluorescence recorded in OB glomeruli (maximum projection of 8,200 frames, numbered glomeruli correspond to example traces in f). Scale bar, 50 μm. f, Top, example calcium traces in response to odour stimuli with PPIs of 10 or 25 ms (mean of ten trials ± s.e.m., unpaired two-sided t-test for 2-s response integral from odour onset). Bottom, example respiration trace. g, Calcium transients as colour maps for odour stimuli with PPI 10 ms or 25 ms, and the difference between the two. Glomeruli are sorted by response magnitude to the PPI 10-ms stimulus. h, Glomerular responses sorted by magnitude of difference in response to PPI 10 ms and PPI 25 ms. i, Classifier accuracy over all glomeruli when a linear classifier was trained on several response windows (colours; black, shuffled control) to stimuli with PPI 10 ms versus 25 ms (n = up to 100 glomeruli from 5 mice; mean ± s.d. of 500 repetitions). Throughout, ethyl butyrate was used as the odour stimulus.

To test this experimentally, we performed Ca2+ imaging experiments in anaesthetized and awake mice expressing the calcium indicator GCaMP6f in OSNs (Fig. 1c–i, Extended Data Fig. 2) while we delivered odour pulses locked to inhalation (Fig. 1c, d). Overall, responses for all glomeruli were highly correlated between the two stimuli (Fig. 1f, g). Glomerular activity did not directly follow the 10-ms or 25-ms pulses (Fig. 1f). However, in one-third of glomeruli (n = 33 of 100, P < 0.01), responses were consistently and significantly different for the two stimuli (Fig. 1f–h, Extended Data Fig. 2), mirroring the simulation results (Extended Data Fig. 1). Notably, just a few dozen randomly chosen glomeruli were sufficient to discern between the stimuli at more than 80% success rate with a linear classifier (Fig. 1i, Extended Data Fig. 1h). Expanding the stimulus set to different concentrations and multiple pulses (Extended Data Fig. 2) confirmed that information about concentration and temporal patterns with features exceeding the 25-ms timescale is reliably and independently preserved in the population of OSNs.

Discrimination of correlation structure

To investigate whether mice can base their behaviour on such high-frequency stimuli, we trained mice in an automated go/no-go operant conditioning system (AutonoMouse24) (Fig. 2a, Supplementary Video 1) to discriminate between high-frequency stimuli. To ensure that the brief odour pulses were delivered during inhalation in freely moving mice, we opted for 2-s pulse trains at different frequencies with constant airflow (Fig. 2b). Mice could discriminate whether an odour was presented at, for example, 4 Hz or 20 Hz, but the apparent ‘critical flicker frequency’ (Fig. 2c, Extended Data Fig. 3) was significantly lower than frequencies that are readily represented by OSNs (Fig. 1, Extended Data Figs. 1, 2). However, in both visual and auditory systems, conventional flicker fusion frequency or gap detection thresholds substantially underestimate the temporal sensitivity, particularly for tasks with multiple stimuli present23,25,26: In vision, for example, flicker fusion frequency is around 60 Hz, whereas thresholds for detecting synchrony between stimuli have been reported to be 3 ms26. Therefore, we wanted to probe whether olfactory tasks involving multiple odours could also reveal behavioural access to higher frequencies. We presented stimuli composed of two odours that fluctuated in a correlated or anti-correlated manner as the rewarded and unrewarded stimulus, respectively (and vice versa) (Fig. 2d–f). Mice readily learned to respond differentially to correlated or anti-correlated odours (Fig. 2h–k). A gradual increase in the correlation frequency showed that mice could reliably detect the correlation structure of stimuli at frequencies of up to 40 Hz (Fig. 2h, j, k). As a population, performance decreased by approximately 5% per octave, with performance significantly above chance at frequencies of up to 40 Hz (n = 33 mice in two cohorts of 14 and 19 mice) (Fig. 2k). To mitigate the risk of mice using unintended cues for discrimination, odours were presented from changing valve combinations (Fig. 2g, Extended Data Fig. 4), and odour flow was carefully calibrated (Fig. 2e, Extended Data Fig. 4d, e) and varied randomly between trials so that neither flow, valve clicking noises nor average concentration provided any information about the nature of the stimulus (Extended Data Fig. 4d–h). Consistent with this, when valve identities were scrambled, mice performed at chance (Fig. 2k). Finally, when odour presentation was changed to a new set of valves, performance levels were maintained (Fig. 2g–i, Extended Data Fig. 4i–k), indicating that only intended cues (the temporal structures of odours) were used for discrimination. Performance was independent of the odour pair used (Extended Data Fig. 3g) and was maintained for tasks in which the mice had to distinguish correlated from uncorrelated (rather than anti-correlated) odours (Extended Data Fig. 3e, f).

Fig. 2: Mice can discriminate odour correlation structure at frequencies up to 40 Hz.
figure 2

a, The automated operant conditioning system (AutonoMouse) housing cohorts of up to 25 animals. b, Left, representative trace of a 20-Hz odour pulse train (top) and corresponding stable airflow (bottom). Right, relationship between frequency and total amount of odour released (n = 5 repeats for each frequency, mean ± s.e.m.). c, Group accuracy in frequency discrimination task (n = 10 mice, P < 0.001 for all stimuli compared to chance (paired two-sided t-test); Extended Data Fig. 3). Thick lines, medians; boxes, 25th–75th percentiles; whiskers, most extreme data points not considered outliers (Methods). d, Left, valve commands to release two odours fluctuating at 20 Hz in a correlated (top) or anti-correlated (bottom) manner. Right, resulting odour concentration changes measured using dual-energy PIDs (Supplementary Fig. 2). e, Odour (left) and flow (right) signals for correlated and anti-correlated stimuli fluctuating at 20 Hz (n = 60 trials for each condition; odour, P = 0.19; flow, P = 0.23; unpaired two-sided t-test). Black dots, medians; black bar, second and third quartiles. f, Discrimination stimuli; mice were trained to discriminate between two odours presented simultaneously in either a correlated (top) or anti-correlated (bottom) fashion in a standard go/no-go paradigm. g, Valve combinations for stimulus production. Train: six valves are used to produce the stimulus through varying valve combinations. Switch control: two extra valves are introduced and odour presentation is switched over to the newly introduced valves. h, Data for example mouse performing the correlation discrimination task at different frequencies. †, ‡, time of new valve introduction as in i. i, Trial response maps before and after switch to control valves (n = 12 trials before and 12 trials after new valve introduction; Extended Data Fig. 4). j, Accuracy of three representative mice when stimulus pulse frequency is randomized from trial to trial. k, Group accuracy for the experiment in j (n = 33 training mice, n = 5 control mice, n = 9.3 × 105 trials). Throughout, isoamyl acetate and ethyl butyrate were used as odour stimuli.

Mice tended to take more time to detect the correlation structure of stimuli with higher fluctuation frequencies (Extended Data Fig. 5j–l). This was most pronounced for mice with higher overall performance (Extended Data Fig. 5j). Accuracy strongly correlated with reaction time across all stimuli and mice (Extended Data Fig. 5k), despite the fact that total time of odour delivery was the same across all trials regardless of stimulus frequency. Consequently, when analysis was restricted to trials in which mice sampled the stimuli for long enough—for example, for at least 750 ms—performance significantly increased across frequencies (Extended Data Fig. 5l). This indicates that the measured performance might not be the psychophysical limit for discrimination of fluctuating odour stimuli. Furthermore, this suggests that mice integrate information across large portions of the presented stimuli, rather than, for example, detecting simultaneity of odour onset14 to determine whether odours were correlated or not. To directly test this possible strategy, we interleaved training trials with probe trials in which the onset characteristics were flipped (Extended Data Fig. 5f–i). Notably, performance did not drop substantially (Extended Data Fig. 5h, i), consistent with a strategy that relies primarily on discerning the high-frequency correlation structure of the stimulus over several hundreds of milliseconds, rather than the onset only (Extended Data Fig. 5f, g, i). Sniff rate, in turn, was independent of the correlation frequency of stimuli presented (Extended Data Fig. 5a–e).

Odour correlation encoded in OB output

To assess how this high-frequency information is represented and reformatted in the olfactory system, we imaged neural activity in response to high-frequency stimuli (Fig. 3). Ca2+ imaging of OSN responses to correlated and anti-correlated stimuli showed that—unlike for two pulses with variable gaps (Fig. 1)—the correlation structure of odour pulse trains was difficult to discern on the level of inputs to the OB using simple linear classifiers (Extended Data Fig. 6). Directly imaging from the output neurons of the OB—mitral and tufted cells (M/TCs) (Fig. 3a–g, Extended Data Fig. 7)—showed that overall, M/TCs also responded similarly to correlated and anti-correlated stimuli (Extended Data Fig. 7j–l). However, 17% of all M/TCs showed significantly different integral responses (0–5 s after odour onset, P < 0.01) to the two stimuli (114 of 680 regions of interest (ROIs)) (Fig. 3d–f). As a result, correlated and anti-correlated odours were reliably discriminated by a linear classifier using the M/TC population responses (Fig. 3g (somatic response), Extended Data Fig. 7d, i (dendritic response)), in contrast to the OSN population response (Extended Data Fig. 6k, l). This finding is consistent with the idea that the OB circuitry implements a nonlinear transformation of OSN input such that the representation of correlation becomes more readily accessible in the OB output.

Fig. 3: Odour correlation structure is encoded by OB output neurons.
figure 3

a, The two-photon imaging approach (Extended Data Fig. 7e). b, Coronal OB section showing GCaMP6f (green) expressed in projection neurons. Scale bar, 20 μm. c, GCaMP6f fluorescence from mitral and tufted cells (maximum projection of 8,000 frames). Responses from ROI marked with asterisk in inset 1 are shown in d. Scale bar, 20 μm. d, e, Example traces of ROIs that show differential response kinetics to correlated (black) and anti-correlated (red) 20-Hz stimulation in anaesthetized (d; mean ± s.e.m. of 24 trials, unpaired two-sided t-tests on 5-s response integrals) and awake mice (e; mean ± s.e.m. of 16 trials, unpaired two-sided t-tests). Light blue, odour presentation. f, Calcium transients as colour maps for correlated and anti-correlated averaged trials and for the difference between the two for the 5% of ROIs with the largest differential responses. g, Accuracy of linear classifier trained on several response windows (colours; black, shuffle control) to correlated versus anti-correlated stimuli at 20 Hz (n = up to 680 ROIs from 6 mice; mean ± s.d. of 500 repetitions). h, The extracellular recording approach. i, Example single unit response to correlated and anti-correlated stimuli shown as raster plot (top) and peristimulus time histogram (PSTH) (mean ± s.e.m.) of spike times binned every 50 ms (bottom); inset, average spike waveform (black) and 1,000 individual spike events (grey). Scale bars, 100 μV, 1 ms. Light blue, odour presentation. Two-sided Mann–Whitney U test comparing spike time distributions of correlated and anti-correlated trials during 4 s after odour onset. j, Binned spike discharge over time shown as colour maps for all units (correlated, anti-correlated and the difference between the two). k, Accuracy of linear classifier trained on the average 2-s response to correlated versus anti-correlated stimuli at 20 Hz (yellow) (n = up to 97 units from 6 mice; mean ± s.d. of 1,000 classifier repetitions; Methods, Extended Data Fig. 8).

We used odour stimuli that fluctuated rapidly at frequencies that substantially exceeded the temporal resolution of Ca2+ imaging, which captures a low-pass filtered signal of neural activity. Although the Ca2+ signal does not follow individual stimulus frequencies, the M/TC population response contained enough information to determine whether a correlated or anti-correlated stimulus was presented. To investigate whether additional information about stimuli is present in the output of the OB at finer time scales, we turned to extracellular unit recordings (Fig. 3h–k, Extended Data Fig. 8) and whole-cell patch-clamp recordings (Extended Data Fig. 9). Despite the kilohertz temporal resolution, single units also did not directly follow high-frequency stimuli. Average activity (summed spike count during 500 ms after odour onset) was, however, significantly different between correlated and anti-correlated stimuli in 24% of single units (23 of 97; P < 0.01, Mann–Whitney U test) (Fig. 3i, j, Extended Data Fig. 8b), consistent with the Ca2+ imaging results. As few as 60 randomly selected units were sufficient to classify the odour stimuli with more than 80% accuracy (Fig. 3k). Additional information was contained at finer time scales, as increasing the temporal resolution of analysis improved discriminability (Fig. 3k, Extended Data Fig. 8e–g). Together, these results demonstrate that information about high-frequency correlation structure in odours is accessible to animals for behavioural decisions and readily available in the output of the OB.

Correlations allow source separation

We next considered what the detection of high-frequency correlations could be useful for. Natural odours consist of multiple different types of molecules, and a typical olfactory scene contains several sources6. To make sense of the olfactory environment, the brain must be able to separate odour sources, attributing the various chemicals present to the same or different objects5. Motivated by the turbulent nature of odour transport, Hopfield suggested that the temporal structure of odour concentration fluctuations might contain information about the locations of odour sources5—that is, that chemicals belonging to the same source would co-fluctuate in concentration. Detecting correlations in odour fluctuations would thus allow mice to discern which odours arise from the same object. To experimentally probe the potential of odour correlation structure to facilitate odour source separation in air, we devised a dual-energy fast photoionization detection method to simultaneously measure the odour concentrations of two odours with high temporal bandwidth (Methods; Fig. 4a, b, Extended Data Fig. 10a–e, Supplementary Fig. 2). When an odour was presented in a laboratory environment with artificially generated complex airflow patterns (Fig. 4a), to mimic the outdoor measurements (Fig. 1a), odour concentration fluctuated with a spectrum extending beyond 40 Hz (Extended Data Fig. 10a). When two odours were presented from the same source, these fluctuations were highly correlated (Fig. 4a, b, Extended Data Fig. 10b). When we separated odour sources and presented the two odours 50 cm apart, odour dynamics were uncorrelated (Fig. 4a, b) with intermediate correlations for closer distances (Fig. 4b). This pattern of almost perfect correlation for the same source and virtually uncorrelated dynamics for separated sources was maintained at closer and farther distances between odour source and sensor (Extended Data Fig. 10d), independent of the odours used (Extended Data Fig. 10c), and was mirrored outdoors (Extended Data Fig. 10e). Thus, the correlation structure of odorant concentration fluctuations contains reliable information about odour objects—for example, whether odours emerge from the same or different sources.

Fig. 4: Source separation using correlations of odour concentration fluctuations.
figure 4

a, Simultaneous measurement of two odours (odour 1: α-terpinene (AT); odour 2, ethyl butyrate (EB)) using a dual-energy PID (Extended Data Fig. 10a–e, Supplementary Fig. 2) at d = 40 cm, presented from one source or from two sources separated by s = 50 cm, with complex airflow in the laboratory. b, Correlation coefficients over all recordings for odours from the same source or from two sources separated by s = 10–50 cm (EB versus AT; n = 61 for one source, n = 71 for each individual distance; unpaired two-sided t-test). Thick lines, medians; boxes, 25th–75th percentiles; whiskers, most extreme data points not considered outliers (Methods). c, Example plumes used for training mice on a virtual source separation task to discriminate between odour stimuli derived from the same source (unrewarded, S−) and from separated sources (rewarded, S+). d, Example learning curve for a mouse trained to perform the virtual source separation task. Isoamyl acetate and ethyl butyrate were used as odour stimuli. e, Average accuracy over different variants of the task, calculated over the last 2,400 trials of virtual source separation training (n = 11 mice, P < 0.0001, unpaired t-test, compared to chance performance), and subsequent stages in which probe trials containing novel plume types were interleaved with the training set. Responses are compared between probe and training trials within each stage. Probe plumes: odours fluctuate in a perfectly correlated manner, with a novel temporal structure (120 probe trials in a segment of 2,400 trials, n = 11 mice, paired t-test). Probe 2 Hz, 20 Hz, 40 Hz: correlated or anti-correlated square pulse trains (50 probe trials per frequency in a segment of 1,650 trials, n = 9 mice). Responses to 2 Hz, 20 Hz and 40 Hz probe trials were shuffled 10,000 times to calculate chance performance; data are mean ± s.d.; unpaired two-sided t-test.

To investigate whether mice can make use of this information, we trained a new cohort of mice in a modified AutonoMouse setting, presenting odours that corresponded to the ‘same source’ or ‘source separated’ cases as rewarded or unrewarded stimuli (Fig. 4c, d, Extended Data Fig. 10). Mice could learn to discriminate these stimuli (Fig. 4d, e). Once the mice had acquired the task, we probed their performance with artificially generated stimuli (Extended Data Fig. 10f–k) that were derived from previous measurements with natural airflow but were perfectly correlated (Fig. 4e). Notably, the mice reliably responded to these probe trials with correlated stimuli as they did to the ‘same source’ stimuli they had been trained on (Fig. 4e, Extended Data Fig. 10m). To further ascertain that the mice were using the correlation structure to make these decisions, we probed them with artificial square pulse stimuli (as in Fig. 2, 3) at different frequencies. Mice performed significantly above chance in probe trials at frequencies of up to 40 Hz (Fig. 4e, Extended Data Fig. 10s), which implies that learning about source separation stimuli directly translates to distinguishing temporal features in correlated or uncorrelated stimuli.

Discussion

We have shown that the mammalian olfactory system has access to temporal features of odour stimuli at frequencies of at least up to 40 Hz. We have demonstrated that mice have access to information in rapid odour fluctuations using different behavioural experiments (Figs. 2, 4). We have shown reliable decoding from imaging and unit recordings from different stages of the olfactory system using both correlated odour concentration fluctuations (Fig. 3, Extended Data Figs. 7, 8a–g) and simplistic paired pulse stimuli with gaps as small as 25 ms (Fig. 1, Extended Data Figs. 2, 8h–l), corroborated by computational modelling (Extended Data Fig. 1). Our results are consistent with previous findings that the olfactory bulb circuitry not only enables highly precise odour responses17,18 but also enables the detection of optogenetically evoked inputs with a precision of 10–30 ms27,28,29, with different projection neurons displaying distinct firing patterns in response to optogenetic stimulation29. Although behavioural and physiological responses to precisely timed odour stimuli have been observed in insects13,15,30, in mammals the complex shape of the nasal cavity was generally thought to low-pass filter any temporal structure of the incoming odour plume. Our results show that while the low-pass filtering in the nose and by OSNs might reduce the ability of neurons to directly follow high-frequency stimuli, sufficient information about high-frequency content is preserved and available that mice can readily make use of this information.

We considered what such high bandwidth could be useful for. We have shown that odour sources even in close proximity differ in their temporal correlation structure. Thus, the ability to detect whether odorants are temporally correlated could allow mice to perform source separation, solving the ‘olfactory cocktail party problem’5,6 without prior knowledge about the odour scenery. We show that mice can indeed discriminate between stimuli derived from a single source or separated sources. They readily translate this discrimination to artificial, correlated pulse trains, thereby demonstrating that they are using correlation structure to make this distinction. Distinguishing between other environmental features, such as the distance or direction of an odour source, could also be achieved by extracting temporal features from odour fluctuations1,2,3,8 possibly in combination with strategies that compare information reaching the brain through the two nares31,32.

We also considered how exactly this temporal information is extracted. Although insects can detect the simultaneity of onset of two odours14,33,34, this strategy is unlikely to be the dominant means that mice use to detect correlation (Extended Data Fig. 5). Similarly, mice do not show adjustment of sniff strategies to discriminate high-frequency odour correlations (Extended Data Fig. 5, Supplementary Video 2). Although individual mammalian OSNs are thought to be quite slow and unreliable20, the large convergence of OSN axons provides a substrate to create the needed high temporal bandwidth35 (Extended Data Fig. 1). Biophysical heterogeneity of OSNs might improve how the population encodes temporally structured stimuli36,37. Intrinsic cellular biophysics (Extended Data Fig. 9), local interneurons or long-range lateral inhibition5,38 might permit the extraction of temporal correlation within the olfactory bulb circuitry and possibly result in tuning of individual projection neurons to specific temporal structures.

The turbulence of odour plumes has often been viewed as a source of noise for mammals. By contrast, we find that the mouse olfactory system has access to high-frequency temporal features in odour stimuli. This opens up a new perspective on how mice could make use of natural turbulence to obtain information about their spatial environment. This in turn provides new computational challenges for the mammalian olfactory system and an entry point into how information about space is extracted from sensory inputs.

Methods

Ethical compliance

All animal procedures performed in this study were approved by the UK government (Home Office) and by the Crick Institutional Animal Welfare Ethical Review Panel.

Mice

All mice used for behavioural experiments were C57/Bl6 males, as long-term group housing precluded the use of mixed-sex cohorts (Figs. 2, 4, Extended Data Figs. 35, 10). In vivo imaging experiments were performed in 12–20-week-old heterozygous OMP-cre39 (JAX stock no. 006668; Fig. 1, Extended Data Figs. 2, 6) or Tbet-cre40 (Jax stock no. 024507; Fig. 3, Extended Data Fig. 7) mice crossed with the Ai95(RCL-GCaMP6f)-D line41 (JAX stock no. 028865) of either sex. Extracellular unit (Fig. 3, Extended Data Fig. 8) and whole-cell patch-clamp recordings (Extended Data Fig. 9) were performed in 5–8-week-old C57/Bl6 males. Mice were housed up to 5 per cage under a 12–12 h light–dark cycle. Food and water were provided ad libitum.

Reagents

All odours were obtained in their pure form from Sigma-Aldrich. Unless otherwise specified, odours were diluted 1/5 with mineral oil in 15-ml glass vials (27160-U, Sigma-Aldrich).

Statistical analysis and data display

To test for statistical significance between groups where appropriate we used either paired or non-paired student t-tests or, for non-parametric data, the Mann–Whitney U test, or the Kolmogorov–Smirnov test to test the equality of probability distributions. Statistical test details and P values are provided in figures and/or legends. Unless specified otherwise, boxplots were plotted using the MATLAB boxplot function with the median depicted as a thick line and default maximal whisker length of 1.5 × (q3 − q1) where q3 and q1 indicate the 75th and 25th percentile, respectively. If points were located outside this whisker range they were displayed individually as outliers. Violin plots show the median as a black dot and the second and third quartiles by the bounds of black bars. Mouse cartoons were adapted from https://scidraw.io/drawing/123 and https://scidraw.io/drawing/49.

High-speed odour delivery device

The odour delivery device was based on a modular design of four separate odour channels, and consisted of an odour manifold for odour storage, a valve manifold for control of odour release and hardware for controlling and directing airflow through the system (Fig. 1b). The odour manifold was a 12.2 × 3.2 × 1.5-cm3 stainless steel block with four milled circular indentations (1-cm radius). Within each of these indentations was a threaded through-hole for installation of an input flow controller (AS1211F-M5-04, SMC) and an output filter (INMX0350000A, The Lee Company). For each inset, the cap of a 15-ml glass vial (27160-U, Sigma-Aldrich) with the centre removed was pushed in and sealed with epoxy resin (Araldite Rapid, Huntsman Advanced Materials). This meant that glass vials could be screwed in and out of the insets for rapid replacement.

Solenoid valves typically limit high-fidelity odour stimulation, resulting in odour rise times of several tens of milliseconds under optimal conditions42. We therefore used high-speed micro-dispense valves with custom electronics for pulse-width modulation to maximize bandwidth: four VHS valves (INKX0514750A, The Lee Company) were installed in a four-position manifold (INMA0601340B, The Lee Company) with standard mounting ports (IKTX0322170A, The Lee Company). Each valve was connected to a corresponding odour position in the odour manifold with 10-cm Teflon tubing (TUTC3216905L, The Lee Company). Each valve was controlled by digital commands via a spike-and-hold driver. Each digital pulse delivered to the spike-and-hold driver delivered a 0.5-ms, 24-V pulse to the valve (to open it), followed by a 3.3-V holding pulse lasting the rest of the duration of the digital pulse. This spike-and-hold input allowed fast cycling of the valve without switching between 0 and 24 V at high frequencies, to prevent overheating of the valve. Each valve was controlled by an individual spike-and-hold driver. Up to four drivers could be controlled and powered with a custom-made power supply unit consisting of a 24-V power input and a linear regulator to split the voltages into 24-V and 3.3-V lines, as well as control inputs that take digital signal input and route it to the appropriate valve. Pulse profiles for calibration and stimulus production were generated with custom Python software (PyPulse, PulseBoy; https://github.com/RoboDoig), allowing us to define pulse parameters across multiple valves using a graphical user interface.

To generate airflow through the olfactometer, a pressurised air source was connected to a demister (AME250C-F02, SMC) and filter (AMF250CF02, SMC) and then split into two separate lines, the input line and carrier line. Both lines were then connected to a pressure regulator (AR20-F01BG-8, SMC) and flow controller (FR2A13BVBN, Brooks Instrument). The main line was then connected to the input of the valve manifold. The input line was split into four separate lines and connected to the input flow controllers (set to 0.25 l/min) on each odour position of the odour manifold. The output of the valve manifold was fitted with MINSTAC tubing (TUTC3216905L, The Lee Company). Where the design was scaled up (for example, to include eight odour positions) the valve manifold outputs were connected and consolidated to a single output with three-way connectors (QSMY-6-4, Festo). The shape and reliability of odour pulses depended strongly on low volume headspace and low pressure levels (0.05 MPa). Flow change due to odour pulses was always compensated by mineral oil presentation (for example, light grey in Fig. 1c).

Odour characterization

Signal fidelities were calculated by first subtracting the average amplitude of troughs from the average amplitude of peaks during a pulse train and then subsequently dividing this peak-to-trough value by the difference in the average peak amplitude subtracted by baseline amplitude (SignalFidelity = (meanPeak − meanTrough)/(meanPeak − baseline)). This results in a value between 0 and 1, with 1 being perfectly modulated odour pulses.

Behaviour

Automated operant conditioning of cohorts of mice (AutonoMouse)

In AutonoMouse, groups of mice (up to 25) implanted with a radiofrequency identification (RFID) chip are housed in a common home cage24 (Fig. 2a). Within the common home cage of AutonoMouse, mice have free access to food, social interaction and environmental enrichment. Water is not freely available in the system, but can be gained at any time by completion of an operant conditioning go/no-go task. To access these behavioural tasks, mice must leave the home cage and enter a behavioural area. This behavioural area contains the odour port and a lick port through which water rewards can be released. The lick port is also connected to a lick sensor, which registers the animal’s response (its lick rate) in response to the task stimuli. As animals can gain their daily water intake only by completing behavioural tasks, mice are motivated to complete long sequences of trials without manual water restriction. Sample sizes for each cohort were determined by the availability of simultaneously weaned male mice to be group-housed. The minimum sample size for each cohort was determined by requiring at least three mice in each subgroup. Mice were randomly assigned to different test subgroups based on their performance during an initial simple odour discrimination task until performance levels between the subgroups were statistically indistinguishable by a one-way ANOVA. After this initial allocation, the experimenter was blinded as to which group mice belonged to since the only distinguishing feature between mice was their RFID chip code.

Training on temporally structured odours

We aimed to probe whether mice could perceive a particular temporal feature of naturally occurring odour signals: temporal correlations between odour signals. In particular, we aimed to investigate this question with the simplest possible case: whether mice could discriminate perfectly correlated from perfectly anti-correlated odour stimuli.

All tasks followed a standard go/no-go training paradigm. Mice were presented with two odours presented in either a correlated pattern or an anti-correlated pattern (Fig. 2d, Extended Data Fig. 4a–c). For roughly half of all mice, the correlated pattern was S+ (rewarded) and the anti-correlated pattern was S− (unrewarded); in the other half of the group this reward valence was reversed. All stimuli were 2 s long. A water reward could be gained by licking so that licking was detected for at least 10% of the stimulus time during an S+ presentation (a ‘Hit’). Licking for the same amount of time during S− presentation resulted in a timeout interval of 7 s. In all other response cases, the inter-trial interval was 3 s and no water reward was delivered.

Stimulus structure

All anti-correlated and correlated stimuli on each trial followed a common pattern in their construction. Generally, wherever an odour position is inactivated a blank position should be activated to compensate for flow change. There should also be no consistent differences in the amount of odour or flow released during the stimulus between correlated and anti-correlated stimuli. The detailed algorithm for stimulus generation is as follows:

I. Correlated or anti-correlated/uncorrelated odour pulses (Fig. 2d, k, Extended Data Figs. 3, 5)

1. The stimulus is chosen to be correlated or anti-correlated/uncorrelated.

2. A set of 1–2 positions each for odour 1 and odour 2 and 2–3 positions for blank are randomly chosen from a pre-defined subset of 6 of the 8 total positions. For example, a valid combination could be odour 1 at position 1, 2; odour 2 at position 5; and blank at position 3 and 7 (Fig. 2g, Extended Data Fig. 4b).

3. A guide pulse is created at the desired frequency (for example, 2-Hz pulse with 50% duty; Supplementary Fig. 1c) for all positions that follows the chosen stimulus structure.

4. The relative contributions of each position to the total stimulus are randomly generated. At each time point in the stimulus, only two position types should be active (for example, odour 1 and blank for an anti-correlated stimulus) so the maximum contribution for any position type is 50% of the total release amount. Where two positions have been chosen for a position type, their relative contributions should add to 50% (Extended Data Fig. 4b).

5. The guide pulses are pulse-width modulated according to the relative contributions of each position (Supplementary Fig. 1c). Pulse-width modulation (PWM) is at 500 Hz with some added jitter in the duty to avoid strong tone generation.

6. For uncorrelated pulses, temporal offsets are added in one channel according to a distribution of time delays that follow the desired correlation structure between the two odour pulses (Extended Data Fig. 3e, f).

II. ‘One source’ and ‘source separated’ naturalistic plumes (Fig. 4c–e, Extended Data Fig. 10)

1. The stimulus is chosen to be ‘one source’ or ‘source separated’.

2. A plume bank of plume pairs obtained from indoor PID recordings is created. Each trial will contain two plumes, each representing one odour recording originating from one source or from sources positioned 50 cm apart. To maintain consistency in trial length between behaviour experiments, a 2-s time window from each plume was selected from the middle of each 5-s recording, such that odour was always present in the first 500 ms of the trial. Trials where the correlation of the 2-s window was vastly different from the original 5 s were excluded from the plume bank. This procedure resulted in a plume bank containing 72 plume pairs for the separated source condition and 48 plume pairs for the one source condition.

3. An odour plume pair is randomly selected from the plume bank, from the corresponding category.

4. The odour that will be used to replicate each plume in a pair and the positions in the odour delivery device that will be used for that purpose are randomly assigned, as described previously. For each odour valve active, a blank valve will also be activated to produce an ‘anti-plume’ structure, to compensate for the changes in flow created by odour delivery.

5. Plumes are recreated from the chosen PID recordings. Each trace is normalized to between 0 and 1, and then converted into a series of binary opening and closing times. The length of the openings and closings relate directly to the value of the normalized signal: a value of one translates to a continuous opening, and a value of zero translates to continuously closed. This series of openings and closings are relayed to the valves and the resulting output resembles the original plume.

III. Perfectly correlated plume trials (probe trials, Fig. 4e)

1. A 2-s window is chosen from the source separated plume bank (plume structures previously associated with opposite reward valence; 5 trials) or from independent plume recordings obtained in a different environment than the original recordings (completely novel plume structures; 10 trials).

2. The chosen plume structure is replicated using both odour channels, resulting in a plume where both odour components fluctuate in a perfectly correlated manner.

IV. Frequency discrimination pulses (Fig. 2c, Extended Data Fig. 3a–d)

1. Two frequencies are chosen for discrimination (for example, 2 Hz versus 20 Hz).

2. For each trial one of the frequencies is chosen for presentation.

3. Valves are selected for presentation of both odours.

4. A guide pulse is created for each odour channel that pulses at the desired trial frequency with 50% duty, such that pulse alternates between channels at the given frequency.

5. Guide pulses are pulse-width-modulated as for correlated and anti-correlated stimuli.

Task structure for the correlation experiment

This is relevant to Fig. 2d–k, Extended Data Figs. 35. Task frequency was randomized from trial to trial in a range between 2 and 81 Hz. The choice of frequency was with weighted probability divided into three frequency bands. For example, this task could be arranged such that 2–20 Hz would be chosen with P = 0.6, 21–40 Hz with P = 0.3 and 41–81 Hz with P = 0.1. Within each of these frequency bands, the choice of individual task frequency was based on a uniform distribution. Thus, few trials were performed for frequencies exceeding 40 Hz, resulting in more ‘noisy’ behavioural performance data in Fig. 2k.

Onset detection

For the onset detection experiments (Extended Data Fig. 5f–i), mice were trained to discriminate perfectly correlated (for example, S+) from perfectly anti-correlated stimuli (for example, S−) and probed with partially altered stimuli where the onset (first cycle) of the probe S+ stimuli was anti-correlated and probe S− stimuli where the onset (first cycle) was correlated. Performance during these probe trials was then compared to the average performance during training (perftrain).

We calculated the expected average mouse performance on the probe trials based on two models (prediction data, Extended Data Fig. 5f, g). Model 1 assumed the mice were taking any part of the stimulus into account equally when making a decision. Model 2 assumed that only the onset of the stimulus would contribute to discrimination. Thus, for Model 1, a stimulus of frequency f (for example, 10 Hz) that was sampled for time tsample consisted of a ‘shifted’ onset component of one cycle for S+ (1/f) and half a cycle for S− (0.5/f) corresponding to a fraction of fraconset = 1/f/tsample of the entire stimulus and a ‘normal’ residual (fracres = 1 – fraconset). Thus, the predicted probe trial performance would be: predicted probe trial perfentire = perftrain × fracres + (1 – perftrain) × fraconset.

In Extended Data Fig. 5i, this prediction was calculated for the following parameters: sniff frequency, 6 Hz; inhalation fraction, 0.2; stimulus sampling time, 0.7 s. In Extended Data Fig. 5g, sampling time was varied as indicated.

For Model 2, ignoring inhalation timing, the prediction would be that preference would be reversed (as onset correlations during probe trials are reversed). However, this ignores the fact that odour stimuli during the exhalation period might not be detected. Thus, to more accurately predict the performance of mice for Model 2, we assume that the part of the stimulus that is detected as the ‘onset’ is the first odour pulse during an inhalation phase. During the probe trial, this will be the ‘inverted’ first cycle if the stimulus begins either during the inhalation phase or at most 1/f before the inhalation (then inhalation would start during the inverted first cycle of the probe trial). The probability of this occurring is perfonset = (durinh + 1/f)/dursniff, with durinh and dursniff being the inhalation and sniff durations, respectively (provided durinh + 1/f < dursniff). Predicted probe trial performance for an ‘onset only’ model would therefore be: predicted probe trial perfonset = perftrain × (1 – perfonset) + (1− perftrain) × perfonset.

Extended Data Figure 5f, g displays the predictions of these two models in comparison to the experimental data for a broad range of respiration patterns. The ‘prediction data’ in Extended Data Fig. 5i show model predictions assuming typical sniff and sampling parameters as indicated above (sniff frequency, 6 Hz; inhalation fraction, 0.2; stimulus sampling time, 0.7 s).

Controls

Control valves could be automatically added to the random frequency task. These tasks produced their stimuli based on a subset of six valves and control valves could be added automatically after a set period of trials to force the algorithm to produce stimuli from all eight valves (Fig. 2g, i, Extended Data Fig. 4i–k).

A subgroup of mice was created in which the valve map was scrambled, as an ongoing control against mice learning extraneous variables in the task (Fig. 2k). The valve map was scrambled in the following way: one blank to odour 1, one odour 2 to blank, one odour 1 to odour 2 and one odour 1 to blank. Every few days all odour bottles were cleaned and replaced, odour positions changed and valves re-assigned43.

Airflow and sound recordings

Airflow and sound were recorded in AutonoMouse during trials at different frequencies to ensure that the temporal structure of the odour was the only parameter that varied over trials and that no tactile or auditory cues were present in the stimulus. A flow sensor (AWM5101VN, Honeywell, USA) and a microphone (NTG1, RØDE) were placed in close proximity to the AutonoMouse odour port. In total, 286 trials were recorded (2 Hz: n = 75 correlated, n = 70 anti-correlated; 40 Hz: n = 69 correlated, n = 72 anti-correlated) using Audacity for sound and Spike2 (Cambridge Electronic Design) for flow signals. Airflow and sound signals underwent spectral analysis (Fourier transform), as well as linear classification analysis (Extended Data Fig. 4d–g).

Training on naturalistic plumes

One group of mice (n = 12) were trained to discriminate between plumes derived from stimuli originating from one source (S−, unrewarded) or from separated sources (S+, rewarded), using 2-s-long stimuli produced as described above from the recordings shown in Fig. 4a. An additional 12 mice trained simultaneously on the reverse reward valence did not pass the performance criterion within the given timeframe and were not carried forward to probe trials.

To test whether correlation structure was a feature used by mice to perform the virtual source separation task, probe trials were introduced randomly at a frequency of approximately 1 in 11 trials, with every instance of a probe trial repeated every 330 trials. Probe trials consisted of perfectly correlated plumes or correlated or uncorrelated square pulses produced as described above, presented at three frequencies: 2 Hz, 20 Hz, 40 Hz. The feedback for probe trials was the same as for a training trial, with a reward or time-out given based on the response of the mouse. No change in performance across repeated presentation of the probe trials was observed, indicating that performance was not due to putative rapid re-learning. Of the 12 mice exposed to this protocol, a total of 9 mice reached all phases of the experiment.

Cohorts

The correlation discrimination experiment was performed in three separate experimental cohorts (Fig. 2, Extended Data Figs. 35: group 1, n = 14; group 2, n = 25 (one mouse did not successfully pass the pre-training); Fig. 4, Extended Data Fig. 10: group 3, n = 24, see above). Each cohort was organized into several subgroups, which performed slight variations of the behavioural tasks in terms of reward valence and valves used, but with the same underlying task aim. Half of the mice in each subgroup were trained on correlated stimuli as the S+ rewarded condition, with the other half trained on anti-correlated stimuli as rewarded. Mice were further subdivided into groups, which were trained on different subsets of valves as standard in the eight-channel olfactometer. For each cohort, mice were once assigned to each of these subgroups based on performance in a simple pure odour discrimination at the beginning of the experiment—group membership was randomized until no significant (ANOVA, Tukey–Kramer) differences in performance could be extracted between these subgroups on this task.

Data analysis

AutonoMouse behavioural data were converted to MATLAB data format using the Conversion module of the Python autonomouse-control package (https://github.com/RoboDoig). All subsequent analysis was performed with custom-written MATLAB scripts unless otherwise specified.

All behavioural performance within a specified trial bin was calculated as a weighted average of S+ versus S− performance:

$${\rm{performance}}=\frac{({\rm{Hit}}/{\rm{S}}+)+({\rm{CR}}/{\rm{S}}-)}{2}$$

in which S+ is the total number of rewarded trials, S− is the total number of unrewarded trials, Hit is the total number of rewarded trials in which a lick response was detected, and CR (correct rejection) is the total number of unrewarded trials in which no lick response was detected.

For random stimulus pulse frequency experiments (for example, Fig. 2j, k), trials were binned approximately by half-octave for performance analysis. The exact intervals were f(Hz) = [2, 3, 4, 5, 6:7, 8:10, 11:13, 14:17, 18:22, 23:29, 30:37, 38:48, 49:62, 63:81]. Reaction time (Extended Data Fig. 5) was calculated from S+ trials for each mouse as the time to the first lick after stimulus onset. For presentation of learning curves (Figs. 2h, 4d) accuracy was calculated over 100-trial sliding windows.

Motion magnification of the respiration camera video recordings (Extended Data Fig. 5, Supplementary Video 2) was performed with phase-based video motion processing with correction for large body movements based on MATLAB scripts44 (phaseAmplifyLargeMotions). Parameters for phase amplification were: blurring σ = 1, magnification a = 50, amplification in frequency band between 2 and 13 Hz. Following magnification, static ROIs for each video were selected in Bonsai45 (http://www.kampff-lab.org/bonsai/) over the mouse flank. An adaptive binary threshold was applied to the ROI to segment the mouse body from the video background. Respiration rate was extracted from the total size of the ROI occupied by the body over time.

Olfactory sensory neuron population model

Overview

We modelled the OSN population as noisy integrate-and-fire neurons integrating a filtered odour pulse and with independent (cell-specific) noise to qualitatively match experimental data46. The square of the resulting mean population firing rate was convolved with a calcium imaging filter to produce a model of the observed calcium imaging signal. All code and related data for the model can be found at https://github.com/stootoon/crick-osn-model-release.

Odour input current

The olfactory input current It to each OSN was modelled as a filtered version of the odour pulse input Ot with filter time constant τC (encompassing, for example, filtering of the nasal cavity as well as olfactory transduction):

$${\tau }_{C}\frac{{\rm{d}}{I}_{t}}{{\rm{d}}t}=-{I}_{t}+{O}_{t}$$

This models filtering by the nasal cavity, transport through the mucous, and chemical transduction from odour concentration to receptor channel opening.

Olfactory sensory neurons

Each OSN was modelled as a noisy integrate-and-fire neuron. Each OSN membrane performs a noisy integration of the olfactory input current It so that the membrane voltage Vt satisfies the following stochastic differential equation: τVdVt = (It – Vt)dt + σdBt. Here, Bt is standard Brownian motion and σ is the standard deviation of the membrane voltage noise. The OSN generates a spike whenever its membrane voltage exceeds a spiking threshold θ:

$${S}_{t}=\left\{\begin{array}{l}\begin{array}{cc}1 & \,{\rm{If}}\,{V}_{t}\ge \theta ;\end{array}\\ \begin{array}{cc}0 & {\rm{otherwise}}.\end{array}\end{array}\right.$$

Upon spiking, the membrane voltage is clamped to a refractory voltage Vref for a period of tref seconds. The mean instantaneous firing rate of a population of N neurons is computed as

$${\bar{S}}_{t}=\frac{1}{N}\mathop{\sum }\limits_{n=1}^{N}{S}_{t}^{n}$$

in which \({S}_{t}^{n}\) is the spiking activity of OSN n.

Calcium imaging signal

To model the calcium imaging signal, the mean firing rate is squared and convolved with the imaging kernel ht to form the calcium imaging signal Ct: \({C}_{t}=({{\bar{S}}_{t}}^{2})\ast {h}_{t}.\) The calcium imaging kernel is an alpha function: \({h}_{t}=t\,{e}^{-t/{\tau }_{h}}.\)

A list of parameters is given in Supplementary Table 1. All parameters were fit manually: parameters τC, τV and σ were set to produce a qualitative match in time courses between model membrane voltage traces and the suction current traces in figure 2 of ref. 46. The remaining parameters were adjusted to produce a qualitative fit between the model and the dynamics of the observed calcium imaging traces.

Generating model glomeruli

Overview

We generated 100 model glomeruli by randomly varying a subset of the model OSN parameters described in the previous section (τV, τC, σ, θ, a). Specifically, we picked the parameters of each glomerulus by selecting uniformly within ± 25% of the centre value of each parameter. All 5,000 OSNs within each glomerulus had the same parameters, and differed only because of the random noise applied to their membrane voltages. The range of variation is shown in Supplementary Table 2.

The effect of concentration was modelled by linear scaling of the input waveforms. For each setting of PPI and concentration, the model was run to simulate 25 consecutive trials of length 2.5 s each, with the odour onset at 0.1 s into each trial. The first five trials of data were discarded to allow the model to ‘settle’, yielding 20 trials for each condition that were used in subsequent analyses (Extended Data Figs. 1g, h, 2j, k).

Classifying glomerular outputs

Predictors

The predictors used for classification were the response integrals for each glomerulus, defined as the instantaneous mean firing rate of the OSNs in the glomerulus, filtered by the Ca2+ imaging filter (see section ‘Olfactory sensory neuron population model’) and summed over the 2 s following odour onset in each trial. As the scale of the responses is arbitrary, we scaled the response integrals by their overall standard deviation, computed over glomeruli and trials.

Labels

Trials were labelled by their PPI, or a combination of PPI and concentration, depending on the task.

Classifiers

The classifiers used were support vector machines with linear kernels and l2 regularization as implemented by the LinearSVC function of the Python scikit-learn library. The setting of the penalty parameter C and whether or not to learn an intercept were determined by cross-validation with scikit-learn’s GridSearchCV. The values of C considered ranged in powers of 10 from 10−4 to 104.

Computing decoding accuracy

The decoding accuracy for a given subset of n glomeruli was computed as the average accuracy over 10 cross-validation trials for the results in Extended Data Fig. 1h, and 40 cross-validation trials for the results in Extended Data Fig. 2j, k. In each cross-validation trial, the classifier was trained on a random 90% of the trials and tested on the remaining 10%, and the accuracy recorded. The random subsets were stratified; that is, constrained to have the same fraction of trials from each class as the full dataset when possible. The mean accuracy across cross-validation trials was recorded as the accuracy for that subset. To compute the shuffled performance, the labels of the training and test trials were shuffled in each cross-validation trial before the classifier accuracy was computed.

Decoding PPI from the responses of model glomeruli

To determine how decoding accuracy was affected by the size of the population used we selected a random subset of n glomeruli and computed the decoding accuracy as described above. This was repeated for 256 random subsets of n glomeruli, generating 256 unshuffled and 256 shuffled accuracies. The subset size n was varied from 1 (using only a single glomerulus) to 100 (using the full population; Extended Data Fig. 1h). For n ≥ 99, some subsets are likely to have been repeated because there are fewer than 256 possible subsets of size 99 and 100. The observed variability in accuracy in those cases is then due mainly to the random determination of training and testing trials.

Decoding PPI and concentration from the responses of model glomeruli

To compute the decoding accuracy when decoding PPI and concentration, we followed a very similar procedure to the previous section, but fixed the population size at the maximum of 100 and varied the stimulus concentration from 0.5 to 5 in steps of 0.5 to cover a factor of 10 range in concentration as used in the experimental data (Extended Data Fig. 2j–m). For comparison, the results in Extended Data Fig. 1h were for a concentration of 1. Decoders were trained to extract just concentration, or PPI and concentration.

In vivo two-photon imaging

Surgical and experimental procedures

Before surgery, all used surfaces and apparatus were sterilized with 1% trigene. Mice were anaesthetized using a mixture of fentanyl, midazolam and medetomidine (0.05 mg/kg, 5 mg/kg and 0.5 mg/kg, respectively). Depth of anaesthesia was monitored throughout the procedure by testing the toe-pinch reflex. The fur over the skull and at the base of the neck was shaved away and the skin cleaned with 1% chlorhexidine scrub. Mice were then placed on a thermoregulator (DC Temperature Controller, FHC) heat pad controlled by a temperature probe inserted rectally. While on the heat pad, the head of the mouse was held in place with a set of ear bars. The scalp was incised and pulled away from the skull with four arterial clamps at each corner of the incision. A custom head-fixation implant was attached to the base of the skull with medical super glue (Vetbond, 3M) such that its most anterior point rested approximately 0.5 mm posterior to the bregma line. Dental cement (Paladur, Heraeus Kulzer; Simplex Rapid Liquid, Associated Dental Products) was then applied around the edges of the implant to ensure firm adhesion to the skull. A craniotomy over the left OB (approximately 2 × 2 mm) was made with a dental drill (Success 40, Osada) and then immersed in artificial cerebrospinal fluid (ACSF: NaCl (125 mM), KCl (5 mM), HEPES (10 mM), pH adjusted to 7.4 with NaOH, MgSO4.7H2O (2 mM), CaCl2.2H2O (2 mM), glucose (10 mM)) before the skull was removed with forceps. The dura was then peeled back using fine forceps. A layer of 2% low-melt agarose diluted in ACSF was applied over the exposed brain surface before a glass window cut from a cover slip (borosilicate glass 1.0 thickness) using a diamond knife (Sigma-Aldrich) was placed over the craniotomy. The edges of the window were then glued with medical super glue (Vetbond, 3M) to the skull.

Following surgery, mice were placed in a custom head-fixation apparatus and transferred to a two-photon microscope rig along with the heat pad. The microscope (Scientifica Multiphoton VivoScope) was coupled with a MaiTai DeepSee laser (Spectra Physics) tuned to 940 nm (<50 mW average power on the sample) for imaging. Images (512 × 512 pixels) were acquired in SciScan (Scientifica) with a resonant scanner at a frame rate of 30 Hz using a 16× 0.8 NA water-immersion objective (Nikon). The output of a four-channel version of the temporal olfactometer described above was adjusted to approximately 1 cm away from the ipsilateral nostril to the imaging window, and a flow sensor was placed next to the contralateral nostril for continuous respiration recording.

Awake recordings

For implantation of the head-plate, mice were anaesthetized with isoflurane in 95% oxygen (5% for induction, 1.5–3% for maintenance). Local (mepivacaine, 0.5% subcutaneously (s.c.)) and general analgesics (carprofen 5 mg/kg s.c.) were applied immediately at the onset of surgery. After surgery, mice were allowed to recover for 7 days with access to wet diet and, after recovery, habituated to the head-fixed situation for at least 15 min on three consecutive days preceding the imaging experiment.

Odour stimulation

For paired-pulse experiments, ethyl butyrate was diluted in mineral oil at a ratio of 1:5 and installed into a four-channel version of the high-speed odour delivery device (15 ml per vial) along with two blank positions (15 ml mineral oil). Odour concentration range was adjusted over 10 steps on a logarithmic scale with a factor of 1.25 by modulating odour pulse-width.

For correlated versus anti-correlated stimulus experiments, stimuli were generated from mixtures of physically mixed monomolecular odorants to ensure a high probability of finding odour-responsive cells in the dorsal OB using custom Python software (PulseBoy). Binary mixtures were diluted in mineral oil at a ratio of 1:5 and installed into a four-channel version of the high-speed odour delivery device (15 ml per vial) along with two blank positions (15 ml mineral oil). Mix 1: ethyl butyrate + 2-hexanone, mix 2: isoamyl acetate + cineole. During glomerular imaging experiments (Extended Data Fig. 6), six odours (A–F) were presented either individually or in pairs: A (ethyl butyrate), B (2-hexanone), C (isoamyl acetate), D (cineol), E (ethyl tiglate) and F ((+)-fenchone). For all stimuli, odour valve offsets were compensated by opening a corresponding blank position valve to ensure no global flow changes occurred over the course of the stimulus. All stimuli were repeated between 16 and 50 times with at least 15 s inter-stimulus interval.

Data analysis

For M/TC imaging, motion correction, segmentation and trace extraction were performed using the Suite2p package47 (https://github.com/MouseLand/suite2p). Putative neuronal somata and dendritic segments were automatically identified by segmentation and curated manually. Soma and neuropil fluorescence traces were extracted and neuropil fluorescence was subtracted from the corresponding soma trace. Further analysis was performed with custom written scripts in MATLAB.

M/TCs were recorded in 17 fields of view (FOV) from 6 individual Tbet-cre: Ai95(RCL-GCaMP6f)-D mice, with 40 ± 9.23 (mean ± s.d.; range 27–48) cells per FOV and 30.25 ± 12.97 (mean ± s.d.; range 7–53) M/TC dendrites,

For glomerular imaging experiments, ROIs corresponding to glomeruli were manually delineated based on the mean fluorescence image. Fluorescence signal from all pixels within each ROI was averaged and extracted as time series. ΔF/F = (F − F0)/F0, in which F is raw fluorescence and F0 was the median of the fluorescence signal distribution.

Glomerular signals from a total of 15 individual OMP-cre: Ai95(RCL-GCaMP6f)-D mice were recorded with 28 ± 4.34 (mean ± s.d.; range 20–36) glomeruli per mouse (Extended Data Fig. 6a).

Given the nature of these population imaging experiments, sample size was not pre-determined and the investigators were not blinded to study conditions. Odour stimulus sequence was pseudo-randomized within experiments.

Where the odour stimulus was not inhalation-triggered, traces were post hoc aligned to the first inhalation after odour onset. Calcium response integrals were calculated for a range of window durations starting from odour onset (100–5,000 ms). To analyse how well odour responses predicted stimulus correlation on a trial-to-trial basis, we generated a linear discriminant classifier from the dataset and analysed prediction accuracy. For the classifier, we performed 50% holdout validation, splitting the data randomly into a training set and a test set with equal numbers of samples. We then performed linear discriminant analysis on the training dataset to determine the best linear boundary between 10 versus 25 ms pulse interval stimulations or correlated versus anti-correlated data. Classifier performance was then validated on the test dataset. To determine the effect of the number of ROIs used on classifier performance, we iteratively trained multiple classifiers on random subsets of ROIs with increasing numbers of ROIs within each set. For each ROI subset size, 100 classifiers were trained and the mean ± s.d. of their performance accuracy was calculated. All classifier analysis was performed on individual, unaveraged trials.

Glomerular imaging classifiers

The classifiers used in Extended Data Fig. 6k, l were trained separately for each odour pair, each frequency, and each time window. The inputs for classification were the averaged responses of the 145 glomeruli in a given time window for 24 odour presentation trials, where the odours were fluctuating in a correlated manner in half of the trials, and in an anti-correlated manner in the remaining half. Within the correlated and anti-correlated subsets of trials, half had the first odour in the pair phase-shifted by 180° and the remaining half had no phase shift. The classification task was to determine whether the glomerular responses in a given trial were evoked by correlated or anti-correlated odour fluctuations.

Because we had far fewer trials (24) than glomeruli (145) it was important to use regularized classifiers to avoid overfitting. To promote interpretability of the decision boundaries learned by the classifiers, we opted for sparsity-promoting regularizers and settled on the Lasso, evaluated as a classifier by taking the sign of its output computed after the addition of a small amount of noise (to decide ambiguous classifications). The implementation of the Lasso we used was LassoLarsCV provided by the Python scikit-learn library because it converged readily, gave very good classification performance, and automatically tuned the weighting of the sparsity penalty. Inputs to the classifier were standardized to have mean zero and unit variance across trials. We found that it was important to learn the classification weights without intercept to avoid overfitting.

The performance of a classifier was determined by cross-validation, where in each cross-validation iteration, the classifier was trained on a random approximately 90% of the trials (21 trials) and tested on the remaining approximately 10% (3 trials), and the test accuracy recorded. The random subsets were selected in a stratified manner, meaning that the fractions of correlated and anti-correlated trials in the subset were kept as close as possible to their fractions in the full dataset (50/50). This meant that 10 of the 21 training trials were of one type and 11 of the other. This procedure was performed for ten cross-validation iterations, and the average performance over these repeats was recorded as the performance of the classifier. The shuffled performance was computed the same way but with training and test labels shuffled in each iteration. The entire procedure was then repeated for each of 100 different random seeds to produce a distribution of classification accuracies, the means and standard deviations of which are plotted in Extended Data Fig. 6k, l.

Because we used a sparsity-promoting classifier, it was straightforward to determine which glomeruli were contributing to a particular classification decision. We found that if we used all 145 glomeruli available then frequently glomeruli would be selected for noisy fluctuations of their responses that were by chance ‘informative’ for the classification. To avoid the inclusion of such noisy responses, we filtered glomeruli for responsivity. To determine the responsivity of a glomerulus, the mean \({\bar{X}}_{{\rm{glom}},{\rm{baseline}}}\) and standard deviation \({\sigma }_{{\rm{glom}},{\rm{baseline}}}\,\)of its responses pooled across all baseline bins (defined as the 3 s before odour onset) and across all trials for the given odour pair and frequency were first computed. A Z-score was then computed for its averaged response for the given time bin and for each trial by comparing this response to the baseline activity according to

$${Z}_{{\rm{glom}},{\rm{trial}}}=\frac{{X}_{{\rm{glom}},{\rm{trial}}}-{\bar{X}}_{{\rm{glom}},{\rm{baseline}}}}{{\sigma }_{{\rm{glom}},{\rm{baseline}}}/\sqrt{{n}_{{\rm{wnd}}}}},$$

in which Xglom,trial is the response of the glomerulus in the given time window and nwnd is the number of time bins constituting the window. The scaling of the baseline standard deviation is to account for the reduction in variance due to the averaging over time bins used to compute the response. A glomerulus was considered responsive in a given trial if the absolute value of its Z-score as computed above was greater than 1 on three-quarters or more of the trials. Such a thresholding ensured that the number of responsive glomeruli was almost always zero before odour onset, but rose to a peak of approximately 125 of the 145 glomeruli available when 2-s windows were used. Reducing the window size reduced the peak number of glomeruli, but at least 25 glomeruli were used during the peak responsive period in all cases, and frequently many more. This filtering also meant that some time windows late in the response contained no responsive glomeruli for some window sizes, which explains the ‘patchiness’ observed in Extended Data Fig. 6k, l.

Extracellular recordings

Surgical and experimental procedures

We anaesthetized 5–8-week-old C57BL/6Jax mice using a mixture of ketamine and xylazine (100 mg/kg and 10 mg/kg, respectively) by intraperitoneal (i.p.) injection. An i.p. line was inserted after the initial injection to allow easier and more regular subsequent injections of anaesthetics. Surgery was carried out as described above for two-photon imaging, up until the application of agar and cranial window.

Following surgery, the mice and custom platform were transferred to the extracellular recording set up. A flow sensor (A3100, Honeywell) was placed in front of the contralateral nostril while an output from the temporal olfactometer was positioned in front of the ipsilateral nostril. An Ag/Ag+Cl reference coil was immersed in the well, over the left hemisphere of the skull. The reference wire was connected to both the reference and ground of the amplifier board (RHD2132, intan), which was connected (Omnetics) to a head-stage adaptor (A32-OM32, NeuroNexus). A 32-channel probe (A32-Poly3, NeuroNexus) was connected to the adaptor, and the tip of the probe was manoeuvred to be positioned 1–2 cm above the craniotomy. The adaptor and probe were held above the craniotomy using a micromanipulator (PatchStar, Scientifica) set at 90° to the surface of the brain. The probe was moved towards the surface of the OB, while being observed through a surgical microscope. Once the probe was in contact with the surface, but had not entered the brain, the manipulator’s Z position was set to zero. The signal from the probe was streamed through OpenEphys acquisition board and software (OpenEphys). The probe was inserted at <4 μm/s until the number and amplitudes of spikes began to decrease on deeper channels, indicating that the tip of the probe was exiting the MC layer. This was found to be between 400 and 600 μm from the surface of the OB. From here, the probe was left for 10 min for neural activity to stabilize before recording began.

Odour stimulation

Odours were presented using an eight-channel version of the high-speed odour delivery device, four of which contained odours (A: ethyl butyrate, B: 2-hexanone, C: isoamyl acetate, D: eucalyptol) and four contained blank (mineral oil) which were used to compensate for flow changes. Trials paired either A and B or C and D together. Stimuli were repeated 64 times and had an 8-s inter-trial interval. The onset of odour was recorded using TTL pulses passed through additional channels in the OpenEphys acquisition board. Trial starts were triggered on inhalation as detected by the flowmeter.

Data analysis

Spikes were sorted using Kilosort248 (github.com/MouseLand/Kilosort2) and classified as ‘good’ when they displayed a strong refractory period visible in their auto-correlogram, a typical waveform and a stable firing rate, as ‘MUA’ (multi-unit activity) if they presented a typical waveform but a weak refractory period, or as ‘noise’ if they were suspected of being electrical or mechanical interference. For a first-pass analysis, units were classified as ‘differentially responding’ to correlated and anti-correlated stimuli if units were found to have significantly (P < 0.01, Mann–Whitney U test) different spike time distributions during the 4 s after odour onset. However, the cut-off for such distinction will always be somewhat arbitrary. For the majority of the analysis, we therefore pooled all good units across experiments in a pseudo-population. All classifiers used for unit recording analysis were support vector machines (SVMs) with linear kernels with a low regularization parameter, which translates to greater freedom for a classifier to vary weights for any given component. Data were split into training and test sets before classification. Test sets consisted of either 26 trials (summed spike classifiers for correlated versus anti-correlated) or 2 trials (PCA classifiers and short odour pulse combinations). Data passed to the summed spike classifiers were pre-processed in one of two ways before classification.

First, a rolling sum of detected spikes within variable window sizes was used. The window sizes varied from 10 ms to 2,000 ms. In addition to window size, window starts were also varied. Each window size was trialled with every possible window start from zero to four seconds minus the window size from odour onset, with 10-ms incremental changes. For example, a 500-ms window was tested with starts varying from 0 to 3,500 ms after odour onset.

Second, the coefficients of principal components (PCs) for units in each trial were used for classification. The PCs were found by applying principal component analysis (PCA) across all units and all training trials. Each PC represented a time series and hence the coefficients signify the strength at which that time series was followed by a given unit for a given trial. The two holdout trials were not used to find the PCs but were then projected onto them and their coefficients used as the test for the classifiers. All classifiers were repeated 1,000 times with a random selection of holdout trials each time.

Finally, for the short odour pulse classification, classifiers were trained on summed spikes in windows of 500 ms after odour onset. Each classifier was trained on all but two hold-out trials. To account for a varying number of trials between mice, training data were bootstrapped to 1,000 trials of each type. Each trial was randomly selected from the initial pool of training trials, and each unit was bootstrapped independently. These classifiers were tested on the initial two hold-out trials. This was repeated 1,000 times with different bootstrapped datasets and different hold-out trials.

Training data for all classifiers were scaled such that each feature (unit spike count/PC coefficient) had a mean value of zero and a standard deviation of one using the following equation: z = (x – u)/s, in which x is the initial value of the feature, u is the mean, s is the standard deviation, and z is the scaled value. Means and standard deviations were calculated using the training data so no information from the testing data could influence the scaling. The testing data were scaled using the same values as for the training. Scaling was applied during every repeat in this manner.

Whole-cell patch-clamp recordings

Experimental procedures

Whole-cell recordings were performed as previously described38,49. Borosilicate pipettes (2 × 1.5 mm) were pulled and filled with (in mM) KMeSO3 (130), HEPES (10), KCl (7), ATP-Na2 (2), ATP-Mg (2), GTP-Nax (0.5), EGTA (0.05) (pH = 7.3, osmolarity about 290 mOsm/kg). The OB surface was submerged with ACSF containing (in mM) NaCl (135), KCl (5.4), HEPES (5), MgCl2 (1), CaCl2 (1.8) (pH = 7.4 and about 300 mOsm/kg). Signals were amplified and low-pass filtered at 10 kHz using an Axoclamp 2B amplifier (Molecular Devices) and digitized at 40 kHz using a Micro 1401 analogue-to-digital converter (Cambridge Electronic Design).

After zeroing the pipette tip position at the OB surface, the tip was advanced to reach a depth of about 200 μm from the surface. Whole-cell patch-clamp recordings were obtained as described50. Series resistance was compensated and monitored continuously during recording. Neurons showing series resistance >25 MΩ were discarded from further analysis. To estimate the input resistance, a −50 pA current step was delivered at the start and end of each recording.

The vertical depth of recorded neurons was calculated as the vertical distance from the brain surface. Respiration was recorded using a mass flow sensor (A3100, Honeywell) and digitized at 10 kHz. Odours were prepared and delivered as described above and triggered to the beginning of inhalation.

Data analysis

Change in membrane potential. Recordings were spike-clipped using a custom script written in Spike2 (Cambridge Electronic Design) and analysed in MATLAB (Mathworks). All recordings were baseline subtracted as previously described51. The average change in membrane potential was defined as the difference between the average membrane potential over a 2 s period before odour onset and the average membrane potential in the first 500 ms (about 2 sniffs) after odour onset.

Change in spike frequency. Action potentials were counted from raw traces, converted into spike frequency in 50-ms bins and plotted as PSTHs. The net change in spike frequency was defined as the difference in the average spike frequency between 2 s before onset and 500 ms after onset.

Arithmetic sum. Baseline-subtracted traces obtained from independent component odour (A and B) presentations were either summed and averaged in an in-phase manner to generate the arithmetic sum equivalent of the correlated response or phase-shifted to generate the equivalent of the anti-correlated response.

Arithmetic sum (correlated) = (VmodourA + VmodourB)/2

Arithmetic sum (anticorrelated) = (VmodourA + shifted VmodourB + shifted VmodourA + VmodourB)/4

Dual-energy fast photoionization detection (defPID)

Two PIDs (200B miniPID, Aurora Scientific; Supplementary Fig. 2) fitted with UV lamps of emission energy 10.6 eV (PID high) and 8.4 eV (PID low) were used to discriminate ethyl butyrate (EB, ionization energy = 9.9 eV) from α-terpinene (AT, ionization energy = 7.6 eV) or ethyl valerate (EV, ionization energy = 10.0 eV) from tripropyl amine (TA, ionization energy = 7.2 eV). To accommodate the lower-voltage UV lamp, resonance circuitry in the PID headstage electronics was adjusted according to the manufacturer’s recommendations. Specifically, potentiometer ‘PT1’ was adjusted up to the point where the 8.4 eV lamp began to glow. Further, we tested whether the now converted PID low was now sensitive to only AT and TA while not detecting EB and EV. The PID inlets were connected with a three-way connector to detect incoming odours by both PIDs simultaneously from a common point. PID heads were held on lab stands with the PID inlet at approximately 4 cm above ground level.

Odour delivery

Odours were held in ceramic crucibles (5 cm diameter, 6 ml volume) covered in an air-tight fashion using glass lids. Odours were released for 5 s with an inter-trial interval of 15 s by Arduino-based robots programmed to lift the lids from the crucibles using a servo motor (TowerPro SG-5010, Adafruit). Lid lifting events were triggered by the Arduino board, recorded in Spike2 and defined as the onset of odour for analysis. Both the Arduino board and Spike2 were controlled by a portable computer and used the same clock for synchronization. Experiments were carried out in a large open space, both indoors and outdoors (Supplementary Fig. 2f, g).

Outdoors, PIDs and the odour delivery system as described above were used to record for multiple trials in different conditions on a day with low wind (about 8–12 mph ≈ 3–5 m/s, recorded with a two-axis ultrasonic wind sensor (Gill Instruments)). Outdoor experiments were performed on a ~6 m × 10 m wooden patio structure surrounded by trees. Measurement of odour correlations in the outdoor setting were complicated by the presence of background odours: if background odours are detectable by both PIDs, measured correlation will be artificially inflated; if they can be ionized only by the PIDhigh, they will artificially decrease the measured correlation.

Indoors, a digitally controlled fan (2214F/2TDH0, ebm-papst) was placed at a distance of 325 cm facing the PID inlet. An exhaust line was situated behind the PID inlet to ensure the flow of air from the fan towards the PID inlet. During a recording, the fan was set to maximum speed such that it pushed approximately 550 cf/min (cubic feet per minute, about 260 l/s) of air towards the PID inlet. A 25 × 25 × 25-cm Thermocool box was placed 200 cm downwind of the fan to act as an obstacle to air movement, promoting complex air movement patterns at the PID inlet. The pump at each PID was set to about 0.02 l/s suction speed, which is unlikely to perturb overall airflow dynamics substantially.

Recording conditions

We placed 6 ml of the desired odour(s) in two crucibles and placed them in different locations based on the experimental conditions as described below.

1. Low energy only: the ‘low-energy odour’ (AT or TA) was placed 40 cm (radial distance d) away from the PID inlet, and displaced either 25 cm left or 25 cm right of the midline (the line between the PID inlet and the centre of the fan). The odour source was alternated between left and right positioning relative to the midline to remove any possible bias from positioning in the air stream. The purpose of this recording condition was to generate data to calculate the linear transformation from the low energy signal to the high energy signal (Supplementary Fig. 2c, d).

2. Mix: 3 ml EB + 3 ml AT (or 3 ml EV + 3 ml TA) was pipetted into one crucible and placed either 25 cm left or 25 cm right of the midline at radial distances of 20 cm, 40 cm and 60 cm. The purpose of this recording condition was to determine how the temporal structure of individual odours in a plume behaved when the odours were emitted from the same source.

3. Separate: 3 ml EB and 3 ml AT (or 3 ml EV and 3 ml TA) were individually pipetted into two different crucibles and placed at a radial distance of 40 cm from the PID inlet. For the s = 50 cm apart condition, one odour source was placed 25 cm left of the midline while the other was 25 cm on the right of the midline and vice-versa (equal number of trials for both cases), separating the odour sources by 50 cm. This procedure was repeated for lateral distances of s = 30 cm and s = 10 cm. The ‘50 cm apart’ case was repeated for radial distances of d = 20 cm and d = 60 cm. The purpose of this recording condition was to determine how the temporal structure of individual odours in a plume behaved when the odours were emitted from separated sources but were still free to mix in air.

Data analysis

For the decomposition procedure, we recorded the low energy odour (AT) using both PIDs as described above. Assuming a linear relation between the recorded signals from the two PIDs, we plotted the recorded events with a linear regression fit (Supplementary Fig. 2c) and calculated slope and R2 value of the fit. The scaling factor (6.82 ± 0.356, mean ± s.d.) was calculated as the average slope of all linear fits for R2 ≥ 0.9.

The ‘PID low’ traces were multiplied by this scaling factor, which was termed ‘estimated low energy odour’ (Supplementary Fig. 2e). The ‘estimated high energy odour’ was calculated by subtracting the estimated low energy odour from the ‘PID high’ traces.

For correlation calculation, custom-written scripts in MATLAB (Mathworks) were used to calculate the correlation coefficient between the estimated low energy odour and the estimated high energy odour for all conditions. Box plots were obtained from these values using Igor Pro 6 (WaveMetrics, USA).

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this paper.