Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Neuronal representation of environmental boundaries in egocentric coordinates

## Abstract

Movement through space is a fundamental behavior for all animals. Cognitive maps of environments are encoded in the hippocampal formation in an allocentric reference frame, but motor movements that comprise physical navigation are represented within an egocentric reference frame. Allocentric navigational plans must be converted to an egocentric reference frame prior to implementation as overt behavior. Here we describe an egocentric spatial representation of environmental boundaries in the dorsomedial striatum.

## Introduction

The hippocampus, entorhinal cortex, and associated structures store spatial representations in an allocentric or world-centered reference frame that is strongly influenced by environmental boundaries1,2,3,4,5. Computational models suggest that allocentric navigational representations such as boundary responses4,5,6 must arise from and be converted back to an egocentric reference frame to guide overt behavior7,8,9. The dorsomedial striatum (DMS) shows neural responses related to action decisions10,11,12, plays a critical role in controlling behavioral output11 including egocentric navigational strategies13, and receives input from regions involved in spatial navigation including medial entorhinal and retrosplenial cortex14.

## Results

### Egocentric boundary coding in DMS

To determine whether egocentric spatial information is present in the DMS, male Long–Evans rats (n = 4) were implanted with up to 16 tetrodes targeting DMS (Fig. 1a, Supplementary Fig. 1) and single units were recorded (n = 939 single units in n = 44 sessions) while rats foraged for randomly scattered food in a familiar open field arena. Stable head direction cells (HDCs, n = 31) were found, similar to previous results in the striatum15 and other structures16, but few cells had allocentric spatial correlates (n = 19 spatially stable cells; Supplementary Fig. 2). However, cells were observed with activity restricted to the environment perimeter only when the rat moved with a particular orientation relative to the walls, suggesting an egocentric coding scheme for boundaries.

To assess the possibility of such an egocentric representation, we created egocentric boundary ratemaps (Fig. 1b, Supplementary Fig. 3) that illustrate the orientation and distance of the boundaries relative to the rat’s movement direction (rather than head direction; Fig. 1g, Supplementary Fig. 3) when a cell spikes. Eighteen percent of recorded cells (171/939 cells) were identified with significant firing when a boundary occupied a specific orientation and distance relative to the animal based on the mean resultant length (MRL) of boundary directional firing exceeding the 99th percentile of a shuffled distribution (Fig. 1f) and responding stably across the two halves of a recording (Supplementary Fig. 3l, m). We termed these egocentric boundary cells (EBCs; EBCs per animal: mean = 42.75, range = 15–70; Fig. 1c, d, Supplementary Fig. 4). A subset of EBCs had firing rates that decreased in response to a boundary (n = 49; Fig. 1e) that we termed inverse EBCs (iEBCs). EBCs and iEBCs had low mean firing rates (mean ± SEM: 1.26 ± 0.09 Hz, n = 171 cells; Fig. 1h) and virtually all (97%) fired phasically consistent with them being DMS medium spiny neurons17.

The population of EBCs responds to boundaries at the full spectrum of orientations relative to the animal, although the distribution of preferred orientation is bimodal with peaks sitting 180° opposite each other on either side of the animal (−68° and 112°; Fig. 2, Supplementary Fig. 5), while being slightly offset from perpendicular to the animal’s long axis by 22° (Fig. 2d). The offset did not result from a bias in the boundary approach trajectories of the animals (Supplementary Fig. 5), but may stem from a lateralized cortical representation upstream of EBCs and the largely ipsilateral nature of cortico-striatal projections. The distribution of preferred boundary distance contained three peaks (6.4, 13.5, and 25.6 cm) indicating the presence of three distinct preferred distances among EBCs (Fig. 2f–h, Supplementary Fig. 5) that could be important for a hierarchical navigation search strategy on multiple scales similar to grid cells. The size of EBC receptive fields increased as a function of preferred distance (Pearson’s correlation: r = 0.46, p < 2.07e−10; Fig. 2i), indicating that the egocentric boundary representation has greater precision the closer the animal is to the boundaries. Both preferred orientation and distance lacked clear topography given that EBCs with different orientations and distances appeared on the same tetrode (Fig. 2a, b, e, f).

### EBCs respond stably to local boundaries across environments

