Introduction

Successfully navigating through the world is one of life’s most important tasks. Many species, from worms to flies to rodents to humans, can use olfaction to guide spatial navigation1. Furthermore, studies in a variety of species suggest a possible role for stereo olfaction—the differential sampling of odor concentrations between the two nostrils—in enhancing olfactory search2,3,4,5,6,7.

Previous work in rodents has shown that inhibiting stereo olfaction can impair finding an odor source and following an odor trail3,6. However, to find an odor source, an animal simply needs to calculate the odor concentration as either going up or down across successive sniffs. Similarly, to follow an odor trail, an animal only needs to minimize the drop in odor concentration between successive sniffs. For these types of tasks there is no requirement to form a spatial representation of the entire environment or leverage allocentric strategies8. Thus, it remains unknown whether stereo olfaction can enable animals to form allocentric spatial representations and whether stereo olfaction impacts tuning of spatially modulated neurons in the brain’s spatial navigation system.

To study whether stereo olfaction is used by rodents to form allocentric spatial representations, we need an experimental paradigm where we can record from neurons carrying allocentric spatial information about the environment, and where the tuning of these cells relies on olfactory cues. Previously, recording from HD cells in the anterior dorsal nucleus of the thalamus (ADn), we found that while sighted animals relied predominantly on visual cues to stabilize the tuning of their HD cells, blind mice relied on olfactory cues originating from the floor of the open field arena to tune their HD system9. Thus, HD cell recordings from blind mice represent an ideal model system to study the impact of olfaction on the brain’s spatial navigation systems.

Here, we recorded from HD cells in ADn of blind mice before and after manipulations that inhibited stereo olfaction. Next, to assess the impact of stereo olfaction on a mouse’s awareness of its head direction within an environment, we developed a head direction preference behavioral test and examined the effect of inhibiting stereo olfaction on task performance.

Results

Blocking olfaction in a single nostril impairs head direction tuning

We recorded from HD cells in ADn of blind mice (Fig. 1a, Supplementary Fig. 1a; see Methods) and tested the effect of impairing stereo olfaction on HD cell tuning properties. Mice were placed in a circular open field arena for 10 minute-long sessions. Experiments were performed in GNAT1/2 mutant mice. These mice are on a C57Bl/6 background and are severely congenitally visually impaired9. Previously, we found that GNAT1/2 mutant mice use odors originating from the floor of the open field arena to stabilize the tuning of their HD cells9. Here, in control sessions in the open field arena, we found that HD cell tuning in GNAT1/2 mutant mice stabilized within the first minute after they were placed on a new clean floor, before they deposited pee and/or poo, indicating that they were using odor sources innately originating from the floor to stabilize HD tuning, and not self-deposited odors (Supplementary Fig. 2).

Fig. 1: Unilateral nostril block impairs head direction tuning.
figure 1

