Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Grid cell co-activity patterns during sleep reflect spatial overlap of grid fields during active behaviors

## Abstract

Continuous-attractor network models of grid formation posit that recurrent connectivity between grid cells controls their patterns of co-activation. Grid cells from a common module exhibit stable offsets in their periodic spatial tuning curves across environments, and this may reflect recurrent connectivity or correlated sensory inputs. Here we explore whether cell–cell relationships predicted by attractor models persist during sleep states in which spatially informative sensory inputs are absent. We recorded ensembles of grid cells in superficial layers of medial entorhinal cortex during active exploratory behaviors and overnight sleep. Per grid cell pair and collectively, and across waking, rapid eye movement sleep and non-rapid eye movement sleep, we found preserved patterns of spike-time correlations that reflected the spatial tuning offsets between these grid cells during active exploration. The preservation of cell–cell relationships across waking and sleep states was not explained by theta oscillations or activity in hippocampal subregion CA1. These results indicate that recurrent connectivity within the grid cell network drives grid cell activity across behavioral states.

## Access options

from\$8.99

All prices are NET prices.

## Code availability

The custom MATLAB scripts used in this paper are available upon request from the authors.

## Data availability

The data used in this experiment is available upon request from the authors.

## References

1. 1.

Hafting, T., Fyhn, M., Molden, S., Moser, M.-B. & Moser, E. I. Microstructure of a spatial map in the entorhinal cortex. Nature 436, 801–806 (2005).

2. 2.

O’Keefe, J. & Dostrovsky, J. The hippocampus as a spatial map. Preliminary evidence from unit activity in the freely-moving rat. Brain Res. 34, 171–175 (1971).

3. 3.

Sargolini, F. et al. Conjunctive representation of position, direction, and velocity in entorhinal cortex. Science 312, 758–762 (2006).

4. 4.

Taube, J. S., Muller, R. U. & Ranck, J. B. Jr Head-direction cells recorded from the postsubiculum in freely moving rats. I. Description and quantitative analysis. J. Neurosci. 10, 420–435 (1990).

5. 5.

Solstad, T., Boccara, C. N., Kropff, E., Moser, M.-B. & Moser, E. I. Representation of geometric borders in the entorhinal cortex. Science 322, 1865–1868 (2008).

6. 6.

Kropff, E., Carmichael, J. E., Moser, M.-B. & Moser, E. I. Speed cells in the medial entorhinal cortex. Nature 523, 419–424 (2015).

7. 7.

Hardcastle, K., Maheswaranathan, N., Ganguli, S. & Giocomo, L. M. A Multiplexed, Heterogeneous, and Adaptive Code for Navigation in Medial Entorhinal Cortex. Neuron 94, 375–387.e7 (2017).

8. 8.

Yartsev, M. M. & Ulanovsky, N. Representation of three-dimensional space in the hippocampus of flying bats. Science 340, 367–372 (2013).

9. 9.

Burak, Y. & Fiete, I. R. Accurate path integration in continuous attractor network models of grid cells. PLoS Comput. Biol. 5, e1000291 (2009).

10. 10.

Burgess, N., Barry, C. & O’Keefe, J. An oscillatory interference model of grid cell firing. Hippocampus 17, 801–812 (2007).

11. 11.

Dordek, Y., Soudry, D., Meir, R. & Derdikman, D. Extracting grid cell characteristics from place cell inputs using non-negative principal component analysis. eLife 5, e10094 (2016).

12. 12.

Fuhs, M. C. & Touretzky, D. S. A spin glass model of path integration in rat medial entorhinal cortex. J. Neurosci. 26, 4266–4276 (2006).

13. 13.

Grossberg, S. & Pilly, P. K. How entorhinal grid cells may learn multiple spatial scales from a dorsoventral gradient of cell response rates in a self-organizing map. PLoS Comput. Biol. 8, e1002648 (2012).

14. 14.

Navratilova, Z., Giocomo, L. M., Fellous, J. M., Hasselmo, M. E. & McNaughton, B. L. Phase precession and variable spatial scaling in a periodic attractor map model of medial entorhinal grid cells with realistic after-spike dynamics. Hippocampus 22, 772–789 (2012).

