# Entorhinal-retrosplenial circuits for allocentric-egocentric transformation of boundary coding

1. Max Planck Institute for Brain Research, Germany
2. Institute of Neurophysiology, Neuroscience Center, Goethe University, Germany
Research Article

## Abstract

Spatial navigation requires landmark coding from two perspectives, relying on viewpoint-invariant and self-referenced representations. The brain encodes information within each reference frame but their interactions and functional dependency remains unclear. Here we investigate the relationship between neurons in the rat's retrosplenial cortex (RSC) and entorhinal cortex (MEC) that increase firing near boundaries of space. Border cells in RSC specifically encode walls, but not objects, and are sensitive to the animal’s direction to nearby borders. These egocentric representations are generated independent of visual or whisker sensation but are affected by inputs from MEC that contains allocentric spatial cells. Pharmaco- and optogenetic inhibition of MEC led to a disruption of border coding in RSC, but not vice versa, indicating allocentric-to-egocentric transformation. Finally, RSC border cells fire prospective to the animal’s next motion, unlike those in MEC, revealing the MEC-RSC pathway as an extended border coding circuit that implements coordinate transformation to guide navigation behavior.

## Introduction

Animals use landmarks in the environment as references to identify the self’s position and a destination in space. Rodents, for example, are able to discriminate positions within an open?field arena by relying on distal cues in the room, allowing them to navigate to a desired location (Morris, 1981). This ability is manifested in the activity of neurons that fire at particular locations in space, such as place cells or grid cells (Hafting et al., 2005; O'Keefe and Dostrovsky, 1971), and population activity of place cells can distinguish nearby positions at several centimeter resolution in an open field arena (Brown et al., 1998). It has been suggested that this accurate spatial coding is based on the estimation of distance and direction relative to landmarks, particularly environmental boundaries such as walls or edges (Barry et al., 2006; O'Keefe and Burgess, 1996). For example, a subpopulation of neurons in the medial entorhinal cortex (MEC) or the subiculum increase firing rates near the environmental boundaries, called border cells or boundary-vector cells (Lever et al., 2009; Solstad et al., 2008). The presence of dedicated representations of environmental borders in the hippocampus and parahippocampal regions implies a pivotal role of boundary information in generating accurate spatial representations in the brain. In accordance with this idea, border cells in MEC develop earlier than grid cells after birth, exhibiting adult-like firing fields at postnatal days 16–18?when grid cells still exhibit immature irregular firing fields (Bjerknes et al., 2014). It has further been shown that position errors of firing fields of grid cells accumulate after the animal leaves a wall of an open?field arena, suggesting an error-correcting role of environmental boundaries for internal spatial representations (Hardcastle et al., 2015).

While neurons in MEC or subiculum represent environmental boundaries in a viewpoint-invariant allocentric coordinate frame, recent studies have identified neurons that encode various spatial landmarks in a self-centered egocentric perspective, for example, objects in the lateral entorhinal cortex (Wang et al., 2018), the arena center in the postrhinal cortex (LaChance et al., 2019) and nearby boundaries in the dorsomedial striatum (Hinman et al., 2019), postrhinal cortex (Gofman et al., 2019), and retrosplenial cortex (Alexander et al., 2020). These neurons exhibit spatial tuning relative to the self’s body, providing information about the direction and distance of landmarks from the animal’s viewpoint. The brain thus forms landmark representations in two different reference frames, in either egocentric or allocentric spatial coordinate systems. It is however still largely unclear how each type of representation is generated, and the degree of functional interaction and dependency that exists between them.

Self-referenced representations can be generated directly by sensory inputs, as incoming sensory information is initially anchored to sensory organs mapped on the body, for example, visual information on the retina, tactile sensation on the skin, or proprioceptive signals from skeletal muscles. This information may then be used to constitute viewpoint-invariant allocentric spatial representations, or a cognitive map (Hafting et al., 2005; McNaughton et al., 2006; O’Keefe and Nadel, 1978), implying the importance of transformation from egocentric to allocentric coordinate frames. It is however also possible that egocentric representations are the result of a coordinate transformation of the brain’s allocentric map to guide the animal’s behavior, because navigational plans and their underlying sequence of motor actions based on the internal map should be executed in the brain’s motor areas in self-referenced coordinates (Ekstrom et al., 2014; Georgopoulos, 1988). While previous studies suggested the importance of coordinate transformation for spatial navigation relying on the brain’s allocentric map (Bicanski and Burgess, 2018; Byrne et al., 2007; Clark et al., 2018), the direct evidence of such transformation in the brain is still missing. Furthermore, clarification of the direction of transformation, either from allocentric to egocentric or vice versa, is necessary to understand the roles of egocentric landmark coding in navigation.

In the present work, we address the functional relationships of boundary representations in different coordinate frames that exist in reciprocally-connected brain regions, the retrosplenial (RSC) and medial entorhinal cortex (MEC). We first established a quantitative metric to characterize a subpopulation of neurons in RSC that increase their firing rates near environmental borders. Unlike border cells in MEC, those in RSC fire indiscriminately to all walls, and a subset of them are additionally modulated by the animal’s head-direction relative to the closest wall, providing information about the distance and direction to nearby boundaries in an egocentric coordinate frame. We explored under which environmental circumstances this information is generated to determine the impact of sensory and spatial cues on boundary coding in RSC. We then examined the functional dependence between border cells in MEC and RSC with pharmacogenetic and optogenetic inactivation techniques, clarifying coordinate transformation between the regions. Lastly, by applying decoding and spike information metrics, we demonstrate that firing of border cells in RSC exhibits additional correlates with the animal’s next movements, revealing the role of the MEC-RSC pathway in interfacing the brain’s allocentric map with navigation behaviors.

## Results

### RSC cells fire near the maze perimeter at specific distances

We performed electrophysiological recordings of neuronal activity in RSC (Figure 1A, Figure 1—figure supplement 1) of rats as they explored a squared open field arena and foraged for scattered chocolate pellets (Figure 1B). All animals were sufficiently habituated to the environment and procedures, and actively explored the entire arena (Figure 1C). The experimental setup was placed in the room with fixed landmarks to allow the animals to orient themselves relative to external features.

Figure 1 with 4 supplements see all

We recorded the activity of 5415 RSC neurons across eight animals (n?=?82 sessions) and observed a subpopulation of cells that fired consistently at the edge of the arena (Figure 1C). Across this subgroup, there was a variety of preferred firing distances from the wall, ranging from very near proximity up to a body-length (15–18 cm) away. Unlike traditional border cells found in MEC and subiculum (Solstad et al., 2008; Stewart et al., 2014), these border responses occurred throughout the environment on each of the four available walls. RSC border cells furthermore form multiple firing fields that are not necessarily directly connected to the wall. Typical border cell classification using the original border score (Solstad et al., 2008) identified only a small fraction of border cells in RSC, as this score is based on the occupancy of a single firing field along a wall and is strongly biased to connected bins (Figure 1—figure supplement 2A–C). We thus developed a new model-based approach using a template-matching procedure to classify these border cells in RSC (Figure 1D–F), based on Grossberger et al., 2018.

This method uses two-dimensional (2D) information of the firing rate maps and builds on the assumption that border cells have their spikes concentrated at the entire outer ring of the arena, incorporating geometric information into the classification procedure. The dissimilarity between a cell’s spatial firing rate map and a ‘boundary’ template (Figure 1D,E) was assessed by the algorithm based on the Earth Mover's Distance (Hitchcock, 1941; Rubner et al., 1998) (EMD; see Materials?and?methods), a distance metric from the mathematical theory of optimal transport. The EMD is a normalized score, calculated as the minimum cost required to match a cell’s firing rate map with the template distribution by moving firing rate units, also known as the Wasserstein distance. While this metric is sensitive to a change in the geometric shape of rate maps, it is robust to small variations of preferred firing distances or pixel-by-pixel jittering, giving a single metric that can quantitatively assess changes in the cell's spatial tuning as a function of experimental manipulations, such as reshaping of the maze or adding an object or wall.

Border cells were defined as cells with a low dissimilarity EMD score below the 1st percentile of a spike-shuffled null distribution of 0.191, and an average firing rate (FR) above 0.5 Hz. Null distributions of EMD scores were invariant to the overall FR of cells included, giving a consistent criterion across cells (Figure 1—figure supplement 2F). In total, 485 out of 5415 RSC cells (9.0%) passed this criterion (Figure 1E,F, Figure 1—figure supplement 2G), where neurons showed no relationship between their overall spiking rate and associated EMD score (Pearson’s correlation: r?=?0.037, p=0.42; Figure 1—figure supplement 2D). Selected border cells had a similar distribution of average firing rates compared to other recorded cells (border cells: FR?=?2.97?±?0.20 Hz, others: FR?=?3.25?±?0.07 Hz; Wilcoxon ranksum test: z?=?0.057, p=0.955; Figure 1G), but had significantly higher spatial correlations between the first and last recording sessions (border cells: r?=?0.52?±?0.008, others: r?=?0.20?±?0.003; Wilcoxon ranksum test: z?=??24.50, p=1.60?×?10?132; Figure 1H). Border cells were recorded across the granular and dysgranular regions of the RSC, and had waveform properties similar to other cells recorded on the same tetrodes (Figure 1—figure supplement 3A,B,D,E). Border cells showed activity already from the beginning of the session and did not need time for adaptation in a novel arena and experimental room (first-half familiar session, FR?=?1.98?±?0.42 Hz; first-half novel session, FR?=?2.30?±?0.53 Hz, p=0.56; second half novel session, FR?=?1.71?±?0.54 Hz, p=0.68; Wilcoxon signed-rank test; n?=?14 border cells; Figure 1—figure supplement 4D–G). While firing of RSC border cells was additionally modulated by the running speed of the animal, with lower firing rates in the low-speed range (p<0.05 in the range of 0–12 cm/s; Wilcoxon ranksum test; Figure 1—figure supplement 3G), this modulation could not account for the cell’s spatial tuning, as the animal’s average speed was uniform across space and unrelated to the distance to any boundary (non-significant in the range of 5–45 cm; Wilcoxon ranksum test against overall median; Bonferroni-corrected α?=?0.005; Figure 1—figure supplement 3F,H). Applying an unbiased classification approach based on linear-nonlinear models (Hardcastle et al., 2017) showed that running speed and wall-distance are two independent factors that explain the activity of RSC cells, confirming that RSC border and speed tuning are separately expressed features (Figure 1—figure supplement 3C).

### Border cells form new firing fields nearby added walls but not objects

Figure 2

To investigate generalization to other environmental features, we further added additional objects to the arena and tested the specificity of border responses to the spatial layout (Figure 2F,G). The size of the object was 10 cm in diameter, and the animal could walk around or climb on top without it impeding the animal’s movement completely. Contrary to an added wall, RSC border cells maintained tuning only to the outer walls and did not fire whenever objects were inside their receptive field (Circular ROI, eight bins in diameter; Regular: FR?=?1.39?±?0.26 Hz; Added object: FR?=?1.42?±?0.21 Hz; Wilcoxon signed-rank test: z?=??0.63, p=0.53; n?=?23 border cells; Figure 2H). EMD analyses however showed a significant increase in dissimilarity to the boundary template in the object sessions (Normalized boundary EMD score: R1, 1.0?±?0, O1, 1.097?±?0.031, O2, 1.079?±?0.028, R2, 1.024?±?0.021; Friedman test: X2(3)=14.7, p=0.002; Post-hoc Wilcoxon signed-rank test: R1-O1, z?=??2.74, p=0.006, R1-O2, z?=??2.62, p=0.009, R1-R2, z?=??1.00, p=0.32; Bonferroni-corrected α?=?0.017; Figure 2J), indicating changes in the rate maps by the object. This change was not due to new firing fields around the object, however, because fitting an ‘object’ template did not lead to a decrease in dissimilarity during object sessions (Normalized object EMD score: R1, 1.0?±?0, O1, 1.026?±?0.026, O2, 0.995?±?0.029, R2, 0.990?±?0.025; Friedman test: X2(3)=2.32, p=0.51; Figure 2J). The maintenance of original firing fields was further confirmed by spatial correlations across session types that did not drop when comparing rate maps between regular and object sessions, neither for the outer rows of pixels adjacent to the walls (Reg-Reg: r?=?0.36?±?0.07, Object-Object: r?=?0.47?±?0.07; z?=??0.88, p=0.38; Reg-Object: r?=?0.45?±?0.07; comparing with R-R: z?=??1.28, p=0.20; comparing with R-O: z?=?1.16, p=0.25; Wilcoxon signed-rank test; Bonferroni-corrected α?=?0.017; Figure 2I, right panel), nor the inner area surrounding the object (Reg-Reg: r?=?0.29?±?0.07, Object-Object: r?=?0.49?±?0.05: z?=??1.58, p=0.11; Reg-Object: r?=?0.33?±?0.07; comparing with R-R: z?=??0.49, p=0.63; comparing with R-O: z?=?1.16, p=0.25; Wilcoxon signed-rank test; Bonferroni-corrected α?=?0.017; Figure 2I, left panel). Taken together, these results indicate that RSC border cells encode information that is specific to boundaries of the spatial layout where cell responses differentiate between the types of added features.

### Border cells retain their tuning in darkness and are not driven directly by whisker sensation

One way for border cells to compute information of boundaries is through direct sensory detection of the walls, for example, by whisking or visual observation (Raudies and Hasselmo, 2012). We investigated the importance of direct sensory input on border tuning by removing either visual or somatosensory information of the boundary (Figure 3A,E). First, to assess the impact of visual information, we introduced an infrared position tracking system as opposed to regular light-emitting diodes (LED; see Materials?and?methods) to ensure no visible light was present in the maze for animals to identify boundaries. We recorded the activity of RSC border cells in both dim-light and darkness conditions, but observed no significant changes in EMD dissimilarity scores across the sessions (Boundary EMD score: R1, 0.183?±?0.001, D1, 0.185?±?0.003, D2, 0.177?±?0.003, R2, 0.182?±?0.002; Friedman test: X2(3)=1.23, p=0.75; n?=?21 border cells; Figure 3B,D). There were also no changes across spatial correlations between different session types (Reg-Reg: r?=?0.42?±?0.03, Reg-Dark: r?=?0.38?±?0.03; Wilcoxon signed-rank test z?=?0.61, p=0.54; Dark-Dark: r?=?0.42?±?0.05, Wilcoxon signed-rank test with Reg-Reg correlation, z?=?1.20, p=0.23; Bonferroni-corrected α?=?0.025; Figure 3C), indicating that activity is not generated through visual sensory input.

Figure 3 with 1 supplement see all

