Behavioural evidence of reward-contingent spatial attention.

a Head-fixed mice were subjected to a pseudorandom sequence of whisker vibrations (each either on the left or right). Each day, licks in response to vibrations on one side yielded a sucrose reward (Hit (R+), green). Responses to vibrations on the other side were unrewarded (Hit (R-), red). b Behavioural data from a typical mouse and day of training. The distribution of licks relative to stimulus onset (vertical lines) is displayed in raster format (top). Only the first licks following (& last licks preceding) stimulus onset are presented. Available trial-averaged lick rate (150-ms window; see Methods) is plotted below for the rewarded (R+, green) & unrewarded (R-, red) stimuli (shading: SE across trials). c Hit rates for rewarded (R+, green) & unrewarded (R-, red) stimuli are plotted against rewards collected for an example mouse (error bars: SE across all trials). d Identical to c, but averaged across mice (n = 11). e Pearson’s correlation coefficients between rewards collected & hit rates for rewarded (R+, green) & unrewarded (R-, red) stimuli. f Responses to rewarded (R+, green) & unrewarded (R-, red) stimuli, conditional on reward collection, are plotted against trials since reward (Lag) for an example mouse (shading: SE across days, n = 123). Horizontal lines indicate differences (p<0.05) between conditional & block-averaged hit rates (green & red) or between conditional hit rates (black, see Methods). g Mouse-averaged change in response probability (rewarded: R+, green, unrewarded: R-, red) conditional on reward collection (ΔP(Hit|R+)), relative to baseline (block-averaged rewarded & unrewarded hit rates) as a function of lag (shading: SE across mice, n = 11). Green and red horizontal lines denote p<0.05 (see Methods) for ΔP(Hit|R+)>0, while black lines denote p<0.05 for ΔP(HitR+|R+) ≠ ΔP(HitR-|R+). h Perceptual sensitivity (d’) for rewarded (R+, green) & unrewarded (R-, red) stimuli in an example mouse (n = 18 days, circles indicate means) on days in which the preferred stimulus was the rewarded stimulus. i Rewarded perceptual sensitivity (y axis, d’) plotted against unrewarded sensitivity (x axis, d’) across 11 mice on days in which the preferred stimulus was the rewarded stimulus. Dots indicate mean d’ (error bars: SE across sessions). The diagonal line indicates equivalence (diagonal). *: p<0.05 (see Methods).

Decision-coding in the primary vibrissal cortex.

a Extracellular activity of an example unit. A stimulus trace sits atop a raster plot indicating action potential distribution around stimulus onset (vertical line; x axis: time in ms) over 58 stimulus presentations (trials). Beneath the raster plot is a trace showing trial-averaged firing rate in spikes/second (10-ms window, shading: SE across trials). b Trial-averaged activity of responsive units (n = 1461) is displayed: activity (colour, sp/s) is shown for each unit (y axis) against time since stimulus onset (x axis, ms). c The trial-averaged responses (y axis, spikes/s) of the average unit in hit (yellow) and miss (grey) trials (SE across units, n = 1461) over time since stimulus onset (x axis, 10-ms window). d The cumulative sum of the difference between hit and miss trial responses (Left y axis, spikes/second; black trace: unit- & trial-averaged responses, SE across units, n = 1461, 10-ms window; see panels e-f) is plotted over time since stimulus onset (x axis, ms). Overlaid is the cumulative proportion of reaction times (right y axis, % RTs; yellow, see Methods) having occurred at each time since stimulus onset (x axis, ms). The horizontal black line indicates all points at which Cum(Hits-Misses) ≠ 0 (p<0.05). e Evoked trial-averaged responses in hit (y axis, sp/s) & miss (x axis, sp/s) trials in an example recording (n = 189 units). Blue lines indicate equivalence between responses, as well as 0. f Mean evoked response in hit trials (y axis, normalised to range) is plotted against mean evoked response in miss trials (x axis, normalised to range) for each recording (n = 15). Error bars indicate SE across trials.

Neuronal gain modulation associated with spatial attention.