15. 15.

Moser, E. I. et al. Grid cells and cortical representation. Nat. Rev. Neurosci. 15, 466–481 (2014).

16. 16.

Burak, Y. & Fiete, I. Do we understand the emergent dynamics of grid cell activity? J. Neurosci. 26, 9352–9354 (2006).

17. 17.

Karlsson, M. P. & Frank, L. M. Awake replay of remote experiences in the hippocampus. Nat. Neurosci. 12, 913–918 (2009).

18. 18.

Kudrimoti, H. S., Barnes, C. A. & McNaughton, B. L. Reactivation of hippocampal cell assemblies: effects of behavioral state, experience, and EEG dynamics. J. Neurosci. 19, 4090–4101 (1999).

19. 19.

O’Neill, J., Senior, T. J., Allen, K., Huxter, J. R. & Csicsvari, J. Reactivation of experience-dependent cell assembly patterns in the hippocampus. Nat. Neurosci. 11, 209–215 (2008).

20. 20.

Wilson, M. A. & McNaughton, B. L. Reactivation of hippocampal ensemble memories during sleep. Science 265, 676–679 (1994).

21. 21.

Peyrache, A., Lacroix, M. M., Petersen, P. C. & Buzsáki, G. Internally organized mechanisms of the head direction sense. Nat. Neurosci. 18, 569–575 (2015).

22. 22.

Canto, C. B., Wouterlood, F. G. & Witter, M. P. What does the anatomical organization of the entorhinal cortex tell us? Neural Plast. 2008, 381243 (2008).

23. 23.

Fyhn, M., Hafting, T., Treves, A., Moser, M.-B. & Moser, E. I. Hippocampal remapping and grid realignment in entorhinal cortex. Nature 446, 190–194 (2007).

24. 24.

Steward, O. & Scoville, S. A. Cells of origin of entorhinal cortical afferents to the hippocampus and fascia dentata of the rat. J. Comp. Neurol. 169, 347–370 (1976).

25. 25.

Zhang, S.-J. et al. Optogenetic dissection of entorhinal-hippocampal functional connectivity. Science 340, 1232627 (2013).

26. 26.

O’Neill, J., Boccara, C. N., Stella, F., Schoenenberger, P. & Csicsvari, J. Superficial layers of the medial entorhinal cortex replay independently of the hippocampus. Science 355, 184–188 (2017).

27. 27.

McNaughton, B. L., Battaglia, F. P., Jensen, O., Moser, E. I. & Moser, M.-B. Path integration and the neural basis of the ‘cognitive map’. Nat. Rev. Neurosci. 7, 663–678 (2006).

28. 28.

Welinder, P. E., Burak, Y. & Fiete, I. R. Grid cells: the position code, neural network models of activity, and the problem of learning. Hippocampus 18, 1283–1300 (2008).

29. 29.

Kraus, B. J. et al. During running in place, grid cells integrate elapsed time and distance run. Neuron 88, 578–589 (2015).

30. 30.

Killian, N. J., Jutras, M. J. & Buffalo, E. A. A map of visual space in the primate entorhinal cortex. Nature 491, 761–764 (2012).

31. 31.

Nádasdy, Z., Hirase, H., Czurkó, A., Csicsvari, J. & Buzsáki, G. Replay and time compression of recurring spike sequences in the hippocampus. J. Neurosci. 19, 9497–9507 (1999).

32. 32.

Lee, A. K. & Wilson, M. A. Memory of sequential experience in the hippocampus during slow wave sleep. Neuron 36, 1183–1194 (2002).

33. 33.

Bonnevie, T. et al. Grid cells require excitatory drive from the hippocampus. Nat. Neurosci. 16, 309–317 (2013).

34. 34.

Yoon, K. et al. Specific evidence of low-dimensional continuous attractor dynamics in grid cells. Nat. Neurosci. 16, 1077–1084 (2013).

35. 35.

Hafting, T., Fyhn, M., Bonnevie, T., Moser, M.-B. & Moser, E. I. Hippocampus-independent phase precession in entorhinal grid cells. Nature 453, 1248–1252 (2008).

