Abstract
We characterize the relationship between the simultaneously recorded quantities of rodent grid cell firing and the position of the rat. The formalization reveals various properties of grid cell activity when considered as a neural code for representing and updating estimates of the rat's location. We show that, although the spatially periodic response of grid cells appears wasteful, the code is fully combinatorial in capacity. The resulting range for unambiguous position representation is vastly greater than the ≈1–10 m periods of individual lattices, allowing for unique highresolution position specification over the behavioral foraging ranges of rats, with excess capacity that could be used for error correction. Next, we show that the merits of the grid cell code for position representation extend well beyond capacity and include arithmetic properties that facilitate position updating. We conclude by considering the numerous implications, for downstream readouts and experimental tests, of the properties of the grid cell code.
Introduction
The brain uses diverse schemes to encode information. For example, oculomotor neurons and head direction neurons both encode continuous onedimensional (1D) variables but in very different ways: oculomotor neurons encode the horizontal angle of gaze in vertebrates through a rateproportional code, all firing together at rates that increase linearly with temporal deflections of the eye (LopezBarneo et al., 1982). Neurons in the rodent subiculum encode where the animal is facing by firing when its head points in a narrow angular range, with different neurons tuned to different head directions (Taube et al., 1990). In insects, antennal lobe neurons encode the identity of odors with distributed, temporally evolving patterns of firing, whereas Kenyon cells of the mushroom body encode similar information using a more sparse, static response (PerezOrive et al., 2002). Hippocampal place cells encode a rat's whereabouts by firing only when the rat is within a neighborhood of a particular location, with the preferred location varying from cell to cell (O'Keefe and Nadel, 1978).
In contrast with place cells, socalled grid cells, neurons in the dorsolateral band of the medial entorhinal cortex (dMEC), fire whenever the rat, moving freely in a twodimensional (2D) enclosure, is on any vertex of a virtual triangular lattice overlaid on the surface of the enclosure (Fyhn et al., 2004; Hafting et al., 2005). The positiondependent firing of these cells, as well as the fact that entorhinal cortex is the primary cortical input to the hippocampus (which plays an important role in spatial memory and navigation) suggest that grid cells may be involved in encoding an internal estimate of rat position (Mittelstaedt and Mittelstaedt, 1980; Whishaw and Maaswinkel, 1998; Etienne and Jeffery, 2004; Hafting et al., 2005; Burak and Fiete, 2006; Fuhs and Touretzky, 2006).
However, the spatially periodic nature of grid cell firing is puzzling: the activity of a cell does little to specify the rat's location, because it fires when the rat is near any of the vertices of the virtual lattice. Furthermore, the periodicity of any of the grids is not large enough to provide unambiguous information about rat position: a rat may forage over distances of 100 m to 1 km in the wild (Recht, 1988; Miller and Clesceri, 2002; Russell et al., 2005), whereas the measured lattice periods are no more than 1–10 m. It appears profligate at best or impossible at worst, to represent a largeranging, nonperiodic variable such as rat position by a set of periodically repeating variables, each with very small periods. Furthermore, if dMEC is the idiothetic path integrator, as has been hypothesized (Hafting et al., 2005; Burak and Fiete, 2006; Fuhs and Touretzky, 2006; McNaughton et al., 2006), it must represent position with high resolution to minimize the accumulation of rounding off errors. These observations provoke questions about exactly how much positional information is unambiguously stored within the grid cells, why it is coded the way it is, and the ways in which such information may be used by downstream areas.
Here we consider the representational properties of the grid cell response, considered as a code for position. Our purpose is not to provide a theory or model of how grid cell activity patterns are generated as the rat moves around (for such studies, see Burak and Fiete, 2006; Fuhs and Touretzky, 2006; McNaughton et al., 2006). Rather, we take as given the simultaneous experimental measurements of rat position and neural activity and characterize the relationship between the two recorded quantities. This characterization allows us to understand the properties of capacity, arithmeticity, and robustness of position representation in grid cells. It also suggests possibilities and limits for the readout of entorhinal cortical codes by the hippocampus.
A shorter, preprint version of this article has been published previously (Burak et al., 2006).
Materials and Methods
In this section, we define some central concepts, establish terminology, and outline the experimental findings on which the results of this work are based.
Representation schemes
On what basis does the brain select one specific encoding scheme from among various candidate possibilities? A simple analogy, from the numeral representation of integers, demonstrates that different schemes can have intrinsically different storage and computational properties.
Capacity.
Integers may be written in any baseb positional numeral system (e.g., b = 2 for binary, b = 10 for decimal, etc.) or more generally may be represented in systems that do not use a fixed base at all. One such scheme is to represent the number 8 by eight ticks. This scheme, known as a unary code, requires an alphabet of exactly one coding symbol or letter (a tick), but the number of repetitions of that element (“word length”) needed to represent a number grows in direct proportion to its size: representational capacity grows only linearly with word length. By comparison, baseb positional numeral systems have a major advantage over this scheme: an alphabet of b letters can be combined into words of length N to represent integers from 0 to b^{N} − 1, a range that increases exponentially as a function of the word length N (Table 1). These examples demonstrate that representational capacity can vary dramatically with the choice of encoding scheme.
“Arithmeticity.”
The choice of encoding scheme can also determine whether it is possible (and, if so, how easy it is) to extract metric information from a number or to perform arithmetic operations on it. In the unary encoding scheme, it is easy to compare the sizes of two numbers directly from their representations. These tasks are also relatively easy in the positional fixedbase numeral system. In contrast, consider a scheme in which each number is represented by a unique, distinct letter (similar to a neural “grandmother cell” code), or a combinatorial “label” scheme in which each number is represented by a name or label, a combination of letters with no metric structure. In either case, it is impossible to judge the relative sizes of the represented numbers without an explicit lookup table (Table 1).
The ability to simply and algorithmically perform basic arithmetic operations such as addition or multiplication of numbers within the representational scheme is another arithmetic property of an encoding scheme. The roman numeral system approaches the compactness of a fully combinatorial code and allows for relatively easy magnitude comparison; however, it is not possible to write simple rules for computing the sum of two numbers within this system. The situation is worse for combinatorial labels. In contrast, fixedbase numeral systems enable arithmetic operations such as addition and multiplication of pairs of large numbers using simple rules (increment, carry) to produce a result in the same base (Table 1).
In these examples, the choice of an encoding scheme had profound implications for representational capacity and arithmeticity. Similarly, the specific choice made for the representation of a variable in the brain is likely to be informative about the constraints and functional priorities underlying the local neural computation and its downstream uses.
From the point of view of position representation, capacity is important if the range of positions to be represented is large and if the required resolution is high. Arithmeticity is important if the representation is used to perform incremental position updating as the rat moves around, an intrinsically arithmetic operation on the metric quantity of position.
Salient properties of grid cells
In recent experiments (Fyhn et al., 2004; Hafting et al., 2005), rats foraged in 2D enclosures searching for randomly scattered food pellets while rat position and the activity of single neurons in dMEC was monitored.
Single cell.
Singleneuron activity, when plotted as a function of rat position, forms a triangular lattice. An individual neuron fires whenever the rat is in the neighborhood of any vertex of an imagined regular triangular lattice, overlaid on the explored space (Fig. 1A, left). The radius of each of the periodically arranged firing fields is quite large, extending over onefifth to onethird of the lattice period.
Because the rat repeatedly visits the same location using different routes, which elicits a similar positionbased grid cell response, the activity of grid cells is independent of the rat's path.
The periodicity of the grid is reported to be independent of the shape or size of the enclosure in which the rat is running (Fig. 1A, right) (Hafting et al., 2005) [although temporary rescaling may be observed if a familiar enclosure is suddenly resized (Barry et al., 2007)]. The periodic response tiles the entire explored area without noticeable distortion of the lattice close to the boundaries of the enclosure. Based on these observations, we assume that a similar response will also be observed in far larger enclosures than used so far in experimental assays.
Cell population, single lattice.
Neighboring neurons in dMEC all respond to rat position with the same lattice period (λ) and orientation but typically differ in their relative spatial phases (Hafting et al., 2005) (Fig. 1B). Together, these neurons cover all possible lattice phases. In other words, at any rat position, some subset of these neurons is active, the identity of which can specify the phase of the rat's position within a unit cell of the lattice.
As a population, all the neurons with the same period cannot specify anything about which unit cell the rat is in. The observed population response is identical for all positions separated by any integer multiple of the lattice period along either principal lattice direction (Fig. 1D).
Mathematically, the information represented by the entire local neural population may be described simply as a 2D phase within a unit cell of the triangular lattice. Later, we assume that this phase can only be ascertained up to a certain accuracy, related to the size of the firing field at each vertex.
Cell population, multiple lattices.
Neurons separated by larger distances along dMEC have different lattice periods (Fig. 1C). The smallest measured period (at the dorsal end) is ≈30 cm, whereas the largest measured period (halfway to the ventral boundary) is ≈70 cm (Hafting et al., 2005). By extrapolating (linearly or exponentially) the monotonic trend in lattice periods up to the ventral boundary, the largest lattice period may be 1–10 m.
The radius of the firing field at each lattice vertex scales in direct proportion to the lattice period, so that the larger period lattice responses look like globally stretched versions of the responses of cells with smaller periods.
Results
To summarize all the observations in Materials and Methods, dMEC decomposes the 2D vector of instantaneous, timevarying rat position into a set of timevarying 2D periodic variables, or phases. Each phase is ambiguous about rat position up to all translations in the infinite plane by any integer multiple of the period of that lattice, λ, along the principal lattice directions.
Formal mathematical description in one dimension
For simplicity, we consider below a purely 1D analog of the dMEC representation, described above. Our conclusions on arithmeticity carry over directly to the 2D case, and we believe our conclusions on capacity will, too (see Discussion). In the 1D analog, the identity of the active subpopulation within each lattice population α represents a 1D phase χ_{α} given by the following: where x is the rat's internal estimate of its position in space. When the space is filled with sensory cues, x is essentially the rat's true location; if the rat has been moving about in a landmarkfree space, x may be a relatively poor estimate of its location. As shorthand in what follows, we will frequently refer to x as the rat's position, although by x we always mean the rat's internal estimate of its position; similarly, we will refer to the rat's estimate of its position by the shorthand of “the rat's position.” λ_{α} is the lattice period of lattice α. The symbol mod represents the modulo operation, which is the remainder after integer division of x by λ_{α} (Fig. 1E), and, without loss of generality, the phases have been defined to be 0 at x = 0.
Because there are N different neural populations with different lattice periods (λ_{1}, λ_{2},… λ_{N}), each position x is represented in dMEC by the set of phases χ⃗ = (x mod λ_{1}, x mod λ_{2},… x mod λ_{N}), which can be read out as the identity of the active subpopulation within each lattice (Fig. 1D,E).
Interestingly, the representation of a quantity by a set of remainders (phases) after modulo division with a fixed set of moduli (lattice periods), as is happening in dMEC, constitutes an unusual yet well known numeral system for the representation of numbers, called the residue number system (RNS) (Soderstrand et al., 1986). Although it may seem like a strange concept that the brain might implement a formal numeral system to represent position, position is after all a metric quantity and one that must be updated arithmetically as the rat moves. We will see that the modulo code for position shares some of the best features of the baseb numeral systems for the representation of numeric quantities (Table 1) and has additional properties that are more advantageous in the neurobiological context.
Capacity
The onetomany mapping from phase to position (Fig. 1D,E), described in Materials and Methods and formalized above, means that the phase obtained from the population response of any single lattice is far from a unique specification of rat position. Assuming no additional dMEC functionality beyond the experimentally observed modulo responses, summarized above, and without reference to any specific upstream readout or decoding scheme, we ask whether the set of phases χ⃗ = (χ_{1}(x), χ_{2}(x),… χ_{N}(x)) = (x mod λ_{1}, x mod λ_{2},… x mod λ_{N}) is sufficient for uniquely specifying rat position x and over what range.
Capacity of idealized modular position code
Let us first consider an idealized situation, in which position x and the lattice periods λ_{α} are restricted to be whole numbers and the phases χ_{α}(x) are known without uncertainty. We will later relax these assumptions. In this case, the properties of representing a number by its modulo remainders are analytically known. The Chinese remainder theorem (CRT) can be used to prove that a modular representation with a relatively small number of moduli (lattice periods) uniquely specifies the input number (position) over a large range (Burak and Fiete, 2006; Gorchetchnikov and Grossberg, 2007).
As an example, consider a simple system with two moduli or periods, λ_{1} = 3 and λ_{2} = 4. As x increases progressively from 0, χ_{1}(x) repeatedly cycles through the values {0, 1, 2}, whereas χ_{2}(x) cycles through {0, 1, 2, 3}. Starting at x = 0, where [χ_{1}(x), χ_{2}(x)] = (0, 0), the values of the two phases taken as a pair do not repeat until x = 12, where (χ_{1}, χ_{2}) = (0, 0) again. This simple system with N = 2 can represent 12 distinct positions.
In fact for any number N of lattices, the CRT guarantees that the modulo phases uniquely represent any position in the range from 0 up to where LCM refers to the least common multiple. The second equality holds if the lattice periods λ_{α} are coprime, i.e., they share no common factors. For the set of five moduli λ⃗ = (13, 15, 16, 17, 19), any number in 0 − 1,007,759 is uniquely specified by its residues or phases, with 1,000,000, for instance, represented by the phases χ⃗ = (1, 10, 0, 9, 11). As in the base10 numeral system, where a number as large as 1,000,000 can be represented by just six registers, here five moduli are sufficient to represent a similar range.
If, as in dMEC, all the lattice periods are of similar magnitude (λ_{α} ≈ λ), the total system capacity according to Equation 2 scales as λ^{N}^{.} Thus, capacity scales combinatorially in the number of lattices, and the efficiency of encoding a number (position) as a set of phases or modulo remainders is as high as storing it in any baseb positional numeral system, where the size of the largest encodable number (∼b^{N}) also grows exponentially with the number N of registers.
Capacity of grid cells
In reality, lattice periods and rat position are not dimensionless integers: they are realvalued quantities for which there is no notion of LCM or coprimeness. Thus, we generalize to the case in which the lattice periods λ_{α}, rat position x, and lattice phases are arbitrary real numbers (we continue to consider rat displacements in one dimension). In addition, we assume that the width of the firing fields at each lattice vertex and the stochasticity inherent in neural firing contribute to uncertainty in the exact phase, so that the firing phase of the dMEC population is only known to finite precision. Results on capacity based on modular arithmetic and the Chinese remainder theorem no longer apply under these conditions. In this more realistic case, what is the capacity of grid cells, and how does it scale?
The exact realvalued phases are still denoted by χ_{α}(x) = x mod λ_{α}. Because the responses of neurons with larger lattice periods resemble uniformly stretched versions of the smaller period lattices (Hafting et al., 2005), the width of the neural firing fields and thus the phase uncertainty δχ_{α} is a constant fraction of the lattice period λ_{α} for all lattices. We denote the periodindependent scaled phase uncertainty, which is attributable to the width of the neural firing fields at each vertex and is between 0 and 1, by δφ ≡ δχ_{α}/λ_{α}. This error represents the intrinsic error in the ability of an ideal observer to readout the actual grid phase χ⃗ and should not be confused with errors attributable to path integration inaccuracies, which produce a mismatch between x, the rat's internal estimate of its position, and its true position.
If λ⃗ = (6.3, 11.9, 15.4) cm, the phases do not exactly repeat anywhere in (0, 2356.2) cm, which might naively be thought of as the capacity of the system. However, if the phases are known only up to an uncertainty of 1 cm, the range of distances that can be unambiguously represented is actually much smaller: after an excursion of 108 cm, the phases are (0.9,0.9,0.2) cm, indistinguishable from their values at the origin. Thus, phase uncertainty can reduce the capacity precipitously, but it remains unclear whether capacity with phase uncertainties is combinatorial.
By analogy with the integer case, we may estimate the capacity with phase uncertainties δφ as follows. Because each lattice has approximately 1/δφ distinguishable states, the effective number of states for all N lattices is (1/δφ)^{N}. The code is fully combinatorial if the phases visit all these possible states while position is continuously incremented, before returning to a previously visited state. The step size to transition from one phase state to another is approximately λδφ (if all lattice spacings are of the same order of magnitude). This counting argument suggests an upper bound for capacity, which is only a crude estimate because the phase uncertainties were not treated in a precise manner. Nevertheless, Equation 3 provides a useful benchmark for comparison with the more rigorous results that follow. It indicates that, in a combinatorial code, the capacity should increase algebraically with decreasing phase uncertainty δφ and should increase exponentially with the number of lattices N.
To determine coding capacity precisely, we define the following distance measure d between the phase vectors X⃗ and X⃗_{χ′}: So long as at least one component of the phases differs by more than the phase uncertainty δφ, the distance d > δφ, and the corresponding positions can be differentiated by the phase code. Conversely, if all the components in the difference are smaller than the phase uncertainty, then d < δφ and the phases and associated positions are not distinguishable. The capacity D, or the uniquely representable range, is the smallest distance between any two positions x, x′ for which the corresponding phases χ⃗ and χ⃗′ obey d(χ⃗ and χ⃗′) < δφ.
In contrast to the integer case, there is no analytic expression for how D depends on the set of lattice spacings and on δφ. We therefore evaluate D numerically. The formula for d only involves the difference between the two phases: d(χ, χ′) = d(0, χ′ − χ). Thus, without loss of generality, it is sufficient to begin at x = 0 and increase x systematically until the first x* for which the phase reenters within a cube of side 2δφ centered at the phase 0⃗, so that d(0⃗ and χ⃗) < δφ.
To obtain the functional dependence of capacity on δφ, we vary the phase resolution (keeping the number of lattices fixed, at N = 12) and numerically compute D as above. We find (Fig. 2) that capacity grows with increasing phase resolution 1/δφ as where N_{eff} ≈ 10.7 is obtained by fitting the capacity curve in the example of Figure 2. Thus, capacity in the realistic case scales similarly as in the idealized case, growing as a power of the effective number of distinguishable states per lattice, roughly estimated by the inverse phase uncertainty, 1/δφ. However, the power N_{eff} is slightly smaller than N = 12, the actual number of lattices: this modest modification is the price paid for uncertainties in phase and real, not coprime integer, lattice periods.
Similarly, to determine how capacity scales with N, we vary the number of lattices (keeping phase resolution fixed). We find that capacity grows exponentially with the number of lattices N (Fig. 3), scaling as where α = 0.62 is a fit for the parameters of Figure 3. Therefore, despite uncertainties in phase, the scaling of capacity with number of lattices is still combinatorially large and comparable with the idealized case, at the cost of a prefactor α < 1 in the exponent. Nevertheless, for generic choices of the realvalued lattice periods, α is of order unity.
With conservative values for the parameters (N = 12 dMEC lattices, periods uniformly spaced between 30 and 74 cm, and phase resolution of onefifth of the lattice period, δφ = 1/5), we obtain a range for unique position representation of 2000 m per linear dimension, with a resolution of 6 cm (Fig. 3). This value is on the correct scale to cover the behavioral range of rat excursions; by including a few more lattices or assuming a somewhat better phase resolution, it is easy to obtain a nearly astronomical range of position representation [e.g., (2 × 10^{8} m)^{2}], vastly in excess of the rat's behavioral range (Fig. 3).
Even if we assume a high encoding redundancy, with 1000 neurons active per phase and per lattice and with the conservative set of parameters used in the preceding paragraph, the dMEC phase code would require only ∼5 × 10^{4} neurons to cover a (2000 m)^{2} area with a resolution of 6 cm per side. [The entorhinal cortex in rats contains ≈10^{5} neurons (Amaral et al., 1990; Mulders et al., 1997), which provides an upper bound for the total number of neurons in dMEC.]
Let us briefly reconsider dMEC information content from the point of view of single neurons. If a neuron fires in a lattice with phase resolution 2π/5, the rat can be localized to within ≈1/5 of the area; assuming 1000 active neurons per phase and per lattice as above (i.e., assuming that each lattice comprises 5000 neurons) yields a minuscule estimate of 0.001–0.003 bits per dMEC neuron. Thus, the capacity of the single neuron code or even the full population code in a single lattice is shockingly small, reminiscent of the low capacity for dense distributed codes in associative networks (Foldiak, 2002). However, when neurons are added to form a new lattice, they enlarge the overall capacity exponentially (Fig. 3) rather than algebraically, as they would for neurons added to an existing lattice population (Fig. 2). Total dMEC capacity is therefore combinatorially large, produced by pooling a number of independent, low information content networks into a structured populationofpopulations or “metapopulation” code.
Comparison with place cell coding.
We have seen (Fig. 3) that with ∼5 × 10^{4} neurons, the modulo code in dMEC can easily cover 2000 m with 6 cm resolution per linear dimension. This compares favorably with the rat's behavioral foraging range, estimated at 100 m to 1 km per linear dimension (Recht, 1988; Miller and Clesceri, 2002; Russell et al., 2005). If dMEC were instead to encode positionlike idealized place cells (strictly unimodal grandmothercell representation of position), it would require ≈10^{10} neurons to cover the same dynamic range, even if we assumed a very low redundancy of 10 neurons active per (6 cm)^{2}. The rat hippocampus contains only ≈10^{6} neurons (Amaral et al., 1990). With these neurons and an idealized place cell code, the hippocampus would be able to cover a range of at most 20 × 20 m, even with nearly no redundancy. The contrast in capacity between the idealized place cell and modulo residue codes is even more dramatic if entorhinal cortex is assumed to contain 24 lattices instead of 12 (Fig. 3). Even with quite conservative estimates, therefore, the phase code for position is vastly more efficient (as quantified by the ratio total capacity/number of cells) than an idealized place cell code.
The large capacity of dMEC has many potential uses. The large range of the dMEC code together with the regular positionbased firing of grid cells suggests that dMEC forms the primary representation of position in the rat brain and can provide unique modulo phase labels for every possible location in the large foraging range of rats (corresponding to scales much greater than the periods of individual lattices). Furthermore, the capacity is large enough for the representation to have high resolution at each location. These properties together suggest, independently of dynamical considerations or network modeling (Burak and Fiete, 2006; Fuhs and Touretzky, 2006; McNaughton et al., 2006; Burgess et al., 2007), that dMEC could be the elusive neural integrator of idiothetic rat motion cues (Hafting et al., 2005). Excess capacity may be used for error correction (discussed below) in the representation of position or to build multiple independent representations of space based on context [“multiple cognitive maps” (McNaughton et al., 1996; Touretzky and Redish, 1996; Redish, 2001)] (discussed below).
Beyond capacity
Beyond high capacity, the modulo code has several useful features and implementational advantages for position representation and updating, as described next. For simplicity, we will frequently use examples with lattice periods treated as integers, but the properties described below apply directly to realvalued lattice periods as well.
In parts of this section, we compare the modulo code with positional baseb systems. In light of the structure of the dMEC code for position and its correspondence with the RNS, it is not outrageous to imagine that the brain could instead have used a baseb positional numeral system to represent the numeric quantity of position [in the positional baseb system, the pth register represents (x mod λ_{p}) with resolution b^{p}, where λ_{p} = b^{p}^{+1}]. Therefore, it is possible to debate the relative merits of the two representation schemes.
Narrow range of grid periods: similar lattices without capacity cost
Modular representations allow great flexibility in the choice of moduli or lattice periods: the periods may span a geometrically large range, as in positional baseb systems (Fig. 4A, second row). In the baseb systems, the ratio of the maximum to minimum register sizes must equal the dynamic range (range over resolution) of the represented quantity. For a number represented by six registers (digits) in the decimal system, the largest register represents the hundreds of thousands scale, whereas the smallest represents ones. In the modular system, however, it is possible for all the moduli to be of the same magnitude, without sacrificing capacity (Fig. 4A, third row).
The sizes of the different registers also dictate how rapidly those registers change as the represented quantity is varied: the Nth register in a baseb scheme increments b^{N−1} times more slowly than the first register, whereas in the modulo scheme with approximately equally sized moduli, all registers increment at approximately the same rate (Fig. 4B).
What is the biological relevance of this observation? To generate lattices that span a very large range of sizes (e.g., several decades, as might be the dynamic range of position representation, estimated from dMEC capacity) requires the existence of parameters in the underlying network that span a similarly large range, a difficult task. Instead, the modular system may have an arbitrarily large dynamic range (with a suitable number of lattices), with a narrow dynamic range in the parameters of the dMEC network. This property allows dMEC to maintain a high capacity with periods that are approximately within a factor of 10 of each other in size.
A corollary of the narrow range of periods allowed in the modular representation is that the different lattices share information about rat position “democratically.” In the baseb numeral systems, removal of the leftmost lattices would leave information about small rat displacements intact but obliterate knowledge of the largescale position of the rat, whereas removal of the rightmost set would have the converse effect. In the modular system, information from all scales is present in every lattice (Fig. 4B). Lesioning a few dMEC lattices beyond the number that provides redundant coding of position (see below) should degrade navigational behavior equally at all scales, big and small, larger than the individual lattice periods.
Carryfree arithmetic: independent position updating across lattices
In the modular representation, operations such as addition, subtraction, and multiplication are completely parallelized: if there is a wraparound in one of the registers, no information is passed to other registers to obtain the correct sum (Fig. 4B). This is because, if a′ = a mod λ_{α} and b′ = b mod λ_{α}, then a′ + b′ = (a + b) mod λ_{α}, or, in other words, the sum of two numbers is simply the modulo sum of their phases, computed separately for each register or lattice. (In contrast, in the fixedbase numeral systems, whenever one register wraps around, the next register must be incremented by an appropriate amount by carrying the spillover.)
This property of modular arithmetic has long been appreciated and exploited in computer science. Computer hardware designed to operate on the RNS instead of binary has been used to produce large speed boosts by avoiding the overhead of carrying numbers in applications such as signal processing, cryptology, and RSA, which involve repeated addition and multiplication steps (Soderstrand et al., 1986; Mohan, 2002; Bajard and Imbert, 2004).
Why is this seemingly abstract feature of modular arithmetic relevant for position representation in neurobiology? As the rat moves from x to a new location x + Δx, the mental representation of its position must be updated by addition of the displacement vector Δx. Because of the carryfree property of modular arithmetic, each lattice can directly (in parallel) use feedforward motion inputs to add Δx to its previous phase to obtain the correct phase for the new rat position. There is no need to sum spillovers from, or pass spillovers to, other lattices, even when a phase wraps. Although positional information is distributed across lattices, no coordination (and therefore no recurrent processing) is required between lattices to update position.
The carryfree property of the dMEC code shows that the dMEC representation is well suited for summing incremental movement signals to update its state, again suggesting, independently of any dynamical considerations or modeling (Burak and Fiete, 2006; Fuhs and Touretzky, 2006; McNaughton et al., 2006; Burgess et al., 2007), that dMEC might be the locus of idiothetic path integration in the brain (Hafting et al., 2005).
Distance metric is not preserved for metric comparisons
If the rat moves by an amount much smaller than the period of the smallest lattice (λ_{min}), the updated phase vector is close to the original phase vector. For instance, if the rat started at position x = 0 with phases (0, 0, 0) for a set of lattices of periods (17, 18, 19), the metricity of real space is preserved in the phases for excursions smaller than 16 steps. Thus, the grid cell representation can be directly and easily used over these scales to make metric comparisons of distance.
Over large distance scales, metric information is not lost in the modular dMEC code, because the mapping from position to phases is unique and the map has an exact inverse, but making realspace distance comparisons is difficult. This is because faraway points are regularly mapped very close to each other in the grid cell representation. In the example above, the nearby phases (16, 16, 16) and (16, 17, 18) represent x = 16 and x = 5813, which are separated by 5797 steps, nearly the full range of the representation. Figure 5 illustrates that points in the space of modulo phases do not share the same metric as points in real space (rat location). The crosscorrelation of the dMEC population vectors corresponding to locations x, x′ = x + Δx decays monotonically with Δx over short distances (Δx smaller than the blob width in the largest lattice), but, over larger distances, the correlation varies nonmonotonically with separation Δx. Thus, beyond the width of a blob, closeness in real space is unrelated to closeness in the grid cell representation, and a simple linear readout (or even a linear summation followed by a monotonic nonlinearity) of dMEC cannot compute distance in real space.
This observation prompts the question of whether the brain translates the grid cell representation into a form that is more amenable to explicit metric computations (and, if so, how) or whether it uses the phases of entorhinal cortex to perform other navigationrelated tasks that do not require explicit inversion and metric comparisons. We consider this question below (see below, Downstream uses of the grid cell code).
Robustness
In principle, the potentially vast excess capacity of dMEC (Figs. 2, 3) can be used to redundantly represent the same information so that faulty phases may be corrected. In the context of error correction, the fact that small perturbations in phase correspond to large differences in the represented position is an asset. Let us consider one, not necessarily optimal, example of error correction [see other examples by Soderstrand et al. (1986) and Mohan (2002)]. For lattice periods (15, 17, 19, 22), the unique representable range is [0, 62985]. If the rat never ventures outside the range [0, 250], position can be represented by any two of the four lattices, rendering the other two redundant. In the modular representation, 200 = (5, 13, 10, 2). An error of ±1 in any one of these phases corresponds to positions >6000. Because any of these perturbations to the phase vector represents positions far outside the range of interest, an error is easily flagged even without knowing which phase is wrong. Ignoring one of the correct lattice phases does not produce candidate positions in the range of interest; ignoring the incorrect phase does produce a candidate position in the relevant range, which is the true position. In short, dropping phases typically produces exact error correction (if the original error was in the form of small perturbations to a few phases), even without knowledge of the correct phase vector or the identity of the wrong phase.
Downstream uses of the grid cell code
We emphasize that, until now, we have simply characterized or mathematically elucidated the properties of the grid cell code for position. Therefore, our analysis has been modelfree. Next, we consider possible ways in which the grid cell code for position may be read out by downstream areas. What follows is necessarily more speculative.
Let us consider a concrete example: suppose that, for the set of lattice periods (15, 17, 19, 22), the phase vector at some perceived location x* reads χ⃗* = (5, 13, 10, 2). The readout may treat this phase vector as a unique neural label or name for x* (unique over a range of 62,985 units), without using the fact that χ⃗* corresponds to a displacement of 200 units from χ⃗ = 0⃗. Alternatively, the readout may actually perform the inverse mapping from modulo phases to displacements, to obtain and exploit the metric information inherent in the modulo code.
We refer to these two complementary, and not necessarily mutually exclusive, readout possibilities as (1) a placelabel readout and (2) an explicitly metric readout and discuss each below. We pause briefly here to stress that we are only considering how the grid cell phases χ⃗, which represent x, the rat's estimate of its location, are read out and used downstream in the brain and not whether x is an accurate estimate of the actual rat position. Admittedly, the utility of any readout of x depends on whether x is itself a reasonably good estimate of the rat's true position over the relevant scales; purely idiothetic path integration may produce large errors in position estimation. However, what is considered a sufficiently accurate estimate to be useful may depend on the task. In what follows, we assume that the dMEC position estimate is arrived at based on a combination of path integration computations and external sensory cues (landmarks), which can correct gross errors in position estimation (Etienne et al., 2000).
Placelabel readout
The position code in dMEC is distributed and dense. Distributed dense codes can have a high capacity in the sense that they can represent a large number of variables with relatively few neurons. However, a well known problem with distributed dense codes, made much worse if the code consists of graded activity patterns, is that they are difficult to read out by neural networks, because different code words or labels can have large overlaps with each other (Foldiak, 2002). For instance, if the code words consisted of the analog firing patterns of a neural population (e.g., a ratebased code), all neurons would fire at most locations, with the primary difference between different words being the graded levels of activity. The dMEC code ameliorates this problem while maintaining a fully combinatorial capacity because each place name is based predominantly on the identity of active neurons (whether a neuron is active or not), not their rates. Thus, the dMEC code, although itself dense, nevertheless facilitates the formation of a sparse placelabel readout (like place cells in hippocampus), in a way that dense graded codes cannot.
The placelabel readout can help with certain navigation tasks and not others. Because place labels do not extract the metric information present in the dMEC phases about the rat's location, they cannot be used to compute and represent vectors for straightline homing to a location after random excursions from it, over large ranges and in general environments. Nevertheless, place labels can be instrumental in navigation, as we describe below.
If grid cell phases are at least partly based on integrated rat movement signals, whether computed within dMEC or elsewhere, the phase labels would enable the rat to know that it has arrived at a landmark even when the sensory marker for that landmark is absent or its appearance has changed (Fig. 6B) because the grid cell phase labels, computed by summing displacements as the rat arrives at the location from home, will be the same. Similarly, the rat can discriminate between two different but similarlooking locations (Kuipers, 2000) (Fig. 6A) because the grid cell phase labels for the two locations will be different. Thus, although place labeling constitutes a nonmetric readout of the grid cell code, its most useful properties from the point of view of navigation actually arise if the labels are derived and updated using strict metric rules for movementbased integration.
Place cells in the hippocampus may be viewed as the sparse readouts of the unique but distributed place labels given to locations by dMEC. In fact, recent modeling studies have shown how sparse place cells might be constructed from dMEC inputs, using appropriate feedforward weights between dMEC and the hippocampus [by summing input from grid cells with different periods and phases chosen so that the grid cell responses have peaks at the place field center (O'Keefe and Burgess, 2005; Rolls et al., 2006; Solstad et al., 2006; Franzius et al., 2007)]. This observation suggests that dMEC place labels are useful in navigation for many of the same reasons as have been widely proposed for place cells; for instance, the sparsened place cell readouts of the dMEC place labels can, together with the help of associative learning, form memories that chain together sequentially visited locations to aide in the learning of specific landmarkbased routes between locations (Blum and Abbott, 1996; Redish and Touretzky, 1998; Foster et al., 2000). Additionally, if dMEC is the path integrator and if the connectivity from dMEC to place cells and back is symmetric, then place cells in the hippocampus, if anchored to landmarks through sensory inputs, can be used to reset the dMEC phases and correct errors in the internal estimate of position (Redish and Touretzky, 1997; Samsonovich and McNaughton, 1997; Redish, 2001; O'Keefe and Burgess, 2005).
In the typically small areas (long 1D tracks or ≈1 m diameter enclosures) used in experiments, hippocampal neurons tend to form unimodal place fields that resolve position with relatively high accuracy and appear to cover the space roughly uniformly (O'Keefe and Dostrovsky, 1971; Wilson and McNaughton, 1993). Above (see Capacity), we concluded that hippocampal capacity rules out the possibility that large enclosures could be fully remapped with high resolution [∼(10 cm)^{2}] using idealized unimodal place cells. Thus, we predict that in large enclosures, sparse location labels in the form of unimodal place cell firing cannot be assigned uniformly. Instead, place cells that continue to fire unimodally in large enclosures must disengage from uniformly covering all space with narrow place fields and only represent select locations (e.g., edges, landmarks, rewarded locations, etc.) with high resolution.
An alternative possibility is that hippocampal place cells will display multimodal firing fields in larger enclosures. Indeed, some placesensitive cells in hippocampus fire at multiple locations in an enclosure (McNaughton et al., 1983; Muller et al., 1987). If multimodal responses are the norm in large enclosures, the hippocampal code for place is actually a (sparse) combinatorial code rather than a grandmothercell code, and cells with multimodal responses cannot properly be called place cells. The resolution of this issue remains an important topic for experiments to address. Our capacity statement is not in contradiction to this alternative; we simply note that, if place cells retain their hitherto observed unimodal firing characteristic in large enclosures, they cannot match (or even approach) the range and resolution of positional information in dMEC.
The prediction of selective, highly nonuniform assignments of place fields in larger enclosures (if they remain unimodal) is qualitatively different than would be expected if place cells were the primary generalpurpose encoders of rat position and if they were the loci of neural path integration, as suggested by some models (Samsonovich and McNaughton, 1997; Tsodyks, 1999), because path integration relies critically on translation invariance in the representation of space. Indeed, consistent with our prediction, several experiments show that place field coverage can be highly nonuniform (Eichenbaum et al., 1989; O'Keefe and Burgess, 1996; Hartley et al., 2000; Hollup et al., 2001).
Because the primary role of dMEC in the placelabel scenario is to label locations, the absolute phase values are crucial (in contrast to relative phase differences between positions, as in the explicitly metric readout scenario described below). Thus, if the rat arrives at a landmark that it recognizes from sensory inputs as familiar but by starting from an entirely novel location without landmarks along the way, so that its phase vector on arrival is not the same as its phase vector at previous visits to that landmark, the dMEC state should abruptly reset to the previously assigned phases.
Another reason why absolute phases may be important is if the dMEC code signals context in addition to position. dMEC may represent nonmetric quantities such as context but also retain a purely metric representation of space locally (over large spaces) by breaking up its vast capacity of states into contiguous blocks, with each block representing space metrically but different blocks representing that space in different contexts (“multiple cognitive maps”).
A pair of phase vectors corresponding to a massive difference in the represented position (e.g., by an amount larger than a rat's range) could be used to represent the same point in space in different contexts. Within this picture, a contextdependent remapping of space corresponds to a differential shift in the phase across lattices. For hippocampal place cells, generated by summing several dMEC inputs, this dMEC remapping should produce a visually dramatic transformation, with fields appearing in new locations and disappearing from old locations, or with cells that were previously inactive in an area becoming active, and vice versa.
Explicit metric readout
For a rat to perform navigation tasks such as estimating the direction and straightline distance toward home following random foraging trajectories (Fig. 7C), it needs to (1) estimate its current position from its displacements and any available sensory cues, and (2) compute a homing vector that points from its current position to home, from which the direction and distance to home can be read out. Even if a rat is incapable of computing an accurate straightline homing vector over large scales, it is likely that the animal must have a vague sense of the direction back home; similarly, it must be able to approximately gauge the relative straightline distances from home to two different and distant food sources (e.g., which one is closer to home), even if it took a circuitous trajectory to each one. Because dMEC phases encode the coordinates of the rat's current location, dMEC already reflects the results of computation 1 above (whether the computation to estimate the rat's position is done by dMEC or an upstream area). Additionally, because dMEC phases are always relative to a starting phase, dMEC also encodes the vector displacement of the rat relative to the reference location, information necessary for performing computation 2.
However, metric information about rat displacement contained in the dMEC code is difficult to extract. This is because, as noted earlier, it is not possible for a singlelayer neural network readout to reconstruct metric quantities relating to the rat's position in real space from the dMEC code, for general values of the rat's possible location. Therefore, we expect that converting the dMEC code into an explicitly metric representation useful for homing requires a dedicated processing network. By explicit metric readout, we mean the transformation of the dMEC code into another representation that represents (through a continuous mapping from space to neural representation and vice versa) metric properties of space in a way that distance or angular comparisons can be made without a lookup table, for instance, one in which cells fire whenever the rat is at a particular angle (or distance) from the home base (Fig. 7A,B).
It is possible for a neural networklike readout to convert modulo phases into an explicitly metric representation, as described in Appendix. The particular network in Appendix involves recurrent circuitry, but it may be possible for another network to accomplish the task using a multilayered architecture instead.
It is unknown whether behaviorally rats can compute rough homing vectors over displacements that are large compared with the lattice periods in dMEC and, thus, whether they possess the computational ability to invert the modulo phase code for position. Rats can home accurately, even without any external sensory feedback, after random foraging excursions in enclosures of ≤2 m diameter (Whishaw and Maaswinkel, 1998). However, over such short distances, homing may not require a separate explicitly metric readout, because the grid cell representation metrics resemble realspace metrics (Fig. 5).
Suppose that physiology experiments locate neurons in the rodent brain whose responses are explicitly metric functions of position over large distances and are independent of the taken path. Such neurons, if they exist, are likely to be the explicit metric readouts of the dMEC phase code. The existence of these neurons is likely to be predictive of behavioral abilities in rats to estimate the distance or angle toward home over large excursions (Fig. 7B).
Conversely, suppose that behavioral experiments in large enclosures find that a rat can perform roughly straightline homing after random trajectories that take it farther than λ_{max} from home. Such behavioral abilities suggest the likely existence of neurons with an explicitly metric readout of rat position from dMEC. The potential to home over distances greater than λ_{max} based on dMEC input is a qualitatively, not quantitatively, different phenomenon than homing over short distances, because it requires an entire machinery for the construction of explicit metric readouts and is open for behavioral testing.
Finally, if the dMEC code were only used in the computation of homing vectors, differences in the grid cell phases vectors between two locations might be far more important than absolute phases. In such a situation, specific sets of phases need not be attached consistently to a set of landmarks; rather, the dMEC phase assignment could be arbitrary for encounters with the same landmark on different days and occasions, as long as phase differences between different locations were consistent along the animal's foraging path.
Experimental tests
Our only assumption, or central premise, in the analysis of the grid cell code (capacity and arithmetic properties) was that grid cells with a regular periodic response as a function of position remain periodic with unchanged periods in any enclosure, including in enclosures of size ≫λ_{max} [e.g., ≈(50 m)^{2}] and that their response remains independent of path. Current evidence from experiments in small enclosures suggests that this assumption is correct, but it will be important to test it directly when the net displacement in rat position is large. Sampling a few activity blobs in each of two distant neighborhoods within the large enclosure is sufficient to determine both path independence and periodicity.
Once the above assumption is made, the properties of the grid cell code follow automatically from pure mathematical principles and are therefore model independent. For example, the capacity of the code does not depend on how grid cell activity is processed in downstream areas of the brain. In other words, the characterization of the properties of the grid cell code for position neither depends on nor implies any specific model for the generation or readout of grid cell firing. Can we use this characterization of grid cell response to propose hypotheses that can be tested and falsified?
We have established that grid cells unambiguously specify rat position over a large range and that the dMEC code has notable implementational advantages for position representation and incremental updating. The primary testable hypotheses emerging from these considerations, which are complementary to approaches based on modeling network dynamics, is that dMEC must be the primary neural representation of rat position in large 2D environments (based on capacity) and is likely to be the locus of path integration in the rat brain (based on arithmeticity and capacity). When results on the general properties of the dMEC code are combined with assumptions about how downstream areas may use dMEC inputs to perform spatial tasks, it is possible to generate more specific experimental predictions.
General predictions, independent of readout scheme
(1) The arithmetically convenient properties of the grid cell code for position suggest that dMEC is the idiothetic path integrator in the rat brain. The most basic test, not yet performed, is to determine whether grid cells reflect pathintegrated responses in the absence of all spatially informative external sensory cues, i.e., does activity remain gridlike? The next is to pinpoint the locus of path integration through selective lesion of grid cells or their input fibers. Studies involving selective lesion and behavior show that entorhinal cortex is part of the path integration circuit (Alyan and McNaughton, 1999; Parron and Save, 2004) but have not probed the specific contribution of dMEC.
(2) The large range (≫λ_{max}) of unique position representation suggests that dMEC is the primary repository of generalpurpose, highresolution and largescale position information in the rat brain, quite independently of whether or not it performs path integration. In an experiment that is not yet technologically feasible, but could be in the future, the hypothesis that the rat uses the dMEC code as its primary reference for its sense of position could be directly tested. Shifting the phase vector by Δχ⃗ = Δx mod (λ⃗) should produce a shift by Δx in where the rat thinks it is. (Where the rat thinks it is could be assayed easily by whether the rat freezes or displays other unconditioned aversive responses, if the shifted location corresponds to where the rat has received multiple foot shocks or some other aversive stimulus.) The experiment to shift the dMEC phases requires activation of a specific phase vector in dMEC. Because neurons in dMEC do not appear to be physically grouped by phase, this experiment requires tools capable of identifying and stimulating groups of functionally related neurons.
(3) The similarly sized periods of grid cell lattices imply that, in any spatially informationrich readout (metric or nonmetric, but over large spaces), each readout cell must pool input from many or a majority of dMEC lattices. This is because small numbers of lattices do not uniquely specify rat position and because lattices of all periods share information about rat position equitably. Indeed, neurons in the septal (dorsal) half of the long axis of the hippocampus do appear to receive inputs from across the dMEC band (Witter and Groenewegen, 1984).
(4) For capacity scaling, rats with partial lesions that spare linearly increasing numbers of grid lattices should display exponentially better performance, toward normal. This prediction can only be probed in enclosures ≫λ_{max}, because it is at this scale that information must be pooled across lattices to uniquely specify position.
Predictions specific to the placelabel readout scheme
(5) A rat with a large dMEC lesion (missing most lattices) should be unable to recognize the same location if it looks different after excursions ≫λ_{max}. Such a test could involve an annular enclosure with radius ≫λ_{max} in which the rat runs unidirectionally, with landmarks strewn along the circumference, including a specific landmark (that changes appearance or disappears between visits) at which, on the rat performing a specific behavior, a food or drink reward is given. A control rat should be able to do this task.
(6) A rat with a large dMEC lesion will be unable to disambiguate two similarlooking locations separated by a distance ≫λ_{max}, even if it is able to do so over distances comparable with a lattice period. The experimental setup could be the same as above but with one rewarded and one nonrewarded location, both of which look similar. A control rat should be able to do this task.
(7) Place cells cannot form a generalpurpose, highresolution representation of all space in enclosures of size comparable with the foraging ranges of rats (like dMEC can) with a unimodal placelike code; instead, spatially compact place fields will only form at salient locations.
(8) For multiple cognitive maps and remapping, differential shifts in the phase across different lattices in dMEC should cause global remapping of many place cells in the hippocampus. Experiments show that global place cell remapping is accompanied by phase shifts in dMEC (Fyhn et al., 2007); however, these experiments have not probed whether the phases in different lattices of the same rat shift by different amounts, as we predict.
Predictions specific to the metric readout scheme
(9) dMEC is necessary for homing over distances ≫λ_{max}, if the rat can do such homing.
(10) If the rat can home over distances ≫λ_{max} behaviorally, there must be a separate readout area that pools inputs from dMEC and generates an explicit metric representation of position. The converse is likely to be true too: if a readout area exists that pools input from many dMEC lattices and has an explicit metric representation of space over distances ≫λ_{max}, then the rat is likely to be able to home over those scales. (An explicit metric readout is not necessary for homing over distances ≈λ_{min}.)
(11) When the enclosure is changed from a square to a circle (inscribed in the square), the period of the recorded grid cells is observed to grow slightly (Fyhn et al., 2007). If the percentage change in grid cell period is coherent across all lattices of an individual, this would correspond to a scaling of space and produce a small misestimate of position by the same amount as the scaling of the grid periods. If different lattices within one animal were to expand by different amounts, that would produce a serious problem for the metric readout mechanism. A metric readout can remain a viable possibility, only if different grids change in a consistent way.
A common theme in many of these predictions is that experiments in much larger enclosures, either in real space, aided by advanced telemetry, or in virtual space (Dombeck et al., 2007), should yield qualitatively, not just quantitatively, new insights about navigational computation and the representation of space in the rat brain.
This particular list of predictions is the product of our limited imaginations. A modulo code for position in dMEC is likely to have numerous other testable implications, to be imagined by others, for experiments involving contextual place cell remapping, readout neurons, and lesions.
Discussion
Summary
We analyzed the relationship between two simultaneously recorded quantities: rat position and dMEC activity. For this reason, we did not have to rely on models of the dynamics of response generation in grid cells or on models for the readout of the grid cell code. The characterization of the transformation from position to grid cell response followed from purely mathematical principles and allowed us to deduce the capacity and arithmetic properties governing position representation in the grid cell code. The large range of the dMEC code for position suggests that dMEC is the primary neural repository where the rat stores its estimate of position over large scales (however rough that estimate might be) and to which the rat refers for obtaining a sense of its location. The highresolution and carryfree arithmetic property of the code hint that dMEC is the idiothetic path integrator and that it may provide fine spatial information for tasks relating shorter segments of the trajectory. Finally, the many unique properties of modular codes constrain the ways in which dMEC phases may be used by readout areas for navigation, leading to testable predictions about the properties of potential readout schemes.
The present work has considered the properties of the dMEC modular code for representing estimated position; it has not been concerned with how well the estimated position approximates the rat's true position, but ultimately, the utility of both our proposed readout schemes (and for that matter, the general utility to the rat of retaining any internal estimate of position) will hinge on the accuracy of the internal position estimate. If the error in the internal position estimate is similar to the rat's distance from home, there is little value in storing a representation of position or constructing readouts from it. However, if, with help from sensory cues, the position estimate error is smaller than the total distance from home, both readout schemes could have complementary uses for spatial navigation.
Codes in the brain
It is extraordinary that dMEC has devised an encoding scheme for position, analogous to the residue number system, that is simultaneously combinatorial in capacity, has a register structure (by virtue of positional information that is broken down and distributed across lattices in a structured metapopulation code), and is amenable to parallelized arithmetic operations for incremental position updating. The capacity and register structure of the grid cell code make it comparable, for the representation of a numeric quantity (position), to the fixedbase positional numeral systems, among the most highly developed human tools for this purpose (Table 1). The carryfree arithmetic property and narrow register range of the modular code actually make it implementationally superior to fixedbase numeral systems for position representation in the neurobiological context.
To our knowledge, a numeral system neural code is unique compared with all other known examples of coding in the brain (Abbott and Sejnowski, 1999), for instance, codes that encode metric variables but are not combinatorial in capacity [e.g., rateproportional coding for horizontal eye deflections in the oculomotor system (LopezBarneo et al., 1982) or unimodal population coding like the angular tuning of head direction cells (Taube et al., 1990) or the ultrasparse coding of time during song in premotor songbird neurons (Hahnloser et al., 2002)] or codes that are thought to be combinatorial [e.g., distributed odor representations in the antennal lobe of insects (Laurent et al., 2001)] but represent predominantly nonmetric variables and lack apparent register structure and arithmeticity.
1D versus 2D analysis
For expositional and computational simplicity, our analysis was performed for a 1D analog of the full 2D system. How can we justify this simplification, and what do we expect in two dimensions? All properties above in Results, in the section Beyond capacity, carry over in a straightforward way regardless of the dimensionality of the represented variable, just as they carry over to realvalued numbers in one dimension. Capacity is less straightforward. In the hypothetical situation that all lattices share the same angular orientation, the rat's position in 2D space and the 2D phase represented by each unit cell can be decomposed into the projections along the principal lattice directions. Thus, the 2D representation may be trivially regarded as two sets of independent 1D phases, and our capacity analysis applies directly to each 1D phase. More generally, if the lattices have different orientations, as is possible in dMEC, it is not trivial to decompose the 2D phase into two 1D phases for capacity analysis. Nevertheless, there is no reason to expect that the scaling of capacity with lattice number should be qualitatively different: a study modeling place cell responses, computed by summing dMEC inputs (Fuhs and Touretzky, 2006), shows that place cell diversity actually grows (overlaps shrink) as the diversity of relative dMEC lattice angles increases, an indirect indication that overall capacity does not decrease if different dMEC grids are unaligned.
Tradeoff between capacity and dynamics
Capacity scales very differently with neuron number in dMEC, depending on whether additional neurons are devoted to enhancing the phase resolution within each lattice (capacity grows as a power of phase resolution) (Fig. 2) versus if they are devoted to the construction of additional lattices with different periods (exponential increase in capacity) (Fig. 3). This difference could help to explain why blob size (the size of firing fields at each vertex of the lattice), which may be inversely proportional to the phase resolution, is relatively large: neurons are allocated to construct more lattices at the expense of phase resolution within each lattice, for a greater gain in capacity. However, why does the system stop at the observed phase resolution and number of lattices rather than further reducing the former and increasing the latter? Network models of the dynamics of dMEC activity suggest that the accuracy of position estimation based on path integration is already strained by the number of neurons allocated per lattice and suffers significantly if the number of cells within a lattice is reduced (Burak and Fiete, 2006, 2007) (Y. Burak and I. R. Fiete, unpublished observations). Although capacity considerations may drive neural allocation toward the formation of more lattices with fewer neurons each, dynamical constraints on the accuracy of path integration, if dMEC is the path integrator, as our results suggest, may pull neural allocation in the opposite direction. The tradeoff between capacity and dynamical constraints may thus set some optimal value for the number of lattices and the number of neurons comprising each lattice in dMEC.
Optimality
The modular code for position is compact, but is it optimal? Capacity could be improved in at least one obvious way: by coding position with two explicitly 1D representations, as in the Cartesian or cylindrical coordinate schemes, rather than with one 2D representation. For grid cells, a hypothetical decomposition would consist of 2N 1D lattices (N for each spatial dimension), instead of N 2D lattices. Activity in each 1D “lattice” would be like a slice though a principal lattice direction of the corresponding 2D lattice. The lattices for each of the two spatial dimensions would only increment their phases for rat movements along that direction. To obtain a dynamic range r in each spatial dimension, the required number of neurons scales like r^{2} for a 2D lattice but only like 2r for two 1D ones. If the representation of space were broken into two independent variables, as imagined here, then capacity would not be a great bottleneck even for sparse grandmother celllike representations, with each cell responding unimodally around one location in one dimension. However, such a representation would be far from a place code, because the firing of each cell would represent an entire strip, not a single neighborhood, of 2D space.
Evolution has proven itself capable of producing structures that decompose orthogonal stimulus dimensions into independent processing channels [for example, three orthogonal vestibular canals in vertebrates measure accelerations in threedimensional space (Della Santina et al., 2005), and independent channels convey information about 2D wind direction in cockroaches (Kolton and Camhi, 1995)]. It is unclear what constraints led the brain to represent space by one 2D system rather than two separate 1D ones. Possibly, a potential gain in capacity is traded for a more decorrelated representation: capacity is much greater with two 1D representations, but the outputs remain heavily correlated across positions if rat position is varied along one dimension, even by a large amount, while keeping the other fixed (e.g., varying x but keeping y fixed if the representation is Cartesian, or varying θ while keeping r fixed in cylindrical coordinates). With the 2D dMEC code, motion along any direction and by any amount produces approximately equal (and relatively large) amounts of decorrelation, facilitating the formation of sparse decorrelated representations of different rat positions downstream (e.g., by place cells in the hippocampus).
Grid cells and the concept of a map of space
A single dMEC lattice partitions space into a regular grid, superficially like the grids overlaid on a city map. However, crucially, grid cells do not assign unique labels (like 7E, 3B) to each unit cell (responses in all unit cells are identical), so there is no sense in which the grid can help to label or localize landmarks in space. When many or all dMEC lattices are considered together, they do uniquely specify locations over spaces much larger than the scale of any single grid. However, the composite code from multiple lattices is aperiodic and lacks any gridlike structure. Thus, there is no analogy between grid cell firing and grids on a city map. Furthermore, grid cell firing does not specify at any one instant in time a layout for all space. Rather, it is a system that produces the label for any location once the rat moves to that location. In an updated analogy, the grid cell population output more accurately resembles the output of a global positioning system device than a map.
Appendix
Are there plausible neural network schemes that could convert grid cell phases into explicitly metric representations of rat position? As one example, a singlelayer recurrent network, like the one proposed by Sun and Yao (1994), may perform such an operation. The network takes as its inputs the grid cell phases (in one dimension), producing as its output the firing of a neuron whose rate r is equal to the displacement x of the rat, if it obeys the following dynamics: where x is rat position; χ_{α} ≡ x mod λ_{α}; χ̂_{α}(r) = r mod λ_{α}; Δ, 1/C ≪ 1; and τ/C ∼ D/Δ, where D is the largest x that can be represented by the moduli.
Starting at r = D, r is guaranteed to reach a steadystate value ϵ [x − Δ, x + Δ]. The quantities χ̂_{α}(r) may be computed from the instantaneous value of r by other networks that take r as their input. Through numerical simulation, we find that this algorithm for remapping modulo phases to a rateproportional code works even when the lattice periods λ_{α} are not coprime or are nonintegers (data not shown).
This example illustrates that plausible neural network operations can implement a conversion from modulo residues to an explicitly metric representation. Although the idiothetic path integrator must have high resolution to avoid accumulating rounding errors from successive position updates, readouts of the path integrator may in principle represent position far more coarsely. However, the readout implementation above requires a relatively highresolution internal representation of position (as encoded in the firing rate r) for the network to converge to the correct solution. Therefore, a large number of neurons would be required to accurately encode r over the desired range. [If units (neurons) each have a fixed, finite dynamic range, i.e., if the maximum firing rate and the resolution with which firing rate changes can be determined are capped, the number of required units grows linearly with the dynamic range of the represented variable in a rateproportional code. Thus, rateproportional codes do not have high capacity (Table 1).] It is possible that different recurrent networks, or possibly networks with feedforward architectures, could perform a similar conversion. It is an open question whether an alternative network could do so without requiring a highresolution internal representation of position.
Footnotes

I.R.F. and Y.B. were supported by National Science Foundation Grant PHY 9907949 to the Kavli Institute for Theoretical Physics. I.R.F. is a Broad Senior Fellow in Brain Circuitry. Y.B. is a Swartz Fellow in Theoretical Neuroscience. T.B. was supported by the McDonnell and Packard Foundations, National Science Foundation Grant DMR0606092, and the Institute of Collaborative Biotechnologies through Army Research Office Grants DAAD1903D0004 and W911NF0710072. We are grateful to the referees for their useful suggestions; to Bill Bialek, Loren Frank, Torkel Hafting, Behrooz Parhami, Michael Stryker, and David Tank for discussions; and to Kenneth Blum, Markus Meister, Uri Rokni, and Tobi Szuts for helpful comments on this manuscript.
 Correspondence should be addressed to Ila R. Fiete, Division of Biology, 21676, California Institute of Technology, Pasadena, CA 91125. ilafiete{at}caltech.edu