a Schematic of the behavioural task with two blocks of trials. Reward contingencies (rewarded: R+; unrewarded: R-) are switched in the second block. b The spatial preference (Pref) of the average left stimulus trial (mean ± SE, n = 11 mice) is plotted (y axis) against rewards collected in the first (left) or second (right) block (x axis). Green trace (R+): data from days in which the left stimulus was rewarded. Red trace (R-): data from days in which the right stimulus was rewarded. c Grayscale colour map of contralateral (hit and miss) trial frequencies for different behavioural states (Perf and Pref, see Methods). Positive Pref values indicate a higher response rate to the contralateral side than the ipsilateral side (relative to the electrode), and vice versa. Perf values indicate average response rates. d A stimulus trace sits atop raster plots of peristimulus (vertical line; x axis: time in ms) action potential distributions in attended (yellow, n = 15) and unattended (grey, n = 10) hit trials (see Methods) for a typical unit. Traces below show attended (yellow) and unattended (grey) trial-averaged firing rates for hits (spikes/second, 10-ms windows, shading: SE across trials). e Evoked trial-averaged responses for hits in the attended (y axis) & unattended (x axis) states for all units (n = 1461) in spikes/second (blue lines: equivalent and absent responses). f Peristimulus hit trial- and unit-averaged, evoked firing rate traces (y axis, spikes/second; x axis, 10-ms windows) from 25% of units (n = 365 units, see Methods) in the attended (yellow) and unattended (grey) states (shading: SEM across units). g Trial- and unit-averaged evoked responses (y axis, spikes/second) plotted against their associated Pref (pink, bottom x axis) and Perf (blue, top x axis). Both dimensions were divided into four bins, with trials in each bin averaged together (SEM for x and y axes often smaller than the circular markers). h Hit trial- and unit-averaged evoked responses (z axis, colour, normalised to unit range) are plotted against their associated Pref (x axis) and Perf (y axis). Trial binning performed as in panel g.

Spatial attention is associated with slower reaction times.

a Baseline-subtracted first lick frequency (following the rewarded stimulus in block 1), averaged over sessions and mice (black, 25-ms bins, error bars: SE, n = 11 mice). b Mouse-averaged perceptual sensitivity (d’) to rewarded (green, R+) and unrewarded (red, R-) stimuli computed over time since stimulus onset (250 ms window, error bars: SE, n = 11 mice) in block 1 (all sessions for each mouse). Vertical black lines: bounds of mean interquartile range used for computing overall hit rates and perceptual sensitivity (Fig.1). c Difference between rewarded and unrewarded perceptual sensitivities (Δd’), y axes) using independent data points from panel b. Lick rates in panel a and perceptual sensitivities in panels b-c are computed from “available trials” (see Methods). d The distribution (y axis, Units) of changes in trial-averaged baseline firing rates (x axis, △sp/s, Attended − Unattended, n = 1461 units). e Hit trial- and unit-averaged, evoked firing rate traces (y axis, spikes/second) are shown for the attended (yellow) and unattended (grey) states (see Methods) against time since stimulus onset (x axis, milliseconds, 10 ms window). Error bars indicate standard error of the mean across units. f Hit trial- and unit-averaged difference between evoked neuronal response (y axis, △sp/s, error bars: SE across units) to the vibrissal stimulus in the attended and unattended states binned according to time since stimulus onset (x axis, time in seconds, first three data points are averages over 200 ms bins). Note that for panels d, e, and f, only hit trials are included and only neuronal activity prior to the first post-stimulus lick is included.

Grid of Perf and Pref dimensions divided into quarters.

Both the spatially non-selective behavioural index Perf and the spatially selective index Pref have been divided into four bins. The table below summarises the associated intervals for each dimension in each bin. The highest values of Perf are located in the top row of the table. The highest values of Pref are located in the right-most column of the table.

Stimulus detection and evidence accumulation.