36. 36.

Couey, J. J. et al. Recurrent inhibitory circuitry as a mechanism for grid formation. Nat. Neurosci. 16, 318–324 (2013).

37. 37.

Pastoll, H., Solanka, L., van Rossum, M. C. & Nolan, M. F. Feedback inhibition enables θ-nested γ oscillations and grid firing fields. Neuron 77, 141–154 (2013).

38. 38.

Dhillon, A. & Jones, R. S. G. Laminar differences in recurrent excitatory transmission in the rat entorhinal cortex in vitro. Neuroscience 99, 413–422 (2000).

39. 39.

Fuchs, E. C. et al. Local and Distant Input Controlling Excitation in Layer II of the Medial Entorhinal Cortex. Neuron 89, 194–208 (2016).

40. 40.

Colgin, L. L., Moser, E. I. & Moser, M.-B. Understanding memory through hippocampal remapping. Trends Neurosci. 31, 469–477 (2008).

41. 41.

Yoon, K., Lewallen, S., Kinkhabwala, A. A., Tank, D. W. & Fiete, I. R. Grid Cell Responses in 1D Environments Assessed as Slices through a 2D Lattice. Neuron 89, 1086–1099 (2016).

42. 42.

Aronov, D., Nevers, R. & Tank, D. W. Mapping of a non-spatial dimension by the hippocampal-entorhinal circuit. Nature 543, 719–722 (2017).

43. 43.

Amari, S. Dynamics of pattern formation in lateral-inhibition type neural fields. Biol. Cybern. 27, 77–87 (1977).

44. 44.

Guanella, A. & Verschure, P. F. A model of grid cells based on a path integration mechanism. in Artificial Neural Networks—ICANN 2006 (eds Kollias S. D., Stafylopatis A., Duch W. & Oja E.) 740–746 (ICANN, 2006).

45. 45.

Gu, Y. et al. A map-like micro-organization of grid cells in the medial entorhinal cortex. Cell 175, 736–750.e30 (2018).

46. 46.

Widloski, J., Marder, M. P. & Fiete, I. R. Inferring circuit mechanisms from sparse neural recording and global perturbation in grid cells. eLife 7, e33503 (2018).

47. 47.

Ji, D. & Wilson, M. A. Coordinated memory replay in the visual cortex and hippocampus during sleep. Nat. Neurosci. 10, 100–107 (2007).

48. 48.

Rothschild, G., Eban, E. & Frank, L. M. A cortical-hippocampal-cortical loop of information processing during memory consolidation. Nat. Neurosci. 20, 251–259 (2017).

49. 49.

Jadhav, S. P., Rothschild, G., Roumis, D. K. & Frank, L. M. Coordinated excitation and inhibition of prefrontal ensembles during awake hippocampal sharp-wave ripple events. Neuron 90, 113–127 (2016).

50. 50.

Ólafsdóttir, H. F., Carpenter, F. & Barry, C. Coordinated grid and place cell replay during rest. Nat. Neurosci. 19, 792–794 (2016).

51. 51.

Gothard, K. M., Skaggs, W. E., Moore, K. M. & McNaughton, B. L. Binding of hippocampal CA1 neural activity to multiple reference frames in a landmark-based navigation task. J. Neurosci. 16, 823–835 (1996).

52. 52.

Mitchell, S. J. & Ranck, J. B. Jr Generation of theta rhythm in medial entorhinal cortex of freely moving rats. Brain Res. 189, 49–66 (1980).

53. 53.

Buzsáki, G. Hippocampal sharp waves: their origin and significance. Brain Res. 398, 242–252 (1986).

54. 54.

Trimper, J. B., Trettel, S. G., Hwaun, E. & Colgin, L. L. Methodological Caveats in the Detection of Coordinated Replay between Place Cells and GridCells. Front. Syst. Neurosci. 11, 57 (2017).

55. 55.

Zheng, C., Bieri, K. W., Trettel, S. G. & Colgin, L. L. The relationship between gamma frequency and running speed differs for slow and fast gamma rhythms in freely behaving rats. Hippocampus 25, 924–938 (2015).