In order to examine the role of tactile sensation on boundary representations, we next removed all four outer walls that left a drop-edge above the floor, limiting movement of the animal in the absence of direct somatosensory information of a physical barrier (Figure 3E). The EMD scores showed that the majority of border cells were unaffected by the wall removal, with no significant changes in the drop-edge session (Unaffected cells: boundary EMD score: R1, 0.183?±?0.002, Drop, 0.186?±?0.003, R2, 0.183?±?0.001; Friedman test: X2(2)=4.59, p=0.10; n?=?17 border cells; Figure 3G). However, a subset of cells had disrupted firing nearby the boundary edges (n?=?8/25 affected cells, separated based on an increase in EMD that exceeded the 95th-percentile of a null distribution of change, computed using the differences between first and last regular sessions; boundary EMD score: R1, 0.169?±?0.008, Drop, 0.202?±?0.004, R2, 0.175?±?0.006; Friedman test: X2(2)=11.0, p=0.004; Post-hoc Wilcoxon signed-rank test: R1-Drop, z?=??2.95, p=0.003, R1-R2, z?=?0, p=1.0; Bonferroni-corrected α?=?0.025; Figure 3G). A similar result emerged from the spatial correlations, where rate map correlations remained high when comparing regular and drop-edge sessions, but only for the unaffected cells that had stable EMD scores across session type (Unaffected cells: Reg-Reg, r?=?0.50?±?0.04, Reg-Drop, r?=?0.45?±?0.04; Wilcoxon signed-rank test: z?=?1.21, p=0.23; Affected cells: Reg-Reg, r?=?0.57?±?0.05, Reg-Drop, r?=?0.14?±?0.07; Wilcoxon signed-rank test: p=0.008; Figure 3H).

To directly test the necessity of whisker-mediated tactile sensation, we trimmed the animal’s whiskers after which they freely explored the arena (Figure 3—figure supplement 1A,B). We did not observe a significant change in the proportion of border cells in RSC after the trimming of whiskers (intact whiskers: 29/276 cells classified as border cells, boundary EMD score?=?0.183?±?0.002; trimmed whiskers: 23/285 cells classified as border cells, boundary EMD score?=?0.186?±?0.005; change in proportion of border cells: z?=?1.00, p=0.32, binomial test; Figure 3—figure supplement 1B), nor did we see a change in the?overall firing rates (before: FR?=?1.58?±?0.38; after: FR?=?1.16?±?0.47; Wilcoxon signed-rank test: z?=?1.04, p=0.30; Figure 3—figure supplement 1C), suggesting that whisker sensation is not essential for boundary representation. We further recorded from cells located in the barrel field region of the somatosensory cortex (S1bf) in order to understand the nature of somatosensory information through whiskers (Figure 3—figure supplement 1D–F). Although we were able to identify a subpopulation of cells that fired nearby boundaries in the somatosensory cortex (n?=?23/173 cells classified as border cells using the same criteria; Figure 3—figure supplement 1G), an important difference with RSC cells is that S1bf neurons fired consistently near added objects when introduced into the arena, highlighting the selective tuning of RSC border cells to boundaries but not objects (Normalized boundary EMD score: R1, 1.0?±?0, O1, 1.067?±?0.01, O2, 1.084?±?0.01, R2, 0.971?±?0.01; Friedman test: X2(3)=47.1, p=3.3?×?10?10; Post-hoc Wilcoxon signed-rank test: R1-O1, z?=??3.65, p=2.6?×?10?4, R1-O2, z?=??3.89, p=9.9?×?10?5, R1-R2, z?=?2.95, p=0.003; Bonferroni-corrected α?=?0.017; Normalized object EMD score: R1, 1.0?±?0 O1, 0.977?±?0.005, O2, 0.967?±?0.005, R2, 1.015?±?0.004; Friedman test: X2(3)=47.5, p=2.7?×?10?10; Post-hoc Wilcoxon signed-rank test: R1-O1, z?=?3.50, p=4.7?×?10?4, R1-O2, z?=?3.80, p=1.4?×?10?4, R1-R2, z?=??3.16, p=0.002; Bonferroni-corrected α?=?0.017; Figure 3—figure supplement 1H). Together, these results suggest that the activity of RSC border cells is not simply driven by the detection of boundaries through visual or tactile sensation, and their distinct firing around boundaries but not objects implies additional computations in the brain.

### Egocentric border cells are invariant following the rotations of allocentric place and head-direction cells

Our results so far suggest that RSC border cells are sensitive to the spatial layout of the environment, allowing for the distinction between boundaries and objects. However, recent reports point to the?egocentric tuning of neurons in the postrhinal cortex, RSC or striatum to walls or the center of the maze, suggesting anchoring to local features of the environment (Alexander et al., 2020; Hinman et al., 2019; LaChance et al., 2019). To better clarify how border cells are anchored to the environment, we explored the impact on RSC cells of global environmental manipulations under which allocentric spatial cells shift their firing fields (Knierim and Rao, 2003).

We first confirmed that RSC border cells described here have a similar direction tuning as reported in Alexander et al., 2020, where spikes that occur near?the wall are constraint by specific directions of the animal relative to the boundary (Figure 4A). Across the population of border cells identified with the EMD metric, 190 out of 485 neurons (39.2%) had significant egocentric directional tuning, with mean vector lengths above the 95th percentile of a spike-shuffled distribution in all regular sessions (Figure 4—figure supplement 1A,B). Conversely, only 190 out of 666 directionally-tuned cells (28.5%) had additional boundary-distance tuning (Figure 4—figure supplement 1A), making the population of?neurons?reported here considerably different from Alexander et al., 2020. Projecting trajectory data onto new body-centric axes, where coordinates indicate distance and direction of the nearest wall relative to the animal, confirmed that directionally-tuned border cells fired predominantly whenever the wall occupied proximal space at a particular angle from the animal’s viewpoint (Figure 4B,C, Figure 4—figure supplement 2).

Figure 4 with 2 supplements see all

### RSC cells have biased directional tuning to boundaries in the contralateral side of the recorded hemisphere

To further obtain the functional implications, we asked if any directional bias of egocentric tuning exists in RSC border cells by performing large-scale recordings from both hemispheres. Across the population, cells were tuned predominantly to the very near proximity (main peak at 5 cm; Figure 4J), although some cells had fields at extended distances up to 20 cm away from the wall. In order to account for a potential proximity bias of our boundary template, we simulated a set of synthetic neurons that fire at specific wall distances using all behavioral data, and found that our boundary template was able to classify cells with firing fields up to 18 cm away from the walls (Figure 4—figure supplement 1C). However, cell classification using new templates with fields at increasing distances did not yield a substantial new number of cells (Figure 4—figure supplement 1D), confirming that the majority of RSC border cells exhibit distance tuning at the proximity of walls.

Regarding their preferred egocentric tuning direction, we observed a disproportionately biased distribution of preferred directions, dependent on the hemisphere where cells were recorded (Left hemisphere: mean direction = ?114°, z?=?3.16, p=0.041; n?=?41 directionally-tuned border cells; Right hemisphere: mean direction?=?41°, z?=?38.8, p=9.1?×?10?19; n?=?149 directionally-tuned border cells; Rayleigh test; comparing both distributions: two-sample Kuiper test, k?=?3.1?×?103, p=0.001; Figure 4I). The majority of border cells were tuned to the contralateral side of the recorded hemisphere, although not exclusively (Figure 4I). This hemisphere-specific tuning bias implies that boundary representations in RSC may be generated by direct sensory signals, or reflect the command of motor actions, in both of which it arises along the right-left body axis. However, a loss of tactile sensation by whisker trimming had no effect on the extent of directional tuning of border cells (before trimming: 7/49 cells had significant directional tuning, MVL?=?0.538?±?0.06; after trimming: 10/49 cells were significantly tuned, MVL?=?0.502?±?0.08; change in MVL: t(6) = 1.80, p=0.12, t-test; change in cell proportion: z?=?1.05, p=0.29, binomial test; Figure 3—figure supplement 1A,B), nor did recording in complete darkness affect the directional tuning of cells (light conditions: 5/21 cells had significant directional tuning, MVL?=?0.326?±?0.07; darkness: 4/5 cells maintained their tuning, 2/16 cells were tuned only in darkness, MVL?=?0.318?±?0.05; change in MVL: t(4) = ?0.51, p=0.64, t-test; change in cell proportion: z?=?0.33, p=0.75, binomial test), implying that this bias is not a direct consequence of the lateralized nature of sensory input.

### Inhibition of MEC input disrupts border coding in RSC but not vice versa

While our results suggest that egocentric boundary coding in RSC is likely formed by using allocentric position and head-direction signals, the exact underlying circuit mechanism has not been determined. The RSC is known to have direct, bi-directional connections with the medial entorhinal cortex?(MEC) (Jones and Witter, 2007; Ohara et al., 2018), which contains several types of neurons that exhibit allocentric spatial tuning such as grid cells, head-direction cells or border cells (Boccara et al., 2010; Hafting et al., 2005; Sargolini et al., 2006; Solstad et al., 2008). Given the presence of boundary-responsive cells in both RSC and MEC, it is crucial to establish the direction and extent of functional dependence between these brain regions.

We first addressed the question of whether there is any communication between MEC and RSC in terms of encoding border information using pharmacogenetic inactivation techniques (Armbruster et al., 2007). We injected an AAV encoding the inhibitory DREADDs hM4Di into MEC, while simultaneously implanting a 28-tetrode hyperdrive into RSC (Figure 5A, Figure 5—figure supplement 1). Subcutaneous administration of agonist-21 (DREADDs agonist; Thompson et al., 2018) resulted in a drastic reduction of firing after 20 min for a group of cells in MEC that were infected with the virus (26 out of 44 cells recorded near the injection site with additional tetrodes in MEC significantly reduced their firing rates to 47.2 ± 5.5% of their baseline firing; Figure 5B, Figure 5—figure supplement 1), while not affecting the?running speed of the animal (Figure 5—figure supplement 1). Inactivation of MEC led to a subsequent partial disruption of firing in a subset of RSC border cells (Figure 5C), worsening border tuning that resulted in higher EMD scores (before: EMD score?=?0.181?±?0.002, after: EMD score?=?0.186?±?0.003; Wilcoxon signed-rank test: z?=??2.40, p=0.016; n?=?102 border cells; Figure 5D) and lower overall firing rates after the manipulation (before: FR?=?1.52?±?0.20 Hz, after: FR?=?1.12?±?0.24 Hz, Wilcoxon signed-rank test: z?=?3.15, p=0.0016; Figure 5E). Next,?we performed a reversed manipulation, injecting the virus encoding DREADDs hM4Di into RSC while recording neural activity in MEC (Figure 5F, Figure 5—figure supplement 1). Administration of agonist-21 led to similar decreased activity in RSC for the infected cells (Figure 5G), but RSC inhibition had no significant effect on MEC border cell tuning (before: border score?=?0.53?±?0.013, after: border score?=?0.53?±?0.01; Wilcoxon signed-rank test: z?=?0.56, p=0.57; n?=?83 border cells; Figure 5H,I) or average firing rates (before: FR?=?1.33?±?0.11 Hz, after: FR?=?1.27?±?0.12 Hz; Wilcoxon signed-rank test: z?=??0.31, p=0.76; Figure 5J).

Figure 5 with 4 supplements see all

While these DREADDs-mediated manipulation experiments suggest the involvement of MEC signals for border computations in RSC, it is possible that MEC inhibition had only an indirect effect on RSC activity, for example by reducing inputs to other communication partners of RSC such as the subiculum (Roy et al., 2017). We thus performed two additional manipulation experiments that directly target the MEC-RSC pathway, using optogenetic techniques. We first injected an AAV encoding inhibitory Halorhodopsin chloride pumps (eNpHR3.0; Zhang et al., 2007) into MEC, combined with the implantation of tetrodes and an optic fiber in RSC, allowing for silencing of axon terminals of MEC neurons that project to RSC (Figure 5K, Figure 5—figure supplement 2). Our second approach was to inject a retroAAV (Tervo et al., 2016) encoding red-shifted Cruxhalorhodopsin chloride pumps (Jaws; Chuong et al., 2014) into RSC together with a silicon-probe for neural recordings, while an optic fiber was placed at the dorsal edge of MEC to allow for cell-body inhibition of RSC-projecting neurons (Figure 5M, Figure 5—figure supplement 2). This virus was expressed specifically in the?deeper layers of MEC, with a gradient that decayed from dorsal to the ventral regions (Figure 5M, Figure 5—figure supplement 2). Activation of laser light during behavior of the animal led to a subsequent disruption of border coding in RSC, with cells losing specificity of firing near the edges and forming firing fields in the center of the arena (Figure 5L,N), resulting in an increase in EMD dissimilarity scores across the population, both for axon-terminal inhibition (Boundary EMD score: laser OFF1, 0.187?±?0.003, laser ON, 0.203?±?0.003, laser OFF2, 0.190?±?0.005; Friedman test: X2(2)=6.9, p=0.032; Post-hoc Wilcoxon signed-rank test: OFF1-ON, z?=??3.45, p=5.7?×?10?4, OFF1-OFF2, z?=??1.55, p=0.12; Bonferroni-corrected α?=?0.025; n?=?34 border cells; Figure 5O, Figure 5—figure supplement 3B) and cell-body inhibition (Boundary EMD score: laser OFF1, 0.184?±?0.002, laser ON, 0.192?±?0.002, laser OFF2, 0.189?±?0.002; Friedman test: X2(2)=24.5, p=4.7?×?10?6; Post-hoc Wilcoxon signed-rank test: OFF1-ON, z?=??4.97, p=6.7?×?10?7, OFF1-OFF2, z?=??4.11, p=4.0?×?10?5; Bonferroni-corrected α?=?0.025; n?=?141 border cells; Figure 5O, Figure 5—figure supplement 3B) that partially recovered after turning laser light off. Unlike our DREADD inhibition results, there were no significant changes in the overall firing rates of RSC border cells (Laser ON: normalized FR?=?0.94?±?0.04, Wilcoxon signed-rank test: z?=?1.68, p=0.09; laser OFF2: normalized FR?=?0.96?±?0.04, Wilcoxon signed-rank test: z?=??1.80, p=0.07; Figure 5—figure supplement 3A), and there were no observable changes in the behavior of the animals (Figure 5—figure supplement 3D–F). Cell classification criteria allowed cells to drop their average firing rates below the rate threshold of 0.5 Hz in the manipulated session, as a reduction in spiking rate indicates disrupted coding. In order to confirm that the increased EMD scores during MEC inhibition were not driven by spurious rate maps of low-firing cells, we repeated the EMD analysis after excluding all cells with an average firing rate below 0.5 Hz in the laser ON session (axon-terminal inhibition, identical results with 34/34 cells; cell-body inhibition, Boundary EMD score: laser OFF1, 0.183?±?0.002, laser ON, 0.192?±?0.002, laser OFF2, 0.189?±?0.002; Friedman test: X2(2)=26.9, p=1.4?×?10?6; Post-hoc Wilcoxon signed-rank test: OFF1-ON, z?=??5.26, p=1.4?×?10?7, OFF1-OFF2, z?=??4.51, p=6.6?×?10?6; Bonferroni-corrected α?=?0.025; n?=?138/141 border cells), but obtained the same conclusions.

In order to control for non-specific effects of laser application, we performed an additional control experiment in two animals (Figure 5—figure supplement 4). Recording of RSC neurons in the absence of inhibitory opsin expression showed stable firing patterns for border cells near all boundaries of the environment, before, during and after the application of laser light, with no changes for the neurons in their EMD scores (Boundary EMD score: laser OFF1, 0.173?±?0.002, laser ON1, 0.176?±?0.003, laser ON2, 0.174?±?0.004, laser OFF2, 0.170?±?0.001; Friedman test: X2(3)=5.44, p=0.14; n?=?33 border cells; Figure 5—figure supplement 4D) or overall firing rates (FR: laser OFF1, 2.95?±?0.72, laser ON1, 2.43?±?0.75, laser ON2, 2.39?±?0.88, laser OFF2, 2.78?±?0.68; Friedman test: X2(3)=2.64, p=0.45; Figure 5—figure supplement 4C), confirming that the impairment of boundary tuning in RSC during laser application is specific to the silencing of MEC inputs.

