Faster behavioral adaptation to a state transition is associated with better OFC state-decoding during the prechoice part of the trial. a, Number block transitions were split into the top and bottom quartiles of all transitions based on the free-choice rate in the first 10 trials after the transition. In bottom quartile switches, rats perseverated, choosing what was previously the 3-drop side, even though it had switched to deliver a single drop. Conversely, in upper quartile switches, rats immediately began switching to choose the new 3-drop side. We then ran the binary state decoder using only OFC neurons recorded across either the top or bottom quartile switches (b-d). b, The resulting heat plots show that, in the prechoice part of the trial, neurons recorded during upper quartile switches adapted quickly to the new state code, whereas those recorded in lower quartile switches strongly encoded the old state for 10-15 trials after the transition. Line figures illustrated this effect for a prechoice epoch (c) or a postreward epoch (d). These latter analyses only included correct forced-choice trials, meaning that rewards received were not different in the two conditions. Thick lines indicate significance relative to chance. c, *Significant differences between the conditions, both by permutation tests (p < 0.05 for five consecutive bins).