56. 56.

Harris, K. D., Hirase, H., Leinekugel, X., Henze, D. A. & Buzsáki, G. Temporal interaction between single spikes and complex spike bursts in hippocampal pyramidal cells. Neuron 32, 141–149 (2001).

57. 57.

Brun, V. H. et al. Impaired spatial representation in CA1 after lesion of direct input from entorhinal cortex. Neuron 57, 290–302 (2008).

58. 58.

Giocomo, L. M. et al. Grid cells use HCN1 channels for spatial scaling. Cell 147, 1159–1170 (2011).

59. 59.

Henriksen, E. J. et al. Spatial representation along the proximodistal axis of CA1. Neuron 68, 127–137 (2010).

60. 60.

Csicsvari, J., Hirase, H., Czurkó, A., Mamiya, A. & Buzsáki, G. Oscillatory coupling of hippocampal pyramidal cells and interneurons in the behaving Rat. J. Neurosci. 19, 274–287 (1999).

61. 61.

Colgin, L. L. et al. Frequency of gamma oscillations routes flow of information in the hippocampus. Nature 462, 353–357 (2009).

62. 62.

Tallon-Baudry, C., Bertrand, O., Delpuech, C. & Permier, J. Oscillatory γ-band (30-70Hz) activity induced by a visual search task in humans. J. Neurosci. 17, 722–734 (1997).

63. 63.

Louie, K. & Wilson, M. A. Temporally structured replay of awake hippocampal ensemble activity during rapid eye movement sleep. Neuron 29, 145–156 (2001).

64. 64.

Johnson, A., Seeland, K. & Redish, A. D. Reconstruction of the postsubiculum head direction signal from neural ensembles. Hippocampus 15, 86–96 (2005).

65. 65.

Gardner, R., Moser, M.-B., & Moser, E.I. Phase relationships between grid cells are preserved during sleep. Society for Neuroscience 2016, San Diego, CA http://www.abstractsonline.com/pp8/#!/4071/presentation/9182 (2016).

66. 66.

Geisler, C., Robbe, D., Zugaro, M., Sirota, A. & Buzsáki, G. Hippocampal place cell assemblies are speed-controlled oscillators. Proc. Natl Acad. Sci. USA 104, 8149–8154 (2007).

## Acknowledgements

We thank K. N. Bobbitt and K. Kallina for recording drive construction and for their outstanding technical support. We also thank A. Akinsooto, K. N. Bobbitt, S. Brizzolara-Dove, J. Campos, A. Davis, D. Jones, G. Kwong, C. G. Orozco, F. Rahman, E. Usheva, and D. Wehle for help with sleep video scoring, and B. J. Gereke for helpful discussions. This work was supported by: the Whitehall Foundation (to L.L.C.), NSF CAREER Award 1453756 (to L.L.C.), ONR YIP Award N00014-14-1-0322 (to L.L.C.), and the National Institute on Drug Abuse (primary) of the National Institutes of Health under award number T32DA018926 (to E.H. and S.T.). I.R.F. was supported in part by a Faculty Scholar award from the Howard Hughes Medical Institute, a grant from the Simons Foundation through the SCGB, and an HFSP grant.

## Author information

Authors

### Contributions

S.G.T., I.R.F., and L.L.C. designed experiments and analyses. S.G.T. and E.H. collected data. S.G.T., J.B.T., and E.H. wrote analysis programs. S.G.T., E.H., and J.B.T. analyzed data. I.F. and L.L.C. supervised the research. S.G.T., J.B.T., I.R.F., and L.L.C. wrote the paper, with comments from E.H. All authors discussed results.

### Corresponding authors

Correspondence to Sean G. Trettel or John B. Trimper or Laura Lee Colgin.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

Journal peer review information: Nature Neuroscience thanks Adrien Peyrache, Francesca Sargolini, and the other anonymous reviewer(s) for their contribution to the peer review of this work.

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Integrated supplementary information

### Supplementary Figure 1 Employing a different normalization procedure replicates the finding presented in Fig. 2 of a relationship between rate-map similarity and grid cell spike-time correlations across waking behaviors and sleep.

