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.

An emergent neural coactivity code for dynamic memory


Neural correlates of external variables provide potential internal codes that guide an animal’s behavior. Notably, first-order features of neural activity, such as single-neuron firing rates, have been implicated in encoding information. However, the extent to which higher-order features, such as multineuron coactivity, play primary roles in encoding information or secondary roles in supporting single-neuron codes remains unclear. Here, we show that millisecond-timescale coactivity among hippocampal CA1 neurons discriminates distinct, short-lived behavioral contingencies. This contingency discrimination was unrelated to the tuning of individual neurons, but was instead an emergent property of their coactivity. Contingency-discriminating patterns were reactivated offline after learning, and their reinstatement predicted trial-by-trial memory performance. Moreover, optogenetic suppression of inputs from the upstream CA3 region during learning impaired coactivity-based contingency information in the CA1 and subsequent dynamic memory retrieval. These findings identify millisecond-timescale coactivity as a primary feature of neural firing that encodes behaviorally relevant variables and supports memory retrieval.

This is a preview of subscription content

Access options

Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: Mice rapidly acquire and flexibly retrieve a one-day two-contingency memory.
Fig. 2: CA1 coactivity-based discrimination of task contingencies.
Fig. 3: Discrimination of task contingencies is an emergent property of neural coactivity.
Fig. 4: Contingency-discriminating patterns develop with learning and predict probe performance.
Fig. 5: Contingency-discriminating CA1 coactivity is spatially discontiguous.
Fig. 6: Contingency-discriminating CA1 coactivity requires CA3L inputs and supports dynamic memory retrieval.

Data availability

The data that support the findings of this study are available from the corresponding author upon request.

Code availability

