a Stimulus and reward structure in the set-shifting paradigm. Visual (gratings) and auditory (pure tones) are presented concurrently to mice and animals. Only one of the modalities is relevant for obtaining water reward. One of the stimuli from the relevant modality (top row) was designated as a “go” signal, to which animals are expected to lick for water reward, while they were expected to withhold locking for “no-go” stimulus. b Time course of a trial, with simultaneous visual (blue) and auditory (green) stimulus presentation, and reward available from 2 s until stimulus end, represented as a pulse. c Behavior of an example animal in a visual to auditory context-switching session for different trial types (subpanels). Success and failure are indicated by black-filled disks and crosses, respectively. Lines show 21 trial equal weight moving averages. Trials were defined as “task-consistent” (bottom panel, purple) if the moving average performance of all four trial types were greater than chance, while other parts of the session were termed “exploratory”. d Number of “consistent” trials for individual mice with ACC recordings (n = 4) for the visual (blue) and auditory (green) context. e Log probabilities of observing by chance the number of consistent trials in context blocks (colors), 106 simulated sessions, where congruent trials were always successful, incongruent trials sampled from the Bernoulli distribution at P equaling the empirical lick rate in incongruent trials of the mouse in that context. Significance level at 0.05 (gray dashed line). f Fraction of correct responses for all trials in the “consistent” periods. g Model log-likelihoods averaged over consistent incongruent trials in the visual (blue) and auditory (green) contexts for individual mice (n = 4) for a model targeting the opposite modality (empty bars), and the correct modality (filled bars). h Same as (g), but with a context agnostic model with mean choice lick bias (faint colors), and the context-aware model from the middle subpanel but augmented with either a bias or lapse parameter respectively (increasingly saturated colors).