Spatially periodic firing of grid cells in 2-D space emerges from a neural sequence code of trajectories

A, Schematic drawing of a 1 x 1 m2 environment surrounded by walls in the presence of a single visual cue card. B, Trajectory plot visualizing grid cell spiking activity as a function of the animal’s location in space. Data obtained from the medial entorhinal cortex of a freely foraging mouse42,75. The black line indicates the path taken by the animal. Red dots indicate the locations where action potentials (spikes) were generated by the grid cell. C, Firing rate map of the spiking data shown in A. Data are visualized as 3 x 3 cm2 spatial bins, smoothed with a Gaussian kernel. Red and blue colors indicate high and low firing rates. Peak and average firing rates are 15 and 1.9 Hz. D, Spatial autocorrelogram of the data shown in B. Red and blue colors indicate high and low correlation values. E, The animal’s current position and velocity determine the animal’s trajectory. In a sequence code, directions are represented by pairs of sequentially active cell assemblies with non-overlapping cellular composition. We refer to the individual members in a set of completely distinct cell assemblies as units. The red circle represents the currently active unit. The next active unit in the sequence code is uniquely determined by the currently active cell and the velocity vector (Definition 8). N = North, NE = Northeast, NW = Northwest, W = West, SW = Southwest, and SE = Southeast. F, Units’ firing fields that surround each other symmetrically in a hexagonal lattice packing allow for equal angular resolution in the coding of trajectories by cell sequences. Colors represent distinct units. G, If a units’ firing field was surrounded by fewer or more than six firing fields that touched each other, opposite directions would not be represented at the same angular resolution. In this example, eastwest cannot be distinguished from eastnorthwest and eastsouthwest because the three directions are represented by the same sequence of units, yellowred. However, the opposite direction, westeast, is represented by three different cell sequences allowing for a finer angular resolution in the representation of traveling direction. H, Example of possible pairs of units creating a sequence code. If the sequence code shall represent all directions with equal angular resolution, the cellular composition of sequentially active cell assemblies needs to be completely distinct every 60 degrees (E and F). Possible representations of velocity vectors by sequences of two units are shown for when the currently active unit is #1 or #2. Numbers within circles identify distinct units. I, Example of a complete sequence code that uniquely represents all directions at 60 degrees resolution as a function of the currently active unit and the traveling direction. J, Sequential activation of seven distinct units can code for infinitively long trajectories along all three major axes of a hexagonal lattice. K, The same sequential activation map as in I and J but plotted in 2-D space. Note that the firing fields of individual units form grid maps in 2-D space, as highlighted in grey for unit #1.

Axioms from which grid cell firing emerges as the most parsimonious solution to provide a code for trajectories in 2-D space

Repeating sequences of units coding for trajectories result in lattice packing of firing fields

Left panels show firing fields of multiple distinct units with non-overlapping firing fields arranged in a 2-D lattice packing (grid). Each grid provides a sequence code of trajectories. Mid panels show the sequences that code for the directions along the three major axes of the grid. Right panels highlight the firing fields of an individual unit visualizing the type of lattice formed by the firing fields of one unit. A, An example of the minimal number of seven units and resulting sequences with repeat length 7 along the three grid axes. The resulting firing fields of individual units (referred to as a “grid map” in animal experiments) are arranged on a hexagonal lattice rotated by 10.9 degrees against a vertical axis. B, An example of eight cells and sequences with repeat lengths 4 along one axis, and repeat length 8 along the two other axes. The resulting firing fields are arranged on a centered rectangular lattice. C, An example of nine cells and sequences with repeat length 3 along all three grid axes, resulting in hexagonal lattice packing of indivual units’ firing fields.

The minimum number of distinct units providing a sequence code of trajectories in 2-D space is 7, and there are exactly 2 possible arrangements of units up to relabeling