The software used for data acquisition and analysis are available using the web links mentioned in the Methods.


  1. Adrian, E. D. The impulses produced by sensory nerve endings: part I. J. Physiol. 61, 49–72 (1926).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

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

    PubMed  Article  Google Scholar 

  3. Optican, L. M. & Richmond, B. J. Temporal encoding of two-dimensional patterns by single units in primate inferior temporal cortex. III. Information theoretic analysis. J. Neurophysiol. 57, 162–178 (1987).

    CAS  PubMed  Article  Google Scholar 

  4. O’Keefe, J. & Recce, M. L. Phase relationship between hippocampal place units and the EEG theta rhythm. Hippocampus 3, 317–330 (1993).

    PubMed  Article  Google Scholar 

  5. Buzsáki, G. Neural syntax: cell assemblies, synapsembles, and readers. Neuron 68, 362–385 (2010).

    PubMed  PubMed Central  Article  CAS  Google Scholar 

  6. Churchland, M. M. et al. Neural population dynamics during reaching. Nature 487, 51–56 (2012).

    CAS  PubMed  PubMed Central  Article  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).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  8. Yuste, R. From the neuron doctrine to neural networks. Nat. Rev. Neurosci. 16, 487–497 (2015).

    CAS  PubMed  Article  Google Scholar 

  9. Koch, C., Rapp, M. & Segev, I. A brief history of time (constants). Cereb. Cortex 6, 93–101 (1996).

    CAS  PubMed  Article  Google Scholar 

  10. Song, S., Miller, K. D. & Abbott, L. F. Competitive Hebbian learning through spike-timing-dependent synaptic plasticity. Nat. Neurosci. 3, 919–926 (2000).

    CAS  PubMed  Article  Google Scholar 

  11. Zhang, Z., Russell, L. E., Packer, A. M., Gauld, O. M. & Häusser, M. Closed-loop all-optical manipulation of neural circuits in vivo. Nat. Methods 15, 1037–1040 (2018).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  12. Cassenaer, S. & Laurent, G. Hebbian STDP in mushroom bodies facilitates the synchronous flow of olfactory information in locusts. Nature 448, 709–713 (2007).

    CAS  PubMed  Article  Google Scholar 

  13. Stopfer, M., Bhagavan, S., Smith, B. H. & Laurent, G. Impaired odour discrimination on desynchronization of odour-encoding neural assemblies. Nature 390, 70–74 (1997).

    CAS  PubMed  Article  Google Scholar 

  14. Robbe, D. et al. Cannabinoids reveal importance of spike timing coordination in hippocampal function. Nat. Neurosci. 9, 1526–1533 (2006).

    CAS  PubMed  Article  Google Scholar 

  15. Harris, K. D., Csicsvari, J., Hirase, H., Dragoi, G. & Buzsáki, G. Organization of cell assemblies in the hippocampus. Nature 424, 552–556 (2003).

    CAS  PubMed  Article  Google Scholar 

  16. Wilson, M. & McNaughton, B. Dynamics of the hippocampal ensemble code for space. Science 261, 1055–1058 (1993).

    CAS  PubMed  Article  Google Scholar 

  17. van de Ven, G. M., Trouche, S., McNamara, C. G., Allen, K. & Dupret, D. Hippocampal offline reactivation consolidates recently formed cell assembly patterns during sharp wave-ripples. Neuron 92, 968–974 (2016).

    PubMed  PubMed Central  Article  CAS  Google Scholar 

  18. deCharms, R. C. & Merzenich, M. M. Primary cortical representation of sounds by the coordination of action-potential timing. Nature 381, 610–613 (1996).

    CAS  PubMed  Article  Google Scholar 

  19. Friedrich, R. W., Habermann, C. J. & Laurent, G. Multiplexing using synchrony in the zebrafish olfactory bulb. Nat. Neurosci. 7, 862–871 (2004).

    CAS  PubMed  Article  Google Scholar 

  20. Dejean, C. et al. Prefrontal neuronal assemblies temporally control fear behaviour. Nature 535, 420–424 (2016).

    CAS  PubMed  Article  Google Scholar 

  21. Nakazawa, K. et al. Hippocampal CA3 NMDA receptors are crucial for memory acquisition of one-time experience. Neuron 38, 305–315 (2003).

    CAS  PubMed  Article  Google Scholar 

  22. Kelemen, E. & Fenton, A. A. Dynamic grouping of hippocampal neural activity during cognitive control of two spatial frames. PLoS Biol. 8, e1000403 (2010).

    PubMed  PubMed Central  Article  CAS  Google Scholar 

  23. Kubie, J. L., Levy, E. R. J. & Fenton, A. A. Is hippocampal remapping the physiological basis for context? Hippocampus 30, 851–864 (2020).

    PubMed  Article  Google Scholar 

  24. McClelland, J. L., McNaughton, B. L. & O’Reilly, R. C. Why there are complementary learning systems in the hippocampus and neocortex: insights from the successes and failures of connectionist models of learning and memory. Psychol. Rev. 102, 419–457 (1995).

    PubMed  Article  Google Scholar 

  25. van Dijk, M. T. & Fenton, A. A. On how the dentate gyrus contributes to memory discrimination. Neuron 98, 832–845 (2018).

    PubMed  PubMed Central  Article  CAS  Google Scholar 

  26. Lopes-dos-Santos, V., Ribeiro, S. & Tort, A. B. L. Detecting cell assemblies in large neuronal populations. J. Neurosci. Methods 220, 149–166 (2013).

    PubMed  Article  Google Scholar 

  27. McKenzie, S. et al. Hippocampal representation of related and opposing memories develop within distinct, hierarchically organized neural schemas. Neuron 83, 202–215 (2014).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  28. Leutgeb, S. et al. Independent codes for spatial and episodic memory in hippocampal neuronal ensembles. Science 309, 619–623 (2005).

    CAS  PubMed  Article  Google Scholar 

  29. Frank, L. M., Brown, E. N. & Wilson, M. Trajectory encoding in the hippocampus and entorhinal cortex. Neuron 27, 169–178 (2000).

    CAS  PubMed  Article  Google Scholar 

  30. Pfeiffer, B. E. & Foster, D. J. Hippocampal place-cell sequences depict future paths to remembered goals. Nature 497, 74–79 (2013).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  31. Grosmark, A. D. & Buzsáki, G. Diversity in neural firing dynamics supports both rigid and learned hippocampal sequences. Science 351, 1440–1443 (2016).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

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

    PubMed  Article  CAS  Google Scholar 

  33. Amaral, D. & Lavenex, P. in The Hippocampus Book (eds. Andersen, P., Morris, R., Amaral, D., Bliss, T. & O’Keefe, J.) Ch. 3 (Oxford University Press, 2006).

  34. Middleton, S. J. & McHugh, T. J. Silencing CA3 disrupts temporal coding in the CA1 ensemble. Nat. Neurosci. 19, 945–951 (2016).

    CAS  PubMed  Article  Google Scholar 

  35. Shipton, O. A. et al. Left–right dissociation of hippocampal memory processes in mice. Proc. Natl Acad. Sci. 111, 15238–15243 (2014).

    CAS  PubMed  Article  Google Scholar 

  36. El-Gaby, M. et al. Archaerhodopsin selectively and reversibly silences synaptic transmission through altered pH. Cell Rep. 16, 2259–2268 (2016).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  37. Bragin, A. et al. Gamma (40–100 Hz) oscillation in the hippocampus of the behaving rat. J. Neurosci.15, 47–60 (1995).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

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

    CAS  PubMed  Article  Google Scholar 

  39. Bi, G. Q. & Poo, M. M. Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type. J. Neurosci. 18, 10464–10472 (1998).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  40. Zenke, F. & Ganguli, S. SuperSpike: supervised learning in multilayer spiking neural networks. Neural Comput. 30, 1514–1541 (2018).

    PubMed  PubMed Central  Article  Google Scholar 

  41. Gütig, R. & Sompolinsky, H. The tempotron: a neuron that learns spike timing-based decisions. Nat. Neurosci. 9, 420–428 (2006).

    PubMed  Article  CAS  Google Scholar 

  42. Kohl, M. M. et al. Hemisphere-specific optogenetic stimulation reveals left-right asymmetry of hippocampal plasticity. Nat. Neurosci. 14, 1413–1415 (2011).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  43. Leutgeb, J. K., Leutgeb, S., Moser, M.-B. & Moser, E. I. Pattern separation in the dentate gyrus and CA3 of the hippocampus. Science 315, 961–966 (2007).

    CAS  PubMed  Article  Google Scholar 

  44. Jordan, J. T., Shanley, M. R. & Pytte, C. L. Behavioral state-dependent lateralization of dorsal dentate gyrus c-Fos expression in mice. Neuronal Signal. 3, NS20180206 (2019).

  45. Kawahara, A. et al. Neuronal major histocompatibility complex class I molecules are implicated in the generation of asymmetries in hippocampal circuitry. J. Physiol. 591, 4777–4791 (2013).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  46. Allegra, M., Posani, L., Gómez-Ocádiz, R. & Schmidt-Hieber, C. Differential relation between neuronal and behavioral discrimination during hippocampal memory encoding. Neuron 108, 1103–1112 (2020).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  47. Vertes, R. P., Hoover, W. B., Szigeti-Buck, K. & Leranth, C. Nucleus reuniens of the midline thalamus: link between the medial prefrontal cortex and the hippocampus. Brain Res. Bull. 71, 601–609 (2007).

    PubMed  PubMed Central  Article  Google Scholar 

  48. Stuart, G. J. & Spruston, N. Dendritic integration: 60 years of progress. Nat. Neurosci. 18, 1713–1721 (2015).

    CAS  PubMed  Article  Google Scholar 

  49. Kastellakis, G., Cai, D. J., Mednick, S. C., Silva, A. J. & Poirazi, P. Synaptic clustering within dendrites: an emerging theory of memory formation. Prog. Neurobiol. 126, 19–35 (2015).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  50. Ho, J., Tumkaya, T., Aryal, S., Choi, H. & Claridge-Chang, A. Moving beyond P values: data analysis with estimation graphics. Nat. Methods 16, 565–566 (2019).

    CAS  PubMed  Article  Google Scholar 

  51. Nakazawa, K. et al. Requirement for hippocampal CA3 NMDA receptors in associative memory recall. Science 297, 211–218 (2002).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  52. McNamara, C. G., Tejero-Cantero, Á., Trouche, S., Campo-Urriza, N. & Dupret, D. Dopaminergic neurons promote hippocampal reactivation and spatial memory persistence. Nat. Neurosci. 17, 1658–1660 (2014).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  53. Pachitariu, M., Steinmetz, N., Kadir, S., Carandini, M. & Harris, K. D. Kilosort: realtime spike-sorting for extracellular electrophysiology with hundreds of channels. Preprint at bioRxiv (2016).

  54. Magland, J. et al. SpikeForest, reproducible web-facing ground-truth validation of automated neural spike sorters. eLife 9, e55167 (2020).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  55. Zhang, S., Schönfeld, F., Wiskott, L. & Manahan-Vaughan, D. Spatial representations of place cells in darkness are supported by path integration and border information.ÿFront. Behav. Neurosci. 8, 222 (2014).

    Google Scholar 

  56. Huang, N. E. et al. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. Proc. Math. Phys. Eng. Sci. 454, 903–995 (1998).

    Article  Google Scholar 

  57. Deering, R. & Kaiser, J. F. The use of a masking signal to improve empirical mode decomposition. in IEEE International Conference on Acoustics, Speech, and Signal Processing. Vol. 4, 485–488 (IEEE, 2005).

  58. Lopes-Dos-Santos, V. et al. Parsing hippocampal theta oscillations by nested spectral components during spatial exploration and memory-guided behavior. Neuron 100, 940–952 (2018).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  59. Huang, N. E. et al. On instantaneous frequency. Adv. Adapt. Data Anal 1, 177–229 (2009).

    Article  Google Scholar 

  60. Mizuseki, K., Diba, K., Pastalkova, E. & Buzsáki, G. Hippocampal CA1 pyramidal cells form functionally distinct sublayers. Nat. Neurosci. 14, 1174–1181 (2011).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  61. Oliva, A., Fernández-Ruiz, A., Buzsáki, G. & Berényi, A. Spatial coding and physiological properties of hippocampal neurons in the Cornu Ammonis subregions. Hippocampus 26, 1593–1607 (2016).

    CAS  PubMed  Article  Google Scholar 

  62. Csicsvari, J., Hirase, H., Czurkó, A., Mamiya, A. & Buzsáki, G. Fast network oscillations in the hippocampal CA1 region of the behaving rat. J. Neurosci. 19, RC20 (1999).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

  63. Davoudi, H. & Foster, D. J. Acute silencing of hippocampal CA3 reveals a dominant role in place field responses. Nat. Neurosci. 22, 337–342 (2019).

    CAS  PubMed  PubMed Central  Article  Google Scholar 

