Spatial uncertainty and environmental geometry in navigation

Variations in the geometry of the environment, such as the shape and size of an enclosure, have profound effects on navigational behavior and its neural underpinning. Here, we show that these effects arise as a consequence of a single, unifying principle: to navigate efficiently, the brain must maintain and update the uncertainty about one’s location. We developed an image-computable Bayesian ideal observer model of navigation, continually combining noisy visual and self-motion inputs, and a neural encoding model optimized to represent the location uncertainty computed by the ideal observer. Through mathematical analysis and numerical simulations, we show that the ideal observer accounts for a diverse range of sometimes paradoxical distortions of human homing behavior in anisotropic and deformed environments, including ‘boundary tethering’, and its neural encoding accounts for distortions of rodent grid cell responses under identical environmental manipulations. Our results demonstrate that spatial uncertainty plays a key role in navigation.


An array of Poissonian neurons
Now we derive the Fisher information I v ( ) about given the firing rates r of an array of N neurons with independent Poisson spikes, which is defined as: While the results of this step has been known 32 , we describe them here for completeness. Here, our aim is to express I v ( ) as a function of each neuron i's tuning curve f i ( ), which is defined as the mean firing rate given the true stimulus , i.e.: First consider p(r | ) in Eq. S13. Since we assume that each neuron's spikes follow independent Poisson distribution, the likelihood of observing a certain vector of firing rates r is simply: where T is the duration during which the spikes are observed. Now we can evaluate the partial derivative in Eq. S13 using Eq. S15: Finally, substitute Eq. S19 back into Eq. S13 and simplify using Eq. S14: Therefore, as aimed, we expressed I v ( ) as a function of f i ( ).

A retinal image
We are finally ready to derive the Fisher information I v ( ) about the 3D distance from neurons with a uniform 2D retinotopic array of tuning curves. Assume a Gaussian tuning curve . CC-BY 4.0 International license perpetuity. It is made available under a preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in The copyright holder for this this version posted February 1, 2023. ; https://doi.org/10.1101/2023.01.30.526278 doi: bioRxiv preprint Substitute Eq. S23 and Eq. S25 into Eq. S22: Compare this with Ref. 32, Eqs. 3.46-48 to approximate the sum with an integral to obtain: where ρ is the number of neurons in a unit range of := / , and D is the number of dimensions of the space where the neurons are arranged, which is 2 for us. This expression is used for the lines in Fig. 2a, and its simplified form is presented as Eq. 1. Note that here we used instead of d to avoid confusion during integration.
Intriguingly, as explained in Ref. 32, the Fisher information is independent of the width of the tuning curve σ, because the number of neurons responding to the stimulus scales with ρσ D . The difference from Ref. 32 is the factor of 2 / 4 , which arises because our quantity of interest is inversely related to the center of the tuning curve / (rather than linearly related, which would have given the center of ). Note that the resulting expression for I v ( ) has the same unit as I ( ), and is proportional to it without the σ term, scaled with the number of spikes, ρr max T .

