^{1}

^{2}

^{2}

^{1}

I have read the journal’s policy and the authors of this manuscript have the following competing interests: The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. ML and MK were employed by Numenta. Numenta has stated that use of its intellectual property, including all the ideas contained in this work, is free for noncommercial research purposes. In addition, Numenta has released all pertinent source code as open source under the AGPL V3 license (which includes a patent peace provision).

We shed light on the potential of entorhinal grid cells to efficiently encode variables of dimension greater than two, while remaining faithful to empirical data on their low-dimensional structure. Our model constructs representations of high-dimensional inputs through a combination of low-dimensional random projections and “classical” low-dimensional hexagonal grid cell responses. Without reconfiguration of the recurrent circuit, the same system can flexibly encode multiple variables of different dimensions while maximizing the coding range (per dimension) by automatically trading-off dimension with an exponentially large coding range. It achieves high efficiency and flexibility by combining two powerful concepts, modularity and mixed selectivity, in what we call “mixed modular coding”. In contrast to previously proposed schemes, the model does not require the formation of higher-dimensional grid responses, a cell-inefficient and rigid mechanism. The firing fields observed in flying bats or climbing rats can be generated by neurons that combine activity from multiple grid modules, each representing higher-dimensional spaces according to our model. The idea expands our understanding of grid cells, suggesting that they could implement a general circuit that generates on-demand coding and memory states for variables in high-dimensional vector spaces.

Entorhinal grid cells in mammals are defined by the periodic arrangement of their firing fields and play a major role in the representation of 2D spatial information. At the same time, they represent a variety of non-spatial cognitive variables. It is thus natural to ask what kinds and dimensions of variables it is theoretically possible for grid cells to represent. We show that grid cells can provide a neural vector space for unambiguous integration, memory, and representation of a variety of different (Euclidean) variables of much higher dimension than two, without requiring higher-dimensional grid-like responses. The same circuit can flexibly represent variables of different dimensions, doing so with high dynamic range and at low neural cost, without any reconfiguration of the recurrent circuitry.