To confirm that EBCs respond to local boundaries rather than distal features of the testing room, we conducted recordings after rotating the open field with four black walls 45° relative to the testing room with numerous static extra-maze cues, putting local boundaries and testing room boundaries maximally out of alignment. Recordings were obtained in the standard and rotated open field orientation (n = 130 cells; n = 4 sessions), including 19 EBCs and 3 HD cells. Following the rotation both the preferred orientation (Wilcoxon’s signed rank test: z-score: −0.63, n.s., z-score: 1.99, n.s.; Fig. 3a, e, Supplementary Fig. 6) and preferred distance (Wilcoxon’s signed rank test: z-score: 0.19, n.s., z-score: −1.16, n.s.; Fig. 3a, e, Supplementary Fig. 6) of EBCs remained unchanged. In contrast, HD cells remained anchored to the overall testing room (Supplementary Fig. 6). Given the salience of corners, we considered the possibility that EBCs uniquely code these local environmental attributes and identified a subset of EBCs (n = 16; 9.4%) with firing rate differences near the corners compared to the middle of the boundaries. This indicates that EBCs respond to local boundaries of the open field rather than the larger recording room and that egocentric and allocentric reference frames can be computed in parallel7,8.

To further test EBC responses across different environmental manipulations, we performed recordings in open fields of different sizes, which provides information regarding whether EBCs have a constant preferred distance or instead scale with environment size. Recordings were obtained (n = 50 cells, n = 12 EBCs; n = 3 sessions) in open fields with walls differing in length by 50 cm. Regardless of the size of the open field, EBCs responded to boundaries at the same distance (Wilcoxon’s signed rank test: z-score: −0.71, n.s.; Fig. 3b, f, Supplementary Fig. 7) and orientation (Wilcoxon’s signed rank test: z-score: −0.31, n.s.; Fig. 3b, f, Supplementary Fig. 7) from the animal, indicating a lack of scaling with environment size.

The striatum receives input from several visual cortical regions14. Therefore, we asked whether boundary appearance influenced EBC responses. Recordings were performed (n = 73 cells, n = 19 EBCs; n = 4 sessions) in an environment with four black walls and then with three of the walls swapped with walls of different patterns (Fig. 3c, Supplementary Fig. 8). The firing fields of EBCs did not change in either preferred orientation (Wilcoxon’s signed rank test: z-score: −0.63, n.s., z-score: 0.19, n.s.; Fig. 3c, g, Supplementary Fig. 8) or preferred distance (Wilcoxon’s signed rank test: z-score: −0.15, n.s., z-score: −0.63, n.s.; Fig. 3c, g, Supplementary Fig. 8) with the change in visual appearance of the walls. The lack of effect of wall visual appearance on EBCs suggests a higher-order representation of a boundary independent of basic visual features.

The allocentric cognitive map of a given environment maintained in the hippocampal formation is stable over time. We tested whether EBCs maintain a stable representation of a given environment over time by performing two recordings (n = 426 cells, n = 80 EBCs; n = 19 sessions) in the same open field. Both the preferred orientation (Wilcoxon’s signed rank test: z-score: −0.87, n.s.; Supplementary Fig. 9) and preferred distance (Wilcoxon’s signed rank test: z-score: −0.75, n.s.; Supplementary Fig. 9) of EBCs remained stable across sessions. Given the stability of EBC representation for a single environment, we next tested whether EBCs remap across environments as does the allocentric spatial map18,19. Recordings were obtained (n = 38 cells, n = 14 EBCs; n = 2 sessions) as rats explored a familiar and completely novel open field in a novel testing room. EBCs responded with the same preferred orientation (Wilcoxon’s signed rank test: z-score: 1.35, n.s., z-score: −2.04, n.s., z-score: −0.66, n.s.; Fig. 4a, c, Supplementary Fig. 10) and distance (Wilcoxon’s signed rank test: z-score: 1.41, n.s., z-score: −0.97, n.s., z-score: 0.28, n.s.; Fig. 4a, c, Supplementary Fig. 10) immediately upon exposure to the novel environment (Fig. 4a, bottom) and continued to do so for at least the first two exposures to a novel environment. It is possible that EBC representations of different environments could diverge with additional experience, and therefore, recordings were obtained from two familiar, but different open field environments (n = 42 cells, n = 11 EBCs; n = 3 sessions). The additional experience did not result in the divergence of the EBC representations, as neither the preferred orientation (Wilcoxon’s signed rank test: z-score: −1.07, n.s.; Fig. 4b, d) nor distance (Wilcoxon’s signed rank test: z-score: 0.36, n.s.; Fig. 4b, d) changed between the two familiar open fields. Thus, the striatal EBC representation does not remap across environments, but instead provides a stable representation of environmental boundaries relative to the animal across environments.