In contrast to border cells, our optogenetic manipulations did not affect allocentric head-direction tuning in RSC, with no changes in firing rate (Average FR: laser OFF1, 1.86?±?0.53, laser ON, 1.68?±?0.61, laser OFF2, 1.91?±?0.62; Friedman test: X2(2)=0.17, p=0.92; n?=?47 HD cells; Figure 5—figure supplement 3G), mean vector length (MVL: laser OFF1, 0.29?±?0.03, laser ON, 0.26?±?0.03, laser OFF2, 0.28?±?0.03; Friedman test: X2(2)=6.64, p=0.036; Post-hoc Wilcoxon signed-rank test: OFF1-ON, z?=?2.17, p=0.030, OFF1-OFF2, z?=?1.92, p=0.055; Bonferroni-corrected α?=?0.025; Figure 5—figure supplement 3H), nor a shift in the?preferred direction (Shift in preferred direction: laser OFF1-ON, 0.056?±?0.06; Wilcoxon signed-rank test: z?=?0.95, p=0.34; laser OFF1-OFF2, ?0.005?±?0.07; Wilcoxon ranksum test: z?=?0.20, p=0.84; Bonferroni-corrected α?=?0.025; Figure 5—figure supplement 3I) for allocentric head-direction cells, indicating that the head-direction signal in RSC is likely provided by brain regions other than MEC, for example, the anterodorsal thalamic nucleus (Mitchell et al., 2018). Further analysis on spatially-stable cells, classified based on high spatial correlations across sessions (see Figure 4H), shows that inhibition of MEC did affect firing of spatial cells in RSC, as spatial correlations significantly dropped during laser on sessions (spatial correlations: laser OFF1-OFF2, r?=?0.59?±?0.02, laser OFF1-ON, r?=?0.44?±?0.03; Wilcoxon signed-rank test: z?=?5.87, p=4.5?×?10?9; n?=?83 spatial cells; Figure 5—figure supplement 3C), suggesting that spatial firing beyond border cording is contingent on spatial information coming from MEC. Altogether our manipulation results confirm that both RSC and MEC are involved in a broader border coding network, where border representations in RSC are dependent on direct inputs from MEC but not vice versa.

### RSC border coding is more local and correlated with the animal’s future motion

We have shown that MEC input is necessary to maintain sharp border tuning in RSC. However, border cells in both regions differ in their respective firing properties, for example, MEC border cells have firing fields consistently attached to only one or two walls rather than all, indicating allocentric representations of boundaries (two examples shown in Figure 6A; variance between average FR near each wall: RSC, CV?=?0.103?±?0.004, MEC, CV?=?0.458?±?0.02; Wilcoxon ranksum test: z?=??13.25, p=4.6?×?10?40; Figure 6—figure supplement 1C). This raises the question of how spatial information in MEC converges and maps onto RSC border cells. We thus compared the nature and content of information present in spikes of border cells between both regions with respect to the animal’s behavior.

Figure 6 with 1 supplement see all

We first quantified the spatial information carried by spikes?of?border cells in RSC and MEC at a population level. The peak firing rates of border cells in RSC were lower than in MEC (RSC: FR?=?4.02?±?0.53 Hz, MEC: FR?=?5.30?±?0.47 Hz, Wilcoxon ranksum test: z?=?2.79, p=0.0053; Figure 6—figure supplement 1D), but both populations had a similar distribution of peak distance tuning (Figure 4J, Figure 6—figure supplement 1E). Regarding directional tuning properties, we observed that nearly all directionally-selective border cells in RSC have egocentric directional tuning, while MEC border cells show a high degree of conjunctive selectivity to allocentric head-direction (Figure 6B). A decoder based on support vector machines estimated the animal's distance away from the wall using population spiking activity, and performed with high accuracy for both MEC and RSC in the lower distance range (p<0.05 for 0–20 cm, compared with a chance level of 20%; Figure 6C), whereas the animal’s running speed was not significantly different across distance bins (Kruskal-Wallis test: X2(4)=3.24, p=0.519). However, decoding performance from RSC activity dropped to chance level in the higher distance range (p>0.05 for 30–50 cm; Figure 6C), suggesting RSC border cells mainly encode local information. This matches the firing properties of RSC cells which have preferred distance tuning up to 20 cm away from the wall (Figure 4J). Conversely, MEC computes distance information that extends toward the center of the arena, with decoding performance above chance-level until the maximum range of 50 cm (p<0.05 for 0–50 cm; Figure 6C). Even though MEC border cells fire maximally at the edge of the arena, population vector correlations along neighboring bins decay faster for MEC than RSC, particularly when the animals are more than 20 cm away from the wall (Figure 6—figure supplement 1A,B), which allows for MEC cells to distinguish wall distance to a larger extent.

To further explore if the activity of border cells has behavioral correlates, we finally examined the relationship between cell firing and the animal’s self-motion, computing rate maps for movement directions (Figure 6D). Shifting spike times in respect to the animal’s motion revealed that spikes of RSC border cells tend to precede a particular movement of the animal, as the amount of information present in motion maps is maximal when shifting spikes earlier in time (p<0.05 for the time lag range of ?300 to ?50 ms compared to shuffled data; Figure 6E,F). This shift was not observed in motion rate maps of MEC border cells, which peaks at zero time lag (Figure 6G), showing that spike correlations of RSC border cells with prospective motion are not simply due to behavioral restrictions near walls. Next,?we aligned the animal’s changes in movement direction using the cell’s spike timings, which revealed consistent turning behavior of the animal 200 ms after cell firing (Figure 6H). The direction of turning was opposite for cells recorded in different hemispheres, where border cells in right RSC fired prospective to right turns, while spikes in left RSC preceded left turns (Figure 6H). Such prospective correlates were not observed in MEC border cells (Figure 6I), nor in simulated cells with egocentric border tuning (Figure 6—figure supplement 1F,G), confirming the relationship between RSC border cell firing and the animal’s next motion. These results together support the idea that RSC and MEC encode different aspects of border representations, playing distinct roles in navigation behavior.

## Discussion

The brain forms boundary representations in two different reference frames, using either egocentric or allocentric coordinate systems. By applying a metric of the earth mover’s distance (EMD), we identified a subpopulation of neurons in RSC that increase their firing rates depending on the distance of nearby walls, supporting boundary representations in RSC. These cells are tuned to the distance of all walls of the environment indiscriminately, in contrast to border cells in MEC which fire at the proximity of one or two walls in a particular direction to the room (Solstad et al., 2008). We found that firing of RSC border cells is specific to boundaries that impede the movement of animals, while an object introduced into the maze does not elicit a corresponding change of activity nearby. This finding is consistent with the distinction between border and object-vector cells found in MEC, where separate functional cell types encode positional information of both types of features independently (H?ydal et al., 2019). Furthermore, boundary coding was preserved under no visible light, and a majority of cells maintained their tuning both in the absence of physical walls and the animal’s whiskers, which are shared with MEC border cells, as their boundary tuning is also largely maintained without walls present, albeit with some degree of rotational remapping (Solstad et al., 2008), and most cells do not form firing fields to an object (H?ydal et al., 2019). Boundary-vector cells in the subiculum that have reciprocal anatomical connections with RSC (van Groen and Wyss, 1992) also possess these same features, including preservation of activity in darkness (Lever et al., 2009) and maintenance of boundary tuning without walls present (Stewart et al., 2014). RSC border cells, as well as those in MEC and the subiculum, are thus not simply driven by local sensory cues, but likely discriminate boundaries based on a global spatial layout of the environment. Our analyses further revealed that approximately 40% of border cells in RSC have additional egocentric directional tuning toward boundaries, firing predominantly whenever the wall occupies proximal space at a specific angle from the animal’s facing direction, unlike MEC border cells that can display conjunctive encoding of allocentric head-direction. This result is consistent with a recent report by Alexander et al., 2020 which described egocentric boundary vector cells in RSC. Here?we demonstrated that this egocentric wall-direction tuning of RSC cells remained invariant under distal-cue rotations, where allocentric position and head-direction signals in RSC rotated together, while silencing of MEC inputs disrupted sharp boundary tuning in RSC, supporting the idea that RSC border cells are formed by conjunctive coding of allocentric boundary-position and head-direction signals that are at least in part derived from MEC.

Anatomically, RSC locates at an interface region of the hippocampus and MEC with sensory and motor cortices (van Groen and Wyss, 1990; van Groen and Wyss, 1992; Van Groen and Wyss, 2003; Jones and Witter, 2007; Sugar et al., 2011). While both human patients and rodents with lesions in RSC exhibited severe impairment in navigation ability (Takahashi et al., 1997; Vann et al., 2009), the exact role of RSC has been largely unclear until recently, with several recent studies providing clues for understanding RSC function. An fMRI study in humans demonstrated that RSC is particularly engaged in representing permanent landmarks in the environment (Auger et al., 2012), which is consistent with the present finding of border cells as walls can serve as permanent landmarks in an open field arena, especially in the absence of local cues. On the other hand, recording studies in rats have identified several types of spatially-tuned cells in RSC, such as head-direction cells, place cells, and the cells that represent geometric features of the environment (Alexander and Nitz, 2015; Cho and Sharp, 2001; Mao et al., 2017). Because of the existence of these spatially-tuned cells as well as anatomical connections, RSC has been considered an ideal brain region to implement a transformation of spatial representations between egocentric and allocentric coordinate systems (Bicanski and Burgess, 2018; Byrne et al., 2007; Mitchell et al., 2018). The allocentric-egocentric transformation is an essential computational step for navigation because, while spatial representations in the parahippocampal regions about head-direction, places, or borders, are anchored to external features of the environment (i.e., in allocentric coordinates), experiencing the world through sensory organs and executing motor plans to move through space is referenced to the actor's body and viewpoint (i.e., in egocentric coordinates).

Our findings are in line with the RSC’s role in coordinate transformation because both allocentric place and head-direction cells as well as egocentric border cells co-exist in RSC. The question is how such egocentric representation is generated. One possibility is that egocentric border firing is directly driven by sensory perception, such as optic flow or whisker sensation, which is egocentric in nature. This notion is supported by recent reports on self-referenced representations of local space (Alexander et al., 2020; LaChance et al., 2019), which propose that egocentric representations originate from early cortical and thalamic processing to provide egocentric spatial information to the hippocampus and MEC. However, this possibility is unlikely as our present results show that firing of RSC border cells persisted in the absence of direct visual or tactile detection, and distinguished objects from walls unlike neurons in the barrel cortex. Furthermore, we did not find any significant impact of the silencing of RSC neurons on MEC border cells, showing that RSC inputs are not essential for border coding in MEC. Instead, our results favor the idea that RSC border cells are driven by spatial cells with allocentric tuning. This idea was proposed as a theoretical model (Byrne et al., 2007), in which the information about allocentric boundary locations is integrated with head-direction signals to form egocentric border representations. We found that the rotation of head-direction and place cells in RSC, elicited by a cue rotation of the environment, did not affect the egocentric tuning of RSC border cells, indicating that head-direction and position coding in RSC border cells must be bound and rotated together during environmental manipulations, consistent with the proposed circuit model (Byrne et al., 2007). Furthermore, by using pharmacogenetic and optogenetic techniques, we found that inactivation of the MEC-RSC pathway resulted in a disruption of position-selective firing of both place cells and border cells in RSC, but not the tuning of head-direction cells. As MEC contains several types of spatially tuned cells in allocentric coordinate frames (Hafting et al., 2005; Moser et al., 2008; Sargolini et al., 2006), our results support the idea that egocentric firing in RSC is formed by the integration of head-direction signals, together with allocentric position information provided by MEC, indicating the transformation from allocentric to egocentric spatial coordinate frames.

Our results, however, also indicate that RSC border cells are not necessarily a simple product of coordinate transformations from MEC cells. The activity of RSC border cells shows a significant bias of tuning direction contra-lateral to the recorded hemisphere, which would indicate that a single hemisphere could transform only half of the potential behavioral space. In addition, the range at which information about wall distance is present is different between MEC and RSC border cells. While RSC border cells provide local information about a nearby wall that is located less than 20 cm from the animal’s position, border cells in MEC have extended distance information up to 50 cm (from a wall to the center of the maze). These findings indicate that RSC border cells do not necessarily constitute an egocentric border map as a counterpart of an allocentric map in MEC.

What are the functional implications of a hemisphere bias to boundaries in the animal’s contralateral side, if RSC border cells are not directly driven by sensory perception? Our results suggest that this bias is likely a manifestation of the animal’s immediate action against the direction of an approaching wall, as movement commands along the left-right body axis are largely lateralized in the brain (Fritsch and Hitzig, 1870; Kim et al., 1993). Collision detection and avoidance are fundamental roles of sensory-motor systems for many species of animals (Fotowat and Gabbiani, 2011), and rodents are also required to detect boundaries to avoid hitting walls or falling off edges. The boundary information in RSC may therefore be used in other brain regions to control the animal’s next movements relative to walls or edges. RSC provides inputs to brain regions necessary for motor control and initiation, such as premotor and motor cortices, cingulate cortex, as well as the dorsal striatum (Guo et al., 2015; Jones et al., 2005; Yamawaki et al., 2016). A recent recording study on the dorsomedial striatum has identified a type of neurons that fire near environmental borders in a similar manner as RSC border cells do. However, their egocentric tuning is largely dependent on the animal’s movement direction (Hinman et al., 2019), rather than head-direction as in RSC border cells (Alexander et al., 2020). Notably, our present work discovered that the activity of RSC border cells is also dependent on the animal’s movement, but in a prospective manner, exhibiting significant correlations of their firing with the animal’s movement direction?~200 ms in the future. This prospective information in RSC may then be transferred to the downstream striatal circuit. We further found that this prospective coding exhibits a similar hemisphere bias as observed in wall-directional tuning, such that neurons in the right RSC fire prospective to right turns, whereas firing in the left RSC precedes left turns. This lateralized coding scheme may help associate boundary coding with the next appropriate actions, in a way that the right RSC senses a wall to the animal’s left, leading to a right turning behavior away from an approaching wall. Our results together thus support the idea that RSC implements coordinate transformation of behaviorally relevant information, pointing to RSC as a key brain region linking the brain’s allocentric spatial representations with the animal’s behavior.

## Materials and methods

### Subjects

All experiments were approved by the local authorities (RP Darmstadt, protocol F126/1009) in concordance with the European Convention for the Protection of Vertebrate Animals used for Experimental and Other Scientific Purposes. Subjects were 19 male Long-Evans rats weighing 400 to 550 g (aged 3–5 months) at the start of the experiment. Rats were housed individually in Plexiglass cages (45 × 35?×?40 cm; Tecniplast GR1800) and maintained a reversed 12 hr light-dark cycle, with behavioral experiments performed during the dark phase. Animals were mildly food-restricted with unlimited access to water and kept at 85–90% of their free-feeding body-weight throughout the experiment. For recording experiments, eight rats had tetrodes located unilaterally in RSC, either in the left (four rats) or right (four rats) hemisphere. One rat had a 64-channel silicon probe (Buzsaki64-sp; Neuronexus) implanted directly into the barrel field of the right primary somatosensory cortex (S1bf). Four rats were injected with an AAV encoding inhibitory DREADDs bilaterally in either MEC or RSC, combined with a tetrode drive in MEC or RSC in the right hemisphere. For optogenetic inactivation experiments, two rats were injected with a retroAAV (Tervo et al., 2016) expressing inhibitory Cruxhalorhodopsin chloride pumps (Jaws; Chuong et al., 2014) in the right RSC together with the implantation of a 64-channel silicon probe (Buzsaki64-sp), while an optic fiber was positioned above MEC. Finally, two more rats were injected with an AAV expressing inhibitory Halorhdopsin chloride pumps (eNpHR3.0; Zhang et al., 2007) in the?right MEC, while eight tetrodes and an optic fiber were implanted together in the?right RSC. No statistical method was used to predetermine sample size, although the number of animals used here is similar to previous work.