It is widely believed that entorhinal grid cells in mammals play a central role in the representation of spatial information. But recent evidence indicates that grid cells are more versatile than initially assumed and also represent cognitive variables other than (self-)location in physical space. Grid cells respond to the location of visual gaze [

At the same time grid cell responses are structurally and dynamically constrained. Across a range of novel, familiar, and distorted spatial environments [

We propose a coding scheme for high-dimensional variables that is consistent with these structural and dynamical constraints and assume that the activity of each grid module remains confined to a 2D toroidal attractor in the associated neural state space.

From a purely mathematical viewpoint, the possibility of encoding higher-dimensional variables using grid cells is not surprising—after all the combined state space of multiple (

However, the current literature does not offer any concrete coding schemes that exploit this fact. On the contrary, existing proposals and experimental searches center around the formation of individual grid modules that individually support high-dimensional grid responses [^{N} while the same state capacity can be achieved by ∼

The second is a question of flexibility. The recurrent connectivity of an attractor network must be tailored to the dimension and geometry of the attractor manifold and cannot be easily reconfigured on demand. The construction of a 3

In addition to solving the problems of efficiency and flexibility in representing variables of different dimensions, we will show that our proposed coding scheme exhibits a smooth and automatic handoff in the allocation of coding states toward additional dimensions based on demand and toward increasing the coding range per dimension when the number of dimensions shrinks, all without changing previously assigned codewords or recurrent connectivity. These properties are enabled by combining the power of nonlinear mixed selectivity with compositional modular representations in grid cells.

Modular codes, in which a set of neurons is divided into a number of disjoint groups, each dedicated to encode different aspects of the represented variable, enable a high-dimensional state space for a cheap number of cells; thus avoiding the “curse of dimensionality” we mentioned in the introduction. This can obviously be exploited for the representation of higher-dimensional variables but relies on a pre-partitioning depending on variable dimension.

Perhaps less widely known, the immense capacity of modular codes can alternatively be leveraged for the representation of a fixed, low-dimensional variable, and produce a massive library of unique coding states. The high-level idea is that the joint coding space can be efficiently packed with a well-folded lower-dimensional manifold to produce a very large coding range. The prime example of the use of this strategy in the brain is the modular grid cell system. The grid code is efficient on two levels, capacity (it utilizes a sizable fraction of the available coding space) and fast mapping of input to representation (as opposed to a slow learned lookup table). It is flexible to a limited extent: we know that the same circuit is used for 1d and 2d variables.

The ability to encode either dimensions or range per dimension raises the interesting question of whether modularity can be exploited simultaneously for both, and whether a coding scheme exists that can flexibly hand-off excess capacity in range for dimension and vice versa, without reconfiguration (or pre-partitioning). We show below that the answer can be affirmative, by combining properties of mixed representations with modular codes in grid cells.

To quantify the capacity of our model, we define the

The remainder of the section is organized as follows: We start with a brief review of grid cells. From there we proceed with the definition of two distinct coding schemes, illustrating efficiency and flexibility of a code, followed by the presentation of our numerical results. We conclude the section with a characterization of our model’s tuning curves.

Mammalian grid cells are defined by their periodic firing fields in planar environments: they fire at multiple locations corresponding to the vertices of an equilateral triangular lattice (

We can now return to the question of cell-efficient encoding of variables of higher dimensions with 2D grid cells. We first present a conceptually simple disjoint modular grid coding scheme that is efficient for both dimensionality and range, yet inflexible.

For simplicity, assume that the number of modules, _{i} (

We know from previous theoretical work that if the population response in each grid module in some time-bin determines position as a spatial phase with resolution Δ (meaning that the intrinsic uncertainty in estimating phase from the population response is Δ), and if all grid periods are distinct but have a similar spatial scale (magnitude), which we denote as λ, then the 1-dimensional coding range per group scales as (cf. [_{i} (

However, it must be constructed for the specific dimension of the input (this determines how the modules are grouped, and once the modules are grouped, the range per dimension is fixed). If the dimensionality of the encoded variable shrinks, modules must be reallocated to reflect this change before the encoding range per dimension can increase. Hence, the code is not

In the previous section we exploited the modular structure of the grid code in two consecutive steps. We first formed different groups each dedicated to encode a single coordinate of the input variable (multiple periodic modules assigned to each coordinate ensure an efficient disambiguation of position along that dimension over a large range), and then leveraged the groups as disjoint modules encoding different 1-d inputs (to efficiently represent higher-dimensional variables), resulting in a code that is efficient but inflexible. We are now going to merge these two steps such that

The central observation of this paper is that just as multiple modules operating independently to integrate velocity solve the problem of the ambiguity of representation by periodic responses, they can _{α} (of size 2 × _{α} to be independent random projections for each module. These

Recall that we described the coding range of the disjoint modular grid code for

However, we can numerically compute how the code scales by using the following approach [_{0} in the _{0} in the joint coding space of all modules (because the grid code is translation-invariant, this choice does not incur a loss of generality). Next, center a box around _{0}, and expand this box progressively along all _{0} (

In this way, we numerically compute the coding range as a function of the number of encoding grid modules (_{α} are always of dimension 2 × 6 and the projection matrices are held fixed even as the input dimension

All plots show the

For reasons of computational complexity, our primary numerical calculations are performed with a rather conservative (low) phase resolution (Δ = 0.2). To gain a more realistic picture of model performance with finer phase resolution, we consider the dependence of coding range on phase resolution for a moderate number of modules and dimensions (

When we fix the random projections _{α}, but decrease the dimensionality of the input variable, the same projection appropriates states previously allocated to encoding different dimensions to encoding a larger range per dimension, as can be seen because the coding range grows as the input dimension is decreased,

First, consider the conventional 2D grid code for 2D variables (x,y): starting at some point in the multi-modular coding space (

In contrast, consider the disjoint modular grid code. Here, some modules are entirely given over to representing a different dimension (

Finally, consider the mixed modular code. As in the disjoint modular grid code, updates in different modules are decoupled, but this time

Will it be possible to identify whether grid cells can and do perform flexible representation of high-dimensional variables? For the grid cell system to work according to our model, different modules have to be capable of changing their internal states independently of each other, through the action of separate velocity projection operators. A tantalizing hint that this is possible appears in [

A key signature of our proposed scheme involves differences in tuning curves across modules. Even after recording neural responses in higher-dimensional spaces, it remains practically difficult to characterize tuning curves in higher dimensions. However, characterizing the high-dimensional responses by plotting the tuning curves along any 2D subspace of the explored

For instance, if the input variable is 3D, the 3D tuning curves in different modules are different lifts of a 2D grid. A 3D lifted response of a 2D grid consists simply of elongated fields along one direction, consistent with empirical findings in [

For ease of illustration, we consider here the encoding of a variable in three dimensions.

Within a module, the responses of different cells are generated from translations of the tuning of the module (each row of

Many cells in entorhinal cortex and hippocampus in bats and in some rat experiments express spatial fields in 3D environments that are less structured than grid cells. According to our model, if some entorhinal and hippocampal cells were combining inputs from two or three grid modules, these conjunction-forming cells would exhibit localized 3D fields with some regularity in spacing, but without full grid-like periodicity and thus no clear notion of a spatial phase (

In sum, a central prediction of the mixed modular coding hypothesis in which the grid cell system could collectively and flexibly use its multiple modules to encode variables of higher dimension than two is that the projections to different modules should be different, and therefore that in such situations, the responses of grid cells in different modules will differ in the geometry of their tuning curves.

The multi-module representation of grid cells provides a pre-fabricated, ready-to-use, general high-dimensional neural affine vector space that can be used for both representation and memory of arbitrary vectors (of dimension ≤ 2

In some studies of animals exploring higher-dimensional spaces, specifically 3D spatial environments, the response of grid cells is elongated and undifferentiated along one dimension, while remaining grid-like in the other two [

Most of the field elongations recorded in [

Recently, grid cell responses have been examined in bats flying through 3D environments. Bats crawling on 2D surfaces exhibit the same 2D triangular grid cell tuning [

The mixed modular grid code combines two powerful concepts: the compositionality of modular codes for high capacity and cell-efficiency, and mixed selectivity coding for flexibility in trading off the available coding capacity for use in either representing large ranges per dimension of the encoded variable or representing higher-dimensional variables, without any reconfiguration of the recurrent circuitry. It generalizes the concept of nonlinear mixed selectivity [

Numerical computation of capacity for mixed modular grid code: Given the number of modules _{max}, and a phase resolution Δ, a single trial consists of sampling a random matrix _{α} of size 2 × _{max} for each module and computing the _{max} (in order to support the model’s flexibility). The entries of the matrices were independently sampled from a standard normal distribution.

Recall that a grid code consists of an ordered set of 2

The search for collision follows a divide-and-conquer approach that extends the search region and then subdivides the new frontier region into smaller pieces for which collisions with the origin can be computed deterministically. This means that our collision search is not based on sampling the high-dimensional input space and ensures that we do not miss

Idealized tuning curves were computed as follows: As an idealized attractor manifold we chose a twisted torus obtained by the quotient of the Euclidean plane and a hexagonal lattice Λ with basis _{x} = _{0} (for convenience we chose _{0} = 0) within a module was then computed as
_{x}, _{0}): = min_{λ∈Λ} ‖_{2}. The rate map of a conjunctive cell combining the activity of _{1}, …, _{m} was computed as

Realistic tuning curves were implemented by simulating multiple grid cell modules with noisy neural activity, as in [

^{2})^{M} (thick black line); cf. [

(TIF)

Capacity grows as a power of phase resolution, regardless of the dimensionality of the encoded variable.

(TIF)

(TIF)

Left: Schematic picture of input space. Pink region contains points whose phase is in the Δ-neighbourhood of the associated phase on the right (pink box on the right). Right: Schematic picture of joint coding space of multiple grid modules. Black thick line represents the image of the box on the left hand side under the grid coding map. Black dots represent two encoded positions: the phase representing the origin in input space is surrounded by a Δ-neighbourhood (pink) of noise. The other dot illustrates a collision.

(TIF)

The authors thank the Simons Institute for the Theory of Computing at the University of California, Berkely, where this work was initiated. MK thanks Jeff Hawkins and Subutai Ahmad for their support and many helpful discussions.