## Discussion

The present work identified an egocentric representation of environmental boundaries consistent with theoretical predictions from computational models7,8, which propose that allocentric spatial representations in the hippocampal formation are generated from and converted back to an egocentric spatial representation prior to behavioral output. The striatum receives input from navigation related cortical structures14, including medial entorhinal, retrosplenial, and posterior parietal cortex, but does not directly project to these structures. This suggests that the striatal egocentric representation is not directly involved in the generation of the allocentric spatial representation, while it remains unknown whether the allocentric spatial map is needed to generate the striatal egocentric representation.

Allocentric spatial information could be transformed into an egocentric representation through a process involving allocentric boundary coding cells in medial entorhinal cortex5 and subicular cortices4,6, postsubicular cells with mixed allocentric-egocentric coding20, and egocentric cells in lateral entorhinal cortex9. Additionally, EBCs in DMS are more strongly coupled to the movement direction of the animal than the animal’s head direction, and movement direction has been proposed to be a potential output of the grid cell network in MEC21. Alternatively, cortical regions such as posterior parietal cortex that contain egocentric sensory and motor representations22,23,24 could be involved in generating the striatal egocentric representation without allocentric input. The retrosplenial cortex has been proposed as a potential locus for reference frame transformations7,8 given its efferent and afferent connections with structures that utilize allocentric and egocentric reference frames, while itself utilizing conjunctive allocentric, egocentric, and route-based coding25, and therefore may be an important source of information for generating EBCs in DMS. The data presented here indicates an important egocentric neural representation of boundaries that could interact with allocentric coding of environmental boundaries to guide movement in egocentric coordinates.

## Methods

Subjects: Male Long–Evans rats (n = 4) obtained from Charles River Labs (Wilmington, MA, USA) were individually housed in plexiglass cages in a temperature- and humidity-controlled facility with a 12 h/12 h light/dark cycle. Animals had free access to food and water prior to the initiation of all experiments. All procedures were approved by the Institutional Animal Care and Use Committee at Boston University.

Presurgical procedures: At the start of all experiments, animals were acclimated for at least 2 days to the experimental testing room, to being handled by the researcher, and to eating crushed Froot Loops (General Mills, Battle Creek, MI, USA), which served as the food that animals searched for in the open field. For a minimum of 3 days following that acclimation, animals were exposed to the familiar open fields for up to 20 min/day. The primary familiar open field was 1.25 × 1.25 m2 with black walls 36 cm in height and a dark gray textured rubber floor. The secondary familiar open field was 1.25 × 1.00 m2 with grays walls 72 cm in height relative to a black particle board floor that was raised 54 cm off of the floor.

Surgical procedures: Aseptic surgery was performed for the implantation of a custom-built 12 tetrode hyperdrive targeting the medial striatum. Surgery began with the administration of atropine (0.1 mg/kg) subcutaneously and then anesthesia was induced with a combination of a ketamine cocktail (ketamine: 12.92 mg/kg; acepromazine: 0.1 mg/kg; xylazine: 1.31 mg/kg) administered intraperitoneally and isoflurane administered via inhalation at an initial concentration of 0.5%. Upon loss of a toe pinch reflex the rat’s head was shaved and the animal was positioned in a stereotaxic frame. A midline incision was made in the rat’s scalp and any connective tissue covering the skull was cleared. Anchor screws were positioned across the skull surrounding the implantation site and the ground screw was positioned over the cererbellum. A craniotomy centered at the hyperdrive implantation site over the medial striatum (A/P: + 0.5; M/L: 2.5) was made allowing the medial edge of the hyperdrive to be positioned close to the medial border of the striatum given an approximate 2 mm inner diameter of the cannula housing the tetrodes. Upon completion of the craniotomy, dura was resected and the hyperdrive was lowered until the cannula housing the tetrodes contacted the dorsal surface of the brain. The remaining space in the craniotomy was filled with Kwik-Sil (World Precision Instruments, Sarasota, FL, USA) and the hyperdrive was secured in place by connecting it to the anchor screws with dental cement. Once the hyperdrive was secured in place, the tetrodes were each lowered into the brain. The tetrodes in the first two animals were lowered approximately 4.25 mm, while in the subsequent three animals tetrodes were lowered approximately 2 mm to the deep layers of cortex. Post-operative antibiotics (Baytril: 10.0 mg/kg) and analgesics (Ketafen: 5.0 mg/kg) were administered for 5 days and animals were allowed to recover for 7 days with free access to food and water prior to any involvement in experiments.