### Surgery, virus injection, and drive implantation

Request a detailed protocol

Anesthesia was induced by isoflurane (5% induction concentration, 0.5–2% maintenance adjusted according to physiological monitoring). For analgesia, Buprenovet (Buprenorphine, 0.06 mg/mL; WdT) was administered by subcutaneous injection, followed by local intracutaneous application of either Bupivacain (Bupivacain hydrochloride, 0.5 mg/mL; Jenapharm) or Ropivacain (Ropivacain hydrochloride, 2 mg/mL; Fresenius Kabi) into the scalp. Rats were subsequently placed in a Kopf stereotaxic frame, and an incision was made in the scalp to expose the skull. After horizontal alignment, several holes were drilled into the skull to place anchor screws, and craniotomies were made for microdrive implantation. The microdrive was fixed to the anchor screws with dental cement, while two screws above the cerebellum were connected to the electrode's ground. All tetrodes were then positioned at 920 μm depth from the cortical surface. All animals received analgesics (Metacam, 2 mg/mL Meloxicam; Boehringer Ingelheim) and antibiotics (Baytril, 25 mg/mL Enrofloxacin; Bayer) for at least 5 d post-surgery.

For tetrode recordings, rats were unilaterally implanted with a hyperdrive that contained 28 individually adjustable tetrodes made from 17 μm polyimide-coated platinum-iridium (90–10%; California Fine Wire; plated with gold to impedances below 150 kΩ at 1 kHz). The tetrode bundle consisted of 30-gauge stainless steel cannulae, soldered together in a 14 × 2 rectangular shape for recordings of the entire RSC, 7 × 4 for anterior RSC, or two squared bundles for bilateral MEC. For RSC, tetrodes were implanted alongside the anteroposterior axis, starting at (AP) ?2.5 mm posterior from bregma until ?4 mm to ?6.5 mm, (ML) 0.8 mm lateral from the midline, (DV) 1.0 mm below the dura, and at a 25° angle in a coronal plane pointing to the midline in order the get underneath the superior sagittal sinus. For MEC, tetrodes were implanted at 4.5 mm lateral of the midline, 0.2 mm anterior to the transverse sinus, at an angle of 15 degrees in a sagittal plane with the tips pointing to the anterior direction. Experiments began at least 1 week post-surgery to allow the animals to recover.

For DREADDs experiments, an AAV8-hSyn-hM4Di-mCherry (a gift from Bryan Roth; Addgene viral prep # 44362-AAV8) was injected with an infusion rate of 100 nL/min using a 10 μL NanoFil syringe and a 33-gauge beveled metal needle (World Precision Instruments). After injection was completed the needle was left in place for 10 min. The virus was injected at two sites for each bilateral MEC (500 nL each at the depth of 2.5 mm and 3.5 mm from the cortical surface, 4.5 mm lateral to the midline, 0.2 mm anterior to the transverse sinus at an angle of 20° in a sagittal plane with the needle pointing to the anterior direction), or four sites along the anteroposterior axis for each bilateral RSC (500 nL each at AP 2.5, 3.5, 4.5, 5.5 mm, 0.8 mm lateral to the midline, at an angle of 25° in a coronal plane pointing to the midline). The?flow was controlled with a Micro4 microsyringe pump controller. A small microdrive (Axona Ltd) connected to four-wire tetrodes was additionally implanted nearby the injection site to evaluate the effects of the manipulation. Virus injection was performed in the same surgery as electrode implantation, and recordings began at least 3 weeks post-surgery to allow time for the virus to express.

For optogenetic silencing of MEC terminals in RSC, an AAV1-hSyn-eNpHR3.0-EYFP (a gift from Karl Deisseroth; Addgene viral prep # 26972-AAV1) was injected into right MEC with the same procedure as the DREADDs experiments; injection location was 4.0 mm lateral to the midline, 0.2 mm anterior to the transverse sinus pointing 20° in the anterior direction, with two sites at 2.5 mm and 3.5 mm depths from the cortical surface (500 nL volume each). For optogenetic inhibition of MEC cells projecting to RSC, an AAV-retro-hSyn-Jaws-GFP (a gift from Edward Boyden; Addgene viral prep # 65014-AAVrg) was injected into right RSC at four sites (AP 2.5, 3.5, 4.5, and 5.5 mm, 0.8 mm lateral of the midline and pointing 25° to the midline; 500 nL volume each). Electrode and optic fiber implantation were performed 1 week following virus injection, and experiments began at least 3 weeks post-surgery.

### Spike sorting and cell classification

Request a detailed protocol

All main analyses and data processing steps were performed in MatLab (MathWorks). Neural signals were acquired and amplified using two 64-channel RHD2164 headstages (Intan technologies), combined with an OpenEphys acquisition system, sampling data at 15 kHz. Neuronal spikes were detected by passing a digitally band-pass filtered LFP (0.6–6 kHz) through the 'Kilosort' algorithm to isolate individual spikes and assign them to separate clusters based on waveform properties (https://github.com/cortex-lab/KiloSort; Pachitariu et al., 2016). Clusters were manually checked and adjusted in autocorrelograms and for waveform characteristics in principal component space to obtain well-isolated single units, discarding any multi-unit or noise clusters. Tetrodes were moved a minimum distance of 80 μm between recording days to find a new set of neurons for the next recording session.

### RSC border cells

Request a detailed protocol

We applied a novel template-matching procedure to classify RSC neurons as border cells using the Earth Mover's Distance (EMD), a distance metric from the mathematical theory of optimal transport (Hitchcock, 1941; Rubner et al., 1998). First, the animal's spatial position occupancy was divided into 4 × 4 cm spatial bins, and the firing rate in each position bin was calculated by dividing the number of spikes with the amount of time spent there. The resulting rate map was smoothed by applying a 2D Gaussian filter (width of 1 bin), and converted to a probability distribution by taking unit weight. We then calculated the Earth Mover's Distance relative to a ‘boundary template’ using a MatLab implementation of the fastEMD algorithm (https://github.com/dkoslicki/EMDeBruijn, Koslicki, 2015; Pele et al., 2008; Pele and Werman, 2009). This boundary template consisted of a 25 × 25 matrix with each bin's value set to 0, except the outer ring bins with a value of 1, smoothed with the same Gaussian kernel and converted to unit weight. Several additional templates were constructed to assess the effects of behavioral manipulation, adding additional weight in the location of placed objects/walls (Figure 2E,J). The EMD distance between a rate map and a template represents the minimal cost that must be paid to transform one distribution into another, with values ranging between zero (identical maps) and one (maximal difference), and is thus a normalized metric of dissimilarity (Grossberger et al., 2018).

To assess whether a cell's rate map was significantly similar to the boundary template, we computed a null distribution to compare against using Monte Carlo simulations. We performed 32.000 permutations of a shuffling procedure, and for each iteration we randomly sampled a spike-train from the data, time-shifted this vector along the animal's recorded trajectory by a random interval of at least 4 s and less than the total trial length, wrapping any excess at the and back to the beginning. We then used this shifted data to compute a rate map and calculated the EMD distance relative to the boundary template. Criteria for border cell classification was an EMD dissimilarity score below the 1st percentile of this null distribution in all regular sessions, and an average firing rate of at least 0.5 Hz (Figure 1D,E). These cell classification criteria were applied only for the regular sessions of the manipulation experiments.

### MEC border cells

Request a detailed protocol

To compare classification results with a related metric, we computed the original border score for each cell (Solstad et al., 2008). We first estimated a cell's firing field by isolating a continuous region of at least 200 cm2 and a maximum of 70% of the arena surface where the firing rate was above 30% of the peak firing rate. This was an iterative search until all fields with the above criteria were identified. We next computed the border score, b, for each wall separately:

$b=\frac{{c}_{M}-{d}_{M}}{{c}_{M}+{d}_{M}}$

where cm was defined as the maximum coverage of any single field over the wall and dm the mean firing distance, calculated as the average distance to the nearest wall over all bins covered by the field. This was done separately for each of the four walls out of which the maximum score was selected. Cells recorded in MEC were classified as border cells whenever their border score was above the threshold of 0.5 (corresponding to the 99.3th percentile of scores generated from randomly time-shifted spikes) for either of the two recorded sessions, and had an average firing rate of at least 0.5 Hz.

Request a detailed protocol

The rat's head-direction was calculated based on the relative x/y-position of two light-emitting diodes (LEDs), corrected for an offset in the?placement of the LEDs relative to the animal's true head-direction. For each cell, the mean vector length (MVL) and direction (MVD) was calculated by computing the circular mean and direction from a vector that contained the head-direction of the animal at spike timings in unit space. A cell was classified as a head-direction cell when its MVL was greater than the 95th percentile of a null distribution obtained by thousand-fold Monte Carlo simulations with randomly time-shifted spike trains.

### Border rate maps

Request a detailed protocol

Locations of walls were estimated based on the most extreme values of the position of the animal. The animal's distance to the wall was computed for each of the four walls separately by taking the difference between the wall's location and the animal's position in the respective x or y-dimension, and selecting the lowest value at each time point. The direction of this wall relative to the animal's direction was computed by calculating the angle difference between the animal's true heading direction and a vector pointing directly toward the wall (e.g., relative to an angle of 0° for the east wall, 90° for the north wall). Because 0° corresponds with the 'east' side in angular polar plots, this data was further shifted by 90° to align the front of the animal with the 'north' part in border maps (see Figure 4C) to improve visual interpretation of the results.

Firing rate in body-centric border coordinates was calculated by dividing the animal's occupancy in these coordinates into 4 cm distance bins and 20° angle bins. The number of spikes in each bin was then divided by the time spent there, further smoothed using a 2-D Gaussian kernel (one bin width), similar to how spatial rate maps are computed. A cell's preferred direction and distance was obtained by finding the bin with maximal firing rate and selecting the bin's corresponding distance and angle values. For visualization purposes only, this matrix was transformed into a circular diagram shown in Figure 4.

To establish the?directional tuning of a cell, the wall-direction angle at the time of each spike was taken whenever the animal was located within 20 cm distance of a wall, from which a mean vector length was calculated. This MVL was then compared to a thousand-fold shuffled distribution, where each iteration produced an MVL value using randomly time-shifted spike timings (similar to head-direction cell classification). If the real MVL exceeded the 95th percentile of this shuffled distribution in all regular sessions, it was considered significantly tuned to wall direction.

### Self-motion maps

Request a detailed protocol

First, the animal’s movement direction was computed at each time point, using position changes in a 100 ms segment of the preceding and succeeding 50 ms, and calculating the angle of movement by taking the arctangent of the difference in x/y-position. The movement directions were then aligned with the animal’s forward head-direction, giving moment-to-moment changes in the animal’s movement directions from a self-centered perspective (Ito et al., 2015; Whitlock et al., 2012). The distance traveled in this time bin captures the distance from the origin in self-motion maps, while clockwise or counter-clockwise movements are reflected in shifts over the x-axis. Self-motion data was binned into 3 cm/s bins, and rate maps were computed by dividing the number of spikes by time spent in each bin (Figure 6E). For time-lagged analyses, shifted self-motion maps were generated by shifting spike-timing step-wise between ?1000 and +1000 ms earlier or later relative to self-motion data. For each time lag, an additional shuffled distribution was computed by shifting the spike-timings a random amount of time, at least 4 s forward, with the excess wrapped around to the beginning, and taking the average over 10 iterations.

From these self-motion rate maps, the total amount of self-motion information could be calculated as:

$Information=\sum _{i=1}^{N}{p}_{i}\frac{{\lambda }_{i}}{\lambda }{log}_{2}\frac{{\lambda }_{i}}{\lambda }$

with i = 1, …, N motion bins, pi the probability of occupancy in bin i, λi the mean firing rate for bin i, and λ the overall mean firing rate of the neuron (Skaggs et al., 1996).

### Decoding analysis

Request a detailed protocol

For decoding of wall distance from the activity of border cells in RSC and MEC, the optimal wall with maximum coverage by firing fields was chosen for individual cells (the same procedure as used in border?score calculations; Solstad et al., 2008). To determine the optimal head-direction to the selected wall for individual border cells, we searched for a range of head-directions (360-degree range in 5-degree steps) that gave the maximum mean firing rate of the cell when the animal was within 20 cm of the wall. We then focused on neural activity when the animal was at this optimal head-direction and in the range of wall distances from 0 to 50 cm at 10 cm steps (five ranges in total), but excluding timepoints where the animal was within 25 cm of other walls to avoid their potential influence. All of the incidents when the animal was in each of the five wall-distance ranges were equally divided into 20 segments in time, and mean firing rates of individual border cells in the 20 segments were assembled across recording sessions. To implement a decoding analysis, 20 cells were randomly chosen, and the order of 20 segments was randomly shuffled for each cell, such that the data in each segment is a collection of firing rates from 20 border cells across various time points of behaviors when the animal was in a particular distance range to the wall. Ensemble firing rates of border cells in one of the segments were selected as a test dataset, and the rest of the data were used to train a support vector machine (using a MATLAB package LibSVM with a linear function; Chang and Lin, 2011). Trained weights were then applied to the activity of border cells in the test dataset to estimate the animal’s distance to the wall, which was repeated for all segments to be tested (leave-one-out cross-validation), giving a representative decoding performance for the selected population of cells. This procedure was repeated for different cell pairs for 1000 times to estimate a statistical distribution of decoding performance (bootstrap resampling method).

### Behavioral methods

Request a detailed protocol

Data was collected over a total of 30–120 min per day while rats foraged for food (chocolate cereal) in a squared open?field arena, either 50 × 50 cm, 100 × 100 cm, or 120 × 120 cm in size. Each session consisted of 10–15 min of free exploration in the arena, separated by 5 min of resting time on a pedestal. No curtains surrounded the recording arena, with the exception of the rotation and darkness experiments where all distal cues were blocked completely. The surface of the arena was elevated 50 cm above the ground, and was enclosed by three black and one white wall with a 50 cm height that were positioned with consistent orientation in the room for all animals. The experimental set-up was extensively cleaned with a 70% ethanol solution in between every recording session to eliminate any odors.

Behavioral manipulation experiments always followed the same protocol of A-B-B-A', where A is a regular session, and the manipulation was performed in B. This allowed for a recovery phase after the manipulation in the final session A'. The only exception was the drop-edge experiment (Figure 3E) where the animal had limited motivation; so to ensure good coverage of the arena we reduced the protocol to A-B-A'. All changes to the maze were made in between the first and second session while the animal was resting on a pedestal. For the added wall manipulation (Figure 2A), an additional black wall (50 cm length?× 50 cm height?× 1 cm width) was placed in the maze, protruding from one outer wall at half-length toward the center. For the added object manipulation (Figure 2F) either a circular, non-climbable aluminum object (10 cm diameter?× 50 cm height) or circular climbable object (10 cm diameter?× 10 cm height) was placed in the center, or off-center 40 cm away from the north and west walls.

For the DREADDs-mediated manipulation experiments, animals were injected with agonist-21 (DREADDs agonist 21 dihydrochloride, 3.52 mg/mL [10 mM]; Hellobio) subcutaneously after the first recording session, followed by at least 30 min waiting time to allow the drug to reach the brain and take effect before starting the next recording session. For the experiments using optogenetic methods, laser light was turned on continuously for the duration of the middle session (5 min, with laser power of 20 mW at the fiber tip), after which the animals had at least 5 min of recovery time on the pedestal before starting the final behavioral session. A green laser (532 nm; Shanghai Laser and Optics Century, China) was used to activate eNpHR3.0, while a red laser (632 nm; Shanghai Laser and Optics Century, China) was used to activate red-shifted opsins.

The animal's position and head-direction were obtained by tracking two LEDs on the headstage at 25 Hz and recording under dim light conditions. For darkness sessions, we switched to an infra-red OptiTrack camera system (Natural Points Inc) under the assumption that rats have limited vision in the higher wavelengths, with cone sensitivity tapering off rapidly above 600–650 nm (Jacobs et al., 2001). Six Flex three cameras were positioned 2 m above the arena surface on a ceiling mount, at a 45–60° angle pointing downwards, that used infra-red illumination (peak spectral emission at 850 nm) to track the location of three reflective markers in an asymmetric frame attached to the headstage. Position and direction data were acquired and processed using Motive 2.0 software. To ensure no visible light was present for the animals, all lights were turned off and small light sources in the room such as computer and sensor lights were taped off, while the arena was enclosed by a thick, black curtain. A room lamp was turned on for dimly light conditions until 10 s before the start of the recording, and turned on again during the inter-trial interval duration of 5 min. During recording, the experimenter remained stationary and silent near the arena throughout the recording while scattering food pellets.

### Histological procedures

Request a detailed protocol

Once the experiment was completed, animals were deeply anesthetized by sodium pentobarbital and perfused intracardially with saline, followed by 10% formalin solution. Brains were extracted and fixed in formalin for at least 72 hr at 6° C temperature. Frozen coronal sections were cut (50 μm) and stained using cresyl violet and mounted on glass slides. Electrode tips were identified by comparison across adjacent sections, with the location of recorded cells estimated by backward measurement from the most ventral tip of the tetrode tracks.

### Statistical procedures

Request a detailed protocol

All statistical tests were two-sided and non-parametric unless stated otherwise. Error bars in all figures represent the?standard error of the mean (SEM). All values mentioned in the?text are medians?±?SEM.

## References

1. 1
2. 2
3. 3
4. 4
5. 5
6. 6
7. 7
8. 8
9. 9
10. 10
11. 11
LIBSVM: a library for support vector machines (2011)
ACM Transactions on Intelligent Systems and Technology 2:1961199.
https://doi.org/10.1145/1961189.1961199
12. 12
13. 13
14. 14
15. 15
16. 16
17. 17
18. 18
No title
(1870)
Archiv für Anatomie Physiologie und Wissenschaftliche Medicin pp. 300–332.
19. 19
20. 20
21. 21
22. 22
23. 23
24. 24
25. 25
26. 26
27. 27
28. 28
29. 29
30. 30
31. 31
Cone-based vision of rats for ultraviolet and visible lights
(2001)
The Journal of Experimental Biology 204:2439–2446.
32. 32
33. 33
34. 34
35. 35
36. 36
EMDeBruijn (2015)
GitHub.
37. 37
38. 38
39. 39
40. 40
41. 41
42. 42
43. 43
44. 44
45. 45
46. 46
47. 47
48. 48
49. 49
A Linear Time Histogram Metric for Improved SIFT Matching (2008)
In: D Forsyth, P Torr, editors. Computer Vision - ECCV. Berlin, Heidelberg: Springer. pp. 495–508.
https://doi.org/10.1007/978-3-030-58580-8
50. 50
Fast and robust earth mover’s Distances (2009)
2009 IEEE 12th International Conference on Computer Vision, (IEEE). pp. 460–467.
https://doi.org/10.1109/ICCV.2009.5459199
51. 51
52. 52
53. 53
A metric for distributions with applications to image databases (1998)
Sixth International Conference on Computer Vision (IEEE Cat. No.98CH36271). pp. 59–66.
https://doi.org/10.1109/ICCV.1998.710701
54. 54
55. 55
56. 56
57. 57
58. 58
Boundary coding in the rat subiculum (2014)
Philosophical Transactions of the Royal Society B: Biological Sciences 369:20120514.
https://doi.org/10.1098/rstb.2012.0514
59. 59
60. 60
61. 61
62. 62
63. 63
64. 64
65. 65
66. 66
What does the retrosplenial cortex do? (2009)
Nature Reviews Neuroscience 10:792–802.
https://doi.org/10.1038/nrn2733
67. 67
68. 68
69. 69
70. 70

## Decision letter

1. Neil Burgess
Reviewing Editor; University College London, United Kingdom
2. Laura L Colgin
Senior Editor; University of Texas at Austin, United States

In the interests of transparency, eLife publishes the most substantive revision requests and the accompanying author responses.

Acceptance summary:

This work identifies a population of neurons in retrosplenial cortex that respond to environmental barriers at a range of distances (weighted towards short distances) some of which are also tuned to the egocentric direction of the barrier. Interestingly, a variety of behavioural, opto- and chemo-genetic manipulations indicate that these are not simple sensory responses, but potentially reflect a representation for egocentric action (such as turning away from barriers) constructed from allocentric representations in the hippocampal formation.

Decision letter after peer review:

Thank you for submitting your article "Entorhinal-retrosplenial circuits for allocentric-egocentric transformation of boundary coding" for consideration by eLife. Your article has been reviewed by three peer reviewers, one of whom is a member of our Board of Reviewing Editors, and the evaluation has been overseen by Laura Colgin as the Senior Editor. The reviewers have opted to remain anonymous.

The reviewers have discussed the reviews with one another and the Reviewing Editor has drafted this decision to help you prepare a revised submission.

We would like to draw your attention to changes in our revision policy that we have made in response to COVID-19 (http://www.asadoresteatre.com/articles/57162). Specifically, we are asking editors to accept without delay manuscripts, like yours, that they judge can stand as eLife papers without additional data, even if they feel that they would make the manuscript stronger. Thus the revisions requested below only address clarity and presentation, but do include requests for additional analyses.

Summary:

The authors report e-phys recording of neurons in retrosplenial cortex that respond to environmental barriers (walls, inserted barriers and drop-edges) at a range of distances (weighted towards short distances) and with tuning to the egocentric direction of the barrier (although the amount and distribution of directional tuning is slightly unclear, with 185/485 cells exceeding a >99th percentile in shuffled directionality).

By using darkness, changing the nature of the barrier (walls to drop edges) and cutting whiskers, they show that these responses are not simple unimodal sensory responses. By rotating polarising environmental cues, they show that the tuning of head-direction cells and spatially tuned cells in RSC rotate, but the egocentric directional tuning of the RSC barrier-responding cells is retained.

They compare these to border cells in medial Entorhinal ctx., showing that EC border cells have higher firing rates and can be used to decode the distance to the walls for a longer range (up to 50cm) than RSC cells. The RSC cells with directional tuning are lateralized so that those in one hemisphere tend to be tuned to contralateral egocentric direction (similar to the cells reported by Alexander et al.,). They also show that RSC cells (but not EC border cells) reliably precede upcoming movements (turning away from the barrier).

Finally, they perform chemo- and opto-genetic silencing in each region while recording in the other, showing that the RSC cells are affected by EC input but not vice versa. That is, inactivation of EC by DREADDs reducing tuning and firing rates in RSC, and halorhodopsin or jaws inactivation of EC projections to RSC disrupted RSC cell firing near boundaries, shifting firing to the centre of the environment.

They interpret their results in terms of top-down activation of egocentric responses (turning away from barrier) driven by allocentric representations of barriers in MEC.

The paper is interesting and (mostly) clear, potentially showing a sophisticated egocentric representation generated top-down from allocentric representations. However, there are several issues that would need to be clarified or resolved before publication in eLife.

Essential revisions:

1) Need for much more cautious interpretation of the MEC inactivation experiments. Is it fair to ascribe such a strong role for MEC on the basis of these data, or might it be one of many potential inputs?

a) Subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa” Figure 5, and associated Supplementary Figures etc. The DREADD experiment shows powerful reduction of affected MEC cells without affecting running speeds. Nice work. The effects on the RSC cells, though, are rather mild. After MEC inactivation, the average EMD boundary template score was 0.186. Yes, this was lower than before inactivation (before was 0.181, p = 0.016), but the net effect of inactivation is that the average EMD-border score is now 0.186 and thus still well under the 99% classification threshold to be defined as a border cell.

b) The ratemap illustrations of this manipulation, Figure 5C left, show two cells, with EMD values before of 0.177 and 0.178 and after of 0.293 and 0.277. Of over 100 border cells, they show the most unrepresentative cell and the third most unrepresentative cell. Something more representative should be shown.

c) Similar points as a) apply to the other two inactivation experiments using optogenetics. The cell-body inhibition results are particularly weak in effect, with laser ON EMD scores averaging 0.0192. This average is 0.001 above the relatively strict 99% threshold of 0.0191, and 0.003 above the second laser off average. Thus, the cells are on average still very border-like.

