Fig. 4: Preserved temporal relationships and spatial offsets of grid cells across behaviors.

a, Firing rate maps of two pairs of grid cells recorded simultaneously. The grid cells on the top row had overlapping firing fields, whereas the ones on the bottom row had nonoverlapping firing fields. b, Instantaneous firing rate of the grid cell pairs shown in a during random foraging and the AutoPI task. The correlation coefficient between the firing rate of the two neurons is shown (r value). c, Firing associations of all grid cell pairs recorded on different probe shanks during the first random foraging trial and the AutoPI task (dark trials). Each data point is the correlation coefficient (r value) of a grid cell pair in the first random foraging trial and the AutoPI task (dark trials). Firing associations were strongly correlated across behavioral conditions (N = 1,863, two-sided Pearson r = 0.89, crossed fixed-effects model: fixed-effects estimate e = 0.81, P < 2.00 × 10−16). d, Correlation of firing association for pairs of grid cells across different behavioral conditions (one data point per mouse, 11 mice with at least 10 grid cell pairs, two-sided Wilcoxon signed-rank test, RF1-RF2 versus RF1-Dark: statistic = 6.0, P = 0.055, RF1-RF2 versus RF1-Light: statistic = 6.0, P = 0.055 RF1-RF2 versus Light-Dark: statistic = 12.0, P = 0.25). NS, not significant. Demonstrating preserved temporal associations of grid cell pairs across conditions. Box plots show the median (center line), first and third quartiles (box bounds) and 1.5 times the interquartile range (whiskers). e, Spike-triggered cross-firing rate map between pairs of grid cells in random foraging (left) and Search Dark (right). Five co-recorded grid cells are shown for these two conditions. The column of maps on the left and the upper row of maps correspond to the firing rate map of these grid cells in random foraging (left) or Search Dark (right). Autocorrelations are shown in the diagonal of the figure. The remaining maps are the spike-triggered cross-firing rate maps of each grid cell pair. Spike-triggered cross-firing rate maps are calculated by taking the spikes of grid cell A as reference and calculating the firing rate of grid cell B in close temporal relation. Map similarity of the two conditions are plotted after different rotations of one condition (lower-right figure). Error bars are indicated by vertical lines. f, Spike-triggered map similarity (r value) of grid cells across different conditions. Dots are the medians of individual mice. The shuffling distribution is shown in gray (11 mice with at least 10 grid cell pairs; RF1-RF2: median r value = 0.923, P = 2.117 × 10−33 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); RF2-Search Light (SL): median r value = 0.430, P = 1.621 × 10−19 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); RF2-Search Dark (SD): median r value = 0.520, P = 2.780 × 10−20 (Tippett’s method), P = 1.953 × 10−3 (one-sample two-sided Wilcoxon signed-rank test); RF2-Homing Light (HL): median r value = 0.432, P = 2.996 × 10−19 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); RF2-Homing Dark (HD): median r value = 0.499, P = 3.012 × 10−19 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); SL-SD: median r value = 0.545, P = 3.245 × 10−25 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); HL-HD: median r value = 0.328, P = 1.340 × 10−16 (Tippett’s method), P = 1.953 × 10−3 (one-sample two-sided Wilcoxon signed-rank test); SL-HL: median r value = 0.502, P = 7.584 × 10−21 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); SD-HD: median r value = 0.539, P = 1.498 × 10−22 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); SL1-SL2: median r value = 0.857, P = 2.405 × 10−26 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); SD1-SD2: median r value = 0.771, P = 2.314 × 10−29 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); HL1-HL2: median r value = 0.755, P = 4.767 × 10−22 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test); HD1-HD2: median r value = 0.576, P = 1.098 × 10−23 (Tippett’s method), P = 9.766 × 10−4 (one-sample two-sided Wilcoxon signed-rank test). Demonstrating largely preserved spatial offset of grid cell pairs. Box plots show the median (center line), first and third quartiles (box bounds) and 1.5 times the interquartile range (whiskers). g, Heat map of map similarity between random foraging 1 (RF1) and random foraging 2 (RF2) (left), and between RF2 and SD conditions (right), for different rotations of one condition. Each row represents data from a single mouse. h, Rotation–correlation curves of map similarity between different conditions in the task. The similarity is assessed by rotating one condition and plotting the correlation with the other condition. Error bars are indicated by vertical lines.