## Abstract

The grid cells discovered in the rodent medial entorhinal cortex have been proposed to provide a metric for Euclidean space, possibly even hardwired in the embryo. Yet, one class of models describing the formation of grid unit selectivity is entirely based on developmental self-organization, and as such it predicts that the metric it expresses should reflect the environment to which the animal has adapted. We show that, according to self-organizing models, if raised in a non-Euclidean hyperbolic cage rats should be able to form hyperbolic grids. For a given range of grid spacing relative to the radius of negative curvature of the hyperbolic surface, such grids are predicted to appear as multi-peaked firing maps, in which each peak has seven neighbours instead of the Euclidean six, a prediction that can be tested in experiments. We thus demonstrate that a useful universal neuronal metric, in the sense of a multi-scale ruler and compass that remain unaltered when changing environments, can be extended to other than the standard Euclidean plane.

## 1. Introduction

Euclidean geometry was long suspected not to be the sole possible description of physical space (e.g. Omar Khayyam in his 1077 book *Explanations of the Difficulties in the Postulates in Euclid's Elements* [1,2]). It was only around 1830, however, that rigorous non-Euclidean alternatives were formulated independently by Nikolai Lobachevski (first communicated on 23 February 1826, then printed in a Russian journal in 1829) and by János Bolyai (between 1820 and 1823, but only published in the appendix to a 1831 textbook by his father) [3]. The great Friedrich Gauss wrote that he had been thinking along similar lines, but recognized the genius of his younger colleague (e.g. in his letter to Gerling, in 1832) [4]. The involvement of such profound thinkers and the centuries that intervened indicate how arduous was the development of non-Euclidean formulations, even for brilliant individuals. Perhaps it was made difficult by social conventions and conformist patterns of thought—as expressed for example by followers of Immanuel Kant's view of an *a priori* representation, independent of the external world and inherent to our reason [5].

An unusual approach to this question is provided by the discovery, in the rodent brain, of grid cells [6,7]. These neurons, with their activity concentrated at the nodes of a surprisingly regular triangular grid, which is different from neuron to neuron, appear similar to sheets of graph paper, lining the environment in which the animal moves [8]. Indeed, such cells have been proposed to comprise a Euclidean metric of physical space [9], providing at the neuronal population level a single common gauge to measure the environment [10,11]. But, is it necessarily Euclidean? If non-Euclidean grid cells were discovered in rodents, still sufficiently regular to be characterized as providing a metric of space, it would indicate that, in contrast to Kant's view, spatial experience contributes to shape cognitive representations of space.

Grid cell activity has been mostly studied in experiments in which rodents forage in flat, horizontal, open two-dimensional environments [7,12,13]. Grid units have also been observed (also in flat arenas) in mice [14] and crawling bats [15]. Some experiments have used apparatuses that probe the vertical dimension [16], but the resulting observations do not seem to point to a simple abstraction of general validity (see discussion in [17]). The other major type of spatially selective units, the place cells, has been observed also in flying bats, and they appear to span three-dimensional space fairly isotropically [18]. Grid cells may yet be observed in flying bats—there have been preliminary observations of ‘blobby’, i.e. multi-peaked, cells [19], and, if their periodicity is confirmed, this would invoke models of grid formation that can function in three dimensions, not just in two dimensions [20]. In order to address the uniqueness and necessity of a Euclidean metric representation, however, one may focus on two-dimensional environments, and consider surfaces that can be described by a regular, position-invariant non-Euclidean metric. From the activity observed in grid units, one should be able to infer whether the rat brain can only express an orderly representation of a Euclidean space, or it can also adapt to an environment defined by a non-Euclidean metric.

Simple examples of position-invariant non-Euclidean two-dimensional metrics are provided by surfaces embedded in physical three-dimensional space. Their geometry is position-invariant if the curvature is constant across the surface, and they can be of two types: those with constant positive Gaussian curvature, i.e. spheres or portions of spheres, and those with constant negative curvature, the so-called pseudo-spheres (PSs) introduced by Beltrami [21] (figure 1). The former is a model of elliptic geometry, the latter of hyperbolic geometry. In [22], we have analysed the prediction of a particular self-organizing model of grid cell development [23], and concluded that rats exploring a spherical cage of appropriate radius should develop grids with coordination number 5 or lower, i.e. each of their peaks should be surrounded by 5 (or fewer) nearest neighbours instead of the Euclidean 6. Experiments are underway to examine grid cells in rats raised in a cage that closely approximates a sphere [24].

Still, spherical geometry departs from Euclidean geometry in other major ways than just being non-flat: it has no points at infinity (and so no indefinitely long geodesic trajectories, whether parallel or not); and a complete sphere has no boundary, eliminating the need and the opportunity for discontinuities in the representation at the boundary (although one can cut an artificial boundary, or use a portion of a sphere). So, should the grid cells, which emerge in rats raised in or adapted to a sphere, reveal the striking soccer-ball pattern predicted by our model, the effect of a non-Euclidean metric might be argued to be confounded with that of the missing points at infinity, for example. Therefore, we aim here to consider the emergence of grid units in rats raised in a hyperbolic cage, as a more stringent potential test of the ability of rodents to conceive non-Euclidean representations of space.

A similar asymmetry between elliptic and hyperbolic geometry was perceived by Hieronymus Saccheri, who in his *Euclides Vindicatus* (1733) tried to prove Euclidean geometry by refuting its two alternatives [25]; but while he had an easy task dismissing elliptic geometry, because it would also violate Euclid's second postulate by not having infinitely long straight lines, he had difficulties refuting hyperbolic geometry. He wrote of the *‘*difference between the foregoing refutations of the two hypotheses. For in regard to the hypothesis of the obtuse angle [elliptic] the thing is clearer than midday light … But on the contrary, I do not attain to proving the falsity of the other hypothesis, that of the acute angle [hyperbolic] … I do not appear to demonstrate from the viscera of the very hypothesis, as must be done for a perfect refutation’. It makes sense to ask whether the brain of a rat exploring a hyperbolic environment can demonstrate what the ‘viscera of the very hypothesis’ failed to refute.

## 2. Models of hyperbolic surfaces

It is not possible to represent, in physical three-dimensional space, the full hyperbolic *H*^{2} space of constant negative Gaussian curvature −1/*R*^{2}. At any point on such a mathematically defined surface, one can identify two orthogonal axes, along which the surface would appear to curve on opposite sides of the locally tangent Euclidean plane, with *R*^{2} as the product of the two radii of curvature. Then, one can resort to models, giving up one or another of the features of a true representation of the full *H*^{2}.

The PS or tractricoid is a non-distorted, three-dimensional representation of a finite portion of *H*^{2}, which is useful in that both distances (measured along geodesics, the minimal length paths between any two points on the surface) and angles are preserved. As a result, no speed transformation is needed for an animal that moves on a PS to experience hyperbolic metricity, and this makes the PS, in principle, suitable as the design for a hyperbolic rat cage. The main limitation is that while the PS has two points at infinite distance (the cusps) it has only finite area 4*πR*^{2}. In fact, it comprises two halves joined at a base (a circumference of radius *R* in three-dimensional space) that cannot be crossed with continuous movements, so, for all practical purposes, we always consider here a half PS, with area 2*πR*^{2} and a single cusp, that we take to point in the vertical direction *z* of physical three-dimensional space. The position of any point on the half PS can be given by its three-dimensional distance *r* from the *z*-axis, and by its angle *θ* from an arbitrarily chosen reference direction. The height *z* of the point is related to *r* as and the infinitesimal curve element has length d*s*, best expressed in terms of the variable *v* = *R*/*r* as d*s*^{2} = [d*θ*^{2} + d*v*^{2}]/*v*^{2}. One can view the half PS from above, projected on a circle of radius *R* on the plane (because *r* < *R*), but at the price of distorting the local metric in the projection. It is useful then to consider other two-dimensional models which, while also distorting the local metric and thus impairing appreciation of distances and angles, at least can represent an infinitely extended *H*^{2}.

The Poincaré half-plane model amounts simply to unwrapping the PS around the *z*-axis, stretching its surface near the cusp and plotting *θ* (often denoted as *u*) and *v* as Cartesian variables, which, however, can now extend −∞ < *θ* < ∞ and 0 < *v* < ∞. The local metric is defined as d*s*^{2} = (d*u*^{2} + d*v*^{2})/*v*^{2} and its geodesics are either vertical lines *u* = const or circular arcs centred on the *v* = 0 line (figure 1*b*). The PS corresponds to the ranges −*π* < *θ* < *π* and 1 < *v* < ∞ on the half-plane. One has to remember that the height *z* of a point on the PS grows with its corresponding height in the half-plane, but via the nonlinear transform

The Poincaré disc is another distorted two-dimensional representation of half the hyperbolic plane of constant negative curvature *H*^{2}, which is useful in particular to display its possible regular triangulations, in which a node is neighbour to *q* = 7, 8, …, *∞* other nodes (in Euclidean space the only regular triangular tiling has *q* = 6, as for grid cells, while on a spherical surface *q* = 5, 4, 3, 2 or 1 [22]). The disc of coordinates (*x*_{P}, *y*_{P}), with has a local metric defined as and its geodesics are diameters of the disc, or circular arcs that meet its boundary orthogonally (figure 1*c*).

The PS, given by the revolution of the so-called tractrix around the *z*-axis, can also be defined as the surface spanned by the cylindrical coordinates (*r*, *θ*, *z*) where, with reference to the Poincaré half-plane, *θ* = *u*, whereas *r* and *z* are parametrized as and with *t* = cosh^{−1}(*v*) and *v* ≥ 1. The half-plane and the disc are isomorphic and can be related by a Möbius transformation, for example by *x*_{P} = (*u*^{2} + *v*^{2} − 1)/[*u*^{2} + (*v* + 1)^{2}] and *y*_{P} =−2*u*/[*u*^{2} + (*v* + 1)^{2}], which maps the origin (0, 0) of the half-plane on the boundary (−1, 0) of the disc, (0, 1) onto the origin (0, 0) of the disc and the point at infinity (0, ∞) on the boundary (1, 0) of the disc. We shall use this particular transformation in the figures. Although its appearance is also that of a circle, like a PS seen from above, the mapping is much more complicated, almost intuitively inverted, with the cusp of the PS mapped on one arbitrary point on the outer circumference of the disc, and the circumference at the base of the PS curving through the centre of the disc (figure 1*c*).

## 3. Results

### 3.1. Pseudo-spheres can be used to test the emergence of non-Euclidean neural representations

The idea of raising rats in a cage with a hyperbolic shape, and checking what kind of grid units, if any, they develop in their medial entorhinal cortex (mEC), runs into two difficulties, if the cage is realized as a simple (half) PS (figure 1*a*). The first difficulty stems from the circular symmetry of the PS around its *z*-axis, and the second from its limited area.

The circular symmetry problem can be understood by mapping the PS into the Poincaré half-plane (figure 1*b*) and into the Poincaré disc (figure 1*c*). These are two flat representations of an infinitely extended two-dimensional hyperbolic space, in which a constant negative Gaussian curvature is expressed instead by assigning a local metric which is a function of position (see §2). The revolution −*π* ≤ *θ* ≤ *π* generating the PS makes its geodesics *θ* =−*π* and *θ* = *π* coincide (in the physical three-dimensional space), but the corresponding geodesics do not coincide on the half-plane or on the disc. As a result, any regular infinite tiling (figure 1*d*), which has no reason to be periodic, e.g. on the *u* variable of the half-plane, once cut, transformed and pasted onto the PS will be discontinuous at *θ* =±*π*. Vice versa, any continuous grid map developing in a rat freely roaming around the PS will be incompatible with a regular tiling. The simple solution to this difficulty is to insert a partition at *θ* =±*π*, making it impossible to walk around the PS. This solution can be applied both to an experimental setting and to computer simulations.

The half PS has a finite area 2*πR*^{2} and it can be mapped only onto a limited portion of the half-plane or of the disc (figure 1*b*,*c*). Because its area is limited, it cannot support many tiles. For a regular triangular tiling with *q* triangular tiles meeting at each node, i.e. with angles 2*π*/*q*, each tile has area *π*(1 − 6/*q*)*R*^{2}, i.e. a fraction (1 − 6/*q*)/2 of the total available. The dual polygonal tile centred at each node includes one-third of the area of *q* triangles; hence, it takes up an area *N*_{q} = *q π(1 − 6/q)R^{2}/3. Therefore, the half PS can include on its finite area the equivalent of 2πR*

^{2}/

*N*

_{q}= 6/[

*q*(1 − 6/

*q*)] nodes, which gives ∞ for

*q*= 6 (i.e. the hexagonal dual tiles would be infinitely small relative to the curvature, in practice, therefore, populating a Euclidean plane); 6 for

*q*= 7 (heptagonal grids); 3 for

*q*= 8 (octagonal grids); 2 for

*q*= 9; 1 for

*q*= 12, etc. Hence, beyond

*q*= 7, the possibility to see a symmetric grid tiling on a half PS vanishes rapidly, because there are too few fields that each unit could fit on the finite surface. The spacing of a symmetric grid can be calculated to be (see §5.4) 3.1where

*γ*= cos (2

*π*/

*q*), which gives infinitesimal

