Fig. 2: The cumulation of unexpected outcomes drives changes of decision and population representation of stimulus.

a Scatter plot of the mean stimulus response (mean ΔF/F during stimulus window) of each neuron across the Stable and Uncertain sessions (n = 549 neurons from 6 mice). b Behavioral performance from an example animal during the Stable (top) and Uncertain (bottom) sessions. Inverted triangle and diamond markers indicate unexpected outcomes in the Uncertain session, divided into three phases (T1-T3) by vertical dashed lines. c Behavioral performance in the Stable session and T1-T3 phases of the Uncertain session. (n = 6 mice, two-sided one-way repeated measures ANOVA with post-hoc Dunnett’s comparisons, comparing each phase to Stable session). d Mean population response to go stimulus in the Stable session and T1-T3 phases in the Uncertain session (n = 549 neurons from 6 mice, two-sided Friedman test with post-hoc Bonferroni comparisons). e Left, average population responses to go stimulus in trials following unexpected outcomes (red, including RO and UR trials) and following other normal outcomes (green). Black dots indicate the time segments when the activity is different from each other (P < 0.05, two-sided Wilcoxon rank-sum test). Right, the Hit rate of trials following unexpected outcomes and other normal outcomes (n = 6 mice, two-sided paired t-test). f Correlation of go-cue evoked population activity between the Stable session and T1-T3 phases in the Uncertain session. g Scheme of training and test classifiers to decode the task stimulus with population activity. h Accuracy of classifying stimulus identities from population neuronal activity within and across different task phases. i Classification accuracy of neural activity in the T3 phase using classifiers trained from neural activity of different phases (n = 500 times repeat, two-sided Kruskal-Wallis test with post-hoc Bonferroni comparisons). *P < 0.05, ***P < 10−3. Data are presented as (c, e) mean ± s.e.m. or (d, i) box plots (center line, median; box limits, upper and lower quartiles; whiskers, 1.5 × interquartile range). Statistical details are presented in Supplementary Table 1. Source data are provided as a Source data file.