Abstract
The hippocampal cognitive map supports navigation towards, or away from, salient locations in familiar environments1. Although much is known about how the hippocampus encodes location in world-centred coordinates, how it supports flexible navigation is less well understood. We recorded CA1 place cells while rats navigated to a goal on the honeycomb maze2. The maze tests navigation via direct and indirect paths to the goal and allows the directionality of place cells to be assessed at each choice point. Place fields showed strong directional polarization characterized by vector fields that converged to sinks distributed throughout the environment. The distribution of these ‘convergence sinks’ (ConSinks) was centred near the goal location and the population vector field converged on the goal, providing a strong navigational signal. Changing the goal location led to movement of ConSinks and vector fields towards the new goal. The honeycomb maze allows independent assessment of spatial representation and spatial action in place cell activity and shows how the latter relates to the former. The results suggest that the hippocampus creates a vector-based model to support flexible navigation, allowing animals to select optimal paths to destinations from any location in the environment.
Subject terms: Spatial memory, Hippocampus
A vector-based model for flexible navigation in the hippocampus allows animals to optimally navigate to any location in their environment.
Main
Lesions of the hippocampal formation reduce an animal’s ability to navigate to remembered locations, such as the escape platform in the Morris watermaze3. One strong candidate for underpinning navigation are the CA1 place cells that provide information about the animal’s current location4. In open-field foraging tasks lacking a specific goal, place cells provide a non-directional measure of current position5,6 (but see refs. 7,8). When a goal is introduced, place cells become directional9 and their fields move in the direction of the goal when it is moved10,11. Previous work has shown that cells in the hippocampal formation encode heading towards a goal and other locations in bats12, mice7, primates13 and humans14. An important caveat in such studies is that the animal usually moves towards the goal whenever possible, precluding full assessment of the neuronal activity in non-goalward directions.
By contrast, on the honeycomb maze2, the animal approaches the goal by a succession of binary choices between intermediate platforms, choosing the most efficient path towards the goal even when direct paths are not available (Fig. 1a,b and Extended Data Fig. 1). Notably, on each platform, the animal scans around the platform perimeter, sampling the full range of possible headings (Fig. 1c,d, Extended Data Figs. 2 and 3, and Supplementary Video 1), permitting a veridical assessment of cell firing directionality.
Place cells are organized by ConSinks
We recorded 456 CA1 place cells (defined as having significant spatial information15 and coherence16; Extended Data Fig. 4) from five rats (rat 1, 88 cells; rat 2, 94 cells; rat 3, 80 cells; rat 4, 105 cells; rat 5, 89 cells) that had successfully learned the task. Of these place cells, 142 (31.1%; n = 21 in rat 1, 27 in rat 2, 29 in rat 3, 30 in rat 4 and 35 in rat 5) displayed firing patterns that were well described by vector fields converging on a location that, following vector field notation, we term a convergence sink, or ConSink (Fig. 1c–g); that is to say, these cells were tuned to the animal’s egocentric heading relative to these sinks (Extended Data Fig. 5). Often, the optimal bearing to the ConSink was located in front of the animal (Fig. 1d–f), but in many instances could be to the side or behind (for example, see Fig. 1g). While ConSinks were scattered around the environment both on and off the maze, they were densest around the goal in four of the five animals (Fig. 1h and Extended Data Fig. 6a) and moved closer to the goal in the second half of the session (Extended Data Fig. 7); this clustering was not due to the positions of the place fields (Extended Data Fig. 6d–h). The population vector fields (calculated by summing platform-associated heading vectors across cells) for each animal converged to a population ConSink close to the goal (Fig. 1i and Extended Data Fig. 6b), and the average preferred directions of ConSink place cells towards their sinks were in front of the animal, −6.20°, not significantly different from 0° (Fig. 1j). ConSink tuning was stronger in every ConSink cell than allocentric head direction tuning, and removing either putative allocentric head direction candidates or cells with ConSinks beyond the maze perimeter where ConSink cells might be expected to appear most allocentric did not substantially alter the results (Extended Data Figs. 8–10).
ConSinks point to the goal
If ConSink directional firing supports navigation to goal locations, sinks should move towards new goals after their introduction. We tested this by running the same animals in a goal shift experiment on a subsequent day (360 CA1 place cells: rat 1, 93 cells; rat 2, 96 cells; rat 3, 92cells; rat 4, 79 cells): 13 trials with a familiar goal (for rats 1, 3 and 4, the same goal as in Fig. 1; for rat 2, a new goal learned before session 2; Methods) were followed, after some intermediary training, by another 13 trials to a new goal. Four of the five animals learned the new goal location within a single session (Supplementary Fig. 1), and 33% (109/331) of place cells during the original and 23% (81/347) of place cells during the shifted goal navigations had significant ConSink tuning (Supplementary Fig. 2). Before the goal shift, ConSinks were organized around the original goal, but after the switch they became organized around the new goal (Fig. 2a–d and Supplementary Fig. 3). While this reorganization primarily involved the substitution of new ConSinks for old, 28 cells with ConSinks during goal 1 continued to have ConSinks after the switch to goal 2 and the majority of these (64%) moved in the direction of the new goal (Fig. 2e,f and Supplementary Fig. 3c). Similarly, the vector fields and their associated population ConSinks moved from the original goal locations to the new goals (Fig. 2g–i and Supplementary Fig. 4). Rat 5 required multiple days to learn the new goal, and we were therefore unable to compare ConSink tuning across the two goals within a single session. Nevertheless, once goal 2 was learned (Supplementary Fig. 1f), we found that rat 5’s ConSinks (Supplementary Fig. 3f; 32 of 82 place cells had significant ConSink tuning) and vector field (Supplementary Fig. 4e) were organized around the newly learned goal, as in the other animals.
Dividing the post-switch trials into two halves showed that ConSinks increased their proximity to the new goal with continued training (Supplementary Fig. 5), similar to the movement observed during continued training to the original goal on the first day of recording (Extended Data Fig. 7). Thus, the distribution of ConSinks becomes more concentrated towards the goal as the animal repeatedly navigates to it, whether the goal is familiar or newly learned. On the other hand, while the place field centres of ConSink cells clustered around the original goal10,17,18 (Supplementary Fig. 6a–c), they did not reorganize around the new goal, only shifting slightly in its direction. No such shift was seen in the place fields of non-ConSink cells (Supplementary Fig. 6d). We observed some remapping after the goal switch, but significantly less than that observed between the navigation task and open-field foraging (see below and Supplementary Fig. 6e,f). In the honeycomb task, reorganization of place fields appears to be a slower process than that of ConSinks, perhaps reflecting different underlying processes.
ConSinks could support navigation
We wondered how the ConSink representation might support navigation on the honeycomb maze. Because the population vector fields showed that firing is maximal when the animal is oriented towards the goal (Fig. 1i), during unconstrained navigation the animal could simply follow the average population vector to the goal (direction G; Fig. 3a, thick red arrow). However, ConSink cells have place fields, suggesting that they not only encode relative direction (Fig. 3b), but might also encode some combination of distance and allocentric direction to the sink (Fig. 3c–e). Encoding these additional variables could support calculation of the sink positions in addition to their relative direction from the animal and allow calculation of the distance and direction vector to the goal. To test this, we used a previously published method (linear–nonlinear Poisson nested models, abbreviated LN), which, from a pool of variables of interest, identifies those that significantly improve spike prediction from a fixed mean rate model19. We found significant encoding of various combinations of relative direction, distance and allocentric direction to the sink in 123 of the 142 ConSink cells (Fig. 3f–j and Supplementary Figs. 7 and 8a,b), with 81 of the total (57%) encoding a combination of variables sufficient for the calculation of sink positions (that is, distance and at least one of relative or allocentric direction). The lack of significance for any variables in the remaining cells (19 of 142) could be attributed to lower firing rates (Supplementary Fig. 8c). The wide distributions of each variable (Supplementary Fig. 8d–f) indicate that the ConSink population has the information necessary to calculate the goal direction vector from any location. However, simply following the goal direction vector is not adequate when the animal is offered choices neither of which point directly to the goal. In such a case, the animal must identify the path whose heading is most similar to the goal direction by constructing and comparing the neural equivalents of the vector amplitudes in each available direction (Fig. 3a, narrow red arrows). Although we have represented the mean allocentric direction of population spiking in the vector fields (Fig. 1i), the underlying data can also be represented as a set of vectors whose lengths represent the population firing rates in the corresponding directions relative to the goal and whose average points towards the goal. We wondered whether this vector set provided enough information to allow the animal to choose between any pair of platforms as required in the navigation task. In general, the lengths of the vectors in the different directions decreased as an inverse function of the absolute angle from the average ConSink direction, forming a fantail configuration (Fig. 3k,l). Choosing the direction with the largest population vector or its equivalent, the highest population firing rate, is the correct solution to the navigation problem.
Fewer ConSinks during foraging
Place cell firing is omnidirectional during random foraging in an open field with walls6 (although see refs. 7,20), but polarized or unidirectional in linear environments9,21, in virtual reality20 and in open fields after goals are introduced22. We recorded the same CA1 pyramidal cells from the single-goal honeycomb task in an open-field foraging task during the same session (all platforms in the raised position). Thirteen percent of place cells (51/394) displayed significant tuning to ConSinks in the foraging task, significantly fewer than during the navigation task (Supplementary Fig. 9a–e). Only 13 cells had significant ConSinks in both tasks, and the shift in their sink locations, as well as preferred mean relative directions, across tasks indicated a complete reorganization of the hippocampal representation (Supplementary Fig. 9f–h). Unlike during navigation, the distribution of sinks was not denser around the navigation task goal location than expected by chance (Supplementary Fig. 9i and Extended Data Fig. 6a). The existence of multiple random food sources in the foraging task is probably responsible for the remapping, although we cannot rule out the possibility that the difference might be due to the difference in the structures of the two maze configurations.
Separating representation from action
Because raising of the next choice platforms is delayed after each choice, the honeycomb maze presents an opportunity to observe the animal’s spatial representation before it chooses its next trajectory or knows what choices will be offered. We examined two time periods: wait period 1, which started after the animal’s choice (Fig. 1b) but before the next choice platforms had started to rise (duration of 4 s), and wait period 2, which was the 4-s window leading up to the animal’s next choice (defined as the moment when the animal’s torso moves onto the chosen platform). During the wait periods, the rat systematically scans the environment (Fig. 4a,b), providing an opportunity to sample the different branches of the fantail. We found that, before correct choices, the animal’s behaviour on average displayed an even sampling of all directions relative to the goal, but before error choices the distribution of behavioural orientations was skewed away from the goal (Supplementary Fig. 10). The firing rates of ConSink cells were significantly higher in correct choices both in the goal direction (Fig. 4c,d) and in the preferred directions relative to the individual ConSinks (Figs. 1 and 4e). The corresponding fantails were appropriately peaked towards the goal before correct choices during both periods but incorrectly rotated away from goal before incorrect ones. Thus, it appears that the fantail distributions relative to the goal predict subsequent behavioural choice even before any knowledge of upcoming choices.
Discussion
During navigation on the honeycomb maze, the firing patterns of a subset of CA1 hippocampal place cells are organized as vector fields oriented around a set of featureless environmental locations called ConSinks. While the total population of CA1 pyramidal place cells provides information about the animal’s current location, the subpopulation of ConSink place cells contains all the information necessary for successful, flexible navigation in a familiar environment: allocentric information about the animal’s location in the environment (place coding), both allocentric and egocentric information about distance, location and heading to the ConSinks, and, at a population level, fantails describing the relative goalward value of different directions from any given location. While the ConSinks are distributed throughout the environment, they are concentrated around and centred near the goal, providing clear evidence for an effect of learning on ConSink location. This is further supported by the appearance of new sinks, and the disappearance or rearrangement of existing sinks, around a new goal after a goal switch, as well as the continued movement of the sinks towards the goal during continued performance of the task within a single day. Finally, we find that firing towards the goal or the individual sinks is reduced and the fantail pattern is altered on error trials. Thus, ConSink cells exhibit properties that could support navigation to the goal.
We suggest how the hippocampus could solve the honeycomb task using ConSink cells. When the direct route to the goal is available, because the ConSinks are densest around the goal and, on average, the ConSink cells fire when their associated sinks are directly in front of the animal, the population firing rate is highest when the animal is oriented towards the goal. Thus, the average vector field points towards the goal and signals its distance. When the direct route to the goal is not available, the population rate falls monotonically with deviation from the direct goal heading, and the animal simply needs to move in the direction of highest firing rate afforded by the choices available, essentially comparing the lengths of the available branches of the fantail.
On erroneous choices, even before the new choice platforms rise, firing rates are reduced and the fantails deviate from the canonical form. The prechoice behaviour on these trials is also disrupted, with the animal spending more time looking away from the goal than towards it as though its attention had been attracted elsewhere. These behaviours both recall vicarious trial-and-error behaviour23,24, recently explored in the context of predictive place cell firing at the choice point25. The honeycomb maze reveals the two-dimensional nature of the prechoice ‘subjunctive’ representation.
Cells similar to ConSink cells have been reported in mouse open-field foraging7 and in humans performing a multiple object-in-location virtual reality test14. In the present experiment, these cells represented only 13% of cells during a foraging task, fewer than half of the 31% seen during the navigation task, and, further, were not clustered around the concurrent navigation task goal. While previous studies have reported the orientation of hippocampal formation cell firing relative to goals12, objects26, the centre of the environment26,27 (although egocentric coding to environmental boundaries can appear as coding to the centre28) or random points scattered around the environment7, the current work identifies a set of featureless locations dotted around the environment but organized around the goal, which they move closer to as learning proceeds. It must be left to future studies to determine how these ConSinks are created and manipulated, to elucidate the properties of the underlying reinforcement mechanism and to determine whether ConSink cells represent a distinct cell type or whether ConSink tuning is simply a property place cells can turn on and off. Examination of error choices suggests that selection of the correct choice platform cannot occur if the animal does not first activate an accurate representation of the hierarchy of choices and their valences. The process mediating the translation between spatial representation and spatial action must await further experimentation.
Methods
Subjects and surgical procedures
Subjects were five male Lister hooded rats purchased from Charles River Laboratories and aged between 9 and 12 months at the time of electrophysiological recordings. Animals were food deprived to ~85–90% of their baseline weight. All animal experiments were carried out in accordance with UK Home Office regulations (UK Animals Scientific Procedures Act of 1986; project license PPL PD8CBD97C). Study protocols were in accordance with the terms of the project license, which was reviewed by the Animal Welfare and Ethical Review Board at University College London. No statistical methods were used to pre-determine sample size. Our study did not use separate groups, so neither randomization nor blinding was used.
Surgery and recording
Rats were anaesthetized with 0.5–1.5% isoflurane. Craniotomies were made bilaterally over the dorsal hippocampus (4.2 mm posterior to the bregma, ±3 mm lateral to the midline). The electrode array, containing 32 tetrodes (16 tetrodes per hemisphere), was implanted onto the surface of the cortex, and electrodes were turned 750 µm into the brain. One bone screw attached to the skull over the frontal cortex served as ground and reference. Tetrodes (nichrome, ¼ Hard Pac coating, 0.0005 inches in diameter; Kanthal, PF000591) were gold plated to <150 kΩ before implantation. Tetrodes were lowered to the dorsal CA1 over 2 weeks, and rats continued to run daily training sessions on the maze. Data were acquired using an Intan RHD USB interface board and RHD headstages.
Maze
The honeycomb maze consists of 61 tessellated hexagonal platforms (11.5 cm each side) in an overall hexagonal configuration (total maze width of ~200 cm). Each platform can be raised or lowered independently on a linear actuator, with the raised position ~30 cm higher than the lowered position. Platforms were controlled with digital pulses generated in custom-written software in LabView. The presence of an animal on a given platform was detected using load cells (RobotShop, RB-Phi-117) on which the platforms were affixed. The load cell signal was amplified with a custom-made circuit and input into our custom LabView software.
Animals were initially trained to consume the food reward (honey-flavoured corn flakes) in their home cage. Once they were consuming the food in their home cage, they were brought onto the maze, placed on the reward platform and given a food reward. Once they were consuming the food on the reward platform without hesitation (after 1 or 2 days), we began to run task trials, initially running small numbers of trials and increasing the number gradually in preparation for the recording sessions. The task was run as follows. A list of 13 start platforms was created in MATLAB by randomly choosing a single platform from each of 13 maze subsections. The first start platform was raised, the animal was manually placed on it and the trial was started from the custom LabView software by the experimenter. Two adjacent platforms were then pseudo-randomly selected by the software with two stipulations: first, that at least one of the platforms provided a position closer to the goal than the animal’s current position and, second, that previously unused platforms were selected from first, as long as the first stipulation could be met. The animal’s choice was registered once the load cell system had registered its presence on one of the two choice platforms for a continuous 5 s. This triggered the lowering of the two other platforms, and, after a delay of 4–10 s, another choice sequence commenced. The choice was registered as correct if the animal chose the platform closer to the goal. In some choices, the two choice platforms were the same distance from the goal; these choices were not included in the analysis of behavioural performance. Once the animal reached the goal platform, a food reward (honey-flavoured corn flakes) in a small metal bowl was placed next to the animal after a short delay. Once the animal had finished consuming the reward, the experimenter placed the animal on a holding pedestal next to the maze. Every four trials, the maze was wiped down with 70% ethanol and rotated 30° (alternating between clockwise and anti-clockwise rotations) on a bushing located under the maze to prevent the animal from following scent trails to the goal.
The animal’s ability to correctly navigate the maze was confirmed using the binomial test29 to determine whether the number of correct choices was greater than would be expected by chance given a 0.5 probability of correct choices.
In the first recording sessions (Figs. 1, 3 and 4), animals ran 13 trials of the task, followed by open-field foraging and then a second set of task trials that varied in number among the five animals (13 additional trials for rats 1, 4 and 5 and 7 additional trials for rats 2 and 3). In the second recording sessions (Fig. 2), animals ran 13 trials to goal 1 followed by 13 trials to goal 2; there was a set of ‘learning’ trials interleaved between the two sets, detailed below in the ‘Goal switch training’ section.
Spike sorting
Spikes were automatically sorted using KiloSort30 followed by manual curation using Phy31, which consisted mainly of merging and deleting clusters, using autocorrelations and cross-correlations as a guide. Cells with greater than 1% of spikes within the first 2 ms of spike autorcorrelation were excluded from further analysis. Cells were classified as pyramidal or interneuron cells or were left unclassified (excluded from further analysis) on the basis of spike width, mean rate, burst index (n spikes from 0–10 ms of the autocorrelation/n spikes from 40–50 ms of the autocorrelation) and oscillation score32 using a principal-component analysis. Principal components were calculated from the four variables, and the first two principal components were plotted as a scatterplot. Pyramidal cells tended to cluster together, while interneurons were scattered outside the main cluster; the experimenter selected the cells within the cluster by manually drawing a boundary, followed by visual verification of the waveforms.
Video tracking
Video was recorded in custom LabView software using a monochrome USB camera at a frame rate of ~25 frames per second (Imaging Source). Tracking was performed offline using DeepLabCut33. In DeepLabCut, we trained the network to identify two infrared LEDs positioned on top of the animal’s implant, as well as dark fur patches on the shoulders and back. The animal’s head position was taken as the midpoint between the two LEDs, and its head angle was the angle of the line between the LEDs.
Histology
Marking lesions were made using 20 µA of anodal current for 10 s. Animals were transcardially perfused with PBS followed by 4% paraformaldehyde (PFA), brains were cryoprotected in 30% sucrose in 4% PFA, and frozen slices of 40 µm were cut. Slices were stained with Cresyl Violet.
Preprocessing of spike data
Hippocampal place cell data are typically velocity thresholded because place cells lose some place tuning when the animal stops moving. In our task, because the animal was not able to move freely around the maze, this seemed an inappropriate approach. Instead, we focused on excluding sharp wave ripple events by using three criteria that had to be met simultaneously: (1) theta power (6–12 Hz) below the mean; (2) population firing rate 2 s.d. above the mean; and (3) ripple power (100–250 Hz) 2 s.d. above the mean. Spectral power was computed by taking the absolute value of the output of the continuous one-dimensional wavelet transform (MATLAB function ‘cwt’). Data were excluded only if all three criteria were met for a minimum duration of 50 ms. Spike data from a given cell were only used for analysis during any of the conditions (honeycomb task, forage, goal 1, goal 2) if at least 500 spikes were fired in the relevant condition after this exclusion.
Relative direction analysis
The field of view was tiled with potential ConSinks, arranged along the x and y axes at ~7-cm intervals (34 × 29 total positions). The head directions relative to each potential sink were then calculated for each spike by subtracting the angle of the vector from the animal’s position to the sink location from the animal’s allocentric head direction. Thus, if the animal was facing the sink, these two directions were equal and the relative direction was 0°. If the animal was facing in the opposite direction, the relative direction was 180°. The convention used in this paper is that positive relative directions indicate that the animal’s head direction was to the left of a line from the animal to the sink (that is, the sink is to the animal’s right) and negative directions indicate a rightward head direction relative to the sink. For a given cell, a binned distribution of relative directions could then be calculated (24 bins spanning −180° to 180°).
This distribution was then corrected for uneven sampling of relative directions by the animal. Because of the potential for differences in sampling of relative direction across the maze, we calculated control distributions of relative direction at each platform (61 platforms in total) using all video frames in which the animal occupied a given platform (an animal was deemed to be occupying a platform if its torso was within the platform’s perimeter). For each cell, the distributions were scaled according to the number of spikes the cell fired on each platform. After scaling, the distributions were summed across platforms. Finally, the cell’s relative direction distribution was divided by the summed control distribution, providing a corrected distribution taking into account any uneven sampling of relative direction by the animal across positions at which the cell fired spikes. From this corrected distribution, using the CircStat toolbox34, we computed the Rayleigh test for non-uniformity of circular data (all ConSink cells were significantly non-uniform) and calculated the mean direction and the MRL. Thus, each cell had an MRL value associated with each potential sink; the candidate sink was taken as the potential sink with the highest MRL. Note that the same correction was also performed for calculation of allocentric head direction tuning.
To test whether a cell was significantly tuned to direction relative to the candidate sink, we shuffled the cell’s head directions such that the head directions were no longer associated with actual positions on the maze. Distributions were calculated as above, yielding MRL values for each xy position. For each of the 1,000 shuffles, the maximal MRL value across all xy positions was used to make a distribution of MRL values. A cell was deemed to be significantly modulated by relative direction if its MRL was greater than the 95th percentile of the control distribution (Extended Data Fig. 5).
To account for disruption of the temporal structure of spiking caused by our shuffling procedure, we performed a second test in which we shifted the spike trains in time (minimum shift of 60 s), recalculating the strength of tuning to the sink position using the shifted positional and head direction values. A control distribution of MRL values was created from 1,000 repeats of the shifts, and cells were discarded if their real MRL was less than the 95th percentile of this control distribution.
Place cells frequently fired in bursts as the animal scanned the environment, causing a smearing of head direction that could potentially lead to false negatives in our search for ConSink cells. Thus, we repeated our search for ConSink cells using only bursts and averaged relative direction and position within each burst to eliminate the smearing effect. Bursts were defined as trains of at least ten spikes fired with interspike intervals of less than or equal to 0.25 s. If two bursts were separated in time by less than 0.5 s, they were combined. If a cell was significant in both analyses (15/77 cells), only the data from the burst analysis, which produced the greatest tuning in all cases, were carried forward into subsequent analyses. In these 15 cells, we confirmed that both analyses identified the same ConSink positions (distance between ConSinks in the same cells = 10.3 cm and in different cells = 85.2 cm, P < 0.001; median difference in preferred relative direction, in the same cells = 3.3º and in different cells = 74.9º, P < 0.001).
To make the vector fields for individual ConSink cells (for example, Fig. 1d–g), the field of view was binned into 20 × 16 spatial bins and a mean head direction value was calculated for each bin with more than 20 spikes.
To confirm the validity of our methodology, we recalculated sink positions and preferred directions using a downsampling method (Extended Data Fig. 5d–i). For each cell on each platform, the spikes were binned according to allocentric head direction (24 bins of 15º in width). Spikes within each bin were then downsampled according to the total directional occupancy in that bin; that is, if the animal spent relatively more time facing a particular direction, the spikes fired in that direction were downsampled by a proportionate amount. For a given cell, spikes were then summed across platforms and the sink position, preferred relative direction and strength of tuning (MRL) were calculated. This was repeated for each cell 1,000 times, and the mean values were calculated.
For population vector fields, bins instead corresponded to maze platforms. For each cell on each platform, we calculated the cell’s mean allocentric head direction. We then created a unit vector from this head direction value and scaled it by multiplying it by both its platform-associated mean firing rate and MRL. Finally, these scaled vectors were summed across all ConSink cells that fired spikes on the platform, and a direction was calculated from the resulting vector. The population sink position was calculated using the same search across xy positions as for individual cells, converting each platform-associated head direction to a relative direction whose contribution was scaled according to the length of its associated vector and calculating the MRL, taking as the sink the position with the maximal MRL value.
Behavioural analysis
To determine what platform an animal was on for post hoc analysis, we tracked the position of the animal’s torso using a dark fur patch behind the shoulders in DeepLabCut33. The animal was considered to be on a particular platform if the torso position was within the platform’s perimeter. For the analysis of correct and error choices (Fig. 4), wait period 2 was defined in relation to the time when the animal’s torso moved onto the chosen platform and was taken as the 4-s window starting 5 s before this transition; the 1-s gap between the end of wait period 2 and the transition to the new platform ensured no contamination of wait period 2 by the transition itself. Wait period 1 was defined as the time after the previous subtrial start when the unchosen platforms had lowered and before the next choice platforms started to be raised.
Goal switch training
In the goal switch trials, all animals ran 13 trials to goal 1. Once these trials were completed, it was necessary to teach the animals that the goal position had switched. To do this, we ran a number of ‘easy’ trials to goal 2. These easy trials were characterized by choice platforms that all led the animal closer to the new goal, such that the animal would arrive at the new goal through no real choice of its own. Once the animal arrived at the new goal, it was rewarded as normal. These trials were interleaved with easy unrewarded trials to goal 1.
The training sequences for each animal were as follows. Rat 1 ran four easy trials to goal 2, followed by a normal trial that it was not able to complete successfully. It then ran two easy unrewarded trials to goal 1, followed by a single easy rewarded trial to goal 2. It subsequently ran 13 normal trials to goal 2, all of which are included in the presented analysis.
The data presented for rat 2 are from the second goal switch session. The first goal switch session was not completed successfully owing to this rat’s inability to learn the new goal location. We subsequently ran brief sessions across 6 days of 1–4 trials to this new goal location in which the rat demonstrated clear learning of this new goal location. We then ran a second goal switch session, using goal 2 from the failed goal switch session as goal 1. After running 13 trials to goal 1, we switched the goal and the animal ran three easy rewarded trials. He subsequently ran 15 normal trials to goal 2. The final 13 of these trials were used in all analyses except for the analysis examining movement of the sinks across the two halves of the goal 2 epoch (Supplementary Fig. 5), which used the first 13 trials.
Rat 3 ran 13 trials to goal 1, followed by 8 easy trials alternating between rewarded trials to goal 2 and unrewarded trials to goal 1. This was followed by 17 normal trials to goal 2. The final 13 of these trials were used in all analyses except for the analysis examining movement of the sinks across the two halves of the goal 2 epoch (Supplementary Fig. 5), which used the first 13 trials.
Rat 4 ran 13 trials to goal 1, followed by 6 easy trials alternating between unrewarded trials to goal 1 and rewarded trials to goal 2 and 3 additional easy rewarded trials to goal 2. This was followed by 21 normal trials to goal 2. The final 13 of these trials were used in all analyses except for the analysis examining movement of the sinks across the two halves of the goal 2 epoch (Supplementary Fig. 5), which used the first 13 trials.
Rat 5 ran 13 trials to goal 1, followed by 8 easy trials alternating between unrewarded trials to goal 1 and rewarded trials to goal 2. This was followed by normal trials to goal 2, but the animal persisted in going to goal 1. A few attempts were made to ‘retrain’ the animal to goal 2 with additional easy trials followed by normal trials, but the animal stopped running the task before running the necessary number of trials to goal 2. This animal was therefore excluded from the main analysis. It was trained to goal 2 over several additional sessions, and data from the final session are presented in Supplementary Figs. 1, 3 and 4.
LN analysis
To determine the dependence of ConSink cell spiking on distance and direction to the sink, we used a technique developed to identify mixed selectivity in individual neurons by quantifying the dependence of spiking on all possible combinations of a set of variables35. A model, corresponding to a particular combination of variables, is trained by optimizing a set of parameters that convert animal state vectors corresponding to the variables of interest into firing rates, which are estimated as an exponential function of the sum of each variable value projected onto the set of parameters. The analysis uses tenfold cross-validation, splitting the data into ten equally sized partitions, training the model using nine of the partitions and testing on the held-out partition such that each partition is tested once. The LLH increase in spike prediction relative to a mean firing rate model is calculated for each model, and the simplest model (that is, the one with the fewest number of variables) that produces a significant increase relative to the mean firing rate model, as well as, in the case of multivariable models, a significant increase over any simpler models (that is, models with fewer variables) is selected as the model that best describes the neuron’s tuning. The significance is assessed using Wilcoxon signed-rank tests comparing the LLH increases for each test partition across the relevant models. We adapted the model to use three variables: (1) relative direction to the sink (RD), (2) distance to the sink (Ds) and (3) direction from the animal’s position to the sink (AD); this produced seven possible models (that is, a three-variable model, three two-variable models and three single-variable models). Firing rate and animal state vectors were constructed using 100-ms windows. Relative direction and direction from position were binned using 18 bins spanning −180° to 180° and 0° to 360°, respectively. Distance to sink was binned using 20 bins from 0 cm to the animal’s maximum distance from the sink.
Fantail plots
To calculate the fantail plot (Fig. 3k) showing the population firing rates in the range of head directions relative to the goal, spikes within animals were combined across all ConSink cells. For each spike, the animal’s head direction relative to the goal was calculated in the same way as for head direction relative to the ConSink (see ‘Relative direction analysis’ above). Spikes were then separated according to the platform occupied by the animal during spiking, and, for each platform, its associated spikes were binned according to relative direction to goal (30º-wide bins). Similarly, for each platform, the total amount of time that the animal spent within each relative direction bin was determined. Finally, the spike counts in each bin were divided by the total time (in seconds) spent in each bin, to produce firing rates in each bin. These were then averaged across all platforms and divided by the total number of ConSink cells to generate a per-cell firing rate in binned direction relative to the goal; these values, z-scored within animals, are shown in Fig. 3i and are averaged across animals in Fig. 3k.
Remapping analysis
To assess remapping between the honeycomb task and open-field foraging, we created rate maps for all cells by partitioning the field of view into 1,280 bins (40 bins in the x direction, 32 bins in the y direction). To establish baselines for cell stability, to which we could compare our remapping data to assess significance, we created rate maps corresponding to the first and second halves of the task and open-field foraging epochs; specifically, for each spatial bin, we calculated the total occupancy (in seconds) and placed the data corresponding to the first and second halves in the corresponding rate maps. Population vector correlations were performed by constructing vectors for each bin using the firing rates of each cell at that bin and then calculating Pearson’s linear correlation coefficient for the two vectors being compared. Similarly, place field correlations were performed by linearizing the two-dimensional rate maps for a given cell and calculating the correlation between the two vectors.
Place field centres
Place fields centres were taken as the centre of mass of the cell’s rate map.
Statistical procedures
All statistical tests were two sided and non-parametric unless stated otherwise. In box plots, the central mark indicates the median and the bottom and top edges of the box indicate the 25th and 75th percentiles, respectively. The whiskers extend to the most extreme data points within 1.5 times the interquartile range from the bottom or top of the box, and all more extreme points are plotted individually using a plus symbol.
Reporting summary
Further information on research design is available in the Nature Research Reporting Summary linked to this paper.
Online content
Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at 10.1038/s41586-022-04913-9.
Supplementary information
Acknowledgements
We thank D. Halpin and S. Townsend for building the honeycomb maze and, with R. Barrett, for help prototyping the platforms and modifying the maze; P. Sienkiewicz for designing and building the electronics; G. McPhillips and M. Stopps for consulting on the load cell circuitry; A. Radulovic for help with data collection; B. Greenaway and J. Broni-Tabi for histology; and M. Bauza and members of the O’Keefe laboratory for helpful discussions regarding the results and manuscript. This work was supported by the Sainsbury Wellcome Centre Core Grant from the Gatsby Charitable Foundation and Wellcome Trust (090843/F/09/Z) and a Wellcome Trust Principal Research Fellowship (Wt203020/z/16/z) to J.O’K.
Extended data figures and tables
Source data
Author contributions
J.O. and J.O’K. designed the experiments. J.O. collected the data. J.O. and J.O’K. analysed the data and wrote the manuscript.
Peer review
Peer review information
Nature thanks Michael Hasselmo and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available.
Data availability
The datasets generated during the current study are available from the corresponding authors on reasonable request. Source data are provided with this paper.
Code availability
The custom MATLAB code used for all analyses can be accessed at GitHub (https://github.com/jakeormond/vectorFields).
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Contributor Information
Jake Ormond, Email: j.ormond@ucl.ac.uk.
John O’Keefe, Email: j.okeefe@ucl.ac.uk.
Extended data
is available for this paper at 10.1038/s41586-022-04913-9.
Supplementary information
The online version contains supplementary material available at 10.1038/s41586-022-04913-9.
References
- 1.O’Keefe, J. & Nadel, L. The Hippocampus as a Cognitive Map (Oxford University Press, 1978).
- 2.Wood RA, et al. The honeycomb maze provides a novel test to study hippocampal-dependent spatial navigation. Nature. 2018;554:102–105. doi: 10.1038/nature25433. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Morris RG, Garrud P, Rawlins JN, O’Keefe J. Place navigation impaired in rats with hippocampal lesions. Nature. 1982;297:681–683. doi: 10.1038/297681a0. [DOI] [PubMed] [Google Scholar]
- 4.O’Keefe J, Dostrovsky J. The hippocampus as a spatial map. Preliminary evidence from unit activity in the freely-moving rat. Brain Res. 1971;34:171–175. doi: 10.1016/0006-8993(71)90358-1. [DOI] [PubMed] [Google Scholar]
- 5.O’Keefe J. Place units in the hippocampus of the freely moving rat. Exp. Neurol. 1976;51:78–109. doi: 10.1016/0014-4886(76)90055-8. [DOI] [PubMed] [Google Scholar]
- 6.Muller RU, Kubie JL, Ranck JB., Jr Spatial firing patterns of hippocampal complex-spike cells in a fixed environment. J. Neurosci. 1987;7:1935–1950. doi: 10.1523/JNEUROSCI.07-07-01935.1987. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Jercog PE, et al. Heading direction with respect to a reference point modulates place-cell activity. Nat. Commun. 2019;10:2333. doi: 10.1038/s41467-019-10139-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Rubin A, Yartsev MM, Ulanovsky N. Encoding of head direction by hippocampal place cells in bats. J.Neurosci. 2014;34:1067–1080. doi: 10.1523/JNEUROSCI.5393-12.2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.McNaughton BL, Barnes CA, O’Keefe J. The contributions of position, direction, and velocity to single unit activity in the hippocampus of freely-moving rats. Exp. Brain Res. 1983;52:41–49. doi: 10.1007/BF00237147. [DOI] [PubMed] [Google Scholar]
- 10.Dupret D, O’Neill J, Pleydell-Bouverie B, Csicsvari J. The reorganization and reactivation of hippocampal maps predict spatial memory performance. Nat. Neurosci. 2010;13:995–1002. doi: 10.1038/nn.2599. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Kobayashi T, Nishijo H, Fukuda M, Bures J, Ono T. Task-dependent representations in rat hippocampal place neurons. J. Neurophysiology. 1997;78:597–613. doi: 10.1152/jn.1997.78.2.597. [DOI] [PubMed] [Google Scholar]
- 12.Sarel A, Finkelstein A, Las L, Ulanovsky N. Vectorial representation of spatial goals in the hippocampus of bats. Science. 2017;355:176–180. doi: 10.1126/science.aak9589. [DOI] [PubMed] [Google Scholar]
- 13.Rolls ET, O’Mara SM. View-responsive neurons in the primate hippocampal complex. Hippocampus. 1995;5:409–424. doi: 10.1002/hipo.450050504. [DOI] [PubMed] [Google Scholar]
- 14.Kunz L, et al. A neural code for egocentric spatial maps in the human medial temporal lobe. Neuron. 2021;109:2781–2796. doi: 10.1016/j.neuron.2021.06.019. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Skaggs ME, McNaughton BL, Gothard KM, Markus EJ. An information-theoretic approach to deciphering the hippocampal code. Adv. Neural Inform. Process Syst. 1993;5:1030–1037. [Google Scholar]
- 16.Muller RU, Kubie JL. The firing of hippocampal place cells predicts the future position of freely moving rats. J. Neurosci. 1989;9:4101–4110. doi: 10.1523/JNEUROSCI.09-12-04101.1989. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Gauthier JL, Tank DW. A dedicated population for reward coding in the hippocampus. Neuron. 2018;99:179–193. doi: 10.1016/j.neuron.2018.06.008. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Boccara CN, Nardin M, Stella F, O’Neill J, Csicsvari J. The entorhinal cognitive map is attracted to goals. Science. 2019;363:1443–1447. doi: 10.1126/science.aav4837. [DOI] [PubMed] [Google Scholar]
- 19.Hardcastle K, Maheswaranathan N, Ganguli S, Giocomo LM. A multiplexed, heterogeneous, and adaptive code for navigation in medial entorhinal cortex. Neuron. 2017;94:375–387. doi: 10.1016/j.neuron.2017.03.025. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Acharya L, Aghajan ZM, Vuong C, Moore JJ, Mehta MR. Causal influence of visual cues on hippocampal directional selectivity. Cell. 2016;164:197–207. doi: 10.1016/j.cell.2015.12.015. [DOI] [PubMed] [Google Scholar]
- 21.O’Keefe J, Recce ML. Phase relationship between hippocampal place units and the EEG theta rhythm. Hippocampus. 1993;3:317–330. doi: 10.1002/hipo.450030307. [DOI] [PubMed] [Google Scholar]
- 22.Markus EJ, et al. Interactions between location and task affect the spatial and directional firing of hippocampal neurons. J. Neurosci. 1995;15:7079–7094. doi: 10.1523/JNEUROSCI.15-11-07079.1995. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Muenzinger KF. Tone discrimination in white rats. J. Compar. Psychol. 1931;12:195–206. doi: 10.1037/h0072238. [DOI] [Google Scholar]
- 24.Tolman E. Prediction of vicarious trial and error by means of the schematic sowbug. Psychol. Rev. 1939;46:318–336. doi: 10.1037/h0057054. [DOI] [Google Scholar]
- 25.Redish AD. Vicarious trial and error. Nat. Rev. Neurosci. 2016;17:147–159. doi: 10.1038/nrn.2015.30. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Wang C, et al. Egocentric coding of external items in the lateral entorhinal cortex. Science. 2018;362:945–949. doi: 10.1126/science.aau4940. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.LaChance PA, Todd TP, Taube JS. A sense of space in postrhinal cortex. Science. 2019;365:eaax4192. doi: 10.1126/science.aax4192. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Alexander AS, et al. Egocentric boundary vector tuning of the retrosplenial cortex. Sci. Adv. 2020;6:eaaz2322. doi: 10.1126/sciadv.aaz2322. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Nelson, M. myBinomTest. MATLAB Central File Exchangehttps://uk.mathworks.com/matlabcentral/fileexchange/24813-mybinomtest-s-n-p-sided (2015).
- 30.Pachitariu, M., Steinmetz, N. A., Kadir, S. N., Carandini, M. & Harris, K. D. Fast and accurate spike sorting of high-channel count probes with KiloSort. In Advances in Neural Information Processing Systems (eds. Lee, D.D., Sugiyama, M., Luxburg, U.V., Guyon, I. & Garnett, R.) 1–9 (2016).
- 31.Rossant, C. phy: interactive visualization and manual spike sorting of large-scale ephys data. GitHubhttps://github.com/cortex-lab/phy (2016).
- 32.Mureşan RC, Jurjuţ OF, Moca VV, Singer W, Nikolić D. The oscillation score: an efficient method for estimating oscillation strength in neuronal activity. J. Neurophysiol. 2008;99:1333–1353. doi: 10.1152/jn.00772.2007. [DOI] [PubMed] [Google Scholar]
- 33.Mathis A, et al. DeepLabCut: markerless pose estimation of user-defined body parts with deep learning. Nat. Neurosci. 2018;21:1281–1289. doi: 10.1038/s41593-018-0209-y. [DOI] [PubMed] [Google Scholar]
- 34.Berens, P. CircStat: a MATLAB toolbox for circular statistics. J. Stat. Softw.31, 1–21 (2009).
- 35.Hardcastle K, Maheswaranathan N, Ganguli S, Giocomo LM. A multiplexed, heterogeneous, and adaptive code for navigation in medial entorhinal cortex. Neuron. 2017;94:375–387. doi: 10.1016/j.neuron.2017.03.025. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The datasets generated during the current study are available from the corresponding authors on reasonable request. Source data are provided with this paper.
The custom MATLAB code used for all analyses can be accessed at GitHub (https://github.com/jakeormond/vectorFields).