Task Engagement Enhances Population Encoding of Stimulus Meaning in Primary Auditory Cortex

The main functions of primary sensory cortical areas are classically considered to be the extraction and representation of stimulus features. In contrast, higher cortical sensory association areas are thought to be responsible for combining these sensory representations with internal motivations and learnt associations. These regions generate appropriate neural responses that are maintained until a motor command is executed. Within this framework, responses of the primary sensory areas during task performance are expected to carry less information about the behavioral meaning of the stimulus than higher sensory, association, motor and frontal cortices. Here we demonstrate instead that the neuronal population responses in the early primary auditory cortex (A1) display many aspects of responses generally associated with higher-level areas. A1 activity was recorded in awake ferrets while they were either passively listening or actively discriminating two periodic click trains of different rates in a Go/No-Go paradigm. By applying population-level dimensionality reduction techniques, we found that task-engagement induced a shift in the nature of the encoding from a sensory-driven representation of the two stimuli to a behaviorally relevant representation of the two categories that specifically enhances the target stimulus. We demonstrate that this shift in encoding relies partly on a novel mechanism of change in spontaneous activity patterns upon engagement in the task. We show that this population-level representation of stimuli in A1 population activity bears strong similarities to responses in the frontal cortex, but appears earlier following stimulus presentation. Analysis of neural activity recorded in various Go/No-Go tasks, with different sounds and reinforcement paradigms, reveals that this striking population-level enhancement of target representation is a general property of task engagement. These findings indicate that primary sensory cortices play a highly flexible role in the processing of incoming stimuli and implement a crucial change in the structure of population activity in order to extract task-relevant information during behavior.

representations with internal motivations and learnt associations. These regions 23 generate appropriate neural responses that are maintained until a motor command is 24 executed. Within this framework, responses of the primary sensory areas during task 25 performance are expected to carry less information about the behavioral meaning of 26 the stimulus than higher sensory, association, motor and frontal cortices. Here we 27 demonstrate instead that the neuronal population responses in the early primary 28 auditory cortex (A1) display many aspects of responses generally associated with 29 higher-level areas. A1 activity was recorded in awake ferrets while they were either 30 passively listening or actively discriminating two periodic click trains of different rates 31 in a Go/No-Go paradigm. By applying population-level dimensionality reduction 32 techniques, we found that task-engagement induced a shift in the nature of the 33 encoding from a sensory-driven representation of the two stimuli to a behaviorally 34 relevant representation of the two categories that specifically enhances the target 35 stimulus. We demonstrate that this shift in encoding relies partly on a novel 36 mechanism of change in spontaneous activity patterns upon engagement in the task. 37 We show that this population-level representation of stimuli in A1 population activity 38 bears strong similarities to responses in the frontal cortex, but appears earlier 39 following stimulus presentation. Analysis of neural activity recorded in various Go/No-40 Go tasks, with different sounds and reinforcement paradigms, reveals that this 41 striking population-level enhancement of target representation is a general property 42 of task engagement. These findings indicate that primary sensory cortices play a 43 highly flexible role in the processing of incoming stimuli and implement a crucial 44 change in the structure of population activity in order to extract task-relevant 45 information during behavior.

52
How and where in the brain are sensory representations transformed into abstract 53 percepts? Classical anatomical and physiological studies have suggested that this 54 transformation occurs progressively along a cortical hierarchy. Primary sensory areas 55 are commonly believed to process and extract high-level physical properties of 56 stimuli, such as orientations of visual bars in the primary visual cortex or abstract 57 sound features in the primary auditory cortex 1,2 . These fundamental sensory features 58 are then integrated and interpreted as behaviorally meaningful sensory objects in 59 sensory scenes, and relayed to higher cortical areas, which extract increasingly task-60 relevant abstract information. Prefrontal, parietal and premotor areas lie at the apex 61 of the hierarchy 3,4 . They integrate inputs from different sensory modalities, transform 62 sensory information into categorical percepts and decisions, and store them in 63 working memory until the time when the appropriate motor action needs to be 64 executed 5,6 . 65 66 According to this classical feedforward picture, primary sensory areas are often 67 considered as playing a largely static role in extracting and encoding high-level 68 stimulus physical attributes 7-10 . However a number of recent studies in awake, 69 behaving animals have challenged this view, and shown that the information 70 represented in primary areas in fact strongly depends on the behavioral state of the 71 animal. Motor activity, arousal, learning and task-engagement have been found to 72 strongly modulate responses in primary visual, somatosensory, and auditory cortices 73 [11][12][13][14][15][16][17][18][19][20][21][22][23][24][25] . Effects of task-engagement have been particularly investigated in the auditory 74 cortex, where it was found that receptive fields of primary auditory cortex neurons 75 adapt rapidly to behavioral demands when animals engage in various types of 76 auditory discrimination tasks 26-30 . These observations have been interpreted as 77 signatures of highly flexible sensory representations in primary cortical areas, and 78 they raise the possibility that these areas may be performing computations more 79 complex than simple extraction and transmission of processed stimulus features to 80 higher-order regions. 81 82 An important limitation of many previous studies 26-30 is that they relied mostly on 83 single-cell analyses, which characterized the selectivity of individual neurons to 84 sensory stimuli. Here we show that simple population analyses reveal that task-85 engagement induces a shift in the primary auditory cortex from a sensory-driven 86 representation to a representation of the behavioral meaning of stimuli, analogous to 87 the one found in the frontal cortex. We first analyzed the responses during a temporal 88 auditory discrimination task, in which ferrets had to distinguish between Go 89 (Reference) and No-Go (Target) stimuli corresponding to click trains of different 90 rates. The activity of the same neural population was recorded when the animals 91 were engaged in the task, and when they passively listened to the same stimuli. Both 92 single cell and population analyses showed that task-engagement decreased the 93 accuracy of encoding the physical attributes of stimuli. Population, but not single-cell, 94 analyses however revealed that task-engagement induced a shift towards an 95 asymmetric representation of the two stimuli that enhanced target-evoked activity in 96 the subspace of optimal decoding. This shift was in part enabled by a novel 97 mechanism based on the change in the pattern of spontaneous activity during task 98 engagement.