Electrophysiological recordings: At the start of each day, the rat was placed on an elevated pedestal where it was connected to the electrophysiological acquisition equipment. Neural signals were initially amplified via two headstages attached to a single 64-channel electrode interface board prior to being transmitted to the 64-channel Digital Lynx SX acquisition system (Neuralynx, Bozeman, MT, USA) where the signals were digitized, filtered (0.3–6.0 kHz), and further amplified (5000–20,000×). Spikes were detected online as a threshold crossing on any of the channels of a tetrode, at which point a window around the threshold crossing time point from each channel of the tetrode was stored for later analysis. Following each experiment, spikes were assigned to individual single units offline using Offline Sorter (Plexon Inc., Dallas, TX, USA). The peak, peak-to-valley, and principal components of the waveforms were utilized for sorting the spikes. The position of the animal was tracked during the recording through the use of a camera positioned over the recording arena. A red and a green diode attached to the headstage were tracked in order to obtain both the animal’s position and head direction throughout the recording.

On any given day, an initial 20 min recording was obtained while the rat foraged for small pieces of Froot Loops (General Mills, Battle Creek, MI, USA) scattered on the floor of a familiar open field. The open fields were always open to the testing room, which had a variety of cues. One of several possibilities followed the initial recording depending upon the assessment of the researcher as to whether any and/or how EBCs were present during the first recording of the day. In some cases, no more recordings were made that day and tetrodes were generally moved ventrally by approximately 70 µm. On some days, in order to assess the stability of EBCs within a single environment a second 20 min recording in the same familiar open field was conducted. On the remainder of days, one of several different manipulations were performed including:

1. 1.

Open field rotation: The standard 1.25 × 1.25 m2 open field was rotated 45° relative to the testing room. Sessions in the rotated open field were preceded and succeeded by standard open field sessions, except for one experiment where a single standard session and a single rotated session were collected.

2. 2.

Open field expansion: The standard 1.25 × 1.25 m2 open field could be expanded or contracted to have wall lengths from 1.0 to 1.75 m. Animals were run in square environments with walls that varied by 50 cm (either 1.0 vs. 1.5 m or 1.25 vs. 1.75 m). Recordings performed in the 1.75 × 1.75 m2 open field lasted longer in order to obtain adequate spatial coverage of the environment. Expansion experiments minimally included recordings in square environments with walls differing by 50 cm, but also included a recording in the standard 1.25 × 1.25 m2 when the 1.0 and 1.5 m long walls were used.

3. 3.

Visual appearance: The standard 1.25 × 1.25 m2 open field had four black walls that could be swapped for walls with different patterns. Three of the four walls were changed from the standard black walls to one of three different walls including an all white wall, a black wall with thin diagonal white stripes and a wall with black and white vertical stripes of equal widths. A sequence of four recordings was obtained with two sessions in the environment with the patterned walls preceded and succeeded by a session with all black walls. One experiment only included a single session with the patterned walls flanked by sessions with all black walls.

4. 4.

Multiple familiar environments: Animals were run in the standard 1.25 × 1.25 m2 open field and then the alternative 1.00 × 1.25 m2 familiar open field described above in presurgical procedures. All animals had a minimum of 8 days of exposure to each open field prior to any recordings. One recording in each familiar environment was collected.

5. 5.

Novel open field: Animals were first run in the standard 1.25 × 1.25 m2 open field and then brought into an adjacent testing room they had never been in previously. In this novel testing room, rats were recorded while they foraged in a novel square open field that had a smooth white floor and 1.25 m long black walls that were 30.5 cm tall. A sequence of four recordings was collected including two sessions in the novel environment and two sessions in the familiar environment with one preceding and one succeeding the novel environment sessions.