a Schematic of the probe implanted into ADn. b Example of 6 simultaneously recorded HD cells from a control blind mouse (left) and following unilateral nostril block (right). Polar plots represent firing rate as a function of head direction. Drawing of the mouse adapted from SciDraw (https://scidraw.io/drawing/157). cf Comparison of various metrics for control (blue) and unilateral block mice (red). Control, n = 62 HD cells from 11 mice; Unilateral block, n = 51 HD cells from 7 mice. Mann Whitney U Test (two-sided). g left, Head direction (grey) and spikes (blue) of an example HD cell from a control blind mouse. g right, Heat map of spiking on the left, in 10 × 60 s bins. h Same as (g), but for an HD cell following unilateral block (red). i Example tuning curves of two simultaneously recorded HD cells following unilateral block, either calculated over the entire 10 min session (left) or over shorter timescales (right) with each epoch computed upon successive 360° head turns. j top, Isomap ring manifolds. Each dot represents the population activity of simultaneously recorded HD cells color coded by the actual head direction at each time point, for a control blind (left) and a unilateral block mouse (right). j bottom, For the corresponding manifolds, the number of 1-D holes (Betti 1) are shown, for actual (colored, *) and shuffled (grey) data. k Example Isomap decoded head direction and actual head direction for a control (top) vs. unilateral block (bottom) session. l Decoding error in control (n = 7 sessions from 7 mice), unilateral block (n = 7 sessions from 6 mice) and bilateral block (double nostril OSN ablation) mice (n = 10 sessions from 7 mice; data for bilateral block mice come from a previously obtained dataset9). Mann Whitney U Test (two-sided) with Bonferroni correction for multiple comparisons, **P < 0.01, ***P < 0.001. Box plots represent the first to third quartile range of the data, with a black horizontal line at the median. The whiskers extend from the box to the farthest data point lying within 1.5 times the interquartile range from the box. The brain atlas image in (a) was adapted from The Mouse Brain in Stereotaxic Coordinates, 3rd Edition, Franklin, K. B. & Paxinos, G, Figure 36, Copyright Elsevier (2007). Source data are provided as a Source Data file.

To inhibit stereo olfaction, we used tissue glue to completely seal a single nostril. To quantify the impact of unilateral block, we used an HD cell classification method that does not rely on head direction tuning curves but instead on spiking auto-correlograms9,10. We found that unilateral nostril block significantly impaired HD cell coding in ADn (Fig. 1c–f), regardless of which nostril was blocked (Supplementary Fig. 3; the electrode was always implanted in the left hemisphere). Furthermore, the impact of blocking a single nostril on HD cell tuning appeared to arise specifically from the impairment to stereo olfaction, and not due to alterations in locomotion or balance, as these were unaffected by unilateral nostril block (Supplementary Fig. 4). Also, note that for a given mouse, the floor was not cleaned in between control and unilateral block sessions to ensure that the odor landscape was stable across exposures.

Consistent with our finding that inhibiting stereo olfaction impaired HD cell tuning, we found that whereas HD cells in control animals reliably fired at the same head direction over the length of a 10-minute-long recording session, HD cells in unilateral block animals responded to various head directions over a single recording session (Fig. 1g, h). This arose because though HD cells remained strongly tuned when tuning curves were measured over short intervals (i.e. each time the mouse made a full 360° head rotation; on average every 30.8 ± 9.3 s), preferred firing directions drifted continuously throughout the recording session (Fig. 1i), as we previously observed upon removing all olfaction following bilateral olfactory sensory neuron (OSN) ablation9. Along these lines, we found that after unilateral block, the one-dimensional ring manifold representing the HD cell population response9,11 remained intact, but became uncoupled from the animal’s actual head direction (Fig. 1j), due to drift in HD cell tuning alignment to the external environment. Furthermore, unilateral block significantly impaired decoding performance, to a similar extent as bilateral block with double nostril OSN ablation (Fig. 1k, l). Together, these results suggest that in blind mice, stereo olfaction is critical for stabilizing the preferred firing direction of HD cells.

Merging the airflow into both nostrils impairs head direction tuning

As removing half of a mouse’s olfactory sensation by blocking a single nostril could impair downstream sensory processing, we took inspiration from previous studies in humans2 and blind moles4, and developed an alternate method to block stereo olfaction in mice while allowing olfactory processing to persist in both nostrils. Specifically, we implanted a small tube that extended straight out of each nostril (Fig. 2a; ‘Tube control’). We then moved the open ends of the tubes together along the horizontal midline (between the two nostrils) to remove the spatial difference—1.6 ± 0.1 mm (n = 6 mice), center-to-center distance between the two nostrils—in the odor signal provided to each nostril (Fig. 2a; ‘Tube merge’). In the control condition with tubes inserted, HD tuning remained robust (Fig. 2a), though HD tuning was slightly but significantly impaired compared to blind controls without tubes (Supplementary Fig. 5a; suggesting that the natural directionality of airflow into the nostrils could affect the efficacy of stereo olfaction for guiding HD tuning, or else that gluing the tubes in place impairs small nostril movements which slightly impairs stereo olfaction). Nonetheless, while HD tuning remained stable and robust following tube insertion, merging the tubes along the horizontal midline completely inhibited HD cell tuning (Fig. 2a). Merging the tubes led to a decrease in HD cell coding (Fig. 2b–d), similar to what was found for single nostril block (Supplementary Fig. 5b). Thus, stereo olfaction is required for blind mice to use olfactory cues to stabilize tuning of their HD system.

Fig. 2: Merging airflow into both nostrils impairs HD tuning.
figure 2

a left, Schematic outlining the experimental protocol, in which for control (top), tubes were put into each of the nostrils, and for merge (bottom), the open ends of the tubes were aligned between the nostrils. a right, Example of simultaneously recorded HD cells before (top) and after the tube merge (bottom). be Comparison of various metrics for control (n = 52 HD cells from 7 mice) and merge (n = 56 HD cells from 6 mice). Box plots represent the first to third quartile range of the data, with a black horizontal line at the median. The whiskers extend from the box to the farthest data point lying within 1.5 times the interquartile range from the box. Mann Whitney U Test (two-sided). **P < 0.01, ***P < 0.001. Source data are provided as a Source Data file.

Inhibiting stereo olfaction impairs performance in a head direction preference test

Does blocking stereo olfaction and destabilizing the mouse’s HD system affect a mouse’s awareness of its head direction within an environment? While some previous studies have examined the relationship between HD cells and spatial navigation, these studies mostly focused on HD cells’ impact on path integration12,13,14. In contrast, here we designed a behavioral paradigm to explicitly test an animal’s allocentric knowledge of its head direction, by assessing a mouse’s ability to learn to point its head in a specific direction, regardless of its position in an environment, to get a reward. Building on a study that used medial forebrain bundle (MFB) stimulation to teach mice the reward location in a place preference task15, here we adapted MFB stimulation to establish a closed-loop head direction preference task (Fig. 3a, b). After implanting the electrode (Supplementary Fig. 1b) and calibrating the intensity of the electrical stimulation, a mouse was placed on a raised circular platform (30 cm diameter, without walls) and its head direction was tracked in real-time (see Methods). Following habituation, mice were trained to pause rotations of their head at an experimentalist-selected reward angle for ≥ 500 ms to receive an MFB stimulation reward. Briefly, for training, a rewarded head direction angle was randomly selected, and the mouse was put on the platform for 90 s long trials. At the start of each trial, the mouse was introduced to the platform at random positions and facing random directions. The mouse was provided with 300 ms MFB stimulation upon entering the reward zone (i.e. the reward angle ± 15°). During a trial, after receiving a reward, the mouse had to leave the reward zone before it could return to receive another reward. During the training phase, the wait time in the reward zone needed to trigger a reward was increased from 100 ms to 500 ms. Mice had to obtain 25 rewards at one stage to move on to the next. Training was performed once a day, on two successive days, with the reward zone changed between days. 10 min after completing the training on the second day, mice proceeded to the testing phase (same reward zone as second day training), which included 10 x 90 s long rewarded trials, randomly interleaved with 10 x 90 s long probe (unrewarded) trials. Note that, for a given mouse on a given day, the floor was not cleaned through training and testing trials, to ensure a stable odor landscape. Training and testing phases were then repeated the following day (the third day), following unilateral nostril block, with a new reward angle and with the floor being cleaned before the start of the third day.

Fig. 3: Inhibiting stereo olfaction impairs awareness of head direction.
figure 3

a Schematic of electrode placement for MFB stimulation. b Schematic of the closed-loop HD preference test. c Trajectories (Path; grey) of an example control mouse from 10 rewarded trials, with locations of reward delivery (green circles). Mouse drawing adapted from SciDraw (https://scidraw.io/drawing/183). d Explained variance from a binomial GLM using different predictors: HD + Position, HD only and Position only. Mann Whitney U Test with Bonferroni correction for multiple comparisons (n = 6 mice), **P < 0.01. e During training phase, for various wait times (time in the reward zone before receiving a reward), the length of time it took for control (blue; n = 7 mice) and unilateral block (red; n = 7 mice) mice to receive 25 rewards. Repeated measures one-way ANOVA: F4,60  = 21.3, P  < 10-9, followed by pairwise two-sided multiple comparisons with Bonferroni correction, *P < 0.05. f Average number of rewards received per reward trial for control and unilateral block (n = 7 mice each). Wilcoxin Signed-Rank Test (two-sided), *P < 0.05. g left, Time to first reward or pseudo-reward across all trials from control and unilateral block mice. g right, same as (g), left, but comparing reward and probe trials (control and unilateral pooled together; n = 14 mice total). Mann Whitney U Test (two-sided), *P < 0.05. h Average pause number and pause length outside the reward zone during reward trials for control and unilateral block (n = 7 mice each). Two-sided Wilcoxon Signed-Rank Test, *P < 0.05. i Example probe trial for a control mouse (top) and a unilateral block mouse (bottom) showing HD in relation to the reward zone. j Normalized HD occupancy during probe trials for control (blue; n = 7 mice) and unilateral block (red; n = 7 mice) relative to the reward angle (grey). Statistical comparison below, computed using Mann Whitney U Test (two-sided) with Bonferroni correction for multiple comparisons (alpha (α) = 0.05). k The average angular head velocity (AHV) for control (blue; n = 7 mice) and unilateral block (red; n = 7 mice) relative to the reward angle (grey). Statistical comparison below, computed using Mann Whitney U Test (two-sided) with Bonferroni correction for multiple comparisons. l Same as (h), except for probe trials. dh, jl Plotted as mean ± S.E.M. The brain atlas image in (a) was adapted from The Mouse Brain in Stereotaxic Coordinates, 3rd Edition, Franklin, K. B. & Paxinos, G, Figure 39, Copyright Elsevier (2007). Source data are provided as a Source Data file.

First, we examined whether mice in this test were actually learning to pause their head in the reward direction (i.e. was this truly an HD preference test?). We observed that mice were receiving rewards at various positions on the raised platform (Fig. 3c; Supplementary Fig. 6). Next, to confirm that the task relied on head direction preference rather than place preference, we used a Generalized Linear Model and found that using head direction as a predictor significantly outperformed a model using spatial location in explaining the variance in reward attainment (Fig. 3d; Supplementary Fig. 6).

Having established a head direction preference test, we next examined how inhibiting stereo olfaction impacted performance during the training phase. In the training phase, we found that control blind mice quickly progressed from wait times of 100 ms through wait times of 500 ms (Fig. 3e, blue graphs; here we analyzed day 2 training session that took place immediately before the testing session). In contrast, unilateral block mice took significantly longer to complete training, with the impairment being restricted to trials with longer wait times (Fig. 3e). Importantly, we did not expect a difference between control and unilateral block mice for short wait times, as mice moved with an average angular head velocity of 69.8 ± 7.4°/s during the first 90 s of baseline exploration. At this speed, they should still receive rewards, particularly for short wait times, even without purposefully pausing in the reward zone. These results show that though unilateral block blind mice can eventually pass the training phase of the HD preference task, their performance is significantly impaired compared to control blind mice.

Next, we examined how inhibiting stereo olfaction impacted performance in the testing phase during reward trials. We found that unilateral block mice received half as many rewards as control mice (Fig. 3f). We wondered, considering that unilateral block leads to completely unstable HD cell tuning, how unilateral block mice were still able to receive some rewards in the HD preference test. We found that it took unilateral block mice significantly longer to get their first reward/pseudo-reward in each trial (Fig. 3g; a pseudo-reward was counted each time a mouse exhibited pausing behavior in the reward zone during a probe trial that would have triggered a reward in a reward trial), that unilateral block mice spent more time pausing rotations of their head (the behavior needed to receive a reward) outside of the reward zone (Fig. 3h), and that unilateral block mice paused rotations of their head outside of the reward zone for much longer lengths of time (Fig. 3h). Taken together, these results suggest that in reward trials, unilateral block mice use a brute-force random hunting strategy to find the reward zone the first time, but then use idiothetic signals to get subsequent rewards by swinging their head in and out of the reward zone.

If unilateral mice are in fact using a non-olfactory, idiothetic strategy to get rewards in the HD preference test, then the performance of unilateral block mice should collapse in probe trials, when the reward angle is not reinforced with an MFB stimulation reward. Indeed, we found that whereas control blind mice reliably found the reward zone in probe trials, showing high occupancy in the reward zone and low occupancy outside the reward zone (Fig. 3i, j), unilateral block mice were unable to find the reward zone in probe trials, showing similar occupancy across different angular bins (Fig. 3i, j). This was despite the fact that, upon starting a trial, it took mice the same amount of time to receive their first reward (in reward trials) and their first pseudo-reward (in probe trials; Fig. 3g; Supplementary Fig. 8). We further reasoned that if mice could identify the angular location of the reward zone in probe trials, they should modulate their angular head velocity (AHV) as a function of angular distance from the reward zone, slowing their AHV as they approached the reward zone. Indeed, we found this behavior in control blind mice, but found it to be absent in unilateral block mice (Fig. 3k; though this behavior was present in unilateral block mice in reward trials (Supplementary Fig. 7), consistent with unilateral block mice using idiothetic strategies to get subsequent rewards after receiving an initial reward). Lastly, we reasoned that if unilateral block mice were employing a random hunting strategy to find the reward zone for their first reward per trial in reward trials, in probe trials they should exhibit more pauses than control mice outside the reward zone. Indeed, we found that unilateral block mice frequently paused rotations of their head for extended periods of time outside of the reward zone in probe trials (Fig. 3l). Thus, in reward trials, unilateral block mice use a random hunt strategy to get the first reward, whereas control blind mice use stereo olfaction to guide awareness of their HD, allowing control mice to get the first reward much more quickly than unilateral block mice. However, after getting an initial reward, unilateral mice use an idiothetic strategy (e.g. swinging their head back and forth, in and out of the reward zone), to get subsequent rewards. But, such an idiothetic strategy fails in probe trials when the location of the reward zone is not reinforced.

Next, as a control to ensure that the difference in testing performance between control and unilateral block mice was not arising solely because unilateral block mice had impaired learning (Fig. 3e), for a subset of mice, immediately after they completed training and testing phases in control conditions, we performed unilateral block and repeated the testing phase with the same reward angle. As such, these mice had intact stereo olfaction during learning, then were tested again the same day with stereo olfaction inhibited, with the reward angle unchanged and without cleaning the floor. In these animals, single nostril block also significantly impaired awareness of head direction (Supplementary Figs. 9 and 10).

Lastly, as we found that inhibiting stereo olfaction impaired HD cell tuning to a similar extent as blocking all olfactory processing (Fig. 1l), we compared performance in the HD preference task between unilateral nostril block and bilateral OSN ablation mice, who had no olfactory processing. We found that unilateral block mice were similarly impaired in the HD preference task compared to bilateral OSN ablation mice (Supplementary Fig. 11), indicating that mice are indeed using olfaction to solve the HD preference task and that intact stereo olfaction is specifically required by blind mice to successfully perform the HD preference task.

Discussion

Here, we combined recordings from head direction cells in ADn, single and double nostril manipulations, and an MFB stimulation-based HD preference task to make two central findings. First, stereo olfaction is critical in blind mice for tuning of the HD system. Second, stereo olfaction is required for mice to use smell to gain behavioral awareness of their HD.

Previous work in rodents has shown a role for stereo olfaction in locating a single odor source or following an odor trail3,6, though those tasks do not require formation of an allocentric spatial representation8. In contrast, our results shows that stereo olfaction can guide allocentric spatial awareness. Next, while previous studies have shown that animals can use a mix of stereo olfaction and serial sniffing strategies to locate odors3,4,6, our results indicate that to gain allocentric spatial awareness of HD, stereo olfaction is the critical component. Additionally, though it has been shown that over relatively short time periods mice can use path integration, without the need for environmental landmarks, to find a food source16, in the absence of stereo olfaction we found that blind mice are unable to stabilize tuning of their allocentric HD system. In our HD preference test, in unrewarded probe trials, unilateral block mice were unable to locate the reward zone. In contrast, in reward trials, unilateral block mice used a random hunting strategy to test various reward angles, and once they found the reward zone, they were able to use idiothetic strategies to get additional rewards.

The location in the brain, and the nature of the circuit computation underlying stereo olfactory based signals that stabilize HD tuning and inform spatial awareness remain unknown. Neurons have been reported in the anterior olfactory nucleus (AON) that are excited when a specific odor is presented to one nostril, but inhibited when the same odor is presented to the other nostril17. Furthermore, inhibiting the AON impairs a rodent’s ability to orientate its nose towards the nostril that a novel odor was delivered to18. However, whether the AON generates the stereo olfactory signal used by the HD system remains to be tested. Finally, it has been shown that visual, vibrissal and auditory stimulation can directly modulate the firing rate of HD cells19,20, but future work is required to test if olfactory stimuli also directly modulate HD cell firing rates, and if so whether delivering odors to a single nostril versus both nostrils differentially modulates HD cell firing.

Do sighted mice also use stereo olfaction to stabilize HD cell tuning? In a previous study, we found that olfaction modulated HD cell tuning in sighted mice placed in the dark, though HD cell tuning curves were broader for sighted animals in the dark than for blind animals9, indicating more refined olfactory-based HD tuning in blind mice. However, whether olfactory-modulated control of HD tuning in sighted mice also relies on stereo olfaction remains to be tested, but we believe it is highly likely since the blind mice used in this study are on the same background strain, and thus the differences we described between blind and sighted mice likely arise exclusively from their different sensory experiences. Nonetheless, future work will be required to test whether, given appropriate practice—for instance by housing sighted mice in dark environments for extended periods of time—sighted mice will improve their ability to use olfaction to stabilize head direction tuning, and whether such an ability would rely on stereo olfaction.

Lastly, aside from providing a model system in which to study the role of olfaction in guiding spatial awareness, blind mice also represent a model system for examining the importance of olfactory processing following vision loss. Previously, it has been found that blind mice have enhanced olfactory capabilities compared to sighted animals9,21. Similarly, studies in humans suggest that olfactory perception can be enhanced following vision loss22,23,24. Along these lines, it has been found that visually impaired humans rank the smell of everyday odors as much more important than do sighted individuals25, they show enhanced odor localization abilities26, and they appear to attend to odor cues while navigating in their day-to-day lives27. Thus, the results from this study show for the first time that stereo olfaction can guide the formation of a stable spatial representation in a vertebrate species, while also informing our understanding of how olfactory processing becomes increasingly important following vision loss.

Methods

Animals

The mouse model of vision loss was Gnat1/2mut mice9 (Gnat2cpfl3 Gnat1irdr/Boc mice; The Jackson Laboratory #033163). The Gnat1/2mut mouse model exhibits mutations in both Gnat1 and Gnat2 genes, resulting in a dysfunctional G-protein transducin in both rod and cone photoreceptors, rendering the mice significantly congenitally visually impaired. All mice were adults (2–4 months old). Mice of both sexes were included. Mice were maintained on a standard 12 hr light/dark cycle, in ventilated and humidity-controlled racks, at standard room temperature. All experiments took place in the light phase. All procedures were performed in accordance with the Canadian Council on Animal Care and approved by the Montreal Neurological Institute’s Animal Care Committee.

Surgery

Mice were anesthetized with a cocktail containing fentanyl (0.05 mg/kg), medetomidine (0.5 mg/kg) and midazolam (5 mg/kg)9. For anterodorsal thalamus (ADn) implantation, a craniotomy was performed above ADn, followed by insertion of a conductive wire into the cerebellum (reference and ground wire) and a probe lowered towards ADn. For most experiments, we used a 4-shank silicon probe (Neuronexus Inc., Ann Arbor, MI; Buz32, 200 µm inter-shank spacing). In some experiments, we used an 8-shank probe (Neuronexus Inc., Ann Arbor, MI; Buz64, 250 µm inter-shank spacing) to increase the likelihood of reaching ADn. Both probes had 8 recording sites per shank. During implantation, the following stereotaxic coordinates were used: antero-posterior (AP) −4.2 mm from the inferior cerebral vein; medio-lateral (ML) −0.75 mm from the sagittal sinus; dorso-ventral (DV) −2.2 mm from skull. The base of a movable drive holding the silicon probe was then fastened to the skull using dental acrylic cement and a light-curing adhesive (Kerr OpitBond Universal Unidose).

For the medial forebrain bundle (MFB) electrode implantation, after craniotomy, a bipolar electrode (Plastics One: MS303T/2) was lowered into the MFB using the following stereotaxic coordinates: antero-posterior (AP) −1.2 mm from bregma; medio-lateral (ML) −1.2 mm from the sagittal sinus; dorso-ventral (DV) −4.85 mm from the skull. The base of the electrode was subsequently cemented to the skull using dental acrylic cement.

Nostril tube installation

Mice were anesthetized with isoflurane and a small-bore tube (BAH211950034, Sigma Aldrich: inner diameter of 0.86 mm and wall thickness of 0.3 mm) was carefully inserted into each nostril, protruding ~2.5 mm from each nostril. The tubes were secured in place with tissue adhesive (Vetbond, 3 M). For “Tube merge” sessions, mice were anesthetized with isoflurane, and the previously implanted nasal tubes were carefully repositioned such that their open ends were glued together along the horizontal midline (i.e. in between the two nostrils). Tube insertion/merge experiments were conducted 2-4 hours after the procedure.

Electrophysiological recordings

After recovery from surgery (5-7 days), screening for HD cells was performed by inspecting the auto-correlograms of recorded units during sleep epochs9. Probes were lowered in steps of <200 µm until HD units were detected. Experiments were conducted in a black open field cylindrical arena (60 cm in diameter) with a single white visual cue placed on the wall above the animal’s reach9. Open-field recordings lasted 10 minutes per session, unless otherwise stated. The neurophysiological signals were acquired at 20 kHz using an Intan RHD2000 Recording System (16-bit, analog plexin). The raw neuronal signal was high-pass filtered and processed with an automated spike sorting algorithm to extract single units (Kilosort2) as previously described in ref. 9. Isolated units were manually curated in Klusters28 based on auto-correlograms and spike waveforms.

Position tracking

For head direction cell recordings, the position of the mouse was tracked using an infrared-based camera recording system equipped with 8 cameras recording at 120 FPS (Optitrack Flex 13). A minimum of 3 reflective markers (6.4 mm Optitrack M3 Markers) were attached to the animal’s head-stage for tracking. Motive motion capture software (Optitrack) was used to extract both the direction and position of the head relative to the environment in 3 dimensions. Aside from being used to calculate HD, this information was used for movement analyses in Supplementary Fig. 4.

For the closed-loop medial forebrain bundle experiments, head direction tracking was performed using a Logitech camera (Jelly Comb W06 Webcam Pro) integrated into Bonsai29 (Version 2.8.1) for real time position tracking at 30 FPS. Two contrasting markers (red and green) were affixed to the base of the electrode connector (for MFB stimulation). In Bonsai, a Python transform node was configured to compute head direction in real-time based on the relative positions of the red and green markers.

Bilateral olfactory sensory neuron (OSN) ablation

For certain experiments, we performed bilateral OSN ablation, which we have previously shown is effective in blocking odor processing, and destabilizing HD cell tuning in blind mice9. Briefly, mice were anesthetized with isoflurane, and a blunted 33-gauge needle was used to rinse each nasal cavity with 20 µl of 10% ZnSO4 in sterile H2O, while the mouse was held upside down. After rinsing the nasal cavity with the solution, mice were inverted to drain the excess fluid from the nasal cavity.

Unilateral nasal block with glue

Under anesthesia, tissue adhesive (Vetbond, 3 M) was applied to the exterior of the target nostril and gently pressed until the adhesive dried the nostril shut. After the glue dried, we verified nostril blockage by placing a drop of saline solution on the sealed nostril. If the blockage procedure was successful, the saline drop did not pass through the sealed nasal opening. For head direction cell recordings, experiments were carried out on these animals following a minimum of 24hrs after the procedure. For experiments outlined in Supplementary Figs. 9 and 10, experiments were performed the same day as the procedure.

Identification of HD cells

In our previous work9, we demonstrated that removing both vision and olfaction leads to HD cells whose preferred firing directions continuously drift over time. This makes it problematic to characterize these drifting cells as HD cells, since HD cells are classically defined based on having stable tuning preferences, resulting in asymmetric circular tuning which can be measured as deviations from a purely circular distribution of spiking across 360°.

The use of spike auto-correlograms is advantageous because it leverages the intrinsic temporal structure of spiking within the head direction network, which remains stable even without visual and olfactory inputs9. This stability is well documented even during NREM sleep, for example, when the ‘internal’ direction drifts rapidly, HD cells exhibit temporal correlations and consistent spiking auto-correlograms similar to those observed during wakefulness and REM sleep10.

Along these lines, head direction (HD) cells were identified using a pre-trained XGBoost classifier model9 that distinguishes thalamic HD cells from other anterior thalamic cells based on their unique auto-correlation structure9,10. For the current dataset, auto-correlograms were generated for each recorded unit using 2 ms bins and a 400 ms window. To account for potential variability, auto-correlograms were constructed for both the first and second halves of each recording session. Due to the symmetry of auto-correlograms, only the positive lag halves were concatenated and used as input for the pre-trained classifier to identify HD cells.

Isomap projection and decoding

Isomap analysis was implemented as previously described in refs. 9,10. First, spike counts were binned (200 ms) and square-root transformed to normalize for variance in spike rates. The normalized rates from all simultaneously recorded units in ADn served as inputs to the Isomap algorithm30, implemented in Python31. The low dimensional ring manifolds depicted in Fig. 1j were generated with 50 nearest neighbors. The color code of the population vector on the manifold was subsequently mapped onto the corresponding actual head direction (HD) for each time bin. For decoding, head direction data was first downsampled to 200 ms bins to match the Isomap projection. The low-dimensional projection was then aligned with the actual head direction by calculating the element-wise arctangent of the ring manifold point cloud. An angular offset correction was then applied by optimizing the alignment of the first 300 points in the Isomap projection and actual head direction data. Both time series were subsequently smoothed using a Gaussian kernel with a standard deviation of 2. Following this, the decoding error was quantified by taking the absolute mean angular difference between the two curves. The angular difference between the actual and Isomap decoded HD was computed as follows:

$${{Ang}}_{{diff}}=\arctan 2\left(\sin \left({{HD}}_{{actual}}-{{HD}}_{{iso}}\right),\cos \left({{HD}}_{{actual}}-{{HD}}_{{iso}}\right)\right)$$
(1)

where, HDactual and HDiso refers to the actual and Isomap decoded HD respectively.

MFB stimulation

Unilateral MFB stimulation was delivered via a Pulse Pal (V2, Sanworks). The stimulation protocol consisted of a 300 ms train of biphasic, gated pulses with a 2 ms pulse width at 50Hz32.

MFB stimulation voltage calibration

To determine the lowest effective MFB stimulation level, a voltage calibration procedure was conducted following post-surgical recovery (5–7days). An individual mouse was placed in a square chamber equipped with a water spout (which in the home cage would normally be connected to the water bottle). During 60 s long trials, mice received closed-loop MFB stimulation contingent upon interaction with the spout (which was tracked in real-time via an overhead camera, and Bonsai software was used to trigger a reward when the mouse touched the spout), with a 500 ms inter-stimulation interval. Mice quickly learned to interact with the spout to receive MFB rewards. Starting at 4 V, the stimulation voltage was systematically decreased in 0.5 V increments. For each mouse, the lowest voltage that elicited at least 80% of the maximum spout interaction times was determined. This animal-specific threshold voltage was then used for that mouse in all subsequent medial forebrain bundle (MFB) experiments.

Head direction preference task

The head direction preference task was designed to assess real-time allocentric spatial awareness in mice using a closed-loop system. Bonsai29 software was used to integrate an overhead camera for head direction tracking with the Pulse Pal stimulation system. This configuration allowed for the closed-loop delivery of electrical stimulation whenever the mouse remained within a predefined target head direction zone for a specified duration, contingent upon the mouse’s real-time head direction.

Habituation

Two to three hours post-voltage calibration, a mouse was placed on an elevated, 30 cm diameter circular raised platform, for a 30 min habituation period without MFB stimulation. This allowed the mice to freely explore the testing apparatus and acclimate to the environment.

Training

The training phase took place over two consecutive days. On each day, a mouse was trained to pause rotation of its head direction within a randomly assigned 30° reward zone (reward angle ± 15°) within the raised platform to receive MFB stimulation, regardless of the spatial location the mouse occupied. The angle of the reward zone was changed across days. The required wait time was gradually increased in 100 ms increments, starting at 100 ms and extending to 500 ms. For each wait time increment, mice needed to trigger 25 MFB stimulations in less than 10 minutes before progressing to the next increment.

Testing

Within 10 minutes of passing the second day of training, mice were tested with a series of probe and reward trials (with the same angle of the reward zone as on the second day of training). We tested performance in 20 x 90 s long trials, consisting of 10 randomly interleaved reward (MFB stimulation ON) and 10 unrewarded probe (MFB stimulation OFF) trials, with an inter-trial interval of 30 s. In rewarded trials, mice could receive unlimited rewards, but after receiving a reward they had to leave the reward zone to be able to trigger another reward. To encourage reliance on an allocentric strategy, each trial commenced from a pseudo-randomly chosen entry point with the mouse facing a random direction on the raised platform.

GLM analysis

To investigate whether reward acquisition in the behavioral assay was primarily driven by head direction rather than spatial location, we employed a Generalized Linear Model (GLM) framework with a binomial family. This choice was motivated by the binary nature of our outcome variable: reward trigger (ON or OFF). For each mouse, data from all reward trials were concatenated, and similarly, data from all probe trials were concatenated but grouped separately from reward trials. Prior to modeling, head direction data was linearized by decomposing it into sine and cosine components to account for its circular nature. Next, four design matrices were constructed to facilitate GLM analysis:

  1. 1.

    Full Model: This incorporated both spatial position (x, y coordinates) and the linearized head direction components (sine and cosine of head direction) as predictors.

  2. 2.

    Position-Only Model: This included only the spatial position coordinates as predictors.

  3. 3.

    HD-Only Model: This included only the linearized head direction components as predictors.

  4. 4.

    Null Model: This model included only an intercept term, serving as a baseline for comparison.

Using these design matrices, we fit a binomial GLM with a logit link function to the data for each mouse, assessing the contribution of both place and head direction in predicting reward triggers. To compare the explanatory power of each model, we calculated McFadden’s Pseudo-R-squared, a metric that assesses how well each model accounts for the variance in the binary outcome relative to the null model. This metric is defined as:

$${Pseudo}\,{R}^{2}=1 - ({{LL}}_{{model}}/{{LL}}_{{null}})$$
(2)

where LL represents the log-likelihood of the respective model. All GLM analyses were performed using the statsmodels library in Python.

Analysis of head direction cells

Head direction cell analyses were performed as earlier described in ref. 9. Mean firing rate: The temporal average of spike counts. Peak firing rate: The normalized maximum spike count in a second. Mean vector length: The circular spread of spikes, with 0 and 1 representing strong uniform and non-uniform circular spread respectively. Tuning width: The full width at half maximum of a cell’s tuning curve. Mutual information: An estimate of the directional information relating the firing rate of a cell to a given head direction. The formula33 is given as follows:

$$I=\sum {P}_{j}\frac{{\lambda }_{j}}{\lambda }{\log }_{2}\left(\frac{{\lambda }_{j}}{\lambda }\right)$$
(3)

where, I refers to the information content in bits/spike, Pj is the probability of occupying bin j, λj is the mean firing rate in bin j, and λ is the in-session mean firing rate of the cell. Preferred firing direction (PFD): The PFD was defined as the angular bin with the highest normalized spike count.

Statistical analyses

The statistical test used for every specific comparison is directly stated in the text or figure legend.

Graphics

Figures 1b, 2a, 3b, and Supplementary Fig. 4c were adapted from drawings from SciDraw (https://scidraw.io/), which are freely available under Creative Commons 4.0 license (CC-BY). The brain atlas drawings in Figs. 1a and 3a were adapted from Franklin and Paxinos (2008)34.

Reporting summary

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