On Conformal Isometry of Grid Cells: Learning Distance-Preserving Position Embedding

Dehong Xu, Ruiqi Gao, Wen-Hao Zhang, Xue-Xin Wei, Ying Nian Wu

TL;DR

This paper proposes that the brain’s grid cells form a "conformal isometric embedding" of physical space, meaning they represent locations in a way that preserves local distances. The researchers demonstrate both mathematically and through neural network simulations that hexagonal firing patterns are the most efficient way to achieve this distance-preserving mapping, providing a fundamental geometric explanation for why these specific patterns emerge in the brain.

What Problem Does This Paper Address?

Since their discovery, grid cells in the medial entorhinal cortex have fascinated neuroscientists because of their striking hexagonal firing patterns. While many models (like Continuous Attractor Neural Networks or RNNs trained on path integration) can replicate these patterns, the deep mathematical "why" has remained somewhat elusive.

The authors tackle the conformal isometry hypothesis: the idea that the high-dimensional vector of neural activity representing an agent's position should "mirror" the geometry of the 2D physical world. Specifically, if an agent moves a small distance in the real world, the corresponding "distance" between neural activity states should be proportional to that physical movement. This property is crucial for navigation tasks like path planning, where the brain needs to calculate straight-line trajectories.

Methods

The researchers used a "minimalistic setting" to isolate the core principles of grid cell formation without unnecessary biological assumptions. Their approach involved:

  1. Position Embedding: Representing a 2D position $x$ as a high-dimensional neural vector $v(x)$.
  2. Loss Function Optimization: They trained models to minimize a two-part loss function:
  3. Conformal Isometry Loss ($L_1$): Forces the neural distance between two points to match their physical distance (scaled by a factor $s$).
  4. Transformation Loss ($L_2$): Ensures that the neural representation updates consistently as the agent moves (path integration).
  5. Model Agnosticism: They tested this across various architectures, including linear models and non-linear RNNs with different activation functions (ReLU, Tanh, GELU, Swish).
  6. Theoretical Proof: They performed a high-order Taylor expansion of the neural manifold to prove that a hexagonal "flat torus" minimizes the deviation from perfect distance preservation compared to other shapes like squares or rectangles.
Figure 1: (a) The self-position x = (x1, x2) in 2D Euclidean space is represented by a vector v(x) in the d-dimensional neural space. When the agent moves by ∆x, the vector is transformed to v(x + ∆x) = F(v(x), ∆x). (b) F(·, ∆x) is a representation of the self-motion ∆x. (c) M = (v(x), x ∈D) is a 2D manifold in the neural space, and is an embedding of the 2D Euclidean domain D.

Datasets

  • Simulated Environments: The models were trained on a simulated 1m x 1m square environment with a 40x40 lattice.
  • Real Neural Data: To validate their hypothesis, the authors analyzed real-world rodent grid cell recordings from the Gardner et al. (2021) dataset, which used Neuropixels probes to record hundreds of neurons simultaneously.

Key Insights and Ideas

  • Hexagons are Geometrically Optimal: The "aha moment" of the paper is the proof that hexagonal symmetry is the most "isotropic" way to fold a 2D plane into a high-dimensional space while keeping distances consistent in all directions. Other symmetries (like square grids) create distortions that increase the error in distance representation.
  • Independence from Architecture: Hexagonal patterns emerged regardless of the specific neural network used. This suggests that the grid pattern isn't a quirk of biological "hardware" but a mathematical necessity for any system trying to preserve local distance.
  • Torus Topology: The joint activity of grid cells naturally resides on a 2D torus (a donut shape). The paper shows that when you project this high-dimensional "neural donut" back down, the hexagonal grid is what you see.
Toroidal analysis showing that grid cell activities reside on a 2D twisted torus manifold.

Key Results

  • Superior Gridness: The models achieved "gridness scores" (a measure of how hexagonal the pattern is) of 1.70 for linear models and 1.17 for non-linear models, significantly outperforming previous learning-based approaches which typically score below 1.0.
  • Biological Validation: Analysis of real rodent data confirmed a clear linear relationship between neural distance and physical distance for small displacements, supporting the conformal isometry hypothesis.
  • Scale Control: The researchers found that the scaling factor $s$ in their loss function directly controls the size of the grid fields; a larger $s$ leads to smaller, higher-resolution grids.
Learned hexagonal firing patterns across different scaling factors (s).

Limitations and Future Work

  • Minimalist Scope: The study focused on a single module of grid cells in isolation. In the brain, grid cells interact with place cells and are influenced by environmental boundaries and landmarks.
  • Biological Implementation: While the paper shows that distance preservation leads to hexagons, it doesn't fully detail the exact biological mechanism (e.g., specific synaptic plasticity rules) that implements this "conformal modulation" in a living brain.
  • Beyond Space: The authors suggest that this principle might apply to non-spatial "cognitive maps" (like representing relationships between concepts), which is a promising avenue for future research in general artificial intelligence.

Summary updated

Abstract

This paper investigates the conformal isometry hypothesis as a potential explanation for the hexagonal periodic patterns in grid cell response maps. We posit that grid cell activities form a high-dimensional vector in neural space, encoding the agent's position in 2D physical space. As the agent moves, this vector rotates within a 2D manifold in the neural space, driven by a recurrent neural network. The conformal hypothesis proposes that this neural manifold is a conformal isometric embedding of 2D physical space, where local physical distance is preserved by the embedding up to a scaling factor (or unit of metric). Such distance-preserving position embedding is indispensable for path planning in navigation, especially planning local straight path segments. We conduct numerical experiments to show that this hypothesis leads to the hexagonal grid firing patterns by learning maximally distance-preserving position embedding, agnostic to the choice of the recurrent neural network. Furthermore, we present a theoretical explanation of why hexagon periodic patterns emerge by minimizing our loss function by showing that hexagon flat torus is maximally distance preserving.
BibTeX
@inproceedings{xu2025conformal,
  author = {Dehong Xu and Ruiqi Gao and Wen-Hao Zhang and Xue-Xin Wei and Ying Nian Wu},
  title = {{On Conformal Isometry of Grid Cells: Learning Distance-Preserving Position Embedding}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=Xo0Q1N7CGk},
}
Figure