<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with MathML3 v1.3 20210610//EN"  "JATS-archivearticle1-3-mathml3.dtd"><article xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" dtd-version="1.3"><front><journal-meta><journal-id journal-id-type="nlm-ta">elife</journal-id><journal-id journal-id-type="publisher-id">eLife</journal-id><journal-title-group><journal-title>eLife</journal-title></journal-title-group><issn publication-format="electronic" pub-type="epub">2050-084X</issn><publisher><publisher-name>eLife Sciences Publications, Ltd</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">96627</article-id><article-id pub-id-type="doi">10.7554/eLife.96627</article-id><article-id pub-id-type="doi" specific-use="version">10.7554/eLife.96627.3</article-id><article-version article-version-type="publication-state">version of record</article-version><article-categories><subj-group subj-group-type="display-channel"><subject>Research Article</subject></subj-group><subj-group subj-group-type="heading"><subject>Neuroscience</subject></subj-group></article-categories><title-group><article-title>Spatial periodicity in grid cell firing is explained by a neural sequence code of 2-D trajectories</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>RG</surname><given-names>Rebecca</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0002-7700-4312</contrib-id><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="other" rid="fund3"/><xref ref-type="fn" rid="con1"/><xref ref-type="fn" rid="conf1"/></contrib><contrib contrib-type="author"><name><surname>Ascoli</surname><given-names>Giorgio A</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0002-0964-676X</contrib-id><xref ref-type="aff" rid="aff2">2</xref><xref ref-type="other" rid="fund2"/><xref ref-type="other" rid="fund3"/><xref ref-type="fn" rid="con2"/><xref ref-type="fn" rid="conf1"/></contrib><contrib contrib-type="author"><name><surname>Sutton</surname><given-names>Nate M</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0002-4424-3886</contrib-id><xref ref-type="aff" rid="aff2">2</xref><xref ref-type="fn" rid="con3"/><xref ref-type="fn" rid="conf1"/></contrib><contrib contrib-type="author" corresp="yes"><name><surname>Dannenberg</surname><given-names>Holger</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0002-0340-0128</contrib-id><email>hdannenb@gmu.edu</email><xref ref-type="aff" rid="aff2">2</xref><xref ref-type="other" rid="fund1"/><xref ref-type="other" rid="fund3"/><xref ref-type="fn" rid="con4"/><xref ref-type="fn" rid="conf1"/></contrib><aff id="aff1"><label>1</label><institution-wrap><institution-id institution-id-type="ror">https://ror.org/02jqj7156</institution-id><institution>Department of Mathematical Sciences, George Mason University</institution></institution-wrap><addr-line><named-content content-type="city">Fairfax</named-content></addr-line><country>United States</country></aff><aff id="aff2"><label>2</label><institution-wrap><institution-id institution-id-type="ror">https://ror.org/02jqj7156</institution-id><institution>Department of Bioengineering, George Mason University</institution></institution-wrap><addr-line><named-content content-type="city">Fairfax</named-content></addr-line><country>United States</country></aff></contrib-group><contrib-group content-type="section"><contrib contrib-type="editor"><name><surname>Peyrache</surname><given-names>Adrien</given-names></name><role>Reviewing Editor</role><aff><institution-wrap><institution-id institution-id-type="ror">https://ror.org/01pxwe438</institution-id><institution>McGill University</institution></institution-wrap><country>Canada</country></aff></contrib><contrib contrib-type="senior_editor"><name><surname>Colgin</surname><given-names>Laura L</given-names></name><role>Senior Editor</role><aff><institution-wrap><institution-id institution-id-type="ror">https://ror.org/00hj54h04</institution-id><institution>University of Texas at Austin</institution></institution-wrap><country>United States</country></aff></contrib></contrib-group><pub-date publication-format="electronic" date-type="publication"><day>21</day><month>05</month><year>2025</year></pub-date><volume>13</volume><elocation-id>RP96627</elocation-id><history><date date-type="sent-for-review" iso-8601-date="2024-02-16"><day>16</day><month>02</month><year>2024</year></date></history><pub-history><event><event-desc>This manuscript was published as a preprint.</event-desc><date date-type="preprint" iso-8601-date="2024-02-17"><day>17</day><month>02</month><year>2024</year></date><self-uri content-type="preprint" xlink:href="https://doi.org/10.1101/2023.05.30.542747"/></event><event><event-desc>This manuscript was published as a reviewed preprint.</event-desc><date date-type="reviewed-preprint" iso-8601-date="2024-06-05"><day>05</day><month>06</month><year>2024</year></date><self-uri content-type="reviewed-preprint" xlink:href="https://doi.org/10.7554/eLife.96627.1"/></event><event><event-desc>The reviewed preprint was revised.</event-desc><date date-type="reviewed-preprint" iso-8601-date="2025-04-24"><day>24</day><month>04</month><year>2025</year></date><self-uri content-type="reviewed-preprint" xlink:href="https://doi.org/10.7554/eLife.96627.2"/></event></pub-history><permissions><copyright-statement>© 2024, RG et al</copyright-statement><copyright-year>2024</copyright-year><copyright-holder>RG et al</copyright-holder><ali:free_to_read/><license xlink:href="http://creativecommons.org/licenses/by/4.0/"><ali:license_ref>http://creativecommons.org/licenses/by/4.0/</ali:license_ref><license-p>This article is distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License</ext-link>, which permits unrestricted use and redistribution provided that the original author and source are credited.</license-p></license></permissions><self-uri content-type="pdf" xlink:href="elife-96627-v1.pdf"/><self-uri content-type="figures-pdf" xlink:href="elife-96627-figures-v1.pdf"/><abstract><p>Spatial periodicity in grid cell firing has been interpreted as a neural metric for space providing animals with a coordinate system in navigating physical and mental spaces. However, the specific computational problem being solved by grid cells has remained elusive. Here, we provide mathematical proof that spatial periodicity in grid cell firing is the only possible solution to a neural sequence code of 2-D trajectories and that the hexagonal firing pattern of grid cells is the most parsimonious solution to such a sequence code. We thereby provide a likely teleological cause for the existence of grid cells and reveal the underlying nature of the global geometric organization in grid maps as a direct consequence of a simple local sequence code. A sequence code by grid cells provides intuitive explanations for many previously puzzling experimental observations and may transform our thinking about grid cells.</p></abstract><kwd-group kwd-group-type="author-keywords"><kwd>grid cells</kwd><kwd>trajectory code</kwd><kwd>path integration</kwd><kwd>neural sequences</kwd><kwd>entorhinal cortex</kwd></kwd-group><kwd-group kwd-group-type="research-organism"><title>Research organism</title><kwd>None</kwd></kwd-group><funding-group><award-group id="fund1"><funding-source><institution-wrap><institution-id institution-id-type="FundRef">http://dx.doi.org/10.13039/100000002</institution-id><institution>National Institutes of Health</institution></institution-wrap></funding-source><award-id>R00NS116129</award-id><principal-award-recipient><name><surname>Dannenberg</surname><given-names>Holger</given-names></name></principal-award-recipient></award-group><award-group id="fund2"><funding-source><institution-wrap><institution-id institution-id-type="FundRef">http://dx.doi.org/10.13039/100000002</institution-id><institution>National Institutes of Health</institution></institution-wrap></funding-source><award-id>R01NS39600</award-id><principal-award-recipient><name><surname>Ascoli</surname><given-names>Giorgio A</given-names></name></principal-award-recipient></award-group><award-group id="fund3"><funding-source><institution-wrap><institution-id institution-id-type="FundRef">http://dx.doi.org/10.13039/100000001</institution-id><institution>National Science Foundation</institution></institution-wrap></funding-source><award-id>2424326</award-id><principal-award-recipient><name><surname>RG</surname><given-names>Rebecca</given-names></name><name><surname>Ascoli</surname><given-names>Giorgio A</given-names></name><name><surname>Dannenberg</surname><given-names>Holger</given-names></name></principal-award-recipient></award-group><funding-statement>The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.</funding-statement></funding-group><custom-meta-group><custom-meta specific-use="meta-only"><meta-name>Author impact statement</meta-name><meta-value>The characteristic hexagonal firing pattern of grid cells emerges as the most parsimonious solution to a trajectory code by cell sequences.</meta-value></custom-meta><custom-meta specific-use="meta-only"><meta-name>publishing-route</meta-name><meta-value>prc</meta-value></custom-meta></custom-meta-group></article-meta></front><body><sec id="s1" sec-type="intro"><title>Introduction</title><sec id="s1-1"><title>What is the nature of the problem being solved by grid cells?</title><p>Grid cells in the medial entorhinal cortex (MEC) (<xref ref-type="bibr" rid="bib34">Fyhn et al., 2004</xref>; <xref ref-type="bibr" rid="bib45">Hafting et al., 2005</xref>) and adjacent regions such as the pre- and parasubiculum (<xref ref-type="bibr" rid="bib7">Boccara et al., 2010</xref>) are hypothesized to supply a ‘spatial metric’ for cognitive map-based navigation and path integration (<xref ref-type="bibr" rid="bib33">Fuhs and Touretzky, 2006</xref>; <xref ref-type="bibr" rid="bib64">McNaughton et al., 2006</xref>; <xref ref-type="bibr" rid="bib66">Moser et al., 2017</xref>), episodic memory (<xref ref-type="bibr" rid="bib47">Hasselmo, 2009</xref>; <xref ref-type="bibr" rid="bib29">Eichenbaum and Cohen, 2014</xref>; <xref ref-type="bibr" rid="bib77">Schiller et al., 2015</xref>), and navigating abstract feature spaces (<xref ref-type="bibr" rid="bib19">Constantinescu et al., 2016</xref>; <xref ref-type="bibr" rid="bib48">Hawkins et al., 2018</xref>; <xref ref-type="bibr" rid="bib74">Rueckemann et al., 2021</xref>). Grid cells recorded in freely foraging animals fire at multiple locations in space so that the firing fields form a hexagonal lattice (<xref ref-type="fig" rid="fig1">Figure 1A–D</xref>). Since their first discovery, the remarkable spatial periodicity in grid cell firing has been a topic of intense research (<xref ref-type="bibr" rid="bib66">Moser et al., 2017</xref>). This research was fueled in part by awe of the beautiful symmetry and complexity displayed in the spatial firing pattern of a single cell. Moreover, research efforts were driven by the hope that understanding the underlying nature of grid cell firing would greatly advance our understanding of how the mammalian brain performs navigational computations and higher cognitive functions such as episodic memory.</p><fig-group><fig id="fig1" position="float"><label>Figure 1.</label><caption><title>Spatially periodic firing of grid cells in 2-D space emerges from a neural sequence code of trajectories.</title><p>(<bold>A</bold>) Schematic drawing of a 1 × 1 m<sup>2</sup> environment surrounded by walls in the presence of a single visual cue card. (<bold>B</bold>) 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 mouse (<xref ref-type="bibr" rid="bib24">Dannenberg et al., 2020</xref>; <xref ref-type="bibr" rid="bib23">Dannenberg et al., 2019</xref>). 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. (<bold>C</bold>) Firing rate map of the spiking data shown in (A). Data are visualized as 3 × 3 cm<sup>2</sup> 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. (<bold>D</bold>) Spatial autocorrelogram of the data shown in (B). Red and blue colors indicate high and low correlation values. (<bold>E</bold>) 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 <italic>elements</italic>. The red circle represents the currently active element. The next active element in the sequence code is <italic>uniquely</italic> 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. (<bold>F</bold>) Elements’ 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 elements. (<bold>G</bold>) If <bold>an element’s</bold> 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, <italic>east</italic> → <italic>west</italic> cannot be distinguished from <italic>east</italic> → <italic>northwest</italic> and <italic>east</italic> → <italic>southwest</italic> because the three directions are represented by the same sequence of elements, <italic>yellow</italic> → <italic>red</italic>. However, the opposite direction, <italic>west</italic> → <italic>east</italic>, is represented by three different cell sequences allowing for a finer angular resolution in the representation of traveling direction. (<bold>H</bold>) Example of possible pairs of elements 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° (<bold>E, F</bold>). Possible representations of velocity vectors by sequences of two elements are shown for when the currently active element is #1 or #2. Numbers within circles identify distinct elements. (<bold>I</bold>) Example of a complete sequence code that uniquely represents all directions at 60° resolution as a function of the currently active element and the traveling direction. (<bold>J</bold>) Sequential activation of seven distinct elements can code for infinitely long trajectories along all three major axes of a hexagonal lattice. (<bold>K</bold>) The same sequential activation map as in (I) and (J) but plotted in 2-D space. Note that the firing fields of individual elements form grid maps in 2-D space, as highlighted in gray for element #1.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig1-v1.tif"/></fig><fig id="fig1s1" position="float" specific-use="child-fig"><label>Figure 1—figure supplement 1.</label><caption><title>Trajectory coding by cell sequences requires a dense packing of convex firing fields.</title><p>(<bold>A–E</bold>) Examples of the five types of lattices in the plane. (<bold>A</bold>) Oblique. (<bold>B</bold>) Square. (<bold>C</bold>) Hexagonal. (<bold>D</bold>) Rectangular. (<bold>E</bold>) Centered rectangular. (<bold>F, G</bold>) Examples of a convex and non-convex geometric object such as a possible spatial firing field of a neuron. (<bold>H</bold>) A non-convex spatial firing field that results in an ambiguous cell sequence code for trajectories in space. In this example, two spatial firing fields of two cells are shown, indicated by green and orange colors. The three crosses mark three locations in space. The sequence <italic>green</italic> → <italic>orange</italic> can represent two opposite trajectories, namely <italic>b</italic> → <italic>a</italic> and <italic>b</italic> → <italic>c</italic>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig1-figsupp1-v1.tif"/></fig></fig-group><p>However, no theory exists to date that explains the emergence of grid cell firing patterns from basic principles, unifying the many seemingly unconnected experimental observations on periodic firing patterns and their distortions in a single framework (<xref ref-type="bibr" rid="bib52">Jeffery, 2024</xref>; <xref ref-type="bibr" rid="bib41">Ginosar et al., 2023</xref>). Consequently, currently existing mechanistic models of grid cell firing fall short of explaining the basic question of <italic>why</italic> grid cells exist in the first place. Most previous studies on grid cell function follow a traditional approach based on the well-founded assertion in biology that structure determines function. This approach has resulted in a vast literature describing properties of grid cells in multiple species, how these properties depend on internal neural circuit dynamics and external cues, and how grid cell dynamics can be employed for computational or behavioral functions such as a population code for spatial location (<xref ref-type="bibr" rid="bib81">Sreenivasan and Fiete, 2011</xref>; <xref ref-type="bibr" rid="bib62">Mathis et al., 2012</xref>; <xref ref-type="bibr" rid="bib93">Wei et al., 2015</xref>), memory-guided navigation (<xref ref-type="bibr" rid="bib33">Fuhs and Touretzky, 2006</xref>; <xref ref-type="bibr" rid="bib64">McNaughton et al., 2006</xref>; <xref ref-type="bibr" rid="bib66">Moser et al., 2017</xref>) and the planning of direct trajectories to goals (<xref ref-type="bibr" rid="bib13">Bush et al., 2015</xref>; <xref ref-type="bibr" rid="bib31">Erdem and Hasselmo, 2014</xref>). However, this traditional approach has been proven notoriously difficult in identifying a teleological cause for the existence of grid cells in mammalian brains, that is, an explanation of the specific functional purpose they serve. Computational models of grid cells such as oscillatory interference models (<xref ref-type="bibr" rid="bib67">O’Keefe and Burgess, 2005</xref>; <xref ref-type="bibr" rid="bib10">Burgess et al., 2007</xref>; <xref ref-type="bibr" rid="bib42">Giocomo et al., 2007</xref>; <xref ref-type="bibr" rid="bib46">Hasselmo et al., 2007</xref>; <xref ref-type="bibr" rid="bib11">Burgess, 2008</xref>) and continuous attractor models (<xref ref-type="bibr" rid="bib33">Fuhs and Touretzky, 2006</xref>; <xref ref-type="bibr" rid="bib9">Burak and Fiete, 2009</xref>; <xref ref-type="bibr" rid="bib79">Shipston-Sharman et al., 2016</xref>) provide mechanistic explanations of how the spatial periodicity in firing can emerge from the structure of microcircuits within the superficial layers of the MEC (<xref ref-type="bibr" rid="bib102">Zilli, 2012</xref>; <xref ref-type="bibr" rid="bib21">Couey et al., 2013</xref>; <xref ref-type="bibr" rid="bib104">Zutshi et al., 2018</xref>). However, these mechanistic models, too, cannot identify the teleological cause for the emergence of spatial periodicity in grid cell firing. Consequently, functions of grid cells are often explained in generic terms and statements, such as that grid cells supply a path integration-based ‘metric for space’ or provide a ‘coordinate system’ for spatial mapping. The influential hypothesis that grid cells provide a universal map for space is challenged by experimental data suggesting a yet-to-be-identified local computational function of grid cells (<xref ref-type="bibr" rid="bib52">Jeffery, 2024</xref>; <xref ref-type="bibr" rid="bib41">Ginosar et al., 2023</xref>). Here, we identify this local computational function as a trajectory code.</p><p>The approach taken in this study in developing a theoretical framework for grid cells differs from mechanistic modeling approaches and from traditional approaches in the grid cell literature that aim to assign functions to grid cells based on their properties. Instead, we turn the question on its head and ask the reverse question: What is an important function performed by the mammalian brain that could either not be performed at all or would be substantially more costly or inefficient to perform in the absence of grid cells? This approach follows the logic proposed by David Marr: “To phrase the matter in another way, an algorithm is likely to be understood more readily by understanding the nature of the problem being solved than by examining the mechanism (and hardware) in which it is embodied” (<xref ref-type="bibr" rid="bib61">Marr, 2010</xref>, Chapter 1.2).</p><p>This study provides mathematical proof that, in Marr’s words, “the nature of the problem being solved” by grid cells is coding of trajectories in 2-D space using cell sequences. By doing so, we offer a specific answer to the question of why grid cell firing patterns are observed in the mammalian brain. Thus, we (1) provide a teleological cause for the existence of grid cells and (2) provide a unifying theoretical framework that spans a bridge between the literature on grid cells and the vast literature on neural sequences in the hippocampal formation.</p></sec></sec><sec id="s2" sec-type="results"><title>Results</title><sec id="s2-1"><title>Spatial periodicity in grid cell firing emerges from a cell sequence code of trajectories in 2-D space</title><p>To constrain our search for a function that requires grid cells or could not be performed efficiently without grid cells, we reasoned that this function shall rely on sequential activation of grid cell assemblies, in short grid cell sequences. This reasoning rests on well-established experimental data on neural activity in the hippocampal formation showing that cell sequences can provide a code for transitional structures of world states, generating an internal representation for memory-guided navigation (<xref ref-type="bibr" rid="bib60">Liu et al., 2023</xref>; <xref ref-type="bibr" rid="bib15">Buzsáki, 2010</xref>; <xref ref-type="bibr" rid="bib16">Buzsáki et al., 2022</xref>). Please note that the term ‘cell sequences’ refers either to sequences of single cells or the sequences of cell assemblies, which are often observed in animal experiments as sequential activity of individual cells due to limitations in the number of neurons that can be recorded simultaneously. We further reasoned that, if a fundamental function of grid cells exists, such a function is very likely related to coding of trajectories. This reasoning rests on theoretical work demonstrating that theta sequences of grid cell populations can provide a traveling-direction signal (<xref ref-type="bibr" rid="bib103">Zutshi et al., 2017</xref>), and that temporally structured neural activity in the hippocampal formation may be necessary to temporally bind neural representations of contiguous events (<xref ref-type="bibr" rid="bib74">Rueckemann et al., 2021</xref>). Moreover, data obtained from rodent experiments (<xref ref-type="bibr" rid="bib1">Allen et al., 2014</xref>; <xref ref-type="bibr" rid="bib39">Gil et al., 2018</xref>) and theoretical work (<xref ref-type="bibr" rid="bib80">Sorscher et al., 2023</xref>) suggest that grid cells serve path integration and memory-guided navigation. A code for spatial trajectories by cell sequences that is usable across different environments would be very useful to keep track of changes in location relative to a starting point, that is, path integration.</p><p>We therefore set out to provide mathematical proof that spatial periodicity in grid cell firing emerges from the assertion that cell sequences code for trajectories in 2-D space under the constraint that the number of neurons in the brain is finite.</p></sec><sec id="s2-2"><title>Mathematical proof</title><p>In the following, we prove that the firing fields of grid cells emerge from assuming a basic set of axioms defining how cell sequences code for trajectories in 2-D space. In particular, we prove that the grid fields must be arranged such that their centers are placed at the points of a hexagonal lattice. We will draw on geometry and combinatorics for this, enabling us to give a visual but nevertheless rigorous argument.</p><sec id="s2-2-1"><title>Definition 1.1: Spatial firing field</title><p>A spatial firing field of a neuron defines a specific region in space, where a neuron is active, that is, the neuron responds to a specific spatial location of an animal with an increased rate of action potential firing.</p></sec><sec id="s2-2-2"><title>Remark 1.2</title><p>Conversely, if the firing fields of multiple neurons overlap at one point in space, multiple neurons are active at the same time.</p></sec><sec id="s2-2-3"><title>Definition 1.3: Cell assembly</title><p>We refer to the co-activity of multiple neurons with overlapping firing fields as a functional <italic>cell assembly</italic>.</p></sec><sec id="s2-2-4"><title>Definition 1.4: Compound spatial firing field</title><p>A compound spatial firing field is the union of all firing fields of all cells that are part of a cell assembly.</p></sec><sec id="s2-2-5"><title>Definition 2.1: Isometry</title><p>An <italic>isometry</italic> is a bijective map of the plane <inline-formula><mml:math id="inf1"><mml:mi>f</mml:mi></mml:math></inline-formula> that preserves distance, that is, for any two points <italic>x</italic> and <italic>y</italic>,<disp-formula id="equ1"><mml:math id="m1"><mml:mrow><mml:mi>d</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>f</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>d</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p><p>We say that two geometric figures (i.e., shapes in the plane) are <italic>geometrically congruent</italic> if there is an isometry of the plane that sends one figure to the other. We will abbreviate this to <italic>congruent</italic> in what follows.</p><p>It is well known that two figures are congruent if one can be laid on top of the other so that they match perfectly. This can be done via rotation, translation, reflection, or a combination of these.</p></sec><sec id="s2-2-6"><title>Definition 3.1: Kissing number</title><p>Given a geometric figure, the kissing number is the largest number of non-overlapping figures congruent to the original geometric figure that can be arranged in the plane so that they all touch the original geometric figure.</p></sec><sec id="s2-2-7"><title>Remark 3.2</title><p>Kissing numbers are usually computed for spheres embedded in various Euclidean spaces, but here we restrict to the plane and allow convex (see Definition 5) geometric figures other than circles.</p></sec><sec id="s2-2-8"><title>Example 3.3</title><p>The kissing number of a circle in the plane is 6, which is achieved using a hexagonal packing of circles (<xref ref-type="bibr" rid="bib89">Thue, 1910</xref>; <xref ref-type="bibr" rid="bib32">Fejes, 1942</xref>).</p></sec><sec id="s2-2-9"><title>Definition 4.1: Lattice and lattice packing</title><p>A <italic>lattice</italic> in the plane is an infinite set of points such that adding or subtracting any one point to/from another in the lattice returns another point in the lattice, any two points of the lattice are separated by a minimum distance, and any point in the plane is within a maximum distance of a lattice point.</p><p>A <italic>lattice packing</italic> is a packing of the plane by congruent geometric objects, such that the centers of the objects are located at the points of a lattice.</p></sec><sec id="s2-2-10"><title>Example 4.2</title><p>The points in the plane with integer coordinates form a lattice.</p></sec><sec id="s2-2-11"><title>Example 4.3</title><p>The tiling of the plane by equilateral triangles, squares, or hexagons is a lattice packing. So is the hexagonal circle packing, in which every circle is surrounded by six other circles touching it.</p></sec><sec id="s2-2-12"><title>Fact 4.4</title><p>A lattice is invariant under isometries that take one point of the lattice to another point of the lattice.</p></sec><sec id="s2-2-13"><title>Fact 4.5</title><p>There are five types of a lattice in the plane (<xref ref-type="bibr" rid="bib54">Kittel, 1966</xref>, Chapter 1) (<xref ref-type="fig" rid="fig1s1">Figure 1—figure supplement 1A–E</xref>).</p><list list-type="order" id="list1"><list-item><p>Oblique</p></list-item><list-item><p>Square</p></list-item><list-item><p>Hexagonal</p></list-item><list-item><p>Rectangular</p></list-item><list-item><p>Centered rectangular</p></list-item></list></sec><sec id="s2-2-14"><title>Definition 5: Convexity</title><p>A geometric object in the plane is <italic>convex</italic> if for any line segment whose endpoints lie on the object, the entirety of the line segment also lies on the object (<xref ref-type="fig" rid="fig1s1">Figure 1—figure supplement 1E and F</xref>).</p></sec><sec id="s2-2-15"><title>Definition 6: Trajectory</title><p>A <italic>trajectory</italic> is a path taken in space.</p></sec><sec id="s2-2-16"><title>Remark 6.1</title><p>Note that a code for trajectories is independent of the animal’s spatial location, consistent with the definition of path integration. This implies that, if the number of neurons is finite (Axiom #4) and the space is large, sequences must eventually repeat in different location, resulting in neural sequences coding for the same trajectories at different locations.</p></sec><sec id="s2-2-17"><title>Definition 7.1: Cell sequence</title><p>A <italic>cell sequence</italic> refers to continuous neural activity consisting of sequentially active cells or cell assemblies.</p></sec><sec id="s2-2-18"><title>Definition 7.2: Elements within a cell sequence</title><p>In the context of a cell sequence, an ‘element’ within a sequence refers either to a single cell or a cell assembly. A sequence of cell assemblies refers to the sequential activity of cell assemblies such that the cellular compositions of two sequentially active cell assemblies do not overlap. Conversely, the firing fields of all cellular components of the first cell assembly do not overlap with the firing fields of all cellular components of the second cell assembly.</p></sec><sec id="s2-2-19"><title>Remark 7.3</title><p>Cell assemblies can perform pattern completion and are thereby resistant to noise so that a cell assembly would be activated robustly even if a single cell of this assembly failed to be activated. Moreover, cell assemblies allow for conjunctive coding by individual cells.</p></sec><sec id="s2-2-20"><title>Definition 8: Sequence coding of trajectories</title><p><italic>Sequence coding of trajectories</italic> is given if the identity of the next active element in a sequence is uniquely determined by the currently active element and the velocity vector associated with the current trajectory (<xref ref-type="fig" rid="fig1">Figure 1E–J</xref>).</p></sec><sec id="s2-2-21"><title>Axioms (<xref ref-type="table" rid="table1">Table 1</xref>)</title><table-wrap id="table1" position="float"><label>Table 1.</label><caption><title>Axioms from which grid cell firing emerges as the most parsimonious solution to provide a code for trajectories in 2-D space.</title></caption><table frame="hsides" rules="groups"><thead><tr><th align="left" valign="bottom"/><th align="left" valign="bottom">Axiom</th><th align="left" valign="bottom">Remark/example</th></tr></thead><tbody><tr><td align="left" valign="bottom"><bold>Axiom 1</bold></td><td align="left" valign="bottom">Cell sequences code for trajectories in 2-D space</td><td align="left" valign="bottom">This axiom states that the sequential activity of two cells, e.g., <italic>i</italic> → <italic>j</italic>, can unambiguously be interpreted by a downstream reader mechanism as a code for one and only one trajectory, e.g., moving from place A to place B</td></tr><tr><td align="left" valign="bottom"><bold>Axiom 2</bold></td><td align="left" valign="bottom">The reverse cell sequence codes for the reverse trajectory</td><td align="left" valign="bottom">If the cell sequence <italic>i</italic> → <italic>j</italic> codes for moving from place A to B, then the reverse cell sequence <italic>j</italic> → <italic>i</italic> codes for moving from place B to place A</td></tr><tr><td align="left" valign="bottom"><bold>Axiom 3</bold></td><td align="left" valign="bottom">Each cell’s firing field is surrounded symmetrically by other cell’s firing fields so that the angular resolution is constant and maximal across all directions</td><td align="left" valign="bottom">This axiom means that a sequence code should represent each direction equally with no ‘gaps’ in the representation (<xref ref-type="fig" rid="fig3">Figure 3D and E</xref>)</td></tr><tr><td align="left" valign="bottom"><bold>Axiom 4</bold></td><td align="left" valign="bottom">The number of cells is finite</td><td align="left" valign="bottom">Grid cells are densest in layer II of the medial entorhinal cortex (<xref ref-type="bibr" rid="bib75">Sargolini et al., 2006</xref>), and this layer has been estimated to contain 24,000 and 58,000 neurons in mice and rats, respectively (<xref ref-type="bibr" rid="bib37">Gatome et al., 2010</xref>)</td></tr></tbody></table></table-wrap><p>Our goal is to provide a mathematical proof that spatial periodicity in grid cell firing emerges as a parsimonious solution to provide a code for trajectories in 2-D space by cell sequences.</p><p>In the following sections, we demonstrate that if we assume axioms 1–4, it must be the case that the intersecton of all firing fields of trajectory-coding cells or all compound firing fields of cell assemblies must be congruent (the same shape), and the centers of the firing fields must be arranged in a hexagonal lattice. For the sake of simplicity in writing, we refer to cells or cell assemblies as elements.</p><p>To illustrate this, note that by Axiom 3, a particular firing field U is surrounded by the maximal number of other firing fields, each of which must be congruent to each other. This implies that all firing fields around U are congruent. Pick a firing field V adjacent to U. By the same argument, it must be the case that all firing fields around V are congruent. Since U is adjacent to V, it is congruent to the firing fields around V. Some of these are adjacent to U as well, so U is congruent to the firing fields around both V and U, as well as to V. By continuing this argument across the whole plane, we see that all firing fields must be congruent.</p><p>Since each firing field U must be surrounded by the maximal number of firing fields, the kissing number of the arrangement must be maximal. Further, by the symmetry requirement (Axiom 3), this must be achieved by a hexagonal lattice packing with a kissing number of 6 (<xref ref-type="fig" rid="fig1">Figure 1F and G</xref>). Any square lattice packing either has a kissing number of 4 or lacks symmetry between the ‘corner’ firing fields and ‘side’ firing fields 25A1.</p><p>We now use Axiom 1 to demonstrate that the firing fields of trajectory-coding elements must be convex. Examining <xref ref-type="fig" rid="fig1s1">Figure 1—figure supplement 1H</xref>, we see that if a firing field is non-convex, a single sequence will code for more than one trajectory.</p><p>At this point, we know that (i) all firing fields are congruent to each other, (ii) they are arranged in a hexagonal lattice, and (iii) each firing field is convex.</p></sec><sec id="s2-2-22"><title>Definition 9: Row and diagonal</title><p>We refer to a straight sequence of firing fields along one of the major axes of the hexagonal lattice as a row and along the remaining two axes as diagonals (<xref ref-type="fig" rid="fig1">Figure 1K</xref>).</p><p>As we will prove below, the possibilities of arrangements of firing fields of all distinct elements are restricted by axioms 1–3. We further realize that the elements appearing in one row of the lattice must repeat if the number of elements is finite (Axiom 4).</p><p>But as soon as one element repeats, the <italic>sequence</italic> of elements must also repeat. For example, assume we start in a firing field of one trajectory-coding element and travel in some direction. If, for example, elements 1, 3, and 4 fire in that order and the animal continues traveling in the same direction, elements 1, 3, and 4 will eventually fire again in that order.</p><p>Generally speaking, starting in a firing field of element <inline-formula><mml:math id="inf2"><mml:mi>i</mml:mi></mml:math></inline-formula> and going along any set of firing fields, some element must eventually become active again since the total number of elements is finite by Axiom 4. Once there is a repeat of one element’s firing field, the whole sequence of firing fields of all elements must repeat by Axiom 1. More specifically, if we had a sequence <inline-formula><mml:math id="inf3"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi><mml:mo>,</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:math></inline-formula> of elements, then 1, 2, and <inline-formula><mml:math id="inf4"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:math></inline-formula> both would code for traveling in the same direction from element 1, contradicting Axiom 1.</p><p>The repeating sequence of locally active elements must at least have length 3 as if we had a repeat of length 2, we would have a sequence <inline-formula><mml:math id="inf5"><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:math></inline-formula> along one trajectory, where <inline-formula><mml:math id="inf6"><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:math></inline-formula> would represent two distinct trajectories, contradicting Axiom 1. If the same element fired twice in a row, say we had a sequence <italic>i</italic>, 1, 1, <italic>j</italic>, then 1, 1 and 1, <italic>j</italic> would both code for the same trajectory, contradicting Axiom 1 again 25A1.</p><p>It follows that the arrangement in one row determines the possibilities of arrangements in the remaining rows.</p><p>More explicitly, assuming axioms 1 and 4, the firing fields of trajectory-coding elements must be spatially periodic, in the sense that starting at any point and continuing in a single direction, the initial sequence of locally active elements must eventually repeat with a repeat length of at least 3 (<xref ref-type="fig" rid="fig2">Figure 2</xref>).</p><fig id="fig2" position="float"><label>Figure 2.</label><caption><title>Repeating sequences of elements coding for trajectories result in lattice packing of firing fields.</title><p>Left panels show firing fields of multiple distinct elements 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 element visualizing the type of lattice formed by the firing fields of one element. (<bold>A</bold>) An example of the minimal number of seven elements and resulting sequences with repeat length 7 along the three grid axes. The resulting firing fields of individual elements (referred to as a ‘grid map’ in animal experiments) are arranged on a hexagonal lattice rotated by 10.9° against a vertical axis. (<bold>B</bold>) 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. (<bold>C</bold>) An example of nine cells and sequences with repeat length 3 along all three grid axes, resulting in hexagonal lattice packing of individual elements’ firing fields.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig2-v1.tif"/></fig></sec><sec id="s2-2-23"><title>Remark 11.3</title><p>This does not require symmetry in the sense that traveling in two different directions from element <italic>i</italic> may give repeating sequences of two different lengths, as seen in <xref ref-type="fig" rid="fig2">Figure 2B</xref>, where the repeats have lengths 4 and 8, depending on the angle of travel from a given element.</p><p>The next goal is to determine how our axioms restrict the arrangement of firing fields in a single computational element of trajectory-coding elements. Since these firing fields are arranged in a hexagonal lattice, we determine the possible ways to label the firing fields in this lattice (drawn as circles for convenience), as visually represented in the figures.</p><p>Many of the proofs in the rest of this section use the method of proof by cases: we describe all possible ways to label the firing fields, and then explain why some of those cases contradict our hypotheses. A key observation is that the sequence that appears in one row of the lattice restricts the possibilities for which sequences can appear in the adjacent rows.</p><p>First, we will demonstrate that every sequence of elements along one of the three major axes of the hexagonal lattice (rows and diagonals) must be either a translation of an existent sequence in a parallel axis or consist of a disjoint set of elements.</p><p>To prove this statement, suppose that row A consists of elements <inline-formula><mml:math id="inf7"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:math></inline-formula> repeating in this order. Then any row that contains any element from <inline-formula><mml:math id="inf8"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:math></inline-formula> must contain the full repeat <inline-formula><mml:math id="inf9"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:math></inline-formula> by axiom 1. So any row containing any element from <inline-formula><mml:math id="inf10"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:math></inline-formula> is a translation of row A, and any element that does not contain them is disjoint from row A.</p></sec><sec id="s2-2-24"><title>Remark 12.3</title><p>We count the distance of a translation of a row A by starting at an element <inline-formula><mml:math id="inf11"><mml:mi>a</mml:mi></mml:math></inline-formula>, passing to the element diagonally down and to the right of element <inline-formula><mml:math id="inf12"><mml:mi>a</mml:mi></mml:math></inline-formula>, and counting spaces moved right from here. Translations must be by <inline-formula><mml:math id="inf13"><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:math></inline-formula> spaces, where row A contains <inline-formula><mml:math id="inf14"><mml:mi>k</mml:mi></mml:math></inline-formula> elements.</p><p>We note that if a row or diagonal of the hexagonal lattice is a translation of a neighboring row or diagonal, the translation must be by at least 2 and at most <inline-formula><mml:math id="inf15"><mml:mi>n</mml:mi><mml:mo>−</mml:mo><mml:mn>3</mml:mn></mml:math></inline-formula>, where <inline-formula><mml:math id="inf16"><mml:mi>n</mml:mi></mml:math></inline-formula> is the repeat length. If the translation is by 0, we have one element firing adjacent to itself, which contradicts axiom 1. If the translation is by 1, say element <italic>i</italic> has elements <italic>j</italic>, <italic>i</italic> below and immediately to the right (south-east) of it, then <italic>j, i</italic> is now coding for two distinct trajectories, namely north-west and east. This contradicts Axiom 1. If the translation is by <inline-formula><mml:math id="inf17"><mml:mi>n</mml:mi><mml:mo>−</mml:mo><mml:mn>2</mml:mn></mml:math></inline-formula>, or <inline-formula><mml:math id="inf18"><mml:mi>n</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:math></inline-formula>, these are left-right reflections of translations by 1 or 0, respectively, and have the same issues.</p><p>Further, it must be true that sequence repeats in parallel rows or diagonals must be of the same length.</p><p>To illustrate this, assume two consecutive rows A and B have sequence repeats of different lengths, say row A consists of <inline-formula><mml:math id="inf19"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:math></inline-formula> and row B consists of <inline-formula><mml:math id="inf20"><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mi>s</mml:mi></mml:math></inline-formula>, where <inline-formula><mml:math id="inf21"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>k</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>s</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula>. Then, the element sequence <inline-formula><mml:math id="inf22"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:math></inline-formula> will appear in one repeat and the element sequence <inline-formula><mml:math id="inf23"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mi>t</mml:mi></mml:math></inline-formula> will appear in the next, where <inline-formula><mml:math id="inf24"><mml:mi>t</mml:mi></mml:math></inline-formula> is not equal to 1. This contradicts Axiom 1 (<xref ref-type="fig" rid="fig3">Figure 3</xref>) 25A1.</p><fig-group><fig id="fig3" position="float"><label>Figure 3.</label><caption><title>The minimum number of distinct elements providing a sequence code of trajectories in 2-D space is 7, and there are exactly 2 possible arrangements of elements up to relabeling.</title><p>(<bold>A</bold>) 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 element can be found for this position that would not violate the sequence code. Red numbers indicate that activity of this element at the current position would violate sequence coding of trajectories due to ambiguity. Blue background color marks the sequential activity of two elements 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. (<bold>B</bold>) 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 translations result in an arrangement of elements (up to relabeling of elements) 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 element fall on the vertices of equilateral triangles, i.e., they form a hexagonal grid. (<bold>C</bold>) Both possible arrangements of firing fields imply that grid patterns of other grid elements have the same spacing and rotation, and only differ in spatial phase (compare grid patterns of element #1 and element #6). The smallest angle between one grid axis and the boundary of a rectangular enclosure is 10.9° if one row of sequences is aligned with one of the borders of the enclosure.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig3-v1.tif"/></fig><fig id="fig3s1" position="float" specific-use="child-fig"><label>Figure 3—figure supplement 1.</label><caption><title>Quantification of grid field spacing and grid field size in grid cells obtained from mice.</title><p>We analyzed a total of 27 grid cells from a previously published study (<xref ref-type="bibr" rid="bib43">Gleeson et al., 2017</xref>) to quantify the ratio between grid field spacing and grid field size. The experimental data on grid cells were obtained from mice freely foraging in a 1 × 1 m<sup>2</sup> square environment with walls and a visual cue card during baseline recording sessions. The model-predicted value of the ratio of grid field spacing to a diameter-like metric of field size is √7 ≈ 2.65. Note that this reflects the ideal ratio assuming no noise in experimental measurements, no transient drifts of grid maps, no path integration error, no conjunctive coding or any other factors that could result in out-of-field firing of recorded neurons. The grid field size measured from firing rate maps of experimental data is, therefore, expected to be larger than the model-predicted grid field size, resulting in smaller ratios of grid field spacing/field size. (<bold>A</bold>) Successful identification of grid fields for quantification of grid field size is a function of the applied filter threshold (see ‘Methods’). The algorithm performed best (measured as the percentage of cells where grid fields could be detected) with a filter threshold of 31% of the peak firing rate (vertical green line). (<bold>B</bold>) Histogram of the ratios measured in n = 25 grid cells out of 27 grid cells, obtained with applying the 31% filter threshold. As expected, the model-predicted value is larger but falls within the distribution of experimental data with mean = 2.44 and standard deviation = 0.23. The red line shows a normal distribution with the experimentally observed mean and standard deviation. (<bold>C</bold>) Performance of the grid field detection algorithm illustrated for one example neuron (cell #16). (<bold>C.1</bold>) The spatial autocorrelogram of the firing rate map of cell #16. (<bold>C.2</bold>) Grid fields detected by the field detection algorithm with the filter threshold set to 31% of the peak firing rate. Colors identify individual grid fields. The measured ratio (grid field spacing/field size) of this cell was 2.48. (<bold>C.3</bold>) Detected grid fields merged with spatial autocorrelogram.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig3-figsupp1-v1.tif"/></fig><fig id="fig3s2" position="float" specific-use="child-fig"><label>Figure 3—figure supplement 2.</label><caption><title>Grid field detection with filter threshold set to 31% of the peak firing rate.</title><p>Data show the grid field detection performance for all n = 27 grid cells recorded under baseline conditions from <xref ref-type="bibr" rid="bib24">Dannenberg et al., 2020</xref>. Grid field detection failed for cells #3 and #29. Cells #7 and #9 were not classified as grid cells during baseline recording sessions and, therefore, excluded for this analysis.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig3-figsupp2-v1.tif"/></fig></fig-group><p>A final useful fact is that the length of the sequence repeat in any row or diagonal must divide the number of elements. As a result, if the number <inline-formula><mml:math id="inf25"><mml:mi>n</mml:mi></mml:math></inline-formula> of elements is prime, the length of the sequence repeat in any row or diagonal must be of length <inline-formula><mml:math id="inf26"><mml:mi>n</mml:mi></mml:math></inline-formula>.</p><p>To prove this last fact, we will work by supposing the repeat length is less than <inline-formula><mml:math id="inf27"><mml:mi>n</mml:mi></mml:math></inline-formula> in some dimension and showing that the repeat length must then divide <inline-formula><mml:math id="inf28"><mml:mi>n</mml:mi></mml:math></inline-formula> . Without loss of generality, assume it is the horizontal (west-east) direction, so that one row consists of <inline-formula><mml:math id="inf29"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:math></inline-formula> repeating, for some <inline-formula><mml:math id="inf30"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>i</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula>. Then, every row must consist of elements <inline-formula><mml:math id="inf31"><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:math></inline-formula> or be disjoint from the elements in other rows. Since every element will appear in exactly 1 of the distinct rows, the total number of elements must divide evenly into sets of i, one for each distinct row. So, the length of the repeat in each row must divide <inline-formula><mml:math id="inf32"><mml:mi>n</mml:mi></mml:math></inline-formula>.</p><p>If <inline-formula><mml:math id="inf33"><mml:mi>n</mml:mi></mml:math></inline-formula> is prime, every row has repeat length dividing <inline-formula><mml:math id="inf34"><mml:mi>n</mml:mi></mml:math></inline-formula>. Since no row can have a repeat of length 1 by the work above, every row has repeat length <inline-formula><mml:math id="inf35"><mml:mi>n</mml:mi></mml:math></inline-formula>.</p><p>Next, we prove that the minimum number of trajectory-coding elements in 2-D space is 7 and describe the possible arrangements of 7 elements’ firing fields in 2-D space that establish a sequence code of trajectories.</p><p>Given the requirement that each firing field is surrounded by 6 firing fields of distinct elements, the minimum number of elements providing a sequence code of trajectories in 2-D space is 7.</p><p>By our work above, the repeat length must be 7 in all directions. We may assume the elements are labeled such that row A consists of elements 1, 2, ..., 7 (<xref ref-type="fig" rid="fig3">Figure 3B</xref>). Hence, every row is a translation of row A. Since the translation must be at least two and at most four, we have a total of three options for how much row B is translated from row A. In <xref ref-type="fig" rid="fig3">Figure 3B</xref>, we show that translation by three yields a contradiction, so translation by two and four are the only possible options. Once rows A and B are determined, every other row is uniquely determined by Axiom 1 25A1.</p><p>There are thus exactly two possible arrangements of seven elements so that they form a sequence code for trajectories in 2-D space, up to relabeling of cells. Intriguingly, both possible arrangements of seven elements result in a hexagonal arrangement of firing fields of all distinct elements, and these arrangements are rotated against the wall of a rectangular enclosure by 10.9° (<xref ref-type="fig" rid="fig3">Figure 3B</xref>).</p><p>While the two solutions to a sequence code of trajectories with seven elements both result in a hexagonal lattice packing of firing fields, solutions with eight or more elements can result in other types of lattice packing (<xref ref-type="fig" rid="fig1s1">Figure 1—figure supplement 1</xref>), such as the oblique lattice or centered rectangular lattice that have also been observed in single element recordings of freely behaving animals (<xref ref-type="bibr" rid="bib84">Stensola et al., 2015</xref>). Code to compute and visualize ‘grid maps’ of trajectory-coding sequence arrangements with up to 14 elements has been made publicly available to help the scientific community test some of our predictions against future datasets (<xref ref-type="bibr" rid="bib43">Gleeson et al., 2017</xref>). Because (1) each row must either be a translation of the previous row or entirely disjoint from it, (2) the length of the repeat in each row is the same and divides the total number of elements, and (3) if one row is translated from the one above, the translation must be by at least 2 and at most n-3 (where n is the length of the repeating sequence in the previous row), we can classify all possible arrangements of trajectory coding sequences of elements for any particular number of elements. In <xref ref-type="table" rid="table2">Table 2</xref>, we list all possible ways to construct a sequence code composed of 7–12 trajectory-coding elements up to translation and rotation. Note that increasing the number of elements in a sequence code does <italic>not</italic> increase the spatial or angular resolution in the representation of a trajectory. Therefore, a code that uses more than the minimal number of seven elements has no functional benefit (see ‘Discussion’).</p><table-wrap id="table2" position="float"><label>Table 2.</label><caption><title>List of possible grid maps and properties of these grid maps given the total number of elements participating in a trajectory-coding sequence in a rectangular environment.</title><p>For each individual element’s grid map that has a non-zero angle to a border, a reflection or 90° rotation and reflection up to relabeling of the elements exist, and these additional possibilities are not included in this list.</p></caption><table frame="hsides" rules="groups"><thead><tr><th align="left" valign="bottom"># cells</th><th align="left" valign="bottom">Repeat lengths<xref ref-type="table-fn" rid="table2fn1">*</xref></th><th align="left" valign="bottom">Lattice type</th><th align="left" valign="bottom">Smallest angle to a border of a rectangular environment<xref ref-type="table-fn" rid="table2fn2">†</xref></th></tr></thead><tbody><tr><td align="left" valign="bottom">7</td><td align="left" valign="bottom">7, 7, 7</td><td align="left" valign="bottom">Hexagonal</td><td align="left" valign="bottom">10.9°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/></tr><tr><td align="left" valign="bottom"><bold>8</bold></td><td align="left" valign="bottom">4, 8, 8</td><td align="left" valign="bottom">Centered rectangular</td><td align="left" valign="bottom">0°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">4, 8, 8</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">10.9°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/></tr><tr><td align="left" valign="bottom"><bold>9</bold></td><td align="left" valign="bottom">3, 3, 3</td><td align="left" valign="bottom">Hexagonal</td><td align="left" valign="bottom">0°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">3, 9, 9</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">10.9°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">3, 9, 9</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">13.9°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">3, 9, 9</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">16.1°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/></tr><tr><td align="left" valign="bottom"><bold>10</bold></td><td align="left" valign="bottom">5, 10, 10</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">0°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">5, 10, 10</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">10.9°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">5, 10, 10</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">16.1°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/></tr><tr><td align="left" valign="bottom"><bold>11</bold></td><td align="left" valign="bottom">11, 11, 11</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">6.6°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">11, 11, 11</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">10.9°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">11, 11, 11</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">16.1°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/><td align="left" valign="bottom"/></tr><tr><td align="left" valign="bottom"><bold>12</bold></td><td align="left" valign="bottom">6, 6, 6</td><td align="left" valign="bottom">Hexagonal</td><td align="left" valign="bottom">0°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">3, 12, 12</td><td align="left" valign="bottom">Rectangular</td><td align="left" valign="bottom">0°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">3, 12, 12</td><td align="left" valign="bottom">Rectangular</td><td align="left" valign="bottom">10.9°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">3, 4, 12</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">0°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">3, 4, 12</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">13.9°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">4, 6, 12</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">0°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">4, 6, 12</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">6.6°</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">4, 6, 12</td><td align="left" valign="bottom">Oblique</td><td align="left" valign="bottom">23.4°</td></tr></tbody></table><table-wrap-foot><fn id="table2fn1"><label>*</label><p>Repeat lengths across the three major axes of the hexagonal lattice structure of densely packed firing fields.</p></fn><fn id="table2fn2"><label>†</label><p>The smallest angle to a border of a rectangular environment assumes that one sequence of elements is arranged in parallel to one wall.</p></fn></table-wrap-foot></table-wrap><p>The grid pattern that we have found to emerge as the most parsimonious solution assuming axioms 1–4 (see ‘Results’), that is, the solution to a sequence code of trajectories using a minimal number of elements, mirrors experimental results on grid elements from animal experiments as we demonstrate below.</p></sec></sec><sec id="s2-3"><title>Sequence coding of trajectories predicts grid spacing and rotation of grid maps against a wall</title><p>The solution to sequence coding of trajectories predicts firing fields on the single-cell level that form a hexagonal lattice, as observed in grid cell data obtained from freely behaving rodents (<xref ref-type="bibr" rid="bib45">Hafting et al., 2005</xref>; <xref ref-type="bibr" rid="bib35">Fyhn et al., 2008</xref>) and crawling Egyptian fruit bats (<xref ref-type="bibr" rid="bib99">Yartsev et al., 2011</xref>). The triangular structure of grid cells’ firing maps (grid maps) has been characterized by three parameters, namely grid field size, grid spacing, and grid orientation (<xref ref-type="bibr" rid="bib45">Hafting et al., 2005</xref>). Because the sequence code of trajectories model of grid cell firing implies a dense packing of firing fields, the spacing between two adjacent grid fields must change linearly with a change in field size. It follows that the ratio between grid spacing and field size is fixed. When using the distance between the centers of two adjacent grid fields to measure grid spacing and a diameter-like metric to measure grid field size, we can compute the ratio of grid spacing to grid field size as <inline-formula><mml:math id="inf36"><mml:msqrt><mml:mn>7</mml:mn></mml:msqrt><mml:mo>≈</mml:mo><mml:mn>2.65</mml:mn></mml:math></inline-formula> (see ‘Methods’). We tested this prediction on a data set of n = 27 grid cells recorded in mice for a previously published study (<xref ref-type="bibr" rid="bib24">Dannenberg et al., 2020</xref>). This data has been openly released in another study (<xref ref-type="bibr" rid="bib86">Sutton et al., 2024</xref>). Quantifying field sizes requires identifying the borders of individual fields as a first step. Since the characteristic feature of a firing field is its firing rate, we chose to use a threshold for the firing rate to determine the field boundaries (see ‘Methods’). Setting the field detection threshold to 31% of the peak firing rate optimized detection of grid fields in most grid cells (n = 25 out of 27 cells) (<xref ref-type="fig" rid="fig3s1">Figure 3—figure supplement 1A</xref>). We found that the ratio of the field spacing to a diameter-like metric of the field size was 2.39 ± 0.25 (mean ± SD; n = 25) (<xref ref-type="fig" rid="fig3s1">Figure 3—figure supplement 1B</xref>), which is only slightly smaller than 2.65, the upper bound predicted by the model. Note that the ratio of grid field spacing to field size observed in experimental data is expected to be smaller than the model-predicted ratio because of the many factors that result in out-of-field firing of neurons recorded in experiments, such as transient drifts of grid maps, path integration errors, conjunctive coding properties, and noise in experimental measurements (<xref ref-type="fig" rid="fig3s1">Figure 3—figure supplements 1C and 2</xref>).</p><p>Another testable prediction of our model is that the grid map associated with the most parsimonious solution using seven elements is rotated by 10.9° against the nearest wall of a rectangular enclosure (<xref ref-type="table" rid="table2">Table 2</xref>). This angle is well within the range of experimentally observed values. Concretely, <xref ref-type="bibr" rid="bib84">Stensola et al., 2015</xref> reported a distribution of angles with a plateau between ~6 and ~12° (mean ± SD: 7.2 ± 3.5). Notably, the median of the angle to the nearest wall in a highly familiar as opposed to a novel environment was 9.8° (<xref ref-type="bibr" rid="bib84">Stensola et al., 2015</xref>). Under the premise that a sequence of firing fields aligns with one of the geometric boundaries of the environment, the sequence code model explains that the grid pattern typically assumes one of only four distinct orientation configurations relative to the environment (<xref ref-type="bibr" rid="bib84">Stensola et al., 2015</xref>; <xref ref-type="bibr" rid="bib85">Stensola and Moser, 2016</xref>). Concretely, the four orientation configurations arise when one row of grid fields aligns with one of the two sets of parallel walls in a rectangular environment, and each arrangement can result in two distinct orientations (<xref ref-type="fig" rid="fig3">Figure 3B</xref>). The sequence code model of grid cell firing thus provides a simple and intuitive answer to the otherwise puzzling observation that most grid field maps observed in freely behaving animals are rotated against the nearest wall of a rectangular enclosure.</p></sec><sec id="s2-4"><title>Sequence coding of trajectories predicts fragmentation of grid maps in 1-D space</title><p>Another experimental observation related to the spatial geometry of grid fields that can be explained by a sequence code of trajectories is the fragmentation of grid cell maps in a multicompartment environment (<xref ref-type="fig" rid="fig4">Figure 4A–C</xref>). The 2-D spatial periodicity in grid cell firing is replaced by one-dimensional (1-D) spatial periodicity if movement through space is restricted to 1-D trajectories along parallel alleys in a multicompartment maze (<xref ref-type="bibr" rid="bib26">Derdikman et al., 2009</xref>). A sequence code of trajectories predicts such a fragmentation of grid cell maps because parallel trajectories would result in the same sequential activation of cells, and neural coding on a 1-D tract is most efficient when sequences are aligned with the movement direction (<xref ref-type="fig" rid="fig4">Figure 4A</xref>). Likewise, grid cells have been shown to path integrate distances on a 1-D circular track (<xref ref-type="bibr" rid="bib50">Jacob et al., 2019</xref>), consistent with a sequence code of a trajectory along a 1-D circular track (<xref ref-type="fig" rid="fig4">Figure 4B</xref>). Notably, <xref ref-type="bibr" rid="bib50">Jacob et al., 2019</xref> report in their study that the field spacing of grid cells is increased in a 1-D circular track compared to a 2-D environment. The authors’ explanation is that field spacing is increased due to the lack of visual cues. However, an alternative explanation based on the sequence model of grid cell firing is that the animal’s trajectory on a linear track is represented by a sequence of cells (<xref ref-type="fig" rid="fig4">Figure 4C</xref>). Moreover, the sequence code of trajectories is consistent with an analysis of experimental data (<xref ref-type="bibr" rid="bib71">Pröll et al., 2018</xref>) showing that firing fields of grid cells on a 1-D linear track are compatible with a slice through a 2-D hexagonal pattern. Specifically, a slice through a 2-D hexagonal firing pattern explains linear-track data if translational shifts of the pattern are allowed at turning points without a requirement of rotating or scaling the grid. In the context of the sequence code of trajectories, a translational shift of the grid pattern of a single cell is equivalent to re-anchoring the sequence code after the animal has turned around facing the opposite direction on the linear track. Such a translational shift or re-anchoring of the sequence code is consistent with experimental data showing differential spatial coding by place cells in the hippocampus for inbound and outbound running directions on a linear track (<xref ref-type="bibr" rid="bib27">Dombeck et al., 2010</xref>).</p><fig id="fig4" position="float"><label>Figure 4.</label><caption><title>Transformation of a sequence code of trajectories from 2-D space to 1D space.</title><p>(<bold>A, B</bold>) A sequence of seven different elements can code for a trajectory in a 1-D compartmentalized ‘hairpin’ maze (<bold>A</bold>) or a 1-D circular track (<bold>B</bold>). 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, for example, the turning points in the ‘hairpin’ maze (<bold>A</bold>). (<bold>C</bold>) The sequence of active elements in a 1-D environment can be interpreted as a cross-section of the trajectory sequence code in a 2-D space. (<bold>D</bold>) Anchoring of firing fields to environmental borders predicts parametric rescaling of an individual element’s grid pattern when a familiar enclosure is deformed. Each color represents one grid element, each circle represents one firing field. For clarity, the complete set of firing fields of an individual element is shown only for one element (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 elements’ firing fields along the vertical or horizontal dimension. (<bold>E</bold>) Progressively faster advancement from the currently active element to the next active element 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 elements 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.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig4-v1.tif"/></fig><p>Furthermore, grid cells have been shown to code for traveled distance, elapsed time, or a combination of distance and time when animals run in place on a treadmill (<xref ref-type="bibr" rid="bib55">Kraus et al., 2015</xref>). The firing pattern of grid cells as time or distance cells is remarkably similar to the firing pattern of grid cells that emerges when animals navigate 1-D linear tracks after correcting for logarithmic expansion in grid field size over time. The fact that grid cells show repeating firing fields in other dimensions than physical space is consistent with a sequence code of trajectories in any type of dimension that has behavioral relevance for the animal. Experimental data by <xref ref-type="bibr" rid="bib55">Kraus et al., 2015</xref> demonstrate parallel coding of different dimensions by different grid cells, suggesting individual grid cell sequences can provide independent codes of trajectories through different dimensions, thereby enabling parallel processing of different cognitive functions.</p></sec><sec id="s2-5"><title>Sequence coding of trajectories defined relative to landmarks or boundaries predicts rescaling and restructuring of grid maps with changes in landmarks and boundaries</title><p>A sequence code of trajectories does not need to be rigid but instead can be malleable and rescaled in response to changes in the environment as long as the start and end points of the sequences are anchored to salient environmental landmarks. Thus, sequence coding of trajectories by grid cells provides an explanation of distortions of the grid pattern that are frequently observed in animal studies. Experiments in freely behaving rodents demonstrate that stretching or compression of enclosed environments results in stretching or compression of the grid map in the rescaled dimension. For instance, stretching or compressing the borders of a familiar open-field recording arena resulted in an increase or decrease of the distance between firing fields in the rescaled dimension of the deformed enclosure (<xref ref-type="bibr" rid="bib84">Stensola et al., 2015</xref>; <xref ref-type="bibr" rid="bib4">Barry et al., 2007</xref>). Such distortions have been challenging to interpret under the assumption that grid cells provide a ‘spatial metric’ or ‘coordinate system’ for navigation. However, if we assume a sequence code with start and end points of trajectories anchored to landmarks or environmental borders, distortions of the grid along the rescaled dimension would be expected. The sequence code of trajectories would remain the same if trajectories are defined relative to the borders of the environment (<xref ref-type="fig" rid="fig4">Figure 4D</xref>). Moreover, experimental data in rats show that grid maps that have been established in two adjacent compartments separated by a wall within the same larger environment merge once the wall is removed (<xref ref-type="bibr" rid="bib95">Wernle et al., 2018</xref>). Merging of the two grid maps appeared to happen instantly, resulting in local spatial periodicity and continuity between the two original maps (<xref ref-type="bibr" rid="bib95">Wernle et al., 2018</xref>), consistent with the sequence code of trajectories by grid cells.</p><p>Scaling of grids has also been observed in the form of an expansion, that is, increased grid spacing between individual firing fields and increased field sizes, in response to novelty of the environment (<xref ref-type="bibr" rid="bib5">Barry et al., 2012</xref>). Such scaling has also been reported in climbing rats foraging on a vertical wall (<xref ref-type="bibr" rid="bib17">Casali et al., 2019</xref>). Both the scaling of grids in response to scaling the borders of an environment and the expansion of grid fields in response to novelty are inconsistent with the hypothesis that grid cells provide a spatial metric for navigation or path integration. However, an increase in grid spacing in response to a novel environment can be explained by a sequence code of trajectories reflecting an initially broader spatial resolution. Specifically, the spatial resolution in the trajectory code is equivalent to the spacing between two adjacent spatial fields, and the spatial resolution is directly proportional to both the grid spacing and the field size. Initially, the overall layout of a novel space is likely more important than the fine-grained details. However, as the animal becomes more familiar with the environment, it is likely paying more attention to spatial details requiring a trajectory code with higher spatial resolution, resulting in a smaller grid map. While this hypothesis needs to be tested in future studies, experimental data show that changes in grid field size co-occur, though to a lesser extent, with changes in the size of place cell firing fields in response to novel environments (<xref ref-type="bibr" rid="bib5">Barry et al., 2012</xref>; <xref ref-type="bibr" rid="bib97">Wilson and McNaughton, 1993</xref>; <xref ref-type="bibr" rid="bib53">Karlsson and Frank, 2008</xref>). In summary, sequence coding of trajectories is consistent with the experimentally observed scaling of grids in response to deformations of the borders of the environment and with compression or expansion of firing fields and grid spacing in response to novelty.</p><p>Furthermore, a sequence code of trajectories in 2-D space is consistent with experimental data showing that grid fields move toward goal locations (<xref ref-type="bibr" rid="bib8">Boccara et al., 2019</xref>) or restructure their spatial firing maps to incorporate the location of a learned reward (<xref ref-type="bibr" rid="bib14">Butler et al., 2019</xref>). These data support the hypothesis that grid cells do not provide a simple metric of space. Instead, the spatial firing pattern of grid cells is malleable in response to relevant contextual features. Such local distortions of global grid patterns by salient locations have recently been compared to spacetime distortions by blackholes (<xref ref-type="bibr" rid="bib41">Ginosar et al., 2023</xref>). We propose that such warping of grid maps is caused by an increased probability that the currently active grid cell activates the next grid cell in the sequence of trajectory-coding cells, resulting in the center of firing fields moving closer together. A reduction of the spacing between spatial fields has been observed in hippocampal place fields, resulting in a backward shift with experience (<xref ref-type="bibr" rid="bib65">Mehta et al., 2000</xref>; <xref ref-type="bibr" rid="bib58">Lee et al., 2004</xref>; <xref ref-type="bibr" rid="bib73">Roth et al., 2012</xref>; <xref ref-type="bibr" rid="bib38">Geiller et al., 2017</xref>; <xref ref-type="bibr" rid="bib28">Dong et al., 2021</xref>) due to NMDA receptor-dependent plasticity (<xref ref-type="bibr" rid="bib30">Ekstrom et al., 2001</xref>). Under the premise that the grid map is anchored to the reward site, this would result in a progressive decrease in grid spacing toward the reward site, thereby causing local distortions in the grid map of a single grid cell (<xref ref-type="fig" rid="fig4">Figure 4E</xref>). A sequence code of trajectories by grid cells is thus consistent with malleable grid maps because the spacing between adjacent firing fields can change in response to local contextual features without compromising the sequence code. The same mechanism can explain shearing-induced asymmetry and multiple alignment solutions that have been shown in experimental data (<xref ref-type="bibr" rid="bib84">Stensola et al., 2015</xref>).</p></sec><sec id="s2-6"><title>Multiple grids provide nearly continuous resolution in the coding of trajectories and predict grid cell properties on the population level</title><p>In addition to properties of grid cell firing on the single cell level, the definition of sequence coding of trajectories implies an intriguing property of grid cells on the population level, namely that each grid cell’s collection of firing fields is geometrically congruent to any other grid cell’s collection of firing fields. This property mirrors experimental data from single-element recordings in rodents showing that adjacent firing field grid patterns of different anatomically close grid cells differ only in phase but have the same orientation and scale (<xref ref-type="bibr" rid="bib45">Hafting et al., 2005</xref>). Since the firing fields of distinct elements (i) do not overlap and (ii) discretize directions into six running directions only, we asked (i) how other running directions are represented and (ii) how partial transitions between firing fields can be accomplished. Consistent with experimental data (<xref ref-type="bibr" rid="bib45">Hafting et al., 2005</xref>), the sequence code of trajectories model of grid cell firing accounts for smooth transitions between firing fields and the representations of more than six running directions by using multiple grids of seven elements each, where each element has the same field size. However, the firing fields are shifted in phase. It follows from Axiom 3 that one needs to add three grids composed of the same number of elements as the original grid and shifted in phase such that their field centers fall exactly between the firing fields along one major axis of the original grid (<xref ref-type="fig" rid="fig5">Figure 5A and B</xref>). Consequently, the firing fields of all distinct elements of the compound grid must again fall on a hexagonal lattice.</p><fig-group><fig id="fig5" position="float"><label>Figure 5.</label><caption><title>Multiple grids provide nearly continuous resolution in the coding of trajectories.</title><p>(<bold>A</bold>) The circles with numbers show the <italic>centers</italic> of the grid fields from four grids, each composed of seven distinct elements (total of 28 grid elements). Shaded areas represent the firing fields of individual elements. Elements with non-overlapping firing fields form ‘grids’, shown in black, green, blue, and red colors. Each number within a circle identifies a distinct element. If elements represent cell assemblies, a combination of numbers (e.g., ‘1,2’) identifies an element whose cellular composition is an overlap between two elements with adjacent firing fields. For example, element ‘1,2’ is composed of cells that are part of elements ‘1’ and ‘2’, resulting in an overlap of firing fields. For visual clarity, not all element numbers are shown. (<bold>B</bold>) 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 element’s firing fields is highlighted in color for one grid element in each grid. The phase-shift of each grid is indicated by showing the transparent grid pattern of grid #1. (<bold>C</bold>) When more grid elements are added, the elements can be represented in 3D neural space as a neural manifold, shown here for a total of 1792 grid elements forming 256 grids of non-overlapping firing fields. The colored cells represent one diagonal axis across rows of non-repeating elements if plotted in the 2-D plane as shown in (A).</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig5-v1.tif"/></fig><fig id="fig5s1" position="float" specific-use="child-fig"><label>Figure 5—figure supplement 1.</label><caption><title>Grid cell modules provide a pyramidal parametric sampling of 2-D space enabling simultaneous multiscale representation of space.</title><p>The sampling of 2-D space by grid fields is cut in half from module to module so that each grid cell module represents space at half of the resolution of the previous module. This resembles Gaussian pyramids or mip maps in computer vision. Representation of 2-D space by different grid cell modules thereby allows the simultaneous representation of space at meaningful spatial resolutions in a computationally efficient way. The blue box represents a 1-m × 1-m square environment. Circles represent densely packed grid fields from multiple grid cells. Filled circles represent grid fields of a single grid cell. Grid fields are enlarged in space from module to module so that the total number of grid fields sampling the space approximately doubles from module to module. While the total number of grid fields doubles from module to module, the spacing between the grid fields of an individual grid cell increases by a factor of √2.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-fig5-figsupp1-v1.tif"/></fig></fig-group><p>Two key conclusions from this theoretical result are that (i) an arbitrarily smooth transition between grid fields/grid cells becomes possible during navigation with an arbitrarily large number of grid cells (organized in fundamental grids of seven elements with non-overlapping firing fields), and (ii) traveling directions can be represented with an arbitrarily high angular resolution (see also <xref ref-type="video" rid="video1">Video 1</xref> of the sequence model associated with this study). This is consistent with experimental data on simultaneously recorded multiple grid cells with overlapping firing fields and consistent with data showing that grid cell dynamics can be represented with a toroidal manifold (<xref ref-type="fig" rid="fig5">Figure 5C</xref>).</p><media mimetype="video" mime-subtype="mp4" xlink:href="elife-96627-video1.mp4" id="video1"><label>Video 1.</label><caption><title>Local path integration in a sequence code of trajectories begets hexagonal firing of grid cells.</title></caption></media><p>Moreover, experimental data have shown that grid cells cluster into autonomous modules with distinct scale, orientation, symmetry, and theta frequency modulation (<xref ref-type="bibr" rid="bib83">Stensola et al., 2012</xref>). If we assume that grid cells emerge from a sequence code of trajectories, adjacent firing fields in that sequence would provide a discrete sequence of sampling points in the coding of trajectories, and the distance between the centers of two adjacent firing fields would determine the spatial resolution. Doubling the number of sampling points, that is, doubling the number of firing fields per unit area would double the spatial resolution (<xref ref-type="bibr" rid="bib96">Williams, 1983</xref>). Conversely, dividing the number of firing fields per unit area in half would halve the spatial resolution. To double or halve the spatial resolution in 2-D space, the number of firing fields per area needs to double or be cut in half, respectively (<xref ref-type="fig" rid="fig5s1">Figure 5—figure supplement 1</xref>). Because firing fields are densely packed, doubling the number of firing fields per unit area in 2-D space would result in dividing the distance between two adjacent firing fields by a factor of √2. This is exactly what has been observed in animal experiments (<xref ref-type="bibr" rid="bib84">Stensola et al., 2015</xref>).</p></sec></sec><sec id="s3" sec-type="discussion"><title>Discussion</title><sec id="s3-1"><title>A teleological cause for the existence of grid cells</title><p>In this study, we prove mathematically that spatial periodicity in grid cell firing emerges as the only possible solution to provide a code of trajectories in 2-D space by cell sequences. Within the space of all possible solutions, hexagonal symmetry in grid cell firing emerges as the most parsimonious solution with respect to the required number of neurons. The hexagonal firing pattern of grid cells in 2-D space is arguably their most intriguing property. Yet, despite decades of experimental and theoretical research, the fundamental nature of the computational problem solved by grid cells has remained largely elusive. Previous studies on grid cells have been fruitful in describing potential functions of the grid cell system such as providing a population code for spatial location (<xref ref-type="bibr" rid="bib81">Sreenivasan and Fiete, 2011</xref>; <xref ref-type="bibr" rid="bib62">Mathis et al., 2012</xref>) and in describing functional properties of grid cells and grid cell firing at the level of neuroanatomy, connectivity, neurophysiology, and circuit dynamics. Yet, a specific and intuitive answer to why grid cells have evolved has remained elusive. What is the computational advantage of grid cells over other potential mechanisms or algorithmic implementations in the context of a computational goal? Previous investigations of grid cell function (<xref ref-type="bibr" rid="bib102">Zilli, 2012</xref>; <xref ref-type="bibr" rid="bib21">Couey et al., 2013</xref>; <xref ref-type="bibr" rid="bib104">Zutshi et al., 2018</xref>) based on mechanistic models such as the oscillatory interference (<xref ref-type="bibr" rid="bib67">O’Keefe and Burgess, 2005</xref>; <xref ref-type="bibr" rid="bib10">Burgess et al., 2007</xref>; <xref ref-type="bibr" rid="bib42">Giocomo et al., 2007</xref>; <xref ref-type="bibr" rid="bib46">Hasselmo et al., 2007</xref>; <xref ref-type="bibr" rid="bib11">Burgess, 2008</xref>) or continuous attractor models (<xref ref-type="bibr" rid="bib33">Fuhs and Touretzky, 2006</xref>; <xref ref-type="bibr" rid="bib9">Burak and Fiete, 2009</xref>; <xref ref-type="bibr" rid="bib79">Shipston-Sharman et al., 2016</xref>) do not address the computational goal of or teleological cause for the existence of grid cells. Other studies have used normative models to demonstrate that grid patterns can emerge to optimize the coding of space by grid cells (<xref ref-type="bibr" rid="bib93">Wei et al., 2015</xref>; <xref ref-type="bibr" rid="bib63">Mathis et al., 2015</xref>) or to optimize path integration (<xref ref-type="bibr" rid="bib80">Sorscher et al., 2023</xref>; <xref ref-type="bibr" rid="bib3">Banino et al., 2018</xref>; <xref ref-type="bibr" rid="bib22">Cueva and Wei, 2018</xref>). However, these normative models fall short in demonstrating that grid cells are necessary for the assumed normative functions and often rely on hidden architectural, hyperparameter, and constraint choices to obtain grid cell firing patterns (<xref ref-type="bibr" rid="bib76">Schaeffer et al., 2022</xref>) as discussed under the next section ‘Normative models of grid cell firing’.</p><p>We therefore deviated from these traditional approaches of investigating the nature of grid cell properties and asked the question: Is there a brain function that could either not be performed at all or would be substantially more costly or difficult to perform in the absence of grid cells? To constrain our search for such a function, we assumed that any coding mechanisms that operates on spatial firing requires cell sequences as a fundamental neural syntax in the brain (<xref ref-type="bibr" rid="bib15">Buzsáki, 2010</xref>; <xref ref-type="bibr" rid="bib16">Buzsáki et al., 2022</xref>; <xref ref-type="bibr" rid="bib103">Zutshi et al., 2017</xref>). Recent studies provided compelling evidence for sequential activity of neurons representing spatial trajectories. In particular, <xref ref-type="bibr" rid="bib36">Gardner et al., 2022</xref> demonstrated that the sequential activity of hundreds of simultaneously recorded grid cells in freely foraging rats represented spatial trajectories. Complementary preliminary results indicate that grid cells exhibit left-right-alternating ‘theta sweeps’, characterized by temporally compressed sequences of spiking activity that encode outwardly oriented trajectories from the current location (<xref ref-type="bibr" rid="bib90">Vollan et al., 2024</xref>).</p><p>The concept of sequential grid cell activity extends beyond spatial coding. In various experimental contexts, grid cells have been shown to encode non-spatial variables. For instance, in a stationary auditory task, grid cells fired at specific sounds along a continuous frequency axis (<xref ref-type="bibr" rid="bib2">Aronov et al., 2017</xref>). Further studies revealed that grid cell sequences also represent elapsed time and distance traversed, such as during a delay period in a spatial alternation task (<xref ref-type="bibr" rid="bib55">Kraus et al., 2015</xref>). Similar findings were reported for elapsed time encoded by grid cell sequences in mice performing a virtual ‘Door Stop’ task (<xref ref-type="bibr" rid="bib49">Heys and Dombeck, 2018</xref>).</p><p>Additionally, spatial trajectories represented by temporally compressed grid cell sequences have been observed during sleep as replay events (<xref ref-type="bibr" rid="bib68">Ólafsdóttir et al., 2016</xref>; <xref ref-type="bibr" rid="bib69">O’Neill et al., 2017</xref>). Collectively, these studies demonstrate that sequential activity of neurons within the MEC, particularly grid cells, consistently encodes ordered experiences, suggesting a fundamental role for temporal structure in neuronal representations.</p><p>The theoretical underpinnings of grid cell activity coding for ordered experiences have been explored previously by <xref ref-type="bibr" rid="bib74">Rueckemann et al., 2021</xref>, who argued that the temporal order in grid cell activation allows for the construction of topologically meaningful representations, or neural codes, grounded in the sequential experience of events or spatial locations. However, while Rueckemann et al. argue that the MEC supports temporally ordered representations through grid cell activity, our findings suggest an inverse relationship: namely, that grid cell activity emerges from temporally ordered spatial experiences. Additional studies demonstrate that hippocampal place cells may derive their spatial coding properties from higher-order sequence learning that integrates sensory and motor inputs (<xref ref-type="bibr" rid="bib72">Raju et al., 2024</xref>) and that hexagonal grids, if assumed a priori, optimally encode transitions in spatiotemporal sequences (<xref ref-type="bibr" rid="bib91">Waniek, 2018</xref>).</p><p>Together, experimental and theoretical evidence demonstrates the significance of sequential neuronal activity within the hippocampus and entorhinal cortex as a core mechanism for representing both spatial and temporal information and experiences.</p><p>Assuming that neural coding of trajectories in 2-D space is important for animal navigation and implemented by neural sequences, we show that grid cells are the most effective solution to coding of trajectories by neural sequences. We demonstrate that seven cells are sufficient to provide an unambiguous code for trajectories in 2-D space and that the only two possible solutions with seven cells result in firing fields that fall on a hexagonal grid. Notably, these two solutions result in grid maps that are mirror images of each other up to relabeling the cells. Any other solution to the problem would require at least eight cells, an increase in the number of cells forming a grid by more than 14%. Note that an increase in the number of cells within one grid would not result in an increase in spatial or angular resolution in the coding of trajectories. It can therefore be reasoned that performing the same computational function with the minimum number of cells forming a grid is evolutionary advantageous because it conserves space, cellular material, energy, and resources (<xref ref-type="bibr" rid="bib57">Laughlin and Sejnowski, 2003</xref>). A solution to a sequence code of trajectories that builds on fundamental units of only seven grid cells compared to a larger number of cells would then be expected to be most frequently adopted. We therefore argue that we have provided a likely teleological cause for the existence of grid cells and an answer to the fundamental question of why grid cells have emerged in brains of navigating animals, namely that grid cells are the most parsimonious solution to sequence coding of trajectories in 2-D space.</p></sec><sec id="s3-2"><title>Comparison to normative models of grid cell firing</title><p>Normative models generally fall into two classes: one that uses artificial neural network models (<xref ref-type="bibr" rid="bib80">Sorscher et al., 2023</xref>; <xref ref-type="bibr" rid="bib22">Cueva and Wei, 2018</xref>; <xref ref-type="bibr" rid="bib3">Banino et al., 2018</xref>) and one that uses a mathematical or analytical approach (<xref ref-type="bibr" rid="bib91">Waniek, 2018</xref>). Grid-like firing has been found to emerge in artificial neural networks when the models were trained to perform path integration under simple biologically plausible constraints. The emerged grid cells then endowed agents with the ability to perform vector-based navigation (<xref ref-type="bibr" rid="bib80">Sorscher et al., 2023</xref>; <xref ref-type="bibr" rid="bib3">Banino et al., 2018</xref>). While these models demonstrate that path integration is an important driving force in the generation of grid cells, the mechanism that is generating grid cell firing patterns remains obscure due to the untransparent nature of neural networks. Moreover, the results often depend on specific hyperparameter choices to explain the emergence of grid-like elements under anatomical constraints (see <xref ref-type="bibr" rid="bib76">Schaeffer et al., 2022</xref> for a discussion). In contrast, we have provided mathematical proof that spatial periodicity of firing fields emerges from a sequence code of trajectories in 2-D space and that the most parsimonious solution with only seven cells results in hexagonal lattice packing.</p></sec><sec id="s3-3"><title>Sequence coding of trajectories by grid cells provides a mechanistic explanation for how grid cells serve path integration and can support memory-guided navigation</title><p>If the step-by-step advancements from the currently active cell to the next cell in the grid cell sequence are caused by integrating velocity signals, grid cells perform path integration. The ensuing grid cell sequence is then the result of the path integration and can be interpreted as a sequence code by a downstream reader, potentially the hippocampus. While the sequence code of trajectories-model of grid cell firing is agnostic about the neural mechanisms that implements the sequence code, one plausible implementation is a continuous attractor network (<xref ref-type="bibr" rid="bib64">McNaughton et al., 2006</xref>; <xref ref-type="bibr" rid="bib9">Burak and Fiete, 2009</xref>). Interestingly, a sequence code of trajectories begets conformal isometry in the attractor network, that is, a trajectory in neural space is proportional to a trajectory of an animal in physical space. Different grid cell modules integrate velocity signals at different (spatial) scales that are determined by the distance between the grid field centers of adjacent cells in the sequence. A sequence code of trajectories by grid cells therefore provides a mechanistic explanation for the functional role of grid cells in path integration. The model described in this article can be implemented with temporal coding (spiking neurons) or rate coding, or even with binary activity states of neurons, where neurons are activated sequentially as a function of the animal’s velocity. Previous modeling work has shown that circuit mechanisms using grid cells in combination with speed-modulated head direction cells and hippocampal place cells can provide a substrate for episodic encoding and retrieval of spatiotemporal trajectories (<xref ref-type="bibr" rid="bib47">Hasselmo, 2009</xref>). Furthermore, grid cell sequences have been shown to be useful in simulations of new goal-directed trajectories, where grid cells were used in a network of head direction cells, hippocampal place cells and persistent spiking cells to plan forward trajectories through the environment that search for place cells near a goal location (<xref ref-type="bibr" rid="bib31">Erdem and Hasselmo, 2014</xref>). Recent experimental data demonstrate that temporally coordinated entorhinal inputs drive hippocampal sequences to perform memory-guided navigation (<xref ref-type="bibr" rid="bib60">Liu et al., 2023</xref>) and that temporally structured population activity of grid and place cells represents local trajectories essential for goal-directed navigation and planning (<xref ref-type="bibr" rid="bib18">Chaudhuri-Vayalambrone et al., 2023</xref>).</p><p>As part of the proof that a trajectory code by cell sequences begets spatially periodic firing fields, we proved that the centers of the firing fields must be arranged in a hexagonal lattice. This arrangement implies that the neural space is a conformally isometric embedding of physical space, so that local displacements in neural space are proportional to local displacements of an animal or agent in physical space, as illustrated in <xref ref-type="fig" rid="fig5">Figure 5</xref>. This property has recently been introduced in the grid cell literature as the conformal isometry hypothesis (<xref ref-type="bibr" rid="bib98">Xu et al., 2024</xref>; <xref ref-type="bibr" rid="bib78">Schøyen et al., 2024</xref>). Strikingly, (<xref ref-type="bibr" rid="bib78">Schøyen et al., 2024</xref>) arrive at similar if not identical conclusions regarding the geometric principles in the neural representations of space by grid cells.</p><p>It would provide an advantage to animals if they could plan trajectories toward goals on different spatial scales to ‘zoom in’ or ‘zoom out’ on a cognitive map of their environment. We therefore proposed that each grid module represents trajectories at progressively lower or higher resolution to enable planning of trajectories across different spatial scales. This approach is analogous to mip mapping known from computer graphics, where an image is sampled by a stack of images, each of which is represented with half the resolution of the previous to increase rendering performance (<xref ref-type="bibr" rid="bib96">Williams, 1983</xref>).</p><p>A similar idea has previously been implemented in a scale-space model of grid cells (<xref ref-type="bibr" rid="bib92">Waniek, 2020</xref>). It remains to be tested experimentally whether grid cell modules primarily serve the coding of spatial location or a multiscale representation of spatial trajectories. Furthermore, it remains to be shown why the scaling factor used in the grid cell system is 2 and not smaller or larger than 2. Interestingly, a scale ratio of 2 is commonly used in computer vision, specifically in the context of mipmapping and Gaussian pyramids using Gaussian filter kernels to render images across different spatial scales while allowing a smooth and balanced transition between successive levels of an image pyramid (<xref ref-type="bibr" rid="bib12">Burt and Adelson, 1983</xref>; <xref ref-type="bibr" rid="bib59">Lindeberg, 2008</xref>). Examining whether larger factors lead to an excessive loss of detail between spatial scales, while smaller factors fail to sufficiently reduce the spatial scale to justify additional computational levels, represents a promising direction for future research.</p><p>The grid cell model presented in this study assumes complete tiling of space and equal representation of traveling direction. If this assumption was relaxed, there would be gaps in the representation of space and some traveling directions would be represented with larger or smaller fields, hence with smaller or larger angular resolution, respectively (see <xref ref-type="fig" rid="fig1">Figure 1F and G</xref>). However, path integration performed by animals is far from being perfect, and it would be of interest for future work to investigate whether non-ideal tiling of space by grid cells may be one of many factors contributing to errors in path integration (<xref ref-type="bibr" rid="bib1">Allen et al., 2014</xref>; <xref ref-type="bibr" rid="bib39">Gil et al., 2018</xref>). One potential mechanism to compensate for non-ideal tiling of space is population coding. Grid cells are part of grid cell assemblies, and the population activity of grid cell assemblies can be interpreted by a reader mechanism as a robust population code.</p><p>Notably, the trajectory code itself does <italic>not</italic> require anchoring to a reference frame to perform local path integration. Because of the local nature of the trajectory code, path integration can be performed locally without the emergence of a global grid pattern. This has been shown experimentally in mice performing a path integration task where changes in the location of a task-relevant object resulted in translations of grid patterns in single trials (<xref ref-type="bibr" rid="bib70">Peng et al., 2023</xref>). Although no global grid pattern was observed because the reference frame was not fixed in space, grid cells performed path integration locally within the reference frame defined by the moving task-relevant object, and grid patterns were visible when the changes in the references frames were accounted for in computing the rate maps.</p><p>Sequence coding of trajectories is not limited to physical space but could be useful for cognitive functions such as working memory or episodic memory that connects events into a cohesive story, consistent with experimental data demonstrating a grid-like code of conceptual knowledge space in humans (<xref ref-type="bibr" rid="bib19">Constantinescu et al., 2016</xref>). A sequence code of trajectories by grid cells can thus explain data from human subjects that link reduced grid-like activity with path integration deficits observed in Alzheimer’s disease risk carriers (<xref ref-type="bibr" rid="bib56">Kunz et al., 2015</xref>; <xref ref-type="bibr" rid="bib6">Bierbrauer et al., 2020</xref>), and data from rodent experiments demonstrating that grid cell firing is reduced in a rodent animal model of Alzheimer’s disease (<xref ref-type="bibr" rid="bib100">Ying et al., 2022</xref>; <xref ref-type="bibr" rid="bib101">Ying et al., 2023</xref>).</p></sec><sec id="s3-4"><title>Sequence coding of trajectories in 3-D space</title><p>There is no reason to assume that the sequence code of trajectories described in this study is restricted to 2-D space. We have discussed in previous paragraphs how a sequence code of trajectories by grid cells can code for trajectories in 1-D space. In principle, such a sequence code can be expanded to three-dimensional (3-D) or higher dimensional spaces. However, there are multiple equally optimal possibilities to generate a close-packed arrangement of firing fields in 3-D space (<xref ref-type="bibr" rid="bib82">Stella and Treves, 2015</xref>; <xref ref-type="bibr" rid="bib94">Weisstein, 2025</xref>), where each sphere touches 12 neighboring spheres. Two examples of lattice packings in 3-D that achieve this kissing number are the face-centered cubic and hexagonal closely packed arrangements, which both have layers arranged in hexagonal lattices but stack the layers differently (<xref ref-type="bibr" rid="bib20">Conway and Sloane, 1999</xref>). A model based on a sequence code of trajectories by grid cells would therefore predict larger variability in spatial periodicity of grid cell firing in 3-D space compared to 2-D space. It remains to be determined whether specific solutions to cell sequence coding of trajectories in 3-D space could result in local or global symmetries. The distribution of grid cell firing fields in rats exploring a 3-D volumetric space is irregular (<xref ref-type="bibr" rid="bib44">Grieves et al., 2021</xref>). However, since sequences need to repeat, cell sequence coding of trajectories in 3-D space predicts some degree of local order in the grid map of a single grid cell. Consistent with this prediction, experimental data show that grid cells recorded in flying bats exhibit fixed local distances between firing fields despite the lack of a global lattice arrangement of firing fields (<xref ref-type="bibr" rid="bib40">Ginosar et al., 2021</xref>). Taken together, these experimental data are consistent with a sequence code of trajectories that expands to 3-D space, even though this sequence coding may not need to result in a globally symmetric arrangement of the firing fields of a single cell. Based on data from animals navigating in 3-D environments, it has recently been proposed that the characteristic hexagonal firing pattern of grid cells is a “by-product of whatever process causes the cells to fire in spatially discrete regions of uniform size” (<xref ref-type="bibr" rid="bib51">Jeffery, 2023</xref>). This study demonstrates that the said process is a neural sequence code of trajectories.</p></sec><sec id="s3-5"><title>Limitations of the study</title><p>This study demonstrates a teleological cause for the existence of grid cells, namely sequence coding of trajectories in 2-D. The goal of this study was thus not to provide a mechanistic model of grid cells or biologically detailed model of the connections between neurons that can mechanistically account for grid cell firing. The model thus remains agnostic about the specific mechanistic implementation as to how a velocity signal is integrated in entorhinal circuits to move activity from one neuron in the sequence to the next neuron in the sequence as a function of the animal’s velocity and makes no predictions about connectivity between neuron types and the connection strengths.</p><p>While we have demonstrated that the ratio of grid field spacing to grid field size in an experimental data set of grid cells obtained from mice is consistent with the prediction made by the trajectory code by neural sequences model of grid cell firing, we acknowledge that future studies should test this model prediction on larger data sets obtained from other species and recorded across different grid cell modules.</p></sec></sec><sec id="s4" sec-type="methods"><title>Methods</title><table-wrap id="keyresource" position="anchor"><label>Key resources table</label><table frame="hsides" rules="groups"><thead><tr><th align="left" valign="bottom">Reagent type (species) or resource</th><th align="left" valign="bottom">Designation</th><th align="left" valign="bottom">Source or reference</th><th align="left" valign="bottom">Identifiers</th><th align="left" valign="bottom">Additional information</th></tr></thead><tbody><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom">MATLAB</td><td align="left" valign="bottom">The MathWorks</td><td align="left" valign="bottom">RRID:<ext-link ext-link-type="uri" xlink:href="https://identifiers.org/RRID:SCR_001622">SCR_001622</ext-link>; version: 2021a</td><td align="left" valign="bottom"/></tr><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom"/><td align="left" valign="bottom">Repository: GitHub; reference: this paper</td><td align="left" valign="bottom"><ext-link ext-link-type="uri" xlink:href="https://github.com/dannenberglab/grid-cell-sequences/blob/main/get_gridMaps.m">https://github.com/dannenberglab/grid-cell-sequences/blob/main/get_gridMaps.m</ext-link> copy archived at <xref ref-type="bibr" rid="bib25">Dannenberg, 2025</xref></td><td align="left" valign="bottom">MATLAB code to plot grid maps that emerge because of sequence coding of trajectories</td></tr><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom"/><td align="left" valign="bottom">Repository: GitHub;<break/>reference: this paper</td><td align="left" valign="bottom"><ext-link ext-link-type="uri" xlink:href="https://github.com/dannenberglab/grid-cell-sequences/blob/main/plot_torus.m">https://github.com/dannenberglab/grid-cell-sequences/blob/main/plot_torus.m</ext-link> copy archived at <xref ref-type="bibr" rid="bib25">Dannenberg, 2025</xref></td><td align="left" valign="bottom">MATLAB code to plot toroidal manifold of neural grid cell space from multiple grid units (related to <xref ref-type="fig" rid="fig5">Figure 5C</xref>)</td></tr><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom"/><td align="left" valign="bottom">Repository: GitHub; reference: this paper</td><td align="left" valign="bottom"><ext-link ext-link-type="uri" xlink:href="https://github.com/Hippocampome-Org/gridcell_metrics">https://github.com/Hippocampome-Org/gridcell_metrics</ext-link></td><td align="left" valign="bottom">MATLAB code to quantify grid field spacing and grid field size from experimental data on grid cells</td></tr></tbody></table></table-wrap><sec id="s4-1"><title>Math notations</title><p>A <italic>theorem</italic> is a mathematical statement that can be proved using logical deduction from previously known results.</p><p>A <italic>proof</italic> is a logical argument using known results to generate new mathematical statements. The purpose of a proof is to convince the reader that the result follows from known results.</p><p>A <italic>plane</italic> is a flat surface extending infinitely far in two dimensions. Also referred to as ℝ<sup>2</sup>, since it can be assigned coordinates of the form (<italic>a, b</italic>) where <italic>a</italic> and <italic>b</italic> are real numbers.</p><p>A <italic>Euclidean metric</italic> is the usual notion of distance in the plane. Two points with coordinates <inline-formula><mml:math id="inf37"><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:math></inline-formula> and <inline-formula><mml:math id="inf38"><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:math></inline-formula> have distance <inline-formula><mml:math id="inf39"><mml:msqrt><mml:msup><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>−</mml:mo><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>−</mml:mo><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:msqrt></mml:math></inline-formula>.</p><p><italic>Adding points</italic> means adding their coordinates, <italic>subtracting one point from another</italic> involves subtracting their coordinates.</p><p>A <italic>bijective map</italic> is a correspondence between two sets such that every point in one set is matched with exactly one point in the other set.</p><p>A <italic>geometric figure</italic> is a geometric object with a shape in the plane.</p><p>We work in ℝ<sup>2</sup> (the plane), with the Euclidean metric.</p></sec><sec id="s4-2"><title>Quantification and statistical analysis</title><sec id="s4-2-1"><title>Prediction of ratio between grid field spacing and grid field size</title><p>The grid field spacing <inline-formula><mml:math id="inf40"><mml:mi>s</mml:mi></mml:math></inline-formula> was computed as a multiple of the diameter <inline-formula><mml:math id="inf41"><mml:mi>d</mml:mi></mml:math></inline-formula> of a circular grid field for a grid unit with seven cells. Using the Pythagorean theorem, we can write<disp-formula id="equ2"><mml:math id="m2"><mml:mrow><mml:msup><mml:mi>s</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mn>2</mml:mn><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mn>2</mml:mn><mml:mo>∗</mml:mo><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>s</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn>30</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></disp-formula><disp-formula id="equ3"><mml:math id="m3"><mml:mrow><mml:msup><mml:mi>s</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mn>4</mml:mn><mml:mo>+</mml:mo><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msqrt><mml:mn>3</mml:mn></mml:msqrt><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></disp-formula><disp-formula id="equ4"><mml:math id="m4"><mml:mrow><mml:msup><mml:mi>s</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mn>7</mml:mn></mml:mrow></mml:math></disp-formula><disp-formula id="equ5"><mml:math id="m5"><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:msqrt><mml:mn>7</mml:mn></mml:msqrt></mml:math></disp-formula></p></sec><sec id="s4-2-2"><title>Quantification of grid field spacing and grid field size in experimental data</title><p>Since the characteristic feature of a firing field is its firing rate, we chose to use a threshold for the firing rate to determine the field boundaries. Notably, choosing the threshold too low will result in firing fields that are too large and that will merge with each other, thus not allowing identification of individual fields. However, choosing the threshold too high will result in measurements of field sizes that are too small. To avoid bias regarding the predicted value, the person performing the analysis was blinded towards the value predicted by the sequence model of grid cells.</p></sec><sec id="s4-2-3"><title>Field detection software design</title><p>Software was created to automatically detect grid cell fields. Those detected fields are used to find the mean field size and spacing for each cell. Open source code for the software is available at <ext-link ext-link-type="uri" xlink:href="https://github.com/Hippocampome-Org/gridcell_metrics">https://github.com/Hippocampome-Org/gridcell_metrics</ext-link> (<xref ref-type="bibr" rid="bib88">Sutton et al., 2025</xref>; copy archived at <xref ref-type="bibr" rid="bib87">Sutton, 2025</xref>). The code includes data for all cells used for analyses in this article and allows a user to reproduce the field detection results. The software detects grid fields by the use of a threshold to filter out out-of-field firing. Out-of-field firing is approximated by firing at a location with a firing rate below a specified percentage relative to the peak firing rate given an animal location. The code performs grid field detection using the spatial autocorrelogram of the cell’s firing rate map. The firing rate map was generated by dividing the open-field environment into 3 cm spatial bins and computing, for each spatial bin, the occupancy-normalized spiking rate as described in <xref ref-type="bibr" rid="bib24">Dannenberg et al., 2020</xref>. Rate maps were then smoothed by a 3 cm wide 2-D Gaussian kernel.</p><p>The objective of the software is to only analyze the most central field and the six closest fields surrounding it to avoid complications with analyzing fields that contact borders of a plot and have part of their areas missing due to their fields extending past the border. Other fields are detected but not saved for analyses. The DBSCAN clustering algorithm from MATLAB’s (<ext-link ext-link-type="uri" xlink:href="https://www.mathworks.com/">mathworks.com</ext-link>) Statistics and Machine Learning Toolbox is used to automatically separate the field data into clusters. Each cluster represents a detected field area. The field centers are computed as the centroids of the detected clusters. The positions of centroids are computed by calculating the mean of all pixels on the x-axis and y-axis of a field cluster and taking the mean x-axis and y-axis values as the coordinates of the centroid for each field. The area of each field is calculated as the number of pixels in the field. The spacing between fields is calculated as the Euclidean distance between field centroids. The mean spacing value is computed from six measurements of the spacings from the center field to each of the six surrounding fields. The grid field size is computed as the mean of a diameter-like metric from each field’s area. The diameter-like metric <inline-formula><mml:math id="inf42"><mml:mi>d</mml:mi></mml:math></inline-formula> uses the formula for finding a circle diameter given its area, namely <inline-formula><mml:math id="inf43"><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:msqrt><mml:mfenced separators="|"><mml:mrow><mml:mrow><mml:mrow><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi></mml:mrow><mml:mo>/</mml:mo><mml:mrow><mml:mi>π</mml:mi></mml:mrow></mml:mrow></mml:mrow></mml:mfenced></mml:msqrt></mml:math></inline-formula>. The ratio of field spacing to field size is then computed as the field spacing divided by the field size.</p></sec><sec id="s4-2-4"><title>Assessment of field detection software performance</title><p>The grid field detection algorithm performed best (measured as the percentage of cells where grid fields could be detected) with the threshold set to 31% (<xref ref-type="fig" rid="fig2">Figure 2</xref>, <xref ref-type="fig" rid="fig3s1">Figure 3—figure supplement 1B</xref>)<bold>.</bold> The evaluation of performance was based on data from 27 grid cell recording files that were a part of a previously published study by <xref ref-type="bibr" rid="bib24">Dannenberg et al., 2020</xref>. Only recording files from baseline conditions (the ‘Light’ condition in <xref ref-type="bibr" rid="bib24">Dannenberg et al., 2020</xref>) were analyzed. Grid cells that met a minimal grid score threshold of 0.19 were included. The grid score was computed as described in <xref ref-type="bibr" rid="bib24">Dannenberg et al., 2020</xref>. Effective field detection by the software was confirmed by the experimenter as (1) the intended number of fields being detected (center field in plot and six closest to it) and (2) the fields being detected without merging of grid fields compared to visual inspection of the cells’ firing rate map. Grid cells that did not have effective field detection by the software were not included in ratio measurements. The software-computed size of grid fields is a function of a threshold parameter that was constant for all cells and was chosen to optimize performance of the software such that the number of grid cells for which the software-detected grid fields was maximal. Since the threshold was constant for all cells, field sizes could appear larger or smaller relative to estimated field sizes based on visual inspection of rate maps. However, this was not determined to be a reason to exclude a cell for analysis with the threshold parameter that detected those sizes. Evaluating what size is large or small is subjective, and such a subjective evaluation was avoided to benefit the ability to reproduce results. Small field detection at some thresholds is a known issue that can be addressed further in future work.</p></sec></sec></sec></body><back><sec sec-type="additional-information" id="s5"><title>Additional information</title><fn-group content-type="competing-interest"><title>Competing interests</title><fn fn-type="COI-statement" id="conf1"><p>No competing interests declared</p></fn></fn-group><fn-group content-type="author-contribution"><title>Author contributions</title><fn fn-type="con" id="con1"><p>Formal analysis, Funding acquisition, Investigation, Writing – original draft</p></fn><fn fn-type="con" id="con2"><p>Supervision, Funding acquisition, Investigation, Writing - review and editing</p></fn><fn fn-type="con" id="con3"><p>Software, Formal analysis, Methodology, Writing – original draft</p></fn><fn fn-type="con" id="con4"><p>Conceptualization, Supervision, Funding acquisition, Investigation, Writing – original draft</p></fn></fn-group></sec><sec sec-type="supplementary-material" id="s6"><title>Additional files</title><supplementary-material id="mdar"><label>MDAR checklist</label><media xlink:href="elife-96627-mdarchecklist1-v1.docx" mimetype="application" mime-subtype="docx"/></supplementary-material></sec><sec sec-type="data-availability" id="s7"><title>Data availability</title><p>The current manuscript is a theoretical study, so no data have been generated for this manuscript. Code for computational analysis is publicly available via GitHub and listed in the Key Resources Table. We use data from <xref ref-type="bibr" rid="bib24">Dannenberg et al., 2020</xref>.</p></sec><ack id="ack"><title>Acknowledgements</title><p>This work was supported by the National Institute of Neurological Disorders and Stroke of the National Institutes of Health, grant numbers R00NS116129 to HD and R01NS39600 to GAA; and by the National Science Foundation, grant number 2424326 to RRG, GAA, and HD. We thank Harrison Bray for helpful conversations about lattice packings, and Xihui Zheng for help with graphical illustrations. We thank Michael E Hasselmo for sharing data with us and for comments on the manuscript. We thank Marc W Howard for helpful comments on the manuscript.</p></ack><ref-list><title>References</title><ref id="bib1"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Allen</surname><given-names>K</given-names></name><name><surname>Gil</surname><given-names>M</given-names></name><name><surname>Resnik</surname><given-names>E</given-names></name><name><surname>Toader</surname><given-names>O</given-names></name><name><surname>Seeburg</surname><given-names>P</given-names></name><name><surname>Monyer</surname><given-names>H</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Impaired path integration and grid cell spatial periodicity in mice lacking GluA1-containing AMPA receptors</article-title><source>The Journal of Neuroscience</source><volume>34</volume><fpage>6245</fpage><lpage>6259</lpage><pub-id pub-id-type="doi">10.1523/JNEUROSCI.4330-13.2014</pub-id><pub-id pub-id-type="pmid">24790195</pub-id></element-citation></ref><ref id="bib2"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Aronov</surname><given-names>D</given-names></name><name><surname>Nevers</surname><given-names>R</given-names></name><name><surname>Tank</surname><given-names>DW</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Mapping of a non-spatial dimension by the hippocampal-entorhinal circuit</article-title><source>Nature</source><volume>543</volume><fpage>719</fpage><lpage>722</lpage><pub-id pub-id-type="doi">10.1038/nature21692</pub-id><pub-id pub-id-type="pmid">28358077</pub-id></element-citation></ref><ref id="bib3"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Banino</surname><given-names>A</given-names></name><name><surname>Barry</surname><given-names>C</given-names></name><name><surname>Uria</surname><given-names>B</given-names></name><name><surname>Blundell</surname><given-names>C</given-names></name><name><surname>Lillicrap</surname><given-names>T</given-names></name><name><surname>Mirowski</surname><given-names>P</given-names></name><name><surname>Pritzel</surname><given-names>A</given-names></name><name><surname>Chadwick</surname><given-names>MJ</given-names></name><name><surname>Degris</surname><given-names>T</given-names></name><name><surname>Modayil</surname><given-names>J</given-names></name><name><surname>Wayne</surname><given-names>G</given-names></name><name><surname>Soyer</surname><given-names>H</given-names></name><name><surname>Viola</surname><given-names>F</given-names></name><name><surname>Zhang</surname><given-names>B</given-names></name><name><surname>Goroshin</surname><given-names>R</given-names></name><name><surname>Rabinowitz</surname><given-names>N</given-names></name><name><surname>Pascanu</surname><given-names>R</given-names></name><name><surname>Beattie</surname><given-names>C</given-names></name><name><surname>Petersen</surname><given-names>S</given-names></name><name><surname>Sadik</surname><given-names>A</given-names></name><name><surname>Gaffney</surname><given-names>S</given-names></name><name><surname>King</surname><given-names>H</given-names></name><name><surname>Kavukcuoglu</surname><given-names>K</given-names></name><name><surname>Hassabis</surname><given-names>D</given-names></name><name><surname>Hadsell</surname><given-names>R</given-names></name><name><surname>Kumaran</surname><given-names>D</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Vector-based navigation using grid-like representations in artificial agents</article-title><source>Nature</source><volume>557</volume><fpage>429</fpage><lpage>433</lpage><pub-id pub-id-type="doi">10.1038/s41586-018-0102-6</pub-id><pub-id pub-id-type="pmid">29743670</pub-id></element-citation></ref><ref id="bib4"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Barry</surname><given-names>C</given-names></name><name><surname>Hayman</surname><given-names>R</given-names></name><name><surname>Burgess</surname><given-names>N</given-names></name><name><surname>Jeffery</surname><given-names>KJ</given-names></name></person-group><year iso-8601-date="2007">2007</year><article-title>Experience-dependent rescaling of entorhinal grids</article-title><source>Nature Neuroscience</source><volume>10</volume><fpage>682</fpage><lpage>684</lpage><pub-id pub-id-type="doi">10.1038/nn1905</pub-id><pub-id pub-id-type="pmid">17486102</pub-id></element-citation></ref><ref id="bib5"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Barry</surname><given-names>C</given-names></name><name><surname>Ginzberg</surname><given-names>LL</given-names></name><name><surname>O’Keefe</surname><given-names>J</given-names></name><name><surname>Burgess</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Grid cell firing patterns signal environmental novelty by expansion</article-title><source>PNAS</source><volume>109</volume><fpage>17687</fpage><lpage>17692</lpage><pub-id pub-id-type="doi">10.1073/pnas.1209918109</pub-id><pub-id pub-id-type="pmid">23045662</pub-id></element-citation></ref><ref id="bib6"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bierbrauer</surname><given-names>A</given-names></name><name><surname>Kunz</surname><given-names>L</given-names></name><name><surname>Gomes</surname><given-names>CA</given-names></name><name><surname>Luhmann</surname><given-names>M</given-names></name><name><surname>Deuker</surname><given-names>L</given-names></name><name><surname>Getzmann</surname><given-names>S</given-names></name><name><surname>Wascher</surname><given-names>E</given-names></name><name><surname>Gajewski</surname><given-names>PD</given-names></name><name><surname>Hengstler</surname><given-names>JG</given-names></name><name><surname>Fernandez-Alvarez</surname><given-names>M</given-names></name><name><surname>Atienza</surname><given-names>M</given-names></name><name><surname>Cammisuli</surname><given-names>DM</given-names></name><name><surname>Bonatti</surname><given-names>F</given-names></name><name><surname>Pruneti</surname><given-names>C</given-names></name><name><surname>Percesepe</surname><given-names>A</given-names></name><name><surname>Bellaali</surname><given-names>Y</given-names></name><name><surname>Hanseeuw</surname><given-names>B</given-names></name><name><surname>Strange</surname><given-names>BA</given-names></name><name><surname>Cantero</surname><given-names>JL</given-names></name><name><surname>Axmacher</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Unmasking selective path integration deficits in Alzheimer’s disease risk carriers</article-title><source>Science Advances</source><volume>6</volume><elocation-id>eaba1394</elocation-id><pub-id pub-id-type="doi">10.1126/sciadv.aba1394</pub-id><pub-id pub-id-type="pmid">32923622</pub-id></element-citation></ref><ref id="bib7"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Boccara</surname><given-names>CN</given-names></name><name><surname>Sargolini</surname><given-names>F</given-names></name><name><surname>Thoresen</surname><given-names>VH</given-names></name><name><surname>Solstad</surname><given-names>T</given-names></name><name><surname>Witter</surname><given-names>MP</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name><name><surname>Moser</surname><given-names>M-B</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Grid cells in pre- and parasubiculum</article-title><source>Nature Neuroscience</source><volume>13</volume><fpage>987</fpage><lpage>994</lpage><pub-id pub-id-type="doi">10.1038/nn.2602</pub-id><pub-id pub-id-type="pmid">20657591</pub-id></element-citation></ref><ref id="bib8"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Boccara</surname><given-names>CN</given-names></name><name><surname>Nardin</surname><given-names>M</given-names></name><name><surname>Stella</surname><given-names>F</given-names></name><name><surname>O’Neill</surname><given-names>J</given-names></name><name><surname>Csicsvari</surname><given-names>J</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>The entorhinal cognitive map is attracted to goals</article-title><source>Science</source><volume>363</volume><fpage>1443</fpage><lpage>1447</lpage><pub-id pub-id-type="doi">10.1126/science.aav4837</pub-id><pub-id pub-id-type="pmid">30923221</pub-id></element-citation></ref><ref id="bib9"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Burak</surname><given-names>Y</given-names></name><name><surname>Fiete</surname><given-names>IR</given-names></name></person-group><year iso-8601-date="2009">2009</year><article-title>Accurate path integration in continuous attractor network models of grid cells</article-title><source>PLOS Computational Biology</source><volume>5</volume><elocation-id>e1000291</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pcbi.1000291</pub-id><pub-id pub-id-type="pmid">19229307</pub-id></element-citation></ref><ref id="bib10"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Burgess</surname><given-names>Neil</given-names></name><name><surname>Barry</surname><given-names>C</given-names></name><name><surname>O’Keefe</surname><given-names>J</given-names></name></person-group><year iso-8601-date="2007">2007</year><article-title>An oscillatory interference model of grid cell firing</article-title><source>Hippocampus</source><volume>17</volume><fpage>801</fpage><lpage>812</lpage><pub-id pub-id-type="doi">10.1002/hipo.20327</pub-id><pub-id pub-id-type="pmid">17598147</pub-id></element-citation></ref><ref id="bib11"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Burgess</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2008">2008</year><article-title>Grid cells and theta as oscillatory interference: theory and predictions</article-title><source>Hippocampus</source><volume>18</volume><fpage>1157</fpage><lpage>1174</lpage><pub-id pub-id-type="doi">10.1002/hipo.20518</pub-id><pub-id pub-id-type="pmid">19021256</pub-id></element-citation></ref><ref id="bib12"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Burt</surname><given-names>P</given-names></name><name><surname>Adelson</surname><given-names>E</given-names></name></person-group><year iso-8601-date="1983">1983</year><article-title>The laplacian pyramid as a compact image code</article-title><source>IEEE Transactions on Communications</source><volume>31</volume><fpage>532</fpage><lpage>540</lpage><pub-id pub-id-type="doi">10.1109/TCOM.1983.1095851</pub-id></element-citation></ref><ref id="bib13"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bush</surname><given-names>D</given-names></name><name><surname>Barry</surname><given-names>C</given-names></name><name><surname>Manson</surname><given-names>D</given-names></name><name><surname>Burgess</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Using grid cells for navigation</article-title><source>Neuron</source><volume>87</volume><fpage>507</fpage><lpage>520</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2015.07.006</pub-id><pub-id pub-id-type="pmid">26247860</pub-id></element-citation></ref><ref id="bib14"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Butler</surname><given-names>WN</given-names></name><name><surname>Hardcastle</surname><given-names>K</given-names></name><name><surname>Giocomo</surname><given-names>LM</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Remembered reward locations restructure entorhinal spatial maps</article-title><source>Science</source><volume>363</volume><fpage>1447</fpage><lpage>1452</lpage><pub-id pub-id-type="doi">10.1126/science.aav5297</pub-id><pub-id pub-id-type="pmid">30923222</pub-id></element-citation></ref><ref id="bib15"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Buzsáki</surname><given-names>G</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Neural syntax: cell assemblies, synapsembles, and readers</article-title><source>Neuron</source><volume>68</volume><fpage>362</fpage><lpage>385</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2010.09.023</pub-id><pub-id pub-id-type="pmid">21040841</pub-id></element-citation></ref><ref id="bib16"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Buzsáki</surname><given-names>G</given-names></name><name><surname>McKenzie</surname><given-names>S</given-names></name><name><surname>Davachi</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2022">2022</year><article-title>Neurophysiology of remembering</article-title><source>Annual Review of Psychology</source><volume>73</volume><fpage>187</fpage><lpage>215</lpage><pub-id pub-id-type="doi">10.1146/annurev-psych-021721-110002</pub-id><pub-id pub-id-type="pmid">34535061</pub-id></element-citation></ref><ref id="bib17"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Casali</surname><given-names>G</given-names></name><name><surname>Bush</surname><given-names>D</given-names></name><name><surname>Jeffery</surname><given-names>K</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Altered neural odometry in the vertical dimension</article-title><source>PNAS</source><volume>116</volume><fpage>4631</fpage><lpage>4636</lpage><pub-id pub-id-type="doi">10.1073/pnas.1811867116</pub-id><pub-id pub-id-type="pmid">30770450</pub-id></element-citation></ref><ref id="bib18"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Chaudhuri-Vayalambrone</surname><given-names>P</given-names></name><name><surname>Rule</surname><given-names>ME</given-names></name><name><surname>Bauza</surname><given-names>M</given-names></name><name><surname>Krstulovic</surname><given-names>M</given-names></name><name><surname>Kerekes</surname><given-names>P</given-names></name><name><surname>Burton</surname><given-names>S</given-names></name><name><surname>O’Leary</surname><given-names>T</given-names></name><name><surname>Krupic</surname><given-names>J</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Simultaneous representation of multiple time horizons by entorhinal grid cells and CA1 place cells</article-title><source>Cell Reports</source><volume>42</volume><elocation-id>112716</elocation-id><pub-id pub-id-type="doi">10.1016/j.celrep.2023.112716</pub-id><pub-id pub-id-type="pmid">37402167</pub-id></element-citation></ref><ref id="bib19"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Constantinescu</surname><given-names>AO</given-names></name><name><surname>O’Reilly</surname><given-names>JX</given-names></name><name><surname>Behrens</surname><given-names>TEJ</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Organizing conceptual knowledge in humans with a gridlike code</article-title><source>Science</source><volume>352</volume><fpage>1464</fpage><lpage>1468</lpage><pub-id pub-id-type="doi">10.1126/science.aaf0941</pub-id><pub-id pub-id-type="pmid">27313047</pub-id></element-citation></ref><ref id="bib20"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Conway</surname><given-names>JH</given-names></name><name><surname>Sloane</surname><given-names>NJA</given-names></name></person-group><year iso-8601-date="1999">1999</year><source>Sphere Packings, Lattices, and Groups</source><publisher-name>Springer</publisher-name></element-citation></ref><ref id="bib21"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Couey</surname><given-names>JJ</given-names></name><name><surname>Witoelar</surname><given-names>A</given-names></name><name><surname>Zhang</surname><given-names>S-J</given-names></name><name><surname>Zheng</surname><given-names>K</given-names></name><name><surname>Ye</surname><given-names>J</given-names></name><name><surname>Dunn</surname><given-names>B</given-names></name><name><surname>Czajkowski</surname><given-names>R</given-names></name><name><surname>Moser</surname><given-names>M-B</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name><name><surname>Roudi</surname><given-names>Y</given-names></name><name><surname>Witter</surname><given-names>MP</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Recurrent inhibitory circuitry as a mechanism for grid formation</article-title><source>Nature Neuroscience</source><volume>16</volume><fpage>318</fpage><lpage>324</lpage><pub-id pub-id-type="doi">10.1038/nn.3310</pub-id><pub-id pub-id-type="pmid">23334580</pub-id></element-citation></ref><ref id="bib22"><element-citation publication-type="preprint"><person-group person-group-type="author"><name><surname>Cueva</surname><given-names>CJ</given-names></name><name><surname>Wei</surname><given-names>XX</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Emergence of grid-like representations by training recurrent neural networks to perform spatial localization</article-title><source>arXiv</source><pub-id pub-id-type="doi">10.48550/arXiv.1803.07770</pub-id></element-citation></ref><ref id="bib23"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dannenberg</surname><given-names>H</given-names></name><name><surname>Kelley</surname><given-names>C</given-names></name><name><surname>Hoyland</surname><given-names>A</given-names></name><name><surname>Monaghan</surname><given-names>CK</given-names></name><name><surname>Hasselmo</surname><given-names>ME</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>The firing rate speed code of entorhinal speed cells differs across behaviorally relevant time scales and does not depend on medial septum inputs</article-title><source>The Journal of Neuroscience</source><volume>39</volume><fpage>3434</fpage><lpage>3453</lpage><pub-id pub-id-type="doi">10.1523/JNEUROSCI.1450-18.2019</pub-id><pub-id pub-id-type="pmid">30804092</pub-id></element-citation></ref><ref id="bib24"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dannenberg</surname><given-names>H</given-names></name><name><surname>Lazaro</surname><given-names>H</given-names></name><name><surname>Nambiar</surname><given-names>P</given-names></name><name><surname>Hoyland</surname><given-names>A</given-names></name><name><surname>Hasselmo</surname><given-names>ME</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Effects of visual inputs on neural dynamics for coding of location and running speed in medial entorhinal cortex</article-title><source>eLife</source><volume>9</volume><elocation-id>e62500</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.62500</pub-id><pub-id pub-id-type="pmid">33300873</pub-id></element-citation></ref><ref id="bib25"><element-citation publication-type="software"><person-group person-group-type="author"><name><surname>Dannenberg</surname><given-names>H</given-names></name></person-group><year iso-8601-date="2025">2025</year><data-title>Grid-cell-sequences</data-title><version designator="swh:1:rev:c79d1501ef42c5dbc10ca5f379e479a2da10c837">swh:1:rev:c79d1501ef42c5dbc10ca5f379e479a2da10c837</version><source>Software Heritage</source><ext-link ext-link-type="uri" xlink:href="https://archive.softwareheritage.org/swh:1:dir:c012a720f7b63fa1bb942c789214ca08f7a96025;origin=https://github.com/dannenberglab/grid-cell-sequences;visit=swh:1:snp:fc16302b88ffdebcbb60a3df4a5129340038cabd;anchor=swh:1:rev:c79d1501ef42c5dbc10ca5f379e479a2da10c837">https://archive.softwareheritage.org/swh:1:dir:c012a720f7b63fa1bb942c789214ca08f7a96025;origin=https://github.com/dannenberglab/grid-cell-sequences;visit=swh:1:snp:fc16302b88ffdebcbb60a3df4a5129340038cabd;anchor=swh:1:rev:c79d1501ef42c5dbc10ca5f379e479a2da10c837</ext-link></element-citation></ref><ref id="bib26"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Derdikman</surname><given-names>D</given-names></name><name><surname>Whitlock</surname><given-names>JR</given-names></name><name><surname>Tsao</surname><given-names>A</given-names></name><name><surname>Fyhn</surname><given-names>M</given-names></name><name><surname>Hafting</surname><given-names>T</given-names></name><name><surname>Moser</surname><given-names>M-B</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2009">2009</year><article-title>Fragmentation of grid cell maps in a multicompartment environment</article-title><source>Nature Neuroscience</source><volume>12</volume><fpage>1325</fpage><lpage>1332</lpage><pub-id pub-id-type="doi">10.1038/nn.2396</pub-id><pub-id pub-id-type="pmid">19749749</pub-id></element-citation></ref><ref id="bib27"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dombeck</surname><given-names>DA</given-names></name><name><surname>Harvey</surname><given-names>CD</given-names></name><name><surname>Tian</surname><given-names>L</given-names></name><name><surname>Looger</surname><given-names>LL</given-names></name><name><surname>Tank</surname><given-names>DW</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Functional imaging of hippocampal place cells at cellular resolution during virtual navigation</article-title><source>Nature Neuroscience</source><volume>13</volume><fpage>1433</fpage><lpage>1440</lpage><pub-id pub-id-type="doi">10.1038/nn.2648</pub-id><pub-id pub-id-type="pmid">20890294</pub-id></element-citation></ref><ref id="bib28"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dong</surname><given-names>C</given-names></name><name><surname>Madar</surname><given-names>AD</given-names></name><name><surname>Sheffield</surname><given-names>MEJ</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Distinct place cell dynamics in CA1 and CA3 encode experience in new environments</article-title><source>Nature Communications</source><volume>12</volume><elocation-id>2977</elocation-id><pub-id pub-id-type="doi">10.1038/s41467-021-23260-3</pub-id><pub-id pub-id-type="pmid">34016996</pub-id></element-citation></ref><ref id="bib29"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Eichenbaum</surname><given-names>H</given-names></name><name><surname>Cohen</surname><given-names>NJ</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Can we reconcile the declarative memory and spatial navigation views on hippocampal function?</article-title><source>Neuron</source><volume>83</volume><fpage>764</fpage><lpage>770</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2014.07.032</pub-id><pub-id pub-id-type="pmid">25144874</pub-id></element-citation></ref><ref id="bib30"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ekstrom</surname><given-names>AD</given-names></name><name><surname>Meltzer</surname><given-names>J</given-names></name><name><surname>McNaughton</surname><given-names>BL</given-names></name><name><surname>Barnes</surname><given-names>CA</given-names></name></person-group><year iso-8601-date="2001">2001</year><article-title>NMDA receptor antagonism blocks experience-dependent expansion of hippocampal “place fields”</article-title><source>Neuron</source><volume>31</volume><fpage>631</fpage><lpage>638</lpage><pub-id pub-id-type="doi">10.1016/s0896-6273(01)00401-9</pub-id><pub-id pub-id-type="pmid">11545721</pub-id></element-citation></ref><ref id="bib31"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Erdem</surname><given-names>UM</given-names></name><name><surname>Hasselmo</surname><given-names>ME</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>A biologically inspired hierarchical goal directed navigation model</article-title><source>Journal of Physiology, Paris</source><volume>108</volume><fpage>28</fpage><lpage>37</lpage><pub-id pub-id-type="doi">10.1016/j.jphysparis.2013.07.002</pub-id><pub-id pub-id-type="pmid">23891644</pub-id></element-citation></ref><ref id="bib32"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Fejes</surname><given-names>L</given-names></name></person-group><year iso-8601-date="1942">1942</year><article-title>Über die dichteste Kugellagerung</article-title><source>Mathematische Zeitschrift</source><volume>48</volume><fpage>676</fpage><lpage>684</lpage><pub-id pub-id-type="doi">10.1007/BF01180035</pub-id></element-citation></ref><ref id="bib33"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Fuhs</surname><given-names>MC</given-names></name><name><surname>Touretzky</surname><given-names>DS</given-names></name></person-group><year iso-8601-date="2006">2006</year><article-title>A spin glass model of path integration in rat medial entorhinal cortex</article-title><source>The Journal of Neuroscience</source><volume>26</volume><fpage>4266</fpage><lpage>4276</lpage><pub-id pub-id-type="doi">10.1523/JNEUROSCI.4353-05.2006</pub-id><pub-id pub-id-type="pmid">16624947</pub-id></element-citation></ref><ref id="bib34"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Fyhn</surname><given-names>M</given-names></name><name><surname>Molden</surname><given-names>S</given-names></name><name><surname>Witter</surname><given-names>MP</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name><name><surname>Moser</surname><given-names>MB</given-names></name></person-group><year iso-8601-date="2004">2004</year><article-title>Spatial representation in the entorhinal cortex</article-title><source>Science</source><volume>305</volume><fpage>1258</fpage><lpage>1264</lpage><pub-id pub-id-type="doi">10.1126/science.1099901</pub-id><pub-id pub-id-type="pmid">15333832</pub-id></element-citation></ref><ref id="bib35"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Fyhn</surname><given-names>M</given-names></name><name><surname>Hafting</surname><given-names>T</given-names></name><name><surname>Witter</surname><given-names>MP</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name><name><surname>Moser</surname><given-names>MB</given-names></name></person-group><year iso-8601-date="2008">2008</year><article-title>Grid cells in mice</article-title><source>Hippocampus</source><volume>18</volume><fpage>1230</fpage><lpage>1238</lpage><pub-id pub-id-type="doi">10.1002/hipo.20472</pub-id><pub-id pub-id-type="pmid">18683845</pub-id></element-citation></ref><ref id="bib36"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gardner</surname><given-names>RJ</given-names></name><name><surname>Hermansen</surname><given-names>E</given-names></name><name><surname>Pachitariu</surname><given-names>M</given-names></name><name><surname>Burak</surname><given-names>Y</given-names></name><name><surname>Baas</surname><given-names>NA</given-names></name><name><surname>Dunn</surname><given-names>BA</given-names></name><name><surname>Moser</surname><given-names>M-B</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2022">2022</year><article-title>Toroidal topology of population activity in grid cells</article-title><source>Nature</source><volume>602</volume><fpage>123</fpage><lpage>128</lpage><pub-id pub-id-type="doi">10.1038/s41586-021-04268-7</pub-id><pub-id pub-id-type="pmid">35022611</pub-id></element-citation></ref><ref id="bib37"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gatome</surname><given-names>CW</given-names></name><name><surname>Slomianka</surname><given-names>L</given-names></name><name><surname>Lipp</surname><given-names>HP</given-names></name><name><surname>Amrein</surname><given-names>I</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Number estimates of neuronal phenotypes in layer II of the medial entorhinal cortex of rat and mouse</article-title><source>Neuroscience</source><volume>170</volume><fpage>156</fpage><lpage>165</lpage><pub-id pub-id-type="doi">10.1016/j.neuroscience.2010.06.048</pub-id><pub-id pub-id-type="pmid">20600643</pub-id></element-citation></ref><ref id="bib38"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Geiller</surname><given-names>T</given-names></name><name><surname>Fattahi</surname><given-names>M</given-names></name><name><surname>Choi</surname><given-names>JS</given-names></name><name><surname>Royer</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Place cells are more strongly tied to landmarks in deep than in superficial CA1</article-title><source>Nature Communications</source><volume>8</volume><elocation-id>14531</elocation-id><pub-id pub-id-type="doi">10.1038/ncomms14531</pub-id><pub-id pub-id-type="pmid">28218283</pub-id></element-citation></ref><ref id="bib39"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gil</surname><given-names>M</given-names></name><name><surname>Ancau</surname><given-names>M</given-names></name><name><surname>Schlesiger</surname><given-names>MI</given-names></name><name><surname>Neitz</surname><given-names>A</given-names></name><name><surname>Allen</surname><given-names>K</given-names></name><name><surname>De Marco</surname><given-names>RJ</given-names></name><name><surname>Monyer</surname><given-names>H</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Impaired path integration in mice with disrupted grid cell firing</article-title><source>Nature Neuroscience</source><volume>21</volume><fpage>81</fpage><lpage>91</lpage><pub-id pub-id-type="doi">10.1038/s41593-017-0039-3</pub-id><pub-id pub-id-type="pmid">29230055</pub-id></element-citation></ref><ref id="bib40"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ginosar</surname><given-names>G</given-names></name><name><surname>Aljadeff</surname><given-names>J</given-names></name><name><surname>Burak</surname><given-names>Y</given-names></name><name><surname>Sompolinsky</surname><given-names>H</given-names></name><name><surname>Las</surname><given-names>L</given-names></name><name><surname>Ulanovsky</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Locally ordered representation of 3D space in the entorhinal cortex</article-title><source>Nature</source><volume>596</volume><fpage>404</fpage><lpage>409</lpage><pub-id pub-id-type="doi">10.1038/s41586-021-03783-x</pub-id><pub-id pub-id-type="pmid">34381211</pub-id></element-citation></ref><ref id="bib41"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ginosar</surname><given-names>G</given-names></name><name><surname>Aljadeff</surname><given-names>J</given-names></name><name><surname>Las</surname><given-names>L</given-names></name><name><surname>Derdikman</surname><given-names>D</given-names></name><name><surname>Ulanovsky</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Are grid cells used for navigation? On local metrics, subjective spaces, and black holes</article-title><source>Neuron</source><volume>111</volume><fpage>1858</fpage><lpage>1875</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2023.03.027</pub-id><pub-id pub-id-type="pmid">37044087</pub-id></element-citation></ref><ref id="bib42"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Giocomo</surname><given-names>LM</given-names></name><name><surname>Zilli</surname><given-names>EA</given-names></name><name><surname>Fransén</surname><given-names>E</given-names></name><name><surname>Hasselmo</surname><given-names>ME</given-names></name></person-group><year iso-8601-date="2007">2007</year><article-title>Temporal frequency of subthreshold oscillations scales with entorhinal grid cell field spacing</article-title><source>Science</source><volume>315</volume><fpage>1719</fpage><lpage>1722</lpage><pub-id pub-id-type="doi">10.1126/science.1139207</pub-id><pub-id pub-id-type="pmid">17379810</pub-id></element-citation></ref><ref id="bib43"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gleeson</surname><given-names>P</given-names></name><name><surname>Davison</surname><given-names>AP</given-names></name><name><surname>Silver</surname><given-names>RA</given-names></name><name><surname>Ascoli</surname><given-names>GA</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>A commitment to open source in neuroscience</article-title><source>Neuron</source><volume>96</volume><fpage>964</fpage><lpage>965</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2017.10.013</pub-id><pub-id pub-id-type="pmid">29216458</pub-id></element-citation></ref><ref id="bib44"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Grieves</surname><given-names>RM</given-names></name><name><surname>Jedidi-Ayoub</surname><given-names>S</given-names></name><name><surname>Mishchanchuk</surname><given-names>K</given-names></name><name><surname>Liu</surname><given-names>A</given-names></name><name><surname>Renaudineau</surname><given-names>S</given-names></name><name><surname>Duvelle</surname><given-names>É</given-names></name><name><surname>Jeffery</surname><given-names>KJ</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Irregular distribution of grid cell firing fields in rats exploring a 3D volumetric space</article-title><source>Nature Neuroscience</source><volume>24</volume><fpage>1567</fpage><lpage>1573</lpage><pub-id pub-id-type="doi">10.1038/s41593-021-00907-4</pub-id><pub-id pub-id-type="pmid">34381241</pub-id></element-citation></ref><ref id="bib45"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hafting</surname><given-names>T</given-names></name><name><surname>Fyhn</surname><given-names>M</given-names></name><name><surname>Molden</surname><given-names>S</given-names></name><name><surname>Moser</surname><given-names>MB</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2005">2005</year><article-title>Microstructure of a spatial map in the entorhinal cortex</article-title><source>Nature</source><volume>436</volume><fpage>801</fpage><lpage>806</lpage><pub-id pub-id-type="doi">10.1038/nature03721</pub-id><pub-id pub-id-type="pmid">15965463</pub-id></element-citation></ref><ref id="bib46"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hasselmo</surname><given-names>ME</given-names></name><name><surname>Giocomo</surname><given-names>LM</given-names></name><name><surname>Zilli</surname><given-names>EA</given-names></name></person-group><year iso-8601-date="2007">2007</year><article-title>Grid cell firing may arise from interference of theta frequency membrane potential oscillations in single neurons</article-title><source>Hippocampus</source><volume>17</volume><fpage>1252</fpage><lpage>1271</lpage><pub-id pub-id-type="doi">10.1002/hipo.20374</pub-id><pub-id pub-id-type="pmid">17924530</pub-id></element-citation></ref><ref id="bib47"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hasselmo</surname><given-names>ME</given-names></name></person-group><year iso-8601-date="2009">2009</year><article-title>A model of episodic memory: mental time travel along encoded trajectories using grid cells</article-title><source>Neurobiology of Learning and Memory</source><volume>92</volume><fpage>559</fpage><lpage>573</lpage><pub-id pub-id-type="doi">10.1016/j.nlm.2009.07.005</pub-id><pub-id pub-id-type="pmid">19615456</pub-id></element-citation></ref><ref id="bib48"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hawkins</surname><given-names>J</given-names></name><name><surname>Lewis</surname><given-names>M</given-names></name><name><surname>Klukas</surname><given-names>M</given-names></name><name><surname>Purdy</surname><given-names>S</given-names></name><name><surname>Ahmad</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>A framework for intelligence and cortical function based on grid cells in the neocortex</article-title><source>Frontiers in Neural Circuits</source><volume>12</volume><elocation-id>121</elocation-id><pub-id pub-id-type="doi">10.3389/fncir.2018.00121</pub-id><pub-id pub-id-type="pmid">30687022</pub-id></element-citation></ref><ref id="bib49"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Heys</surname><given-names>JG</given-names></name><name><surname>Dombeck</surname><given-names>DA</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Evidence for a subcircuit in medial entorhinal cortex representing elapsed time during immobility</article-title><source>Nature Neuroscience</source><volume>21</volume><fpage>1574</fpage><lpage>1582</lpage><pub-id pub-id-type="doi">10.1038/s41593-018-0252-8</pub-id><pub-id pub-id-type="pmid">30349104</pub-id></element-citation></ref><ref id="bib50"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Jacob</surname><given-names>PY</given-names></name><name><surname>Capitano</surname><given-names>F</given-names></name><name><surname>Poucet</surname><given-names>B</given-names></name><name><surname>Save</surname><given-names>E</given-names></name><name><surname>Sargolini</surname><given-names>F</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Path integration maintains spatial periodicity of grid cell firing in a 1D circular track</article-title><source>Nature Communications</source><volume>10</volume><elocation-id>840</elocation-id><pub-id pub-id-type="doi">10.1038/s41467-019-08795-w</pub-id><pub-id pub-id-type="pmid">30783085</pub-id></element-citation></ref><ref id="bib51"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Jeffery</surname><given-names>KJ</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Symmetries and asymmetries in the neural encoding of 3D space</article-title><source>Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences</source><volume>378</volume><elocation-id>20210452</elocation-id><pub-id pub-id-type="doi">10.1098/rstb.2021.0452</pub-id><pub-id pub-id-type="pmid">36511410</pub-id></element-citation></ref><ref id="bib52"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Jeffery</surname><given-names>KJ</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>The mosaic structure of the mammalian cognitive map</article-title><source>Learning &amp; Behavior</source><volume>52</volume><fpage>19</fpage><lpage>34</lpage><pub-id pub-id-type="doi">10.3758/s13420-023-00618-9</pub-id><pub-id pub-id-type="pmid">38231426</pub-id></element-citation></ref><ref id="bib53"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Karlsson</surname><given-names>MP</given-names></name><name><surname>Frank</surname><given-names>LM</given-names></name></person-group><year iso-8601-date="2008">2008</year><article-title>Network dynamics underlying the formation of sparse, informative representations in the hippocampus</article-title><source>The Journal of Neuroscience</source><volume>28</volume><fpage>14271</fpage><lpage>14281</lpage><pub-id pub-id-type="doi">10.1523/JNEUROSCI.4261-08.2008</pub-id></element-citation></ref><ref id="bib54"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Kittel</surname><given-names>C</given-names></name></person-group><year iso-8601-date="1966">1966</year><source>Introduction to Solid State Physics</source><publisher-name>Wiley</publisher-name></element-citation></ref><ref id="bib55"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kraus</surname><given-names>BJ</given-names></name><name><surname>Brandon</surname><given-names>MP</given-names></name><name><surname>Robinson</surname><given-names>RJ</given-names></name><name><surname>Connerney</surname><given-names>MA</given-names></name><name><surname>Hasselmo</surname><given-names>ME</given-names></name><name><surname>Eichenbaum</surname><given-names>H</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>During running in place, grid cells integrate elapsed time and distance run</article-title><source>Neuron</source><volume>88</volume><fpage>578</fpage><lpage>589</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2015.09.031</pub-id><pub-id pub-id-type="pmid">26539893</pub-id></element-citation></ref><ref id="bib56"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kunz</surname><given-names>L</given-names></name><name><surname>Schröder</surname><given-names>TN</given-names></name><name><surname>Lee</surname><given-names>H</given-names></name><name><surname>Montag</surname><given-names>C</given-names></name><name><surname>Lachmann</surname><given-names>B</given-names></name><name><surname>Sariyska</surname><given-names>R</given-names></name><name><surname>Reuter</surname><given-names>M</given-names></name><name><surname>Stirnberg</surname><given-names>R</given-names></name><name><surname>Stöcker</surname><given-names>T</given-names></name><name><surname>Messing-Floeter</surname><given-names>PC</given-names></name><name><surname>Fell</surname><given-names>J</given-names></name><name><surname>Doeller</surname><given-names>CF</given-names></name><name><surname>Axmacher</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Reduced grid-cell-like representations in adults at genetic risk for Alzheimer’s disease</article-title><source>Science</source><volume>350</volume><fpage>430</fpage><lpage>433</lpage><pub-id pub-id-type="doi">10.1126/science.aac8128</pub-id><pub-id pub-id-type="pmid">26494756</pub-id></element-citation></ref><ref id="bib57"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Laughlin</surname><given-names>SB</given-names></name><name><surname>Sejnowski</surname><given-names>TJ</given-names></name></person-group><year iso-8601-date="2003">2003</year><article-title>Communication in neuronal networks</article-title><source>Science</source><volume>301</volume><fpage>1870</fpage><lpage>1874</lpage><pub-id pub-id-type="doi">10.1126/science.1089662</pub-id><pub-id pub-id-type="pmid">14512617</pub-id></element-citation></ref><ref id="bib58"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Lee</surname><given-names>I</given-names></name><name><surname>Rao</surname><given-names>G</given-names></name><name><surname>Knierim</surname><given-names>JJ</given-names></name></person-group><year iso-8601-date="2004">2004</year><article-title>A double dissociation between hippocampal subfields: differential time course of CA3 and CA1 place cells for processing changed environments</article-title><source>Neuron</source><volume>42</volume><fpage>803</fpage><lpage>815</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2004.05.010</pub-id><pub-id pub-id-type="pmid">15182719</pub-id></element-citation></ref><ref id="bib59"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Lindeberg</surname><given-names>T</given-names></name></person-group><year iso-8601-date="2008">2008</year><source>Scale-Space. in Wiley Encyclopedia of Computer Science and Engineering 2495–2504</source><publisher-name>John Wiley &amp; Sons, Ltd</publisher-name><pub-id pub-id-type="doi">10.1002/9780470050118</pub-id></element-citation></ref><ref id="bib60"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Liu</surname><given-names>C</given-names></name><name><surname>Todorova</surname><given-names>R</given-names></name><name><surname>Tang</surname><given-names>W</given-names></name><name><surname>Oliva</surname><given-names>A</given-names></name><name><surname>Fernandez-Ruiz</surname><given-names>A</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Associative and predictive hippocampal codes support memory-guided behaviors</article-title><source>Science</source><volume>382</volume><elocation-id>eadi8237</elocation-id><pub-id pub-id-type="doi">10.1126/science.adi8237</pub-id><pub-id pub-id-type="pmid">37856604</pub-id></element-citation></ref><ref id="bib61"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Marr</surname><given-names>D</given-names></name></person-group><year iso-8601-date="2010">2010</year><source>Vision: A Computational Investigation into the Human Representation and Processing of Visual Information</source><publisher-loc>Cambridge, Mass</publisher-loc><publisher-name>MIT Press</publisher-name><pub-id pub-id-type="doi">10.7551/mitpress/9780262514620.001.0001</pub-id></element-citation></ref><ref id="bib62"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mathis</surname><given-names>A</given-names></name><name><surname>Herz</surname><given-names>AVM</given-names></name><name><surname>Stemmler</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Optimal population codes for space: grid cells outperform place cells</article-title><source>Neural Computation</source><volume>24</volume><fpage>2280</fpage><lpage>2317</lpage><pub-id pub-id-type="doi">10.1162/NECO_a_00319</pub-id><pub-id pub-id-type="pmid">22594833</pub-id></element-citation></ref><ref id="bib63"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mathis</surname><given-names>A</given-names></name><name><surname>Stemmler</surname><given-names>MB</given-names></name><name><surname>Herz</surname><given-names>AV</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Probable nature of higher-dimensional symmetries underlying mammalian grid-cell activity patterns</article-title><source>eLife</source><volume>4</volume><elocation-id>e05979</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.05979</pub-id><pub-id pub-id-type="pmid">25910055</pub-id></element-citation></ref><ref id="bib64"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>McNaughton</surname><given-names>BL</given-names></name><name><surname>Battaglia</surname><given-names>FP</given-names></name><name><surname>Jensen</surname><given-names>O</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name><name><surname>Moser</surname><given-names>MB</given-names></name></person-group><year iso-8601-date="2006">2006</year><article-title>Path integration and the neural basis of the “cognitive map”</article-title><source>Nature Reviews. Neuroscience</source><volume>7</volume><fpage>663</fpage><lpage>678</lpage><pub-id pub-id-type="doi">10.1038/nrn1932</pub-id><pub-id pub-id-type="pmid">16858394</pub-id></element-citation></ref><ref id="bib65"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Mehta</surname><given-names>MR</given-names></name><name><surname>Quirk</surname><given-names>MC</given-names></name><name><surname>Wilson</surname><given-names>MA</given-names></name></person-group><year iso-8601-date="2000">2000</year><article-title>Experience-dependent asymmetric shape of hippocampal receptive fields</article-title><source>Neuron</source><volume>25</volume><fpage>707</fpage><lpage>715</lpage><pub-id pub-id-type="doi">10.1016/s0896-6273(00)81072-7</pub-id><pub-id pub-id-type="pmid">10774737</pub-id></element-citation></ref><ref id="bib66"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Moser</surname><given-names>EI</given-names></name><name><surname>Moser</surname><given-names>MB</given-names></name><name><surname>McNaughton</surname><given-names>BL</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Spatial representation in the hippocampal formation: a history</article-title><source>Nature Neuroscience</source><volume>20</volume><fpage>1448</fpage><lpage>1464</lpage><pub-id pub-id-type="doi">10.1038/nn.4653</pub-id><pub-id pub-id-type="pmid">29073644</pub-id></element-citation></ref><ref id="bib67"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>O’Keefe</surname><given-names>J</given-names></name><name><surname>Burgess</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2005">2005</year><article-title>Dual phase and rate coding in hippocampal place cells: theoretical significance and relationship to entorhinal grid cells</article-title><source>Hippocampus</source><volume>15</volume><fpage>853</fpage><lpage>866</lpage><pub-id pub-id-type="doi">10.1002/hipo.20115</pub-id><pub-id pub-id-type="pmid">16145693</pub-id></element-citation></ref><ref id="bib68"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ólafsdóttir</surname><given-names>HF</given-names></name><name><surname>Carpenter</surname><given-names>F</given-names></name><name><surname>Barry</surname><given-names>C</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Coordinated grid and place cell replay during rest</article-title><source>Nature Neuroscience</source><volume>19</volume><fpage>792</fpage><lpage>794</lpage><pub-id pub-id-type="doi">10.1038/nn.4291</pub-id><pub-id pub-id-type="pmid">27089021</pub-id></element-citation></ref><ref id="bib69"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>O’Neill</surname><given-names>J</given-names></name><name><surname>Boccara</surname><given-names>CN</given-names></name><name><surname>Stella</surname><given-names>F</given-names></name><name><surname>Schoenenberger</surname><given-names>P</given-names></name><name><surname>Csicsvari</surname><given-names>J</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Superficial layers of the medial entorhinal cortex replay independently of the hippocampus</article-title><source>Science</source><volume>355</volume><fpage>184</fpage><lpage>188</lpage><pub-id pub-id-type="doi">10.1126/science.aag2787</pub-id><pub-id pub-id-type="pmid">28082591</pub-id></element-citation></ref><ref id="bib70"><element-citation publication-type="preprint"><person-group person-group-type="author"><name><surname>Peng</surname><given-names>J-J</given-names></name><name><surname>Throm</surname><given-names>B</given-names></name><name><surname>Jazi</surname><given-names>MN</given-names></name><name><surname>Yen</surname><given-names>T-Y</given-names></name><name><surname>Monyer</surname><given-names>H</given-names></name><name><surname>Allen</surname><given-names>K</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Grid cells perform path integration in multiple reference frames during self-motion-based navigation</article-title><source>bioRxiv</source><pub-id pub-id-type="doi">10.1101/2023.12.21.572857</pub-id></element-citation></ref><ref id="bib71"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Pröll</surname><given-names>M</given-names></name><name><surname>Häusler</surname><given-names>S</given-names></name><name><surname>Herz</surname><given-names>AVM</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Grid-cell activity on linear tracks indicates purely translational remapping of 2D firing patterns at movement turning points</article-title><source>The Journal of Neuroscience</source><volume>38</volume><fpage>7004</fpage><lpage>7011</lpage><pub-id pub-id-type="doi">10.1523/JNEUROSCI.0413-18.2018</pub-id><pub-id pub-id-type="pmid">29976622</pub-id></element-citation></ref><ref id="bib72"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Raju</surname><given-names>RV</given-names></name><name><surname>Guntupalli</surname><given-names>JS</given-names></name><name><surname>Zhou</surname><given-names>G</given-names></name><name><surname>Wendelken</surname><given-names>C</given-names></name><name><surname>Lázaro-Gredilla</surname><given-names>M</given-names></name><name><surname>George</surname><given-names>D</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>Space is A latent sequence: A theory of the hippocampus</article-title><source>Science Advances</source><volume>10</volume><elocation-id>eadm8470</elocation-id><pub-id pub-id-type="doi">10.1126/sciadv.adm8470</pub-id><pub-id pub-id-type="pmid">39083616</pub-id></element-citation></ref><ref id="bib73"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Roth</surname><given-names>ED</given-names></name><name><surname>Yu</surname><given-names>X</given-names></name><name><surname>Rao</surname><given-names>G</given-names></name><name><surname>Knierim</surname><given-names>JJ</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Functional differences in the backward shifts of CA1 and CA3 place fields in novel and familiar environments</article-title><source>PLOS ONE</source><volume>7</volume><elocation-id>e36035</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pone.0036035</pub-id><pub-id pub-id-type="pmid">22558316</pub-id></element-citation></ref><ref id="bib74"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Rueckemann</surname><given-names>JW</given-names></name><name><surname>Sosa</surname><given-names>M</given-names></name><name><surname>Giocomo</surname><given-names>LM</given-names></name><name><surname>Buffalo</surname><given-names>EA</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>The grid code for ordered experience</article-title><source>Nature Reviews. Neuroscience</source><volume>22</volume><fpage>637</fpage><lpage>649</lpage><pub-id pub-id-type="doi">10.1038/s41583-021-00499-9</pub-id><pub-id pub-id-type="pmid">34453151</pub-id></element-citation></ref><ref id="bib75"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sargolini</surname><given-names>F</given-names></name><name><surname>Fyhn</surname><given-names>M</given-names></name><name><surname>Hafting</surname><given-names>T</given-names></name><name><surname>McNaughton</surname><given-names>BL</given-names></name><name><surname>Witter</surname><given-names>MP</given-names></name><name><surname>Moser</surname><given-names>M-B</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2006">2006</year><article-title>Conjunctive representation of position, direction, and velocity in entorhinal cortex</article-title><source>Science</source><volume>312</volume><fpage>758</fpage><lpage>762</lpage><pub-id pub-id-type="doi">10.1126/science.1125572</pub-id><pub-id pub-id-type="pmid">16675704</pub-id></element-citation></ref><ref id="bib76"><element-citation publication-type="preprint"><person-group person-group-type="author"><name><surname>Schaeffer</surname><given-names>R</given-names></name><name><surname>Khona</surname><given-names>M</given-names></name><name><surname>Fiete</surname><given-names>IR</given-names></name></person-group><year iso-8601-date="2022">2022</year><article-title>No free lunch from deep learning in neuroscience: a case study through models of the entorhinal-hippocampal circuit</article-title><source>bioRxiv</source><pub-id pub-id-type="doi">10.1101/2022.08.07.503109</pub-id></element-citation></ref><ref id="bib77"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Schiller</surname><given-names>D</given-names></name><name><surname>Eichenbaum</surname><given-names>H</given-names></name><name><surname>Buffalo</surname><given-names>EA</given-names></name><name><surname>Davachi</surname><given-names>L</given-names></name><name><surname>Foster</surname><given-names>DJ</given-names></name><name><surname>Leutgeb</surname><given-names>S</given-names></name><name><surname>Ranganath</surname><given-names>C</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Memory and space: towards an understanding of the cognitive map</article-title><source>The Journal of Neuroscience</source><volume>35</volume><fpage>13904</fpage><lpage>13911</lpage><pub-id pub-id-type="doi">10.1523/JNEUROSCI.2618-15.2015</pub-id></element-citation></ref><ref id="bib78"><element-citation publication-type="preprint"><person-group person-group-type="author"><name><surname>Schøyen</surname><given-names>V</given-names></name><name><surname>Bechkov</surname><given-names>C</given-names></name><name><surname>Pettersen</surname><given-names>MB</given-names></name><name><surname>Hermansen</surname><given-names>E</given-names></name><name><surname>Holzhausen</surname><given-names>K</given-names></name><name><surname>Malthe-Sørenssen</surname><given-names>A</given-names></name><name><surname>Fyhn</surname><given-names>M</given-names></name><name><surname>Lepperød</surname><given-names>ME</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>Hexagons all the way down: grid cells as a conformal isometric map of space</article-title><source>bioRxiv</source><pub-id pub-id-type="doi">10.1101/2024.02.02.578585</pub-id></element-citation></ref><ref id="bib79"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Shipston-Sharman</surname><given-names>O</given-names></name><name><surname>Solanka</surname><given-names>L</given-names></name><name><surname>Nolan</surname><given-names>MF</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Continuous attractor network models of grid cell firing based on excitatory-inhibitory interactions</article-title><source>The Journal of Physiology</source><volume>594</volume><fpage>6547</fpage><lpage>6557</lpage><pub-id pub-id-type="doi">10.1113/JP270630</pub-id><pub-id pub-id-type="pmid">27870120</pub-id></element-citation></ref><ref id="bib80"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sorscher</surname><given-names>B</given-names></name><name><surname>Mel</surname><given-names>GC</given-names></name><name><surname>Ocko</surname><given-names>SA</given-names></name><name><surname>Giocomo</surname><given-names>LM</given-names></name><name><surname>Ganguli</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>A unified theory for the computational and mechanistic origins of grid cells</article-title><source>Neuron</source><volume>111</volume><fpage>121</fpage><lpage>137</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2022.10.003</pub-id><pub-id pub-id-type="pmid">36306779</pub-id></element-citation></ref><ref id="bib81"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sreenivasan</surname><given-names>S</given-names></name><name><surname>Fiete</surname><given-names>I</given-names></name></person-group><year iso-8601-date="2011">2011</year><article-title>Grid cells generate an analog error-correcting code for singularly precise neural computation</article-title><source>Nature Neuroscience</source><volume>14</volume><fpage>1330</fpage><lpage>1337</lpage><pub-id pub-id-type="doi">10.1038/nn.2901</pub-id><pub-id pub-id-type="pmid">21909090</pub-id></element-citation></ref><ref id="bib82"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Stella</surname><given-names>F</given-names></name><name><surname>Treves</surname><given-names>A</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>The self-organization of grid cells in 3D</article-title><source>eLife</source><volume>4</volume><elocation-id>e05913</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.05913</pub-id><pub-id pub-id-type="pmid">25821989</pub-id></element-citation></ref><ref id="bib83"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Stensola</surname><given-names>H</given-names></name><name><surname>Stensola</surname><given-names>T</given-names></name><name><surname>Solstad</surname><given-names>T</given-names></name><name><surname>Frøland</surname><given-names>K</given-names></name><name><surname>Moser</surname><given-names>M-B</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>The entorhinal grid map is discretized</article-title><source>Nature</source><volume>492</volume><fpage>72</fpage><lpage>78</lpage><pub-id pub-id-type="doi">10.1038/nature11649</pub-id></element-citation></ref><ref id="bib84"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Stensola</surname><given-names>T</given-names></name><name><surname>Stensola</surname><given-names>H</given-names></name><name><surname>Moser</surname><given-names>MB</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Shearing-induced asymmetry in entorhinal grid cells</article-title><source>Nature</source><volume>518</volume><fpage>207</fpage><lpage>212</lpage><pub-id pub-id-type="doi">10.1038/nature14151</pub-id><pub-id pub-id-type="pmid">25673414</pub-id></element-citation></ref><ref id="bib85"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Stensola</surname><given-names>T</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2016">2016</year><chapter-title>Grid cells and spatial maps in entorhinal cortex and hippocampus</chapter-title><person-group person-group-type="editor"><name><surname>Buzsáki</surname><given-names>G</given-names></name><name><surname>Christen</surname><given-names>Y</given-names></name></person-group><source>Micro-, Meso- and Macro-Dynamics of the Brain</source><publisher-name>Springer</publisher-name><fpage>59</fpage><lpage>80</lpage><pub-id pub-id-type="doi">10.1007/978-3-319-28802-4_5</pub-id></element-citation></ref><ref id="bib86"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sutton</surname><given-names>NM</given-names></name><name><surname>Gutiérrez-Guzmán</surname><given-names>BE</given-names></name><name><surname>Dannenberg</surname><given-names>H</given-names></name><name><surname>Ascoli</surname><given-names>GA</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>A continuous attractor model with realistic neural and synaptic properties quantitatively reproduces grid cell physiology</article-title><source>International Journal of Molecular Sciences</source><volume>25</volume><elocation-id>6059</elocation-id><pub-id pub-id-type="doi">10.3390/ijms25116059</pub-id><pub-id pub-id-type="pmid">38892248</pub-id></element-citation></ref><ref id="bib87"><element-citation publication-type="software"><person-group person-group-type="author"><name><surname>Sutton</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2025">2025</year><data-title>Gridcell_metrics</data-title><version designator="swh:1:rev:17ff57bbe2b412236e3f30cc0b354f115a68f740">swh:1:rev:17ff57bbe2b412236e3f30cc0b354f115a68f740</version><source>Software Heritage</source><ext-link ext-link-type="uri" xlink:href="https://archive.softwareheritage.org/swh:1:dir:35a69d4980657e00897ecc892366c6aa2a7958d3;origin=https://github.com/Hippocampome-Org/gridcell_metrics;visit=swh:1:snp:b2f9dd4ad007091879617ffd94785705dae7a210;anchor=swh:1:rev:17ff57bbe2b412236e3f30cc0b354f115a68f740">https://archive.softwareheritage.org/swh:1:dir:35a69d4980657e00897ecc892366c6aa2a7958d3;origin=https://github.com/Hippocampome-Org/gridcell_metrics;visit=swh:1:snp:b2f9dd4ad007091879617ffd94785705dae7a210;anchor=swh:1:rev:17ff57bbe2b412236e3f30cc0b354f115a68f740</ext-link></element-citation></ref><ref id="bib88"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sutton</surname><given-names>NM</given-names></name><name><surname>Gutiérrez-Guzmán</surname><given-names>BE</given-names></name><name><surname>Dannenberg</surname><given-names>H</given-names></name><name><surname>Ascoli</surname><given-names>GA</given-names></name></person-group><year iso-8601-date="2025">2025</year><article-title>Automated Measurement of Grid Cell Firing Characteristics</article-title><source>Algorithms</source><volume>18</volume><elocation-id>139</elocation-id><pub-id pub-id-type="doi">10.3390/a18030139</pub-id></element-citation></ref><ref id="bib89"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Thue</surname><given-names>A</given-names></name></person-group><year iso-8601-date="1910">1910</year><article-title>Über die dichteste zusammenstellung von kongruenten kreisen in einer ebene</article-title><source>Norske Vid. Selsk. Skr</source><volume>1</volume><fpage>1</fpage><lpage>9</lpage></element-citation></ref><ref id="bib90"><element-citation publication-type="preprint"><person-group person-group-type="author"><name><surname>Vollan</surname><given-names>AZ</given-names></name><name><surname>Gardner</surname><given-names>RJ</given-names></name><name><surname>Moser</surname><given-names>MB</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>Left-right-alternating theta sweeps in the entorhinal-hippocampal spatial ma</article-title><source>bioRxiv</source><pub-id pub-id-type="doi">10.1101/2024.05.16.594473</pub-id></element-citation></ref><ref id="bib91"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Waniek</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Hexagonal grid fields optimally encode transitions in spatiotemporal sequences</article-title><source>Neural Computation</source><volume>30</volume><fpage>2691</fpage><lpage>2725</lpage><pub-id pub-id-type="doi">10.1162/neco_a_01122</pub-id><pub-id pub-id-type="pmid">30148705</pub-id></element-citation></ref><ref id="bib92"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Waniek</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Transition scale-spaces: a computational theory for the discretized entorhinal cortex</article-title><source>Neural Computation</source><volume>32</volume><fpage>330</fpage><lpage>394</lpage><pub-id pub-id-type="doi">10.1162/neco_a_01255</pub-id><pub-id pub-id-type="pmid">31835003</pub-id></element-citation></ref><ref id="bib93"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wei</surname><given-names>XX</given-names></name><name><surname>Prentice</surname><given-names>J</given-names></name><name><surname>Balasubramanian</surname><given-names>V</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>A principle of economy predicts the functional architecture of grid cells</article-title><source>eLife</source><volume>4</volume><elocation-id>e08362</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.08362</pub-id><pub-id pub-id-type="pmid">26335200</pub-id></element-citation></ref><ref id="bib94"><element-citation publication-type="web"><person-group person-group-type="author"><name><surname>Weisstein</surname><given-names>EW</given-names></name></person-group><year iso-8601-date="2025">2025</year><article-title>Wolfram Mathworld</article-title><ext-link ext-link-type="uri" xlink:href="https://mathworld.wolfram.com">https://mathworld.wolfram.com</ext-link><date-in-citation iso-8601-date="2025-04-01">April 1, 2025</date-in-citation></element-citation></ref><ref id="bib95"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wernle</surname><given-names>T</given-names></name><name><surname>Waaga</surname><given-names>T</given-names></name><name><surname>Mørreaunet</surname><given-names>M</given-names></name><name><surname>Treves</surname><given-names>A</given-names></name><name><surname>Moser</surname><given-names>M-B</given-names></name><name><surname>Moser</surname><given-names>EI</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Integration of grid maps in merged environments</article-title><source>Nature Neuroscience</source><volume>21</volume><fpage>92</fpage><lpage>101</lpage><pub-id pub-id-type="doi">10.1038/s41593-017-0036-6</pub-id><pub-id pub-id-type="pmid">29230051</pub-id></element-citation></ref><ref id="bib96"><element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Williams</surname><given-names>LP</given-names></name></person-group><year iso-8601-date="1983">1983</year><article-title>Pyramidal parametrics</article-title><conf-name>SIGGRAPH ’83: Proceedings of the 10th annual conference on Computer graphics and interactive techniques</conf-name><fpage>1</fpage><lpage>11</lpage><pub-id pub-id-type="doi">10.1145/800059.801126</pub-id></element-citation></ref><ref id="bib97"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wilson</surname><given-names>MA</given-names></name><name><surname>McNaughton</surname><given-names>BL</given-names></name></person-group><year iso-8601-date="1993">1993</year><article-title>Dynamics of the hippocampal ensemble code for space</article-title><source>Science</source><volume>261</volume><fpage>1055</fpage><lpage>1058</lpage><pub-id pub-id-type="doi">10.1126/science.8351520</pub-id><pub-id pub-id-type="pmid">8351520</pub-id></element-citation></ref><ref id="bib98"><element-citation publication-type="preprint"><person-group person-group-type="author"><name><surname>Xu</surname><given-names>D</given-names></name><name><surname>Gao</surname><given-names>R</given-names></name><name><surname>Zhang</surname><given-names>WH</given-names></name><name><surname>Wei</surname><given-names>XX</given-names></name><name><surname>Wu</surname><given-names>YN</given-names></name></person-group><year iso-8601-date="2024">2024</year><article-title>On conformal isometry of grid cells: learning distance-preserving position embedding</article-title><source>arXiv</source><pub-id pub-id-type="doi">10.48550/arXiv.2405.16865</pub-id></element-citation></ref><ref id="bib99"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Yartsev</surname><given-names>MM</given-names></name><name><surname>Witter</surname><given-names>MP</given-names></name><name><surname>Ulanovsky</surname><given-names>N</given-names></name></person-group><year iso-8601-date="2011">2011</year><article-title>Grid cells without theta oscillations in the entorhinal cortex of bats</article-title><source>Nature</source><volume>479</volume><fpage>103</fpage><lpage>107</lpage><pub-id pub-id-type="doi">10.1038/nature10583</pub-id><pub-id pub-id-type="pmid">22051680</pub-id></element-citation></ref><ref id="bib100"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ying</surname><given-names>J</given-names></name><name><surname>Keinath</surname><given-names>AT</given-names></name><name><surname>Lavoie</surname><given-names>R</given-names></name><name><surname>Vigneault</surname><given-names>E</given-names></name><name><surname>El Mestikawy</surname><given-names>S</given-names></name><name><surname>Brandon</surname><given-names>MP</given-names></name></person-group><year iso-8601-date="2022">2022</year><article-title>Disruption of the grid cell network in a mouse model of early Alzheimer’s disease</article-title><source>Nature Communications</source><volume>13</volume><elocation-id>886</elocation-id><pub-id pub-id-type="doi">10.1038/s41467-022-28551-x</pub-id><pub-id pub-id-type="pmid">35173173</pub-id></element-citation></ref><ref id="bib101"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ying</surname><given-names>J</given-names></name><name><surname>Reboreda</surname><given-names>A</given-names></name><name><surname>Yoshida</surname><given-names>M</given-names></name><name><surname>Brandon</surname><given-names>MP</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>Grid cell disruption in a mouse model of early Alzheimer’s disease reflects reduced integration of self-motion cues</article-title><source>Current Biology</source><volume>33</volume><fpage>2425</fpage><lpage>2437</lpage><pub-id pub-id-type="doi">10.1016/j.cub.2023.04.065</pub-id><pub-id pub-id-type="pmid">37220744</pub-id></element-citation></ref><ref id="bib102"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zilli</surname><given-names>EA</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Models of grid cell spatial firing published 2005-2011</article-title><source>Frontiers in Neural Circuits</source><volume>6</volume><elocation-id>16</elocation-id><pub-id pub-id-type="doi">10.3389/fncir.2012.00016</pub-id><pub-id pub-id-type="pmid">22529780</pub-id></element-citation></ref><ref id="bib103"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zutshi</surname><given-names>I</given-names></name><name><surname>Leutgeb</surname><given-names>JK</given-names></name><name><surname>Leutgeb</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Theta sequences of grid cell populations can provide a movement-direction signal</article-title><source>Current Opinion in Behavioral Sciences</source><volume>17</volume><fpage>147</fpage><lpage>154</lpage><pub-id pub-id-type="doi">10.1016/j.cobeha.2017.08.012</pub-id><pub-id pub-id-type="pmid">29333481</pub-id></element-citation></ref><ref id="bib104"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zutshi</surname><given-names>I</given-names></name><name><surname>Fu</surname><given-names>ML</given-names></name><name><surname>Lilascharoen</surname><given-names>V</given-names></name><name><surname>Leutgeb</surname><given-names>JK</given-names></name><name><surname>Lim</surname><given-names>BK</given-names></name><name><surname>Leutgeb</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Recurrent circuits within medial entorhinal cortex superficial layers support grid cell firing</article-title><source>Nature Communications</source><volume>9</volume><elocation-id>3701</elocation-id><pub-id pub-id-type="doi">10.1038/s41467-018-06104-5</pub-id><pub-id pub-id-type="pmid">30209250</pub-id></element-citation></ref></ref-list></back><sub-article article-type="editor-report" id="sa0"><front-stub><article-id pub-id-type="doi">10.7554/eLife.96627.3.sa0</article-id><title-group><article-title>eLife Assessment</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>Peyrache</surname><given-names>Adrien</given-names></name><role specific-use="editor">Reviewing Editor</role><aff><institution>McGill University</institution><country>Canada</country></aff></contrib></contrib-group><kwd-group kwd-group-type="evidence-strength"><kwd>Solid</kwd></kwd-group><kwd-group kwd-group-type="claim-importance"><kwd>Valuable</kwd></kwd-group></front-stub><body><p>This <bold>valuable</bold> study presents a theoretical framework in which spatial periodicity in grid cell firing emerges as the optimal solution for encoding two-dimensional spatial trajectories via sequential neural activation. The idea is supported by <bold>solid</bold> evidence, though it rests on several key assumptions that merit careful consideration. This work will be of interest to neuroscientists investigating the neural mechanisms underlying spatial navigation.</p></body></sub-article><sub-article article-type="referee-report" id="sa1"><front-stub><article-id pub-id-type="doi">10.7554/eLife.96627.3.sa1</article-id><title-group><article-title>Reviewer #1 (Public review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>Summary:</p><p>This manuscript aims to explain the emergence of grid-like spatial firing patterns. Rather than taking the existence of grid cells as a given and asking what does their properties say about their function, the authors reverse the approach: they begin with a proposed computational function that the brain may need to perform-coding of 2D spatial trajectories using sequences of neural activity-and ask what type of neural code would optimally support this function. They show that, under a set of formal assumptions, such a code leads to the emergence of spatial periodicity and a hexagonal grid pattern. The aim is to provide a normative explanation for the existence of grid cells grounded in functional constraints.</p><p>Strengths:</p><p>The manuscript presents a mathematically well-defined framework that is internally consistent. The derivation is structured and leads to a hexagonal lattice as the most efficient solution for representing directional trajectories. The authors provide comparisons to experimental observations and extend the model to explain several findings in the grid cell literature. In the revised version, the discussion of foundational assumptions is expanded, and the manuscript better situates itself in relation to prior theoretical work. Overall, this work adds a very interesting view to the broader conversation about the role and origin of grid cells by offering a theoretical alternative grounded in trajectory coding.</p><p>Weaknesses:</p><p>The model depends on assumptions that, while plausible, should be treated as chosen assumptions. These include the premise that (1) grid function is trajectory coding, (2) that trajectory coding is implemented through sequences of neural activity, and (3) that such sequences are largely independent of spatial position. In the revised manuscript, the authors provide more literature to support these assumptions.</p></body></sub-article><sub-article article-type="referee-report" id="sa2"><front-stub><article-id pub-id-type="doi">10.7554/eLife.96627.3.sa2</article-id><title-group><article-title>Reviewer #2 (Public review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>Summary:</p><p>In this work, the authors consider the required functional properties of neurons that trajectories in 2D space using cell sequences, ultimately linking the required properties to those found in grid cells. In their argument, the authors first introduce a set of definitions and axioms, which then lead to their conclusion that a hexagonal pattern is the most efficient or parsimonious pattern one could use to uniquely label different 2D trajectories using sequences of cells. The authors then go through a set of classic experimental results in the grid cell literature - e.g. that the grid modules exhibit a multiplicative scaling, that the grid pattern expands with novelty or is warped by reward, etc. - and describe how these results are either consistent with or predicted by their theory. Overall, this paper asks a very interesting question and provides an intriguing answer.</p><p>Major strengths:</p><p>The general idea behind the paper is very interesting - why *does* the grid pattern take the form of a hexagonal grid? This is a question that has been raised many times; finding a truly satisfying answer is difficult but of great interest. The authors' main assertion that the answer to this question has to do with the ability of a hexagonal arrangement of neurons to uniquely encode 2D trajectories is an intriguing suggestion. It is also impressive that the authors considered such a wide range of experimental results in relation to their theory.</p><p>Major weaknesses:</p><p>One weakness I perceive is that the paper overstates what it delivers. In the introduction, the authors claim to provide &quot;mathematical proof that ... the nature of the problem being solved by grid cells is coding of trajectories in 2-D space using cell sequences. By doing so, we offer a specific answer to the question of why grid cell firing patterns are observed in the mammalian brain.&quot; By virtue of the fact that the authors make assumptions about biological function in their claims, this paper does not provide proof of what grid cells are doing to support behavior nor provide the true answer as to why grid patterns are found in the brain. Although I find this study both intriguing and important - and I respect the authors' perspective - as an experimentalist guided by the principle that biological theories are never proven but instead continually supported by data, suggestions of a proof of grid cell function are hard for me to get behind. Regardless, the paper presents a compelling line of reasoning that enhance our understanding of grid cells.</p></body></sub-article><sub-article article-type="referee-report" id="sa3"><front-stub><article-id pub-id-type="doi">10.7554/eLife.96627.3.sa3</article-id><title-group><article-title>Reviewer #3 (Public review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>Concerning the revised manuscript, the authors are to be commended for carefully addressing the reviewers' comments and updating the references cited.</p><p>I will differ with the authors' argument that Gardner et al's paper supports the idea of sequences, except in the most trivial sense, namely that topology implies continuity, and hence movement along the manifold will be continuous, and if one discretizes this movement, one would get a sequence.</p><p>This has very little to do with the idea that the authors propose in their manuscript. If the authors were to so choose, their idea will produce an embedded graph, and they could study the topology of this construct---but this would mean going off on a tangent.</p><p>Let us not hold up the authors to an impossible standard, namely that their theory should explain everything in the grid cell field. Not every finding under the sun needs be addressed in the discussion.</p><p>My own take on the manuscript had been that the authors' interesting idea might be fairly straightforwardly provable. The authors have decided to put another student on this particular project. That is perfectly OK. Just one final note: mathematically, the main focus ought to be on sequences of prime length (many other results will likely follow).</p></body></sub-article><sub-article article-type="author-comment" id="sa4"><front-stub><article-id pub-id-type="doi">10.7554/eLife.96627.3.sa4</article-id><title-group><article-title>Author response</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>RG</surname><given-names>Rebecca</given-names></name><role specific-use="author">Author</role><aff><institution>George Mason University</institution><addr-line><named-content content-type="city">Fairfax</named-content></addr-line><country>United States</country></aff></contrib><contrib contrib-type="author"><name><surname>Ascoli</surname><given-names>Giorgio A</given-names></name><role specific-use="author">Author</role><aff><institution>George Mason University</institution><addr-line><named-content content-type="city">Fairfax</named-content></addr-line><country>United States</country></aff></contrib><contrib contrib-type="author"><name><surname>Sutton</surname><given-names>Nate</given-names></name><role specific-use="author">Author</role><aff><institution>George Mason University</institution><addr-line><named-content content-type="city">Fairfax</named-content></addr-line><country>United States</country></aff></contrib><contrib contrib-type="author"><name><surname>Dannenberg</surname><given-names>Holger</given-names></name><role specific-use="author">Author</role><aff><institution>George Mason University</institution><addr-line><named-content content-type="city">Fairfax</named-content></addr-line><country>United States</country></aff></contrib></contrib-group></front-stub><body><p>The following is the authors’ response to the original reviews</p><disp-quote content-type="editor-comment"><p><bold>eLife assessment</bold></p><p>This valuable study aims to present a mathematical theory for why the periodicity of the hexagonal pattern of grid cell firing would be helpful for encoding 2D spatial trajectories. The idea is supported by solid evidence, but some of the comparisons of theory to the experimental data seem incomplete, and the reasoning supporting some of the assumptions made should be strengthened. The work would be of interest to neuroscientists studying neural mechanisms of spatial navigation.</p></disp-quote><p>We thank the reviewers for this assessment. We have addressed the comments made by reviewers and believe that the revised manuscript has theoretical and practical implications beyond the subfield of neuroscience concerned with mechanisms underpinning spatial memory and spatial navigation. Specifically, the demonstration that four simple axioms beget the spatial firing pattern of grid cells is highly relevant for the field of artificial intelligence and neuromorphic computing. This relevance stems from the fact that the four axioms define a set of four simple computational algorithms that can be implemented in future work in grid cell-inspired computational algorithms. Such algorithms will be impactful because they can perform path integration, a function that is independent of an animal’s or agent’s location and therefore generalizable. Moreover, because of the functional organization of grid cells into modules, the algorithm is also scalable. Generalizability and scalability are two highly sought-after properties of brain-inspired computational frameworks. We also believe that the question why grid cells emerge in the brain is a fundamental one. This manuscript is, to our knowledge, the first one that provides an interpretable and intuitive answer to why grid cells are observed in the brain.</p><p>Before addressing each comment, we would like to point out that the first sentence of the assessment appears misphrased. The study does not aim to present a theory for why the periodicity in grid cell firing would be helpful for encoding 2D spatial trajectories. To present a theory “for why grid cell firing would be helpful for encoding 2D trajectories”, one assumes the existence of grid cells a priori. Instead of assuming the existence of grid cells and deriving a computational function from grid cells, our study derives grid cells from a computational function, as correctly summarized by reviewers #1 and #3 in their individual statements. In contrast to previous normative models, we prove mathematically that spatial periodicity in grid cell firing is implied by a sequence code of trajectories. If the brain uses cell sequences to code for trajectories, spatially periodic firing must emerge. As correctly pointed out by reviewer #1, the underlying assumptions of this study are that the brain codes for trajectories and that it does so using cell sequences. In response to comments by reviewer #1, we now discuss these two assumptions more rigorously.</p><disp-quote content-type="editor-comment"><p><bold>Public Reviews:</bold></p><p><bold>Reviewer #1 (Public Review):</bold></p><p>Rebecca R.G. et al. set to determine the function of grid cells. They present an interesting case claiming that the spatial periodicity seen in the grid pattern provides a parsimonious solution to the task of coding 2D trajectories using sequential cell activation. Thus, this work defines a probable function grid cells may serve (here, the function is coding 2D trajectories), and proves that the grid pattern is a solution to that function. This approach is somewhat reminiscent in concept to previous works that defined a probable function of grid cells (e.g., path integration) and constructed normative models for that function that yield a grid pattern. However, the model presented here gives clear geometric reasoning to its case.</p><p>Stemming from 4 axioms, the authors present a concise demonstration of the mathematical reasoning underlying their case. The argument is interesting and the reasoning is valid, and this work is a valuable addition to the ongoing body of work discussing the function of grid cells.</p><p>However, the case uses several assumptions that need to be clearly stated as assumptions, clarified, and elaborated on: Most importantly, the choice of grid function is grounded in two assumptions:</p><p>(1) that the grid function relies on the activation of cell sequences, and</p><p>(2) that the grid function is related to the coding of trajectories. While these are interesting and valid suggestions, since they are used as the basis of the argument, the current justification could be strengthened (references 28-30 deal with the hippocampus, reference 31 is interesting but cannot hold the whole case).</p></disp-quote><p>We thank this reviewer for the overall positive and constructive criticism. We agree with this reviewer that our study rests on two premises, namely that (1) a code for trajectories exist, and (2) this code is implemented by cell sequences. We now discuss and elaborate on the data in the literature supporting the two premises.</p><p>In addition to the work by Zutshi et al. (reference 31 in the original manuscript), we have now cited additional work presenting experimental evidence for sequential activity of neurons in the medial entorhinal cortex, including sequential activity of grid cells.</p><p>We have added the following paragraph to the Discussion section:</p><p>“Recent studies provided compelling evidence for sequential activity of neurons representing spatial trajectories. In particular, Gardner et al. (2022) demonstrated that the sequential activity of hundreds of simultaneously recorded grid cells in freely foraging rats represented spatial trajectories. Complementary preliminary results indicate that grid cells exhibit left-rightalternating “theta sweeps,” characterized by temporally compressed sequences of spiking activity that encode outwardly oriented trajectories from the current location (Vollan et al., 2024).</p><p>The concept of sequential grid cell activity extends beyond spatial coding. In various experimental contexts, grid cells have been shown to encode non-spatial variables. For instance, in a stationary auditory task, grid cells fired at specific sounds along a continuous frequency axis (Aronov et al., 2017). Further studies revealed that grid cell sequences also represent elapsed time and distance traversed, such as during a delay period in a spatial alternation task (Kraus et al., 2015). Similar findings were reported for elapsed time encoded by grid cell sequences in mice performing a virtual “Door Stop” task (Heys and Dombeck, 2018).</p><p>Additionally, spatial trajectories represented by temporally compressed grid cell sequences have been observed during sleep as replay events (Ólafsdóttir et al., 2016; O’Neill et al., 2017). Collectively, these studies demonstrate that sequential activity of neurons within the MEC, particularly grid cells, consistently encodes ordered experiences, suggesting a fundamental role for temporal structure in neuronal representations.</p><p>The theoretical underpinnings of grid cell activity coding for ordered experiences have been explored previously by Rueckemann et al. (2021) who argued that the temporal order in grid cell activation allows for the construction of topologically meaningful representations, or neural codes, grounded in the sequential experience of events or spatial locations. However, while Rueckemann et al. argue that the MEC supports temporally ordered representations through grid cell activity, our findings suggest an inverse relationship: namely, that grid cell activity emerges from temporally ordered spatial experiences. Additional studies demonstrate that hippocampal place cells may derive their spatial coding properties from higher-order sequence learning that integrates sensory and motor inputs (Raju et al., 2024) and that hexagonal grids, if assumed a priori, optimally encode transitions in spatiotemporal sequences (Waniek, 2018).</p><p>Together, experimental and theoretical evidence demonstrate the significance of sequential neuronal activity within the hippocampus and entorhinal cortex as a core mechanism for representing both spatial and temporal information and experiences.”</p><disp-quote content-type="editor-comment"><p>The work further leans on the assumption that sequences in the same direction should be similar regardless of their position in space, it is not clear why that should necessarily be the case, and how the position is extracted for similar sequences in different positions.</p></disp-quote><p>We thank this reviewer for giving us the opportunity to clarify this point. We define a trajectory as a path taken in space (Definition 6). By this definition, a code for trajectories is independent of the animal’s spatial location. This is consistent with the definition of path integration, which is also independent of an animal’s spatial location. If the number of neurons is finite (Axiom #4) and the space is large, sequences must eventually repeat in different locations. This results in neural sequences coding for the same directions being identical at different locations. We have clarified this point under new Remark 6.1. in the Results section of the revised:</p><p>“Remark 6.1. Note that a code for trajectories is independent of the animal’s spatial location, consistent with the definition of path integration. This implies that, if the number of neurons is finite (Axiom #4) and the space is large, sequences must eventually repeat in different location, resulting in neural sequences coding for the same trajectories at different locations.”</p><p>The formal proof was already included in the original manuscript: “Generally speaking, starting in a firing field of element i and going along any set of firing fields, some element must eventually become active again since the total number of elements is finite by axiom 4. Once there is a repeat of one element’s firing field, the whole sequence of firing fields of all elements must repeat by axiom 1. More specifically, if we had a sequence 1,2, … , k, 1, t of elements, then 1,2 and 1, t both would code for traveling in the same direction from element 1, contradicting axiom 1.”</p><p>Further: “More explicitly, assuming axioms 1 and 4, the firing fields of trajectory-coding elements must be spatially periodic, in the sense that starting at any point and continuing in a single direction, the initial sequence of locally active elements must eventually repeat with a repeat length of at least 3”.</p><p>Regarding the question how an animal’s position is extracted for similar sequences in different positions, we agree with this reviewer that this is an important question when investigating the contributions of grid cells to the coding of space. However, since a code for trajectories is independent of spatial location, the question of how to extract an animal’s position from a trajectory code is irrelevant for this study.</p><p>While a trajectory code by neural sequences begets grid cells, a spatial code by neural sequences does not. Nevertheless, grid cells could contribute to the coding of space (in addition to providing a trajectory code). However, while experimental evidence from studies with rodents and human subjects and theoretical work demonstrated the importance of grid cells for path integration (Fuhs and Touretzky, 2006; McNaughton et al., 2006; Moser et al., 2017), experimental studies have shown that grid cells contribute little to the coding of space by place cells (Hales et al., 2014). Yet, theoretical work (Mathis et al., 2012) showed that coherent activity of grid cells across different modules can provide a code for spatial location that is more accurate than spatial coding by place cells in the hippocampus. Importantly, such a spatial code by coherent activity across grid cell modules does not require location-dependent differences in neural sequences.</p><disp-quote content-type="editor-comment"><p>The authors also strengthen their model with the requirement that grid cells should code for infinite space. However, the grid pattern anchors to borders and might be used to code navigated areas locally. Finally, referencing ref. 14, the authors claim that no existing theory for the emergence of grid cell firing that unifies the experimental observations on periodic firing patterns and their distortions under a single framework. However, that same reference presents exactly that - a mathematical model of pairwise interactions that unifies experimental observations. The authors should clarify this point.</p></disp-quote><p>We thank this reviewer for this valuable feedback. We agree that grid cells anchor to borders and may be used to code navigated areas locally. In fact, the trajectory code performs a local function, namely path integration, and the global grid pattern can only emerge from performing this local computation if the activity of at least one grid unit or element (we changed the wording from unit to element based on feedback from reviewer #3) is anchored to either a spatial location or a border. Yet, the trajectory code itself does not require anchoring to a reference frame to perform local path integration. Because of the local nature of the trajectory code, path integration can be performed locally without the emergence of a global grid pattern. This has been shown experimentally in mice performing a path integration task where changes in the location of a task-relevant object resulted in translations of grid patterns in single trials. Although no global grid pattern was observed, grid cells performed path integration locally within the multiple reference frames defined by the task-relevant object, and grid patterns were visible when the changes in the references frames were accounted for in computing the rate maps (Peng et al., 2023). The data by Peng et al. (2023) confirm that the anchoring of the grid pattern to borders and the emergence of the global pattern are not required for local coding of trajectories. The global pattern emerges only when the reference frame does not change. However, this global pattern itself might not serve any function. According to the trajectory code model, the beguiling grid pattern is merely a byproduct of a local path integration function that is independent of the animal’s current location (which makes the code generalizable across space). The reviewer is correct that, if the reference frame used to anchor the grid pattern did not change in infinite space, the trajectory code model of grid cell firing would predict an infinite global pattern. But does the proof implicitly assume that space is infinite? The trajectory code model makes the quantitative prediction that the field size increases linearly with an increase in grid spacing (the distance between two fields). If the field size remains fixed, periodicity will emerge in finite spaces that are larger than the grid spacing. We have clarified these points in the revised manuscript:</p><p>“Notably, the trajectory code itself does not require anchoring to a reference frame to perform local path integration. Because of the local nature of the trajectory code, path integration can be performed locally without the emergence of a global grid pattern. This has been shown experimentally in mice performing a path integration task where changes in the location of a task-relevant object resulted in translations of grid patterns in single trials (Peng et al., 2023). Although no global grid pattern was observed because the reference frame was not fixed in space, grid cells performed path integration locally within the reference frame defined by the moving task-relevant object, and grid patterns were visible when the changes in the references frames were accounted for in computing the rate maps”.</p><p>Regarding how the emergence of grid cells from a trajectory code relates to the theory of a local code by grid cells brought forward by Ginosar et al. (ref. 14), we argue that the local computational function suggested by Ginosar et al. is to provide a code for trajectories. The perspective article by Ginosar et al. provides an excellent review of the experimental data on grid cells that point to grid cells performing a local function (see also Kate Jeffery’s excellent review article (Jeffery, 2024) on the mosaic structure of the mammalian cognitive map.) Assuming the existence of grid cells a priori, Ginosar et al. then propose three possible functions of grid cells, all of which are consistent with the trajectory code model of grid cell firing. Yet, the perspective article remains agnostic, in our opinion, on the exact nature of the local computation that is carried out by grid cells. But without knowing the local computation underlying grid cell function, a unifying theory explaining the emergence of grid cells cannot be considered complete. In contrast, our manuscript identifies the local computational function as a trajectory code by cell sequences. We have clarified these points in the revised manuscript:</p><p>“The influential hypothesis that grid cells provide a universal map for space is challenged by experimental data suggesting a yet to be identified local computational function of grid cells (Ginosar et al., 2023; Jeffery, 2024). Here, we identify this local computational function as a trajectory code.”</p><p>The mathematical model of pairwise interactions described by Ginosar et al. is fundamentally different from the mathematical framework developed in our manuscript. The mathematical model by Ginosar et al. describes how pairwise interactions between already existent grid fields can explain distortions in the grid pattern caused by the environment’s geometry, reward zones, and dimensionality. However, the model does not explain why there is a grid pattern in the first place. In contrast, our trajectory model provides an explanation for why grid cells may exist by demonstrating that a grid pattern emerges from a trajectory code by cell sequences. We stand by our assessment that a unifying theory of grid cells is not complete if it takes the existence of the grid pattern for granted.</p><disp-quote content-type="editor-comment"><p><bold>Reviewer #2 (Public Review):</bold></p><p>Summary:</p><p>In this work, the authors consider why grid cells might exhibit hexagonal symmetry - i.e., for what behavioral function might this hexagonal pattern be uniquely suited? The authors propose that this function is the encoding of spatial trajectories in 2D space. To support their argument, the authors first introduce a set of definitions and axioms, which then lead to their conclusion that a hexagonal pattern is the most efficient or parsimonious pattern one could use to uniquely label different 2D trajectories using sequences of cells. The authors then go through a set of classic experimental results in the grid cell literature - e.g. that the grid modules exhibit a multiplicative scaling, that the grid pattern expands with novelty or is warped by reward, etc. - and describe how these results are either consistent with or predicted by their theory. Overall, this paper asks a very interesting question and provides an intriguing answer. However, the theory appears to be extremely flexible and very similar to ideas that have been previously proposed regarding grid cell function.</p></disp-quote><p>We thank this reviewer for carefully reading the manuscript and their valuable feedback which helps us clarify major points of the study. One major clarification is that the theoretical/axiomatic framework we put forward does not assume grid cells a priori. In contrast, we start by hypothesizing a computational function that a brain region shown to be important for path integration likely needs to solve, namely coding for spatial trajectories. We go on to show that this computational function begets spatially periodic firing (grid maps). By doing so, we provide mathematical proof that grid maps emerge from solving a local computational function, namely spatial coding of trajectories. Showing the emergence of grid maps from solving a local computational function is fundamentally different from many previous studies on grid cell function, which assign potential functions to the existing grid pattern. As we discuss in the manuscript, our work is similar to using normative models of grid cell function. However, in contrast to normative models, we provide a rigorous and interpretable mathematical framework which provides geometric reasoning to its case.</p><disp-quote content-type="editor-comment"><p>Major strengths:</p><p>The general idea behind the paper is very interesting - why *does* the grid pattern take the form of a hexagonal grid? This is a question that has been raised many times; finding a truly satisfying answer is difficult but of great interest to many in the field. The authors' main assertion that the answer to this question has to do with the ability of a hexagonal arrangement of neurons to uniquely encode 2D trajectories is an intriguing suggestion. It is also impressive that the authors considered such a wide range of experimental results in relation to their theory.</p></disp-quote><p>We thank this reviewer for pointing out the significance of the question addressed by our manuscript.</p><disp-quote content-type="editor-comment"><p>Major weaknesses:</p><p>One major weakness I perceive is that the paper overstates what it delivers, to an extent that I think it can be a bit confusing to determine what the contributions of the paper are. In the introduction, the authors claim to provide &quot;mathematical proof that ... the nature of the problem being solved by grid cells is coding of trajectories in 2-D space using cell sequences. By doing so, we offer a specific answer to the question of why grid cell firing patterns are observed in the mammalian brain.&quot; This paper does not provide proof of what grid cells are doing to support behavior or provide the true answer as to why grid patterns are found in the brain. The authors offer some intriguing suggestions or proposals as to why this might be based on what hexagonal patterns could be good for, but I believe that the language should be clarified to be more in line with what the authors present and what the strength of their evidence is.</p></disp-quote><p>We thank this reviewer for this assessment. While there is ample experimental evidence demonstrating the importance of grid cells for path integration, we agree with this reviewer that there may be other computational functions that may require or largely benefit from the existence of grid cells. We now acknowledge the fact that we have provided a likely teleological cause for the emergence of grid cells and that there might be other causes for the emergence of grid cells. We have changed the wording in the abstract and discussion sections to acknowledge that our study does provide a likely teleological cause. We choose “likely” because the computational function – trajectory coding – from which grid maps emerge is very closely associated to path integration, which numerous experimental and theoretical studies associate with grid cell function.</p><disp-quote content-type="editor-comment"><p>Relatedly, the authors claim that they find a teleological reason for the existence of grid cells - that is, discover the function that they are used for. However, in the paper, they seem to instead assume a function based on what is known and generally predicted for grid cells (encode position), and then show that for this specific function, grid cells have several attractive properties.</p></disp-quote><p>We agree with this reviewer that we leveraged what is known about grid cells, in particular their importance for path integration, in finding a likely teleological cause. However, the major significance of our work is that we demonstrate that coding for spatial trajectories requires spatially periodic firing (grid cells).This is very different from assuming the existence of grid cells a priori and then showing that grid cells have attractive, if not optimal, properties for this function. If we had shown that grid cells optimized a code for trajectories, this reviewer would be correct: we would have suggested just another potential function of grid cells. Instead, we provide both proof and intuition that trajectory coding by cell sequences begets grid cells (not the other way around), thereby providing a likely teleological cause for the emergence of grid cells. As stated above, we clarified in the revised manuscript that we provide a likely teleological cause which requires additional experimental verification.</p><disp-quote content-type="editor-comment"><p>There is also some other work that seems very relevant, as it discusses specific computational advantages of a grid cell code but was not cited here: <ext-link ext-link-type="uri" xlink:href="https://www.nature.com/articles/nn.2901">https://www.nature.com/articles/nn.2901</ext-link>.</p></disp-quote><p>We thank this reviewer for pointing us toward this article by (Sreenivasan and Fiete, 2011). The revised manuscript now cites this article in the Introduction and Discussion sections. We agree that the article by (Sreenivasan and Fiete, 2011) discusses a specific computational advantage of a population code by grid cells, namely unprecedented robustness to noise in estimating the location from the spiking information of noisy neurons. However, the work by (Sreenivasan and Fiete, 2011) differs from our work in that the authors assume the existence of grid cells a priori.</p><p>In addition, we now discuss other relevant work, namely work on the conformal isometry hypothesis by (Schøyen et al., 2024) and (Xu et al., 2024), published as pre-prints after publication of the first version of our manuscript, as well as work on transition scale- spaces by Nicolai Waniek. (Xu et al., 2024) and (Schøyen et al., 2024) investigate conformal isometry in the coding of space by grid cells. Conformal isometry means that trajectories in neural space map trajectories in physical space. (Xu et al., 2024) show that the conformal isometry hypothesis can explain the spatially periodic firing pattern of grid cells. (Schøyen et al., 2024) further show that a module of seven grid cells emerges if space is encoded as a conformal isometry, ensuring equal representation in all directions. While the work by (Xu et al., 2024) and (Schøyen et al., 2024) arrive at very similar conclusions as stated in the current manuscript, the conformal isometry hypothesis provides only a partial answer to why grid cells exist because it doesn’t explain why conformal isometry is important or required. In contrast, a sequence code of trajectories provides an intuitive answer to why such a code is important for animal behavior. Furthermore, we included the work by Nicolai Waniek, (2018, 2020) in the Discussion, who demonstrated that the hexagonal arrangement of grid fields is optimal for coding transitions in space.</p><p>The paragraph added to the Discussion reads as follows:</p><p>“As part of the proof that a trajectory code by cell sequences begets spatially periodic firing fields, we proved that the centers of the firing fields must be arranged in a hexagonal lattice. This arrangement implies that the neural space is a conformally isometric embedding of physical space, so that local displacements in neural space are proportional to local displacements of an animal or agent in physical space, as illustrated in Figure 5. This property has recently been introduced in the grid cell literature as the conformal isometry hypothesis(Schøyen et al., 2024; Xu et al., 2024). Strikingly, Schøyen et al.(Schøyen et al., 2024) arrive at similar if not identical conclusions regarding the geometric principles in the neural representations of space by grid cells.”</p><disp-quote content-type="editor-comment"><p>A second major weakness was that some of the claims in the section in which they compared their theory to data seemed either confusing or a bit weak. I am not a mathematician, so I was not able to follow all of the logic of the various axioms, remarks, or definitions to understand how the authors got to their final conclusion, so perhaps that is part of the problem. But below I list some specific examples where I could not follow why their theory predicted the experimental result, or how their theory ultimately operated any differently from the conventional understanding of grid cell coding. In some cases, it also seemed that the general idea was so flexible that it perhaps didn't hold much predictive power, as extra details seemed to be added as necessary to make the theory fit with the data.</p><p>I don't quite follow how, for at least some of their model predictions, the 'sequence code of trajectories' theory differs from the general attractor network theory. It seems from the introduction that these theories are meant to serve different purposes, but the section of the paper in which the authors claim that various experimental results are predicted by their theory makes this comparison difficult for me to understand. For example, in the section describing the effect of environmental manipulations in a familiar environment, the authors state that the experimental results make sense if one assumes that sequences are anchored to landmarks. But this sounds just like the classic attractornetwork interpretation of grid cell activity - that it's a spatial metric that becomes anchored to landmarks.</p></disp-quote><p>We thank this reviewer for giving us the opportunity to clarify in what aspects the ‘sequence code of trajectories’ theory of grid cell firing differs from the classic attractor network models, in particular the continuous attractor network (CAN) model. First of all, the CAN model is a mechanistic model of grid cell firing that is specifically designed to simulate spatially periodic firing of grid cells in response to velocity inputs. In contrast, the sequence code of trajectories theory of grid cell firing resembles a normative model showing that grid cells emerge from performing a specific function. However, in contrast to previous normative models, the sequence code of trajectories model grounds the emergence of grid cell firing in a mathematical proof and both geometric reasoning and intuition. The proof demonstrates that the emergence of grid cells is the only solution to coding for trajectories using cell sequences. The sequence code of trajectories model of grid cell firing is agnostic about the neural mechanisms that implements the sequence code in a population of neurons. One plausible implementation of the sequence code of trajectories is in fact a CAN. In fact, the sequence code of trajectories theory predicts conformal isometry in the CAN, i.e., a trajectory in neural space is proportional to a trajectory of an animal in physical space. However, other mechanistic implementations are possible. We have clarified how the sequence code of trajectories theory of grid cells relates to the mechanistic CAN models of grid cells.</p><p>We added the following text to the Discussion section:</p><p>“While the sequence code of trajectories-model of grid cell firing is agnostic about the neural mechanisms that implements the sequence code, one plausible implementation is a continuous attractor network (McNaughton et al., 2006; Burak and Fiete, 2009). Interestingly, a sequence code of trajectories begets conformal isometry in the attractor network, i.e., a trajectory in neural space is proportional to a trajectory of an animal in physical space.”</p><disp-quote content-type="editor-comment"><p>It was not clear to me why their theory predicted the field size/spacing ratio or the orientation of the grid pattern to the wall.</p></disp-quote><p>We thank this reviewer for bringing to our attention that we lacked a proper explanation for why the sequence code of trajectories theory predicts the field size/spacing ration in grid maps. We have modified/added the following text to the Results section of the manuscript to clarify this point:</p><p>“Because the sequence code of trajectories model of grid cell firing implies a dense packing of firing fields, the spacing between two adjacent grid fields must change linearly with a change in field size. It follows that the ratio between grid spacing and field size is fixed. When using the distance between the centers of two adjacent grid fields to measure grid spacing and a diameter-like metric to measure grid field size, we can compute the ratio of grid spacing to grid field size as √7≈2.65 (see Methods).”</p><p>We are also grateful for this reviewer’s correctly pointing out that the explanation as to why the sequence code of trajectories predicts a rotation of the grid pattern relative to a set of parallel walls in a rectangular environment. We have now made explicit the underlying premise that a sequence of firing fields from multiple grid cells are aligned in parallel to a nearby wall of the environment. We cite additional experimental evidence supporting this premise. Concretely, we quote Stensola and Moser summarizing results reported in (Stensola et al. 2015): “A surprising observation, however, was that modules typically assumed one of only four distinct orientation configurations relative to the environment” (Stensola and Moser, 2016). Importantly, all of the four distinct orientations show the characteristic angular rotation. Intriguingly, this is predicted by the sequence code of trajectories-model under the premise that a sequence of firing fields aligns with one of the geometric boundaries of the environment, as shown in Author response image 1 below.</p><fig id="sa4fig1" position="float"><label>Author response image 1.</label><caption><title>Under the premise that a sequence of firing fields aligns with one of the geometric boundaries (walls) of a square arena, there are precisely four possible distinct configurations of orientations.</title><p>This is precisely what has been observed in experiments (Stensola et al., 2015; Stensola and Moser, 2016).</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-96627-sa4-fig1-v1.tif"/></fig><p>We added clarifying language to the Results section: “Under the premise that a sequence of firing fields aligns with one of the geometric boundaries of the environment, the sequence code model explains that the grid pattern typically assume one of only four distinct orientation configurations relative to the environment41,46. Concretely, the four orientation configurations arise when one row of grid fields aligns with one of the two sets of parallel walls in a rectangular environment, and each arrangement can result in two distinct orientations (Figure 3B).”</p><disp-quote content-type="editor-comment"><p>I don't understand how repeated advancement of one unit to the next, as shown in Figure 4E, would cause the change in grid spacing near a reward.</p></disp-quote><p>In familiar environments, spatial firing fields of place cells in hippocampal CA1 and CA3 tend to shift backwards with experience (Mehta et al., 2000; Lee et al., 2004; Roth et al., 2012; Geiller et al., 2017; Dong et al., 2021). This implies that the center of place fields move closer to each other. A potential mechanism has been suggested, namely NMDA receptor-dependent longterm synaptic plasticity (Ekstrom et al., 2001). When we apply the same principle observed for place fields on a linear track to grid fields anchored to a reward zone, grid fields will “gravitate” towards the reward side. A similar idea has been presented by (Ginosar et al., 2023) who use the analogy of reward locations as “black holes”. In contrast to (Ginosar et al., 2023), who we cite multiple times, our idea unifies observations on place cells and grid cells in 1-D and 2-D environments and suggests a potential mechanism. We changed the wording in the revised manuscript and clarified the underlying premises.</p><disp-quote content-type="editor-comment"><p>I don't follow how this theory predicts the finding that the grid pattern expands with novelty. The authors propose that this occurs because the animals are not paying attention to fine spatial details, and thus only need a low-resolution spatial map that eventually turns into a higher-resolution one. But it's not clear to me why one needs to invoke the sequence coding hypothesis to make this point.</p></disp-quote><p>We agree with this reviewer that this point needs clarification. The sequence code model adds explanatory power to the hypothesis that the grid pattern in a novel environment reflects a lowresolution mapping of space or spatial trajectories because it directly links spatial resolution to both field size and spacing of a grid map. Concretely, the spatial resolution of the trajectory code is equivalent to the spacing between two adjacent spatial fields, and the spatial resolution is directly proportional to the grid spacing and field size. If one did not evoke the sequence coding hypothesis, one would need to explain how and why both spacing and field size are related to the spatial resolution of the grid map. Lastly, as written in the manuscript text, we point out that, while the experimentally observed expansion of grid maps is consistent with the sequence code of trajectory, it is not predicted by the theory without making further assumption.</p><disp-quote content-type="editor-comment"><p>The last section, which describes that the grid spacing of different modules is scaled by the square root of 2, says that this is predicted if the resolution is doubled or halved. I am not sure if this is specifically a prediction of the sequence coding theory the authors put forth though since it's unclear why the resolution should be doubled or halved across modules (as opposed to changed by another factor).</p></disp-quote><p>We agree with reviewer #2 that the exact value of the scaling factor is not predicted by the sequence coding theory. E.g., the sequence code theory does not explain why the spatial resolution doesn’t change by a factor 3 or 1.5 (resulting in changes in grid spacing by square root of 3 or square root of 1.5, respectively). We have changed the wording to reflect this important point. We further clarified in the revised manuscript that future work on multiscale representations using modules of grid cells needs to show why changing the spatial resolution across modules by a factor of 2 is optimal. Interestingly, a scale ratio of 2 is commonly used in computer vision, specifically in the context of mipmapping and Gaussian pyramids, to render images across different scales. Literature in the computer vision field describes why a scaling factor of 2 and the use of Gaussian filter kernels (compare with Gaussian firing fields) is useful in allowing a smooth and balanced transition between successive levels of an image pyramid (Burt and Adelson, 1983; Lindeberg, 2008). Briefly, larger factors (like 3) could result in excessive loss of detail between levels, while smaller factors (like 1.5) would not reduce the image size enough to justify additional levels of computation (that would come with the structural cost of having more grid cell modules in the brain). We have clarified these points in the Discussion section.</p><disp-quote content-type="editor-comment"><p><bold>Reviewer #3 (Public Review):</bold></p><p>The manuscript presents an intriguing explanation for why grid cell firing fields do not lie on a lattice whose axes aligned to the walls of a square arena. This observation, by itself, merits the manuscript's dissemination to the eLife's audience.</p></disp-quote><p>We thank this reviewer for their positive assessment.</p><disp-quote content-type="editor-comment"><p>The presentation is quirky (but keep the quirkiness!).</p></disp-quote><p>We kept the quirkiness.</p><disp-quote content-type="editor-comment"><p>But let me recast the problem presented by the authors as one of combinatorics. Given repeating, spatially separated firing fields across cells, one obtains temporal sequences of grid cells firing. Label these cells by integers from <inline-formula><mml:math id="sa4m1"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>n</mml:mi><mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:mstyle></mml:math></inline-formula>. Any two cells firing in succession should uniquely identify one of six directions (from the hexagonal lattice) in which the agent is currently moving.</p><p>Now, take the symmetric group <inline-formula><mml:math id="sa4m2"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi mathvariant="normal">Σ</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> of cyclic permutations on <inline-formula><mml:math id="sa4m3"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> elements. We ask whether there are cyclic permutations of <inline-formula><mml:math id="sa4m4"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>n</mml:mi><mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:mstyle></mml:math></inline-formula> such that<disp-formula id="sa4equ1"><mml:math id="sa4m5"><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>π</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>−</mml:mo><mml:msub><mml:mi>π</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mspace width="1em"/><mml:mi>mod</mml:mi><mml:mspace width="thinmathspace"/><mml:mspace width="thinmathspace"/><mml:mi>n</mml:mi><mml:mo>≠</mml:mo><mml:mo>±</mml:mo><mml:mn>1</mml:mn><mml:mspace width="1em"/><mml:mi>mod</mml:mi><mml:mspace width="thinmathspace"/><mml:mspace width="thinmathspace"/><mml:mi>n</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace"/><mml:mi mathvariant="normal">∀</mml:mi><mml:mi>i</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p><p>So, for instance, <inline-formula><mml:math id="sa4m6"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>4</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mn>3</mml:mn><mml:mo>,</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mstyle></mml:math></inline-formula> would not be counted as a valid permutation of <inline-formula><mml:math id="sa4m7"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mn>3</mml:mn><mml:mo>,</mml:mo><mml:mn>4</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mstyle></mml:math></inline-formula>, as <inline-formula><mml:math id="sa4m8"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mn>3</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mstyle></mml:math></inline-formula> and <inline-formula><mml:math id="sa4m9"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>4</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mstyle></mml:math></inline-formula> are adjacent.</p><p>Furthermore, given <inline-formula><mml:math id="sa4m10"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>n</mml:mi><mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:mstyle></mml:math></inline-formula>, are there two distinct cyclic permutations such that <italic>no</italic> adjacencies are preserved when considering any pair of permutations (among the triple of the original ordered sequence and the two permutations)? In other words, if we consider the permutation required to take the first permutation into the second, that permutation should not preserve any adjacencies.</p><p><bold>Key question</bold>: is there any difference between the solution to the combinatorics problem sketched above and the result in the manuscript? Specifically, the text argues that for <inline-formula><mml:math id="sa4m11"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn>7</mml:mn></mml:mrow></mml:mstyle></mml:math></inline-formula> there is only <italic>one</italic> solution.</p><p>Ideally, one would strive to obtain a closed-form solution for the number of such permutations as a function of <inline-formula><mml:math id="sa4m12"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula>.</p></disp-quote><p>This is a great question! We currently have a student working on describing all possible arrangements of firing fields (essentially labelings of the hexagonal lattice) that satisfy the axioms in 2D, and we expect that results on the number of such arrangements will come out of his work. We plan to publish those results separately, possibly targeting a more mathematical audience.</p><p>The argument above appears to only apply in the case that every row (and every diagonal) contains all of the elements 1,...,n. However, when n is not prime, there are often arrangements where rows and/or diagonals do not contain every element from 1,...,n. For example, some admissible patterns with 9 neurons have a repeat length of 3 in all directions (horizontally and both diagonals). As a result the construction listed here will not give a full count of all possible arrangements.</p><disp-quote content-type="editor-comment"><p><bold>Recommendations for the authors:</bold></p><p><bold>Reviewer #1 (Recommendations For The Authors):</bold></p><p>I think the concise style of mathematical proof is both a curse and a blessing. While it delivers the message, I think the fluency and readability of the mathematical proof could be improved with longer paragraphs and some more editing.</p></disp-quote><p>We have added some clarifications in the text that we hope improve the readability.</p><disp-quote content-type="editor-comment"><p><bold>Reviewer #3 (Recommendations For The Authors):</bold></p><p>A minor qualm I have with the nomenclature:</p><p>On page 7:</p><p>“To prove this statement, suppose that row A consists of units <inline-formula><mml:math id="sa4m13"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> repeating in this order. Then any row that contains any unit from <inline-formula><mml:math id="sa4m14"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> must contain the full repeat <inline-formula><mml:math id="sa4m15"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> by axiom 1. So any row containing any unit from <inline-formula><mml:math id="sa4m16"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> is a translation of row A, and any unit that does not contain them is disjoint from row A.”</p><p>The last use of `unit' at the end of this paragraph instead of `row' is confusing. Technically, the authors have given themselves license to use this term by defining a unit to be “either to a single cell or a cell assembly”. Yet modern algebra tends to use `unit' as meaning a ring element that has an inverse.</p></disp-quote><p>We have renamed “unit” to “element” to avoid confusion with the terminology in modern algebra.</p></body></sub-article></article>