Behind the Paper

How the brain adapts its 2D compass for a 3D world

The brain’s neural compass seems 2D, detecting only left and right head-turns. However, if the head is tilted in 3D, its rotation around the vertical axis also covertly changes its horizontal facing direction. We find that the compass neurons can detect these covert changes and thus avoid errors.

Animals navigating in a three-dimensional (3D) world (Fig. 1a) keep track of direction using a neural compass called the head direction (HD) system. This compass  has seemed, in past experiments, to be two-dimensional (2D), detecting only left-right head-turns around the head’s vertical axis. However,  this should not work well in natural 3D environments, with hills and valleys etc., as a purely 2D compass would acquire errors. This is because if the head is tilted, rotating it around the gravity axis (as opposed to its own axis) also covertly changes its horizontal pointing direction (Fig. 1b).

The HD system could correct these errors if it does in fact detect these rotations and add them to its signal (Fig. 2). This transformation is called the dual-axis rule, and in the present study (Ref. 3) we looked for evidence of its operation.

The neural compass is formed by HD neurons, each of which activates strongly (“fires”) when the head faces in the cell’s "preferred firing direction" (PFD). The cells use environmental landmarks to anchor their PFDs to the outside world. The cell in Fig. 3 has a PFD anchored to a direction we have arbitrarily labeled "East" (to make the point that these are world-referenced directions, although in reality not determined by magnetic cues).

We can depict the activity of a HD neuron by means of a tuning curve - a plot of firing rate vs. head direction. Fig. 3b and c show the same tuning curve expressed in world coordinates or internal coordinates. 

If HD cells use a dual-axis updating rule, then we should see two things (Fig. 4). First, the PFDs of a given cell should everywhere be approximately parallel, thus correcting for errors even in 3D. Second, they shouldn’t be completely parallel: there should be a systematic distortion, varying with the direction of tilt of the animal’s head.

To find evidence for this distortion, we recorded HD cells in rats exploring the upper surface of a sphere. However, the exploring rats tended not to face in all directions at each location on the surface, especially on the steep sides of the sphere. This meant that we could not use the traditional method of plotting tuning curves to determine where the cell’s PFD is. We decided instead to try a different approach. We capitalized on the fact that we could make an educated guess as to where the PFDs ought to be if the dual-axis rule is indeed operating. We could make such a guess because we had measured the global PFD, and had a mathematical description of the dual-axis rule, which could adjust the values to get the local estimates. We could then look to see whether the cells' firing rates were more consistent with these internal, dual-axis-corrected PFDs than with the globally measured ones. For this comparison it wouldn’t be necessary to have data for every direction at every location: any firing at all would still be at least somewhat informative. 

We tried this, and to our delight it worked beautifully. Tuning curves when re-plotted in the local reference frames, taking the dual-axis rule into account, became consistently sharper – taller and narrower (Fig. 5), indicating that the dual-axis rule better explained the firing rate of the recorded neurons. This was true for almost every cell, across both of the brain areas we recorded from.

We were pleased that this had worked, but we added one further analysis. There are two possible variants of the dual-axis rule: one based on  how the animal turns its head around the head's own axis, as described above, and an alternative based on how the head turns in the plane of the tilted “floor.” These might diverge if, for example, the animal rears its head. Either is plausible, because other neurons in the brain’s spatial mapping system do use the local environment as their reference frame. We thus compared the two reference frames. Both adjustments improved tuning curve sharpness, but the head reference frame was better. Thus, the compass is anchored to the head and not the environment.

Two conclusions emerge from these findings. First, our reverse-logic approach, using what is known as a "generative model" (a mathematical prediction about what the data should look like according to a given hypothesis)  offers an effective alternative to computing multiple tuning curves, when directional sampling is incomplete but a strong prediction exists.  Second, and more importantly: the neural compass is not completely flat. Instead, it is what engineers call tilt-compensated – flat, but dynamically adjusted by the tilt of the head. This is, in fact, what our smartphone compasses do (try it). A flat compass is efficient for the brain, and the tilt compensation makes it effective for navigation. It is a clever evolutionary hack.

Two questions then follow. First: how does information about rotations around the second (gravity) axis find its way through the brain to the HD cells? And second, what happens if the head turns upside down? If you try this with a smartphone compass, you will see that the answer promises to be interesting.

References

1. Squirrel photo from https://commons.wikimedia.org/wiki/File:Squirrel_climbing_a_tree_%2817087101358%29.jpg

2. Mouse model by walidemad, https://cults3d.com/en/3d-model/game/real-mouse, licensed under a CultsPU public use license.

3. Williams, M., Street, J.S., Burgess, N. et al. Head direction cells use a head-referenced dual-axis updating rule in 3D space. Commun Biol (2026). https://doi.org/10.1038/s42003-026-10086-2