Distinct roles of cortical layer 5 subtypes in associative learning

Domain: biology
Published: 2026-03-20
Editorial outcome: major_revision

Abstract
Adaptive behavior relies on associating sensory cues with rewarding or aversive outcomes. In mammals, the primary sensory cortex processes stimuli and distributes information to cortical and subcortical targets. Layer 5 (L5) contains two major projection neuron classes, intratelencephalic (IT) and extratelencephalic (ET); however, their roles in associative learning remain unclear. Using transgenic mice, we identified IT and ET neurons in primary somatosensory cortex and tracked their activity with longitudinal two-photon imaging during Pavlovian conditioning with whisker stimulation. IT neurons stably encoded stimulus identity across training, whereas ET neurons showed dynamic changes that paralleled the emergence of anticipatory licking. Chemogenetic silencing of each subtype impaired learning in indistinct, phase-specific ways. A reinforcement-learning model reproduced these dynamics, suggesting that IT neurons provide stable sensory representations needed to form cue-reward associations, while ET neurons encode reward expectation to refine behavior. These findings reveal complementary, cell-type-specific contributions of L5 neurons to associative learning.

Introduction
Associative learning is essential for selecting appropriate behaviors by linking stimuli to different outcomes. The learning process consists of multiple components, including acquisition and refinement, and involves diverse neural circuits across the brain that function in concert1,2. Primary sensory cortical areas are crucial for first processing and analyzing sensory stimuli, but also for linking these stimuli to behaviorally relevant outcomes, such as rewards or threats3–6. During stimulus-reward associative learning, neurons in these areas alter their response patterns to stimuli based on their relevance to rewards3,7–9.

These learning-associated changes in neuronal activity are thought to be transmitted to other brain regions outside the sensory cortices. While recent studies have begun to elucidate the contribution to learning of cortical neurons projecting to distant brain regions5, little is known about the activity changes these projection neurons undergo during learning and their functional roles throughout the learning process.

Layer 5 (L5) serves as the main output layer of sensory cortices and consists of two major groups of outward projecting pyramidal neurons, intratelencephalic (IT) and extratelencephalic (ET) neurons. IT neurons project bilaterally to other cortical areas and the striatum, while ET neurons project predominantly to subcortical areas in the ipsilateral hemisphere, including the striatum, higher-order thalamic nuclei, midbrain and pons10–12. Recent advances in transgenic13 and retrograde-viral targeting14 technology have begun to shed light on the distinct contribution of each projection neuronal subtype to cortical function and information processing, such as sensory detection and discrimination4,5,15,16, decision making17, and movement control18–21. But as yet, the question still remains as to how IT and ET neurons contribute to learning.

The primary somatosensory cortex (S1) has been shown to engage in vibrotactile discrimination in humans22, primates23, and rodents24. In the present study, we sought to determine how the activity patterns of S1 L5 projection neuronal subtypes evolve during learning of vibrotactile discrimination, specifically in the context of stimulus-reward associations. To study the learning process, we designed an appetitive Pavlovian conditioning task, where head-restrained mice were trained to distinguish between two vibratory stimuli delivered to their whiskers with different frequencies, with one stimulus paired with a water reward and the other not. By leveraging transgenic mouse lines, we selectively targeted and tracked the activity of either L5 IT or ET neuronal populations in S1 during the learning process. Using in vivo two-photon imaging, we measured calcium activity in the apical dendritic trunks, which highly correlates with somatic activity of L5 pyramidal neurons25,26, and found distinct response patterns between IT and ET neurons to stimuli, along with changes in these patterns during learning. By chemogenetically silencing selective L5 subtypes, we found that both IT and ET neurons are critical for learning, with each subtype contributing to distinct aspects of the learning process. To further elucidate the specific roles of IT and ET neurons, based on their response properties, we developed a theoretical model inspired by classical reinforcement learning frameworks. The model suggests that IT neurons maintain internal representations of the sensory world that initiate the formation of stimulus-reward associations, whereas ET neurons contribute to the refinement of learned responses, enhancing discriminability between rewarding and non-rewarding stimuli.

Results
Whisker stimulus-reward associative learning depends on S1
To study reward-based associative learning in mice, we developed a Pavlovian trace conditioning task in which head-restrained mice were trained to associate one of two stimuli, i.e., a conditioned stimulus (CS+) vs. a non-conditioned stimulus (CS−), with water reward (Fig. 1a). The CS+ consisted of C2-whisker stimulation at 10 Hz for 1 s, followed by a short delay (trace interval; 0.5 s) before the delivery of a reward. For CS− trials, the same whisker was stimulated at 5 Hz with no reward. Over the course of daily training sessions, the mice gradually learned to discriminate between the two stimuli (Fig. 1b,c). Initially, they increased the frequency of anticipatory licking (i.e., licking from stimulus onset to the time of reward delivery) for both stimuli. With continued training, they developed a selective increase in anticipatory licking for the CS+, while licking to the CS− tended to decrease. The task performance, i.e., CS discriminability, was quantified as the area under a receiver operating characteristic curve (auROC) calculated on anticipatory licks in CS+ vs. CS− trials for each session (Fig. 1d)27,28. Within five days, 18 out of 20 mice reached a proficient level (auROC >0.7) to discriminate the stimuli (Fig. 1e).

Learning was not specific to the stimulus frequencies, as mice could successfully learn the task with the reversed CS contingency (5 Hz as CS+, 10 Hz as CS−; Fig. S1a).

To test whether our learning paradigm depends on S1, we pharmacologically inactivated it during training. Prior to each training session, muscimol, a GABA A-receptor agonist, was locally injected into the C2 barrel column of S1, contralaterally to the stimulated C2 whisker (Fig. 1f). Silencing S1 impaired learning as mice failed to develop anticipatory licking to the stimuli and poorly distinguished between CS+ and CS−, unlike control mice with intact S1 or saline injection (Fig. 1g,h). In contrast, silencing S1 in expert mice did not affect the behavioral performance, regardless of the CS contingency (Fig. 1i and Fig. S1b,c). Together, these results demonstrate that S1 activity facilitates learning of the task, but once the task is learned, S1 is not necessary for the expression of conditioned responses.

Baseline differences in stimulus and reward encoding between IT and ET neurons
To investigate the responses of S1 neurons to stimuli and rewards, and how they are modulated during learning, we used in vivo two-photon calcium imaging to monitor neuronal activity over time before, during and after learning. We focused on the two main long-range projection neurons in L5 of S1, IT and ET neurons. Two Cre-driver transgenic mouse lines, Tlx3-Cre and Sim1-Cre, were used to distinguish between IT and ET neurons, respectively (Fig. 2a)13. A Cre-dependent viral expression strategy yielded selective labeling of L5 IT neurons in Tlx3-Cre mice and ET neurons in Sim1-Cre mice, as previously reported (Fig. 2b)13,16,19,20.

Using these mouse lines, we expressed a genetically-encoded calcium indicator, jGCaMP8m29, in IT and ET neurons. To facilitate stable longitudinal recordings, we imaged apical dendritic trunks as a proxy for global activity as activities in apical trunks and somata have been shown to be highly correlated25,26. Imaging was performed from the same field of view (FOV) within the C2 barrel column across multiple days: a baseline session prior to training to assess stimulus- and reward-evoked responses independently, followed by five consecutive sessions during training. On average, the FOV (178.3 × 178.3 µm2) contained 56 IT neurons (34–83 neurons, n=5 mice) or 28 ET neurons (11–45 neurons, n=6 mice) (Fig. 2c).

We first examined the responses of IT and ET neurons to CS+ and CS− in naïve mice prior to training (Fig. 2d–g). A larger fraction of IT neurons responded to whisker stimuli compared to ET neurons (56.41% vs. 35.85%, n=273 IT neurons vs. 159 ET neurons; P=3.7 × 10−5, χ2=17.00; Fig. 2e,g). While subsets of IT neurons exhibited selectivity for either CS+ or CS−, a notable fraction of neurons responded to both stimuli (Fig. 2e). Smaller but comparable proportions of IT and ET neurons responded to water rewards delivered independently of whisker stimuli (15.26% vs. 18.47%, n=262 IT neurons vs. 157 ET neurons; P=0.39, χ2=0.73; Fig. 2e,g). To assess the reliability of stimulus encoding in each population, we performed a population-decoding analysis using a linear support vector machine (SVM). Decoders trained on IT neuronal responses reliably predicted stimulus identity on a trial-by-trial basis, whereas decoders trained on ET neuronal responses performed at chance level (Fig. 2h). The finding that some ET neurons show stimulus selectivity while population decoding remains poor indicates that ET population activity is sparse and unreliable at the single-trial level.

Together, these results reveal distinct baseline response profiles of IT and ET neurons in the naïve condition. IT neurons exhibited robust stimulus representations sufficient to reliably encode stimulus identity, whereas ET neurons responded to stimuli but did not distinguish between them. By contrast, reward responses were present in both populations, though in a smaller fraction of neurons.