d) as with b) Similarly unrepresentative cells it seems are shown for Figure 5L and 5N.

e) The disruption of firing caused by inactivation of the MEC seems slight (Figure 5D,O), and the examples in 5L (and to some extent 5N) are not convincing because the firing patterns do not seem stable across the two 'OFF' trials, so it is hard to be sure that changes in the 'ON' trial are due to the manipulation. To what extent does the laser stimulation (Figure 5O) increase the 'messyness' of firing rather than changing its tuning characteristics – eg reducing spatial information/stability or increasing excitability (are firing rates different)?

f) The chemogenetic and optogenetic manipulations are lacking standard controls.

Specifically, there is no non-DREADDs group or sham injection recordings for the chemogenetic experiment, and there is no control virus group in the optogenetic experiments. As such the effect could be due to systemic effects in the former and with heating in the latter. The DREADDs experiments do have an internal control with the RSC-MEC reversal inactivation, but not the optogenetic experiments. That being said, the cell body inhibition experiment gives more confidence in the result.

g) These findings are interpreted with exaggeration.

Abstract "These egocentric representations…require inputs from MEC." Subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa” "While these DREADDs-mediated manipulation experiments suggest the necessity of MEC signals for border tuning in RSC…". Figure 5 legend: "RSC border cells require input from MEC to maintain their boundary tuning". Necessity and Require are untenable inferences from the modest effects shown, and this should all be rephrased so casual readers are not misled.

They should perform a sanity-check analysis where cells with peak rates of say 1Hz are excluded from the analyses. If a cell is not really firing, it may not be that informative to examine the spatial features of the few available spikes.

h) Subicular boundary related inputs. Boundary coding being both preserved in darkness (Lever et al., 2009; see also Brotons-Mas et al., 2010), and most cells maintaining their tuning without walls present (Lever et al., 2009; Stewart et al., 2014) is shown in the subiculum and thus there is a source of boundary-coding information additional to the Entorhinal cortex that shares some key features with these retrosplenial border cells. The projection to the retrosplenial cortex from the dorsal subiculum, where boundary vector cells have been found, is dense (see e.g. Wyss and Van Groen, 1992). I think Rosene and van Hoesen, 1977 suggest the main cortical afferent to the granular RSC originates in the subiculum. Thus, consideration of boundary information coming into the RSC should mention such boundary cell and anatomy tracing work.

2) What are the defining characteristics of the RSC 'border cells', are they directionally tuned, how do they relate to other boundary-responsive cells, and what to call them?

a) Quantification of border scores is by comparison to a Gaussian smoothed template of firing at the borders. However, the comparison method (earth mover distance, EMD) is not clear – giving an intuitive explanation, such as the total distance moved by all units of firing rate to match the firing rate and template distributions would be helpful. More intuition for the numbers would be gained by showing cells with values near the classification thresholds, not just at/near the tails. Figure 1F shows values of 0.14, 0.145, 0.159…. and then 0.222 and 0.312. Please show cells near 0.1906 cutoff. Relatedly, in Figure 1E, show the EMD values corresponding to 95 and 90% cutoffs.

b) It is not clear the extent to which spiking has to be restricted to the borders of the environment, how the method captures spiking that is displaced a certain distance from a border, and how the distance and egocentric direction tuning of each cell was found. If the template is only at the border are more distally tuned cells missed?

Is this same measure applied to the MEC (for fair comparison of the MEC and RSC it should be)? And does it find cells that fire distant from the border in MEC? This is particularly relevant given the puzzle that spatial representation occurs up to 50cm from the border by MEC 'border cells'? Did distance tuning differ between RSC and MEC (please show the distance tuning distributions for both areas)?

c) The comparison to actual border cells (that must fire continuously along a border) is important – the new score does not penalise gaps in firing (hence the appearance of a grid cell in Figure 5L top left?), nor does it require an allocentric tuning direction (a characteristic of border cells and boundary vector cells).

How strong is the tuning to egocentric direction or are these cells that mostly fire near a border in any direction? 185/485 egocentrically tuned cells seems low. Do 300/485 have no directional modulation, or is there qualitative egocentric modulation but below the statistical threshold? If not directionally modulated at all they can't be classified as either egocentric or allocentric.

The claims made (see also 2d) warrant further investigation of the potential differences between their confirmed egocentric border cells and the potentially numerous allocentric border cells within the RSC. Please provide the distribution of egocentric (and allocentric) directional tuning strengths across the populations of 'border cells' in RSC and MEC.

d) Clarification in the language used in the Abstract, Introduction, and Discussion section seems vital. The authors make much of the distinction between the allocentric boundary cells in other regions, and the egocentric boundary cells here. Furthermore, the abstract offers the summary: 'Border cells in RSC…are sensitive to the animal's direction to nearby borders'. Is Earth Mover Distance (EMD) alone egocentric? If not, and all of the analyses are on the EMD population, the result should not be framed as allocentric to egocentric transformation. If the egocentric border cells were analyzed throughout, that would justify the title and framing.

It is confusing to refer to both the barrier-responsive cells in RSC and the previously documented EC border cells as simply 'border cells', when the two populations appear to be different. 'Border cells' were defined by Solstad et al., 2008 as cells that fire when the animal is right next to a barrier in a specific allocentric direction (thus distinguishing them from the pre-existing 'boundary vector cells'). They subsequently suggested that border cells respond to direct contact with a physically present barrier, unlike 'object vector cells' which also respond to an object suspended above them (Hoydal et al., 2019), or boundary vector cells which can respond to the previous location of a barrier (Poulter et al., bioRxiv). The barrier-responsive RSC cells are clearly not 'border cells' – they can respond to barriers at a distance, some with a tuning to egocentric direction, and (the authors argue) are not a direct sensory response to the barrier.

What should they be called? If they think the population is generally tuned to egocentric direction (this is not clear, see next point below) 'egocentric boundary vector cells' would be technically correct, but is a bit of a mouthful, the main thing to avoid would be calling them something they are not. Perhaps referring to them by a label containing 'RSC' would at least make clear when they are referring to their RSC cells and when they are referring to border cells in EC ('RSC boundary cells' or similar).

e) Description of MEC border cells is a little misleading. "These features are shared with MEC border cells, as their boundary tuning is also maintained without walls present (Solstad et al., 2008)".

