Grid Cells 3D

A Blender-built arena: a rat explores while each spike drops a peg; the pegs trace the hexagonal lattice of the cell.

Presets

Playback

Camera

Layers

Quality

Model check

The science

A hexagonal lattice of firing fields

Grid cells in the medial entorhinal cortex (Hafting, Fyhn, Moser & Moser, 2005) fire at the vertices of a triangular lattice that tiles the whole environment. A compact model that reproduces this is the sum of three plane waves whose wave vectors are 60° apart: s(r) = Σj=1..3 cos(kj·(r − r0)) with |k| = 4π/(√3 λ), where λ is the spacing between neighbouring fields and r0 is the spatial phase. The firing rate is the rectified, sharpened sum R(r) = Rmax [(s + 1.5)/4.5]γ: s runs from −1.5 to 3, so the bracket runs from 0 to 1. The density of fields is 2/(√3 λ2).

Measuring gridness

The animal wanders; spikes and time spent are binned (5 cm bins), smoothed, and divided to get a rate map. The map's spatial autocorrelogram (Pearson correlation of the map with a shifted copy of itself) shows a hexagon of peaks around the centre. The grid score (Sargolini et al., 2006) takes a ring that contains the six nearest peaks, rotates it, and computes min(r60, r120) − max(r30, r90, r150). A hexagonal pattern correlates well with itself at 60° and 120° and poorly at 30°, 90° and 150°, so a good grid cell scores above about 0.3 in real data and above 1 for an ideal lattice. The six peaks also give the spacing directly.

Modules and decoding

Grid cells come in discrete modules whose spacings form a geometric series with ratio about 1.4 (Stensola et al., 2012). One module only gives position modulo its lattice: the same pattern of activity recurs every wavelength. Two modules with spacings λ1 < λ2 are unambiguous out to about λ1λ2/(λ2 − λ1) (a vernier or Chinese-remainder code), and more modules extend the range further. The page decodes position by maximum likelihood from Poisson spike counts in the last second: ln L(x) = Σi [ ni ln Ri(x) − T Ri(x) ], evaluated on a 30 × 30 grid of candidate places, and reports the mean error.

Path integration and drift

Grid firing is believed to be driven by integrating velocity. Integration noise adds a random walk to the internal position, e(t), with ⟨|e|2⟩ = 4 D t in two dimensions, so the fields drift out of register with the room and the rate map smears. Landmarks (modelled as an exponential pull with a time constant of 2 s) keep the error bounded.

Four in-page numerical checks

1. Gridness: the grid score of the ideal analytic map must exceed 0.8. 2. Spacing: the spacing found from the autocorrelogram peaks must equal the wavelength used to build the pattern (within 5 %). 3. Drift: the mean squared error of 4000 simulated random walkers after 10 s must match 4Dt within four standard errors. 4. Poisson spiking: the total number of spikes must match the integral of the rates along the path (z-test).

Honest simplifications

Real grid cells show elliptical, irregular and jittered fields, speed and theta modulation, border and boundary effects, and realistic spike statistics (bursting). The plane-wave model has none of these. The animal moves as a correlated random walk (no goals), the decoder knows the cell tuning exactly, modules are two-dimensional lattices with a few phases only, and the arena is a plain square. The firing-rate formula and parameters are illustrative; no recordings are used.

Loading model...
Loading Blender model...
Grid score of the measured rate map vs time
Position decoded from the population: error vs time
Selected cell: firing rate along the path and spikes
Made with 🟠 Blender · Three.js