Histology: Animals were deeply anesthetized with isoflurane and small lesions were made at the end of tetrodes that had preliminarily been identified as having EBCs. The lesions were made by passing a small 20 µA current through each channel of the tetrode for 10 s. After the lesions were made, the animals were transcardially perfused with 0.9% saline followed by 10% formalin solution. The brain was then removed from the skull and post-fixed in 10% formalin until it was sliced. The rostral portion of the brain was mounted in a vibratome (Leica Biosystems, Buffalo Grove, IL, USA) where 50 µm coronal sections were taken through the rostral–cuadal extent of the striatum. Slices were mounted on gelatin-coated slides and allowed to dry. Sections from three of the four animals were imaged at this point (Supplementary Fig. 1). Sections were then Nissl stained and cover slipped. The lesions in one animal were noticeably smaller or absent, although tetrode tracks were clearly visible. The locations of lesions or the end of tetrode tracks were identified through the use of light microscopy and images (Supplementary Fig. 1) were obtained using a Nikon DXM1200 camera mounted on an Olympus BX51 light microscope.

Allocentric spatial ratemap generation: The open field arena was divided into equally sized spatial bins (3 × 3 cm2) and the firing rate within each spatial bin was calculated as the number of spikes occurring in a given bin divided by the amount of time the animal spent in the bin. The resulting occupancy normalized two-dimensional (2D) firing rate histograms were smoothed with a 2D 3 cm Gaussian Kernel to generate the final ratemap. The 2D firing rate histogram was color coded from 0 (blue) to the maximum of the firing rate distribution (red) with that maximum firing rate value specified above the top-left corner of each allocentric spatial ratemap. Spatial bins with insufficient occupancy to calculate a firing rate appear white in the ratemaps.

Allocentric trajectory plot generation: The position of the rat obtained by tracking the LEDs attached to the headstage is plotted as a gray line. Each dot indicates the position that the animal occupied when a given cell spiked and is color-coded using the animal’s movement direction at the time of the spike. The movement direction is calculated as the instantaneous derivative of the continuous position signal and each figure contains a legend in the form of a colored ring depicting the colors associated with each movement direction.

Egocentric boundary ratemap generation: Egocentric boundary ratemaps were designed based on the same principle as the allocentric spatial ratemap, but instead of considering the data in an allocentric reference frame where the rat’s position is considered relative to a static spatial environment (Supplementary Fig. 3a–d), the data were considered in an egocentric reference frame where the boundary position was considered relative to a static rat position (Supplementary Fig. 3e–j). The primary components used to generate the egocentric boundary ratemaps are the animal’s movement direction and the boundary position relative to the animal. The instantaneous derivative of the continuous position signal (x/y coordinates) served as the movement direction of the animal. The position of the boundaries relative to the animal was calculated on a frame-by-frame basis. The 360° around the animal was divided into 3° angular bins centered (0°) on the animal’s current instantaneous heading and the distance from the animal’s current position was divided into 2.5 cm distance bins up to a maximum distance of ½ the length of the longest boundary, yielding 3° × 2.5 cm bins (Supplementary Fig. 3e–j). For each frame, the presence of a boundary in each bin is counted resulting in an egocentric boundary occupancy map (Supplementary Fig. 3i). Then, for a given cell a density plot of boundary location at the time of spiking is generated using the same 3° × 2.5 cm bins (Supplementary Fig. 3h). Occupancy normalized egocentric boundary ratemaps were then generated as the element wise division of the spike density by occupancy, which was then smoothed by a 2D gaussian kernel, with a width of 5 bins and standard deviation of 5 bins (Supplementary Fig. 3j).

A comparison of generating egocentric boundary ratemaps using head direction instead of movement direction affirmed the use of movement direction as the MRLs of boundary direction firing were greater when using movement direction rather than when using head direction for all recorded cells. Restricting consideration to only those cells identified as EBCs when using movement direction, the MRLs were significantly greater when using movement direction than when using head direction (Fig. 1g). Finally, if egocentric boundary ratemaps generated using head direction are used for classifying EBCs, only 17 EBCs are identified, with 7 of those also being classified as EBCs when using movement direction to generate the egocentric boundary ratemaps (Supplementary Fig. 3k). As reported in the main text, when using movement direction to generate egocentric boundary ratemaps, a total of 171 EBCs are identified.

Ratemap dispersion, coherence and field size: Ratemap dispersion was calculated as the mean distance between the ratemap bins with the top 10% of firing rates, while ratemap coherence was calculated as the correlation between the firing rate in each bin and the mean firing rate of all adjacent bins. Receptive field size was calculated as the area bounded by contours surrounding bins with firing rates >75% of the bin with the maximum firing rate.

Egocentric boundary cell classification: The first step in identifying EBCs involved calculating the MRL of each cell’s egocentric boundary directional firing independent of boundary distance (Supplementary Fig. 5b). First, the mean resultant was calculated as