The data of Solstad et al., 2008 (Figure S8 and S9) show rather altered firing when walls are removed. (A) Of 10 border cells studied in the wall-no wall manipulation, only one maintained its field in the no wall environment, the others did complex or seemingly rotational remapping. (B) Furthermore, Solstad S9 suggests that the seeming-rotational remapping of border fields occurred despite the directional firing of simultaneously recorded head direction cells' being stable throughout the wall-no wall manipulation. Thus, even the seemingly simple rotational remapping may be more complex. In all, this section thus needs revision and clarification.

3) 'Complete Darkness'. If a darkness condition disrupts, there is less burden on the experimenter to ensure its completeness; e.g. darkness greatly reducing gridness implies vision aids grid cell firing in mice (Chen et al., 2019) is a safe inference, and if the darkness was not complete, this does not matter that much. Here, that the darkness was without effect is the finding itself, so there is a higher burden on the experimenter to detail this manipulation. Details in subsection “Behavioral methods” are minimal. It is valuable to know, e.g.: how the room has been prepared for 'complete darkness' (5 minutes from light to dark is a very fast transition, does this generic intertrial interval apply also to the dark trials?), something of the previous light-exposure background of the rats before each one of the infra-red trials is conducted, what happens in the inter-trial intervals, LED technicalities, including the IR 'bleed' nm range, not just the peak value (850nm?), brightness settings, height of cameras from floor, and so on, enabling replication of the setup. My understanding from Flex3 details on the Optitrack website is that there will be in total over 150 LEDs shining upon the environment from 6 cameras: the phrase 'complete darkness' seems untenable. After adaptation, the rats may be able to see in this. If it really was just 5 minutes between light and dark there is minimal time for adaptation, that will be fine, though the second dark trial may involve some dark adaptation if darkness persists in the inter-trial interval. Also: What were the experimenters doing? E.g. more stationary in the darkness condition than the light condition? For evidence that humans, rats, mice and cats can see in the supposedly invisible infrared spectrum, if they are dark-adapted, see e.g. Pardue et al., 2001 and Palczewskaet al., 2014. A paper on good ferret vision at 870nm may be of interest (Newbold and King, 2009).

4) Object insertion

This manipulation is not yet convincing.

a) Though it features in their abstract as a main finding, there are not many cells for this experiment.

b) It seems sub-optimal that the ROI around the object is square, not circular, and quite a large square.

c) Perhaps 10 cells increase their firing in this large square ROI, and others decrease their firing. A lack of perturbation by object insertion is not self-evident from these data; rather there could be some cell-specificity, with some cells with firing being actively inhibited by the object, and others being excited by it. There seem to be quite large reductions in firing in 3 cells.

d) Thus, their aggregate analysis is perhaps a little simplistic, and misses out cell-specific responses. As there is not much statistical power, it might be simpler just to show the majority of these cell responses in a supplementary figure.

e) Importantly, the EMD templates are biased towards increasing the likelihood of a null finding. Put simply, the walls in the boundary template have two rows of high firing bins near them, whereas in the object template, these same walls have only one row of high firing bins near them, and moreover this row is of lower rate. In marked contrast, the object in the object template has three rows of higher rate bins around it. (To be clear, the authors mention this bias in their Materials and methods section: "adding additional weight in the location of placed objects/walls".) Thus, the object is expected (by the template) to elicit high firing for a more extended distance and at higher rates than that at the boundary even though the boundary is an extended cue and should influence the cell more. There is no need for such a biased hypothesis.

f) More details should be provided as to the previous experience with the objects. Might there be an inhibition by novelty? g) Object size: Figure 2F says the object was 15cm in diameter, but Figure 2—figure supplement 1, part g and the main text says 10cm. Please check and clarify sizes for all experiments, including the size of the ROI around the object.

In summary, there is no doubt whatsoever that the walls exert a greater influence than the object, but that is different from saying that "firing of RSC border cells…is invariant to an object introduced into the maze" (Discussion section). This is not an accurate summary when even their analysis as it stands shows a substantial increase in EMD to the boundary template in the object condition.

[Editors' note: further revisions were suggested prior to acceptance, as described below.]

Thank you for resubmitting your work entitled "Entorhinal-retrosplenial circuits for allocentric-egocentric transformation of boundary coding" for further consideration by eLife. Your revised article has been evaluated by Laura Colgin (Senior Editor) and a Reviewing Editor.

The manuscript has been improved but there are two remaining issues that need to be addressed before acceptance, as outlined below:

1) The statement in the Abstract where it says the cells "depend on inputs from MEC" should be moderated to something like "are influenced by inputs from MEC" to be more consistent with the point made in the reviews.

2) In the response you say, "we decided to include cells that have minimal firing only in opto/chemogenetic manipulation sessions, as this is a clear indication of disrupted firing due to the manipulation." Please confirm the process by which the population of cells was selected on which to test the effect of the manipulation.

https://doi.org/10.7554/eLife.59816.sa1

## Author response

Essential revisions:

1) Need for much more cautious interpretation of the MEC inactivation experiments. Is it fair to ascribe such a strong role for MEC on the basis of these data, or might it be one of many potential inputs?

We understand the reviewers’ concerns regarding our results of the inactivation experiments, as only a subset of neurons showed disruption of boundary tuning. Because virus expression is limited to a subpopulation of the cells in MEC, and both pharmacogenetic and optogenetic methods do not necessarily abolish the neuronal firing completely, the methodology does now allow us to distinguish whether such partial disruption is due to partial silencing of MEC, or because of compensatory inputs from other brain regions. Because we observed consistent disruption of RSC border cells with 3 different inactivation approaches (DREADDs, optogenetics soma retrogradely and axon terminals), we concluded that direct inputs from MEC are necessary to maintain sharp boundary tuning in RSC. However, we do not rule out the potential contributions of additional pathways, such as inputs coming from the subiculum. This point will be discussed further in the following points and described in the Discussion section of the revised manuscript.

a) Subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa” Figure 5, and associated Supp Figuresetc. The DREADD experiment shows powerful reduction of affected MEC cells without affecting running speeds. Nice work. The effects on the RSC cells, though, are rather mild. After MEC inactivation, the average EMD boundary template score was 0.186. Yes, this was lower than before inactivation (before was 0.181, p = 0.016), but the net effect of inactivation is that the average EMD-border score is now 0.186 and thus still well under the 99% classification threshold to be defined as a border cell.

The reviewers are correct in pointing out that the effects of MEC inactivation on RSC boundary template scores are mild on a population level, at least in terms of shifts in population medians described in Figure 5. However, we would like to highlight several considerations in the interpretation of these results:

1) We injected a small volume of the virus so that the expression would be confined to MEC. In the histological sections, we observed a small bias of virus expression along the dorsoventral axis of MEC, with some cells without expression (Figure 5—figure supplement 1). Furthermore, DREADDs-mediated inhibition generally reduces firing rates to only ~50% of baseline and does not abolish activity completely (Armbruster et al., 2007). In our experiments, we found that 59% (26/44) of the recorded cells near the injection site significantly reduced their firing rates to 47.2 ± 5.5% of the baseline after Agonist-21 administration. The activity of MEC cells is thus only partly disrupted by the DREADDs method, and it is possible that the remaining activity of MEC cells is sufficient to maintain some degree of boundary tuning. These points are now described in the legend of the supplemental figure.

2) While tracing studies have shown direct bi-directional connections between RSC and MEC (Jones and Witter, 2007; Ohara et al., 2018), it is unclear what connectivity topology exists between both regions, and RSC border cells may receive inputs from multiple neurons along the dorsoventral axis of MEC. The previously-proposed model indeed suggests that egocentric border tuning is formed by the integration of multiple allocentric border cells (Bryne et al., 2007). This would predict only partial disruption of border tuning after the perturbation of a subpopulation of input cells.

Considering these two points, we expected to observe some border cells in RSC to remain unaffected after a partial inhibition of MEC, making the population’s mean EMD scores by itself not necessarily a good indicator to assess the overall impact of MEC inputs. We further consider the possible involvement of other pathways in maintaining the border tuning of some RSC cells that were not disrupted after the manipulation, but neither pharmaco- or optogenetic methods can distinguish these possibilities. Because of these limitations, we instead sought to determine whether a group of cells show disrupted boundary coding due to inhibited MEC input by examining the change of EMD scores across the population. There were a sufficient number of cells disrupted to cause an overall increase of EMD score in population median, from which we conclude that MEC provides boundary information for RSC to form sharp boundary tuning.

In the revised manuscript, we have added additional control experiments in which the laser was applied without opsin expression, and confirmed the overall stability of EMD scores across consecutive sessions, which supports that the increase of EMD scores (as observed in the DREADDs-mediated manipulation) cannot be explained by intrinsic instability of the boundary tuning of RSC cells.

We discuss this point in subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa”, and further elaborate on the control experiment in comment 1e).

b) The ratemap illustrations of this manipulation, Figure 5C left, show two cells, with EMD values before of 0.177 and 0.178 and after of 0.293 and 0.277. Of over 100 border cells, they show the most unrepresentative cell and the third most unrepresentative cell. Something more representative should be shown.

Following our previous comment regarding the distribution of manipulation effects, we show examples of RSC border cells that are representative of disrupted tuning due to the manipulation. This is stated explicitly in the figure legend: “Two example RSC border cells that were affected by MEC inhibition and lost their spatial tuning.”

Furthermore, as we discuss in comments 1a) and 1c), we consider the population’s mean EMD value not necessarily as ‘representative’ of the overall impact of MEC inhibition, as these methodologies did not allow for silencing all RSC-projecting neurons in MEC in awake, behaving animals.

c) Similar points as a) apply to the other two inactivation experiments using optogenetics. The cell-body inhibition results are particularly weak in effect, with laser ON EMD scores averaging 0.0192. This average is 0.001 above the relatively strict 99% threshold of 0.0191, and 0.003 above the second laser off average. Thus, the cells are on average still very border-like.

This point was partly discussed in the above comment 1a), but here, the method used for the optogenetic experiment has a particular limitation in targeting the population of cells in MEC.

First, virus expression levels and the retrograde transport efficiency of retro-AAV is not 100% (Tervo et al., 2016), and the expression is limited to a subpopulation of RSC-projecting cells in MEC (Figure 5—figure supplement 2). Next, the optic fiber of 400 μm diameter covers less than half of the lateral width of MEC, and was placed at ~0.5 mm above the dorsal edge of MEC to avoid damage to MEC cells. The laser power was 20 mW at the fiber tip, which quickly decays to 5mW/mm2 at 1 mm away from the fiber tip (Calculation based on the tool of the Optogenetic Resource Center; https://web.stanford.edu/group/dlab/optogenetics/). According to Choung et al., (2014), laser power of 5 mW/mm2 can achieve only 30% inhibition in Jaws-expressing neurons. Therefore, this method only allowed us to manipulate cells at the dorsal pole of MEC, and those in the ventral region were most likely unaffected.

Because of this methodological limitation, whether or not the mean EMD scores of the population is above or below the threshold is misleading, as some border cells would not be affected simply because projecting MEC cells were not silenced sufficiently. Our main aim for this experiment is to show that the boundary information in RSC is at least in part derived from MEC, which is reflected in changes in tuning strength (e.g., EMD scores) of RSC border cells due to inhibition of MEC. We have added an additional subpanel in Figure 5—figure supplement 3B to show these cell-specific differences between laser OFF and ON sessions.

For the revised manuscript, we further performed additional control experiments for the optogenetic manipulation, now presented in Figure 5—figure supplement 4. Two animals were implanted with an optrode in RSC, following the same procedure as for Figure 5K-O but without AAV injection. In summary, RSC border cells show high consistency in their EMD scores across sessions, unlike results shown in Figure 5O. This illustrates the significance of these optogenetic manipulations overall.

This result is now discussed in subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa” of the revised manuscript and in the legend of Figure 5—figure supplement 2.

d) as with b) Similarly unrepresentative cells it seems are shown for Figure 5L and 5N.

Please see our comment in 1b). These cells are representative of disrupted tuning due to inhibition of their inputs.

e) The disruption of firing caused by inactivation of the MEC seems slight (Figure 5D,O), and the examples in 5L (and to some extent 5N) are not convincing because the firing patterns do not seem stable across the two 'OFF' trials, so it is hard to be sure that changes in the 'ON' trial are due to the manipulation. To what extent does the laser stimulation (Figure 5O) increase the 'messyness' of firing rather than changing its tuning characteristics – eg reducing spatial information/stability or increasing excitability (are firing rates different)?

We agree with the reviewers that it is crucial to assess whether the partial disruption in the laser OFF session is due to the intrinsic instability of RSC border cells or not. We therefore performed control experiments in which laser was applied without opsin expression, and confirmed general stability of RSC border cells across the session (Figure 5—figure supplement 4). The increase of EMD scores in the laser ON, as well as partial increase in the second OFF session, is therefore specific to the MEC inactivation.

RSC border cells that are disrupted by MEC inhibition (e.g., significant increases in EMD scores in the light ON session) show only a partial recovery in the axon-terminal inhibition manipulation (Figure 5O) or a continued disruption in the cell-body manipulation in the subsequent OFF session. One possible cause for this long-lasting effect is that we used continuous laser stimulation for 5 consecutive minutes during the light ON session, and a 5 minutes break before the final laser OFF session may not be sufficient to recover normal physiological function (e.g. ionic concentration disturbance created by the chloride pumps). It is also possible that cell-body inhibition may particularly cause a long-term circuit reorganization in MEC. Contrary to changes in EMD scores, we did not observe any changes in the overall firing rates of RSC border cells due to the manipulation (Figure 5—figure supplement 3A).

We would also like to note that even stable border cells do not necessarily produce the exact same rate maps between sessions, and therefore, the direct comparison of firing fields between rate maps is misleading. Because of conjunctive sensitivity to both boundary and direction, rate maps of RSC border cells are usually blobby, which is mainly due to the animal’s directional-bias near the walls and can differ depending on the animal’s session-by-session behaviors. The EMD scores should thus give a better quantitative assessment here.

We now discuss these points in the revised manuscript in subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa”.

f) The chemogenetic and optogenetic manipulations are lacking standard controls.

Specifically, there is no non-DREADDs group or sham injection recordings for the chemogenetic experiment, and there is no control virus group in the optogenetic experiments. As such the effect could be due to systemic effects in the former and with heating in the latter. The DREADDs experiments do have an internal control with the RSC-MEC reversal inactivation, but not the optogenetic experiments. That being said, the cell body inhibition experiment gives more confidence in the result.

We thank the reviewers for this important suggestion and performed additional negative control experiments in two animals against our optogenetic manipulations, now presented in Figure 5—figure supplement 4 (see also comments to 1a, 1c and previous 1e). RSC border cells did not show any significant changes in their firing rate or boundary EMD scores across sessions, as laser light was applied in the absence of an inhibitory opsin, excluding heating as a potential confound for our optogenetic manipulation results in Figure 5.

g) These findings are interpreted with exaggeration.

Abstract "These egocentric representations…require inputs from MEC." Subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa” "While these DREADDs-mediated manipulation experiments suggest the necessity of MEC signals for border tuning in RSC…". Figure 5 legend: "RSC border cells require input from MEC to maintain their boundary tuning". Necessity and Require are untenable inferences from the modest effects shown, and this should all be rephrased so casual readers are not misled.

They should perform a sanity-check analysis where cells with peak rates of say 1Hz are excluded from the analyses. If a cell is not really firing, it may not be that informative to examine the spatial features of the few available spikes.

