Skip to main content

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.

  • Article
  • Published:

Experience-dependent contextual codes in the hippocampus

Abstract

The hippocampus contains neural representations capable of supporting declarative memory. Hippocampal place cells are one such representation, firing in one or few locations in a given environment. Between environments, place cell firing fields remap (turning on/off or moving to a new location) to provide a population-wide code for distinct contexts. However, the manner by which contextual features combine to drive hippocampal remapping remains a matter of debate. Using large-scale in vivo two-photon intracellular calcium recordings in mice during virtual navigation, we show that remapping in the hippocampal region CA1 is driven by prior experience regarding the frequency of certain contexts and that remapping approximates an optimal estimate of the identity of the current context. A simple associative-learning mechanism reproduces these results. Together, our findings demonstrate that place cell remapping allows an animal to simultaneously identify its physical location and optimally estimate the identity of the environment.

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: VR setup for imaging CA1 neurons and the construction of priors for rare morph versus frequent morph conditions.
Fig. 2: Prior experience of stimulus frequency determines CA1 place cell remapping.
Fig. 3: Population similarity analyses reveal distinct remapping patterns visible at the level of single trials.
Fig. 4: CA1 representations show stable discrimination of morph values along the length of the track.
Fig. 5: CA1 hippocampal remapping approximates the optimal estimation of the stimulus.
Fig. 6: Individual animal prior distributions can be recovered solely from remapping patterns.
Fig. 7: Neural context discrimination is well explained by associative-learning models.

Similar content being viewed by others

Data availability