*l/R*for

*q*= 6, as it should; for

*q*= 7; for

*q*= 8; for

*q*= 9, etc.

In simulations, one can deal with the limited area of the PS by adding lapels or folds on each side of the corresponding portion of the Poincaré half-plane. We limit ourselves to doubling the area, thus making space for 12 fields for perfectly heptagonal grids, 6 for octagonal ones and so on. With parameters that yield the appropriate grid spacing, approximately heptagonal grids are easily self-organized (figure 2).

### 3.2. The symmetry of the emerging grid units reflects Gaussian curvature

In the self-organizing model we use, the mean grid spacing is determined by the adaptation time scale, which once multiplied by the average exploration speed becomes a length scale. The relation between the mean grid spacing and the radius of curvature selects the type of tiling that emerges. An exact heptagonal or octagonal tiling would require the spacing-to-radius ratios reported above. Interestingly, when the ratio takes intermediate values, one observes in simulations the emergence of grids with intermediate mean angle between triplets of spikes in neighbouring fields (figure 3; see §5.2 for the procedure used to measure such angles).

### 3.3. Population coherence induced by lateral interactions

So far, each grid unit has developed independently. Shared single unit properties define a common grid spacing, but grid orientation is randomly distributed. To induce a common orientation, we now add a collateral network where the connection strength between any two units is determined by the virtual position as in the procedure described by Si *et al*. [26]. This interacting network produces conjunctive head direction × grid units, mimicking the cells found in intermediate and deep layers of mEC [27,28].