(a-c) These plots are constructed in the same manner as those in Fig. 2, except that, here, normalization was performed by z-scoring the cross-correlations rather than dividing each by its average. Each panel shows color-coded spike time cross-correlations (z-scored) for all pairs of grid cells sorted from highest rate map correlation coefficient (highest Cell Pair ID) to lowest rate map correlation coefficient (lowest Cell Pair ID) (See Methods). The leftmost three columns show results for RUN, REM, and NREM and are plotted across time lags of ± 5 s. The rightmost column shows results for NREM plotted across time lags of ± 1 s.

### Supplementary Figure 2 Transmodular grid cell pairs exhibit lower cross-correlation coefficients than intramodular grid cell pairs across waking and sleep states.

(a-c) These plots showing results for trans-modular grid cell pairs (n = 30) parallel those presented in Fig. 2 for intra-modular grid cell pairs. Each panel shows color-coded spike-time cross-correlations (divided by their average; see Methods) for all trans-modular pairs of grid cells sorted from highest rate map correlation coefficient (highest Cell Pair ID) to lowest rate map correlation coefficient (lowest Cell Pair ID) (See Methods). The leftmost three columns show results for RUN, REM, and NREM and are plotted across time lags of ± 5 s. The rightmost column shows results for NREM plotted across time lags of ± 1 s. Of note here is the reduced peakedness around zero-lag for these cell pairs relative to the intra-modular pairs in Fig. 2. (d) Scatterplots show the grid size ratio (x-axis) for trans-modular (black) and intra-modular (blue) grid cell pairs plotted against the z-scored spike-time cross-correlation coefficient summed between ± 5 ms. The vertical dashed line indicates the grid size ratio threshold (0.7) employed to sort cell pairs as either intra- or trans-modular. Bootstrapping tests (10,000 repetitions, two-sided) comparing the variance of near zero-lag cross-correlations between intra- and trans-modular cell pairs yielded significant results for RUN (p = 0.005, d = 2.55), REM (p = 0.003, d = 2.73), and NREM (p < 0.0001, d = 3.506). This result indicates that spike-time cross-correlations near zero-lag exhibited significantly higher amplitudes for intra-modular cell pairs relative to trans-modular cell pairs.

### Supplementary Figure 3 The relationships between spatial receptive field overlap and spike-time correlations were also preserved for other MEC cell-type pairs.

(a) As with the grid cells analyzed for Fig. 5, which included both directionally sensitive grid cells (“conjunctive cells”; CJ) and non-directionally sensitive grid cells (“pure grid”; GC), pairs of pure grid cells (n = 182, GC/GC, top) and pairs containing both pure grid and conjunctive cells (n = 24, GC/CJ, bottom) show positive correlations between rate-map correlation coefficients (x-axis) and spike-time cross-correlation coefficients (y-axis). All rho values presented are Pearson’s r. Linear regressions for pairs of pure grid cells (GC/GC, top) indicated that spatial correlation coefficients significantly predicted spike-time cross-correlations for all three behavioral states (RUN: r = 0.754, p = 1.228e-34, R2 = 0.568; REM: r = 0.481, p = 6.189e-12, R2 = .232; NREM: r= 0.565, p = 9.662e-17, R2 = 0.319). Regression results were similar for pairs of pure grid and conjunctive cells (GC/CJ) for RUN (r = 0.491, p = 0.015, R2 = 0.241) and NREM (r = 0.471, p = 0.020, R2 = 0.222) but failed to reach significance for REM (r = 0.239, p = 0.261, R2 = 0.057), likely due to the low number of samples. (b) Spike-time correlations were also related to similarity of receptive fields in pairs of conjunctive and head-direction (HD) cells (n = 56, CJ/HD, top) and in pairs of head-direction cells (n = 103, HD/HD, bottom). Closeness in preferred firing angle, quantified as the relative angular difference (x-axis), negatively correlated with spike-time similarity (y-axis) across waking and sleep states such that cells which preferentially fired in similar directions were more likely to fire together during both waking and sleep states. For conjunctive cells paired with head direction cells (CJ/HD, top), linear regressions indicated that relative angular distance predicted spike-time cross-correlation coefficients during RUN (r = 0.488, p = 0.0001, R2 = 0.238), REM (r = 0.364, p = 0.006, R2 = 0.133), and NREM (r = 0.374, p = 0.004, R2 = 0.140). Similarly, linear regressions for pairs of head direction cells (HD/HD, bottom) revealed that relative angular distance significantly predicted spike time cross-correlations during RUN (r = 0.516, p = 2.457e-8, R2 = 0.266), REM (r = 0.228, p = 0.020, R2 = 0.052), and NREM (r = 0.315, p = 0.001, R2 = 0.099).