$${\mathrm{MR}} = \left( {\mathop {\sum }\limits_{\theta = 1}^n \mathop {\sum }\limits_{D = 1}^m F_{\theta ,D} \ast {\mathrm{e}}^{{\mathrm{i}} \ast \theta }} \right)/\left( {n \ast m} \right),$$
(1)

where θ is the orientation relative to the rat, D is the distance from the rat, Fθ,D is the firing rate in a given orientation-by-distance bin, n is the number of orientation bins, m is the number of distance bins, e is the Euler constant, and i is the imaginary constant. Then MRL, used as a measure of boundary orientation specificity, is calculated as

$${\mathrm{MRL}} = {\mathrm{abs}}\left( {{\mathrm{MR}}} \right)$$
(2)

and the mean resultant angle (MRA), which is used as the preferred egocentric boundary orientation, is calculated as

$${\mathrm{MRA}} = {\mathrm{arctan2}}\left( {\frac{{{\mathrm{imag}}\left( {{\mathrm{MR}}} \right)}}{{{\mathrm{real}}\left( {{\mathrm{MR}}} \right)}}} \right).$$
(3)

The preferred egocentric boundary distance was calculated along each cell’s preferred egocentric boundary direction MRA by fitting the firing rate vector along that angle with a Weibull distribution and taking the distance bin with the maximum estimated firing rate as the cell’s preferred boundary distance (Supplementary Fig. 5c).

A shuffling procedure was used in order to obtain an MRL significance threshold for identifying EBCs. The spike train of each cell was shifted by random intervals ranging from 30 s to the full length of the recording minus 30 s relative to the behavioral data. Spike times shifted past the end of the behavioral session data were wrapped around to the beginning of the session. The shifted spike trains maintain the same firing statistics as the original spike train, but the spike times have been dissociated from the animal’s behavior. For each shifted spike train MRL was calculated and this procedure was bootstrapped 100 times for each cell, thus generating a distribution of MRL values from which the 99th percentile was identified and used as a threshold for identifying significant EBCs (Fig. 1f). In order to ensure that cells maintained a consistent representation throughout the initial recording session, the session was divided into halves and cells were classified as EBCs if all of the following criteria were met: (1) mean firing rate was >0.1 Hz, (2) MRL for both the 1st and 2nd half was greater than the 99th percentile of the shuffled distribution, (3) the change in MRA between the 1st and 2nd half was <45°, and (4) the change in preferred boundary distance between the 1st and 2nd half was <75% of the preferred distance for the whole session. The cells meeting these criteria were then clustered using the k-means clustering algorithm using firing rate, boundary direction MRL, MRA, preferred boundary distance, PropISIs>2 s (see below), egocentric ratemap coherence, egocentric ratemap dispersion, and field size values ranging from 25 to 85% of the maximum firing rate (10% steps) as features.

HDC classification: The MRL Rm was calculated for each cell as

$$R_{\mathrm{m}} = \frac{{{\mathrm{cos}}\left( {\bar \theta } \right)\mathop {\sum }\nolimits_{i = 1}^n F_i{\mathrm{cos}}\left( {\theta _i} \right) + {\mathrm{sin}}\left( {\bar \theta } \right)\mathop {\sum }\nolimits_{i = 1}^n F_i{\mathrm{sin}}\left( {\theta _i} \right)}}{{\mathop {\sum }\nolimits_{i = 1}^n F_i}},$$
(4)

where $$\bar \theta$$ was the head direction of firing andFi and θi were the firing rate and head direction for bin i. HDCs were identified as those cells with Rm >0.3.

Spatially stable allocentric cell classification: Cells with stable allocentric firing were identified as those cells with allocentric ratemaps for the two halves of a recording with a correlation >0.5 that were not already identified as either EBCs or HDCs.

Phasic vs. tonic firing: Previous reports identified striatal cells with phasic or tonic spiking properties19. Cell classification as phasic or tonic firing was based on post-spike suppression (PSS) and the proportion of interspike intervals (ISIs) shorter than 2 s (PropISIs>2 s). PSS quantifies the amount of time that it takes a cell to return to its mean firing rate following a spike. Using a 1 s window with 1 ms bins, the autocorrelation of each cell’s spike train was computed and smoothed with a 25 ms Hamming window. The duration of time following a spike for the firing rate to reach the mean was taken as the PSS. The proportion of time that a cell spends in long interval ISIs provides a measure of the regularity with which a cell spikes and was measured as the summation of all ISIs >2 s divided by the total session length. Cells with PropISIs>2 s above 0.4 were classified as phasically firing neurons, while cells with PropISIs>2 s below 0.4 and PSS <100 ms were classified as high firing neurons. As noted in the main text, almost all EBCs and iEBCs (97%) fired phasically.