To assess the effect of the collaterals on our hyperbolic grids, we analyse the firing activity of each unit in the half-plane (figure 4*a*). Because there translations and rotations are coupled, we cannot simply shift and collapse the activity of all units in a common origin, and evaluate the resulting common alignment. Instead, we focus on the activity of multiple single units in different portions of the plane, e.g. in the yellow box in figure 4*a*. For each spatial bin on the half-plane, we average across the population the weighted distribution of angles between pairs of spikes, one belonging to that bin and the other to a surrounding annular region (corresponding to the neighbouring fields; see §5.2). The weight is determined by the number of spikes of each unit in the bin itself, so clear peaks emerge in the angular distribution if all units having a field in the bin share the location of neighbouring fields. For example, in the bin indicated by the yellow box, the unit shown in figure 4*a* has the distribution of angles represented in figure 4*b* as a black line. The population distribution, represented by the grey line in figure 4*b*, preserves the multi-peaked structure of individual units, indicating population coherence. In contrast, the distribution of angles for pseudo-spikes randomly allocated to visited locations (red dashed line) is less peaked, as is the one for spikes shuffled across the population (blue dashed line). The agreement between these two distributions, which holds for any bin, indicates in fact that different units sample the PS evenly, expressing a distributed representation. To quantitatively assess the influence of the collaterals, we take the integral of the square difference between the population distribution of angles and either of these two control distributions. By summing this square difference over all bins of equal hyperbolic area on the PS (except those at the boundary), we get a summary coherence measure. Whatever the PS curvature, we observe an increase in the coherence measures when adding the collaterals (moderate with the random control, fourfold with the shuffled control), showing that they contribute significantly to align the population response (table 1).