Download references


We thank D. Bannerman and S. McHugh for helpful advice when designing the behavioral protocol, J. Westcott and B. Micklem for technical support, W. Podlaski and T. Vogels for useful discussions on neural coding models, A.J. Quinn for developing the EMD toolbox and S. Trouche, H. Barron and all the members of the Dupret laboratory for useful discussions. This work was supported by the Biotechnology and Biological Sciences Research Council UK (BB/N00597X/1 to D.D. and BB/N006836/1 to O.P.) and the Medical Research Council UK (MC_UU_12024/3 and MC_UU_00003/4 to D.D.).

Author information

Authors and Affiliations



M.E., O.P. and D.D. conceptualized the study; M.E. and D.D. designed the experiments; M.E., H.M.R., P.V.P., N.C.-U., L.A.M.S. and I.P.L. performed the experiments and acquired the data; M.E., V.L. and A.M. preprocessed the data; M.E. and V.L. analyzed the data; M.E. and D.D. wrote the manuscript and D.D. supervised the project. All authors discussed the results and commented on the manuscript.

Corresponding authors

Correspondence to Mohamady El-Gaby or David Dupret.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information Nature Neuroscience thanks Rosa Cossart, Steven Siegelbaum, 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.

Extended data

Extended Data Fig. 1 Schematics of pretraining protocol.