a Mean response rates in stimulus+ (R+: rewarded; R+: unrewarded) and stimulus-conditions (black: pre-stimulus/catch; large circles: grand means, n = 11 mice). b Mean rewards collected (empty circle: grand median, n = 11 mice). c Inverse p-values for Pearson’s r between hit rate and rewards collected (n = 11 mice, log-scale; R+: rewarded; R-: unrewarded). Black line: p = 0.05. d Mouse-averaged change in bilateral hit probability conditional on hits (yellow) and misses (grey) relative to block-averaged hit rate (ΔP(HitB|Choice)) plotted against lag (trials, shading: SE, n = 11 mice). Horizontal lines: ΔP(HitB|Choice) ≠ 0 (yellow & blue, p<0.05) and ΔP(HitB|Hit) ≠ ΔP(HitB|Miss) (black, p<0.05). e Mouse-averaged change in response probability (R+: rewarded; R-: unrewarded) conditional on unrewarded response (ΔP(Hit|R-)), relative to baseline (block-averaged hit rates) plotted against lag (shading: SE, n = 11). Horizontal lines: p<0.05 for ΔP(Hit|R-) ≠ 0 (green and red), p<0.05 for ΔP(HitR+|R-) ≠ ΔP(HitR-|R-) (black). f Session-averaged perceptual sensitivities (left, green: d’) to the rewarded stimulus for 12 mice exposed to the behavioural paradigm beside associated inverse p-values (right, green, log-scale). Black line: p = 0.05. g Differential perceptual sensitivity (Δd’ = d’R+ − d’R-) when left (y axis) and right (x axis) stimuli are rewarded. Dots: mouse mean Δd’ (error bars: SE across sessions). Lines: equivalence (diagonal), 0 values (vertical, horizontal). Panels b-l: block 2 data. Green: rewarded. Red: unrewarded.

Behavioural responses to a reversal in reward contingencies.

a Behaviour from an example mouse and day. Top: Dots indicate the first licks post- (& last licks pre-) stimulus onset (vertical lines) is displayed in raster format (top). Available trial-averaged lick rate (see methods) is plotted below for the (un)rewarded stimuli (R+: rewarded; R-: unrewarded; x axis: time; 150-ms window; shading: SE across trials). b Mean response rates in stimulus+ (R+: rewarded; R-: unrewarded) and stimulus-conditions (pre-stimulus/catch: black; large circles: grand means, n = 11 mice). c Mouse-averaged hit rates for (un)rewarded stimuli (R+: rewarded; R-: unrewarded) plotted against the rewards collected (error bars: SE across mice, n = 11). d Pearson’s correlation coefficients between rewards collected & hit rates for (un)rewarded stimuli (R+: rewarded; R-: unrewarded). e Inverse p-values for Pearson’s r between hit rate and rewards collected (R+: rewarded; R-: unrewarded; n = 11 mice, log-scale). Black line: p = 0.05. f Mean rewards collected (empty circle: grand median, n = 11 mice). g Perceptual sensitivity to rewarded stimulus (y axis, d’) plotted against perceptual sensitivity to the unrewarded stimulus (x axis, d’). Dots: mouse means (error bars: SE across days). Diagonal line: d’R+ = d’R-. Green: rewarded. Red: unrewarded.

State-dependent choice coding in the primary vibrissal cortex.

a Activity of responsive units (n = 1461) averaged over hit trials (see Methods) is displayed in colour (sp/s, 10 ms window) for each unit (y axis) against time since stimulus onset (x axis, ms). b Activity of responsive units (n = 1461) averaged over miss trials (see Methods) is shown in colour (sp/s, 10 ms window) for each unit (y axis) against time since stimulus onset (x axis, ms). c The difference in trial-averaged activity of responsive units (n = 1461) between hit and miss trials (see Methods) is shown in colour (sp/s, 10 ms window) for each unit (y axis) against time since stimulus onset (x axis, ms). d Evoked trial-averaged responses in hit (y axis, normalised to range) & miss (x axis, normalised to range) trials for all responsive units (n = 1461 units). Blue line indicates equivalence between responses. e A histogram of unit differences (n=1461) in choice probability (Hit − Miss: H-M) between contexts (H-M given a recent hit: “(H-M)|H”; given a recent miss: “(H-M)|M”). f A histogram of unit differences in evoked miss trial-averaged evoked responses between contexts (misses given a recent hit: “M|H”; given a recent miss: “M|M”).

