Time or distance: predictive coding of Hippocampal cells

The discovery of place cells within the hippocampus has pointed to the importance of the hippocampus for navigation. The more recent discovery of hippocampal time cells has broadened the perspective of encoding in the hippocampus. An alternative hypothesis to the existence of time cells is based on the notion that hippocampal cells deduce location by integrating travelled distance (“path integration”). According to this alternate hypothesis, time cells, which fire at particular times when animals are running on a treadmill without changing location, actually encode accumulated distance on the treadmill. To examine this hypothesis, Kraus et al.1 performed treadmill experiments in which animals either ran for a fixed time or a fixed distance with varying velocities. Two distinct coding modes of hippocampal principal cells were found. Some cells encoded travelled distance and others elapsed time, thus refuting the notion that all hippocampal cells were performing path integration. Using the data from these experiments, we asked whether the two populations depended on the type of task the rats were engaged in. We show that the type of experiment determined the cells’ encoding, such that in fixed-distance experiments distance-encoding cells dominated, while on fixed-time experiments time-encoding cells dominated. These results suggest that the cells’ encoding contains a predictive element, dependent on the important variables of the experiment.


Introduction
The hippocampus plays an important role in spatial processing and episodic memory 2 3 . Spatial processing and navigation are supported by spatially tuned cells throughout the hippocampal formation, such as place cells within the hippocampus, which sparsely encode location within an environment 4 5 . The subsequent discovery of time cells in the hippocampus 1 6 7 8 9 , which encode time within an episode, suggests that these may contribute to the building blocks of episodic memory formation. The similarity of properties of time cells and place cells has led to a unifying concept of the hippocampus, as encoding dimensions required in order to organize relevant information. We thus asked whether the encoding of hippocampal neurons changes according to behavioral context and task demand. We used previously published data by Kraus et al. 1 , 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 6 (although time cells were also reported for stationary rats 7 ).
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. 1 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. 1 , 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), with their noses at a water port, in order to "clamp" their behavior and location. In each session, consisting of 31-57 runs, the treadmill was operated either for a fixed time or for a fixed distance, where on each run the velocity was set to a speed randomly chosen in the range of 35-49 cm/sec (Figure 1b,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 other 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. distancebased). We therefore analyzed the cells on a run-by-run basis, as follows: For each neuron, we defined the onset of response in each run, to examine its relation to the treadmill's velocity. 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 dimensions revealed that the hippocampal population encoding strongly registers with the experiment type. 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 fixeddistance 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 10 11 . As noted previously in Kraus et al. 1 the same cells, which showed distance-encoding and time-encoding properties in the treadmill, were many times 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 12 , social mapping 13 14 or more abstract spaces 15 16 . How task-relevant encoding is achieved? The activity of place cells and grid cells is commonly modeled using continuous attractor networks 17 18 19 20 21 22 23 24 25 . Such networks may serve as a natural substrate for amplification of encoding of certain task dimensions, at the expense of others.
One possible mechanism for acquiring representations that are consistent with task structure involves an associative learning process. Such learning would modify all connections that were active in a particular trial but would only consistently modify those in which activity was invariant throughout the experiment, while other connections associated with inconsistent representations will average out. Thus, in time-fixed experiments, those connections that are consistent with time would be strengthened, while in distance-fixed experiments those that are consistent with distance would gain strength. Reward or task-completion could generate a prolonged signal, which, upon coinciding with cells that receive time and distance signals, will strengthen the synaptic connections of the contributing signal. Consequently, those cells will gradually encode either distance or time, depending on the type of experiment (Figure 4).
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.

Analysis Methods
We used the data provided by Kraus et al 1 , 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 200 ms time bins (other bin resolutions between 100 msec and 500 msec were tested and provided similar results). For each neuron, in each run, the response onset was defined as the first bin with activity prior to the peak in firing. For each neuron, the onsets of all runs within the same session were analyzed. For a perfect time encoding cell, we expect the onset times T i to be independent of the treadmill velocity V i , whereas for a perfect distance cell, we expect the onsets to be linearly dependent on the reciprocal velocity (equation 1). Therefore, for a time encoding cell, the product of the fit coefficient k and velocity would be small compared to the offset coefficient q, while for a distance encoding cell the fit coefficient would approximate the estimated encoded distance. We found that the optimal threshold was 0. This threshold classifies 69% of the cells as

Supplementary Methods
Additional metrics defined and used for classifying the cells encoding: The "FIT" classifier is defined as follows: Where m and k are the linear fit slope coefficients (from equations 1 & 2), ̅ is the average firing onset time and ̅ is the average distance the animal traveled until the onset.
A stricter classifier based on this measure, tested 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 classifiers are shown in Figure