### Supplementary Figure 4 CA1 place cell spike-time cross-correlations decayed rapidly across NREM sleep, whereas MEC grid cell spike-time cross-correlations remained stable.

(a-b) Spike-time cross-correlations between pairs of CA1 place cells (n = 78) rapidly decreased during the first hour of NREM sleep. Conversely, cross-correlations between MEC grid cells (n = 211) changed little across the course of NREM sleep. Results are shown for spike-time cross-correlations summed within ±5 ms windows (a) and ±50 ms windows (b). Data are plotted as average ± SEM. Mixed-effects ANOVAs for each timescale indicated significant region by time interactions (±5 ms: F(5,1280) = 26.83, p = 7.28e-26, partial η2 = 0.095; ±50 ms: F(5,1280) = 28.99, p = 6.22e-28, partial η2 = 0.102), reflecting the differential effect of time on place cell and grid cell spike-time cross-correlations, namely rapid decay of place cell correlations and stable grid cell correlations.

### Supplementary Figure 5 Simulations of a place-to-grid model were used to determine whether grid cell pairs’ spatial relationships remained stable when place cell pairs’ spatial relationships were changed.

(a) An illustrated schematic showing the primary components of the place-to-grid model (see Methods). Simulated place fields (top row) uniformly cover an arena in which a simulated agent moves randomly. Input place fields’ feed forward weights (second row) converge upon output units (third row), which are connected to one another via recurrent weights (fourth row). (b) An example output unit’s rate-map (top) and spatial auto-correlation (bottom) at each stage of the simulation. Originally learned output units (n = 10) exhibit clear grid cell-like properties (left, gray). The dotted circle and lines superimposed over the autocorrelation maps show the grid size and orientation, respectively. Shuffling place fields to new locations leads to a deterioration of gridness in the output units (middle, red). Relearning the model (right, green) results in a restoration of gridness. However, the relearned output units’ grid orientations differ from that of the original output units. In this example, orientation shifts from 19.2° to 1.7° after re-learning. (c) The top panel shows the cumulative distributions of gridness scores in the original output units (gray, Original), place-field shuffled output units (red, Shuffled), and relearned output units (green, Relearned). The bottom panel shows the gridness scores for the output units at each stage of the simulation. Each marker corresponds to an individual output unit (n = 10). Simulated hippocampal remapping via shuffling of place fields leads to deterioration of gridness in the output units, which is restored after relearning (F(2,18) = 44.70, p = 1.04e-7, partial η2 = 0.832, one-way repeated measures ANOVA). (d) Spatial cross-correlations for two example output unit pairs (rows) after the original simulation (left) and after relearning the model (right). Φx and Φy, noted above each panel, describe the spatial phase offset between the two output units in each pair. After relearning the model with shuffled place fields, the spatial relationship between output units in each pair differs from that originally observed. (e) Scatterplots show that spatial phase offsets in the x (top) and y (bottom) dimensions differ randomly after relearning the model (n = 45 output unit pairs). (f) Line graphs show that the shifts in grid orientations (top) and spatial phase magnitude (bottom) accompanying relearning are not uniform in direction or degree across the 10 output units and 45 output unit pairs, respectively. This figure augments the model-free results, described in the main text, on the distinct relationships between behavioral states and spike-time cross-correlations in CA1 compared to MEC by considering a model in which grid cell activity is derived from place cells1. The model proposes that grid cells are a low-dimensional projection or dimensionality-reduced version of place cell activity. In this framework, many different combinations of correlated place cell firing patterns could produce the same grid cell co-activity patterns. Thus, arguably place cells might still be able to drive stable grid cell-grid cell relationships even if place cell relationships change. The basic question we examined is whether grid cell correlations can be preserved within the model when place cell co-activity patterns or their field locations are scrambled, as happens during sleep or global remapping, respectively. We first generated a place-to-grid mapping1 for one configuration of place fields by learning appropriate feedforward weights (see Methods), then simulated place field “global remapping” (Colgin et al., Trends Neurosci, 2008, PMID: 18687478) by shuffling input place fields to new locations. After shuffling place fields to new locations, without additional relearning, gridness in the output units deteriorated (t(9) = 6.94, p = 0.0001, d = 2.194, paired t-test; Supplementary Figure 5b-c). Relearning the feedforward place-to-grid model weights after shuffling place fields reinstated grid-like activity in the output units, as seen from the gridness scores (Supplementary Figure 5b-c). However, grid orientations (n = 10) and the relative spatial phases between pairs of output units (n = 45) were different from those of the original output units (orientations: $$\overline x$$dif ± CI = 0.026 ± 0.010 rad, d = 1.79, MATLAB circ_mtest; relative spatial phase magnitude: t(44) = 7.97, p = 4.42e-10, d = 1.188, paired t-test; Supplementary Figure 5d-g). Importantly, neither grid orientations nor relative spatial phases shifted uniformly across grid units in the model, in contrast to experimental results showing that spatial relationships between grid cells’ firing fields remain stable across environments34. These results suggest that a feedforward place-to-grid cell model is unlikely to account for the stability of grid cell co-activity patterns when place cell relationships change, as observed in the present work. It should be noted, however, that place cell remapping can occur in a more complex manner (Knierim, 2003, in The Neurobiology of Spatial Behavior (ed Jeffery), Oxford Univ Press) than the entirely random global remapping simulated herein. Also, the exact anatomy of place cell-to-grid cell connections remains poorly understood. Thus, it remains possible that simulations using more nuanced models in the future would yield different results.