Spatial attention-dependent neuronal gain modulation.

a Trial-averaged (hit and miss) evoked activity of units (n = 1461) in the contralaterally attended state (Pref>0) is displayed in colour (sp/s, 10 ms bins) for each unit (y axis) against time since stimulus onset (x axis, ms). b Identical to a, except in the contralaterally unattended state (Pref<0). c The difference in trial-averaged activity between the contralaterally attended and unattended states (Pref>0 − Pref<0). d Trial-averaged (hit and miss) evoked activity of units (n=1461) in the highperformance state (Perf>0.5) is displayed in colour (sp/s, 10 ms window) for each unit (y axis) against time since stimulus onset (x axis, ms). e Identical to d, except in the low performance state (Perf<0.5). f The difference in trialaveraged activity of responsive units (n = 1461) between the high and low performance states (Perf>0.5 − Perf<0.5). g Trial-averaged evoked neuronal responses (normalised to range, see Methods) associated with the contralaterally attended state are plotted (y axis) against equivalent responses in the contralaterally unattended state (x axis) for each unit (n=1461). h Trial-averaged evoked neuronal responses (normalised to range, see Methods) associated with the high performance state are plotted (y axis) against equivalent responses in the low performance state (x axis) for each neuron (n=1461). i The distribution of the minimum numbers of trials contributing to the evoked responses of units across Pref (top) and Perf states (bottom).

The interaction of spatial attention, performance, and choice probability.

a Hit trial-averaged evoked neuronal responses (normalised to range, see Methods) associated with the contralaterally attended state are plotted (y axis) against equivalent responses in the contralaterally unattended state (x axis) for each neuron (n=1461). b Equivalent to a using miss trials (n=1442). c The difference between trial-averaged evoked neuronal responses in hit and miss trials associated with the contralaterally attended state are plotted (y axis) against equivalent responses in the contralaterally unattended state (x axis) for each unit (n=1442). d Hit trialaveraged evoked neuronal responses (normalised to range, see Methods) associated with the high-performance state are plotted (y axis) against equivalent responses in the low performance state (x axis) for each unit (n=1461). e Equivalent to d using miss trials (n=1339). f The difference between trial-averaged evoked neuronal responses in hit and miss trials associated with the high-performance state are plotted (y axis) against equivalent responses in low performance state (x axis) for each unit (n=1339). g The minimum number of hit trials associated with each unit across attention (top: Pref) or performance (bottom: Perf) state comparisons. h Identical to g, but for miss trials. i Identical to g and h, but for the hit-miss comparisons.

Additional information about classifying trials according to spatial preference and performance.

a A grayscale colour map of contralateral (hit) trial frequency as a function of Pref and Perf (see Methods). b A grayscale colour map of contralateral (miss) trial frequency as a function of Pref and Perf (see Methods). Positive spatial preference values indicate a higher response rate to the contralateral side than the ipsilateral side (relative to the electrode), and vice versa. Performance values indicate higher bilateral response rates. c A grayscale colour map of the frequency distribution of behaviour windows (surrounding hit and miss trials) according to their associated number of left (trial numbers (L), contralateral to electrode) and right (trial numbers (R), ipsilateral to electrode) stimulus trials. d A grayscale colour map of the frequency distribution of behaviour windows (surrounding only hit trials) according to their associated number of left (trial numbers (L), contralateral to electrode) and right (trial numbers (R), ipsilateral to electrode) stimulus trials. e A grayscale colour map of the frequency distribution of behaviour windows (surrounding only miss trials) according to their associated number of left (trial numbers (L), contralateral to electrode) and right (trial numbers (R), ipsilateral to electrode) stimulus trials. f A grayscale colour map of the average number of unclassifiable (licks within 10 ms of stimulus or free reward) trials associated with each behaviour window as a function of as a function of Pref and Perf (see Methods).