Abstract
Analysis of neuronal activity in the hippocampus of behaving animals has revealed cells acting as ‘Time Cells’, which exhibit selective spiking patterns at specific time intervals since a triggering event, and ‘Distance Cells’, which encode the traversal of specific distances. Other neurons exhibit a combination of these features, alongside place selectivity. This study aims to investigate how the task performed by animals during recording sessions influences the formation of these representations. We analyzed data from a treadmill running study conducted by Kraus et al., 2013, in which rats were trained to run at different velocities. The rats were recorded in two trial contexts: a ‘fixed time’ condition, where the animal ran on the treadmill for a predetermined duration before proceeding, and a ‘fixed distance’ condition, where the animal ran a specific distance on the treadmill. Our findings indicate that the type of experimental condition significantly influenced the encoding of hippocampal cells. Specifically, distance-encoding cells dominated in fixed-distance experiments, whereas time-encoding cells dominated in fixed-time experiments. These results underscore the flexible coding capabilities of the hippocampus, which are shaped by over-representation of salient variables associated with reward conditions.
Research organism: Rat
Introduction
The hippocampus plays an important role in spatial processing and episodic memory (Andersen et al., 2006; Tulving, 2002). Spatial processing and navigation are supported by spatially tuned cells throughout the hippocampal formation, such as place cells in the hippocampus, which sparsely encode location within an environment (O’Keefe and Dostrovsky, 1971; Muller and Kubie, 1987). Subsequent discovery of time cells in the hippocampus (Kraus et al., 2013; Pastalkova et al., 2008; MacDonald et al., 2011; Tsao et al., 2018; Rueckemann et al., 2021), which encode time within an episode, suggests that the latter may contribute to the building blocks of episodic memory formation. Time cells and place cells share many physiological properties, pointing to a unifying concept of the role of the hippocampus in encoding features required to organize relevant information. We asked whether the encoding of hippocampal neurons is flexible, capable of changing according to behavioral context and task demand. We used previously published data by Kraus et al., 2013, from an experiment which sought to resolve an inherent ambiguity in the interpretation of time cells. Time cells were initially reported in animals running on a running wheel without control of velocity (Pastalkova et al., 2008, although time cells were also reported for immobile rats MacDonald et al., 2011). This led to a potential ambiguity between encoding of time and of distance, due to the fact that, in fixed velocities, distance may be encoded by integration of time. Kraus et al., 2013 varied the velocity of rats running in place on a treadmill, and found subpopulations of hippocampal cells that encoded time, other cells that encoded path-integrated distance and additional cells that encoded both time and distance. These experiments were composed of two types of recording sessions. In one type of session, in all the trials the running duration remained constant at different velocities, whereas in the second type, the treadmill runs accumulated up to a constant distance, at different velocities. We hypothesized that in this experiment, the task demand (i.e. constant time vs. constant distance) determined the type of activity exhibited in the corresponding session. We re-analyzed the data according to the type of behavioral session and found a direct relation between the class of most active cells and the type of session in which they were recorded. In sessions in which the rats ran for a fixed time, the cells’ population was dominated by time-encoding cells, while in sessions where they ran for a fixed distance, the population was dominated by distance-encoding cells.
Results
To examine the dependence of hippocampal coding on task demand, we analyzed data based on experiments by Kraus et al., 2013, which aimed to differentiate between cells encoding time and cells encoding distance in the hippocampus. In these experiments, six rats were trained to run on a treadmill in the central stem of a figure-8 maze (Figure 1a). The rats were provided with a small water reward prior to the initiation of the treadmill session and upon its cessation, thereby conditioning them to maintain their snouts positioned at the water port throughout the duration of the treadmill run, and "clamping" their behavior and spatial position. In each session, consisting of 31–57 runs, the treadmill was operated either for a fixed time or for a fixed distance, where in each run the velocity was set to a randomly chosen speed in the range of 35–49 cm/s (Figure 1b and c). The rats were forced to alternate their post-treadmill turns between right and left. Three of the six rats were trained and recorded exclusively in fixed-distance or fixed-time sessions, while the remaining three rats were trained and recorded in sessions of both types.
Kraus et al. reported that some cells preferentially encoded the distance the rat had run on the treadmill, while other cells preferentially encoded the time from the start of the treadmill movement. We hypothesized that the type of task employed in each session (i.e. fixed-time vs. fixed-distance) would determine the encoding of the neurons (i.e. time-based vs. distance-based). We therefore analyzed the cells on a run-by-run basis, as follows: For each neuron, we defined its response in each run according to the onset of peak firing (see Materials and methods), and examined its relation to the treadmill’s velocity. We classified time-encoding cells as those, in which the response did not systematically depend on the treadmill velocity but instead fired at a fixed time after the initiation of treadmill running. We classified distance-encoding cells as those, in which the onset time was proportional to the treadmill velocity. To examine this classification, we determined the firing onset of each cell in each run and determined the cell’s properties according to three metrics (see Materials and methods section).
We defined a metric, , based on the distance and time variances (see Analysis Methods). We classified cells with positive CellType, where the distance variance is greater than the time variance as time cells, and negative CellType, where the time variance is greater than the distance variance, as distance cells. For an ideal time cell, CellType = 1 and for an ideal distance cell, CellType=-1.
Of 930 cells recorded we analyzed 679 cells with at least 10 runs showing firing peaks greater than 0.5 Hz. Only cells with peak firing rates occurring during the treadmill run were included in the analysis. As previously reported in Kraus et al., 2013, we observed both distance cells, showing a response at constant distances the animal traveled on the treadmill, and time cells, showing a response at constant times from the treadmill start (Figure 2). In line with our hypothesis, there was a clear relation between the types of experiment and the distribution of time coding and distance coding neurons. In fixed-distance sessions, the neurons exhibited a significant majority (67%) of distance cells. By contrast, in fixed-time sessions time encoding cells dominated (68%). Of the 444 neurons recorded in fixed-distance sessions, the CellType index classified 298 cells as distance cells and 146 as time cells (Figure 3a). Conversely, in the fixed-time sessions 76 of 235 neurons were classified by this index as distance cells and 159 of 235 were classified as time cells. The relation between the cell type and the experiment type is significant (χ2(1)=75.1, p>>0.001 for the total cell population). These proportions were maintained when classifying by other metrics and when using the peak of firing instead of the onset of the response (see supplementary Methods and Figure 3—figure supplement 1). In 5 out of 6 animals, the cells’ encoding depended on the session type (Figure 3—figure supplement 2). (χ2(1)>12, p<<0.001 for 4 animals, χ2(1)=5.7, p<0.02 for one animal), except in one animal (χ2(1)=2.38, p=0.12).
Figure 3. Distance and Time Cells classification.
(a) Cells type classified by the CellType metric, averaged over all animals and trials, for fixed-distance and fixed-time experiments (n=18 experiments, mean ± SEM) p<<0.001 by Pearson's chi-squared test using two categories. Diagonal lines represent individual animals. (b) ROC curve (red) showing that the chosen discriminating threshold of 0 (black point) is optimal. The True Positive Rate (TPR) is the percentage of cells classified as distance cells on the fixed-distance session, while the False Positive Rate (FPR) is the percentage of cells classified as distance cells on the fixed-time sessions. (c) Shuffling distribution of the three metrics: CellType, FIT and P-Value. The type of experiment, either fixed-time or fixed-distance, was randomized 1000 times for each of the sessions. All experiments were truncated to 16 s in order to prevent biases. The vertical axis is the Time-Distance balance index (TDI), defined as (#DistanceCells-#TimeCells)/(#DistanceCells + TimeCells) and is between 0 and 1 if there are more distance cells than time cells and between –1 and 0 if there are more time cells than distance cells. The arrows are indicating the actual results which are significant compared to the shuffle distribution.
Figure 3—figure supplement 1. Additional metrics.
Figure 3—figure supplement 2. The distribution of Time and Place cells, per animal, at various metrics, for Time and Distance sessions.
Figure 3—figure supplement 3. Distribution of max and average firing rates for Time and Distance cells.
We then checked the Receiver Operating Characteristics (ROC) graph of the CellType metric (Figure 2d), using discriminating thresholds in the range of [–1,+1]. The ROC plots the True Positive Rate (TPR) defined as the percentage of cell classified as distance cells in the fixed-distance session, against the False Positive Rate (FPR) defined as the percentage of cells classified as distance cells in the fixed-timed sessions. We found that the optimal threshold (maximum Youden index) for classification of a session based on the CellType metric, was 0. This threshold classifies 67% of the cells as Distance in the Distance sessions and only 32% on the Time sessions. Accordingly, we classified a cell as a time-cell if CellType >0 and as a distance-cell if CellType <0.
To assess the power of the statistics, we compared the results to a distribution generated from shuffled session types (Figure 3c). In order to mitigate any potential biases in this distribution, we truncated all data to a common duration of 16 s, which represents the shortest duration of a treadmill run across all sessions. These results indicate that the dimension the cells encode (Time vs. Distance) is related to the session type (fixed time vs. fixed distance).
Discussion
Classifying neuronal activity according to either time or distance revealed that the hippocampal population encoding strongly registered with the features of the experimental task. In experiments where the treadmill running-time was fixed, the majority of cells encoded a given time from treadmill onset. In contrast, in experiments where the treadmill running-distance was fixed, the majority of cells encoded a specific accumulated distance from treadmill onset. It is worth noting that accumulated time in fixed-time experiments and accumulated distance in fixed-distance experiments may be used as predictors for the progress of the rat towards anticipated reward, which is given at the end of the treadmill run (Whittington et al., 2020; Stachenfeld et al., 2017). As noted previously in Kraus et al., 2013 the same cells, which showed distance-encoding and time-encoding properties in the treadmill, were often selective to places outside of the treadmill as well. To summarize, CA1 pyramidal cells can encode location, distance, or time, depending on the conditions of the experiment or task demand.
Consistency with task demands has been repeatedly demonstrated in hippocampal recording for diverse parameter spaces, such as auditory linear frequency (Aronov et al., 2017), social mapping (Omer et al., 2018; Schafer and Schiller, 2018) or more abstract spaces (Constantinescu et al., 2016; Retailleau and Morris, 2018). How is task-relevant encoding achieved? The activity of place cells and grid cells is commonly modeled using continuous attractor networks (Morris and Derdikman, 2023; Samsonovich and McNaughton, 1997; Burak and Fiete, 2009; Fuhs and Touretzky, 2006; Bush and Burgess, 2014; Hasselmo and Brandon, 2012; Tocker et al., 2015; Gu et al., 2018; Geiller et al., 2022; O’Keefe and Burgess, 1996). Such networks may serve as a natural substrate for amplification of encoding of certain task features, at the expense of others, resulting in an over representation of the salient variables. Such over-representation may help the brain prioritize survival and decision making. By allocating more resources to the salient stimuli, the brain enhances the ability to process and retain the important information.
Another possible mechanism for acquiring representations that are consistent with task structure involves an associative learning process. Such learning would strengthen all connections between cells that were active in a particular trial and weaken others, but ultimately only the connections between cells that are consistently co-active will be strengthened, while others will average out. Thus, in time-fixed experiments, the connections to cells that fire in a manner that is consistent with time would be strengthened, while in distance-fixed experiments connections to cells that are consistent with distance would gain strength. Consequently, those cells will gradually encode either distance or time, depending on the type of experiment.
Irrespective of the exact mechanism explaining the results of this study, the hippocampus is adaptive in its cells’ encoding and seems to be capable to tune them to the parameters best describing the task.
Materials and methods
We used the data provided by Kraus et al., 2013, containing the neurons firing times, the treadmill movement times and the treadmill velocity. The data was analyzed using custom Matlab scripts.
We divided the treadmill moving times into 100ms time bins (other bin resolutions between 50 ms and 500 ms were tested and provided similar results). Response onset for each neuron and run, was defined as the first bin, following at least 1 s of silence within a series of consecutive bins with firing activity which includes the peak of firing. The peak firing was defined as the bin with the highest value within a run, however only cells with an average peak firing of at least 0.5 Hz were included. This methodology was applied consistently across all runs within a session. We chose this approach to mitigate potential biases that could arise from firing rate peaks occurring near the end of the treadmill, which might have been truncated. Basing our analysis on the peak values instead yielded comparable results and levels of statistical significance (Figure 3—figure supplement 1).
Our classification method is based on the premise that for ideal time cells, firing (and hence onset time) should be independent of running speed. Conversely, an ideal distance cell would display firing onsets at times depending on the speed. We therefore performed a linear regression between the onset times () and the reciprocal velocity () as well as the onset distance () and the velocity (), where i is an index to a specific run on the treadmill, and extracted the slopes (m and k) and offsets (n and q), as described in Equations 1 and 2. Consequently, in the case of a time-encoding cell, the velocity dependent term would be small in comparison to the constant q, while for a distance encoding cell, the slope k would approximate the estimated encoded distance. Similarly, in accordance with the relation stated in Equation 2, an ideal distance encoding cell would exhibit a small velocity dependent term compared to the constant n, while a time encoding cell would have an estimated encoded time equivalent to the slope m.
(1) |
(2) |
The CellType metric utilizes the variances of the onset times , where the average onset time is computed across all runs within the session, and the onset distances , where the average onset distance is calculated across all runs within the session.
(3) |
CellType is in the range of –1 to +1. For an ideal time-encoding cell, the onset variance , and hence CellType = 1. For an ideal distance encoding cell, the distance variance (multiplied by the respective velocity in order to match units) , and hence CellType=-1.
Additional metrics defined and used for classifying the cells encoding:
The “FIT” metric is defined as follows:
(4) |
Where m and k are the linear fit slope coefficients (from Equations 1 and 2), is the average firing onset time and is the average distance the animal traveled until the onset. Fit is –1 for a distance cell and 1 for a time cell.
The ‘p-value’ metric is defined as follows:
A stricter metric, utilized the statistical significance of the linearity in Equations 1 and 2, through F-statistics. We classified a cell as distance encoding if the null hypothesis that there is no linear relation between the distance and velocity was rejected with p<0.05. We classified a cell as time encoding if the null hypothesis that there is no linear relation between the onset and the reciprocal velocity was rejected with p<0.05.
Results using these metrics are shown in Figure 3—figure supplement 1.
To ensure the activity peak is not missed, we extended the analysis to 5 s past the treadmill stop time. Otherwise, if a cell activity is concentrated towards the treadmill stop, the calculated onset may be influenced by the truncated activity time and show a false relation of the cell type activity to the time or distance. Moreover, since the truncated data time relates to the experiment type, whether time-fixed or distance-fixed, this could create a false bias of such a relation.
The relation between the type of cell classified in the above metrics and the session type was then tested by Pearson’s chi-square using two categories. The expected distribution of the cells was calculated based on the total number of cells, of each type, out of total cells number, in all sessions. The null hypothesis was defined as no dependency of the cells type distribution on the session type (either fixed-time or fixed-distance). On the per-animal analysis, for animals that were recorded only at a single type of session, we used the distribution of the cell types according to their distribution in all animals’ cells population.
We conducted additional analysis to explore potential relationships between the firing rates and the encoding properties of the cells. Our findings revealed that the distributions of peak firing rates and average firing rates, for time cells and distance cells, were similar (see Figure 3—figure supplement 3).
Funding Statement
The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.
Contributor Information
Dori Derdikman, Email: derdik@technion.ac.il.
Genela Morris, Email: genelam@tlvmc.gov.il.
Laura L Colgin, University of Texas at Austin, United States.
Laura L Colgin, University of Texas at Austin, United States.
Funding Information
This paper was supported by the following grants:
Israel Science Foundation 2183/21 to Dori Derdikman.
Binational Science Foundation (BSF)-NIH CRCNS BSF:2019807 (NIH: 1R01 MH125544-01 ) to Dori Derdikman.
Prince Center for the Aging Brain to Dori Derdikman.
Israel Science Foundation 3139/22 to Genela Morris.
Additional information
Competing interests
No competing interests declared.
Author contributions
Conceptualization, Software, Investigation, Methodology, Writing - original draft.
Conceptualization, Data curation, Methodology, Writing – review and editing.
Conceptualization, Data curation, Methodology, Writing – review and editing.
Conceptualization, Methodology, Writing – review and editing.
Conceptualization, Supervision, Investigation, Methodology, Writing – review and editing.
Conceptualization, Supervision, Investigation, Methodology, Writing – review and editing.
Ethics
The data in this paper is based on the study in a previous paper (Kraus et al., 2013), and no experiments have been thus performed specifically for this study.
Additional files
Data availability
The current manuscript is a re-analysis of data collected for a previously published paper (Kraus et al., 2013). Data used in this paper is available as Matlab files on Dryad: https://doi.org/10.5061/dryad.ngf1vhhxp. Matlab code used for the analysis in the paper is available on https://github.com/derdikman/Abramson_code (copy archived at Derdikman, 2023).
The following dataset was generated:
Abramson S, Kraus BJ, White JA, Hasselmo ME, Morris G, Derdikman D. 2023. Data for Time or distance: predictive coding of hippocampal cells. Dryad Digital Repository.
References
- Andersen P, Morris R, Amaral D, Bliss T, O’keefe J. The Hippocampus Book. Oxford University Press; 2006. [Google Scholar]
- Aronov D, Nevers R, Tank DW. Mapping of a non-spatial dimension by the hippocampal-entorhinal circuit. Nature. 2017;543:719–722. doi: 10.1038/nature21692. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Burak Y, Fiete IR. Accurate path integration in continuous attractor network models of grid cells. PLOS Computational Biology. 2009;5:e1000291. doi: 10.1371/journal.pcbi.1000291. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bush D, Burgess N. A hybrid oscillatory interference/continuous attractor network model of grid cell firing. The Journal of Neuroscience. 2014;34:5065–5079. doi: 10.1523/JNEUROSCI.4017-13.2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Constantinescu AO, O’Reilly JX, Behrens TEJ. Organizing conceptual knowledge in humans with a gridlike code. Science. 2016;352:1464–1468. doi: 10.1126/science.aaf0941. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Derdikman D. Abramson_Code. swh:1:rev:943dead3e093eea9c105ae83cebdd94b9011268cSoftware Heritage. 2023 https://archive.softwareheritage.org/swh:1:dir:9911cd4dc8ea759de60bcc5830e4edbc16a6af9a;origin=https://github.com/derdikman/Abramson_code;visit=swh:1:snp:8762ad64efee2d0f105bb0d94ae52ca67736eedb;anchor=swh:1:rev:943dead3e093eea9c105ae83cebdd94b9011268c
- Fuhs MC, Touretzky DS. A spin glass model of path integration in rat medial entorhinal cortex. The Journal of Neuroscience. 2006;26:4266–4276. doi: 10.1523/JNEUROSCI.4353-05.2006. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Geiller T, Sadeh S, Rolotti SV, Blockus H, Vancura B, Negrean A, Murray AJ, Rózsa B, Polleux F, Clopath C, Losonczy A. Local circuit amplification of spatial selectivity in the hippocampus. Nature. 2022;601:105–109. doi: 10.1038/s41586-021-04169-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gu Y, Lewallen S, Kinkhabwala AA, Domnisoru C, Yoon K, Gauthier JL, Fiete IR, Tank DW. A map-like micro-organization of grid cells in the medial entorhinal cortex. Cell. 2018;175:736–750. doi: 10.1016/j.cell.2018.08.066. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hasselmo ME, Brandon MP. A model combining oscillations and attractor dynamics for generation of grid cell firing. Frontiers in Neural Circuits. 2012;6:30. doi: 10.3389/fncir.2012.00030. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kraus BJ, Robinson RJ, White JA, Eichenbaum H, Hasselmo ME. Hippocampal “time cells”: time versus path integration. Neuron. 2013;78:1090–1101. doi: 10.1016/j.neuron.2013.04.015. [DOI] [PMC free article] [PubMed] [Google Scholar]
- MacDonald CJ, Lepage KQ, Eden UT, Eichenbaum H. Hippocampal “time cells” bridge the gap in memory for discontiguous events. Neuron. 2011;71:737–749. doi: 10.1016/j.neuron.2011.07.012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Morris G, Derdikman D. The chicken and egg problem of grid cells and place cells. Trends in Cognitive Sciences. 2023;27:125–138. doi: 10.1016/j.tics.2022.11.003. [DOI] [PubMed] [Google Scholar]
- Muller RU, Kubie JL. The effects of changes in the environment on the spatial firing of hippocampal complex-spike cells. The Journal of Neuroscience. 1987;7:1951–1968. doi: 10.1523/JNEUROSCI.07-07-01951.1987. [DOI] [PMC free article] [PubMed] [Google Scholar]
- O’Keefe J, Dostrovsky J. The hippocampus as a spatial map. Preliminary evidence from unit activity in the freely-moving rat. Brain Research. 1971;34:171–175. doi: 10.1016/0006-8993(71)90358-1. [DOI] [PubMed] [Google Scholar]
- O’Keefe J, Burgess N. Geometric determinants of the place fields of hippocampal neurons. Nature. 1996;381:425–428. doi: 10.1038/381425a0. [DOI] [PubMed] [Google Scholar]
- Omer DB, Maimon SR, Las L, Ulanovsky N. Social place-cells in the bat hippocampus. Science. 2018;359:218–224. doi: 10.1126/science.aao3474. [DOI] [PubMed] [Google Scholar]
- Pastalkova E, Itskov V, Amarasingham A, Buzsáki G. Internally generated cell assembly sequences in the rat hippocampus. Science. 2008;321:1322–1327. doi: 10.1126/science.1159775. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Retailleau A, Morris G. Spatial rule learning and corresponding CA1 place cell reorientation depend on local dopamine release. Current Biology. 2018;28:836–846. doi: 10.1016/j.cub.2018.01.081. [DOI] [PubMed] [Google Scholar]
- Rueckemann JW, Sosa M, Giocomo LM, Buffalo EA. The grid code for ordered experience. Nature Reviews. Neuroscience. 2021;22:637–649. doi: 10.1038/s41583-021-00499-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Samsonovich A, McNaughton BL. Path integration and cognitive mapping in a continuous attractor neural network model. The Journal of Neuroscience. 1997;17:5900–5920. doi: 10.1523/JNEUROSCI.17-15-05900.1997. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Schafer M, Schiller D. Navigating social space. Neuron. 2018;100:476–489. doi: 10.1016/j.neuron.2018.10.006. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Stachenfeld KL, Botvinick MM, Gershman SJ. The hippocampus as a predictive map. Nature Neuroscience. 2017;20:1643–1653. doi: 10.1038/nn.4650. [DOI] [PubMed] [Google Scholar]
- Tocker G, Barak O, Derdikman D. Grid cells correlation structure suggests organized feedforward projections into superficial layers of the medial entorhinal cortex. Hippocampus. 2015;25:1599–1613. doi: 10.1002/hipo.22481. [DOI] [PubMed] [Google Scholar]
- Tsao A, Sugar J, Lu L, Wang C, Knierim JJ, Moser M-B, Moser EI. Integrating time from experience in the lateral entorhinal cortex. Nature. 2018;561:57–62. doi: 10.1038/s41586-018-0459-6. [DOI] [PubMed] [Google Scholar]
- Tulving E. Episodic memory: from mind to brain. Annual Review of Psychology. 2002;53:1–25. doi: 10.1146/annurev.psych.53.100901.135114. [DOI] [PubMed] [Google Scholar]
- Whittington JCR, Muller TH, Mark S, Chen G, Barry C, Burgess N, Behrens TEJ. The tolman-eichenbaum machine: Unifying space and relational memory through generalization in the hippocampal formation. Cell. 2020;183:1249–1263. doi: 10.1016/j.cell.2020.10.024. [DOI] [PMC free article] [PubMed] [Google Scholar]