### Supplementary Figure 6 Summing spike-time cross-correlations across ±50 ms rather than ±5 ms produces qualitatively similar results.

(a) Spike-time cross-correlation values were summed across time lags of ± 50 ms and averaged within each (ΔφX, ΔφY) bin. As in Fig. 4, data from RUN (left), REM (center), and NREM (right) show maximal spike-train cross-correlation values at low relative spatial phases (that is, high overlap of grid fields) and weaker spike train cross-correlation values at high relative spatial phases (that is, low overlap of grid fields). The plots were scaled by their peak value to compare across behaviors with different spike rates. Normalized cross-correlation coefficient values are plotted in color scale for ease of plot interpretation. (b) Spike-time cross correlations for MEC (left, n = 211 cell pairs) and CA1 (right, n = 78 cell pairs) were summed within ± 50 ms and compared to 1-dimensional spatial phase magnitude (MEC) or relative angular distance (CA1). Data are plotted as average ± SEM. As in Fig. 5, spike-time cross-correlations for all three behavioral states in MEC decrease as the magnitude of relative spatial phase increases. In CA1, conversely, spike-time cross-correlations decrease as the distance between place fields increases only during active waking behavior (that is, RUN), but not during sleep states (that is, REM and NREM).

### Supplementary Figure 7 Grid cell pairs’ cross-correlation coefficients decreased with increasing relative spatial phase across all behavioral states, whereas place cell pairs’ cross-correlation coefficients decreased with increasing distance between place fields during RUN, but not during NREM or REM.

These plots are the same as those in Fig. 5 except that spike-time cross-correlation coefficients were not normalized according to maximum values within each behavioral state (MEC: n = 211 cell pairs; CA1: n = 78 cell pairs). Data are plotted as average ± SEM.

### Supplementary Figure 8 Short-time spike-time correlation patterns of grid cell pairs with overlapping grid fields were maintained across behavioral states when the effect of theta phase modulation of spiking and other slow influences was removed.