### 3.4. Planar grids can re-adapt coherently to hyperbolic spaces

To bridge the gap between model predictions and experimental conditions suitable to observe heptagonal tessellations, we now consider what happens if rats are raised in planar environments and then experience a hyperbolic one. Given single-unit properties that yield the proper grid spacing on the PS and assuming continued plasticity of the feed-forward connections, simulations indicate that individual units rapidly develop a local structure compatible with a heptagonal grid (not shown). The long-range structure as well as the common alignment of the population require more adaptation, but the time scale is not longer than when the model adapts to a second planar environment [26]. Interestingly, as with the adaptation to a second planar environment (which reduces to a translation and rotation of the stack of grid maps; cf. [10]), also, in this more complex case, the original phase relations between any two units are kept in the second environment, though this is now a hyperbolic PS. Therefore, the collaterals, while weak enough to not interfere with heptagonal grid development, can be sufficient to maintain or re-learn the phase relationships in the new environment.

To show this, we consider the cross-correlation of the activity developed in the planar environment between all pairs of units in the population (figure 5*a*,*a*1–*a*3). The peak closest to the centre in each cross-correlogram defines the phase between the two units and, as shown in figure 5*a*, it is broadly distributed but with a tendency to form clusters. Based on this distribution, we can classify each pair according to the region where their relative phase is located; see the white dashed lines delimiting regions *a*1–*a*3 in figure 5*a*. The correlation for each of these pairs can then be measured after adaptation to the PS, based on their activity in the half-plane as in the previous analysis, and contrasted with their planar correlation. As observed in figure 5*b*, the two correlation values are related, and respect the classification in figure 5*a* (different sets *a*1–*a*3 are indicated by colours). Representative examples of out-of-phase and in-phase relationships are shown in *b*1 and *b*2, in figure 5*b*, respectively.