Schematics of pretraining phases 1 (left) and 2 (right). a, Schematic of example learning enclosures. b, Learning in pretraining phase 1 involved associating a tone with delivery of sucrose from one dispenser. In pretraining phase 2, animals learned two new LED-tone-outcome associations each day. c, In pretraining phase 1 animals initially explored the control enclosure and then experienced between 2-6 sessions of tone-defined trials. In pretraining phase 2, after exploring the control enclosure and the learning enclosure (with each LED set active in turn), tone-defined trials were presented in 6 learning sessions (3 in contingency X and 3 in contingency Y) that were pseudo-randomly ordered each day. No probe tests were carried out in either pretraining phase.

Extended Data Fig. 2 Examples of enclosure set ups and animal paths across task stages and recording days.

Enclosure set ups across distinct behavioral days. Animal coverage represented in grey. a, Example coverage paths for pre-learning exploration of learning enclosures. b, Example animal paths during learning trials in contingency X and contingency Y. c, Example animal paths during probe trials in contingency X and contingency Y. Paths of the animal during trials (correct path: black; incorrect path: red) are overlaid onto overall coverage (grey) for a single learning session. Black circles represent path starting points; blue and red circles represent correct and incorrect end points, respectively.

Extended Data Fig. 3 Dynamics of memory performance.

a, Lack of a relationship between performance on probe trials of a recording day and those of the previous day (Regression line shown in dark grey; light grey shaded area represents 95% confidence intervals). Linear regression of probe performance on day n against probe performance on day ‘n-1’: r = -0.155, P = 0.413. b, Behavioral performance during memory probe test, per mouse. Here the memory performance for each individual mouse is averaged across days, with each data point showing average performance for a single mouse (mean performance=0.10 ± 0.03). c, Probe performance (per mouse) is weaker during the first trial following a switch in LED displays (switch trials; Mean performance: -0.07 ± 0.11) compared to subsequent trials (non-switch trials; Mean performance: 0.16 ± 0.04). d, Probe performance does not change systematically across probe trials and hence no further learning is observed during memory retrieval. Linear regression of performance against trial number r = 0.030, P = 0.442.

Extended Data Fig. 4 Within- and between-contingency properties of coactivity patterns and their member neurons.

a, A Gaussian Naive Bayesian classifier was trained to decode contingencies using a combination of CA1 principal neuron firing rates and pairwise correlations. Shuffling rates, correlations or both impairs classifier performance. Data points represent individual mice. Mean accuracy; actual: 65.3 ± 4.3%, shuffled correlations: 55.0 ± 1.5%, shuffled rates: 61.2 ± 3.7%, both shuffled: 48.3 ± 0.2%; N = 10 mice. b, Cosine similarity of contingency-discriminating and contingency-invariant patterns across conditions per mouse. Contingency-discriminating: Within-contingency: 0.62 ± 0.03, between-contingency: 0.47 ± 0.02, between-enclosure: 0.41 ± 0.04; Contingency-invariant: Within-contingency: 0.82 ± 0.02, between-contingency: 0.87 ± 0.01, between-enclosure: 0.49 ± 0.06. Note that N = 10 animals for contingency-invariant patterns but 9 animals for contingency-discriminating patterns as no such patterns could be detected in one animal. c, Average firing rate of contingency-discriminating and contingency-invariant member neurons per mouse. Contingency-discriminating: Same contingency: 2.22 ± 0.33 Hz, opposite contingency: 2.09 ± 0.33 Hz; Contingency-invariant: Same contingency: 2.15 ± 0.41 Hz, opposite contingency: 2.20 ± 0.42 Hz. N = 9 animals for contingency discriminating and contingency invariant patterns as for one animal, none of the detected contingency-invariant patterns had ‘members’ (that is neurons with a weight of more than 2 standard deviations above the pattern weight vector mean). Average firing rate of contingency-discriminating and contingency-invariant member neurons using (d) 1 standard deviation (Contingency-discriminating: Same contingency: 2.00 ± 0.09 Hz, opposite contingency: 1.95 ± 0.09 Hz; Contingency-invariant: Same contingency: 2.38 ± 0.11 Hz, opposite contingency: 2.42 ± 0.11 Hz) or (e) 3 standard deviations as weight thresholds for defining pattern members (Contingency-discriminating: Same contingency: 1.93 ± 0.23 Hz, opposite contingency: 1.70 ± 0.22 Hz; Contingency-invariant: Same contingency: 2.06 ± 0.25 Hz, opposite contingency: 1.93 ± 0.21 Hz). f, Proportion of principal neurons recorded from the CA1 on the left or the right hemisphere that are members of contingency-discriminating patterns (Mean proportion: left hemisphere: 0.104 ± 0.017, right hemisphere: 0.087 ± 0.015) or contingency-invariant patterns (Mean proportion: left hemisphere: 0.129 ± 0.022, right hemisphere: 0.179 ± 0.033). g, Contingency discriminating pattern members showed a trend towards a preference for earlier phases of theta cycles compared to contingency invariant pattern members (Mean theta-phase preference, with respect to theta peak; contingency-discriminating pattern members: 156 ± 6°; contingency-invariant pattern members: 174 ± 5°; Watson-Wheeler test: W(2)=5.23, P = 0.073).