Mixed Gaussian models: Distributions of preferred orientation or preferred distance were modeled as mixtures of Gaussian distributions using varying orders from 1 to 10. The optimal model was identified as the model that minimized the Akaike information criterion. The local maxima in the probability distribution function of the optimal model greater than the mean of the probability density function were identified and reported as the peaks of the distribution. This process was conducted on the data obtained from each individual animal (Supplementary Fig. 5f–i) and the distributions of peaks obtained from the individual animals were fit with Gaussian mixture models again allowing for a range of orders from 1 to 20 and identifying the optimal model as that which minimized the Akaike information criterion. The outcome of this approach is in line with fitting the distributions of preferred orientation and preferred distance for all EBCs with Gaussian mixture models and identifying the peaks of those models (compare Fig. 2d, h to Supplementary Fig. 5d, f).

### Statistics

Non-parametric statistics were used for all post hoc comparisons as the normality of the distributions was not assumed. Two-sided Wilcoxon’s signed rank tests were used with a p value threshold of 0.01 for all comparisons. The values reported throughout the text are the 25th, 50th, and 75th percentile of the relevant distribution.

### Reporting summary

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

## Data availability

The data used in this study are available from the corresponding author upon reasonable request.

## Code availability

The custom written code used to analyze the data in this study is available from the corresponding author upon reasonable request.

## References

1. 1.

O’Keefe, J. & Burgess, N. Geometric determinants of the place fields of hippocampal neurons. Nature 381, 425–428 (1996).

2. 2.

Barry, C., Hayman, R., Burgess, N. & Jeffery, K. J. Experience-dependent rescaling of entorhinal grids. Nat. Neurosci. 10, 682–684 (2007).

3. 3.

Stensola, H. et al. The entorhinal grid map is discretized. Nature 492, 72–78 (2012).

4. 4.

Lever, C., Burton, S., Jeewajee, A., O’Keefe, J. & Burgess, N. Boundary vector cells in the subiculum of the hippocampal formation. J. Neurosci. 29, 9771–9777 (2009).

5. 5.

Solstad, T., Boccara, C. N., Kropff, E., Moser, M. B. & Moser, E. I. Representation of geometric borders in the entorhinal cortex. Science 322, 1865–1868 (2008).

6. 6.

Boccara, C. N. et al. Grid cells in pre- and parasubiculum. Nat. Neurosci. 13, 987–994 (2010).

7. 7.

Byrne, P., Becker, S. & Burgess, N. Remembering the past and imagining the future: a neural model of spatial memory and imagery. Psychol. Rev. 114, 340–375 (2007).

8. 8.

Bicanski, A. & Burgess, N. A neural-level model of spatial memory and imagery. eLife 7, https://doi.org/10.7554/eLife.33752 (2018).

9. 9.

Wang, C. et al. Egocentric coding of external items in the lateral entorhinal cortex. Science 362, 945–949 (2018).

10. 10.

van der Meer, M. A., Johnson, A., Schmitzer-Torbert, N. C. & Redish, A. D. Triple dissociation of information processing in dorsal striatum, ventral striatum, and hippocampus on a learned spatial decision task. Neuron 67, 25–32 (2010).

11. 11.

Johnson, A., van der Meer, M. A. & Redish, A. D. Integrating hippocampus and striatum in decision-making. Curr. Opin. Neurobiol. 17, 692–697 (2007).

12. 12.

Regier, P. S., Amemiya, S. & Redish, A. D. Hippocampus and subregions of the dorsal striatum respond differently to a behavioral strategy change on a spatial navigation task. J. Neurophysiol. 114, 1399–1416 (2015).

13. 13.

Packard, M. G. & McGaugh, J. L. Inactivation of hippocampus or caudate nucleus with lidocaine differentially affects expression of place and response learning. Neurobiol. Learn. Mem. 65, 65–72 (1996).

14. 14.

Hintiryan, H. et al. The mouse cortico-striatal projectome. Nat. Neurosci. 19, 1100–1114 (2016).

15. 15.

Wiener, S. I. Spatial and behavioral correlates of striatal neurons in rats performing a self-initiated navigation task. J. Neurosci. 13, 3802–3817 (1993).

