Skip to main content

Thank you for visiting 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.

  • Article
  • Published:

The intrinsic attractor manifold and population dynamics of a canonical cognitive circuit across waking and sleep


Neural circuits construct distributed representations of key variables—external stimuli or internal constructs of quantities relevant for survival, such as an estimate of one’s location in the world—as vectors of population activity. Although population activity vectors may have thousands of entries (dimensions), we consider that they trace out a low-dimensional manifold whose dimension and topology match the represented variable. This manifold perspective enables blind discovery and decoding of the represented variable using only neural population activity (without knowledge of the input, output, behavior or topography). We characterize and directly visualize manifold structure in the mammalian head direction circuit, revealing that the states form a topologically nontrivial one-dimensional ring. The ring exhibits isometry and is invariant across waking and rapid eye movement sleep. This result directly demonstrates that there are continuous attractor dynamics and enables powerful inference about mechanism. Finally, external rather than internal noise limits memory fidelity, and the manifold approach reveals new dynamical trajectories during sleep.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Population activity as a manifold and a method for manifold characterization.
Fig. 2: Unsupervised discovery and time-resolved decoding of encoded variables through manifold characterization.
Fig. 3: REM sleep states, fluxes and dynamics suggest that the manifold is internally generated and attractive.
Fig. 4: Diffusive dynamics during REM sleep.
Fig. 5: Higher-dimensional states and coherent dynamics during nREM sleep.

Similar content being viewed by others

Data availability

Data have been previously reported21 and are available on the CRCNS website at

Code availability