This ‘network rigidity’ effect of the collaterals does not depend on their precise structure. Collateral weight matrices compatible with a planar metric [26,28] and with a hyperbolic one (see §5.1) produce the same effect. This indicates that, in our simulations, the metrics expressed by the firing maps of the grid cells reflect primarily recent spatial exploration, which prevails over the structure of the collaterals, even though the latter produce the rigidity effect. In the simulations, we chose to keep the collateral weights relatively weak, and fixed during the complete simulation, in line with the hypothesis that they change on a slow time scale; see [28]. The collaterals, however, are sufficient to align grid units within an environment [26] and, as shown here, to maintain phase relationships across different units. Whether this is the regime relevant to the real mEC network remains to be determined.

### 3.5. A rodent-friendly hyperbolic box

The previous analyses indicate the possibility of observing hyperbolic properties in the activity of grid cells, if the self-organization model is valid. However, to double its area and so reliably detect a heptagonal tessellation, we resorted to folding the PS around itself. Such a procedure makes no experimental sense. A second approach is to increase the available area by a similar amount adding a surface that, *on average*, has a similar hyperbolic curvature, but not constant in its negative value. This can be realized by a sort of wavy continuation, a skirt (figure 6*a*). As seen in figure 6*b*–*e*, a network of units with suitable properties again develops, through exploration of this extended surface, a grid representation with the characteristic coordination number 7 and, at least over the central pseudo-spherical portion, equivalent regularity as for the folded PS.

## 4. Discussion

We have shown that, in a self-organizing model, grid units adapt effortlessly to hyperbolic geometry, and given appropriate values of Gaussian curvature can express maps with coordination number 7. If the model captures the essential character of grid formation, one expects to be able to observe heptagonal grids also in rodents adapted to quasi-regular extensions of the basic pseudo-spherical surface. The model further indicates that, while hyperbolic adaptation has to be protracted, it can be subsequent to an earlier phase of grid development in an ordinary planar environment. Critical to this outcome is the prolonged plasticity of the relevant synaptic connections, which in the model are those afferent to the developing grid units.

It is likely, but it remains to be established conclusively, that the transition or ‘remapping’ from planar to hyperbolic maps is facilitated, with respect to the planar-to-spherical case, by topological similarity: the planar arena and the PS, whether folded or extended, are limited compact portions of an infinite space, *R*^{2} or *H*^{2}, surrounded by a boundary (provided the PS includes the partition); the sphere has no boundary if complete and it can include, even if not complete, closed geodesics along which an activity map has to be matched with itself.

