Entorhinal cortex minimises uncertainty for optimal behaviour

Minimizing spatial uncertainty is essential for navigation but the neural mechanisms remain elusive. First, we show that polarising cues produce an anisotropy in the information available to movement trajectories. Secondly, we simulate entorhinal grid cells in an environment with anisotropic information and show that self-location is decoded best when grid-patterns are aligned with the axis of greatest information. Thirdly, we expose human participants to polarised virtual reality environments and confirm the predicted anisotropy in navigation performance and eye movements. Finally, using fMRI we find that the orientation of grid-like hexadirectional activity in entorhinal cortex is aligned with the environmental axis of greatest information; and that this alignment predicted the anisotropy of participants’ spatial memory. In sum, we demonstrate a crucial role of the entorhinal grid system in reducing uncertainty in the neural representation of self-location and find evidence for adaptive spatial computations underlying entorhinal representations in service of optimising behaviour.

INTRODUCTION moving parallel to the polarisation axis defined by the cues. This should lead to a larger 1 impact of noise on spatial computations, as well as to larger observed errors in spatial 2 memory responses. Thus this framework predicts that, in a circular environment polarised by 3 two cues grid cells should align one grid axis perpendicular to the polarisation axis. 4

Hexadirectional activity clusters orthogonal to polarisation axes 1
To test environmental anchoring of the entorhinal activity in simple polarised environments, 2 we estimated hexadirectional entorhinal activity (Doeller et al., 2010; Horner et al., 2016; 3 Kunz et al., 2015). In brief, the method takes advantage of a six-fold periodic directional 4 modulation of fMRI activity in entorhinal cortex during virtual movement (see Materials and 5 Methods). The estimated orientations of hexadirectional entorhinal activity clustered 6 approximately perpendicular to an axis defined by the configural cues (Experiment 1, Figure  7 4) across participants (i.e. the absolute angle to the nearest 'grid axis' was approximately 8 30°, corresponding to maximum mis-alignment. Circular mean in 60°-space= 34°; Figure 4C-9 D; N=26, circular V test for deviation from homogeneity perpendicular to the polarisation 10 axis: V=6.68, p=0.032). Note that low-level visual features were equal in all viewing 11 directions. A whole-brain analysis confirmed that activity in right entorhinal cortex was 12 increased for runs at periods of 60° aligned with the optimal orientation ( Figure 5A To test if the environmental anchoring depends on the configural cues, we scanned another 24 group of participants in an environment with a non-configural, polarisation axis consisting of 25 only two extra-maze cues. The estimation direction of hexadirectional activity again 26 clustered perpendicular to the polarisation axis (circular mean in 60°-space= 32.28°; Figure  27 6) replicating the findings from the first experiment (i.e. the absolute angle to the nearest 28 axis was approximately 30°, corresponding to maximum mis-alignment; N=24, circular V 29 test: V = 5.95, p=0.043; Figure 6). Sampling of running directions could not explain these 30 effects in either experiment ( Figure 3 -figure supplement 1). In sum, the results from fMRI 31 experiment 1 and the replication in fMRI experiment 2 provide converging evidence that the 32 preferred orientation of hexadirectional activity in entorhinal cortex depends on navigation-33 relevant, polarising cues, independent of the specific type of cue (configural or non-34 configural). The orthogonal arrangement of hexadirectional activity is in agreement with 35 optimal activity patterns of grid cells for self-localisation, suggesting that the impact of 36 environmental geometry on grid cells may be adaptive. 1

Behavioural anisotropy is linked to hexadirectional orientation 2
To test a potential relationship between the anisotropy in spatial memory performance (see 3 above) and hexadirectional activity, we pooled the data from fMRI experiment 1 and 2. This 4 metric showed a positive correlation with the angular offset of hexadirectional activity from 5 the polarisation axis of the environments ( Figure 4D, Figure 6C) across participants ( Figure  6 6D; one-sided, Spearman's correlation with pooled data of experiment 1 and experiment 2. 7 N=50: R=0.291, p=0.020). The positive relationship indicates that participants with a more 8 orthogonal orientation of hexadirectional activity were relatively more precise in placing 9 objects on the X dimension than the Y dimension). This association provides further 10 evidence for an adaptive nature of changes in grid-cell-like representations caused by 11 environmental geometry. 12 13 14

DISCUSSION 15
To navigate the world around us we often have to orient ourselves using noisy and To shed light on these issues we combined biologically inspired, computational modelling, 29 behavioural testing, and fMRI-based proxy measures of grid-cell-like population activity. We 30 designed virtual environments where we predicted anisotropies in spatial information across 31 different moving directions. In particular, we focused on the angular change to stationary 32 cues during movement. In line with our predictions, estimation of movement distance was 33 least precise when participants moved along a polarisation axis. Likewise, spatial memory 34 performance in the free-navigation, object-location memory task of fMRI experiment 2 35 showed relatively larger errors parallel to a polarisation axis (i.e. anisotropy). This anisotropy 36 in spatial memory was not significantly different from zero in fMRI experiment 1 and the eye 37 tracking experiment, which could be explained by a more even distribution of spatial 1 uncertainty across movement directions in the environment with 12 cues. Here, differences 2 in parallax information arise only through the 'second order' configural cues, rather than 3 single cues, and the eye tracking experiment confirmed that those were attended to for a 4 longer time than others. To test the theoretical implications of anisotropic spatial information 5 on a system of grid cells, we used biologically inspired simulations. We demonstrate that the 6 most accurate representation of self-location is obtained when grid-patterns are misaligned 7 at 30° with the polarisation axis, reflecting an alignment of the grid pattern with the axis of 8 highest spatial information. fMRI-based estimates of hexadirectional activity in the entorhinal consistent orientations across participants in two independent experiments. Importantly, 12 these effects cannot be explained by the presence of objects during part of each trial, since 13 their locations were randomised and the two fMRI experiments had different numbers of 14 objects (6 and 4). As predicted, the phase of the hexadirectional signal in entorhinal cortex 15 aligned with the axis of highest spatial information -the optimal grid orientation for decoding 16 self-location. Importantly, the angular offset of hexadirectional activity from the polarisation 17 axis correlated negatively with the anisotropy in spatial memory performance. This might 18 result from different navigation strategies that participants used, for example focussing on 19 subtle landmarks such as differences in the grass on the ground or on the texture of the wall, 20 Taken together, our results provide evidence that the effects of environmental geometry on 21 the grid system are adaptive and angular change to stationary cues play a central role in the 22 computations underlying the grid system. These computations may be sensitive to 23 polarisation axes defined by cues rather than information provided by environmental 24 and rely on vestibular information (Taube, 2007). On the other hand, distance information can be inferred visually from the relative size of objects and cues (Gibson, 1958) or is based 1 on proprioceptive and timing information during movement, both of which modulate grid cell 2 activity (Kraus et al., 2015). Hence, triangulation for navigation could bridge different sensory 3 modalities. Furthermore, it combines egocentric cue directions and distance information to 4 infer map-like, survey representations of the environment, thereby naturally integrating 5 egocentric and allocentric reference frames, which are not mutually exclusive and can work 6 in parallel and across brain regions (N. Burgess, 2006;Epstein, 2008;Wilber et al., 2014).

Simulation of Euclidean triangulation 4
To test the impact of stochastic fluctuations or noise on triangulation accuracy, we 5 implemented the following simulation in Matlab (2012b, The MathWorks Inc., 6 Massachusetts). Triangles were formed by two points representing start and end points of a 7 straight path in the horizontal plane (e.g. observer locations at time point 0 and time point 1) 8 and one of two polarising, stationary cues. Triangulation was based on the sine rule 9 according to: 10 where c is the unknown side (distance to the cue at the end point; Figure 1  with the exception of Figure 1 -figure supplement 33 that shows the effects of different path 5 lengths and different noise levels. In other words, usually the path length was half the length 6 of the polarisation axis. Triangulation to additional cues was performed for a given path 7 angle if these were within ± 90° (determined from the centre of a path) to emulate a limited 8 field-of-view. This meant that cues in only that half of the environment were used for 9 triangulation that was faced on a given path (1 point in Figure 1  translation common to all grids in the module. This resulted in a total of 1560 grid cells in a system. Grid tuning curves could also be rotated to specified orientations; all grid tuning 1 curves always shared a common orientation. All these transformations were performed 2 using cubic interpolation. 3 4 In each iteration of the model, the true position (x, y) was specified as the centre of the 5 circular environment (0, 0). To model uncertainty, Gaussian noise, with standard deviation 6 varied independently in x and y, was generated separately for each module and added to (x, 7 y), to yield a noisy position estimate (x + ε x,i , y+ ε y,i ). Anisotropic uncertainty was produced by 8 independently varying the standard deviations of ε x,i and ε y,i between 0 and 5. All cells within 9 a module therefore received the same noisy position input, but cells in different modules 10 received different input. Thus cell firing rate was now modulated according to α i (x + ε x,i , y+ 11 ε y,i ). 12 13 The signal extracted from the grid cell system was the number of spikes, k, generated by 14 each neuron during a finite read-out period, T = 0.1s (the approximate length of a theta 15 cycle) -i.e. a population response K = (k 1 , …, k N ). We assume the decoding cannot take the 16 added noise into account in any way, so that given a position x the probability of observing 17 the response K in time T, following (Mathis et al., 2012), is taken to be: 18 where α i,j (x,y) is calculated by cubic interpolation from the tuning curve. From the population 21 response K, we can decode position as the maximum likelihood estimate of (x, y), that is procedure were performed. In each of these five experiments, the square grid across which 2 the environment was sampled to produce tuning curves was set at a different orientation to 3 the environment's Cartesian axes, in order to control for any effect of uneven sampling (the 4 orientations were 0° and 4 orientations randomly selected and then used across all 5 conditions). The results of equivalent pairs of uncertainty levels (e.g. standard deviation 6 respectively in x and y of 0 and 5 cm, and 5 and 0 cm) were combined to total 2 × 5 × 7 75,000 = 150,000 iterations. Using these, accuracy of decoding was assessed via the 8 approximated maximum-likelihood estimate square error, or MMLE, based on the square 9 errors of position decoding: 10 12

Participants 14
FMRI experiment 1. 26 participants took part in the study (  textures was randomised across participants. Participants performed a self-paced object-12 location memory task that involved collecting and replacing six everyday objects to locations 13 that were randomised across participants. Participants collected each object from its 14 associated location once during an initial phase, by running over it. Navigation was not 15 interrupted during the transitions between trials to enable more natural (ecologically valid) 16 continuous navigation. In each subsequent trial they saw an image (cue) of one of the 17 objects in the upper part of the screen and had to move to the object's associated location 18 and press a button (replace phase). After this response, the object appeared in its 19 associated position and participants collected it again (feedback phase). After an average of 20 3 trials (range 2-4 trials), a fixation cross on a gray background was presented for 4 seconds 21 (inter-trial-interval, ITI). Object locations were randomised across participants. Since the task 22 was self-paced, the number of trials varied across participants (range: 94-253; mean: 179). 23 Prior to the fMRI experiment, participants performed a similar object-location task with 24 different objects in a different virtual environment outside the scanner to familiarise 25 themselves with the task demands. 26 27 FMRI experiment 2. Participants freely navigated the same virtual environment as used in 28 fMRI experiment 1, but with only two extra-maze cues on opposite sides of the arena that 29 defined a polarisation axis ( Figure 3A). Participants performed the same object-location 30 memory task described above, except that 4 objects were used instead of 6. Participants 31 performed an average of 117 trials (range: 63-179). Prior to the fMRI experiment, 32 participants performed a similar object-location task with different objects and a different 33 virtual environment outside the scanner to familiarise themselves with the task demands. 34 cardinal directions and the mouse to change horizontal viewing direction. The virtual 1 environment was displayed at 1680x1050 pixel resolution and 60 Hz refresh rate 2 approximately 40cm in front of the participants' eyes. They were teleported between varying 3 start and end locations at one of three possible angles and performed a distance estimation 4 task. The environment was a 'pitch black' space with otherwise only three distinguishable 5 elements. First, it included a background consisting of a white dashed line oriented 6 horizontally and projected at infinity. This background provided minimal visual information to 7 perceive rotational movements as well as motion parallax of a cue viewed from different 8 angles. Second, a cue, consisting of a red circle, was displayed vertically on a fixed location. 9 Third, a red circle indicated the start location of each path with an arrow pointing in the 10 direction of the goal location. The rationale behind using a visually sparse environment and 11 teleportation to the goal location was to prevent the use of other distance cues, such as cue 12 size (e.g. patches of grass or a boundary) or an estimate of 'time-of-flight', respectively. This 13 ensured that the change in size of the cue and the change in angle and motion parallax to 14 the cue from start to the end of a path was the sole means by which the distance estimation 15 task could be performed correctly. Prior to the experiment, participants performed a similar 16 distance estimation task in a different virtual environment to familiarise themselves with the 17 task demands. At the beginning of the behavioural experiment, participants were instructed 18 to approach the cue in order to familiarise themselves with its location and distance. 19 20 The trial structure was as follows: Participants were instructed to navigate to the starting 21 point. Once they reached the starting point, their movement was restricted to rotations and 22 the message 'click right mouse button to teleport ahead' was displayed (orientation phase 23 one). Participants could self-initiate teleportation to the goal location by a mouse-click and 24 orienting towards the pointing direction of the arrow, at which point the view was frozen and 25 teleportation commenced 2 seconds later. After teleportation to the goal location, the start 26 location became invisible (the red circle with arrow disappeared), movement remained 27 restricted and only rotations were possible and the message 'click right mouse button to give 28 response' was displayed (orientation phase two). Participants could self-initiate the response 29 phase. Then, a horizontally oriented window was displayed together with the message 30 'indicate distance (left = minimum, right = maximum)' and participants could move the 31 mouse to slide a bar inside the window to indicate how far they thought they were being 32 teleported. The range of possible responses was 0 virtual units (vu) to 6000 vu. For 33 comparison, the arena diameter used in the fMRI studies was 9500 vu for the inner 34 boundary and the length of the polarisation axis (i.e. the distance between opposing, extra-35 maze cues) was 12064 vu. The range of teleportation distances was 500 vu to 5500 vu feedback in the form of smiley faces was given for 2 seconds. The color of a smiley for a 1 response error < 2% of the correct distance was green, light green for an error < 4 %, yellow 2 for an error < 8 %, orange for an error < 16% and red otherwise. During this feedback 3 phase, participants could still move the response bar to see other response-to-feedback 4 mappings (i.e. the smiley associated with a given horizontal pixel location). Once the 5 feedback disappeared, participants were able to freely navigate again. At the beginning of 6 about 50% of trials (determined pseudo-randomly), participants were placed to a point in 7 front of the start location to speed up the experimental procedure (i.e. to reduce navigation 8 time from a goal location to the start location of the subsequent trial) and thereby increase 9 the number of trials. In addition, the orientation phase 1 and 2 were restricted to 6 seconds 10 and the response phase to 4 seconds indicated through the display of a timer. If the time 11 limit was reached, 'Time is up! This trial is invalid' was displayed on a red background and 12 no response was recorded. Teleportation distances and teleportation directions were 13 pseudo-randomly determined on each trial. Teleportation directions were either 0° 14 (approaching the cue on a straight line), -30° or +30°. The location of the cue was at (x = 0 15 vu , y = 8500 vu) and following the approach of the simulations, all paths were centered on 16 the origin of the coordinate system. However, this would provide a relative advantage to the 17 parallel condition. The size of the cue directly reflects its distance to the observer, which 18 becomes particularly apparent at close proximity. In the -30° and the +30° conditions, the 19 goal location is always further away from the cue compared to the 0° condition at equal 20 teleportation distances. Furthermore, the independent measure (teleportation distance) is 21 linearly associated with goal-to-cue distance only in the 0° condition. To avoid bias due to 22 unequal goal-to-cue distance, we equalized this measure by subtracting the difference 23 across conditions (at equal teleportation distances). In effect, this shifted the teleportation 24 paths in the 0° condition backwards by a given amount ( Figure 2B). Due to a limited field-of-25 view of 85°, testing of large path offsets of e.g. 90° was not feasible. The task duration was 26 limited to 30 minutes in which participants performed an average of 129 self-paced trials 27 (range: 52-238). Prior to the main task, participants performed a training version of the task 28 in a richer virtual environment with a comparable trial structure where the length of the path 29 was not traversed by teleportation but rather through guided movement. 30 31 Eye tracking experiment: During a magnetoencephalography study (MEG; data are subject 32 of an independent report), participants performed the same task in the same virtual 33 environment as in fMRI experiment 1 (i.e. the environment with 12 cues). However, they had times between cues, we then binned vertices into 30 degree bins centred on the cues and 35 compared average viewing time using a repeated-measures ANOVA. However, our specific 36 hypothesis was that especially the cues forming the polarisation axis should be most informative for the task. To test whether these cues were the ones most viewed, we 1 averaged viewing times for the configural landmarks that comprised the polarisation axis (i.e. 2 two pairs of cues of opposite orientation) and compared it to the average of the four cues 3 orthogonal to the polarisation axis using a one-tailed paired t-test.

Analysis of fMRI time series 23
Following pre-processing, fMRI time series were modeled with general linear models 24 (GLMs). The different trial phases of the object-location memory task were modeled with two 25 regressors. One regressor was used for the retrieval phase (replacement of an object) and 26 one for the encoding phase (following the location response, when the object was shown at 27 the correct location and could be collected), both of which were associated with a parametric 28 modulator for spatial memory performance to discount large-error trials. Inter-trial-intervals 29 (presentation of a fixation cross on a gray background) were not explicitly modeled and 30 served as an implicit baseline. The presentation of the object cues and the feedback was 31 modeled with two additional regressors. Furthermore, all GLMs included nuisance 32 regressors, comprising at least 6 movement parameters, 2 regressors for signal fluctuations 33 across white and gray matter voxels and 1 regressor to model time points with frame-wise 34 displacements (Power, Barnes, Snyder, Schlaggar, & Petersen, 2012) larger than 0.5 mm. 35 In addition, physiological signals have been recorded for a sub-set of participants (see 36 section below for details) which was used to correct for cardiac and respiratory artefacts by means of 14 additional regressors. The main regressors of interest modeled virtual 1 movement periods with two associated parametric modulators (see 'Analysis of 2 hexadirectional activity' below for details). Coefficients for each regressor were estimated for 3 each participant using maximum likelihood estimates to account for serial correlations. All 4 parametric modulators were normalized to have zero mean and thus be orthogonal to the 5 un-modulated regressor. Prior to the second-level random effects analysis, the linear 6 contrast images of the regression coefficients underwent nonlinear normalization to the 7 group-specific template brain using ANTS. 8 9

Analysis of hexadirectional activity 10
The orientation of 6-fold rotational symmetry of entorhinal activity (referred to as 11 'hexadirectional activity' and consistent with grid-cell representations in humans [10]) was 12 estimated in participant's right EC using a quadrature-filter approach on fMRI data during 13 fast movements in all trial phases [4,5]. Participant's virtual-navigation fMRI data entered a 14 general linear model (GLM) with two parametric modulators of a movement regressor. 15 These modelled the sine and cosine of running direction θ(t) in periods of 60° (i.e. sin with six evenly spaced peaks as a function of running direction will produce parameter 21 estimates β 1 and β 2 for the two regressors with large amplitude sqrt(β 1 ² + β 2 ²). To this end, 22 running direction θ(t) was arbitrarily aligned to 0° of the coordinate system underlying the 23 virtual reality engine. Participants were not aware of the environmental coordinate system. 24 The relationship between the underlying coordinate system and the polarisation axes 25 (defined by extra-maze cues) differed between fMRI experiment 1 and fMRI experiment 2. 26 The orientation of the polarisation axis (i.e. 0°) had an angular offset from the underlying 27 coordinate system of 15° in fMRI experiment 1 and 90° in fMRI experiment 2. This made it 28 unlikely that an anchoring of grid-cell representations to polarisation axes were due to other 29 factors, such as viewing direction during the start of the experiment, which was -15° in fMRI 30 experiment 1 and -90° in fMRI experiment 2, relative to the visible polarisation axes. Next, 31 the parameter estimates of the two parametric modulators (β 1 and β 2 ) were extracted from 32 the right EC ROI and used to calculate preferred orientation in 60° space (varying between 33 0° and 59°). A participant's mean orientation of hexadirectional activity was defined as φ 60° = 34 arctan(β 1 /β 2 ), where β 1 is the averaged beta value for sin[6*θ(t)] and β 2 is the averaged beta 35 value for cos[6*θ(t)] across voxels of the right EC. Dividing by six transformed the mean orientation φ 60° back into standard circular space of 360° for one of the three putative grid 1 axes (the remaining two being 60° and 120° relative to the first). orientations and their regional specificity in a split-half procedure (Experiment 1). This was 8 done only for experiment 1, because data acquisition was roughly twice as long and SNR 9 likely higher due to high-field scanning compared to experiment 2, which warranted a 10 sacrifice in sensitivity for the main research question. 11 The procedure involved testing activation differences in the second half of the data with six-12 fold rotational symmetry that was aligned with the (potentially environmentally determined) 13 hexadirectional activity estimated from the first half of the data. More specifically, the second 14 GLM contained regressors for both 'aligned' and 'misaligned' runs relative to the estimated 15 hexadirectional activity (respectively, this means running directions were either less than ± 16 15° or more than ± 15° oriented relative to the nearest axis of hexadirectional activity). As for 17 the estimation procedure, regressors modeling six-fold rotational symmetry captured 18 participant's 50% fastest movement time points. Participants' contrast values (aligned > 19 misaligned) then entered a second level random-effects analysis to test for hexadirectional 20 activity in the entire brain volume acquired. Significant activation in the right EC would 21 indicate temporal stability and regional specificity of putative grid orientation. 22 Having evaluated temporal stability and regional specificity of the quadrature-filter approach 23 for investigation of grid-cell-like representations in fMRI experiment 1, we decided to 24 maximise statistical power addressing the main research question of environmental effects 25 on hexadirectional activity in fMRI experiment 2. 26 27

Analysis of environmental anchoring of hexadirectional activity 28
We tested environmental anchoring of the hexadirectional activity relative to the polarisation 29 axes by using a V test for circular homogeneity (Berens, 2009). The V test for circular 30 homogeneity is similar to the Rayleigh test for circular homogeneity and can be used if an a-31 priori hypothesis of a certain mean direction in a sample of angles is being tested. Due to 32 our hypothesis of a relationship between the orientation of the grid-system and anisotropy in 33 spatial information derived from angular changes to polarising cues, we tested participant's mean direction aligned 30° off the polarisation axis. 36  Figure S1. The most accurate triangulation was 4 achieved on paths orthogonal to the polarisation axis. 10*10 3 repetitions for each triangle, 5 90° ±15° versus 0° ± 15°, two-sided Wilcoxon signed-rank test: Z=1026.42, p<0.001. The 6 gray shaded area in the bottom panels indicate the range of paths that were tested. The box 7 edges denote the 25th and 75th percentiles and central red mark the median. The whiskers 8 extend maximally to q 3 + 1.5 * (q 3 -q 1 ) and minimally to q 1 -1.5 * (q 3 -q 1 ), where q 1 and q 3 9 are the 25th and 75th percentiles, respectively. A red + denotes points outside this range, 10 with the exception of the upper 10% of values that were omitted for display purposes. 11 Statistical testing included all data. The performance of grid cell systems was assessed while independently varying the 5 degrees of spatial uncertainty in two orthogonal axes. When uncertainty is equal in both 6 axes performance does not depend on the orientation of the grid pattern. As uncertainty 7 becomes more anisotropic, self-localisation is more accurate in grid cell systems in which 8 the grid pattern axes are aligned away from the axis of greatest spatial uncertainty.