Fig 1.
a) Illustration of the ψ measure for 6-fold symmetry. Left: A reference ‘atom’ (black disc) with four neighbors (colored discs). Arcs show the angles, ϕl, to a reference axis (dashed black line) for all neighbors l ∈ {1, 2, 3, 4}. The blueish neighbors lie on the corners of a hexagon. The red neighbor is a defect to this hexagonal structure. Right: Sum of four unit vectors with directions given by 6ϕl (colored arcs). Vectors associated with neighbors that lie on the corners of the same hexagon (blueish colors) point in the same direction. The vector associated with the defect (red) points in a different direction. The length |ψ| of the resulting vector, normalized by the number of neighbors (black arrow), quantifies how much the reference atom is embedded in a hexagonal structure. The direction arg(ψ) of the vector—divided by 6 to reverse the previous rotation—indicates the orientation of the hexagon. b) Detection of the neighborhood shell. Locations of spikes of a grid cell and smoothed histogram of the pairwise distances between all spikes. Dashed lines indicate the automatically detected neighborhood shell. Top: Generated data. Bottom: Experimental recording kindly provided by [10]. c) Preventing false positives by discarding other symmetries. Example |ψ(M)| and values for a spike (black) with few neighbors (blue) in six different configurations. d) Same spike maps as in b, color-coded with the spike-based grid score
(left) and the spike-based orientation
(right).
Fig 2.
Algorithm to compute spike-based grid scores and orientations θk and their averages Ψ and Θ.
Fig 3.
Quantifying the global symmetry of firing patterns.
a) Generated spike maps in a 1m × 1m arena. Each spike k is color-coded with its grid score ; global Ψ score shown above. Top: Perfect grid. Middle: Weakly perturbed grid field locations. Bottom: Strong perturbations. See text for description of perturbations. b) Autocorrelograms of the spike maps shown in a; ρ score shown above. c) Decay of Ψ score (top) and ρ score (bottom) with increasing noise on grid field locations. Box plot for 100 random realizations at each noise level. For details on the box plot see S1 Appendix. Noise values for the examples shown in a are indicated with markers. d) Correlation of Ψ score with ρ score and Pearson’s coefficient r for the generated data used in a, b, c. e) Same as d but with experimentally recorded data from [6, 16].
Fig 4.
Quantifying the global symmetry of firing patterns in the presence of shearing distortions or background noise.
a, b) Arrangement as in Fig 3a and 3b, but for generated spike maps with different degrees of shearing. Top: No shearing. Middle: Weak shearing. Bottom: Strong shearing. c) Arrangement as in Fig 3c but with increasing shearing strength on the horizontal axis. Shearing strengths for the examples shown in a are indicated with markers. d, e) Arrangement as in a, b, but for generated spike maps with different degrees of background noise. Top: No background noise. Middle: Weak background noise. Bottom: Strong background noise. f) Arrangement as in c but with increasing background noise (i.e., fraction of spikes drawn from a spatially homogeneous distribution) on the horizontal axis. Background noise levels for the examples shown in d are indicated with markers.
Fig 5.
Classifying grid cells with the spike-based and the correlogram-based grid score.
a) Venn diagram of 619 recordings from cells in mEC. Different colors highlight areas with different classification results (classification by Ψ and/or ρ score positive/negative). See text for a description of the classification method. b) Correlation of Ψ and ρ score as in Fig 3e. Markers represent the classification of the cell using the color code and the symbols from a. c, d, e, f, g) Individual recordings in different classification categories. The category is indicated by the marker on the left, using the scheme in a. From left to right: spike map with each spike k color-coded with its grid score (global Ψ score shown above); smoothed spike density (“rate map”), brighter values indicate higher density of spikes; autocorrelogram of the rate map (ρ score shown above); smoothed histogram of pairwise distances of all spikes, dashed orange lines show automatically detected neighborhood shells. See text for a detailed description of all examples. Experimental data recorded and made publicly available by Sargolini et al. [6] through [16].
Fig 6.
Visualizing and quantifying local distortions of grid patterns.
a, b) Generated spike locations with noise on grid field locations applied only on the east side of the arena (see text for details, 2 example cells). The color of each spike location shows the score. Shown above: Ψ score. c) East-west (left) and south-north (right) partitioning of the arena. Black lines show partition boundaries. Colors of partitions indicate the Ψ score within the partition for the examples in a (top) and b (bottom). d) Ψ score in partitions along west-east axis (dark blue) and south-north axis (light blue). Crosses show results for 10 randomly generated spike maps with noise on field locations applied only on the east side. Filled circles indicate the mean over 10 realizations. e) Spike locations of two example cells recorded in a rat that explored the northern and southern half of a box. The two halves are separated by a wall (dashed gray line). The spikes in each half were recorded in separate sessions. Color-coding as in a. f) Spike locations of the two cells shown in e while the rat explored the entire arena after the separating wall was removed. g) Grid score in south-north partitions before wall removal (left) and after wall removal (right) for the cells in e, f. Color-coding as in c. h)Ψ scores in the south-north partitions shown in g for 11 recorded cells. Crosses denote individual cells, filled circles the mean across cells. Ψ scores before wall removal in dark blue, Ψ scores after wall removal in light blue. i)Ψ scores in west-east partitions for the cells in e, f. Arrangement as in g. j)Ψ scores in the west-east partitions shown in i. Same recordings and arrangement as in h. Data in panels e-j kindly provided by [19].
Fig 7.
Visualizing and quantifying local changes in orientation of grid patterns.
a, b, c, d) From left to right: spike locations; spike locations where each spike is color-coded with its score (global Ψ score shown above); autocorrelogram of the firing pattern (ρ score shown above); spike locations where each spike is color coded with its orientation θk (global orientation Θ shown above); four different spatial partitionings of the arena where black lines show partition boundaries and colors of partitions show the average orientation within each partition (mean of θk values) using the orientation color-code. a) Generated perfect grid pattern with orientation of 10 degrees. b) Generated grid pattern with abrupt change in orientation. c) Generated grid pattern with drifting orientation. d) Experimentally recorded grid pattern with drift in orientation. e) Four further experimental examples and the average of their spike-based orientation values in west-east and south-north partitionings. f) Orientations along west-east and south-north in the partitions shown in e. Data kindly provided by Stensola et al. [10].
Fig 8.
Quantifying temporal disruptions of grid patterns.
a) Generated spike locations with 2000 spikes (left). Each spike k is color-coded with its grid score . The first 1000 spikes are drawn from a spatially uniform distribution (top right) and the last 1000 spikes are drawn from a perfect grid (bottom right), at a constant rate of 1 spike per second. b)
scores in a as a function of spike time. Note that the score of many spikes is 0. c) The scores from b, filtered with a 100 second time window (dotted lines indicate window size). d) Two experimentally recorded spike maps, color coded with
scores. The recordings are 52 minutes in total and contain 13 trials in light (with an illuminated cue card) and 13 trials in darkness, each of 2 minutes duration. e) The
scores as a function of time, filtered with a 1 minute window. From top to bottom: First cell from d; second cell from d; mean over both cells. Shadings indicate light trials. Pearson’s correlation coefficients, r, between lighting condition and filtered grid scores are shown for each scenario. f) Spike maps for cell 1 and cell 2, separated into spikes fired during light trials and spikes fired during dark trials. g) Temporal evolution of grid scores after changes in lighting condition. Each 2 minute trial was separated into 12 × 10 second blocks. Each point shows the mean
score of all spikes in a time block in light trials (light blue) and dark trials (dark blue), averaged over 73 grid cells. Grid scores are calculated in reference to all spikes during light trials (see text for details). Experimental data recorded and made publicly available by Pérez-Escobar et al. [21].
Fig 9.
A spike-based grid score for other symmetries.
a) Adaptation of the score to 4-fold symmetry. Shown above: average over all spikes. b) Adaptation of the
score to 2-fold symmetry. Shown above: average over all spikes. See text for details.