We understand the reviewer’s concern and carefully rephrased these statements in the revised manuscript in the Abstract, subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa”, Discussion section and in the legend of Figure 5. While this study cannot determine whether or not the complete silencing of MEC causes a total disruption of boundary coding in MEC, our results are sufficient to conclude that MEC inputs are necessary to maintain sharp boundary tuning in RSC, as the silencing of MEC cells significantly increases EMD scores of RSC border cells, and we carefully clarified these points in the revised manuscript.

We agree that a low number of spikes can result in misleading spatial rate maps. Overall, cells are only classified as RSC border cells with an average firing rate above 0.5 Hz across all non-manipulated sessions. However, we decided to include cells that have minimal firing only in opto/chemogenetic manipulation sessions, as this is a clear indication of disrupted firing due to the manipulation.

h) Subicular boundary related inputs. Boundary coding being both preserved in darkness (Lever et al., 2009; see also Brotons-Mas et al., 2010), and most cells maintaining their tuning without walls present (Lever et al., 2009; Stewart et al., 2014) is shown in the subiculum and thus there is a source of boundary-coding information additional to the Entorhinal cortex that shares some key features with these retrosplenial border cells. The projection to the retrosplenial cortex from the dorsal subiculum, where boundary vector cells have been found, is dense (see e.g. Wyss and Van Groen, 1992). I think Rosene and van Hoesen, 1977 suggest the main cortical afferent to the granular RSC originates in the subiculum. Thus, consideration of boundary information coming into the RSC should mention such boundary cell and anatomy tracing work.

We agree with the reviewers that the subiculum is indeed a promising candidate to provide boundary-related inputs for RSC border cells, besides MEC, in particular because of its dense connectivity and the presence of boundary vector cells. It is possible that some of the unperturbed RSC border cells after the pharmaco- or optogenetic silencing of MEC may receive inputs from the subiculum.

We note that RSC border cells fire predominantly at the proximity of walls (Figure 4—figure supplement 1C,D) unlike the vector-like representation of boundary vector cells in the subiculum, which indicates higher similarity to MEC border cells. However, some key features of boundary vector cells, in terms of the maintenance of boundary tuning in darkness or without walls present, are shared with RSC border cells. Further investigation into the specific contribution of subicular inputs to RSC is important future work, and we have added a section in the discussion section to consider the potential relevance of subicular inputs, including the references provided by the reviewer.

2) What are the defining characteristics of the RSC 'border cells', are they directionally tuned, how do they relate to other boundary-responsive cells, and what to call them?

a) Quantification of border scores is by comparison to a Gaussian smoothed template of firing at the borders. However, the comparison method (earth mover distance, EMD) is not clear – giving an intuitive explanation, such as the total distance moved by all units of firing rate to match the firing rate and template distributions would be helpful. More intuition for the numbers would be gained by showing cells with values near the classification thresholds, not just at/near the tails. Figure 1F shows values of 0.14, 0.145, 0.159…. and then 0.222 and 0.312. Please show cells near 0.1906 cutoff. Relatedly, in Figure 1E, show the EMD values corresponding to 95 and 90% cutoffs.

We agree with the reviewers that a more intuitive explanation on the EMD metric would benefit the reader’s understanding, in particular because it is a novel methodology. We have added an additional explanation in the Results section. We further added many example rate maps of cells with EMD scores at evenly spaced intervals in the range of 0.14 to 0.23 in Figure 1—figure supplement 2G from a single animal’s dataset, and provided the 95th and 90th percentile values in Figure 1E to give a better intuition on the relationship between a cell’s ratemap and its associated EMD score.

b) It is not clear the extent to which spiking has to be restricted to the borders of the environment, how the method captures spiking that is displaced a certain distance from a border, and how the distance and egocentric direction tuning of each cell was found. If the template is only at the border are more distally tuned cells missed?

Is this same measure applied to the MEC (for fair comparison of the MEC and RSC it should be)? And does it find cells that fire distant from the border in MEC? This is particularly relevant given the puzzle that spatial representation occurs up to 50cm from the border by MEC 'border cells'? Did distance tuning differ between RSC and MEC (please show the distance tuning distributions for both areas)?

The EMD method is somewhat flexible in cell classification by allowing neurons to have a certain degree of spikes in the center of the arena. It focusses on the general weight of the firing fields and assigns increasingly higher distance value when this weight moves away from the edges. This can be seen in the newly added rate maps in Figure 1—figure supplement 2G (see also previous comment 2a), where rate maps have increasingly more firing fields towards the center as their EMD score increases, and cells generally have a large proportion of spikes away from the walls when the EMD falls above the 1st-percentile threshold of 0.191.

To assess the procedure’s ability to classify cells with different preferred firing distances, we simulated a set of synthetic rate maps to quantify this relationship between the wall distance of spikes and a cell’s EMD score (Figure 4—figure supplement 1C). As expected, the EMD score is minimal when all spikes are nearby the wall, with non-zero values and offset of the trough due to behavioral under-sampling of space. We further observed a linear increase in EMD scores as a function of increasing distance of the spikes away from the wall, and simulated cells would be classified until spikes reached the threshold of 17-18 cm wall distance.

Therefore, as the reviewers pointed out, it is possible that the original boundary template might have missed border cells with a larger distance tuning to the walls, because this template was optimal for capturing cells with preferred distance tuning below 20 cm. In order to assess the presence of border cells that fire beyond this range, we used 5 additional templates with their main field at increasing distance away from the wall (Figure 4—figure supplement 1D; this was done only for a subset of data due to computational constraints).

The result suggests that cells that were identified with the original template could still be captured with templates that have fields at 2 rows distance (e.g., up to template 3). Templates at these distances would capture a subset of additional cells, which were qualitatively similar to the original border cells (firing fields attached to the wall but more extended, with a peak distance tuning of 16 ± 5 cm). Importantly, as the number of cells identified with the original template decreased toward zero, we did not see any new cells identified with templates at far distances away from the wall either. This result confirms that RSC border cells were mostly captured by the original template, exhibiting distance tuning at the proximity of walls up to 20 cm, and the existence of RSC cells with longer wall distance tuning is unlikely.

It is true however that we could employ the same EMD procedure to categorize MEC border cells, but applying this procedure is not straight forward. MEC cells are typically tuned to only one or two walls, and it would thus require EMD scores for multiple templates that have firing fields at different combinations of them (10 templates in total, or 14 if you consider 3-wall combinations). For the statistical tests this would require the comparison between a shuffled distribution of each respective template and the cell’s EMD score, which after adjusting for multiple comparisons would yield rather conservative estimates.

We have performed a preliminary exploration of this approach using templates with firing fields attached to only 1 wall (Author response image 1). What we observed is that the EMD procedure was able to find cells with rate maps that are very similar to the template, some of which were identified previously as border cells (Author response image 1C, middle and bottom rows). However, this approach also identified a number of false positives, including cells that have only small firing fields nearby the wall, and the two distributions of EMD scores between border and non-border cells are partially overlapping (Author response image 1A). These examples, together with the complications of elaborate statistical comparisons, demonstrate that the procedure would need substantial adaptations to be suitable for classification of MEC border cells. Unfortunately, this undermines the benefit we’re trying to achieve here, which is greater comparability with our results in RSC. We thus have a strong preference to continue to rely on the original border score for border cell classification in MEC.

Author response image 1

As to why our decoder performed better at higher wall distances in MEC cells compared to RSC (Figure 6C), we believe it’s because of a different overall spike distribution towards the center of the arena. Despite both populations of border cells having maximal firing at the edge of the arena (see peak distance tuning distributions in Figure 4J for RSC and Figure 6—figure supplement 1E for MEC), we observed significantly lower population vector correlations in MEC at a longer wall distance range (Figure 6—figure supplement 1B). What this suggests is more variability between cells, where some show stronger decays of firing rate as the animal moves away from the wall, while others have weaker decay. Furthermore, decoding performance is dependent on reproducibility of the same firing rate at the same distance, which is not necessarily apparent in a rate map, but which produced more consistent results for MEC border cells.

Regarding our procedure for obtaining peak tuning values, this was previously described in the methods > border rate maps section: “A cell's preferred direction and distance was obtained by finding the bin with maximal firing rate, and selecting the bin's corresponding distance and angle values.”

These points are now described in the Results section of the revised manuscript.

c) The comparison to actual border cells (that must fire continuously along a border) is important – the new score does not penalise gaps in firing (hence the appearance of a grid cell in Figure 5L top left?), nor does it require an allocentric tuning direction (a characteristic of border cells and boundary vector cells).

How strong is the tuning to egocentric direction or are these cells that mostly fire near a border in any direction? 185/485 egocentrically tuned cells seems low. Do 300/485 have no directional modulation, or is there qualitative egocentric modulation but below the statistical threshold? If not directionally modulated at all they can't be classified as either egocentric or allocentric.

The claims made (see also 2d) warrant further investigation of the potential differences between their confirmed egocentric border cells and the potentially numerous allocentric border cells within the RSC. Please provide the distribution of egocentric (and allocentric) directional tuning strengths across the populations of 'border cells' in RSC and MEC.

We would like to clarify that RSC border cells described in this work do fire alongside the entire wall, albeit not in equal proportion. Many cells are constrained by additional factors, like direction of the wall relative to the animal which we explore in Figure 4, that causes firing to appear discontinuous in a cell’s rate map. One potential cause is a substantial uneven distribution of both position and direction occupancies across spatial bins, as animals naturally sample the environment unevenly in a short recording session. Illustrations of this phenomenon are the simulated border cells presented in Figure 6—figure supplement 1F, as well as the higher EMD scores in the 0-5 cm distance range in Figure 4—figure supplement 1C. Spikes were generated to represent a pure border cell, with the additional constraint of a boundary within a certain range of directions (width is π/2) relative to the animal. The resulting trajectory-spike plots and rate maps are discontinuous, and the top cell in this figure has no spikes in the north-west corner due to under-sampling. Generally speaking, most trajectory-spike plots show spikes covering the entire wall however (see examples in Figure 1C, Figure 4A and 4E-F, and Figure 4—figure supplement 2), and for directionally-tuned neurons the egocentric border maps have a single continuous firing field (Figure 4C and 4E-F, and Figure 4—figure supplement 2).

Regarding the tuning strength of all border cells, we indeed found that roughly 40% of all neurons have egocentric directional tuning. We now provide the proportions of egocentric and allocentric directionally-tuned border cells in RSC and MEC in Figure 6B. This result indicates that only 7% of all RSC border cells are tuned to allocentric head-direction, which is similar to non-border cells (7.3%, also see minor point 1). Therefore, RSC border cells below the egocentric statistical threshold are not necessarily allocentric, and still have relatively high MVL for egocentric tuning (RSC: directional cells, MVL = 0.40 ± 0.01; non-directional cells, MVL = 0.29 ± 0.01; mean ± S.E.M.; Wilcoxon ranksum test: z = 9.45, p = 3.3 x 10-21). In contrast, a subset of border cells in MEC show conjunctive coding with allocentric head-direction, as previously reported in Solstad et al. (2008), where 58% of cells are significantly tuned to allocentric HD.

These results highlight the difference between egocentric-dominant cells in RSC and allocentric-dominant cells in MEC, and we included this point in subsection “RSC border coding is more local and correlated with the animal’s future motion”.

d) Clarification in the language used in the Abstract, Introduction, and Discussion section seems vital. The authors make much of the distinction between the allocentric boundary cells in other regions, and the egocentric boundary cells here. Furthermore, the abstract offers the summary: 'Border cells in RSC…are sensitive to the animal's direction to nearby borders'. Is Earth Mover Distance (EMD) alone egocentric? If not, and all of the analyses are on the EMD population, the result should not be framed as allocentric to egocentric transformation. If the egocentric border cells were analyzed throughout, that would justify the title and framing.

It is confusing to refer to both the barrier-responsive cells in RSC and the previously documented EC border cells as simply 'border cells', when the two populations appear to be different. 'Border cells' were defined by Solstad et al., 2008 as cells that fire when the animal is right next to a barrier in a specific allocentric direction (thus distinguishing them from the pre-existing 'boundary vector cells'). They subsequently suggested that border cells respond to direct contact with a physically present barrier, unlike 'object vector cells' which also respond to an object suspended above them (Hoydal et al., 2019), or boundary vector cells which can respond to the previous location of a barrier (Poulter et al., bioRxiv). The barrier-responsive RSC cells are clearly not 'border cells' – they can respond to barriers at a distance, some with a tuning to egocentric direction, and (the authors argue) are not a direct sensory response to the barrier.

What should they be called? If they think the population is generally tuned to egocentric direction (this is not clear, see next point below) 'egocentric boundary vector cells' would be technically correct, but is a bit of a mouthful, the main thing to avoid would be calling them something they are not. Perhaps referring to them by a label containing 'RSC' would at least make clear when they are referring to their RSC cells and when they are referring to border cells in EC ('RSC boundary cells' or similar).

We completely agree with the reviewer that the nomenclature of functional cell types that encode aspects of environmental boundaries is becoming complicated. The first use of ‘border cells’ was proposed by Solstad et al., (2008), and refers to a group of cells in MEC with specific boundary tuning properties. The definition itself however is not very informative of their exact properties, other than the encoding of border information. Conversely, the ‘boundary vector cell’ naming implies vector-like properties (e.g. distance and direction) and refers to boundary-responsive cells found in the Subiculum. As the reviewer suggests, the term ‘egocentric boundary vector cells’ is another potential definition for the direction-selective cells, and this has been adopted by Alexander et al., (2020) together with ‘inverse egocentric boundary vector cells’ for boundary-off cells.

It’s important to reiterate however that only 39% of boundary-responsive cells reported in this work show directional wall tuning, making the ‘egocentric’ term rather inaccurate, as opposed to 100% of the cells reported in Alexander et al., (2020). Instead, all cells in this manuscript are identified by our EMD procedure that share one defining feature, that is, a strong degree of spiking near all outer walls of the arena and are thus boundary-responsive across the environment. Most of our analyses, with the exception of Figure 4, have focused on this distance aspect of cell tuning, and border cells in both RSC and MEC share wall-proximity tuning properties (Figure 4J, Figure 6—figure supplement 1E, see our comments to 2a). Our additional analyses with different EMD templates further confirmed that the existence of RSC border cells at a longer wall-distance tuning is unlikely.

We thus opted for a more general term of ‘border cells’, and added the anatomical label of RSC or MEC throughout this work.

In light of this discussion we have reviewed the terminology throughout the manuscript and adapted text wherever necessary to reduce the amount of potential confusion between different functional cell types and/or anatomical regions. We would be happy to discuss further if the reviewers still consider the terminology confusing in the revised manuscript.

e) Description of MEC border cells is a little misleading. "These features are shared with MEC border cells, as their boundary tuning is also maintained without walls present (Solstad et al., 2008)".

The data of Solstad et al., 2008 (Figure S8 and S9) show rather altered firing when walls are removed. (A) Of 10 border cells studied in the wall-no wall manipulation, only one maintained its field in the no wall environment, the others did complex or seemingly rotational remapping. (B) Furthermore, Solstad S9 suggests that the seeming-rotational remapping of border fields occurred despite the directional firing of simultaneously recorded head direction cells' being stable throughout the wall-no wall manipulation. Thus, even the seemingly simple rotational remapping may be more complex. In all, this section thus needs revision and clarification.