Extended Data Fig. 5 Contingency discriminating and invariant coactivity patterns show distinct relationships to task phase and performance.

a, Time-course of pattern strength changes with mice as Ns. Contingency X-discriminating and contingency Y-discriminating patterns were pooled and the strength of all patterns of a given type in its preferred contingency were averaged per mouse and the mean value quantified in exploration/learning sessions. Dashed lines represent mean pattern strength in Control enclosure. Linear regression of strength against time during Exploration (contingency-invariant: r = 0.27, P = 8.15×10-4; contingency-discriminating: r = 0.20, P = 0.02) and Learning (contingency-invariant: r = 0.19, P = 9.30×10-4; contingency-discriminating: r = 0.21, P = 4.92×10-4). Slopes of contingency invariant patterns showed a trend towards being higher than those of contingency discriminating patterns during exploration (slope = 0.0041 ± 0.0012 and 0.0025 ± 0.0015 units/minute respectively; Mann Whitney U test (two-sided): U = 25.0, P = 0.06) but not during learning (slope = 0.0038 ± 0.0015 and 0.0021 ± 0.0007 units/minute respectively; Mann Whitney U test (two-sided): U = 36.0, P = 0.24). N = 10 animals for contingency invariant patterns but 9 animals for contingency discriminating patterns as no such patterns were detected in one animal. b, Increases in contingency-invariant and contingency-discriminating pattern strengths plotted as a function of learning trials. Contingency X-discriminating and Y-discriminating patterns were pooled, and the coactivity strength of each pattern was quantified in learning trials of its preferred contingency. Linear regression of strength against trials (contingency-invariant: r = 0.04, P = 0.020; contingency-discriminating: r = 0.13, P = 1.05×10-8). Shaded area represents variability (Standard error of the mean) across coactivity patterns. c, No changes in member neuron firing rates (z-scored) across learning trials. Linear regression of firing rate against trials (contingency-invariant: r = 0.0016, P = 0.94; contingency-discriminating: r = 0.0022, P = 0.94). Shaded area represents variability (Standard error of the mean) across coactivity pattern members. d, Temporal correlations (Pearson r values) amongst each member neuron of a pattern and other members in the same pattern between exploration and learning (Mean Pearson correlation: Contingency-invariant members: exploration: 0.037 ± 0.004, learning: 0.098 ± 0.005; contingency-discriminating members: exploration: 0.019 ± 0.003, learning: 0.052 ± 0.003). e, Z-scored contingency discriminating pattern strength in the same contingency and the opposite contingency during tone and drop delivery. This is the point when animals’ behavior is maximally different between contingencies, as animals head towards opposite dispensers (Fig. 1e and Extended Data Fig. 2b). Despite this, the normalized time course of coactivity pattern strength was indistinguishable across contingencies (Two way repeated measures ANOVA: No main effect of contingency: F(1)=1.5×10-26, P = 1.00, η2 = 9.39×10-31, Main effect of time: F(117)=3.41, P = 7.61×10-32, η2 = 0.025, No contingency:time interaction: F(117)=0.76, P = 0.98, η2 = 0.006). f, Pattern strength before the animal’s choice during probe trials, on days where overall probe performance was above chance, averaged per mouse. Contingency discriminating mean strength: correct: 0.14 ± 0.04, incorrect: 0.09 ± 0.05; contingency-invariant: correct: 0.23 ± 0.08, incorrect: 0.23 ± 0.09. N = 7 animals for both contingency-discriminating and contingency-invariant patterns reflecting the number of animals with recording days in which: 1) units were recorded and isolated; 2) animals performed above chance in the probe; 3) coactivity patterns of the indicated type were detected. g, Contingency-discriminating pattern member firing rate is indistinguishable before correct vs incorrect probe trials on days where overall probe performance was above chance. Mean member rate: correct: 2.32 ± 0.26 Hz, incorrect: 2.15 ± 0.26 Hz. h, Mouse running speed before correct and incorrect trials. Mean speed: correct: 6.90 ± 0.28 cm.s-1, incorrect: 6.58 ± 0.43 cm.s-1. i, Contingency-discriminating coactivity patterns are indistinguishable before correct trials compared to incorrect trials on days when the animal’s overall probe performance is not above chance level. Mean strength: correct: 0.086 ± 0.019, incorrect: 0.090 ± 0.023. j, Decoding accuracy using 1000 ms pairwise correlations compared to shuffled controls. (Mean accuracy; Actual: 75.7 ± 2.1%, shuffled: 48.8 ± 0.2%; N = 23 recording days). k, Contingency-discriminating coactivity patterns, detected across 1000 ms windows, are not stronger before correct compared to incorrect choices on memory probe trials, on days where overall probe performance was above chance. Mean strength: correct: 0.017 ± 0.006, incorrect: 0.016 ± 0.004.