The code is available at


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

    Article  CAS  Google Scholar 

  2. Hopfield, J. J. Neural networks and physical systems with emergent collective computational abilities. Proc. Natl Acad. Sci. USA 79, 2554–2558 (1982).

    Article  CAS  Google Scholar 

  3. Seung, H. S. How the brain keeps the eyes still. Proc. Natl Acad. Sci. USA 93, 13339–13344 (1996).

    Article  CAS  Google Scholar 

  4. Zhang, K. Representation of spatial orientation by the intrinsic dynamics of the head-direction cell ensemble: a theory. J. Neurosci. 15, 2112–2126 (1996).

    Article  Google Scholar 

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

    Article  Google Scholar 

  6. Mazor, O. & Laurent, G. Transient dynamics versus fixed points in odor representations by locust antennal lobe projection neurons. Neuron 48, 661–673 (2005).

    Article  CAS  Google Scholar 

  7. Mante, V., Sussillo, D., Shenoy, K. V. & Newsome, W. T. Context-dependent computation by recurrent dynamics in prefrontal cortex. Nature 503, 78–84 (2013).

    Article  CAS  Google Scholar 

  8. Gallego, J. A., Perich, M. G., Miller, L. E. & Solla, S. A. Neural manifolds for the control of movement. Neuron 94, 978–984 (2017).

    Article  CAS  Google Scholar 

  9. Ranck, J. B. in Electrical Activity of Archicortex (eds Buzsaki, G. & Vanderwolf, C.) 217–220 (Akademiai Kiado, 1985).

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

    Article  CAS  Google Scholar 

  11. Taube, J. S., Muller, R. U. & Ranck, J. B. Head-direction cells recorded from the postsubiculum in freely moving rats. II. Effects of environmental manipulations. J. Neurosci. 10, 436–447 (1990).

    Article  CAS  Google Scholar 

  12. Finkelstein, A. et al. Three-dimensional head-direction coding in the bat brain. Nature 517, 159–164 (2015).

    Article  CAS  Google Scholar 

  13. Seelig, J. D. & Jayaraman, V. Neural dynamics for landmark orientation and angular path integration. Nature 521, 186–191 (2015).

    Article  CAS  Google Scholar 

  14. Green, J. et al. A neural circuit architecture for angular integration in Drosophila. Nature 546, 101–106 (2017).

    Article  CAS  Google Scholar 

  15. Kim, S. S., Rouault, H., Druckmann, S. & Jayaraman, V. Ring attractor dynamics in the Drosophila central brain. Science 356, 849–853 (2017).

    Article  CAS  Google Scholar 

  16. Skaggs, W. E., Knierim, J. J., Kudrimoti, H. S. & McNaughton, B. L. A model of the neural basis of the rat’s sense of direction. Adv. Neural Inf. Process. Syst. 7, 173–180 (1995).

    CAS  PubMed  Google Scholar 

  17. Sharp, P. E., Blair, H. T. & Brown, M. Neural network modeling of the hippocampal formation spatial signals and their possible role in navigation: a modular approach. Hippocampus 6, 720–734 (1996).

    Article  CAS  Google Scholar 

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

    Article  CAS  Google Scholar 

  19. Mizumori, S. & Williams, J. Directionally selective mnemonic properties of neurons in the lateral dorsal nucleus of the thalamus of rats. J. Neurosci. 13, 4015–4028 (1993).

    Article  CAS  Google Scholar 

  20. Knierim, J. J., Kudrimoti, H. S. & McNaughton, B. L. Interactions between idiothetic cues and external landmarks in the control of place cells and head direction cells. J. Neurophysiol. 80, 425–446 (1998).

    Article  CAS  Google Scholar 

  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).

    Article  CAS  Google Scholar 

  22. Chaudhuri, R., Gercek, B., Pandey, B. & Fiete, I. Unsupervised latent variable extraction from neural data to characterize processing across states. In Computational and Systems Neuroscience (CoSyNe) I-56 (2017).

  23. Ghrist, R. Barcodes: the persistent topology of data. Bull. Am. Math. Soc. 45, 61–75 (2008).

    Article  Google Scholar 

  24. Grassberger, P. & Procaccia, I. Measuring the strangeness of strange attractors. Phys. D. 9, 189–208 (1983).

    Article  Google Scholar 

  25. Chen, Z. & Wilson, M. A. Deciphering neural codes of memory during sleep. Trends Neurosci. 40, 260–275 (2017).

    Article  Google Scholar 

  26. Burak, Y. & Fiete, I. R. Fundamental limits on persistent activity in networks of noisy neurons. Proc. Natl Acad. Sci. USA 109, 17645–17650 (2012).

    Article  CAS  Google Scholar 

  27. Moreno-Bote, R. et al. Information-limiting correlations. Nat. Neurosci. 17, 1410–1417 (2014).

    Article  CAS  Google Scholar 

  28. Bialek, W. Physical limits to sensation and perception. Annu. Rev. Biophys. Biophys. Chem. 16, 455–478 (1987).

    Article  CAS  Google Scholar 

  29. Osborne, L. C., Lisberger, S. G. & Bialek, W. A sensory source for motor variation. Nature 437, 412–416 (2005).

    Article  CAS  Google Scholar 

  30. Pavlides, C. & Winson, J. Influences of hippocampal place cell firing in the awake state on the activity of these cells during subsequent sleep episodes. J. Neurosci. 9, 2907–2918 (1989).

    Article  CAS  Google Scholar 

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

    Article  CAS  Google Scholar 

  32. Diekelmann, S. & Born, J. The memory function of sleep. Nat. Rev. Neurosci. 11, 114–126 (2010).

    Article  CAS  Google Scholar 

  33. Brandon, M. P., Bogaard, A. R., Andrews, C. M. & Hasselmo, M. E. Head direction cells in the postsubiculum do not show replay of prior waking sequences during sleep. Hippocampus 22, 604–618 (2012).

    Article  Google Scholar 

  34. Massimini, M. et al. Breakdown of cortical effective connectivity during sleep. Science 309, 2228–2232 (2005).

    Article  CAS  Google Scholar 

  35. Steriade, M., McCormick, D. A. & Sejnowski, T. J. Thalamocortical oscillations in the sleeping and aroused brain. Science 262, 679–685 (1993).

    Article  CAS  Google Scholar 

  36. Gardner, R. J., Lu, L., Wernle, T., Moser, M.-B. & Moser, E. I. Correlation structure of grid cells is preserved during sleep. Nat. Neurosci. 22, 598–608 (2019).

    Article  CAS  Google Scholar 

  37. Trettel, S. G., Trimper, J. B., Hwaun, E., Fiete, I. R. & Colgin, L. L. Grid cell co-activity patterns during sleep reflect spatial overlap of grid fields during active behaviors. Nat. Neurosci. 22, 609–617 (2019).

    Article  CAS  Google Scholar 

  38. Siapas, A. G. & Wilson, M. A. Coordinated interactions between hippocampal ripples and cortical spindles during slow-wave sleep. Neuron 21, 1123–1128 (1998).

    Article  CAS  Google Scholar 

  39. Wimmer, K., Nykamp, D. Q., Constantinidis, C. & Compte, A. Bump attractor dynamics in prefrontal cortex explains behavioral precision in spatial working memory. Nat. Neurosci. 17, 431–439 (2014).

    Article  CAS  Google Scholar 

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

    Article  CAS  Google Scholar 

  41. Low, R. J., Lewallen, S., Aronov, D., Nevers, R. & Tank, D. W. Probing variability in a cognitive map using manifold inference from neural dynamics. Preprint at biorXiv (2018).

  42. Bassett, J. P., Wills, T. J. & Cacucci, F. Self-organised attractor dynamics in the developing head direction circuit. Curr. Biol. 28, 609–615 (2018).

    Article  CAS  Google Scholar 

  43. Tenenbaum, J. B., De Silva, V. & Langford, J. C. A global geometric framework for nonlinear dimensionality reduction. Science 290, 2319–2323 (2000).

    Article  CAS  Google Scholar 

  44. Curto, C. & Itskov, V. Cell groups reveal structure of stimulus space. PLoS Comput. Biol. 4, e1000205 (2008).

    Article  Google Scholar 

  45. Dabaghian, Y., Mémoli, F., Frank, L. & Carlsson, G. A topological paradigm for hippocampal spatial map formation using persistent homology. PLoS Comput. Biol. 8, e1002581 (2012).

    Article  CAS  Google Scholar 

  46. Singh, G. et al. Topological analysis of population activity in visual cortex. J. Vis. 8, 1–18 (2008).

    Article  Google Scholar 

  47. Spreemann, G., Dunn, B., Botnan, M. B. & Baas, N. A. Using persistent homology to reveal hidden information in neural data. Preprint at arXiv (2015).

  48. Rybakken, E., Baas, N. & Dunn, B. Decoding of neural data using cohomological feature extraction. Neural Comput. 31, 68–93 (2019).

    Article  Google Scholar 

  49. Park, M. et al. Bayesian manifold learning: the locally linear latent variable model. Adv. Neural Inf. Process. Syst. 28, 154–162 (2015).

    Google Scholar 

  50. Rubin, A. et al. Revealing neural correlates of behavior without behavioral measurements. Preprint at biorXiv (2019).

  51. Bauer, U., Tralie, C. & Saul, N. Ripser. Github (2017).

  52. Knierim, J. J., Kudrimoti, H. S. & McNaughton, B. L. Place cells, head direction cells, and the learning of landmark stability. J. Neurosci. 15, 1648–1659 (1995).

    Article  CAS  Google Scholar 

