Fig. 4: Increase in neuronal responses to unexpected stimuli is determined by the magnitude of the prediction error.

a Neurons tuned to each displayed orientation are affected differently when different orientations are expected. Panel a shows an example for each expected orientation using neurons selective for 90° orientations (n = 92 neurons), as defined based on their responses in the Random condition (from 250 to 1000 ms). Responses of remaining neurons selective for the other presented orientations are shown in Supplementary Fig. 3. For each unexpected stimulus in the rotating condition, we identified the difference between the orientation of the expected stimulus and the orientation of the presented unexpected stimulus. For instance, if 60° was expected but 0° was unexpectedly presented, the expectation violation would be 60°. b All orientation-selective neurons (n = 462) aligned with their preferred orientation, plotted as separate Gaussians for each difference between the expected orientation and the presented orientation (expectation violation). c Gain and d baseline of Gaussians fitted to each neuron’s response (n = 462), plotted as a function of expectation violation for all orientation-selective neurons. e Forward encoding modelling reveals how population representations of orientation are affected by the degree of expectation violation. The encoding weights are shown separately here for different values of expectation violation. Encoding was performed on population response recorded in each session (n = 23 sessions). f The y axis shows the difference between the presented and decoded orientation (∆Perceived orientation). The population response (filled symbols) is biased away from the expected orientation with the largest bias at ±30° (n = 23 sessions). In all panels, error bars indicate ±1 standard error of the mean. All statistical tests were two sided.