(a) Structure of discrimination tasks. (Left) Fine discrimination. A trial starts with two flashes of an LED. A rewarded stimulus (α) is a mixture of A and B odours at a concentration ratio of 40:60% (α-odour), associated with a water (reward). In a non-rewarded trial, the A/B mixture is presented at a concentration ratio of 60:40% (α’-odour), and no reward is given. (Right) Coarse discrimination. A trial starts with one flash of an LED. The rewarded odour is the same A/B 40/60 mixture as in fine discrimination. A non-rewarded stimulus is a mixture of different odours (β). On some rewarded trials, α’ odour is presented to assess whether mice generalize across both A/B mixtures. (b) Timeline of experiment. Each session lasted ~20 min, and occurred once a day. Inset: Example of switching sessions used for a typical animal (six sessions shown). Variable epoch length ensures that at least four rewarded trials appear per epoch. (c) Trial-by-trial average performance across five mice for all trials (c1), as well as trials around switching (c2,c3). Mean and s.e.m. are shown. (d) Imaging configuration. GCaMP6f fluorescence from mitral and tufted cells was imaged with a two-photon microscope through a chronic window (middle) in head-fixed mice performing task switching. Right, an example field of view. Scale bar = 50 μm. (e) Trajectories corresponding to the α and α’ odours during fine and coarse discrimination, plotted as trajectories in the first three principal components. Pseudo-population response constructed from all ROIs (n = 353, five mice). (f) Left, Trial-by-trial α odour response (average amplitude during 1 s odour presentation) for example ROIs. Mean and s.e.m. are shown as horizontal lines. Middle, Corresponding transients averaged for each task type. Right, The same traces as in the middle panel, but zoomed into the odour period. (g) Time course of change among significantly modulated ROIs. The response amplitude for an odour relative to response amplitudes during the first fine discrimination epoch (mean ±s.e.m.; n = 42 ROIs, five mice). The observation holds true when the rewarded trials are not preceded by a non-rewarded trial (data not shown).