Extended Data Fig. 6 Example pattern activation and member firing rate maps.

Example pattern activation maps and corresponding place maps of pattern member neurons for (a) a contingency-invariant and a concomitantly recorded (b) contingency-discriminating coactivity pattern across all sessions. Note that the right most member of the contingency-invariant pattern is also a member of the contingency-discriminating pattern. Further examples of coactivity pattern and strength maps and member rate maps for (c) contingency invariant and (d) contingency discriminating patterns. Maps are shown for the session in which these patterns were detected. Maximum firing rate (in Hz) or maximum coactivity strength (AU) are shown above each firing rate map or pattern strength map, respectively.

Extended Data Fig. 7 Spatial firing properties of coactivity pattern members.

Spatial coherence of contingency-invariant pattern members is higher than that of contingency-discriminating pattern members (a) in the learning (Mean spatial coherence: contingency-invariant: 0.79 ± 0.01, contingency-discriminating: 0.66 ± 0.02) and (b) in the control enclosures (Mean spatial coherence: contingency-invariant: 0.71 ± 0.02, contingency-discriminating: 0.60 ± 0.02). c, Cumulative distribution of spatial firing field numbers for contingency-discriminating and contingency-invariant pattern members. (Mean field number: contingency-invariant: 1.59 ± 0.07, contingency-discriminating: 1.79 ± 0.09; Kolmogorov-Smirnov test (two-sided): D = 0.15, P = 0.08. Member neuron firing fields are less spatially overlapping for contingency-discriminating than contingency-invariant patterns using (d) 1 standard deviation (Mean spatial correlation: contingency-invariant: 0.39 ± 0.01, contingency-discriminating: 0.17 ± 0.01) or (e) 3 standard deviations (Mean spatial correlation: contingency-invariant: 0.64 ± 0.04, contingency-discriminating: 0.46 ± 0.07) as weight thresholds for defining pattern members. f, Pairwise spatial correlations of contingency-discriminating pattern members are lower than those of contingency-invariant pattern members regardless of the degree of temporal correlation between the member neurons. Two-way ANOVA: main effect of pattern type (F(1)=27.0, P = 3.87×10-7, η2 = 0.073) and temporal correlation (F(4)=9.3, P = 4.12×10-7, η2 = 0.102). No pattern type: temporal correlation interaction (F(4)=1.7, P = 0.14, η2 = 0.019). g, Example coverage traces (gray) with overlaid spiking activity (dots) of a member of a contingency-invariant (left) and a member of a contingency-discriminating (right) coactivity pattern. Spikes during a co-activation event of a given pattern are marked in blue (contingency-invariant) or orange (contingency-discriminating), while the remaining spikes are marked in dark green. Spatial firing field of the member neuron is indicated by light green shading. h, Infield versus outfield co-activation score for member neurons of contingency-invariant and contingency-discriminating patterns (Mean score: contingency-invariant: 0.56 ± 0.04, contingency-discriminating: 0.18 ± 0.05). i, Pairwise spatial correlations of high explained variance and low explained variance principal cell pairs. Mean spatial correlation: High explained variance pairs (N = 993): 0.134 ± 0.010, low explained variance pairs (N = 369): 0.204 ± 0.014; Mann Whitney U test (two-sided): U = 155648.0, P = 9.69×10-6. j, Matrices showing mean spatial correlations of members of contingency invariant (left) and contingency-discriminating (right) patterns across all sessions. k, Spatial correlation of each contingency discriminating pattern member neuron across sessions of the same contingency or of opposite contingencies showing only member neurons with spatial coherence matching that of contingency-invariant pattern members (Mean spatial correlation: within-contingency 0.58 ± 0.02, between-contingency: 0.72 ± 0.02). l, Spatial correlations between members of the same contingency-invariant (left) or contingency-discriminating (right) patterns across sessions. For both pattern types spatial correlations amongst pairs of neurons of the same coactivity patterns were higher during the learning stage than during the exploration stage further reflecting the development of these patterns with learning. Spatial correlations amongst members of the same contingency discriminating or those of contingency-invariant patterns were lowest in the control enclosure and highest in the last learning sessions, confirming the enclosure-selectivity of hippocampal maps. Key to x-axis labels: first letter denotes contingency in which pattern was detected, subsequent letters denote session in which spatial maps of members were computed (for example X-Y2 are the spatial maps of members of coactivity patterns detected in contingency X, plotted in session Y2; that is second learning session of contingency Y). Mean spatial correlation: contingency-invariant: X-X2 & Y-Y2 (pooled): 0.605 ± 0.015, X-Y2 & Y-X2: 0.543 ± 0.018, X-X1 & Y-Y1: 0.438 ± 0.021, X-X0 & Y-Y0: 0.230 ± 0.023, X-Control & Y-Control: 0.114 ± 0.021; contingency-discriminating: X-X2 & Y-Y2: 0.297 ± 0.027, X-Y2 & Y-X2: 0.200 ± 0.025, X-X1 & Y-Y1: 0.191 ± 0.026, X-X0 & Y-Y0: 0.086 ± 0.023, X-Control & Y-Control: 0.023 ± 0.024.

Extended Data Fig. 8 Behavioral and neural effects of silencing left or right hemisphere originating CA3-CA1 inputs.

a, Example LFP trace containing theta-nested mid and slow gamma oscillations (top; raw trace and theta component as black and magenta traces, respectively) along with its time-frequency representation (bottom) (b) Example of the selective effect of CA3L → CA1 input suppression on the slow but not the mid gamma oscillations. Shown are Hilbert-spectra as a function of ongoing theta phase for pre, during and post light delivery in a representative session (colors represent the same scale in all three panels). Theta cycles were subsampled to maintain instantaneous speed distributions across panels. c, Firing rate of CA1 principal neurons is increased by light delivery (Mean normalized (z-scored) firing rate: light OFF epochs: -0.011 ± 0.002, light ON epochs (1 minute after light onset): 0.004 ± 0.002; right, example raster plot during light ON period for one light ON epoch in a single recording day). d, The ratio of detected coactivity patterns to CA1 principal neurons is unaltered by CA3L → CA1 input suppression (Mean pattern-to-neuron ratio: Light OFF days: 0.20 ± 0.01, Light ON days: 0.20 ± 0.02). e, Reinstatement strength of all coactivity patterns is unaltered by CA3L → CA1 input suppression (Mean probe:learning pattern strength ratio: Light OFF: 0.59 ± 0.02, Light ON: 0.63 ± 0.04). Results in panels e and d show that input suppression does not alter the overall organisation of CA1 neurons into coactivity patterns nor the cross-session stability of such coactivity. f, The strength of coactivity patterns detected in the CA1 under CA3L → CA1 input suppression is less sensitive to contingencies compared to light OFF days (Mean pattern strength change across contingencies: Light OFF days: 0.22 ± 0.01, Light ON days: 0.15 ± 0.02). g, Explained variance for contingency is higher in light OFF days compared to days with CA3L → CA1 input suppression. Mean normalised explained variance (standard deviations from mean): Light OFF days: 0.36 ± 0.01 (N = 19852 neuron pairs), Light ON days (N = 5696 neuron pairs): 0.10 ± 0.02; Mann Whitney U test (two-sided): U = 51962023.0, P = 9.36×10-21. h, CA3L → CA1 input suppression impairs Gaussian naïve Bayesian decoding accuracy using short-timescale (25 ms) correlations (Mean normalised decoding accuracy (standard deviations from mean): Light OFF days (N = 23 days): 1.80 ± 0.33, Light ON days (N = 8 days): 0.75 ± 0.45). i, CA3L → CA1 input suppression does not impair performance during learning trials. Mean performance: Light OFF: 0.90 ± 0.02 (n = 31 days), Light ON: 0.86 ± 0.02 (n = 20 days); Mann Whitney U test (two-sided): U = 240.0, P = 0.09. j, Comparison of mean probe performance on light OFF and light ON (CA3L → CA1 input suppression) days averaged per animal. (Mean performance: Light OFF days: 0.15 ± 0.07, Light ON days: -0.02 ± 0.08). Effect of CA3L → CA1 input suppression on performance on (k) the first trial following a switch in LED displays (‘switch’ trials; Mean performance: Light OFF days: 0.18 ± 0.17, Light ON days: -0.21 ± 0.16) and on (l) subsequent trials (‘non-switch’ trials: Light OFF days: 0.18 ± 0.12, Light ON days: 0.01 ± 0.11). m, Suppressing CA3L inputs to CA1 during learning does not impair memory performance in probe trials when each LED set signals the same contingency (same dispenser-sucrose and dispenser-quinine pairing) throughout all learning sessions (‘One-contingency training days’; Mean performance: Light OFF days: 0.57 ± 0.11, Light ON days: 0.54 ± 0.14). n, Schematic of CA3R → CA1 optogenetic suppression protocol. CA3R neurons were transduced with Archaerhodopsin 3.0 in Grik4-Cre mice (n = 6) and their axonal projections in the CA1 targeted bilaterally during learning trials with yellow 561nm-light delivery from implanted optic fibres. CA3R → CA1 input suppression during learning of the two-contingency task does not impair performance in probe trials, when taking (o) all (Mean performance: Light OFF: 0.06 ± 0.03, Light ON: 0.05 ± 0.08), (p) switch (Mean performance: Light OFF: -0.16 ± 0.12, Light ON: -0.01 ± 0.17) or (q) non-switch trials (Mean performance: Light OFF: 0.12 ± 0.05, Light ON: 0.17 ± 0.09). r, Suppression of CA3R → CA1 input reduces the power of theta-nested slow gamma oscillations to a similar extent as with CA3L → CA1 input suppression without affecting mid gamma oscillations. Two-way repeated measures ANOVA: Slow gamma: Main effect of light (F(1)=64.2, P > 0.001, η2 = 0.592), no main effect of CA3 hemisphere (F(1)=0.571, P = 0.457, η2 = 0.005) on normalised gamma power; Mid gamma: No main effect of light (F(1)=1.22, P = 0.281, η2 = 0.029), no main effect of CA3 hemisphere (F = 0.226, P = 0.639, η2 = 0.005) on normalised gamma power. s, SWR frequency increases with suppression of either CA3L → CA1 or CA3R → CA1 inputs (mean frequency: Light OFF days: 152 ± 1 Hz, Light ON days (left): 156 ± 2 Hz, Light ON days (right): 155 ± 2 Hz. t, Awake sharp-wave ripple (SWR) duration is reduced by suppression of either CA3L → CA1 or CA3R → CA1 inputs (mean duration: Light OFF days: 39 ± 1 ms, Light ON days (left): 35 ± 1 ms, Light ON days (right): 36 ± 1 ms). This reduction is therefore not sufficient to explain the selective impairment of memory performance after suppressing CA3L → CA1 but not CA3R → CA1 inputs. u, Incidence rates of awake SWRs during suppression of either CA3L → CA1 or CA3R → CA1 inputs (mean incidence rate: Light OFF days: 0.039 ± 0.006 Hz, Light ON (left) days: 0.059 ± 0.012 Hz, Light ON (right) days: 0.080 ± 0.027 Hz). We did not observe a reduction in awake SWR incidence rates, unlike a previous study using bilateral silencing of CA3 neurons in rats63. Possible co-occurrence of SWR generating processes in the CA3 across hemispheres may explain why unilateral silencing does not impair the incidence rate of CA1 SWRs. Nevertheless, the reduction in SWR duration seen when silencing unilateral CA3 inputs from either hemisphere suggests that input from the CA3 on both hemispheres is needed for the full expression of a given CA1 SWR.

Extended Data Fig. 9 Example coactivation maps and raster plots of principal neuron activity with or without left CA3-CA1 silencing.

Example coactivity patterns during (a) light OFF and (b) CA3L → CA1 input suppression (light ON) days across both learning contingencies (sessions X2 and Y2). Top of each panel depicts strength maps for several representative coactivity patterns, while below example coactivations for the left most pattern are shown in more detail. All coactivations (defined as coactivity strength above 2 standard deviation of mean strength in preferred contingency; displayed as coloured dots) are superimposed on coverage maps in each contingency (bottom left). Raster plots show the time-courses of neuronal firing (members color-coded orange or blue to denote contingency discriminating or contingency invariant pattern, respectively) and coactivation strengths for four separate paths (color-coded) across each contingency (bottom right) are plotted.

Extended Data Fig. 10 Schematic representation of emergent coactivity coding and a potential single-neuron reading mechanism.

a, Top: Schematics contrasting a hypothetical rate code(Adrian, 1) (left) and emergent coactivity code (right) for disambiguating contingencies. Bottom: Emergent coactivity code for contingencies with temporal windows indicated by dashed rectangles aligned to spikes from neuron 1 (left) or neuron 4 (right) showing that neurons 1, 2 and 3 are more coactive for contingency Y while neurons 4, 5 and 6 are more coactive for contingency X. b, A hypothetical ‘reader’ neuron can disambiguate distinct patterns of coactivity, for example by supralinear summation of one set of coactive inputs (for example from upstream neurons 1, 2 and 3), but only linear/sublinear summation of another (from upstream neurons 4, 5 and 6). Such non-linearities could result from the preferential activation of voltage-gated dendritic conductances, for example through clustering of synaptic inputs on dendritic branches (Stuart and Spruston, 48). The membrane time-constant (~10-30 ms in forebrain pyramidal neurons (Koch et al., 9)) constrains a reader neuron’s integration time-window, and hence this mechanism is particularly suited for short-timescale coactivity. Note that the converse may be true for another reader neuron, with inputs from neurons 4, 5, and 6 preferentially exhibiting supralinear summation and hence preferentially driving activity in this alternative neuron. Vm: membrane potential.

Supplementary information

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

El-Gaby, M., Reeve, H.M., Lopes-dos-Santos, V. et al. An emergent neural coactivity code for dynamic memory. Nat Neurosci 24, 694–704 (2021).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:

Further reading


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