Download references


The authors thank D. Tank, S. Lewallen and R. Low for insightful discussions, and F. Caccuci, T. Wills, S. Deneve, Y. Burak, J. Murray, J. Pillow, L. Paninski and M. Sahani for comments on the work or manuscript. I.F. is grateful to G. Prasad for pointing her to the field of topological data analysis several years ago, and to W. Bialek for raising the possibility of unsupervised discovery of encoded variables from neural data, also several years ago. This work was supported in part by grants from the NIH (U01-NS094330-03), the Simons Foundation (SCGB and the International Brain Laboratory) and the Howard Hughes Medical Institute through the Faculty Scholars Program to I.F., and by the Canadian Research Chair in Systems Neuroscience (245716), a CIHR Project Grant (155957), a NSERC Discovery Grant (RGPIN-2018-04600) and the IRDC (108877-001) to A.P. Part of this work was performed by R.C. and I.F. in residence at the Simons Institute for the Theory of Computing at UC Berkeley, where R.C. was a Google Research Fellow.

Author information

Authors and Affiliations



R.C. and I.F. conceived the decoding method and analyses. R.C., B.G. and B.P. implemented the analyses. A.P. collected the original data and advised on the data and analyses. R.C. and I.F. wrote the paper with input from the other authors.

Corresponding authors