Bias in distance estimation -analytic intuition
Our numerical simulation replicated different biases in distance estimation between environments and between sides of the trapezoid (Fig. 2d, bottom). Here, we provide analytic intuition for the results with a simplified version of the ideal observer model. We derive a relation that explains how strongly the bias in distance estimation along a given axis (x or y) depends on the (half of the) sizes of the environment along that axis ('depth', L) and the axis orthogonal to it ('eccentricity', ). Then we use this relation to show how the relative sizes of the environments and its sides ( Fig. S1) translate into the difference in biases.
First, we expressˆ , the estimated location, obtained with Bayesian inference after Laplace approximation of the prior and the visual likelihood, as a function of L and . Here, without loss of generality, we adopt a convention whereˆ = 0 means that the estimated location matches the mean prior location: Here, L − is the distance to the wall in front, 2 (L− ) 4 is the precision of the likelihood (following Eq. S28), λ L 2 is the precision of the prior (which is lower in a larger environment), where λ is a free parameter that indicates the relative informativeness of the prior compared to the likelihood.
Then, we express how much g depends on L vs. in preparation for a later comparison on how much the estimated locationˆ depends on them: . CC-BY 4.0 International license perpetuity. It is made available under a preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in The copyright holder for this this version posted February 1, 2023. ; In other words, g changes more with L than with . Now we express the estimated distanced between two target locations 1 and 2 as a function of f , and in turn, of g: Then we compare how the change in L vs. affectsd using the relations derived above: In words, the estimated distance between two target locations 1 and 2 is shorter when the environment is deeper (when the wall is farther and visual likelihood is less precise) due to stronger regression to mean, and longer when the environment is wider due to weaker regression to mean. From Eq. S34, the absolute values of the above two quantities can be compared as: Therefore, the estimated distance relies more on the depth of the environment than on its width.
Finally, we use Eq. S41 to compare the estimated distances in square vs. trapezoid, and in the broad vs. narrow sides of the trapezoid, which we denote asŜ (square),T (trapezoid),B (broad side of the trapezoid), andN (narrow side of the trapezoid). We further denote the size of the environments and the halves of the trapezoid as X · and Y · as shown in Fig. S1.
Using these relations, we begin by comparing the estimated distance along the x axis between the square and trapezoid environments. Here, X S and X T are the depths. (To be exact, the prior mean x location of the trapezoid is off center, but we ignore it for simplicity and use X T for L, since the following holds as long as X S X T .) Since X S X T , we can infer thatŜ T (larger depth results in shorter estimated distance; Eq. S39). To disambiguate this comparison with others, we denote it asŜ X L T X L , which means we used X S and X T as the depth (L) of the environment.
Likewise, we can compare the widths ( ) of the environments as Y S < Y T , from which we infer that S Y >T Y (larger width results in longer estimated distance; Eq. S40) using the same convention as above.
We can also compare the estimated distance along the y axis. Then Y S and Y T would be the depths, and X S and X T the widths. We can summarize the comparisons along the x and y axes as: Thus, the estimated distance in the square should be longer along the x axis, while it should be shorter along the y axis. To resolve this conflict, we compare the relative importance of the two axes. According to Eq. S41, the influence of the depth should dominate the influence of the width when L = . This allows us to compare, e.g., |Ŝ X L −T X L | and |Ŝ X −T X |, where the same set of sizes (X S and X T ) were used. This, combined with the relative size difference of the two environments along the two axes means that: S4 . CC-BY 4.0 International license perpetuity. It is made available under a preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in The copyright holder for this this version posted February 1, 2023. Whole trapezoid. c. Broad and narrow side of the trapezoid, split in half. Because the subject does not know whether they are in the broad or narrow half, their prior along the x axis covers the whole environment. Hence, we define X B := X N := X T so that any of them can substitute L from Eq. S29 to Eq. S41.
which agrees with the experimental results (Fig. 2d bottom, green vs. orange).
Likewise, we compare the broad vs. narrow sides of the trapezoid. Note that the two sides share the same size along the x axis (which is X T ) for the purpose of determining the precision of the prior and likelihood: broad vs. narrow side of the trapezoid Again, we compare them with Eq. S41: which, again, agrees with the experimental results ( Fig. 2d bottom, light vs. dark orange). Therefore, we can see that the difference in the estimated distance (Eqs. S43 and S45) can be explained by the effect of the size of the environments on the precision of the prior and likelihood in Bayesian inference.

Neural tethering -analytic intuition
Our goal is to show that, if the ideal observer's posterior is tethered to the last wall approached, then a neural posterior, if it is encoded by tuning curves tethered to the last wall approached, also matches the ideal observer's posterior. Since tuning curves define mean firing rates, we first consider the mean posterior P, defined as the ideal observer posterior averaged over time: For simplicity, here we only consider the 1D location ∈ L = [0, L] along the changed axis, and two opposite head directions along that axis, θ ∈ Ω = {0, π}, where θ = 0 means the observer faces toward L. We also assume that the momentary posterior of the ideal observer matches its average posterior in either environment E ∈ {Ẽ, E * }, which allows us to parameterize the ideal observer posterior P b with location, head direction, and environment, as follows: Simplifying the approximate patterns seen in behavioral data, assume that the ideal observer's belief P b is tethered to the last wall in the new environment E * , and that the last wall is always behind the observer (i.e., when θ = 0, the last wall is at 0, and when θ = π, the last wall is at L new ). For θ * = 0, this is simply: We also assume an exact match between the ideal observer and neural posteriors inẼ: Note that we are considering the limit of a large neural population size, which gives r t = f ( * t , θ * t , E) ∀t, and the limit of good coverage of the environment by the observer's trajectory, which gives {( * t , θ * t )} = L × Θ. Here, for simplicity, we assume L new < L familiar , i.e., that the observer is in a new environment E * compressed compared to the familiar environmentẼ, such that tethered beliefs can cover the whole length of E * . Then, having tethered tuning curve, i.e., is, by transitivity across Eqs. S48, S49 and S51, sufficient to give Also, in the limits of good coverage that we're assuming, it is also natural to assume mirror symmetry iñ E, i.e., and the same for the neural posterior and tuning curves. Then, by mirror symmetry, results analogous to Eq. S52 also hold when θ * = π. That is, tethering of the ideal observer's belief...
S6 . CC-BY 4.0 International license perpetuity. It is made available under a preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in The copyright holder for this this version posted February 1, 2023. ; https://doi.org/10. 1101/2023 ... are, by transitivity across Eqs. S49, S54 and S56, sufficient for the neural posterior to match the ideal observer's posterior given θ * = π: Therefore, tuning curves tethered to the last wall in E * is sufficient for the neural likelihood to be tethered the same way, and when the likelihood is sharp enough, for the neural posterior to match the ideal observer posterior tethered to the last wall approached in either direction, as in Eqs. S52 and S57.
7 . CC-BY 4.0 International license perpetuity. It is made available under a preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in The copyright holder for this this version posted February 1, 2023. ; https://doi.org/10. 1101/2023