IT population maintains robust stimulus coding during learning, while ET population acquires reward-expectation signals
To determine how IT and ET neuronal activity evolved during learning, we imaged the same mice across consecutive daily training sessions. Both Tlx3-Cre and Sim1-Cre transgenic mice learned the task at a comparable rate over 5 days (Fig. 3a). The response profile of IT neurons remained remarkably stable throughout learning (Fig. 3b,c). A large fraction of IT neurons was stimulus-responsive, and their activity was tightly time-locked to stimulus onset. Neither the fraction of stimulus-responsive neurons nor their response amplitudes changed during learning (Fig. S2a,b). As in naïve mice (Fig. 2e), most IT neurons responded to both CS+ and CS−, with a subset of neurons showing stimulus specificity (Fig. 3c and Fig. S2a). We assessed the stimulus encoding capacity of IT neurons using a population-decoding analysis with a linear SVM classifier. Stimulus identity (CS+ vs. CS−) was decoded throughout the trial using time-binned population activity (bin=0.5 s) across Days 1–5. Regardless of training day, decoding accuracy consistently rose sharply following stimulus presentation and remained high throughout the trial (Fig. 3d). We further tested whether IT population activity encoded licking behavior by performing SVM regression analysis to predict lick events throughout the trial. The decoder showed weak performance in predicting licking activity, including anticipatory licks during the stimulus and trace intervals, and this weak performance did not improve during learning (Fig. 3e).

In contrast to the stable, stimulus-locked responses of IT neurons, ET neurons underwent striking, learning-dependent changes. As training progressed, their activity during the stimulus and trace intervals ramped towards the expected moment of reward rather than locking to stimulus onset (Fig. 3f,g). Both the proportion of responsive ET neurons and their response amplitudes increased with learning, paralleling the emergence of anticipatory licking (Fig. 3g and Fig. S2c,d). Accordingly, SVM classifiers trained on ET population activity decoded the stimulus identity only weakly on Day 1, but decoding accuracy tended to improve as training advanced (Fig. 3h). This improvement was already evident relative to naïve mice (Fig. 2h), consistent with the animals beginning to acquire the task on Day 1 (Fig. 3a). Importantly, the same population became significantly effective at predicting anticipatory licking during the stimulus and trace intervals, consistent with idea that ET neurons track the emergence of reward anticipation (Fig. 3i).

Alternatively, these responses could simply reflect lick counts or motor execution30, though several observations argue against this interpretation. First, decoders trained solely on CS+ trials failed to predict the number of anticipatory licks (Fig. S3a), indicating that ET neurons do not represent individual lick events. Second, the onset of ET neuronal activity was not time-locked to the first lick across trials (Fig. S3b,c). Third, neurons active during anticipatory licking were not necessarily the same as those recruited during consummatory licking after reward delivery (Fig. S3d). Accordingly, decoders trained on anticipatory licks performed poorly when applied to consummatory licks, and vice versa (Fig. S3a). Together, these results strengthen the conclusion that ET activity is not a simple read out of licking but instead reflects a reward-expectation signal. In line with this, we interpret the improved SVM decoding of CS identity during learning not as a consequence of enhanced sensory responsiveness of ET neurons, which is weak in naïve mice (Fig. 2f–h), but rather as a read out of emerging behavioral performance through reward-expectation signals.

Collectively, these findings suggest that IT neurons provide stable sensory coding that changes little with learning, whereas ET neurons acquire a learning-dependent ramping signal consistent with reward expectation, not merely lick execution.

IT neurons preserve stable response patterns across days, while ET neurons undergo dynamic reorganization
To assess how single-neuronal activity changes with learning, we tracked neurons that could be reliably identified across all five daily imaging sessions. Across training, individual IT neurons displayed remarkably stable response patterns (Fig. 4a and Fig. S4a). From day-to-day, neurons that were already responsive to stimuli mostly remained responsive (Fig. 4b). Consistently, their stimulus selectivity on Day 1 closely matched that on Day 5 (Fig. 4c). Pearson correlations of session-averaged activity traces were consistently high across all pair of days and for both CS+ and CS− trials, confirming the stability of IT responses (Fig. 4d). Most IT neurons therefore maintained stable stimulus responses, although a small subset with baseline reward responses prior to training selectively increased their responses to CS+ during learning (Fig. S5).

In contrast, ET neurons exhibited marked day-to-day variability: response patterns shifted, new neurons were recruited, and previously responsive neurons often fell silent (Fig. 4e–g and Fig. S4b). These dynamics resulted in lower inter-day correlations, which nevertheless increased gradually across sessions, indicating that ET activity patterns became progressively more consistent with learning (Fig. 4h).

Together, these results suggest that individual IT neurons maintain stable, stimulus-locked activity patterns that are largely unaffected by learning, whereas individual ET neurons undergo dynamic reorganization that progressively stabilizes with learning.

Distinct contributions of IT and ET neurons to learning
The contrasting activity changes of IT and ET neurons during learning suggests a division of labor between these L5 neuronal subtypes in learning. To test this idea, we selectively silenced each subtype in the C2 barrel column. We injected a Cre-dependent viral vector encoding hM4Di, an inhibitory designer receptor exclusively activated by designer drug (DREADD), into Tlx3-Cre or Sim1-Cre mice (Fig. 5a,b)31. Prior to each training session, a DREADD ligand, clozapine-N-oxide (CNO), was systemically injected into the mice, thus selectively inhibiting the targeted neuron types. Silencing either IT or ET neurons markedly impaired acquisition of the task compared to control mice with intact S1 (Fig. 5c–e). This impairment was not due to off-target effects of CNO (Fig. S6a).

Closer inspection of anticipatory licking revealed divergent effects of chronic inactivation during training (Fig. 5f). Compared to control mice (Fig. 1c), silencing IT neurons led to an overall reduction in anticipatory lick rates for both CS+ and CS− (Fig. 5c), with a more pronounced decrease for CS+ (Fig. S6b), ultimately abolishing discrimination between the stimuli. In contrast, silencing ET neurons produced a marked increase in anticipatory licking to both CS+ and CS−, most prominently during the first two training days, and this elevation persisted across sessions (Fig. 5d). The effect was particularly strong for CS− (Fig. S6c), resulting in poorer discrimination relative to controls.

Chemogenetic inhibition of either neuron type in expert mice had no effect on performance (Fig. S6d–g), consistent with the lack of impact seen with global S1 inactivation by muscimol (Fig. 1i). Notably, ET neuronal silencing did not alter the learned pattern of licking (i.e., increased anticipatory licking to CS+ and reduced licking to CS−; Fig. S6f). Thus, the indiscriminate licking observed during training is not a general effect of ET silencing, but reflects a specific impairment of the learning mechanism needed to differentiate between conditioned stimuli.

Together, these results suggest distinct functional roles for IT and ET neurons in learning, where IT neurons are essential for forming the basic stimulus-reward association, whereas ET neurons are required to refine that association into accurate CS discrimination.

A reinforcement learning model reflecting L5 subnetworks captures learning dynamics
The differences in response properties in IT and ET neurons and their impact on learning imply distinct computational roles in learning stimulus-reward associations. To explore this further, we employed mathematical modeling to decipher their specific contributions. The Rescorla–Wagner (RW) model is a simple yet widely used reinforcement learning framework for understanding classical Pavlovian conditioning32. The basic principle of the RW model is to update the value function (i.e., association strength) for each conditioned stimulus by calculating the reward prediction error (RPE) through learning. We implemented an RW-type model within a neural network framework, in which the neural network was trained to predict the value of each stimulus type (CS+ vs. CS−) using an RW update rule, here referred to as “value-encoding network” (Fig. 6a). Next, we extended this model to incorporate three key features observed in our experimental results. First, IT neurons, which exhibited stable representations of stimuli before learning (Figs. 2, 3), were modeled as a neural network that was pretrained in an unsupervised learning task to reconstruct (see Methods) and remained unchanged during stimulus-reward training. After unsupervised training, the IT neural network developed representations that help differentiate between stimuli, thus helping the value-encoding network in predicting the reward values (Fig. 6a, left). Second, based on our experimental results showing that reward-predicting responses to stimuli evolve in ET neurons over learning (Fig. 3), we modeled ET neurons as relaying reward-predicting signals generated by the value-encoding network to an RPE calculation circuit (Fig. 6a, right). These signals are then compared with actual rewards, generating RPEs that update the value-encoding network during reward-based training. Lastly, since expert mice were able to perform the task without S1 (Fig. 1i and Fig. S1b,c), the learned associations (i.e., stimulus values) must therefore be stored in brain regions outside of S1. These regions should therefore also receive sensory input and are capable of executing learned responses independently of S1 during expert-level performance. To model this, the value-encoding network includes two input channels: “IT” and “non-S1” (Fig. 6a, left). Both channels independently transmit sensory information to predict stimulus values. This component of the model predicts that the IT channel is responsible for conveying richer stimulus representations coming from the IT network, while the non-S1 channel only conveys coarse stimulus representations (see Methods).