Do alternative models of grid cell formation predict heptagonal grids? It appears not to be the case for oscillatory interference models, at least in their original formulations [29,30], which are based on the superposition of three cosine waves. For attractor network models, our own simulations indicate that the same collateral network which aligns and sustains planar grids can maintain their phase relationship also on a PS. Such models, however, do not fully specify the process which leads to the emergence of the grid pattern in the first place, other than invoking an embryonal position of the neurons in the tissue which determines the collateral connectivity and the phase relations, and is then somehow transformed to become unrelated to the phase relations in the adult animal [31]. The connectivity set-up in the embryo would have to be slightly hyperbolic, but it could well be, and in any case at the relevant scale of the unit tile of the tessellation the difference between planar and hyperbolic might be negligible. Therefore, attractor models are compatible with hyperbolic grid formation, but do not really predict it, in the same sense that they are under-formulated to predict planar grid formation.

Several open questions about the self-organizing models also apply to their development in hyperbolic geometry. These include the delayed-action mechanism that leads to the self-organization of the recurrent connections, the role of the layered structure [28], the interactions with hippocampal and lateral entorhinal cortex cells. On the other hand, the regularity of the activity pattern expressed by these self-organized grid units relies on the assumption of an even coverage of the available surface. Whereas behaviourally this can be easily achieved on flat surfaces, e.g. by stimulating the rat to chase chocolate chips around the arena, the even exploration of curved surfaces under gravity can be experimentally challenging. Furthermore, the assumption that when ‘proceeding straight’ animals move along geodesics, even if a reasonable extrapolation of their behaviour in Euclidean settings, needs to be validated. Systematically biased deviation from the geodesics, e.g. downward, as induced by gravity, would distort the metric underlying the exploration and eventually would impair the development of heptagonal grids. These issues deserve further analysis.

Would the discovery of hyperbolic representations in rodents bear implications for human cognition, beyond the suggestion that our fellow mammals may be less inhibited by social conventions? We reckon that such a finding would have to be taken into account in the fascinating analysis of what are often called *spatial primitives*, either in infants [32] or in indigenous tribes who may or may not have been able to elude, so far, geometrical globalism [33,34].

## 5. Methods

### 5.1. Model and simulation procedure

We refer to [26] for details, but, in brief, a virtual rat is simulated to randomly explore the hyperbolic environment described in the main text, with constant speed 40 cm s^{−1}. At each step, the change in the running direction is sampled from a Gaussian distribution with zero mean and angular standard deviation *σ*_{rdp} = 0.2 radians, if the rat is running on the PS, and from a Gaussian with zero mean and angular standard deviation , if the rat is running on the skirt, where *ϑ* and *v* are the direction (relative to the tangential direction, or to the *u*-axis in the half-plane) and the position of the previous step, respectively. If the chosen direction leads the rat outside the limits of the environment, the new position is computed by reflecting it with respect to the crossed boundary.

The position of the virtual rat is reflected in the activity of an input layer of place units that feed into the output layer of would-be grid units. The crucial self-organization occurs via competitive learning on the feed-forward connections from place to grid units, which is modulated by recurrent connections among the grid units. These latter connections are given by an explicit rule, as in [26], with a strength that grows gradually during the initial stages of the learning process. In the simulations reported here, the exploration and learning phases lasted 25 × 10^{6} time steps, thought to correspond to roughly 70 h of real time.

In detail, the overall input to unit *i* at time *t* is given bywhere is the activity of unit *k* reverberated from collateral connections with a delay *τ* = 25 time steps (10 ms each), if these connections are present. The relative strength of the collateral inputs is set by the factor *ρ*^{t}, which linearly increases from zero to a final stationary value 0.2 reached at half of the total simulation time *T*, mimicking a simulated annealing. is the firing rate of a ‘place unit’ *j* relayed by the feed-forward connection *W*_{ij} [35,36]. The activity of a place unit is approximated by a Gaussian function centred in its preferred firing location where **x**^{t} is the current location of the simulated rat, *σ*_{p} = 5 cm is the width of the firing field and | · | is the distance in the half-plane, if the rat is on the PS, and the distance given by the metric of the skirt, if the rat is on the skirt. Place cells are orderly located on the surface, separated by approximately 5 cm from each other. In the network with collaterals, each unit *i* is arbitrarily assigned with a preferred head direction *θ*_{i} to modulate its inputs. is a tuning function that produces a maximum output when the current head direction *ϑ*^{t} is along the preferred direction *θ*_{i} [37],where *c* = 0.2 and *ν* = 0.8 are parameters determining the baseline activity and the width of head direction tuning.