100
Performing identical analyses developed on this task to independent data sets 101 collected in A1 during other behavioral discrimination tasks demonstrated that these 102 findings can be well generalized, independently of the type of stimuli, behavioral 103 paradigm or reward contingencies. Specifically, in all tasks, we found an enhanced 104 representation of the target stimuli, defined as those stimuli that induced a change in 105 ' g g b v . Furthermore, in tasks that displayed a shift in the 106 spontaneous firing rates of neurons, this task-adaptive encoding was partly mediated 107 by a re-patterning of the population spontaneous activity, offering a functional 108 interpretation for this previously observed phenomena of task-evoked changes in 109 spontaneous activity 19 .
Finally, a comparison between population activity in A1 and single-cell recordings in 112 the frontal cortex revealed strong similarities. However, the target-driven 113 representation of behavioral meaning appeared in A1 very rapidly following stimulus 114 presentation, hence it was unlikely to be solely due to immediate top-down influences 115 from frontal cortex. Altogether, our results suggest that task-relevant, abstracted 116 information is present in primary sensory cortices, and can be read out by neurons in 117 higher order cortices. 118 119 120 RESULTS 121 122 123 Task engagement degrades the encoding of stimulus physical features in A1 124 125 We recorded the activity of 370 units in the primary auditory cortex (A1) of two awake 126 ferrets in response to periodic click trains. The animals were trained using a 127 conditioned avoidance paradigm 26 to lick water from a spout during the presentation 128 of a class of reference stimuli and to stop licking following a target stimulus (Animal 1: 129 83% hit +/-3% s.e.m; Animal 2: 69% hit +/-5% s.e.m) ( Fig. 1a; see Methods). Target  130 stimuli thus required a change in the ongoing behavioral output while reference 131 stimuli did not. Each animal was trained to discriminate low vs high click rates, but 132 the precise rates of reference and target click trains changed in every session. The 133 category choice was opposite in the two animals to avoid confounding effects of 134 stimulus rates (low/high) and behavioral category (reference/target). Thus, the target 135 for one ferret was high click train rates, and the target for the other ferret was low 136 click train rates. In each session, the activity of the same set of single units was 137 recorded during active behavior (task-engaged condition) and during passive 138 presentations of the same set of auditory stimuli before and after behavior (passive 139 conditions).