The model was trained to associate two distinct classes of artificial stimuli, representing CS+ and CS−, with the correct reward outcome. The predicted anticipatory lick rate was derived by linearly scaling the association strength, or value, of each stimulus. Comparison with experimental data showed that the model accurately reproduced the learning dynamics across conditions. Specifically, in the control condition, the model closely tracks the tendency in the experimental data for the initial rise in lick rates for both stimuli, followed by a divergence where CS+ licks continued to increase, and CS− licks declined (Fig. 6b). Analysis of the IT neural network in the model revealed that this early general increase could be attributed to the proximity of CS+ and CS− stimuli in the encoding space (Fig. 6c), suggesting that overlapping stimulus representations in IT neurons contribute to the general increase observed in the experiments (Fig. 5c). The model also captured the distinct learning dynamics observed when IT or ET neurons were blocked. Because in the model IT neurons are responsible for rich sensory encoding, blocking them resulted in a general slower learning for both stimuli (Fig. 6d). On the other hand, because ET neurons mediate the transmission of value for RPE computations blocking highlights the fast sensory learning mediated by IT neurons, but inability to correctly assign values to specific stimuli (Fig. 6e). Therefore, our model shows that comparing ET neuronal output against the actual reward outcome to generate a RPE is consistent with our data (Fig. 5d). Furthermore, it indicates the potential involvement of an RPE calculation circuit downstream of ET neurons. Finally, as expected, our model exhibits learning transfer, so that as learning progresses, the non-S1 input channel in the value-encoding network increasingly builds stimulus-reward associations, leading to a reduced reliance on the IT input channel. This aligns with our experimental observation that, at the expert level, neither IT nor ET neurons in S1 are required for task execution (Fig. 6f).

In conclusion, the model effectively captured the distinct contributions of IT and ET neurons to stimulus-reward learning and accurately mirrored experimental findings. These results highlight the complementary computational roles of IT and ET neurons, which fit within a classical associative learning model, where IT neurons provide representations of sensory stimuli to estimate stimulus value, and ET neurons relay this value to the prediction error regions for updating the value function.

Methods
Animals
Adult C57BL/6J wild-type mice (male and female) or Sim1-Cre (KJ18) (MMRRC, no. 031742-UCD) and Tlx3-Cre (PL56) (MMRRC, no. 041158-UCD) transgenic mice (>P60) were used. Mice were housed in groups of 2–4 mice per cage in a 12:12 reversed day-night cycle. All experiments were conducted following the guideline given by Landesamt für Gesundheit und Soziales Berlin (LAGeSo) and were approved by this authority (protocol number: G0278/16 and G0161/21).

Surgical procedures
During the surgery, mice were anesthetized with isoflurane (1.5–2.0% in O2) or ketamine (100 mg/kg)/xylazine (10 mg/kg) and kept on a thermal blanket. The skin was removed and the skull was carefully cleaned and scraped with a surgical scalpel. A light-weight head-post was fixed on the skull over the right hemisphere with light-curing adhesives and dental cement. To locate the C2 barrel column for viral injection and pharmacology, we performed intrinsic signal imaging. Mice were lightly anesthetized with isoflurane (0.8–1.5% in O2) during imaging. The C2 whisker was inserted into a small metal tube attached to an electromagnet-based actuator and deflected at 10 Hz. Imaging was performed through the intact skull, which was covered with lukewarm phosphate buffer solution (PBS, 0.1 M) and a small coverslip placed on top. Under red LED illumination, changes in reflectance were recorded with and without whisker stimulation, and the difference image was used to identify the C2 barrel column using custom-written LabView software. Both the baseline (no stimulation) and the stimulus period were set for 5.5 s.