To determine the extent to which spike time cross-correlation results were explained by shared theta phase preferences of spike times and other slow modulations in spike rate, spikes were temporally shuffled two hundred times within 500 ms moving windows, while keeping the theta phase of each spike time fixed. Spike time cross-correlations were then re-calculated using shuffled trains (See Methods). This analysis was only done for RUN and REM spike trains, given that NREM is characterized by an absence of theta. (a) Shown are original spike time cross-correlations (black) overlaid on 10 (out of 200) randomly selected examples of shuffled cross-correlations (gray) for an example grid cell pair. Cross-correlograms for an example grid cell pair with highly overlapping fields (that is, low relative spatial phase magnitude) are shown for RUN (first column) and REM (second column). Also shown are RUN (third column) and REM (fourth column) cross-correlograms for an example grid cell pair with largely non-overlapping grid fields (that is, high relative spatial phase magnitude). (b) The average theta-determined component of the correlation (gray, solid) with 98% confidence intervals (gray, dotted) and associated original spike time cross-correlogram (black). Columns are as in a. (c) The correlogram remaining after removal of the theta-modulated components. Note that substantial peaks around zero lag were still present in the low relative spatial phase plots (left two columns) but not in the high relative spatial phase plots (right two columns). (d) Cell pairs were split into low (n = 26 cell pairs) and high (n = 12 cell pairs) relative spatial phase groups as in Fig. 6, and their correlation was summed over the ± 5 ms lag window. The average correlation sum was calculated across each subpopulation for both RUN (first column) and REM (second column). Spike-time correlations were higher for cell pairs with overlapping fields than pairs with largely non-overlapping fields across both theta-associated states (that is, RUN and REM) when theta phase effects were present and when they were removed (n = 26, low relative spatial phase group; n = 12, high relative spatial phase group; main effect of relative spatial phase grouping: F(1,36) = 7.63, p = 0.009, partial η2 = 0.175, relative spatial phase grouping x theta effect grouping interaction: F(1,36) = 8.23, p = 0.007, partial η2 = 0.187, repeated measures ANOVA). The same calculation was done on the theta-removed correlations in the two columns to the right. A significant effect of relative spatial phase on correlation values was also observed when spike-time cross-correlations in which the influence of theta had been removed were analyzed separately (U = 369.00, p = 0.004, R2 = 0.109, Mann-Whitney U test; right two panels). (e) The same as in D, but with values normalized by the Euclidean norm of the population of summed correlations before sorting into near or far groups. This was done to aid visual comparison between RUN and REM conditions, and between original and theta-removed groups.

## Rights and permissions

Reprints and Permissions

Trettel, S.G., Trimper, J.B., Hwaun, E. et al. Grid cell co-activity patterns during sleep reflect spatial overlap of grid fields during active behaviors. Nat Neurosci 22, 609–617 (2019). https://doi.org/10.1038/s41593-019-0359-6

• Accepted:

• Published:

• Issue Date:

• ### Perineuronal nets stabilize the grid cell network

• Ane Charlotte Christensen
• , Kristian Kinden Lensjø
• , Mikkel Elle Lepperød
• , Svenn-Arne Dragly
• , Halvard Sutterud
• , Marianne Fyhn
•  & Torkel Hafting

Nature Communications (2021)

• ### Entorhinal and ventromedial prefrontal cortices abstract and generalize the structure of reinforcement learning problems

• Alon Boaz Baram
• , Timothy Howard Muller
• , Hamed Nili
• , Mona Maria Garvert
•  & Timothy Edward John Behrens

Neuron (2021)

• ### Grid cell activity and path integration on 2-D manifolds in 3-D space

• Yihong Wang
• , Xuying Xu
• , Xiaochuan Pan
•  & Rubin Wang

Nonlinear Dynamics (2021)

• ### Dynamics of fMRI patterns reflect sub-second activation sequences and reveal replay in human visual cortex

• Lennart Wittkuhn
•  & Nicolas W. Schuck

Nature Communications (2021)

• ### Recurrent amplification of grid‐cell activity

• Tiziano D'Albis
•  & Richard Kempter

Hippocampus (2020)