141
We first examined how auditory cortex responses and stimulus encoding depended 142 on the behavioral state of the animal. In agreement with previous studies 14,19 , 143 spontaneous activity often increased in the task-engaged condition, while stimulus-144 evoked activity was often suppressed (Fig. 1b). To quantify the changes in activity 145 over the population, we used a modulation index of mean firing-rates between 146 passive and task-engaged conditions, estimated in different epochs ( Fig. 1c;  independently of the rate of the click train and the identity of the stimuli (Fig. S1). This 164 reduction in stimulus-entrainment further suggested that task engagement degraded 165 the encoding of click-times in A1.

167
The change in activity between passive and task-engaged conditions was 168 heterogeneous across the neural population. While stimulus-entrainment was on 169 average reduced in the engaged condition, a minority of neurons increased their 170 responses. One possibility is that such changes reflect an increased sparseness of 171 the neural code. Under this hypothesis, the stimuli are represented by smaller pools 172 of neurons in the task-engaged condition, but in a more reliable manner. To address 173 this possibility, we built optimal decoders that reconstructed click timings from the 174 activity of all simultaneously recorded neurons, in a trial-by-trial manner (Fig. 1d,  175 Methods). We found that the reconstruction accuracy decreased in the task-engaged 176 condition compared to the passive condition ( Fig. 1e-g), confirming that encoding of 177 click-times decreased during behavior.

179
In summary, the fine physical features of the behaviorally relevant stimuli became 180 less faithfully represented by A1 activity when the animals were engaged in this 181 discrimination task. 182 183 184 During sound presentation target and reference stimuli can be equally 185 classified from A1 responses in passive and engaged conditions 186 187 In the task-engaged condition, the animals were required to determine whether the 188 rate of each presented click train was high or low. They needed to make a categorical 189 decision about the stimuli and correctly associate them with the required actions, 190 before using that information to drive behavior. We therefore asked to what extent the 191 two classes of stimuli could be discriminated based on population responses in A1, in 192 the task-engaged and in the passive conditions. 193 194 We first compared the mean firing-rates evoked by target and reference click trains.

195
While some units elevated their activity for the target stimulus (Fig. 2a, left), others 196 preferred the reference (Fig. 2a, right). Over the whole population, mean firing rates 197 were not significantly different for target vs reference stimuli (Fig. 2b) or for low vs 198 high rate click trains (Fig. S2a). This observation held in both passive and task-199 engaged conditions. Discriminating between the stimuli was thus not possible on the 200 basis of population-averaged firing rates (see Fig. S2b

204
To take into account the heterogeneity of neural responses and quantify the ability of 205 the whole population to discriminate between target and reference stimuli on an 206 individual trial basis, we adopted a population-decoding approach. We used a simple, 207 binary linear classifier that mimics a downstream readout neuron. The classifier takes 208 as inputs the spike-counts of all the units in the recorded population, multiplies each 209 input by a weight, and compares the sum to a threshold to determine whether a trial 210 was a reference or a target. The weight of each unit was set based on the difference 211 between the average spike-counts evoked by the two stimuli ( Fig. S3 and Methods).

212
This weight was therefore positive or negative depending on whether it preferred the 213 target or reference stimulus. Different decoder weights were determined at every 214 time-bin in the trial. The width of the time-bins (100ms) was larger than the inter-click 215 intervals (Methods). Shorter time-bins increase the amount of noise but do not affect 216 our main findings (Fig. S8A). Training and testing the classifier on separate trials 217 allowed us to determine the cross-validated performance of the classifier, and 218 therefore the ability to discriminate between the two stimulus classes based on 219 single-trial activity in A1.

221
During stimulus presentation, the linear readout could discriminate target and 222 reference stimuli with high accuracy in both passive and task-engaged conditions 223 (Fig. 2d,e). Because the classifier performed at saturation during the sound epoch, it 224 could be that differences between passive and active classifiers were masked by the 225 substantial number of neurons provided to the classifiers. Decoders performing with 226 lower numbers of neurons did not reveal any difference between the two behavioral 227 states (Fig. S4a). Moreover this discrimination capability did not appear to be layer-228 dependent (Fig. S4b,c). The primary auditory cortex therefore appeared to robustly 229 represent information about the stimulus class, independently of the decrease in the 230 encoding of precise stimulus properties that occurs during task-engagement.

232
We next examined the discrimination performance during the silence immediately 233 after stimulus offset. This silent period consisted of a 400ms interval followed by a 234 response window, during which the animal learned to stop licking if the preceding 235 stimulus was a target. As during the sound period, mean firing rates were not 236 significantly different for the two types of stimuli during post-stimulus silence (Fig. 2c). 237 Nevertheless, we found that discrimination performance between target and 238 reference trials remained remarkably high throughout the post-stimulus silence in the 239 task-engaged condition. In the passive condition, the decoding performance decayed 240 during post-stimulus silence, but remained above chance level (Fig. 2d,e and Fig.  241 S5b). The information about the stimulus class was thus maintained during the silent 242 period in the neural activity in A1, but more strongly when the animal was actively 243 engaged in the task. Moreover, a comparison between the decoders determined 244 during the sound and after stimulus presentation showed that the encoding of 245 information changed strongly between the two epochs of the trial ( Fig. S6 and  246 supplementary text). Task-engagement shifts encoding towards enhanced target-detection 253 254 We next examined in more detail the neural activity that underlies the classification 255 performance in the two conditions. Target and reference stimuli play highly 256 asymmetric roles in the Go/No-Go task design studied here as their behavioral 257 meaning is totally different. As shown in Figure 1a, animals continuously licked 258 throughout the task and only target stimuli elicited a change from this ongoing 259 behavioral output while reference stimuli did not. We therefore sought to determine 260 whether target-and reference-induced neural responses play similar or different roles 261 in the discrimination between target and reference stimuli. 262 263  We first used dimensionality-reduction techniques to visualize the trajectories of the 264 population activity in three dimensions (Fig. 3a, see Methods for details). The three 265 principal dimensions were determined jointly for the passive and active data. This 266 allowed us to visually inspect the difference in population dynamics and decoding 267 axes between the two behavioral conditions. The average neural trajectories on 268 reference and target trials strongly differ in the two behavioral conditions. In the 269 passive condition, reference and target stimuli led to approximately symmetric 270 trajectories around baseline spontaneous activity, suggesting that reference and 271 target stimuli played essentially equivalent roles during the sound (Fig. 3a,c,d). In 272 contrast, in the task-engaged condition, the activity evoked by reference and target 273 stimuli became strongly asymmetric with respect to the decoding axes and the 274 spontaneous activity (Fig. 3b,e,f).

276
To further characterize the change in information representation between the two 277 conditions, we examined the average inputs from target and reference stimuli to a 278 hypothetical readout neuron corresponding to a previously determined linear 279 classifier. This is equivalent to projecting the trial-averaged population activity onto 280 the axis determined by the linear classifier, trained at a given time point in the trial.

281
This procedure sums the neuronal responses after applying an optimal set of 282 weights. It effectively reduces the population dynamics from N=370 dimensions 283 (where each dimension represents the activity of an individual neuron) to a single, 284 information-bearing dimension. The discrimination performance of the classifier is 285 directly related to the distance between reference and target activity after projection, 286 so that the projection allows us to visualize how the classifier extracts the stimulus 287 category from the neuronal responses to the two respective stimuli. Projecting the 288 spontaneous activity along the same axis provides moreover a baseline for 289 comparing the changes in activity induced by the target and reference stimuli along 290 the discrimination axis. As the encoding changes strongly between stimulus 291 presentation and the subsequent silence ( Fig. S6 and supplementary text), we 292 examined two projections corresponding to the decoders determined during stimulus 293 and during silence.

295
As suggested by the three-dimensional visualization, the projections on the decoding 296 axes demonstrated a clear change in the nature of the encoding between the two 297 behavioral conditions. In the passive condition, reference and target stimuli led to 298 approximately symmetric changes around baseline spontaneous activity (Fig. 3c,d).

299
In contrast, in the task-engaged condition, the activity evoked by reference and target 300 stimuli became strongly asymmetric (Fig. 3e,f). In particular, the projection of 301 reference-evoked activity remained remarkably close to spontaneous activity 302 throughout the stimulus presentation and the subsequent silence in the task-engaged 303 condition. The strong asymmetry in the engaged condition, and the alignment of 304 reference-evoked activity were found irrespective of whether the projection was 305 performed on decoders determined during stimulus (Fig. 3e,f, top) or during silence 306 (Fig. 3e,f, bottom). The time-courses of the two projections were however different, 307 with target-evoked responses rising very rapidly (Fig. 3e,f top) when projected along 308 the first axis, but much more gradually when projected along the second axis ( Fig.  309 3e,f, bottom). In both cases, however, our analysis showed that in the active 310 condition the discrimination performance relies on an enhanced detection of the 311 target. 312 313 9 The strong similarity between the projection of reference-evoked activity and the 314 baseline formed by the projection of spontaneous activity is not due to the lack of 315 responses to reference stimuli in the engaged condition. Reference stimuli do evoke 316 strong responses above spontaneous activity in both passive and task-engaged 317 conditions. However, in the task-engaged, but not in the passive condition, the 318 population response pattern of the reference stimuli appears to become orthogonal to 319 the axis of the readout unit during behavior. The strong asymmetry between 320 reference-and target-evoked responses is therefore seen only along the decoding 321 axis, but not if the responses are simply averaged over the population, or averaged 322 after sign correction for the preference between target and reference (Fig. S7).

324
We verified that these results are robust across a range of time bins (10ms-200ms), 325 allowing us to cover timescales both on the order of the click rate and much longer. 326 Both the increase in post-sound decoding accuracy in the engaged state and the 327 increased asymmetry of target/reference representation were observed at all time 328 scales ( Fig. S8a,b). 329 330 331 332 333 Encoding of stimulus behavioral meaning in A1 is independent of motor 336 activity and reflects behavioral outcomes 337 338 One simple explanation of the asymmetry between target-and reference-evoked 339 responses could potentially be the motor-evoked neuronal discharge. Indeed, during reference stimuli as the animals refrained from licking before the No-Go window 342 following the target stimulus but not the reference stimulus (Fig. 1a). As neural 343 activity in A1 can be strongly modulated by motor activity 17 , such effects could 344 potentially account for the observed differences between target-and reference-345 evoked population activity.

347
To assess the role played by motor activity in our findings, we first identified units 348 with lick-related activity. To this end, we used decoding techniques to reconstruct lick 349 timings from the population activity, and determined the units that significantly 350 contributed to this reconstruction by progressively removing units until licking events 351 could not anymore be detected from the population activity. We excluded a sufficient 352 number of neurons (10%) such that a binary classifier using the remaining units could 353 no longer classify lick and no-lick time points as compared with random data (p>0.4; 354 Fig. 4a,b, see Methods). We then repeated the previous analyses after removing all 355 of these units. The discrimination performance between target and reference trials 356 remained high and significantly different between the passive and the task-engaged 357 conditions during the post-stimulus silence (Fig. 4c,d), while projection of target-and 358 reference-elicited activity on the updated decoders still showed a strong asymmetry 359 in favor of the target (Fig. 4e,f). This indicated that the information about the 360 behavioral meaning of stimuli was represented independently of any overt motor-361 related activity. In all subsequent analyses we excluded all lick-responsive neurons.

363
Although the information present in A1 during the post-stimulus silent period could 364 not be explained by motor activity, it appeared to be directly related to the behavioral 365 performance of the animal. To show this, we classified population activity on error 366 trials, in which the animal incorrectly licked on target stimuli, using classifiers trained 367 on correct trials. Error trials showed only a slight impairment of accuracy during the 368 b. As in a, for the task-engaged state. Note that in this state, target activity makes a much larger excursion from the baseline than reference activity. The axes are the same as in panel a, as the GPFA analysis was performed jointly on passive and engaged data. c. Projection onto the decoding axis of trial-averaged reference-and target-evoked responses for the whole neural population. A baseline value computed from pre-stimulus spontaneous activity was subtracted for each unit, so that the origin corresponds to the projection of spontaneous activity (shown by black line). Decoding axes determined during sound presentation and post-stimulus silence are respectively used for projections in the top and bottom rows. The periods used to construct the decoding axis are shaded in gray. Error bars represent 1 std calculated using decoding vectors from cross-validation. This procedure allows visualization of the distance between reference and target evoked projections (that corresponds to decoding strength) and the distance of the stimuli-evoked responses from the baseline of spontaneous activity can be interpreted as the contribution of each stimulus to decoding accuracy. d. Distance of reference and target projections from baseline in each condition during the sound and silence period. Error  Another aspect of neural activity that can be expected to change with task 379 engagement is correlations between pairs of neurons. Our analysis so far has 380 focused on the structure of population responses to external stimuli (signal 381 correlations) but pairs of neurons display trial-to-trial fluctuations in activity (noise 382 correlations) that can affect the population ability to encode information 32,33 . We 383 found that task engagement decreased noise correlations on average (Fig. 5a,b; Fig.  384 S9a), compatible with previous observations that attention reduces noise correlations 385 34 . Across the population, the range of changes was however very broad. To 386 determine the influence of noise correlations on the population level, we repeated our 387 analysis on simultaneously recorded data, using a modified linear decoder that takes 388 noise correlations into account (the Fisher discriminant, see Methods). Our main 389 findings appeared not to be sensitive to noise correlations. We were able to decode 390 with high accuracy stimulus identity in passive and engaged states and observed an 391 increase of stimulus memory in the engaged state as before (Fig. 5c). Projection onto 392 this adjusted decoding axis showed a similar enhanced target representation in the 393 engaged state, with the reference response lying along the projected baseline activity 394 (Fig. 5d,e). Projection of responses using the linear classifier with and without taking 395 noise correlations into account are strikingly similar across a range of timebins ( Fig.  396   Fig 4. a. Schematic of the approach used to identify lick responsive units to eliminate from population analysis. First, we reconstructed licks using optimal filters as with click reconstruction (Fig 1). To  S9b,c). Finally, a finer examination of the change between passive and engaged 397 conditions showed that, contrary to previous observations 35 , noise correlations were 398 most strongly reduced for pairs of neurons with opposite stimulus preference in our 399 data set (Fig. S10b,c), which is expected to impair decoding of information (Fig.  400 S10a). 401 402 403 404 405 Mechanisms underlying the asymmetric, target-driven encoding during task-406 engagement 407 408 The previous analyses of population activity have shown that task engagement 409 induces an asymmetric encoding, in which the activity elicited by reference stimuli 410 becomes similar to spontaneous background activity when seen through the 411 decoder. Two different mechanisms can potentially contribute to this shift between 412 passive and engaged conditions: (i) the spontaneous activity changes between the 413  To disentangle the effects of the two mechanisms, we chose a fixed decoding axis, 420 and projected on the same axis the stimulus-evoked activity from both passive and 421 engaged conditions. We then compared the resulting projections with projections of 422 both passive and engaged spontaneous activity. We performed this procedure 423 separately for decoding axes determined during sound and silence epochs. reference-evoked activity was aligned during sound presentation with the projection 429 of engaged, but not passive spontaneous activity (Fig. 6a top left). A similar 430 observation held for the engaged responses throughout the sound presentation 431 epoch ( Fig. 6a top right). These projections remained similar regardless of whether 432 the decoding axes were determined during the passive or the engaged conditions, as 433 these two axes largely share the same orientation (Fig. S6e). Altogether, these 434 results indicate that the change in spontaneous baseline activity during task 435 engagement is sufficient to explain the strongly asymmetric, target-driven response 436 observed early in the trial during sound presentation (Fig. 6b top).

438
However, we reached a different conclusion when we examined the activity during 439 the post-stimulus silence (Fig. 6a bottom). Repeating the same procedure as above, 440 but projecting on the decoding axis determined during the post-stimulus silence 441 revealed that the shift in spontaneous activity alone was not able to account for the 442 asymmetry of the projected responses during the post-stimulus silence (Fig. 6b  443 bottom). The target-driven, asymmetrical projections observed during this trial epoch 444 therefore relied in part on a change in stimulus-evoked responses.

446
All together, we found that the changes in baseline spontaneous activity induced by 447 the task engagement are key in explaining the enhancement of the target-driven, 448 asymmetric encoding during sound presentation. As described in the above, the 449 encoding axis during sound presentation is not drastically affected by task 450 engagement. Instead, it is the population spontaneous activity that aligns with the 451 reference-elicited activity with respect to the decoding axis. This observation in 452 particular provides an additional argument against the possibility that the appearance 453 of an asymmetrical representation is due to the asymmetrical motor responses to the 454 two stimuli. Rather, the asymmetry is geometrically explained by baseline changes 455 that precede stimulus presentation, and reflects the behavioral state of the animal. The pattern of activity resulting from projecting reference-and target-elicited A1 467 activity on the linear readout is strikingly similar to previously published activity 468 recorded in the dorsolateral frontal cortex (dlFC) of behaving ferrets performing 469 similar Go/No-Go tasks (tone detect and two-tone discrimination in 36 ). We therefore 470 compared in more detail A1 activity with activity recorded in dlFC during the same 471 click-rate discrimination task. When the animal was engaged in the task, single units 472 in dlFC encoded the behavioral meaning of the stimuli by responding only to target 473 stimuli, but remaining silent for reference stimuli (Fig. 6a bottom panel). Target-474 induced responses were moreover observed well after the end of the stimulus 475 presentation, allowing for a maintained representation of stimulus category. The 476 strong asymmetry of single-unit responses in dlFC clearly resembles the activity 477 b. Comparison of reference/target asymmetry for evoked responses in different states compared to different baselines given by passive or engaged spontaneous activity. Reference/target asymmetry is the difference of the distance of reference and target projected data to a given baseline. We examine three cases: (i) passive evoked responses, distances calculated relative to engaged spontaneous activity; (ii) engaged evoked responses, distances calculated relative to passive spontaneous activity; (iii) engaged evoked responses, distances calculated relative to engaged spontaneous activity. These values are shown during the sound (top) and the silence (bottom). In all three cases, the engaged decoding axis was used for projections. Decoding axes determined during sound presentation and post-stimulus silence are respectively used for projections in the top and bottom rows. Error bars represent 95% confidence intervals (n=400 cross validations; sound: p(col1,col3)=0.29 & p(col2,col3)<0.0025; silence : p(col1,col3)<0.0025 & p(col2,col3)<0.0025; **: p<0.01).
extracted from the A1 population by the linear decoder ( Fig. 3 and 4). This suggests 478 that the target-selective responses in the dlFC that reflect the cognitive decision 479 process could in part be thought of as a simple readout of information already 480 present in the population code of A1.

482
To further examine the relationship between dlFC single-unit responses and 483 population activity in A1, we next compared the time course of the projected target-484 elicited data in A1 (Fig. 3e) and the population-averaged target-elicited neuronal 485 activity in dlFC (Fig. 7a bottom panel) during active sessions. As mentioned above, 486 the optimal decoding axes for A1 activity changes between the stimulus presentation 487 epoch and the silence that follows (Fig. S6). The time-course of the projected A1 488 activity depends strongly on the axis used for the projection. When projecting on the 489 axis determined during stimulus presentation, the target-elicited response in A1 was 490 extremely fast (0.08s +/-0.009 std) compared to the much longer response latency in 491 the population-averaged response of dlFC neurons (0.48s +/-0.12 std) (Fig. 7b). In Note that all analysis in this figure is done after excluding lick-responsive units in A1 as described in Fig 4. a. Average PSTHs of all frontal cortex units in response to target and reference stimuli in both passive and engaged conditions. Note that the response to the target in the task-engaged state is very clear and appears late during the sound. Error bars: s.e.m over all units (n=102) b. Latency to half-maximum response for frontal cortex (for average PSTHs) and primary auditory cortex (for projected target-elicited data) in the task-engaged state. For the auditory cortex, data is projected either on the sound decoding vector or the silence decoding vector. Error bars represent 95% confidence intervals. (400 cross-validations. p=<0.0025, p=<0.0025 & p=0.011;**: p<0.01, ;*: p<0.05).

Enhanced representation of target stimuli in A1 is a general feature of auditory 505
Go/No-Go tasks 506 507 To determine whether the task-related increase in asymmetry between target and 508 reference was a more general feature of primary auditory cortex responses during 509 auditory discrimination, we applied our population analysis to other datasets collected 510 during different tasks. All of these tasks used Go/No-Go paradigms (see Fig. S11a,e,i 511 and Methods), in which the animals were presented with a random number of 512 references followed by a target stimulus. In these different datasets, animals were 513 required to discriminate noise bursts vs. pure tones (tone detect tasks), or categorize 514 pure tones drawn from low, medium or high-frequency ranges (frequency range 515 discrimination task). Contrasting datasets were obtained from two groups of ferrets 516 that were separately trained on approach and avoidance versions of the same tone 517 detect task. These two behavioral paradigms used exactly the same stimuli under 518 two opposite reinforcement conditions 30 , requiring nearly opposite motor responses 519 (Fig. S11a,e). A crucial feature shared by all these tasks lies in the fact that the 520 behavioral response to the target stimulus always required a behavioral change 521 relative to sustained baseline activity. More specifically the target was the No-Go 522 stimulus in negative reinforcement tasks and required animals to cease ongoing 523 licking, whereas the target was the Go stimulus in the positive reinforcement task and 524 required animals to begin licking in a non-lick context. In all of the analyses, lick-525 related neurons were removed using the approach outlined earlier.

527
Performing the same analyses on all tasks showed that projections of target-and 528 reference-evoked activities in passive conditions contained a variable degree of 529 asymmetry in the sound and silence epochs. However, in all tasks we found that 530 task-engagement leads an enhancement of target-driven encoding during sound 531 (Fig. 8a,b;e,f;i,j;m,n). As previously described for the rate discrimination task (Fig. 3  532 and 4e), target projections more strongly deviated from baseline than projections of 533 reference stimuli in the engaged condition. Moreover, for three of the four tasks we 534 examined, enhancement of target representations was not observed at the level of 535 population-averaged responses, but only in the direction determined by the decoder 536 (Fig. 8b,f,j,n). During the post-sound silence, decoding accuracy quickly decayed in 537 both passive and engaged states, but remained above chance (Fig. S11c,g,k). As in 538 the click-train detection task, decoding accuracy relied on a different encoding 539 strategy than the sound period (Fig. S11d,h,l), and the asymmetry during the post-540 sound silence was high both in passive and engaged conditions (Fig. S12).

542
Comparison of appetitive and aversive versions of the same task is particularly 543 revealing as to which type of stimulus was associated with enhanced representation 544 in the engaged state. In the appetitive version of the tone detect tak, ferrets needed 545 to refrain from licking on the reference sounds (No-Go) and started licking the water 546 spout shortly after the target onset (Go) (Fig. S11e), whereas in the aversive 547 (conditioned avoidance) paradigm they had to stop licking after the target sound (No-548 Go) to avoid a shock (Fig.S11a). It is important to note that although the physical 549 stimuli presented to the behaving animals were identical in both tone detect tasks, 550 the associated motor behaviors of the animals are nearly opposite. Projection of task-551 engaged A1 population activity reveals a target-driven encoding (compare right 552 panels of Fig. 8f,j with Fig. 8I,j), irrespective of whether the animal needed to refrain 553 from or to start licking to the target stimulus. This shows that the common feature of 554 stimuli that are enhanced after projection onto the decoding axis is that they are 555 associated with a change of ongoing baseline behavior.

557
This range of behavioral paradigms provides additional arguments against the 558 described changes in activity being solely due to correlates of licking activity. Firstly, 559 we observed enhanced target-driven encoding in both the appetitive and aversive 560 tone-detect paradigms, even though the licking profiles were diametrically opposite to 561 each other. Secondly, comparing the projections of the population activity in the 562 approach tone detect task with the click rate discrimination task reveals a strong 563 similarity in the temporal pattern of asymmetry observed during task engagement. In 564 less than 100 ms, projection of target-elicited activity reached its peak in both 565 paradigms (Fig. 8a,i), although the direction and time course of the licking responses 566 were reversed, with a fast decline in lick frequency for the click rate discrimination 567 task (Fig. 1a), versus a slow increase for the tone detect ( Fig. S11e left panel). Last, 568 although the results are more variable partly due to low decoding performance, we 569 observed target-driven encoding during the post-stimulus silence in the passive state 570 (Fig. S12) although ferrets were not licking during this epoch. The points listed here 571 g consequences, independent of the animal motor response.

574
As pointed out in the case of the click rate discrimination task, the enhancement of 575 target representation in the engaged condition can rely on two different mechanisms, 576 a shift in the spontaneous activity or a shift in stimulus-evoked activity. We therefore 577 set out to tease apart the respective contributions of the two mechanisms in this 578 novel set of tasks. As in Fig. 6, we compared the distance of target and reference 579 passive and engaged projections to either engaged or passive baseline activities. 580 Out of the three additional datasets, we observed an increase in spontaneous firing 581 rates only in the aversive tone detect task (Fig. 8g). In this latter paradigm, task-582 induced modulations of spontaneous activity patterns explained the change in 583 asymmetry during sound presentation, similar to what was observed in the click rate 584 discrimination task (compare Fig. 8d and 8h). The other two tasks showed no global 585 change of spontaneous firing rate (Fig. 8k,o), and consequently, during the task 586 engagement, the enhancement of the target representation was solely due to the 587 second mechanism, the changes in the target-evoked responses themselves 588 (Fig.8l,p). During the silence, we observed as previously for the click-rate 589 discrimination that the increase in asymmetry relied only on the second mechanism 590 (Fig. S11).

592
Taken all together, population analysis on four different Go/No-Go tasks revealed an 593 increase of the encoding in favor of the target stimulus as a general consequence of 594 task-engagement on A1 neural activity. Viewing activity changes in this light allowed 595 us to interpret the previously observed changes in spontaneous activity as one of two 596 possible mechanisms underlying this task-induced change of stimulus representation 597 in A1 population activity. In this study, we examined population responses in the ferret primary auditory cortex 610 during auditory Go/No-Go discrimination tasks. Comparing responses between 611 sessions in which animals passively listened and sessions in which animals actively 612 discriminated between stimuli, we found that task-engagement induced a shift from a 613 sensory-driven to an asymmetric, target enhanced, representation of the stimuli, 614 highly similar to the type of activity observed in dorsolateral frontal cortex during 615 engagement in the same task. This enhanced representation of target stimuli was 616 found in a variety of discrimination tasks that shared the same basic Go/No-Go 617 structure, but used a variety of auditory stimuli and reinforcement paradigms.

619
In the click rate discrimination task that we analyzed first, the sustained asymmetric 620 stimulus encoding in A1 was only observed in the engaged state (Fig. 3). One 621 possible explanation is that this encoding scheme relied on corollary neuronal 622 discharges related to licking activity. However there are several factors that argue 623 against this interpretation. Firstly, we adopted a stringent criterion for the exclusion 624 from the analysis of all units whose activity was correlated with lick events (Fig. 4). 625 After removing lick-responsive units from the analysis the results remained 626 unchanged, indicating the absence of a direct link between licking and the observed 627 asymmetry in the encoding. Furthermore, the large differences in the lick profiles 628 between the different tasks were not in line with the remarkably conserved target-629 driven projections of population activity across tasks and reinforcement types, 630 supporting a non-motor nature of the stimulus encoding in A1 (Fig. 8b,f,j,n). Finally, 631

e,I,m Projection onto the decoding axis determined during the sound period of trial-averaged reference (blue) and target (ref) activity during the passive (dark colors) and the active (light colors) sessions.
A baseline value computed from pre-stimulus spontaneous activity was subtracted for each neuron, so that the origin corresponds to the projection of spontaneous activity (shown by black line). Note that the targetdriven activity is further from the baseline in the active state and the reference-driven activity is closer. The periods used to construct the decoding axis are shaded in gray. Error bars represent 1 std calculated using decoding vectors from cross-validation (n=400). b,f,j,n Index of target enhancement induced by task engagement based on projections using the decoding axis determined during the sound. In green same index instead giving the same weight to all units. The difference between the green and black curved indicates that the change in asymmetry induced by task engagement cannot be detected using the population averaged firing rate alone. Error bars represent 1 std calculated using decoding vectors from cross-validation (n=400 the role of baseline shifts due to the change in spontaneous activity in two more tasks 632 further argues against a purely motor explanation of the observed asymmetry (Fig. 6  633 and Fig. 8a) since the spontaneous activity occurs during epochs that preceded 634 stimulus presentation and behavioral changes. Altogether, while the different lines of 635 evidence exposed above make an interpretation in terms of motor activation unlikely, 636 ultimately a different type of behavioral report, such as one using similar responses, 637 would help fully rule out this possibility.

639
Our analyses show that the target-driven encoding scheme during task engagement 640 is neither purely sensory nor purely motor, but instead argue for a more abstract, 641 cognitive representation of the stimulus behavioral meaning in A1 during task 642 engagement. As the target stimulus was associated with an absence of licking in the 643 tasks under aversive conditioning, one possibility could have been that the A1 644 encoding scheme was contrasting the only stimulus associated with an absence of 645 licking (No-Go) against all other stimuli (Go). This lick/no-lick encoding was however 646 not consistent with the tone detect task under appetitive reinforcement, in which the 647 target stimulus was a Go signal for the animal. We thus suggest that A1 encodes the 648 behavioral meaning of the stimulus by emphasizing the stimulus requiring the animal 649 to change its behavioral response, i.e. the target stimuli in the different tasks we 650 examined. However, our data do not allow us to conclude whether this behavioral 651 meaning corresponds to the encoding of the stimulus-action association, or the 652 ' leading to a change in behavioral 653 response and it would be interesting to perform similar analyses in tasks more 654 specifically designed to tease apart these different possible interpretations. 655 656 657 Relation to previous studies 658 659 A series of previous studies found that task-engagement strongly influences 660 responses in the primary auditory cortex, in some cases sharpening stimulus 661 representation 26-28,37 , in others leading to a suppression of sensory responses 14 , as 662 was also observed during locomotion 17,18 . While some studies observed signatures 663 of decision-related activity in A1 11,38 , none has hitherto reported the strong 664 representation of behavioral meaning described here in the population code.

666
The majority of previous studies concentrated on single-neuron or LFP activity. In 667 contrast, our results critically rely on population-level analyses 39-42 , and in particular, 668 on linear decoding of population activity. This is a simple, biologically-plausible 669 operation that can be easily implemented by a neuron-like readout unit that performs 670 a weighted sum of its inputs. The summed inputs to this hypothetical read-out unit 671 showed that Go and No-Go stimuli elicited inputs symmetrically distributed around 672 spontaneous activity in the passive state. In contrast, in the task-engaged state, only 673 target stimuli, which required an explicit change in ongoing behavior, led to an output 674 different from spontaneous activity, once passed through the readout unit. This 675 switch from a more symmetric, sensory-driven to an increasingly asymmetric, target-676 driven representation was not clearly apparent if single-neuron responses were 677 simply averaged or normalized (Fig. S7, 7b,f,j,n), but instead relied on a population 678 analysis in which different units were assigned different weights by projecting 679 population activity on the decoding axis. Note that the weights were not optimized to 680 maximize the asymmetry between Go and No-Go stimuli, but rather the 681 22 discrimination between them. The shift towards a more asymmetric representation of 682 the behavioral meaning of stimuli is therefore an unexpected but important by-683 product of the analysis.

685
From a population-decoding viewpoint, task-engagement induced a shift towards an 686 enhanced representation of target stimuli class in all the tasks we considered. 687 However, considering these same effects from a less elaborate sensory coding view, 688 they appear to be quite varied and to depend on the details of the stimuli. Thus, in 689 the tone-detection task, previous studies reported that task-engagement enhanced 690 the representation of the relevant tone frequency in a negative reinforcement 691 paradigm 26-28 , and caused a suppression at the tone frequency during the appetitive 692 version of the task 30 . In the click-discrimination task, task-engagement led to 693 decreased temporal fidelity in the representation of click times, the main sensory 694 features of the stimuli (see Fig. 1 and 14 ). These varied results, however, are unified 695 by a shift to a representation of the behavioral meaning of stimuli. Our findings 696 therefore provide a possible way to reconcile the diverse effects described earlier.

698
Possible implication of an A1-FC loop during task engagement 699 700 Recordings performed in dorsolateral frontal cortex (dlFC) in the ferret during tone 701 detection 36 showed that, when the animal is engaged in the task, dlFC single units 702 encode the abstract behavioral meaning of the stimuli by responding only to target 703 stimuli (that require a change in the ongoing behavioral output) but remain silent for 704 reference stimuli. Remarkably, projections of reference-and target-elicited A1 activity 705 on the linear readout showed the same type of target-specific patterns of activity. 706 Several possible mechanisms could account for these similarities of representations 707 in A1 and dlFC. Here we propose that, during task engagement, sound evoked 708 activity in A1 triggers activity in dlFC, which then subsequently feeds back top-down 709 inputs to A1 that may underlie the sustained activity pattern found during post-710 stimulus silence. 711 Very early in the trial, the asymmetric encoding is already fully present in A1 (as early 712 as 100ms in the rate discrimination task for instance; Fig. 3e top panel). At this point 713 in time, dlFC does show some target-selective responses that increase over time 714 (Fig. 7a). This suggests the presence of a feed-forward mechanism early in the trial, 715 by which A1 may be feeding higher-order auditory cortex and FC with a pattern of 716 neuronal responses encoding the behavioral meaning of the stimulus. Our results 717 show that this early task-induced change in the representation in A1 relies on a shift 718 of spontaneous activity at the population level that may be due to tonic top-down or 719 neuromodulatory inputs during task engagement 43,44 . The presence of a dynamic 720 balance characterizes interactions between A1 and dlFC has been previously shown 721 by changes in Granger causality and effective connectivity during behavioral state 722 transitions 45 . 723 724 As the trial progresses, the encoding in A1 progressively shifts (Fig. S6). Activity 725 projected on the late decoding vector (Fig. 3e bottom panel) shows a progressive 726 buildup similar to the activity observed in dlFC (Fig. 7). The late stimulus encoding, 727 during the later phase of the click trains and the subsequent post-stimulus silence 728 (Fig. 3e bottom panel) may thus be gradually engaging stronger top-down inputs from 729 the dlFC-A1 network loop. The persistent encoding of stimuli identity could therefore 730 rely on a stimulus-specific top-down input from frontal areas. Although direct 731 connections from dlFC to A1 have not been identified in ferrets, several recent 732 studies have identified direct inputs from the rodent motor cortex 17 , the rodent 733 orbitofrontal cortex 46,47 and the secondary auditory areas 48 (ferret posterior 734 ectosylvian gyrus) to A1. Altogether, while the comparison of time-course of activity in 735 A1 and dlFC suggest that the recruitment of the A1-FC loop is a plausible 736 interpretation of our results, more direct evidence is needed to establish this 737 mechanism. 738 739 Projection to the read-out null space as a mechanism for target detection in A1 740 741 Our analysis suggests a novel population readout mechanism for extracting 742 behaviorally relevant information from A1 while suppressing other, irrelevant sensory 743 information: in the task-engaged state, irrelevant sensory inputs (reference stimuli) 744 elicit changes of activity that are orthogonal to the read-out axis and therefore cannot 745 be distinguished from spontaneous activity. This mechanism is reminiscent of the 746 mechanism proposed for movement preparation in motor cortex 49 , where 747 preparatory neural activity lies in the null space of the motor readout, i.e. the space 748 orthogonal to the read-out of the motor command, and therefore does not generate 749 movements. In our case, the readout is task-dependent, as it presumably depends on 750 the performed discrimination task. We showed that the A1 activity in the engaged 751 condition rearranges so that the difference between spontaneous activity and 752 reference-elicited activity lies in the null space of the readout, which is therefore only 753 activated by target stimuli. This rearrangement can be implemented either by a 754 change of reference-elicited activity or by a change of spontaneous activity. In two of 755 the examined tasks, click-discrimination and aversive tone detection, we found that 756 the rearrangement of population activity relied mostly on the change in population 757 spontaneous activity in the engaged condition. Strikingly, these two tasks were 758 performed by the same ferrets, which were trained to switch between the two tasks in 759 the same session. In the two other tasks, reference-elicited activity in the passive 760 condition were already aligned with the passive spontaneous activity when projected 761 on the active decoder, suggesting that learning these behavioral tasks may have 762 profoundly reshaped stimulus-evoked activity. Our results therefore suggest that 763 task-dependent shaping of spontaneous activity can allow the primary auditory cortex 764 to encode the behavioral meaning of stimuli in a task-relevant, and often in a highly 765 flexible manner.

767
Changes in spontaneous activity have previously been shown to contribute to 768 stimulus responses 50-54 and task-driven changes have been reported in multiple 769 previous studies 14 but, to our knowledge, have never been given a functional role in 770 stimulus representation 55 . Here we propose that population-level modulations of 771 spontaneous activity act as a mechanism supporting the asymmetric representation 772 of reference and stimuli target in the engaged state. This was clearly the case in 773 tasks where the passive reference-evoked responses and spontaneous patterns of 774 activity were not already aligned with respect to the active decoding vector (Fig.8a-d  775 and Fig8e-h). In those tasks, significant adjustments in spontaneous activity 776 supported the deployment of a reference/spontaneous space orthogonal to the active 777 readout-out axis.

779
However, this proposed simple linear readout mechanism cannot fully account for the 780 whole set of responses observed in frontal areas for at least two reasons. First, 781 projections of reference-elicited activity (in A1) during engagement on an aversive 782 task still give rise to a non-null, albeit reduced, output contrary to what is observed in 783 dlFC area recordings. Second, projecting passive data onto the engaged decoding 784 vector results in symmetric and reduced outputs (data not shown), whereas dlFC 785 recordings showed on average a complete absence of response during passive state 786 during the tone-detect task 36 . An additional non-linear gating mechanism likely 787 operates between primary auditory cortex and frontal areas, further reducing 788 responses to any stimulus in the passive state and to reference sounds in the active 789 state. In particular, neurons in higher-order auditory areas could refine the 790 population-wide, abstracted representation originating in A1 through the proper 791 combinations of synaptic weights. Such a mechanism could also explain why 792 individual single units recorded in belt areas of the ferret auditory cortex show a 793 gradual increase in their selectivity to target stimuli 56 . 794 795 Effects of learning 796 797 All the recordings analyzed here were performed on highly trained animals. Several 798 investigations have reported that training procedures strongly influence neural 799 representations in primary cortices 57-61 . One may therefore wonder to what extent 800 our findings, even in the passive state, depend on the prior training history of the 801 animal 62-64 . To address this question, we examined A1 recordings performed in a 802 naive ferret exposed to the same stimuli as used in the click-train discrimination task. 803 Stimulus discrimination was relatively decreased, during both the sound and silent 804 periods when compared with the decoder accuracy obtained with trained animals 805 (Fig. S5c,d). In particular, the discrimination performance during the post-stimulus 806 silence was reduced to chance-levels, while in trained animals it was above chance 807 even in the passive state. The weak but significant maintained encoding of stimulus 808 class observed in the passive state with expert ferrets thus appears to be due to the 809 behavioral training. Discrimination in the passive condition for trained animals also 810 involved target-specific activity during post-stimulus silence (Fig. 3c,d, bottom 811 panels), whereas it was not the case for naive ferrets (Fig. S5d), indicating that this 812 target-driven mechanism is ubiquitously present during the silent period in trained 813 animals. 814 Interestingly, passive projections of target-and reference-evoked activities 815 showed variable degrees of asymmetry across tasks ( Fig. 3c and 8a,e,i,m). This 816 observation could be explained by the variability in training duration across ferrets, in 817 task performance, and in paradigm requirements and complexity. Strikingly, the only 818 task we examined involving long-term memory (frequency range discrimination task) 819 exhibited a very strong asymmetry both in passive and active states (Fig. 8m). While 820 asymmetric representation of stimuli was weak in tasks demanding flexible and rapid 821 attention towards new stimuli (rate discrimination and tone detect tasks), a task 822 involving long-term memory, such as the frequency range discrimination task, could 823 engage global reshaping of the neuronal population structure to keep a mnemonic 824 trace of the behaviorally-relevant stimuli. Interestingly, this target-driven asymmetry in 825 the passive state came along with a lack of change in the spontaneous population 826 activity between passive and active state (Fig. 8fo). This observation is in agreement 827 with the hypothesis that the encoding of stimulus behavioral meaning is mediated by 828 an adjustment of spontaneous population activity, mostly operated in passive state 829 for this particular task.

831
In summary, we found that task-engagement induces a shift from sensory-832 driven to abstract, behavior-driven representations in the primary auditory cortex. 833 These abstract representations are encoded at a population, but not at a single-834 neuron level, and strikingly resemble abstract representations observed in higher-835 level cortices. These results suggest that the role of primary sensory cortices is not 836 limited to encoding sensory features. Instead, primary cortices appear to play an 837 active role in the task-driven transformation of stimuli into their behavioral meaning 838 and the translation of that meaning into task-appropriate motor actions.

880
The decision rule was reversed in the 2 animals, as low rates were Go stimuli for one animal 881 and No-Go for the second one. During each session, rates were kept identical, but were 882 changed from day to day.

883
Tone detect task -Aversive conditioning. The same two ferrets were trained on a tone detect 884 task previously described 26 . Briefly, a trial consisted of a sequence of 1 to 6 reference white

915
The pump was turned off 2 s after the end of the shock window. The learning criterion was 916 defined as DR>40% in three consecutive sessions of more than 100 trials.

918
Acoustic stimuli 919 All sounds were synthesized using a 44 kHz sampling rate, and presented through a free-920 field speaker that was equalized to achieve a flat gain. Behavior and stimulus presentation 921 were controlled by custom software written in Matlab (MathWorks).

922
Click rate discrimination task.

957
Recordings during the other tasks (frequency range discrimination and appetitive tone detect

982
For recordings performed with high-impedance tungsten electrodes (frequency range 983 discrimination and relative pitch tasks), single units were classified using principal 984 components analysis and k-means clustering followed by manual adjustment 26 .

986
Depth determination in the click rate discrimination task To study the contribution of reference and target trials to classifier performance, we projected 1103 population firing vectors at each time bin onto decoding vectors calculated during the sound 1104 and silence periods as defined above. Before projection, the mean spontaneous activity of 1105 each unit was subtracted from its firing rate throughout the whole trial. Deviations from 0 of 1106 the projection show activity deviating from spontaneous activity along the decoding axis.

1107
Controlling for lick-responsive neurons 1108 In order to control for the contribution of units directly linked with task-related motor activity to 1109 our results, we combined reconstruction and decoding methods to identify and remove lick-

1117
-A linear classifier (described in Linear discriminant classifier performance) was 1118 trained and tested using cross-validation to distinguish lick from non-lick events.

1119
-Reconstruction values and classification was also performed on random data

1130
-Only the units remaining after this procedure were used to re-analyze the data and 1131 verify that reliable classification and difference in projections of reference and tone 1132 trials did not rely on the difference in licking activity between the two trials.

1133
For the click rate discrimination task only a subset of sessions (15/18) had reliable