The firing rate of each unit *i* is determined through a threshold-nonlinear transfer function,where *Ψ*_{sat} = 2/*π* normalizes the firing rate into arbitrary units, *Θ* ( · ) is the Heaviside function, and *g*^{t} and *μ*^{t} are the gain and threshold of the nonlinearity, respectively. The variable represents a forgetful integration of the input *h*_{i},adapted by the input-dependent dynamical thresholdwhere *β*_{i} has a slower dynamics than *α*_{i}, *b*_{2} = *b*_{1}/3 with *b*_{1} = 0.200. Across the population of *N* grid units, the mean activity and the sparsity are kept within 10% relative to pre-specified values, *a*_{0} = 0.1 and *s*_{0} = 0.3, respectively, by appropriate temporal update of the parameters *g*^{t} and *μ*^{t} [28].

The feed-forward and collateral connections play a key role in the development of the grid scale and orientation alignment, respectively, although crossed influences are also relatively important. Feed-forward connections *W*_{ij} are learnt from random initialization by Hebbian association,where [ · ]^{+} is the threshold function ([*x*]^{+} = 0 for *x* < 0, and [*x*]^{+} = *x* otherwise), and are the time-dependent mean activities from grid unit *i* and place cell *j*, respectively, and *ε* = 0.005 is a moderately low learning rate. After updating, these weights are normalized according to which mimics a homeostatic control of the synaptic function. Collateral connections are implemented *ad hoc*, putatively as the result of a long learning process taking place in conjunctive layers of the mEC [28]. Here, the structure of these connections is formulated simply as the extension of previous studies to the present topology [23,26]. Each unit *i* embedded in a network with collaterals, having head-direction properties defined by is nominally associated with an auxiliary field with a randomly chosen preferred location in the bi-dimensional half-plane (*u*_{i}, *v*_{i}). The collateral weight from unit *k* to unit *i* is calculated aswhere [ · ]^{+} is the threshold function introduced above, *κ* is an inhibition parameter controlling sparseness of the connections, and are the angles of the geodesics that join (*u*_{k}, *v*_{k}) and (*u*_{i}, *v*_{i}), measured at the first and the second point, respectively (note that, contrary to the Euclidean case, angles of a given geodesics depend on the measurement point), *σ*_{f} = 10 cm is the spatial tuning, andwhere Δ*u* (Δ*v*) is the distance on the *u*-axis (*v*-axis) transversed from (*u*_{k}, *v*_{k}) along the geodesics to (*u*_{i}, *v*_{i}) by a movement of *l* = 10 cm, representative of the displacement carried out by the rat during the delay period. As before, normalization of the weights is set by

### 5.2. Characterization of local grid structure

The triangular tile is the minimal structure associated with regular hyperbolic tessellations. The two properties defining any regular triangle are the length of the side and the internal angle. Therefore, to characterize the local structure of the grid pattern in an individual unit, we extract these two properties from the spikes it produces. First, we collect a representative number of spike pairs in the half-plane, e.g. 10^{5}, to construct the distribution of distances, i.e. along the geodesics joining both locations. Typically, this distribution is highly multi-peaked, where the first peak corresponds to distances between intrafield spikes, the second peak between spikes belonging to neighbouring fields, and subsequent peaks between spikes in non-adjacent fields. Because the length of the side of the tiling triangle in a regular pattern would correspond to the location of the second peak, we define a range of distances around this peak as a filter condition to declare spikes belonging to neighbouring fields. The limits of this range were defined by the surrounding troughs, if they exist, or fixed to and if they do not, where *d* is the distance corresponding to the second peak, declared as the grid distance of the unit. For pseudo-spikes randomly associated with visited locations, distances between spikes are unimodally distributed, and hereafter used as a control condition. Second, triplets of spikes were putatively classified as belonging to neighbouring fields based on distance filtering in the previous range, and the three internal angles determined (under the underlying topology). These three angles were pooled together and accumulated in an overall angular distribution (obtained from 10^{5} effective triplets). The distribution of angles so obtained for the spiking activity and the control condition were different and their ratio was used to characterize the angle subtended in the triangular pattern. Typically (in the asymptotic state), this ratio was unimodal and distributed asymmetrically around a peak. We defined the characteristic angle as the median of the above-chance distribution (ratio values above unity indicate an above-chance condition or, in other words, angles more frequently obtained than chance).

### 5.3. Pseudo-sphere + skirt

One cannot use folds with rats, but to extend the area of the PS one can add a ‘skirt’ around it, so that additional fields can form on the skirt (figure 6*a*). Because the skirt cannot have a regular hyperbolic metric, one has to consider the effect of attaching it to a surface of constant negative curvature. A first option could be a flat skirt, e.g. extending up to a radius *R*′ = 3/2*R*. The disadvantage is that fields on the skirt may tend to flatten also the geometry on the inner PS. A second option is to add an undulated skirt, with cosine waves extending in the *z-*direction by an amount *f*(*r*) which depends on *r* and tends to 0 for *r* → *R*, so that (*x*, *y*, *z*) = [*r* sin*θ*, *r* cos*θ*, *f*(*r*) cos (*mθ*)]. By choosing *m* = 11, we try to minimize the bias between coordination number 6 or 7 or 8, as the 11 waves on the skirt are incommensurable with all these patterns.

To construct a skirt that smoothly extends the PS with *m* = 11 waves, as in figure 6*a*, one can compute the curvature along each of the ‘ridges’, where the vector normal to the surface, in the direction *w*, is tilted with respect to the *z*-axis but only along the radius. Taking the ridge to be at *y*_{0} along the *y–z*-plane, i.e. at *x* = 0, for small deviations from (0, *y*_{0}, *f*(*y*_{0})) one has, according to the second fundamental form,so that the two curvatures are
andwhich are not constant. The ‘radial’ curvature *κ*_{y} can be positive definite and not vary much if *f*′(*y*_{0}) is small and *f*″(*y*_{0}) constant, whereas the ‘transverse’ curvature *κ*_{x} changes sign, and the local surface is hyperbolic only when (i.e. not at the border with the PS). A simple choice is to set This yields along the ridge *κ*_{y} and *κ*_{x} that scale like 1/*R*, the first slightly lower and the second changing sign and reaching out at the border values close to − 10/*R*. At the outer border, the skirt is *f*(3/2*R*) ≈ 0.2*R* high.

### 5.4. Spacing and coordination number

We now derive the relationship expressed in equation (3.1), valid for regular triangular tessellations. According to the Gauss–Bonnet theorem, in hyperbolic geometry the area of a hyperbolic triangle Δ is given in terms of its internal angles *α*_{1}, *α*_{2}, *α*_{3}, as

This theorem clearly has no counterpart in Euclidean geometry, where the angles of a triangle do not determine its area, and highlights the fact that the sum of the internal angles of a hyperbolic triangle is strictly less than *π*; for a regular triangle, then, the common internal angle is less than *π*/3, enabling the possibility to construct tessellations with coordination number greater than 6.

Let Δ be a hyperbolic triangle with internal angles *α*_{1}, *α*_{2} and *α*_{3}, and side lengths *a*_{1}, *a*_{2}, *a*_{3}. One of the laws governing hyperbolic trigonometry (law of cosines II; see [38]) relates the lengths of the sides to the internal angles of a triangle according to

For a regular triangle with internal angle *α* and side *l*, the above relationship simplifies to

This relationship is represented in figure 3 with a dashed line. For a regular triangular tiling, *q* of these triangles meet at a node and, therefore, *α* = 2*π*/*q*. This leads to equation (3.1), once the radius of curvature is inserted into the expression, as shown by the open symbols in figure 3.

## Funding statement

This work was supported by the EU FET project GRIDMAP (FP7-ICT 600725).

## Acknowledgement

Extensive discussions with other participants in the consortium are gratefully acknowledged.

- Received November 3, 2014.
- Accepted January 15, 2015.

- © 2015 The Author(s) Published by the Royal Society. All rights reserved.