The datasets generated during the current study are available in the DANDI repository (https://dandiarchive.org/dandiset/000054/draft).

Code availability

The computer code used for analysis and simulations, as well as creating and controlling VR environments in Unity, is available at https://github.com/GiocomoLab/PlittGiocomo_2021.

References

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

    Article  PubMed  Google Scholar 

  2. Bostock, E., Muller, R. U. & Kubie, J. L. Experience-dependent modifications of hippocampal place cell firing. Hippocampus 1, 193–205 (1991).

    Article  CAS  PubMed  Google Scholar 

  3. Colgin, L. L. et al. Attractor-map versus autoassociation based attractor dynamics in the hippocampal network. J. Neurophysiol. 104, 35–50 (2010).

    Article  PubMed  PubMed Central  Google Scholar 

  4. 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  PubMed  Google Scholar 

  5. Leutgeb, J. K. et al. Progressive transformation of hippocampal neuronal representations in ‘morphed’ environments. Neuron 48, 345–358 (2005).

    Article  CAS  PubMed  Google Scholar 

  6. Leutgeb, S., Leutgeb, J. K., Treves, A., Moser, M. B. & Moser, E. I. Distinct ensemble codes in hippocampal areas CA3 and CA1. Science 305, 1295–1298 (2004).

    Article  CAS  PubMed  Google Scholar 

  7. Lever, C., Wills, T., Cacucci, F., Burgess, N. & O’Keefe, J. Long-term plasticity in hippocampal place-cell representation of environmental geometry. Nature 416, 236–238 (2002).

    Article  Google Scholar 

  8. Muller, R. U. & Kubie, J. L. The effects of changes in the environment on the spatial firing of hippocampal complex-spike cells. J. Neurosci. 7, 1851–1868 (1987).

    Google Scholar 

  9. O’Keefe, J. & Conway, D. H. Hippocampal place units in the freely moving rat: why they fire where they fire. Exp. Brain Res. 31, 573–590 (1978).

    PubMed  Google Scholar 

  10. Wills, T. J., Lever, C., Cacucci, F., Burgess, N. & O’Keefe, J. Attractor dynamics in the hippocampal representation of the local environment. Science 308, 873–876 (2005).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

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

    Article  CAS  PubMed  Google Scholar 

  12. Lee, I., Yoganarasimha, D., Rao, G. & Knierim, J. J. Comparison of population coherence of place cells in hippocampal subfields CA1 and CA3. Nature 430, 456–459 (2004).

    Article  CAS  PubMed  Google Scholar 

  13. Sanders, H., Wilson, M. A. & Gershman, S. J. Hippocampal remapping as hidden state inference. eLife 9, e51140 (2020).

    Article  PubMed  PubMed Central  Google Scholar 

  14. McInnes, L., Healy, J. & Melville, J. UMAP: uniform manifold approximation and projection for dimension reduction. Preprint at arXiv https://arxiv.org/abs/1802.03426 (2018).

  15. Rolls, E.T. in The Neural and Molecular Bases of Learning (eds Changeux, J.-P. & Konishi, M.) 503–540 (Wiley, 1987).

  16. McNaughton, B. L. & Morris, R. G. M. Hippocampal synaptic enhancement and information storage within a distributed memory system. Trends Neurosci. 10, 408–415 (1987).

    Article  Google Scholar 

  17. Fiser, J., Berkes, P., O’rban, G. & Lengyel, M. Statistically optimal perception and learning: from behavior to neural representations. Trends Cogn. Sci. 14, 119–130 (2010).

    Article  PubMed  PubMed Central  Google Scholar 

  18. Pouget, A., Beck, J. M., Ma, W. J. & Lathan, P. E. Probabilistic brains: knowns and unknowns. Nat. Neurosci. 16, 1170–1178 (2013).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  19. Nessler, B., Pfieffer, M., Buesing, L. & Maass, W. Bayesian computation emerges in generic cortical microcircuits through spike-timing-dependent plasticity. PLoS Comput. Biol. 9, e1003037 (2013).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  20. Keinath, A. T., Nieto-Posadas, A., Robinson, J. C. & Brandon, M. P.DG–CA3 circuitry mediates hippocampal representations of latent information. Nat. Commun. 11, 3026 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  21. Chen, S. et al. A hypothalamic novelty signal modulates hippocampal memory. Nature 586, 270–274 (2020).

    Article  CAS  PubMed  Google Scholar 

  22. Keinath, A.T., Mosser, C.A. & Brandon, M.P. Extended experience reveals distinct representational dynamics governing the CA1 spatial code. Preprint at bioRxiv https://doi.org/10.1101/2021.01.12.426395 (2021).

  23. Sheffield, M. E. J. & Dombeck, D. A. Increased prevalence of calcium transients across the dendritic arbor during place field formation. Neuron 96, 490–504 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  24. Aronov, D. & Tank, D. W. Engagement of neural circuits underlying 2D spatial navigation in a rodent virtual reality system. Neuron 84, 442–456 (2014).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  25. Cohen, J. D., Bolstad, M. & Lee, A. K. Experience-dependent shaping of hippocampal CA1 intracellular activity in novel and familiar environments. eLife 6, e23040 (2017).

    Article  PubMed  PubMed Central  Google Scholar 

  26. Danielson, N. B. et al. Sublayer-specific coding dynamics during spatial navigation and learning in hippocampal area CA1. Neuron 91, 652–665 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  27. Hainmueller, T. & Bartos, M. Parallel emergence of stable and dynamic memory engrams in the hippocampus. Nature 558, 292–296 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  28. Acharya, L., Aghajan, Z. M., Vuong, C., Moore, J. J. & Mehta, M. R. Causal influence of visual cues on hippocampal directional selectivity. Cell 164, 197–207 (2016).

    Article  CAS  PubMed  Google Scholar 

  29. Aghajan, Z. M. et al. Impaired spatial selectivity and intact phase precession in two-dimensional virtual reality. Nat. Neurosci. 18, 121–128 (2015).

    Article  CAS  PubMed  Google Scholar 

  30. Marr, D. Simple memory: a theory for archicortex. Philos. Trans. R. Soc. Lond. B Biol. Sci. 262, 23–81 (1971).

    Article  CAS  PubMed  Google Scholar 

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

    Article  CAS  PubMed  Google Scholar 

  32. Lever, C., Burgess, N., Cacucci, F., Hartley, T. & O’Keefe, J. What can the hippocampal representation of environmental geometry tell us about Hebbian learning? Biol. Cybern. 87, 356–372 (2002).

    Article  PubMed  Google Scholar 

  33. Stachenfeld, K. L., Botvinick, M. M. & Gershman, S. J. The hippocampus as a predictive map. Nat. Neurosci. 20, 1643–1653 (2017).

    Article  CAS  PubMed  Google Scholar 

  34. Samsonovich, A. & McNaughton, B. L. Path integration and cognitive mapping in a continuous attractor neural network model. J. Neurosci. 17, 5900–5920 (1997).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  35. Hedrick, K. R. & Zhang, K. Megamap: flexible representation of a large space embedded with nonspatial information by a hippocampal attractor network. J. Neurophysiol. 116, 868–891 (2016).

    Article  PubMed  PubMed Central  Google Scholar 

  36. Wilson, R.C. & Finkel, L.H. A neural implementation of the Kalman Filter. Adv. Neural Inf. Process. Syst. 22, 2728–2736 (2009).

    Google Scholar 

  37. Deneve, S., Duhamel, J. R. & Pouget, A. Optimal sensorimotor integration in recurrent cortical networks: a neural implementation of Kalman filters. J. Neurosci. 27, 5744–5756 (2007).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  38. 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  PubMed  PubMed Central  Google Scholar 

  39. Constantinescu, A. O., O’Reilly, J. X. & Behrens, T. E. Organizing conceptual knowledge in humans with a gridlike code. Science 352, 1464–1468 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  40. Tsien, J. Z. et al. Subregion- and cell type-restricted gene knockout in mouse brain. Cell 87, 1317–1326 (1996).

    Article  CAS  PubMed  Google Scholar 

  41. Dana, H. et al. High-performance calcium sensors for imaging activity in neuronal populations and microcompartments. Nat. Methods 16, 649–657 (2019).

    Article  CAS  PubMed  Google Scholar 

  42. Lovett-Barron, M. et al. Dendritic inhibition in the hippocampus supports fear learning. Science 343, 857–863 (2014).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  43. Dombeck, D. A., Harvey, C. D., Tian, L., Looger, L. L. & Tank, D. W. Functional imaging of hippocampal place cells at cellular resolution during virtual navigation. Nat. Neurosci. 13, 1433–1440 (2010).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  44. Skaggs, W. E., McNaughton, B. L., Gothard, K. J. & Markus, E. J. An information-theoretic approach to deciphering the hippocampal code. Adv. Neural Inf. Process. Syst. 5, 1030–1037 (1993).

    Google Scholar 

Download references

Acknowledgements

This work was supported by funding from the New York Stem Cell Foundation, the Office of Naval Research (N00141812690), the Simons Foundation (542987SPI), the Vallee Foundation and the James S. McDonnell Foundation to L.M.G., and a National Science Foundation Graduate Research Fellowship awarded to M.H.P. We thank A. Diaz for histology and behavioral training assistance. We thank K. Hardcastle, A. H. Williams and S. Ganguli for helpful discussions regarding data analyses and modeling, and A. Drinnenberg and K. Kaganovsky for providing feedback on the manuscript.

Author information

Authors and Affiliations

Authors

Contributions

M.H.P. and L.M.G. conceptualized experiments and analyses. M.H.P. collected and analyzed data and performed computational simulations. M.H.P. and L.M.G. wrote the paper.

Corresponding authors

Correspondence to Mark H. Plitt or Lisa M. Giocomo.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information Nature Neuroscience thanks the anonymous reviewers 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 Licking behavior and number of cells recorded per session.

a, The number of cells identified per session is plotted for each rare morph animal individually. Each mouse shown as a different color. b, Same as (a) for all frequent morph animals. c, Single trial lick rate as a function of position is shown for an example rare morph session (R3, session 8; n = 120 trials). Left: Each row indicates the smoothed lick rate across positions for a single trial. The color of the row indicates the morph value (colormap in Fig. 1c). The grey shaded region indicates possible reward locations. Trials are shown in the order in which they occurred during the experiment. Right: Trials are sorted by the location of the reward cue. The color code also indicates increasing reward distance from the start of the track (green to yellow). Black trials are those in which the reward cue was omitted. d, Same as (c) for an example frequent morph session (F5, session 8; n = 120 trials). e, Across session mean lick rate (licks/sec) as a function of position (see [a-b] for number of sessions and color code) is plotted as a separated line for each mouse (R1-R6 & F1-F6; mean ± SEM). The color scheme for each mouse is the same as in the rest of the manuscript. Grey shaded region indicates possible reward location as in (c-d). f, The same data as (e) is normalized by the animal’s overall mean lick rate. g, Normalized mean lick rates were combined across rare and frequent morph animals. Trials were then binned by reward location (50 cm bins) and plotted as a function of position (across animal mean ± SEM). Color code is the same as (c-d).

Extended Data Fig. 2 Across Virtual Reality (VR) scene variance is best predicted by the horizontal component of the frequency of wall cues.

a, Schematic of how across scene covariance was determined. Screenshots of the virtual scene were taken at every 10 cm for the range of possible wall, tower, and background morph parameter settings. Translation invariant representations of these VR scenes were acquired by calculating the two-dimensional Fast Fourier Transform (FFT) of every screenshot on each color channel (RGB). Discarding phase information, we took the power spectrum for each channel and each screenshot. We flattened each of the FFT power spectrums into a column vector. Column vectors for every color channel and every position along the track were concatenated for a given morph parameter setting. This procedure gives one column vector for each morph parameter setting. We then horizontally stacked these column vectors for each morph parameter setting to give a matrix that we used to calculate a morph by morph covariance matrix. We then performed Principal Components Analysis (PCA) on this matrix. b, The eigenvalues of the morph by morph covariance matrix are plotted. c, The projection of each morph parameter setting onto the first principal component (PC1) from (a) plotted as a function of the wall morph value (\(\tilde S\) + wall jitter)(left vertical axis, blue points). The horizontal component of the frequency of the wall cues, fh, is also plotted (right vertical axis, red points). d, The projection of each morph parameter setting onto PC1 is plotted as a function of wall morph value (left vertical axis, blue points). The vertical component of the frequency of the wall cues, fv, is also shown (right vertical axis, red points). e, The projection of each morph parameter setting onto PC1 is plotted as a function of tower morph value (\(\tilde S\)+ tower jitter)(left vertical axis, blue points). The normalized blue color channel pixel value of the towers is also plotted (right vertical axis, red points). The normalized green color channel pixel value of the tower is one minus the blue color channel. f, The projection onto PC1 is plotted as a function of background morph value (\(\tilde S\)+ background jitter). The normalized background color pixel intensity is also plotted (right vertical axis, red points). g, The log of the mean squared error (log(MSE)) of a linear regression to predict the projection of morph parameter settings onto PC1 is plotted for models using different sets of predictors. The ‘all’ model uses fh, fv, background pixel value (b), tower blue pixel value (t), and the angle of the wall cues (angle) as predictors of the projection onto PC1. The failure of this model is likely due to the strong correlation among stimulus values. Every other model uses only a single aspect of the stimulus to predict the projection onto PC1. The horizontal component of wall frequency, fh, is the strongest predictor of the projection onto PC1. h, Ideal rare morph log posterior distribution as plotted Fig. 1f. i, Ideal frequent morph log posterior distribution as plotted Fig. 1f.

Extended Data Fig. 3 Remapping patterns for a simulated population designed to stochastically encode the posterior distribution reproduces our recorded remapping patterns.

a, Schematic for model of a ‘neural posterior’. Left: As the animal runs down the track, it tries to infer the identity of the environment it is occupying. The probability of the environment is given by the posterior distribution. Right: We assume that the activity of the neurons we are observing is governed by radial basis function tuning curves for distinct values of the inferred stimulus. b, Process for generating activity. Left: As the animal runs down the track, a process generates several random samples from the posterior distribution. Middle: Each of these samples is filtered through the deterministic neural tuning curves shown in (a). Right: Cellular activity rates are generated by a gamma process with parameters determined by the neural activation. Gamma processes were chosen, as calcium activity rate is a continuous variable. Mean and variance of gamma processes were chosen to be identical so they were more Poisson-like. c, Left: The ideal rare morph posterior distribution as plotted in Fig. 1f (top right) and elsewhere. Right: The activity of a simulated population that encodes samples from the rare morph posterior is shown for different fh values. Each row of the heat map is the activity of a single cell sorted by the fh values for which it has peak selectivity. Each column is the value of fh used to generate a draw from the posterior distribution. Color (white to purple) indicates the average activity of the cell across 1000 draws from the posterior distribution. Yellow points show the index in the population that has the highest average activity rate. Maroon points indicate the ideal rare morph MAP estimates as in left. Note the similarity between the ideal posterior distribution (left) and the activity of the population designed to encode it (right). d, Same as (c) for simulations using the ideal frequent morph posterior distribution. e, Example trial by trial similarity matrices for simulated populations encoding the rare morph posterior. f, Same as (e) for simulated populations encoding the frequent morph posterior. g, Average rare morph trial x trial similarity matrix (n = 1,000 simulations). h, Average frequent morph trial x trial similarity matrix (n = 1,000 simulations). i, Difference in mean trial x trial similarity matrices (rare [g] – frequent [h]). j, Same as (i) but similarity matrices are z-scored prior to averaging (diagonal elements excluded).

Extended Data Fig. 4 Analysis of place cells with place fields in both \(\tilde S\) = 0 and \(\tilde S\) = 1 environments, and analysis of posterior distribution entropy.

a, Fraction of cells classified as place cells in the \(\tilde S\) = 0 trials (magenta), \(\tilde S\) = 1 trials (cyan), and both \(\tilde S\) = 0 and \(\tilde S\) = 1 trials (intersection of the sets of cells; navy). The number of cells expected to be classified as place cells in both environments if cells were chosen randomly with replacement is also shown (red). b, For cells that were classified as place cells in both \(\tilde S\) = 0 and \(\tilde S\) = 1 trials (n = 2,219 cells) in rare morph animals, we plotted the location of peak activity for \(\tilde S\) = 0 trials against the location of peak activity for \(\tilde S\) = 1 trials. Marginal histograms are shown for occupancy of position bins in the \(\tilde S\) = 0 trials (bottom) and \(\tilde S\) = 1 trials (right). Shaded regions indicate possible reward locations. c, Same as (b) for all frequent morph animals (n = 594 cells). d, Same as Fig. 2b (rare morph condition) but only cells that had place fields in both \(\tilde S\) = 0 and \(\tilde S\) = 1 trials are plotted (n = 2,219 cells). e, Same as Fig. 2d (frequent morph condition) but only cells that had place fields in both \(\tilde S\) = 0 and \(\tilde S\) = 1 trials are plotted (n = 594 cells). f, Example posterior distributions (rare morph-maroon, frequent morph-blue) for different values of \(\hat f_h\) (that is columns of Fig. 1f). g, Entropy of the posterior distribution as a function of \(\hat f_h\) (rare morph-maroon, frequent morph-blue).

Extended Data Fig. 5 Unsupervised confirmation of discrete vs continuous remapping.

a, Schematic of nonlinear dimensionality reduction. Morph-binned spatial activity rate maps were generated for cells with significantly different activity rate maps between \(\tilde S = 0\) and \(\tilde S = 1\). Morph by position maps were flattened and then stacked to form a cells x (position bins*morph bins) matrix. We performed UMAP dimensionality reduction on this matrix. This produces an embedding space for plotting individual cells. In this space, cells with similar activity rate maps are close together, and cells with dissimilar activity rates are further apart. b, Three-dimensional embedding given by UMAP colored by different experimentally relevant variables. Top Left: Cells/points are colored by the morph value for which their activity is the highest (color bar right). Top Right: Cells/points are colored by their position of peak activity (color bar right). Bottom Left: Cells/points are colored by whether they came from the rare morph condition (orange) or frequent morph condition (blue). Bottom Right: Density based clustering was performed to separate the two main manifolds. K-means clustering was performed on each of the manifolds (10 clusters per manifold, 20 total clusters [numbered on plot], colors correspond to different clusters). c, Decoding performance (logistic regression) for classifying cells as coming from the rare morph or frequent morph condition for each cluster from the S = 0 manifold (magenta, Top) or from the S = 1manifold (cyan, Bottom). Classification accuracy is plotted as a function of the spatial preference of that cluster. Grey shaded region indicates the range of chance performance by permutation test (n = 1,000 permutations). Red shaded regions highlight reward locations d, Average remapping patterns for rare and frequent morph cells within an example cluster (b, lower right). For each cluster, we give the rare vs. frequent classification accuracy. For each example cluster, we plot the cell averaged morph-binned activity rate map for rare morph (first column, top) and frequent morph (second column, top) cells as well as the associated cosine similarity matrix (bottom). Third column shows the difference between the first and second column (Rare-Freq.). Black arrows indicate S = 0.25−.5 region where magnitude of difference is expected to be the largest.

Extended Data Fig. 6 Nonnegative matrix factorization on population of single cell trial by trial similarity matrices confirms discrete (rare morph) versus continuous remapping (frequent morph).

a, Schematic for how Nonnegative Matrix Factorization (NMF) was performed. For each cell within an imaging session, we flattened the upper triangle of its trial by trial similarity matrix (as seen in Fig. 1g,i) to form a vector. These vectors were then stacked to form a Neurons × (Trials (Trials − 1)/2) matrix, X. NMF was then performed on this matrix yielding a factors matrix, HT, and a loadings matrix, W. The rows of HT can be reshaped into ‘prototypical similarity matrices’. b, NMF factors for rank three models for example rare morph sessions from each rare morph mouse. Color coding indicates maximum (yellow) and minimum (blue) values. c, Same as (b) for example sessions from each frequent morph mouse.

Extended Data Fig. 7 Population similarity analyses from every rare morph session and mouse.

The animal from which data is derived is shown in large bold text above (for example R1). For each animal, each row of plots indicates data from a single session sorted by increasing session number. Session 3 data is included for all animals except R6. Left: Trial by trial population similarity matrices are shown, sorted by morph value (lower plot), as in Fig. 3a. Right: Q estimates (estimates of \(P(f_h|\hat f_h)\)) for given session. ΔDKL value is given for each session.

Extended Data Fig. 8 Population similarity analyses from every frequent morph session and mouse.

The animal from which data is derived is shown in large bold text above (for example F1). For each animal, each row of plots indicates data from a single session sorted by increasing session number. Session 3 data is included for all animals. Left: Trial by trial population similarity matrices are shown, sorted by morph value (lower plot), as in Fig. 3a. Right: Q estimates (estimates of \(P(f_h|\hat f_h)\)) for given session. ΔDKL value is given for each session.

Extended Data Fig. 9 Session 3 remapping patterns are consistent with later session remapping in the majority of animals, and results are poorly fit by null posterior distributions.

a, Left Column: Trial by trial similarity matrices for session 3 from two rare morph mice (R3-1,973, 90 trials; R4-922 cells, 60 trials). Trials sorted by increasing morph value. Right column: Q estimates for example sessions. b, Same as (a) for example frequent morph sessions (F6, 3,657 neurons, 100 trials; F3, 295 cells, 120 trials). c, ΔDKL for each rare morph mouse plotted as a function of session number. Session 3 data unavailable for R6. d, Same as (c) for frequent morph animals. e, Q estimate for accumulated session 3 data across rare morph mice. f, Same as (e) for frequent morph mice. g-h, Reconstructed prior distributions for rare (g) and frequent (h) morph mice using session 3 data alone. Average rare (maroon) and frequent (blue) morph prior are shown. i, Relative distance of reconstructed priors to ideal priors, ΔDKL, for each mouse (rare mice-left; frequent mice-right). j, Top: Prior distributions for additional models tested for comparison with Q estimates. Bottom: Associated posterior distributions for each prior. We additionally compared Q estimates to a uniform posterior (\(P\left( {f_h{\mathrm{|}}\hat S} \right) = c\), where c is a constant). k, Left: Kullback-Leibler divergence (DKL) between each posterior in (j) and the Q estimate. Points are colored by mouse ID. Thick maroon line indicates the across session average. (***) indicate significant differences in DKL with the rare morph DKL values (Wilcoxon signed-rank test, n = 24 sessions; frequent, p = 2.3 × 10−4; uniform, p = 4.7 × 10−4; Gaussian, p = 1.8 × 10−5; multimodal, p = 1.8 × 10−5; uniform posterior, p = 1.82 × 10−5). Right: DKL between reconstructed prior and different priors shown in (j). l, Same as (k) for frequent morph sessions. Left: Thick blue line indicates across session average. Wilcoxon signed rank tests compare DKL for the frequent morph condition to DKL for all other posteriors in (j) (Wilcoxon signed-rank test, n = 21 sessions; rare, p = 6.0 × 10−5; uniform, p = 0.019; Gaussian, p = 6.0 × 10−5; multimodal, p = 6.0 × 10−5; uniform posterior, p = 6.0 × 10−5).

Extended Data Fig. 10 Requiring frequent morph animals to behaviorally categorize morph values does not change neural context discrimination.

a, Stimulus design, as in Fig. 1b, for frequent morph trained animals that had to behaviorally categorize morph values (frequent morph with decision, n = 4 animals, FD1–FD4). A side view of a subset of VR tracks with different morph values (S) are shown. Vertical location indicates approximate morph value for the track shown (color bar to the right of tracks). For trials where S ≤ 0.5, animals had to lick within a 65 cm region surrounding the third tower (polka dot tower, magenta highlighted region). For trials where S > 0.5, animals had to lick within a 65 cm region surrounding the fourth tower (hatched pattern tower, cyan highlighted region). For one animal (FD1), we added punishments for licking in the incorrect reward zone after session 3. If the animal licked in the incorrect reward zone, it was instantly teleported to a dark hallway for 10 seconds before being able to begin the next trial. b, Left: Lick rate as a function of position for each trial as in Extended Data Fig. 1c,d for an example session (FD1, session 13, n = 120 trials). Red dots indicate error. Color indicates morph value of the trial. Shaded regions indicate reward zones as in (a). Right: Trials are sorted by increasing morph value c, For mice that did not receive timeouts for incorrect licks (n = 3, FD2-4), we plot the across mouse average normalized lick rate (normalization as in Extended Data Fig. 1) as a function of position (across mouse mean ± SEM) for binned morph values (\(\tilde S\) = 0, 0.25, 0.5, 0.75, 1). d. Far Left: Trial by trial cosine similarity matrix sorted by increasing morph value for an example session from the mouse that experienced timeouts (FD1, session 13; 120 trials, 1451 cells). Middle Left: Projection of single trials onto the principal two eigenvectors of the similarity matrix. Color indicates morph value. Middle Right: Similarity Fraction, SF, as a function of position as in Fig. 3f. Color indicates morph value. Far Right: Q estimates. e, Same as (d) for an example session from an animal that did not receive timeouts for incorrect licks (FD4, session 12; 100 trials, 924 cells). f, Q estimate using pooled data across all FD mice. g, Background heatmap is the ideal frequent morph posterior distribution. Blue scatterplot points are the MAP estimate from this ideal posterior. Remaining overlaid scatterplot is the linearly transformed SF(fh) values for every trial and every mouse (N = 2,460 trials). Colors indicate mouse ID. h, Reconstructed prior distributions for each FD mouse. Maroon thick plot indicates ideal rare morph prior, blue thick plot indicates ideal frequent morph prior, thinner lines indicate individual mouse reconstructions. Colors indicate mouse ID as in (g).

Supplementary information

Supplementary Information

Supplementary Figs. 1–4.

Reporting Summary

Supplementary Video 1

A mouse performing the VR task.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Plitt, M.H., Giocomo, L.M. Experience-dependent contextual codes in the hippocampus. Nat Neurosci 24, 705–714 (2021). https://doi.org/10.1038/s41593-021-00816-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1038/s41593-021-00816-6

This article is cited by

Search

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