The main result of the no-wall manipulation in Solstad et al., (2008) is described in Figure S7. We have followed the original authors’ interpretation of their data: “Border fields were often but not always maintained after removal of the external walls”.

The reviewer rightfully points out however that border cells in MEC show rotational remapping to some degree after wall removal, which is a complex dynamic and its interpretation depends on a thorough understanding of the underlying circuitry involved (e.g. relationship between border cells in MEC and head-direction, grid and place cells). Yet rotational remapping does not alter inherent firing properties of border cells as they still encode distance information to nearby boundaries, although to a different border. In that sense the features described in our results are in line with those obtained in Solstad et al., (2008).

We have revised the Discussion section to clarify these subtle differences between both results.

3) 'Complete Darkness'. If a darkness condition disrupts, there is less burden on the experimenter to ensure its completeness; e.g. darkness greatly reducing gridness implies vision aids grid cell firing in mice (Chen et al., 2019) is a safe inference, and if the darkness was not complete, this does not matter that much. […] For evidence that humans, rats, mice and cats can see in the supposedly invisible infrared spectrum, if they are dark-adapted, see e.g. Pardue et al., 2001 and Palczewskaet al., 2014. A paper on good ferret vision at 870nm may be of interest (Newbold and King, 2009).

We understand the reviewer’s concerns regarding our definition of complete darkness. These experiments were performed under the assumption that rats have limited vision in the higher wavelengths, with cone sensitivity tapering off rapidly above 600-650 nm (e.g. in the range of red light; see spectral sensitivity functions in Figure 1, Figure 2, Figure 3 in the review of Jacobs et al., 2001). No video-based tracking system can work in the absence of any light, so instead of using the visible light spectrum, our recording set-up included 6 Flex3 cameras with many infra-red (IR) LEDs aimed at the arena, tracking IR-reflective markers connected to the implanted electrode.

We have taken several measures during the experiment to ensure no visible light was present for the animals. This includes taping off small light sources in the room, such as computer and sensor lights, while the arena was fully enclosed by a thick, black curtain. A room lamp was turned on for dimly light conditions until 10 seconds before the start of the recording, and turned on again during the inter-trial interval duration of ~5 minutes. During recording, the experimenter’s experience was that of complete darkness, with zero visibility in the room even after 15 minutes of adaptation. He remained stationary and silent near the arena throughout the recording while scattering food pellets.

However, it comes as a surprise to us that there is evidence that both rats and humans have a sensitivity to some degree in the infra-red spectral range after dark-adaptation. In order to compare our IR light conditions with those references provided by the reviewer, we have taken additional measurements to capture the spectral density of our lighting conditions, together with an energy intensity measure at the peak wavelength (Author response image 2).

Author response image 2

The IR LED illumination peaks at 850 nm, and tapers off rapidly with little to no energy remaining below the range of 750 nm. While there is no overlap between this spectral range and the rat’s eye spectral sensitivity functions in the traditional literature (Jacobs et al., 2001), this range does cover the infra-red stimulation used in the literature cited by the reviewer.

In particular, Pardue et al., (2001) report visual-evoked responses in V1 of rats as a result of direct retinal stimulation during anaesthesia using LEDs at peak wavelengths of 890 and 936 nm. Palczewska et al., (2014) investigate human detection of direct retinal stimulation using fs-pulsed laser light in the range of 950-1200 nm, while Newbold and King (2009) study ferret vision where animals learned to detect IR LEDs turned on in the range of 870 nm.

We would like to highlight two important differences however between these studies and ours:

1) Light intensity. All three studies used high light intensities, directly stimulating the retina at close distances and after dark-adaptation. We have measured light intensity of our LED system using a S170C photodiode (Thorlabs) and PM100D power meter (Thorlabs), which came in at 6000 μW or 18.52 W/m2 when sampled near the light source. Our cameras were positioned 2 m above the arena surface from a ceiling mount, at a 45-60° angle pointing downwards, and the energy at the arena surface was substantially lower, measuring 0.51 ± 0.06 W/m2. Given the presence of 6 cameras, this is a 18.52*6/0.51 = 217-fold reduction in light energy entering the eye of the animal due to light divergence over distance.

2) Light detection. There is a real difference between the ability to detect the presence or absence of a point light source, as opposed to using that light to see the environment. In the first case, detection can occur in extremely low visibility conditions, while the latter requires much higher levels of illumination.

Finally, as a sanity check, we further checked whether cells in RSC changed their spiking rates as a function of dark-adaptation, but we could observe no significant differences in the number of spikes between the first half and second half of each darkness session. This holds true both for border cells (Wilcoxon signed rank test: z = -1.42, p = 0.156) and other cells (Wilcoxon signed rank test: z = 1.04, p = 0.300) in RSC.

Taken together we hope this provides enough support for our interpretation that our animals were in no position to have enough visibility under these IR-light conditions to properly see their surroundings. All these experimental conditions are explicitly mentioned in subsection “Border cells retain th 214 eir tuning in darkness and are not driven directly by whisker sensation”, and we have added further descriptions in the Materials and methods section of the revised manuscript.

4) Object insertion

This manipulation is not yet convincing.

a) Though it features in their abstract as a main finding, there are not many cells for this experiment.

b) It seems sub-optimal that the ROI around the object is square, not circular, and quite a large square.

The reviewer highlights an issue here that we ourselves have struggled with too. That is, the observation that RSC border cells did not increase their firing in an area around the new object (Figure 2G-I), while they did show an increase in the boundary template EMD scores (Figure 2J), suggestive of changes in the cell’s rate map after introducing an object.

However, please note that our EMD method is sensitive enough to detect changes elicited by an added object even in a small number of cells, illustrated by the analysis of object manipulations in S1bf neurons, where EMD scores of 23 cells dropped significantly as a result of object insertion (Figure 2—figure supplement 1H). Furthermore, a change in firing due to the object in either direction (increased or decreased) would show in our measure of spatial correlations between session types (Figure 2I;), but correlations did not decrease for RSC border cells, in contrast to S1bf neurons (Figure 2—figure supplement 1I, left panel). Here, the total number of cells was equal in both cases (23 classified cells) and we used the same approach and statistical tests, yet found a significant shift of the firing fields by the object insertion only in the somatosensory cortex, but not RSC.

Regarding the ROI drawn around the object location, we realized the illustration in Figure 2F was not an accurate representation of the underlying region used for the calculations, as the ROI had a width of 8/25 bins (e.g. 32 cm, or 1/3rd of the arena) but was drawn larger in the figure (more than half width). In addition, we took particular care as to not include the firing fields close to the nearby walls in the north-west corner. Considering the reviewer’s comment, we have adapted this ROI to now be of circular shape, with a diameter 8 spatial bins, covering 11 cm of space on each side of the object. We have updated Figures 2F and 2H accordingly, but the results, described in subsection “Border cells form new firing fields nearby added walls but not objects”, have not changed qualitatively.

c) Perhaps 10 cells increase their firing in this large square ROI, and others decrease their firing. A lack of perturbation by object insertion is not self-evident from these data; rather there could be some cell-specificity, with some cells with firing being actively inhibited by the object, and others being excited by it. There seem to be quite large reductions in firing in 3 cells.

d) Thus, their aggregate analysis is perhaps a little simplistic, and misses out cell-specific responses. As there is not much statistical power, it might be simpler just to show the majority of these cell responses in a supplementary figure.

Different neurons indeed show variability in firing inside the ROI between session types. While border cells generally fire near the outer walls, a substantial number of spikes can still be observed in the center area even in an open field, which are considered ‘noisy’ spikes. This activity has high variance both between sessions, and between cells, which can be seen when computing the same ROI result between the first and last regular session without on object in the arena (Normalized variance in FR inside ROI between sessions: Reg-Reg, CV = 0.93; Reg-obj, CV = 1.06; Figure 2H, Author response image 3).

What we observed in Figure 2H is that across the population, RSC border cells do not fire consistent with their firing patterns nearby walls (e.g. formation of new firing fields, as seen in Figure 2B,C with walls). Furthermore, a combination of cell-specific increases and decreases between session types would result in decreased spatial correlations, which we did not observe in Figure 2I. Taken together we think such cell-specific changes are unlikely and we do not analyze further in this direction.

Author response image 3

e) Importantly, the EMD templates are biased towards increasing the likelihood of a null finding. Put simply, the walls in the boundary template have two rows of high firing bins near them, whereas in the object template, these same walls have only one row of high firing bins near them, and moreover this row is of lower rate. In marked contrast, the object in the object template has three rows of higher rate bins around it. (To be clear, the authors mention this bias in their Materials and methods section: "adding additional weight in the location of placed objects/walls".) Thus, the object is expected (by the template) to elicit high firing for a more extended distance and at higher rates than that at the boundary even though the boundary is an extended cue and should influence the cell more. There is no need for such a biased hypothesis.

We understand the reviewers’ concern of the weight distributions of EMD templates, but would like to underscore the notion that the exact distribution of weight in such a template is not a reflection of our underlying hypothesis of the rate distributions of classified cells. The main aim of this object template is to determine whether or not neurons form firing fields around the object location in a similar fashion as they do to walls. To that extent, adding additional weight near the object would increase, rather than decrease, the likelihood of a significant finding if the object elicits additional spikes from the neuron when comparing the object template scores between regular and object sessions. However, we still did not find a significant decrease in EMD scores with this template for RSC border cells, contrary to the S1bf neurons, consistent with the ROI spiking rate and spatial correlation results.

We have repeated the EMD analysis with another template with equal distribution of weight around the object and walls (1 row at equal values to the outer walls), and the resulting EMD distribution is qualitatively the same as the template for Figure 2J, with no significant differences between regular and object sessions (Normalized object EMD score: R1, 1.0 ± 0, O1, 1.036 ± 0.032, O2, 0.986 ± 0.034, R2, 1.009 ± 0.028; Friedman test: Χ2(3) = 4.25, p = 0.24).

f) More details should be provided as to the previous experience with the objects. Might there be an inhibition by novelty? g) Object size: Figure 2F says the object was 15cm in diameter, but Figure 2—figure supplement 1, part g and the main text says 10cm. Please check and clarify sizes for all experiments, including the size of the ROI around the object.

The correct object size was 10 cm and we have corrected the experimental details in the method section, and reported ROI sizes for the added wall and object sessions in the revised manuscript in subsection “Border cells form new firing fields nearby added walls but not objects”.

In summary, there is no doubt whatsoever that the walls exert a greater influence than the object, but that is different from saying that "firing of RSC border cells…is invariant to an object introduced into the maze" (Discussion section). This is not an accurate summary when even their analysis as it stands shows a substantial increase in EMD to the boundary template in the object condition.

Our interpretation of the data is that RSC border cells do not exhibit a significant shift of their firing fields towards the proximity of an introduced object location, not like an introduced wall, supporting the different coding mechanism between objects and walls. However, as the reviewers pointed out, it does raise the question of what were the exact changes in the rate maps that resulted in increased boundary template EMD scores. These changes appear not to be specific to the object location, and one possible explanation could be a behavioral bias for the animal after introducing an object to the arena, as we have shown a modulation on FR by turning behavior in RSC border cells (Figure 6E-I). However, substantially more data and in-depth experiments would be required to clarify the interactions between objects and walls, which is something we leave for a future research project.

Following the reviewers’ comment that our original statements such as “invariant to an object” were too strong of nature and do not reflect our current results, we have updated several sections of the main text to better accommodate their concerns and our views listed above, and rephrased our conclusion in subsection “RSC border coding is more local and correlated with the animal’s future motion”.

[Editors' note: further revisions were suggested prior to acceptance, as described below.]

The manuscript has been improved but there are two remaining issues that need to be addressed before acceptance, as outlined below:

1) The statement in the Abstract where it says the cells "depend on inputs from MEC" should be moderated to something like "are influenced by inputs from MEC" to be more consistent with the point made in the reviews.

2) In the response you say, "we decided to include cells that have minimal firing only in opto/chemogenetic manipulation sessions, as this is a clear indication of disrupted firing due to the manipulation." Please confirm the process by which the population of cells was selected on which to test the effect of the manipulation.

Regarding the first point about the Abstract, we now changed the statement from (the cells) “depends on” to “are affected by” inputs from MEC”. (We also made small changes in other part of the Abstract due to the 150 word limit).

On the second point concerning about the firing rate threshold, we now clarified the description and further performed additional analysis. As described in the point 1g) of the rebuttal letter, we used a firing rate threshold of 0.5 Hz only for the baseline sessions in the original analysis. In this revised manuscript, in order to assess whether the main effect of increased EMD scores could be explained by low-firing cells, we repeated the analyses with the consistent 0.5 Hz threshold throughout all sessions and obtained the same conclusions. This additional anaysis confirms that the impairment of boundary coding cannot simply be explaine by the reduction of spiking. This point is now described in subsection “Inhibition of MEC input disrupts border coding in RSC but not vice versa” and subsection “Spike sorting and cell classification” of the revised manuscript.

https://doi.org/10.7554/eLife.59816.sa2

## Article and author information

### Author details

1. #### Joeri BG van Wijngaarden

Max Planck Institute for Brain Research, Frankfurt, Germany
##### Contribution
Conceptualization, Data curation, Formal analysis, Validation, Investigation, Visualization, Methodology, Writing - original draft, Writing - review and editing
##### Competing interests
No competing interests declared
2. #### Susanne S Babl

Institute of Neurophysiology, Neuroscience Center, Goethe University, Frankfurt, Germany
##### Contribution
Data curation, Investigation, Methodology
##### Competing interests
No competing interests declared
3. #### Hiroshi T Ito

Max Planck Institute for Brain Research, Frankfurt, Germany
##### Contribution
Conceptualization, Data curation, Formal analysis, Supervision, Funding acquisition, Validation, Investigation, Methodology, Writing - original draft, Writing - review and editing
##### For correspondence
hiroshi.ito@brain.mpg.de
##### Competing interests
No competing interests declared

### Funding

#### Japan Science and Technology Agency (JPMJPR1682)

• Hiroshi T Ito

#### H2020 European Research Council (714642)

• Hiroshi T Ito

#### Max-Planck-Gesellschaft

• Hiroshi T Ito

#### Behrens-Weise-Foundation

• Hiroshi T Ito

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

### Acknowledgements

We thank Martin Vinck for suggesting the approach with the Earth Mover Distance (EMD) and providing initial software for analysis; Diogo Santos-Pata for discussion and comments related to the manuscript; N Vogt, S Zeissler, E Northrup and G Wexel for animal care; F Bayer and A Umminger for building the behavioral mazes; Robert Gebauer for technical support; and all members of the Ito laboratory for discussions.

### Ethics

Animal experimentation: The experiments were approved by the local authorities (RP Darmstadt, protocol F126/1009) in concordance with the European Convention for the Protection of Vertebrate Animals used for Experimental and Other Scientific Purposes.

### Senior Editor

1. Laura L Colgin, University of Texas at Austin, United States

### Reviewing Editor

1. Neil Burgess, University College London, United Kingdom

### Publication history

2. Accepted: October 15, 2020
3. Version of Record published: November 3, 2020 (version 1)

? 2020, van Wijngaarden et al.

## Metrics

• 1,201
Page views
• 139
• 0
Citations

Article citation count generated by polling the highest count across the following sources: Crossref, PubMed Central, Scopus.

A two-part list of links to download the article, or parts of the article, in various formats.

### Open citations (links to open the citations from this article in various online reference manager services)

1. Neuroscience