A, Repeat lengths that are smaller than 7 result in a violation of a sequence code of trajectories because the code would be ambiguous and not unique. A red question mark indicates that no unit can be found for this position that would not violate the sequence code. Red numbers indicate that activity of this unit at the current position would violate sequence coding of trajectories due to ambiquity. Blue background color marks the sequential activity of 2 units that violate the sequence code of trajectories (Definition 8) because the next active cell in the sequence is not uniquely determined by the currently active cell and the velocity vector associated with the current trajectory of an animal. B, If the repeat length is 7, there are three potential translations of the sequence in row 1 to fill up row 2 (see Mathematical proof). Only two of those three tranlsations result in an arrangement of units (up to relabeling of units) that creates a sequence code for trajectories in 2-D space. These two arrangements are mirror images of each other and imply that the firing fields of each individual grid unit fall on the vertices of equilateral triangles, i.e., they form a hexagonal grid. C, Both possible arrangements of firing fields imply that grid patterns of other grid units have the same spacing and rotation, and only differ in spatial phase (compare grid patterns of unit #1 and unit #6). The smallest angle between one grid axis and the boundary of a rectangular enclosure is 10.9 degrees if one row of sequences is aligned with one of the borders of the enclosure.

Transformation of a sequence code of trajectories from 2-D space to 1-D space

A,B, A sequence of 7 different units can code for a trajectory in a 1-D compartmentalized “hairpin” maze (A) or a 1-D circular track (B). Note that the distance between firing fields would increase in the 1-D “hairpin” maze and 1-D circular track compared to the distance between spatial firing fields in a 2-D environment. Also note that sequences could undergo a phase reset at behaviorally relevant points, e.g., the turning points in the “hairpin” maze (A). C, The sequence of active units in a 1-D environment can be interpreted as a cross-section of the trajectory sequence code in a 2-D space. D, Anchoring of firing filelds to environmental borders predicts parametric rescaling of an individual unit’s grid pattern when a familiar enclosure is deformed. Each color represents one grid unit, each circle represents one firing field. For clarity, the complete set of firing fields of an individual unit is shown only for one unit (orange color). In addition, sequences are shown for all three major axes. Left panel, original maze configuration. Mid and right panel, the environment is compressed along the vertical or horizontal dimension resulting in a parametric deformation of firing fields and the grid pattern of individual units’ firing fields along the vertical or horizontal dimension. E, Progressively faster advancement from the currently active unit to the next active unit in the sequence code of trajectories results in progressive decrease in grid spacing and thereby a local distortion of the grid map. Open circles represent firing fields of grid units along the three major axes. The red filled circle in the center represents a salient location such as a rewarded goal location toward which nearby grid fields gravitate.

Multiple grid units provide nearly continuous resolution in the coding of trajectories

A, The circles with numbers show the centers of the grid fields from 4 grids, each composed of 7 distinct units (total of 28 grid units). Shaded areas represent the firing fields of individual units. Units with non-overlapping firing fields form “grids”, shown in black, green, blue, and red colors. Each number within a circle identifies a distinct unit. If units represent cell assemblies, a combination of numbers (e.g., “1,2”) identifies a unit whose cellular composition is an overlap between two units with adjacent firing fields. E.g., unit “1,2” is composed of cells that are part of units “1” and “2”, resulting in an overlap of firing fields. For visual clarity, not all unit numbers are shown. B, Grids #2, #3, and #4 are phase-shifted along one of the three major axes of grid #1. The emerging grid map of an individual unit’s firing fields is highlighted in color for one grid unit in each grid. The phase-shift of each grid is indicated by showing the transparent grid pattern of grid #1. C, When more grid units are added, the units can be represented in 3-D neural space as a neural manifold, shown here for a total of 1792 grid units forming 256 grids of non-overlapping firing fields. The colored cells represent one diagonal axis across rows of non-repeating units if plotted in the 2-D plane as shown in A.

List of possible grid maps and properties of these grid maps given the total number of units participating in a trajectory-coding sequence in a rectangular environment. For each individual unit’s grid map that has a non-zero angle to a border, a reflection or 90°-rotation and reflection up to relabeling of the units exist, and these additional possibilies are not included in this list.