Correspondence to Rishidev Chaudhuri or Ila Fiete.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information: Nature Neuroscience thanks Vivek Jayaraman, Kate Jeffery, Sung Soo Kim, 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

Low-dimensional structure in the head direction circuit.

Supplementary Figure 2

Distortion of manifold by linear methods and by inhomogeneous sampling.

Supplementary Figure 3

Toroidal manifold in simulated grid cell activity.

Supplementary Figure 4

Decoding performance does not strongly depend on embedding dimension or number of spline knots and performance is good with ~20 neurons and several minutes of data.

Supplementary Figure 5

Wake dynamics for other animals.

Supplementary Figure 6

Spiking variance and tuning curves explained by decoding.

Supplementary Figure 7

Ring manifold preserved during REM across animals.

Supplementary Figure 8

REM occupancy and flows.

Supplementary Figure 9

REM decoding across animals.

Supplementary Figure 10

Waking and REM states and dynamics replicated in a continuous attractor model.

Supplementary Figure 11

Loss of ring and higher-dimensional nREM manifold across animals.

Supplementary Figure 12

nREM decoding and dynamics controls.

Supplementary Figure 13

Decoding, dynamics, and trajectory statistics during nREM for Mouse 25 are similar to those observed for Mouse 28.

Supplementary Figure 14

Qualitative reproduction of nREM trajectory, dynamics, and statistics in continuous attractor ring network model.

Supplementary information

Supplementary Information

Supplementary Figs. 1–14 and Supplementary Notes 1–4.

Reporting Summary

Supplementary Video 1

Wake manifold. Three-dimensional Isomap embedding of the waking manifold from Mouse 28, session 140313.

Supplementary Video 2

REM manifold. Three-dimensional Isomap embedding of the REM manifold from mouse 28, session 140313.

Supplementary Video 3

Waking dynamics. Dynamics during 200 s of waking (projection generated using Isomap). The moving trace shows 1 s (most recent point is darkest). The blue points in the background show the waking manifold.

Supplementary Video 4

REM dynamics. Dynamics during 200 s of REM sleep (projection generated using Isomap). The moving trace shows 1 s (most recent point is darkest). The green scatter plot in the background shows the REM manifold. Note that REM sleep intervals are typically quite short, so the 200 s comprises multiple concatenated intervals.

Supplementary Video 5

nREM manifold. Three-dimensional Isomap embedding of the nREM manifold from mouse 28, session 140313, shown in mustard yellow, along with the waking manifold for comparison, shown in blue.

Supplementary Video 6

nREM dynamics. Dynamics during 200 s of nREM sleep (projection generated using Isomap). The moving trace shows 1 s (most recent point is darkest). The mustard yellow scatter plot in the background shows the nREM manifold, and the blue points show the waking manifold.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chaudhuri, R., Gerçek, B., Pandey, B. et al. The intrinsic attractor manifold and population dynamics of a canonical cognitive circuit across waking and sleep. Nat Neurosci 22, 1512–1520 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:

This article is cited by


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing