Extended Data Fig. 2: Spatial encoding in CA1.

a, Place fields of three representative cells (left column) and their corresponding vector fields (right column). b, Distribution of the size of the place fields of identified place cells is plotted. The average place-field size is ~3.88 cm (see Extended Data Fig. 3). c, Naive Bayes (NB)67 position decoding shows an accurate position decoding from raw calcium traces. All registered cells in each session are used to train the NB model. d, Distribution of decoding error across frames of 24 sessions of Mouse #5 shows a heavy-tailed distribution. The dashed line shows the mean decoding error: ~4.14 cm. e, Decoding error (averaged within each session) over time (mouse #5). Each point represents the average decoding error across frames in a session, with error bars indicating the 95% confidence interval of the lower and upper bounds of the decoding error distribution. The inset shows the correlation between decoding error and time (session) across mice (n = 7 mice). Bar graphs and error bars in the inset show mean ± s.e.m. For the inset: two-sided Wilcoxon signed-rank test against zero: 0.3750. f, Comparing decoding error for correct and incorrect trials for three phases of Sample, Delay, and Choice. Note that from sample to choice, the points are shifted above the diagonal, indicating a higher decoding error for incorrect trials. Bar graphs and error bars in the insets show mean ± s.e.m. (n = 24 sessions, mouse #5). g, The decoding analysis suggests that incorrect trials are associated with higher decoding errors as we approach the choice. Each point represents one session of mouse #5 (no. of sessions = 24). Bar graphs and error bars show mean ± s.e.m. P-values of two-sided Wilcoxon signed-rank test against zero: P-value (sample) = 0.5633, P-value (delay) = 0.3944, P-value (choice) = 0.0163. h, Same analysis as f across mice (n = 7). Each point in h represents one mouse. P-values of two-sided Wilcoxon signed-rank test against zero: P-value (sample) = 0.5781, P-value (delay) = 0.0469, P-value (choice) = 0.0156. Bar graphs and error bars show mean ± s.e.m. i, The salient moments of the task are colour-coded (the moments of touching the screen, reward approach, and reward consumption). Each point is a frame. j, CEBRA embedding26 of neuronal traces reveals distinct neuronal state spaces for task phase68,69. (Colour coding is the same as in i). k–r, Spatial decoding error is higher in incorrect trials despite controlling for behavioural differences. k–m, Comparison of behavioural metrics between correct and incorrect trials displayed by blue and orange, respectively. Incorrect trials are associated with longer latency times (the time between choice initiation and choice is selection) (k, two-sided t-test p-value: 9.8715e-10), greater distance travelled during the choice phase (l, two-sided t-test p-value: 3.0604e-12), and lower average running speed (m, two-sided t-test p-value: 0.0070522). n, Spatial decoding error using a Naive Bayes decoder is significantly higher during incorrect trials, suggesting impaired spatial representation. Two-sided t-test p-value: 6.4021e-06 (for k–m, n = 2,567 correct trials, and 1,395 incorrect trials). o–r, The same decoding analysis is repeated after subsampling trials to match the joint distribution of latency, distance travelled, and average speed between correct and incorrect trials. Two-sided t-test p-value for o: 0.98826, p: 0.75216, q: 0.91907. Even after this behavioural matching, decoding error displayed in r remains higher for incorrect trials, indicating that degraded spatial encoding during incorrect trials cannot be solely explained by differences in behavioural variables. Two-sided t-test p-value: 8.8521e-05. Bar graphs and error bars in the inset of k–r show mean ± s.e.m. For o–r, n = 1,183 correct trials, and 1,183 incorrect trials.