16. 16.

Taube, J. S. The head direction signal: origins and sensory–motor integration. Annu. Rev. Neurosci. 30, 181–207 (2007).

17. 17.

Schmitzer-Torbert, N. C. & Redish, A. D. Task-dependent encoding of space and events by striatal neurons is dependent on neural subtype. Neuroscience 153, 349–360 (2008).

18. 18.

Fyhn, M., Hafting, T., Treves, A., Moser, M. B. & Moser, E. I. Hippocampal remapping and grid realignment in entorhinal cortex. Nature 446, 190–194 (2007).

19. 19.

Muller, R. U. & Kubie, J. L. The effects of changes in the environment on the spatial firing of hippocampal complex-spike cells. J. Neurosci. 7, 1951–1968 (1987).

20. 20.

Peyrache, A., Schieferstein, N. & Buzsaki, G. Transformation of the head-direction signal into a spatial code. Nat. Commun. 8, 1752 (2017).

21. 21.

Zutshi, I., Leutgeb, J. K. & Leutgeb, S. Theta sequences of grid cell populations can provide a movement-direction signal. Curr. Opin. Behav. Sci. 17, 147–154 (2017).

22. 22.

Wilber, A. A., Clark, B. J., Forster, T. C., Tatsuno, M. & McNaughton, B. L. Interaction of egocentric and world-centered reference frames in the rat posterior parietal cortex. J. Neurosci. 34, 5431–5446 (2014).

23. 23.

Whitlock, J. R., Pfuhl, G., Dagslott, N., Moser, M.-B. & Moser, E. I. Functional split between parietal and entorhinal cortices in the rat. Neuron 73, 789–802 (2012).

24. 24.

Nitz, D. A. Spaces within spaces: rat parietal cortex neurons register position across three reference frames. Nat. Neurosci. 15, 1365–1367 (2012).

25. 25.

Alexander, A. S. & Nitz, D. A. Retrosplenial cortex maps the conjunction of internal and external spaces. Nat. Neurosci. 18, 1143–1151 (2015).

26. 26.

Paxinos, G. & Watson, C. The Rat Brain in Stereotaxis Coordinates 7th edn (Elsevier Academic Press, San Diego, 2014).

## Acknowledgements

We would like to thank Andrew Alexander, Mark Brandon, and Jason Climer for helpful discussions and comments, as well as Britahny Baskin for technical assistance. This research was supported by National Institutes of Health NIMH R01 MH061492 and MH060013 and Office of Naval Research MURI grant N00014-16-1-2832 and N00014-18-S-F006.

## Author information

Authors

### Contributions

J.R.H. and M.E.H. designed the study. J.R.H. conducted all aspects of the experiments. J.R.H. and G.W.C. analyzed the data. J.R.H. and M.E.H. wrote the paper and G.W.C. provided feedback on the paper.

### Corresponding authors

Correspondence to James R. Hinman or Michael E. Hasselmo.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

Peer review information: Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. Peer reviewer reports are available.

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

## Rights and permissions

Reprints and Permissions

Hinman, J.R., Chapman, G.W. & Hasselmo, M.E. Neuronal representation of environmental boundaries in egocentric coordinates. Nat Commun 10, 2772 (2019). https://doi.org/10.1038/s41467-019-10722-y

• Accepted:

• Published:

• ### Reinforcement learning approaches to hippocampus-dependent flexible spatial navigation

• Charline Tessereau
• , Reuben O’Dea
• , Stephen Coombes
•  & Tobias Bast

• ### Mouse entorhinal cortex encodes a diverse repertoire of self-motion signals

• Caitlin S. Mallory
• , Kiah Hardcastle
• , Malcolm G. Campbell
• , Alexander Attinger
• , Isabel I. C. Low
• , Jennifer L. Raymond
•  & Lisa M. Giocomo

Nature Communications (2021)

• ### Vector trace cells in the subiculum of the hippocampal formation

• Steven Poulter
• , Sang Ah Lee
• , James Dachtler
• , Thomas J. Wills
•  & Colin Lever

Nature Neuroscience (2021)

• ### Overview of computational models of hippocampus and related structures: Introduction to the special issue

• Michael E. Hasselmo
• , Andrew S. Alexander
• , Holger Dannenberg
•  & Ehren L. Newman

Hippocampus (2020)

• ### Neurobiological successor features for spatial navigation

• William Cothi
•  & Caswell Barry

Hippocampus (2020)