For chemogenetic inhibition, AAV2/1-hSyn-DIO-hM4D(Gi)-mCherry (viral titer: 2.3 × 1013; Addgene, Product #44362) was injected through a glass pipette (tip diameter, 5–10 µm) into the contralateral (left) S1 (100 nL at 700-μm depth under the pia). The experiments started 3 weeks after viral injection. As a control viral vector, AAV9-EF1a-DIO-mCherry-WPRE3 (viral titer: 1.91 × 1012; The Viral Core Facility of the Charité-Universitätsmedizin Berlin) was used.

For in vivo two-photon calcium imaging, AAV2/1-syn-FLEX-jGCaMP8m-WPRE (viral titer: 5.0 × 1012; Addgene, Product #162378) was injected through a glass pipette (tip diameter, 5–10 µm) into the contralateral (left) C2 barrel column (100 nl at 700-μm depth under the pia). A 3-mm diameter craniotomy was made over the injected area, and the skull and dura were carefully removed. The craniotomy was sealed with a triple-layered glass coverslip (3 mm diameter for the two bottom layers and 4 mm diameter for the top layer) with cyanoacrylate glue and dental cement. Experiments started 3 weeks after viral injection.

Behavior
Mice were kept on a reversed light/dark cycle. Habituation of the mice to head restraint began a week after the head-post surgery. Head-restrained time on the first day was 5 min and then gradually increased each day until the mice sat calmly for an hour. Mice were water-restricted during habituation and subsequent periods of behavioral training.

Behavioral events (e.g., licking, whisker deflection, reward delivery) were monitored and controlled by a custom-written program running on a microcontroller board (Arduino). The C2 whisker was deflected by displacing a light metal tube (~3 mg) slid over the whisker using a magnetic coil placed underneath the animal. A sinusoidal current applied to the coil generated a local magnetic force that produced ~10–20° whisker deflections, about an order of magnitude above threshold stimuli50, ensuring the stimuli were well above the animals’ perceptual threshold. Mice were exposed to one of two different frequencies of whisker deflection, 10 and 5 Hz, with a duration of 1 s. The 10 Hz whisker deflection (CS+) was paired with a water reward (~5 µl), delivered through a lick port 0.5 s after the stimulus offset, while the 5 Hz whisker deflection (CS−) was not followed by any reward. Licking was detected by a piezo-electric device attached to the licking spout. The mice were allowed to lick at any time, and no punishments were given for any premature licking event. During CS+ trials, we frequently observed a brief pause in licking upon water delivery. This interruption may arise from the behavioral shift between anticipatory and consummatory licking, or from a technical limitation: the animal could lick the dispensed droplet without touching the spout, causing the piezo sensor to miss those licks. Each mouse received 100 trials of each stimulus type (200 trials in total, each trial having an inter-trial interval of 6–8 s), each session repeated for 5 days. The probability of receiving CS+ or CS− was 50% during each session.

For in vivo calcium imaging, there was a pre-training imaging session 1 day prior to training. This session was further separated into two blocks, one where mice were exposed to the stimuli only (without reward) and one where mice were given reward-alone (without stimuli).

Behavioral performance analysis
To assess the performance of the task, we used the anticipatory licking occurring from the stimulus onset to the time of the reward (1.5 s) to calculate the area under a receiver operating curve (auROC). The auROC score demonstrates how well the lick patterns in CS+ and CS− trials overlap across one session. The score ranges from 0 to 1 where auROC >0.5 indicates higher amount of anticipatory licks in the CS+ trials and auROC <0.5 indicates higher amount of anticipatory licks in the CS− trials. The initial 10% of trials were discarded from the analysis to avoid impulsive licking behavior by the mice at the beginning of each session. To compare behavioral performances across cohorts, we performed a two-way mixed ANOVA where we focused on the comparison between mouse groups.

In vivo pharmacology
Before every training session, the mice were lightly anesthetized with isoflurane (1.5–2.0% in O2). A very small craniotomy was made above the C2 barrel column, and muscimol (5 mM, Tocris) was injected at two depths (at depths of 700 and 350 µm, 100 nl each). The craniotomy was sealed with a silicone sealant (Kwik-Cast, World Precision Instruments). The mice were put back in their homecage to recover for 10 min before commencing the behavior. After the last training session of the pharmacology experiment, fluorescent muscimol (BODIPY TMR-X conjugate, Thermo Fisher Scientific) was injected into the same injection site (at depths of 700 and 350 µm, 100 nl each), and mice were perfused 30 min after the injection.

In vivo chemogenetics
The experiments started 3 weeks after viral injection of hM4Di. Before each session, mice were injected with CNO (5 mg/kg intraperitoneally, Tocris) under brief anesthesia with isoflurane and kept for 30 min in a homecage prior to behavioral testing.

Histology
Mice were anesthetized using isoflurane (1.5–2% in O2) and euthanized by an intraperitoneal injection of urethane (1.5 g/kg). Mice were perfused transcardially with 0.1 M PBS, followed by 4% paraformaldehyde (PFA) in PBS. After perfusion, brains were removed from the skull and postfixed in PFA overnight. The next day, brains were washed in PBS, transferred into a 30% sucrose solution in PBS, and left for 24–48 h for cryoprotection. For cryosectioning, brains were embedded in optimal cutting temperature compound. Coronal brain sections (70 μm) were washed twice in PBS for a minimum of 10 min each at room temperature before staining the nuclei were stained using DAPI (NucBlu Fixed Cell ReadyProbe Reagent, Thermo Fisher). After washing, sections were mounted on slides and coverslipped with Fluoromount-G mounting medium. Images were obtained using a fluorescent microscope (DMI4000B, Leica Microsystems).

Two-photon calcium imaging
Imaging from behaving mice was performed with a resonant-scanning two-photon microscope (Thorlabs) equipped with GaAsP photomultiplier tubes (Hamamatsu). jGCaMP8m was excited at 940 nm with a Ti:Sapphire laser (Mai Tai eHP Deep See, Spectra-Physics) and imaged through a 16×, 0.8 NA water-immersion objective (Nikon). Full-frame images (512 × 512 pixels; pixel size, 0.35 × 0.35 µm2) were acquired from the apical trunks of ET or IT neurons expressing jGCaMP8m at a depth from the pia of ~200 µm at 30 Hz using ScanImage 4.1 software (Vidrio Technologies).

Imaging data analysis
Motion correction of raw files and regions of interest (ROI) selection was performed using Suite2p51. Fluorescence change (ΔF/F0) was calculated for each trial where F0 was the average fluorescence during the trial baseline, i.e., during 0–1 s prior to stimulus onset. ROIs were considered stimulus-responsive if the time-averaged response during 1.5 s after stimulus onset significantly increased from the baseline activity during 1 s prior to stimulus onset (paired two-sided Wilcoxon signed rank test, alpha=0.01), and if their normalized ΔF/F0 response exceeded 0.05. For reward-alone trials, we compared the baseline activity to the mean activity during 1.5 s after reward delivery. To isolate pure stimulus responses and exclude any potential confound of licking, we excluded trials during the stimulus-only blocks in which the mice licked (IT neuronal recording: 0.17 ± 0.41 out of 25 trials; ET neuronal recording: 0.83 ± 1.17 out of 25 trials).

For visualization in traces and heatmaps, calcium traces were smoothed using a moving average of three frames for trial-averaged responses and seven frames for single trials.

For decoding analysis, we tested whether the conditioned stimulus (CS+ or CS−) on each trial could be classified from population neuronal activity using a linear support vector machine (SVM). Trials were binned in 500-ms windows, and decoding performance was evaluated separately for each bin. Decoders were trained and tested using five-fold cross-validation, with the random resampling of training and test sets repeated 100 times per bin. Performance was averaged across iterations. In addition, we assessed whether binned population activity could predict trial-by-trial lick counts using SVM regression. Decoder performance was quantified with five-fold cross-validated R² values, which range from infinitely negative (indicating poor decoding) to 1 (perfect decoding).

To quantify single-neuron selectivity for stimulus types (CS+ vs. CS−), we defined a selectivity index (SI):
SI = (AUC − 0.5) × 2
where AUC is the area under ROC curve computed from calcium responses of individual neurons between CS+ and CS− trials. SI values range from −1 to 1, with negative values indicating a preference for CS+, positive values indicating a preference for CS−, and 0 indicating no preference.

The stability of individual neuronal response was measured by performing a Pearson’s correlation coefficient (r) for each neuron across five training days. To assess both the stimulus response stability and reward response stability, trial average responses in the time window of 3 s from stimulus onset.

For hierarchical clustering (Fig. S3d), calcium traces were z-scored per neuron, and pairwise correlation distances (1 − Pearson’s r) were computed, and agglomerative hierarchical clustering was performed using Ward’s linkage.

Computational model
We designed a Rescorla–Wagner-type model32, which learned the value (association strength) of each stimulus (CS+ vs. CS−) over multiple trials.

We modeled the encoding of different stimulus values, i.e., association strengths, using a simple feedforward “value-encoding neural network” denoted as Vw with synaptic weights, w. This network consisted of a single linear hidden layer with 116 units where the network inputs were combined into a unified representation, which was then fed to an output layer with sigmoid activation. The value-encoding network, Vw, consisted of two distinct input channels: an S1 IT input channel, providing the IT neuronal representation of the current stimulus (i.e., CS+ or CS− stimuli) and a non-S1 input channel, providing a “raw” representation of the current stimulus independent of S1. At each trial t, the value-encoding network prediction for the current stimulus, xt, is defined as,
Vw(t) = Vw(htIT, ht non-S1)
where htIT denotes the IT representation of the current stimulus, xt, while ht non-S1 denotes the non-S1 representation of the same stimulus, xt. The IT representation, htIT, was obtained from a separate neural network, the IT network, which was pretrained with unsupervised learning (see below). Conversely, we assumed the non-S1 representation, ht non-S1, to be the “raw” representation of the stimulus, xt (i.e., ht non-S1 = xt). Note, the same non-S1 representation ht non-S1, was also used by a separate value-encoding sub-network to support S1-independent expert performance, as described below.

The value-encoding network adapted its synaptic weights, w, to predict the correct values, V, for CS+ and CS− stimuli based on the experienced reward outcomes. Following RW models, the value-encoding network synaptic weights were updated at each trial t as follows,
[Δw]t = α δt ∇w Vw
where δt denotes the reward prediction error (RPE) at trial t,
δt = R(xt) − Vw(htIT, ht non-S1)
Here, R denotes the reward for the current stimulus, xt. Note that we assumed the reward to be 1 for CS+ stimuli, while to be 0 for CS− stimuli, i.e., R(xt = CS+) = 1 and R(xt = CS−) = 0.

In summary, at each trial t, the value-encoding network, Vw, took the IT stimulus representation, htIT, as well as the non-S1 stimulus representation, ht non-S1, as inputs and was trained to predict the correct value, V(t), for the current stimulus, xt. Finally, the value-encoding network included a separate sub-network, which could predict the value of each stimulus exclusively based on the non-S1 representation, ht non-S1. During learning, this network was trained based on the S1 IT-dependent value predictions, Vw(htIT, ht non-S1), using a simple mean squared loss. In this way, at expert performance, the model could solve the task without requiring S1 IT stimulus representations.

IT network pretraining. The IT neural network consisted of a feedforward auto-encoder architecture with two encoder layers (with 50 units each), a bottleneck layer (with 15 units) and two decoder layers (with 50 units each). This IT network was pretrained via unsupervised learning, using a standard L2 loss between the original and the network-reconstructed stimuli52. The stimuli were generated by sampling from eight distinct 20-dimensional Gaussian distributions with distinct random means and equal isotropic covariances. Each Gaussian distribution represented a different stimulus type, such as a specific whisker stimulation frequency, with each sample representing a noisy representation of the corresponding stimulus type. Note, we used Gaussian distributions to represent different stimulus types rather than fixed values to account for noise in sensory processing. Two of the eight distinct types of stimuli were randomly selected to be used as CS+ and CS− stimuli in the stimulus-reward association task. Once the IT network was pretrained, its synaptic weights were fixed and did not change during the association task. The IT-dependent representation, htIT, for the current stimulus, x, was derived as the output of the second encoder layer.

IT and ET silencing. We modeled IT chemogenetic silencing by replacing the IT-dependent input, htIT, to the value-encoding network with zero-mean isotropic Gaussian noise. As a result, the value-encoding network could no longer exploit the IT-dependent stimulus representations to estimate the value of each stimulus. Similarly, we reproduced ET chemogenetic silencing by replacing the value predictions relayed by ET neurons with isotropic Gaussian noise. As a result, RPEs could no longer be estimated correctly.

IT representational overlap and learning performance. For the IT representational overlap analysis, we used the eight Gaussian distributions of stimuli that pretrained the IT network. Randomly pairing these distributions allowed us to assess how overlap between IT representations of stimulus pairs (CS+ vs. CS−) influences learning in the stimulus-reward association task. We computed the mean Euclidean distance between IT representations, htIT, across paired stimuli and measured learning performance as the difference in stimulus association strength (i.e., value prediction) between CS+ and CS− after Session 2, where a larger positive difference indicated better learning.

Statistics and reproducibility
No statistical method was used to predetermine sample size. Instead, the sample size was estimated based on the expected effect size based on similar studies (Takahashi et al., 2020; Benezra et al, 2024) and the current standard in mouse neuroscience studies. Poor data quality usually originates from movement artifacts during neuronal imaging of awake mice performing a behavior. Two-photon recordings with poor signal/data quality were excluded as assessed by visual inspection criteria. Experiments were performed independently in different mice, and statistics were performed across mice in most cases. Stimuli presentations were randomized, and mice were randomly selected for the different experimental groups. Although the experimenter can tell during recording whether IT or ET neurons were recorded, all recorded neurons were analyzed in the same way, and the same statistical tests were performed in both groups. The same applies to the behavioral analysis of all the animal groups. Thus, the measurements are not affected by the lack of blinding.

Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

Data availability
The data used in this study are available via Zenodo at https://doi.org/10.5281/zenodo.17720603. Source data are provided with this paper.

Code availability
The code used in this study are available via Zenodo at https://doi.org/10.5281/zenodo.17720603.

Peer review rounds
[{"round": 1, "reviewer_comments": {"reviewer_1": "The manuscript by Moberg et al. uses in vivo 2p imaging to examine the activity of layer 5 PNs in somatosensory cortex during learning and performance of a conditioned reward task. This work builds on earlier studies in both somatosensory and visual areas to explore heterogeneity of function among layer 5 subtypes -specifically ET and IT cells. Overall, the question is an interesting one, and this work certainly adds to our understanding of cortical cell type diversity. However, a number of issues reduced my enthusiasm for the manuscript in its present form.\n1. The behavioral data should be characterized in much more detail. It is insufficient to present only AUC values without giving the actual Correct Rate and False-positive Rate values.\n2. The neural data are very challenging to follow. First, the distinction between data in Figure 2 and Figure 3 (inside and outside the learning) are very hard to follow. As far as I can tell, these are the same animals, with data collected during a baseline (non-associative) period, during learning, and after learning (but where the stimuli and reward are again uncoupled). It would make far more sense to present these data together in a single figure, along a single time-axis, to understand how neuronal activity change during each stage.\nMoreover, there are statements such as \"responsiveness tended to decrease\". But does this refer to fraction of cells? Why isn't the response amplitude similarly measured? Indeed, Figure 2 seems to only address fraction of responsive cells, while Figure 3 also shows DF/F values. Also, why are data in Figure 2 given as pie charts, while in Figure 3 similar data are in bar plots? These organizational choices make the manuscript very difficult to follow.\n3. The argument that neural activity is not mostly driven by licking (Figure S2) are extremely unconvincing. It is well established that cortical activity leads motor activity in a variety of situations (see work from Churchland and Cardin Labs). The averaged data in Figure S2 simply suggest the same is true for S1 activity and licking. It would be far more compelling to show individual trials where the animal does not lick and demonstrate the S1 neural activity is unchanged.\n4. Relatedly, the SVM data are difficult to interpret. If neural responses largely reflect licking, it is completely unsurprising that one can predict stimulus type (since CS+ evokes licking and CS- does not). Moreover, given the different stimulus-evoked activity for the two cell types, it is also unsurprising that the SVM performs differently for ET and IT. It is also surprising the authors did not attempt to predict behavioral performance rather than stimulus type. It would be far more powerful to use false-positive and error trials to tease out whether the neural activity is actual following the stimulus type or the behavior.\n5. The interpretation of the chemogenetic data is unclear. Looking at Figure 5 and S5, it seems that ET silencing simply makes the animals lick more (increased anticipatory licking, increased false positive rate, decreased AUC). Again, more careful examination of correct/incorrect/false alarm trials would be helpful here.\n6. The computational modeling is of little added value. Essentially, the model recreates experimental data but does not add any testable hypotheses to distinguish between alternative mechanistic possibilities. There may be an infinite set of models that can recapitulate the data - showing one of them does not add to our understanding.\n7. The viral titer is not specified in the methods.", "reviewer_2": "In this manuscript, the authors present results from two-photon calcium imaging in subpopulations of S1 layer 5 neurons in a whisker stimulation trace conditioning paradigm. IT neurons stably encode stimulus identity and change very little with learning, whereas ET neuron responses to the CS stimuli and rewards undergo changes. While a large fraction of ET neurons already respond to rewards before learning, during the learning process, ET populations then increase their activity during the stimulus presentation of the CS+, reflecting the learned value (reward prediction) of the stimulus. A reinforcement learning model, combined with DREADD inhibition experiments, integrates the described findings of IT and ET neuron populations into a classical associative learning framework and creates predictions for how a circuit could use the characterized responses to form associations.\nIn summary, the study nicely identifies two circuit components that provide different information to an associative learning system. This approach of dissecting computations is very relevant, creates data that are valuable to the field and provides new entry points for future experiments to understand how brains learn stimulus-reward associations across distributed brain areas.\nIn its current state, the longitudinal imaging data is slightly underexplored, and since these chronic single neuron data are the strong suit of the presented study, it would be great to see a more detailed characterisation. Specifically, there seem to be two features to the change in ET neuron responses: 1) a shift earlier in time i.e. towards the reward predicting stimulus (from initial reward-related activity) and 2) also a selective increase in responses to CS+ over CS-. But the way the data are currently presented, it is hard to relate the two on the level of neuronal computations. By describing in more detail how response profiles of ET neurons change with learning (from initial reward responses to CS selectivity of individual neurons) a better understanding of the reward prediction calculation could be gained. Such an analysis could also be informed by doing a dropout analysis of the decoder (i.e. after learning, are any neurons particularly informative of the CS and, if so, how did their response profile change?).\nMinor comments\nRelating to muscimol inactivation of S1 (Fig 1f), it would be good to show not just auROC but also the lick rates to CS+ and CS- since there are two types of errors possible (indiscriminate licking to both CS or a lack of responsiveness to any CS).\nRelating to the passive sessions flanking the training, a more detailed description in the methods section/schematic is necessary (Fig 2c):\nWhat was the block structure that is mentioned?\nWas the lick spout present for the stimulus-only blocks, i.e. did the animal lick\nWas the pre-training passive session the first time that the animals experienced those stimuli and or rewards in the setup? -> this will influence adaptation of neural responses and therefore the interpretation of the results in Fig 2\nIs the sorting of neurons in Fig 4a and c different between the CS+ plots and the CS- plots? Along the lines of the main comment, it would be good to be able to visually relate how CS+ and CS- responses evolve in the same neurons (i.e. use the same sorting in an additional panel or compute CS selectivity directly and display that across days in heatmaps)", "reviewer_3": "In this article, Moberg et al. investigate the roles of cortical layer 5 subtypes in associative learning. By leveraging mouse genetics, calcium imaging, and neural manipulations, the authors come to the conclusion that intratelencephalic (IT; labeled with Tlx3-Cre) and extratelencephalic (ET; labeled with Sim1-Cre) layer 5 neurons in the barrel cortex exhibit distinct activity patterns during and play different roles in support of classical conditioning. Specifically, IT neurons have a relatively static representation of the CS+ and CS- stimuli over learning whereas ET neurons initially respond to rewards and then acquire a more robust response to the CS+ stimulus. Inhibition of either population throughout exposure to the task using Gi-coupled DREADDs disrupted learning with distinct effects on behavior. A simple computational reinforcement learning model incorporating key elements of the results recapitulates the dynamics of learning during Pavlovian conditioning.\nOverall, the writing and data presentation is clear (with a few areas for improvement noted below), the key conclusions and claims are largely supported, and the work meets the standards in our field. I think this manuscript contributes important information to our understanding of how cortical cell types contribute to associative learning.\nMajor concerns:\nGiven findings that performance decreases after barrel cortex inactivation during the detection of tactile stimuli (e.g., O’Connor et al. 2010; Hong et al., 2018), and those from the authors’ previous work indicates the detection threshold changes with inactivation of ET neurons (Takahashi et al., 2020), it is surprising that the muscimol injection in Figure 1g does not have any effect on performance in the present discrimination task. This dataset is small (N = 6 mice), variable, and likely underpowered. Increasing the sample size would lend more confidence to this finding.\nOn a related note, Figure S1 shows that the reversed contingency paradigm requires a much longer amount of training to reach criterion performance. Does expert performance on the reversed paradigm require S1 activity? Answering this question would yield additional insight into when S1 is and is not required for associative learning and meaningfully contribute to this somewhat contentious subject. Furthermore, if S1 is not required, this result would increase confidence that the Figure 6 model applies generally to classical conditioning rather than just to the stimuli that the authors chose.\nWhile the authors include a CNO-only test in wild-type animals (Figure S3), this control was not performed in the presence of a control viral vector (e.g., AAV2/1-hSyn-DIO-mCherry) injected into the C2 barrel cortex. It remains possible that an interaction between the CNO (and its metabolites at the 5 mg/kg dose), the surgical procedure, and viral expression could result in impaired learning. Doing this control in at least one of the Cre lines would strongly increase confidence in the DREADD-based silencing results.\nGiven the disproportionate numbers of males compared to females (45 vs. 9), there are likely many experiments that only include male animals. These experiments should be indicated throughout. It would be even better to include the numbers of male and female mice in each experiment. Without this information, it is difficult to determine whether both sexes are included in the key experiments that support the authors’ conclusions.\nMinor concerns:\nThroughout (see Figure 1b for example), there appears to be a pause in licking when the water is dispensed on CS+ trials. I assume this is due to a technical issue preventing licks from being detected with the piezo-electric device when water is dispensed. If so, please clarify in legend or methods. If not, what is the reason for this pause?\nWhy are there different numbers of neurons in Figures 2f & j (between stimulus & reward graphs). I understand that the stimuli and reward were given in separate blocks, but were they not done in the same session? If so, this should be clarified. If not, why not? If I understand correctly, each of the three heatmaps were sorted separately. It would be useful to see the CS- heatmap sorted with index generated by the response to CS+ to more fully illustrate the extent to which the neurons that respond to the CS+ are the same as the neurons that respond to the CS- and the relative response magnitudes.\nPlease describe intrinsic imaging and the analysis of intrinsic imaging data in more detail in methods section (e.g., what is the setup? what is the stimulus? what time periods were considered baseline and stimulus for analysis?).\nPost hoc statistical tests should only be performed when the initial test reveals a significant result. Please check Figure S3 legend.\nBecause IT neurons and ET neurons are inactivated throughout the training period, the text in lines 12 through 16 on page 11 is confusing. Please rephrase for clarity."}, "author_response": "Ref: NCOMMS-24-83466-T\n================== Point-by-Point Response to Reviewers ==================\nReviewer’s comments are in italic.\nOur answers are in blue.\nReviewer #1:\nThe manuscript by Moberg et al. uses in vivo 2p imaging to examine the activity of layer\ntask. This work builds on earlier studies in both somatosensory and visual areas to\nexplore heterogeneity of function among layer 5 subtypes -specifically ET and IT cells.\nOverall, the question is an interesting one, and this work certainly adds to our\nunderstanding of cortical cell type diversity. However, a number of issues reduced my\nenthusiasm for the manuscript in its present form.\n1. The behavioral data should be characterized in much more detail. It is insufficient to\npresent only AUC values without giving the actual Correct Rate and False-positive Rate\nvalues.\nWe thank the review for this comment. In this study, we used a classical (Pavlovian)\nappetitive conditioning paradigm in which the conditioned response is measured as a\ncontinuous variable, i.e., the number of anticipatory licks to each CS. Because licking is\nnot a binary outcome, categorical outcomes such as “correct” or “false-alarm” trials are\nless applicable. Following established practice (e.g., Otis et al., 2017; Namboodiri et al.,\n2019; Ruediger et al., 2020), we quantified differences in conditioned responses between\nCS+ and CS- using the area under the curve (AUC) of the licking behavior.\nTo provide a more comprehensive characterization of behavior, we have included lick\nrate plots for both CS+ and CS- conditions in Fig. 1c (the panel originally shown in Fig. 5f\nhas been moved to Fig. 1c).\n2. The neural data are very challenging to follow. First, the distinction between data in\nFigure 2 and Figure 3 (inside and outside the learning) are very hard to follow. As far as\nI can tell, these are the same animals, with data collected during a baseline (non-\nassociative) period, during learning, and after learning (but where the stimuli and reward\nare again uncoupled). It would make far more sense to present these data together in a\nsingle figure, along a single time-axis, to understand how neuronal activity change during\neach stage.\nMoreover, there are statements such as \"responsiveness tended to decrease\". But does\nthis refer to fraction of cells? Why isn't the response amplitude similarly measured?\nIndeed, Figure 2 seems to only address fraction of responsive cells, while Figure 3 also\nshows DF/F values. Also, why are data in Figure 2 given as pie charts, while in Figure 3\nsimilar data are in bar plots? These organizational choices make the manuscript very\ndifficult to follow.\nTo improve clarity,\n● We have reorganized the panels in Figs. 2 and 3 (e.g., moving the schematic of\nthe imaging schedule during training from Fig. 2c to Fig. 3a) and revised the text\nto better explain our experimental design (Page 7, Line 17 in Main; Page 42, Line\n10 in Methods).\n● We decided to remove a comparison between before and after learning in order to\nfocus on characterizing the responsiveness of IT and ET neurons in naive mice\n(before learning; Fig. 2) and during learning (Fig. 3).\n● We have clarified in the text that “responsiveness” refers to the fraction of neurons\nthat responded. To complement this, we have now added decoding analyses,\nwhich assess how reliably the population of IT or ET neurons encodes the stimulus\n(Fig. 2h).\n● We have also revised the data presentation in Fig. 3: we replaced the bar plots\nwith pie charts to ensure consistency with Fig. 2 and to facilitate comparison\nbetween the figures.\n3. The argument that neural activity is not mostly driven by licking (Figure S2) are\nextremely unconvincing. It is well established that cortical activity leads motor activity in\na variety of situations (see work from Churchland and Cardin Labs). The averaged data in\nFigure S2 simply suggest the same is true for S1 activity and licking. It would be far\nmore compelling to show individual trials where the animal does not lick and demonstrate\nthe S1 neural activity is unchanged.\nIn the original submission (Fig. S2, right panel) we included dF/F traces from trials in\nwhich mice did not show early lick responses. We observed that ET neurons were active\neven in the absence of licking, concluding “ET neuronal activity emerged with anticipatory\nlicking but did not merely reflect lick-related motor activity” (original submission, Page 9,\nLine 9) and “this activity is at least partially independent of the motor response” (original\nsubmission, Page 18, Line 1). Our intent was not to suggest that neural activity is\nunrelated to licking, but rather to highlight additional contributions beyond motor output.\nThat said, we agree with the reviewer that averaged traces alone are not fully persuasive.\nAs the reviewer suggested, the revised manuscript now includes single-trial examples in\nwhich ET responses do not align with lick onset (Fig. S3b). In addition, we performed two\nnew analyses:\n● Support vector regression (SVR) models trained solely on consummatory licks in\nCS+ trials failed to predict the number of anticipatory licks (Fig. S3a), indicating\nthat ET neurons do not represent individual lick events.\n● Neurons active during anticipatory licking were not necessarily the same as those\nrecruited during consummatory licking after reward delivery (Fig. S3a, d).\nThese findings reinforce our original conclusion that ET activity is not simply a lick motor\nread-out. The results are discussed in the result section (Page 9, Line 16) and the\ndiscussion section (Page 17, Line 21). Moreover, our chemogenetic silencing of ET\nneurons in S1 prevented mice from learning to discriminate between the two CSs,\nindicating a causal contribution to learning beyond the encoding of licking behavior.\n4. Relatedly, the SVM data are difficult to interpret. If neural responses largely reflect\nlicking, it is completely unsurprising that one can predict stimulus type (since CS+ evokes\nlicking and CS- does not). Moreover, given the different stimulus-evoked activity for the\ntwo cell types, it is also unsurprising that the SVM performs differently for ET and IT. It is\nalso surprising the authors did not attempt to predict behavioral performance rather than\nstimulus type. It would be far more powerful to use false-positive and error trials to tease\nout whether the neural activity is actual following the stimulus type or the behavior.\nWe thank the reviewer for their insightful suggestion regarding the decoding analysis.\nSince the conditioned response in our task was measured as a continuous variable (i.e.,\nanticipatory lick rate) rather than a categorical outcome, we performed SVR to assess\nwhether ET neuronal activity predicts anticipatory licking behavior (Otis et al., 2017).\nConsistent with our observation that ET activity evolved in parallel with the development\nof anticipatory licking, SVR performance significantly improved as learning progressed\n(Fig. 3i). Importantly, ET activity did not simply reflect lick counts (Fig. S3; also see our\nresponse to Comment #3), suggesting that it at least partially represents the decision to\nlick or reward expectation, rather than a direct lick motor command. Based on these\nresults, we have revised our interpretation of the SVM results decoding CS identity as\nfollows: “we interpret the improved SVM decoding of CS identity during learning not as a\nconsequence of enhanced sensory responsiveness of ET neurons, which is weak in naïve\nmice (Fig. 2f–h), but rather as a readout of emerging behavioral performance through\nreward expectation signals.” (Page 10. Line 3)\n5. The interpretation of the chemogenetic data is unclear. Looking at Figure 5 and S5, it\nseems that ET silencing simply makes the animals lick more (increased anticipatory\nlicking, increased false positive rate, decreased AUC). Again, more careful examination\nof correct/incorrect/false alarm trials would be helpful here.\nIt is correct that silencing ET neurons increased licking to both CS+ and CS- trials during\nlearning (Fig. 5d, f, S6b, c), resulting in reduced AUC (Fig. 5e). We interpret this as\nindicating that ET silencing prevents mice from learning to differentiate between CS+ and\nCS-, prompting mice to lick indiscriminately to both CSs. In contrast, in expert mice with\nestablished responses, ET silencing did not alter the learned pattern of licking (i.e.,\nincreased anticipatory licking to CS+ and reduced licking to CS-; Fig. S6f). Thus, the\nindiscriminate licking observed during training is not a general effect of ET silencing, but\nreflects a specific impairment of the learning mechanism needed to differentiate between\nconditioned stimuli. We clarified this point in the result section (Page 12, Line 3).\n6. The computational modeling is of little added value. Essentially, the model recreates\nexperimental data but does not add any testable hypotheses to distinguish between\nalternative mechanistic possibilities. There may be an infinite set of models that can\nrecapitulate the data - showing one of them does not add to our understanding.\nWe appreciate the reviewer’s critical feedback regarding the value of our computational\nmodel. We agree that a model’s true utility lies in its ability to generate testable\nhypotheses that provide insight into underlying mechanisms. Our circuit model is not\nintended as a mere recapitulation of the experimental data, but rather as a mechanistic\nproposal that integrates our empirical findings within the classical reinforcement learning\nframework.\nThe core contribution of our model is the explicit division of labor hypothesis it proposes:\nthat L5 IT neurons contribute to value estimation, while L5 ET neurons are crucial for\ntransmitting signals to compute reward prediction errors (RPEs), specifically negative\nRPEs. This specific functional distinction, which is a novel conceptualization, is directly\ntestable.\nAs we now clarify in the revised manuscript (Page 15, Line 25), a key prediction of our\nmodel is that directly manipulating CS representations encoded by IT neurons would\nspecifically alter the reward-predicting signal in ET neurons. Given our established ability\nto selectively modulate these neurons, this provides a feasible path for future research to\ndirectly test this prediction. Therefore, our model’s specific assumptions, that one\nsubpopulation handles sensory coding for value estimation and the other reward-\nexpectation signaling for computing RPEs, provide a predictive framework for\nunderstanding the distinct contributions of IT and ET neurons to learning.\n7. The viral titer is not specified in the methods.\nWe have added the titer information in the method section.\nReviewer #2:\nIn this manuscript, the authors present results from two-photon calcium imaging in\nsubpopulations of S1 layer 5 neurons in a whisker stimulation trace conditioning\nparadigm. IT neurons stably encode stimulus identity and change very little with learning,\nwhereas ET neuron responses to the CS stimuli and rewards undergo changes. While a\nlarge fraction of ET neurons already respond to rewards before learning, during the\nlearning process, ET populations then increase their activity during the stimulus\npresentation of the CS+, reflecting the learned value (reward prediction) of the stimulus.\nA reinforcement learning model, combined with DREADD inhibition experiments,\nintegrates the described findings of IT and ET neuron populations into a classical\nassociative learning framework and creates predictions for how a circuit could use the\ncharacterized responses to form associations.\nIn summary, the study nicely identifies two circuit components that provide different\ninformation to an associative learning system. This approach of dissecting computations\nis very relevant, creates data that are valuable to the field and provides new entry points\nfor future experiments to understand how brains learn stimulus-reward associations\nacross distributed brain areas.\nIn its current state, the longitudinal imaging data is slightly underexplored, and since these\nchronic single neuron data are the strong suit of the presented study, it would be great to\nsee a more detailed characterisation. Specifically, there seem to be two features to the\nchange in ET neuron responses: 1) a shift earlier in time i.e. towards the reward predicting\nstimulus (from initial reward-related activity) and 2) also a selective increase in responses\nto CS+ over CS-. But the way the data are currently presented, it is hard to relate the two\non the level of neuronal computations. By describing in more detail how response profiles\nof ET neurons change with learning (from initial reward responses to CS selectivity of\nindividual neurons) a better understanding of the reward prediction calculation could be\ngained. Such an analysis could also be informed by doing a dropout analysis of the\ndecoder (i.e. after learning, are any neurons particularly informative of the CS and, if so,\nhow did their response profile change?).\nWe thank the reviewer for pointing out that the longitudinal imaging data were\nunderexplored. We performed additional analyses to more fully leverage the power of\nacross-day tracking. In the revised manuscript, we now include:\n● A Sankey diagram illustrating how CS responsiveness of individual neurons\nchanges over days, providing a quantitative overview of neuronal dynamics across\nlearning (Fig. 4b, f).\n● An analysis of changes in CS selectivity at the single-cell level, comparing\nindividual neurons at the beginning and end of learning (Fig. 4c, g).\n● Across-day activity profiles of neurons initially responsive to reward, showing how\ntheir responses evolve with training (Fig. S5).\nThese additions clarify how neuronal coding evolves over time. We revised the main text\naccordingly.\nMinor comments\nRelating to muscimol inactivation of S1 (Fig 1f), it would be good to show not just auROC\nbut also the lick rates to CS+ and CS- since there are two types of errors possible\n(indiscriminate licking to both CS or a lack of responsiveness to any CS).\nThank you for the comment. We have now included lick rate plots for the muscimol\nexperiment (Fig. 1g), which shows limited responsiveness to any CS during learning,\nsimilar to the pattern we observed with IT neuronal inactivation in Fig. 5c.\nRelating to the passive sessions flanking the training, a more detailed description in the\nmethods section/schematic is necessary (Fig 2c):\nWhat was the block structure that is mentioned?\nThank you for spotting this. We reorganized the panels in Figs. 2 and 3, and revised the\ntext to better explain our experimental design (Page 42, Line 10).\nWas the lick spout present for the stimulus-only blocks, i.e. did the animal lick\nIn stimulus-only sessions, where stimulus was given without any rewards, the lick spout\nwas present to record any licking of the mouse. However, we excluded trials in which the\nanimal licked when analyzing the neuronal activity to exclude any potential confounds of\nlicking on the neuronal activity. We have added the following paragraph in the method\nsection: “To isolate pure stimulus responses and exclude any potential confound of\nlicking, we excluded trials during the stimulus-only blocks in which the mice licked (IT\nneuronal recording: 0.17 ± 0.41 out of 25 trials; ET neuronal recording: 0.83 ± 1.17 out of\n25 trials).” (Page 44, Line 22).\nWas the pre-training passive session the first time that the animals experienced those\nstimuli and or rewards in the setup? -> this will influence adaptation of neural responses\nand therefore the interpretation of the results in Fig 2\nDuring the pre-training stimulus-only sessions, this was the first time the animals were\nexposed to the two stimuli. However, the mice had been habituated to drinking water from\nthe lick spout for a few days prior to the start of the experiments, thus the lick spout was\nnot novel to them.\nIs the sorting of neurons in Fig 4a and c different between the CS+ plots and the CS-\nplots? Along the lines of the main comment, it would be good to be able to visually relate\nhow CS+ and CS- responses evolve in the same neurons (i.e. use the same sorting in an\nadditional panel or compute CS selectivity directly and display that across days in\nheatmaps)\nYes, the sorting orders were different — in the original submission, neurons in the CS+\nplots were sorted based on their response amplitudes to CS+, while neurons in the CS-\nplots were sorted based on their responses to CS-. We have clarified this point in the\nrevised text. Following the reviewer’s suggestion, we have now added new activity\nheatmaps for CS+ and CS- trials, in which neurons are sorted in the same order (Fig. S4).\nIn addition, we have included a new plot quantifying the CS selectivity of individual\nneurons, comparing these values between Day 1 and Day 5 (Fig. 4c, g).\nReviewer #3:\nIn this article, Moberg et al. investigate the roles of cortical layer 5 subtypes in associative\nlearning. By leveraging mouse genetics, calcium imaging, and neural manipulations, the\nauthors come to the conclusion that intratelencephalic (IT; labeled with Tlx3-Cre) and\nextratelencephalic (ET; labeled with Sim1-Cre) layer 5 neurons in the barrel cortex exhibit\ndistinct activity patterns during and play different roles in support of classical conditioning.\nSpecifically, IT neurons have a relatively static representation of the CS+ and CS- stimuli\nover learning whereas ET neurons initially respond to rewards and then acquire a more\nrobust response to the CS+ stimulus. Inhibition of either population throughout exposure\nto the task using Gi-coupled DREADDs disrupted learning with distinct effects on\nbehavior. A simple computational reinforcement learning model incorporating key\nelements of the results recapitulates the dynamics of learning during Pavlovian\nconditioning.\nOverall, the writing and data presentation is clear (with a few areas for improvement noted\nbelow), the key conclusions and claims are largely supported, and the work meets the\nstandards in our field. I think this manuscript contributes important information to our\nunderstanding of how cortical cell types contribute to associative learning.\nMajor concerns:\nGiven findings that performance decreases after barrel cortex inactivation during the\ndetection of tactile stimuli (e.g., O’Connor et al. 2010; Hong et al., 2018), and those from\nthe authors’ previous work indicates the detection threshold changes with inactivation of\nET neurons (Takahashi et al., 2020), it is surprising that the muscimol injection in Figure\n1g does not have any effect on performance in the present discrimination task. This\ndataset is small (N = 6 mice), variable, and likely underpowered. Increasing the sample\nsize would lend more confidence to this finding.\nIn our previous studies (Takahashi et al., 2016; 2020), we demonstrated that detection of\nnear-threshold whisker stimuli (~1-2° deflections) relies on S1 activity. However, we also\nfound that manipulations of S1 had little effect on detection when the stimuli were twice\nthe detection threshold. In the present study, we intentionally used much stronger whisker\nstimuli (~10-20°) — an order of magnitude larger than threshold stimuli — to ensure that\nthe stimuli were well above the animals’ perceptual threshold. Consistent with our earlier\nfindings, S1 inactivation did not affect conditioned responses to these high-intensity\nstimuli in expert mice. A similar result was reported in V1 (Ruediger et al., 2020). We now\nclarify this point in the method section (Page 41, Line 20).\nNevertheless, in response to the reviewer’s concern about sample size, we performed\nadditional muscimol inactivation experiments, increasing the sample size to n = 9 mice to\nimprove statistical power (Fig. 1i). These additional data confirmed our original conclusion\nthat performance in expert mice remained unaffected by S1 inactivation.\nOn a related note, Figure S1 shows that the reversed contingency paradigm requires a\nmuch longer amount of training to reach criterion performance. Does expert performance\non the reversed paradigm require S1 activity? Answering this question would yield\nadditional insight into when S1 is and is not required for associative learning and\nmeaningfully contribute to this somewhat contentious subject. Furthermore, if S1 is not\nrequired, this result would increase confidence that the Figure 6 model applies generally\nto classical conditioning rather than just to the stimuli that the authors chose.\nWe thank the reviewer for suggesting this experiment. We have now performed muscimol\ninactivation experiments in expert mice trained on the reversed paradigm. Consistent with\nthe results from the original paradigm, silencing S1 did not affect performance in expert\nanimals, supporting the general applicability of our findings and model to classical\nconditioning beyond the specific stimuli used. These new data have been added in Fig.\nS1c.\nWhile the authors include a CNO-only test in wild-type animals (Figure S3), this control\nwas not performed in the presence of a control viral vector (e.g., AAV2/1-hSyn-DIO-\nmCherry) injected into the C2 barrel cortex. It remains possible that an interaction\nbetween the CNO (and its metabolites at the 5 mg/kg dose), the surgical procedure, and\nviral expression could result in impaired learning. Doing this control in at least one of the\nCre lines would strongly increase confidence in the DREADD-based silencing results.\nTo address this concern, we performed additional experiments in which we tested the\neffect of CNO alone in mice injected with a control viral vector (AAV9-EF1a-DIO-mCherry)\ninto the C2 barrel cortex. These experiments were conducted in six Tlx3-Cre mice. The\nresults confirmed that CNO administration had no effect on learning in these control\nanimals, supporting the conclusion that the behavioral effects observed in our DREADD\nexperiments are not due to off-target effects of CNO or interactions with surgery or viral\nexpression. These new data have been added in Fig. S6a.\nGiven the disproportionate numbers of males compared to females (45 vs. 9), there are\nlikely many experiments that only include male animals. These experiments should be\nindicated throughout. It would be even better to include the numbers of male and female\nmice in each experiment. Without this information, it is difficult to determine whether both\nsexes are included in the key experiments that support the authors’ conclusions.\nWe have included this information in the section “Reporting for specific materials,\nsystems and methods” in the “Reporting Summary” file.\nMinor concerns:\nThroughout (see Figure 1b for example), there appears to be a pause in licking when the\nwater is dispensed on CS+ trials. I assume this is due to a technical issue preventing licks\nfrom being detected with the piezo-electric device when water is dispensed. If so, please\nclarify in legend or methods. If not, what is the reason for this pause?\nWe thank the reviewer for this observation. There is indeed a drop in lick frequency\nimmediately after the water droplet was given. We have clarified this in the method section\nas follows: “During CS+ trials, we frequently observed a brief pause in licking upon water\ndelivery. This interruption may arise from the behavioral shift between anticipatory and\nconsummatory licking, or from a technical limitation: the animal could lick the dispensed\ndroplet without touching the spout, causing the piezo sensor to miss those licks.” (Page\n42, Line 3).\nWhy are there different numbers of neurons in Figures 2f & j (between stimulus & reward\ngraphs). I understand that the stimuli and reward were given in separate blocks, but were\nthey not done in the same session? If so, this should be clarified. If not, why not?\nThe data from Fig. 2f, j are from two different blocks that were not necessarily from the\nsame sessions, thus the number of neurons differ as well. We have revised Fig. 2 and\nclarified the experiential procedure in the method section (Page 42, Line 10).\nIf I understand correctly, each of the three heatmaps were sorted separately. It would be\nuseful to see the CS- heatmap sorted with index generated by the response to CS+ to\nmore fully illustrate the extent to which the neurons that respond to the CS+ are the same\nas the neurons that respond to the CS- and the relative response magnitudes.\nWe have now added new heatmaps sorted with index generated by the response to CS+\n(Fig. S4).\nPlease describe intrinsic imaging and the analysis of intrinsic imaging data in more detail\nin methods section (e.g., what is the setup? what is the stimulus? what time periods were\nconsidered baseline and stimulus for analysis?).\nDetails of intrinsic imaging have been elaborated in the method section (Page 40, Line\n14).\nPost hoc statistical tests should only be performed when the initial test reveals a\nsignificant result. Please check Figure S3 legend.\nThank you for spotting this. We have removed the post-hoc statistical tests from the\nconcerning figure.\nBecause IT neurons and ET neurons are inactivated throughout the training period, the\ntext in lines 12 through 16 on page 11 is confusing. Please rephrase for clarity.\nWe have changed the text as follows: “Closer inspection of anticipatory licking revealed\ndivergent effects of chronic inactivation during training (Fig. 5f).” (Page 11, Line 17)\nReferences\n1. Otis, J.M., Namboodiri, V.M., Matan, A.M., Voets, E.S., Mohorn, E.P., Kosyk, O.,\nMcHenry, J.A., Robinson, J.E., Resendez, S.L., Rossi, M.A. & Stuber, G.D. Prefrontal\ncortex output circuits guide reward seeking through divergent cue encoding. Nature\n543, 103-107 (2017).\n2. Namboodiri, V.M.K., Otis, J.M., van Heeswijk, K., Voets, E.S., Alghorazi, R.A.,\nRodriguez-Romaguera, J., Mihalas, S. & Stuber, G.D. Single-cell activity tracking\nreveals that orbitofrontal neurons acquire and maintain a long-term memory to guide\nbehavioral adaptation. Nat Neurosci 22, 1110-1121 (2019).\n3. Ruediger, S. & Scanziani, M. Learning speed and detection sensitivity controlled by\ndistinct cortico-fugal neurons in visual cortex. eLife 9:e59247 (2020).\n4. Takahashi, N., Oertner, T.G., Hegemann, P. & Larkum, M.E. Active cortical dendrites\nmodulate perception. Science 354, 1587-1590 (2016).\n5. Takahashi, N., Ebner, C., Sigl-Glockner, J., Moberg, S., Nierwetberg, S. & Larkum,\nM.E. Active dendritic currents gate descending cortical outputs in perception. Nat\nNeurosci 23, 1277-1285 (2020)."}, {"round": 2, "reviewer_comments": {"reviewer_1": "The authors have done a nice job responding to my initial concerns. I think this work represents a valuale contribution to the field and have no further comments. I support publication.", "reviewer_2": "Thank you for addressing the points, overall the manuscript has improved considerably!\nEspecially the more detailed lick rate analyses and the consistent sorting of neuron heatmaps across time help a lot with the understanding of the paper.\nIn my opinion the manuscript is suitable for publication, but could still benefit from more detailed explanations/interpretations on the following questions:\nDecoding analysis\nHow do you explain the difference in CS decoding performance between IT and ET populations at the naive stage (2h)? It looks like the proportion between unselective and selective neurons is comparable in both populations and the average response curves to CS+ and CS- look equally distinguishable (2e,g)?\nHow do you explain the stark difference between ET decoding at naive (chance level, 2h) and at day1 (significantly above chance, 3h)?\nResponse variability in ET neurons (esp with respect to model implementation)\nHow does the brain use their signal reliably if their response profile changes so considerably across days (did you address this somehow in the model?, 4f, S5)\nHow do you explain that the proportion of CS selective cells goes down with learning (3g)?", "reviewer_3": "The revised manuscript and reporting summary thoroughly addresses all my original concerns and recommend that it be accepted for publication."}, "author_response": "Ref: NCOMMS-24-83466-T\n================== Point-by-Point Response to Reviewers ==================\nReviewer’s comments are in italic.\nOur answers are in blue.\nReviewer #1:\nThe authors have done a nice job responding to my initial concerns. I think this work\nrepresents a valuale contribution to the field and have no further comments. I support\npublication.\nWe thank the reviewer for their valuable and constructive comments during the previous\nrevision.\nReviewer #2:\nThank you for addressing the points, overall the manuscript has improved considerably!\nEspecially the more detailed lick rate analyses and the consistent sorting of neuron\nheatmaps across time help a lot with the understanding of the paper.\nIn my opinion the manuscript is suitable for publication, but could still benefit from more\ndetailed explanations/interpretations on the following questions:\nWe thank the reviewer for the positive assessment of our previously revised manuscript\nand for the additional questions. We have further revised the text to address these points\nin the new version of the manuscript.\nDecoding analysis\nHow do you explain the difference in CS decoding performance between IT and ET\npopulations at the naive stage (2h)? It looks like the proportion between unselective and\nselective neurons is comparable in both populations and the average response curves to\nCS+ and CS- look equally distinguishable (2e,g)?\nIn Fig. 2e,g, the proportion of selective neurons and their response profiles are quantified\nby averaging responses across trials within the session. This averaging makes IT and ET\npopulations appear similarly selective at the naive stage. However, the decoding analysis\noperates on single trials, assessing how well population activity can predict stimulus\nidentity on a trial-by-trial basis. This measure depends strongly on the reliability and\nconsistency of neuronal responses across trials, not just on the mean response profile.\nThus, the difference in decoding performance indicates that, in naive mice, IT neurons\nrespond to CSs more reliably across trials, whereas ET neurons show sparser and less\nconsistent responses, even though both populations exhibit comparable average\nselectivity when responses are trial-averaged.\nTo clarify this point, we have added the following sentence in the result section.\n“The finding that some ET neurons show stimulus selectivity while population decoding\nremains poor indicates that ET population activity is sparse and unreliable at the single-\ntrial level. (Page 8, Line 8)”\nHow do you explain the stark difference between ET decoding at naive (chance level, 2h)\nand at day1 (significantly above chance, 3h)?\nOn Day 1, animals already begin to discriminate CS+ from CS− (Fig. 1c-e, 3a). As ET\nneurons develop reward-expectation signals, their responses become more differentiated\nbetween CSs already on Day 1, leading to a sharp increase in decoding performance\ncompared to the naive stage.\nTo clarify this point, we have added the following sentence in the result section.\n“This improvement was already evident relative to naïve mice (Fig. 2h), consistent with\nthe animals beginning to acquire the task on Day 1 (Fig. 3a). (Page 9, Line 18)”\nResponse variability in ET neurons (esp with respect to model implementation)\nHow does the brain use their signal reliably if their response profile changes so\nconsiderably across days (did you address this somehow in the model?, 4f, S5)\nThank you for raising this important point. Although individual ET neurons show day-to-\nday variability in their response profiles, the population-level reward-expectation signal\nremains stable. We hypothesize that downstream circuits likely rely on the collective ET\nactivity, not on which specific ET neurons carry the signal. Thus, even if the contributing\nneurons change over days, the summed population output that encodes reward\nexpectation is preserved. This principle is also reflected in our model, which reads out\npopulation activity, not the identity of individual ET neurons.\nWe have added the following paragraph in the discussion section.\n“Although ET responses gradually stabilized across training, individual neurons showed\nsubstantial day-to-day variability in their response profiles. This variability suggests that\ndownstream circuits likely rely on the collective activity of the ET population rather than\non specific neurons. In this view, even if the subset of responsive ET neurons shifts across\ndays, the population-level signal representing reward expectation remains stable. Our\nmodel is consistent with this principle. Determining how downstream targets integrate this\npopulation signal will be an important direction for future work. (Page 19, Line 1)”\nHow do you explain that the proportion of CS selective cells goes down with learning\n(3g)?\nRelated to our response to Comment #1, the proportion of CS-selective neurons is based\non trial-averaged responses, which does not capture the trial-to-trial reliability of each ET\nneuron. Although the averaged selectivity appears to decrease, the decoding analysis\nshows a monotonic increase in ET population accuracy across learning (Fig. 3h). This\nindicates that, on a single-trial basis, ET population activity actually becomes more\nselective, even if this is not reflected in the proportion of selective cells defined by\naveraged responses.\nReviewer #3:\nThe revised manuscript and reporting summary thoroughly addresses all my original\nconcerns and recommend that it be accepted for publication.\nWe thank the reviewer for their valuable and constructive comments during the previous\nrevision."}]

Decision letter