Subjects and surgery

Adult male C57BL/6J mice (Jackson Laboratories) or Ai9 reporter mice (Cg-Gt(ROSA)26Sortm9(CAG-tdTomato)HzeIJ; Jackson Laboratories) were group housed (25–35 g; 6–8 weeks old) with littermates until surgery. For all experiments, mice underwent surgery during which they were anaesthetized with 0.8–1.5% isoflurane vaporized in pure oxygen (1 l min−1) and placed within a stereotactic frame (David Kopf Instruments). Ophthalmic ointment (Akorn) and a topical anaesthetic (2% lidocaine; Akorn) were applied during surgeries, and subcutaneous injections of sterile saline (0.9% NaCl in water) were administered to prevent dehydration. During surgeries, virus injections were administered unilaterally (for two-photon microscopy experiments) or bilaterally (for optogenetics or anatomical experiments) targeting dorsal medial PFC (specifically prelimbic cortex; 500 nl per side; relative to bregma: AP, +1.85 mm; ML, ±0.60 mm; DV, −2.50 mm), bilaterally targeting NAc (500 nl per side; relative to bregma: AP, +1.42 mm; ML ±0.73 mm; DV, −4.80 mm), and/or on the midline targeting PVT (300 nl; relative to bregma: AP, −1.46 mm; ML, −1.13 mm; DV, −3.30 mm; 20° angle). The UNC Vector Core packaged all viruses except canine adenovirus 2 encoding Cre (Cav2-Cre; Institut de Génétique Moléculaire de Montpellier). For two-photon imaging experiments, an optical cannula (Inscopix) was implanted above the PFC injection site (relative to bregma: AP, +1.85 mm; ML, −0.8 mm; DV, −2.2 mm; see ref. 29 for details of using similar surgical protocols for imaging experiments). For optogenetic experiments, custom-made optical fibres30 were implanted bilaterally approximately 0.5 mm above the PFC injection sites (relative to bregma: AP, +1.85 mm; ML, ±0.83 mm; DV, −1.93 mm; 10° angle). For experiments involving head-fixed behaviour, a custom-made ring (stainless steel; 5 mm ID, 11 mm OD) was attached to the skull during surgery to allow head fixation (see Fig. 1a). Following surgeries, mice received acetaminophen in their drinking water for two days, and were allowed to recover with access to food and water ad libitum for at least 21 days. After recovery, mice were water restricted (water bottles taken out of the cage), and 0.6 ml of water was delivered every day to a dish placed within each home cage. Behavioural experiments began when mice weighed less than 90% of free drinking weight (around 10 days for all experiments). To ensure good health and weight maintenance, mice were weighed and handled daily. This protocol resulted in weight stabilization between 85–90% of free-drinking weight during each experiment. No mouse was given more or less than 0.6 ml of water for weight concerns during water restriction procedures, nor did any health problems related to dehydration arise at any point from these protocols. All experimental procedures were performed in accordance with the Guide for the Care and Use of Laboratory Animals (National Institutes of Health), and were approved by the Institutional Animal Care and Use Committee at the University of North Carolina prior to experiments commencing.

Head-fixed behaviour

Following recovery from surgery, mice were habituated to head fixation for 3 days, during which unpredictable drops of sucrose (10% sucrose in water; 2.0–2.5 μl) were delivered intermittently for one hour (approximately 60 drops per hour) through a gravity-driven, solenoid-controlled lick tube. Once the mice displayed sufficient licking (>1,000 licks per session), they underwent Pavlovian conditioning. During each conditioning session, two cues (3 kHz pulsing or 12 kHz constant tones, 2 s, 70 dB) were randomly presented 50 times before the delivery of sucrose (CS+, 10% sucrose in water; 2.0–2.5 μl) or no sucrose (CS−), such that there was a one second trace interval between delivery of the CS+ and sucrose (see Fig. 1b). The cue contingencies were counterbalanced across cohorts of mice to ensure that mice acquired conditioned licking in response to either tone when paired with sucrose. The inter-trial interval between the previous reward delivery (CS+) or withholding time (CS−) and the next cue was chosen as a random sample from a uniform distribution bounded by 40 s and 80 s. Cue discrimination was quantified using the area under a receiver operating characteristic (auROC) formed by the number of baseline-subtracted licks during the CS+ versus CS− trace intervals. For both two-photon and optogenetic behavioural experiments, we classified sessions as ‘early’ or ‘late’ in learning, defined by both behavioural performance (early, auROC < 0.65; late, auROC > 0.66) and session number (early, sessions 1–5; late, sessions 7 or later). These criteria were used as post hoc analysis revealed that an auROC > 0.66 approximates high performance in a phase space formed by behavioural performance across sessions. Finally, behavioural data are displayed and analysed throughout the manuscript as the change in lick rate between each 3-s cue period and 1-s baseline period (baseline period is immediately before each cue). In addition, we show raw lick rates during both the cue and baseline periods for all imaging experiments (see Extended Data Fig. 1). Baseline lick rates remained relatively low across all experiments, and therefore for optogenetic studies only the change in lick rate is shown and analysed (see Figs 4, 5 and Extended Data Figs 8 and 9).

Two-photon microscopy

Experimental design. Two-photon microscopy was used to visualize activity dynamics of PFC neurons in vivo. A virus encoding the calcium indicator GCaMP6s18 (AAVdj-CaMK2a-GCaMP6s; 5.3 × 1012 infectious units per ml) was injected into PFC (see Subjects and surgery). For imaging projection-specific neurons, a virus encoding the Cre-dependent calcium indicator GCaMP6s (AAVdj-ef1α-DIO-GCaMP6s; 3.1 × 1012 infectious units per ml; from Karl Deisseroth) was injected into PFC, and the retrogradely transported canine adenovirus encoding Cre-recombinase31,32 was injected into either NAc or PVT (Cav2-Cre; 4.2 × 1012 infectious units per ml). After a minimum of 8 weeks to allow virus transport and infection, mice underwent Pavlovian conditioning, during which GCaMP6s-expressing neurons were visualized using two-photon microscopy.

Data acquisition, signal extraction, and analysis. A two-photon microscope (FVMPE-RS) was equipped with the following to allow imaging of PFC in vivo: a hybrid scanning core set with galvanometers and fast resonant scanners (allows up to 30 Hz frame-rate acquisition; set to 2.5 Hz), multi-alkali PMT and GaAsP-PMT photo detectors with adjustable voltage, gain, and offset features, a single green/red NDD filter cube, a long working distance 20× air objective designed for optical transmission at infrared wavelengths (Olympus, LCPLN20XIR, 0.45 NA, 8.3 mm WD), a software-controlled modular xy stage loaded on a manual z-deck, and a tunable Mai-Tai Deep See laser system (Spectra Physics, laser set to 955 nm, ~100 fs pulse width) with automated four-axis alignment. Before each conditioning session, a particular field of view (FOV) was selected by adjusting the imaging plane (z-axis), and each FOV was spaced at least 50 μm from one another to prevent visualization of the same cells across multiple FOVs. During each conditioning session, two-photon scanning was triggered for each trial 7 s before cue delivery, and a 20 s video was then collected for each trial. Data were both acquired and processed using a computer equipped with FluoView (Olympus, FV1200) and cellSens (Olympus) software packages. Following data acquisition, videos were motion corrected using a planar hidden Markov model (SIMA v1.3)33 and regions of interest (ROIs) were hand drawn around each cell using the standard deviation projection of the motion-corrected video using ImageJ. Next, calcium transient time series data were extracted with SIMA and analysed using custom Python data analysis pipelines written in the laboratory (by V.M.K.N.). For analysis, data were split into two groups (early and late) that were defined based on behavioural performance and the day of conditioning (see Head-fixed behaviour). Next, each recorded neuron was defined as having an excitatory response, inhibitory response, or no response. Significant responses represent significant two-tailed auROC comparing average fluorescence (Δf/f) of the trace interval (1 s after CS offset) versus baseline (1 s before CS onset) where P < 0.05 after Benjamini–Hochberg false discovery rate correction. Each P value for auROC was defined by calculating the P values for the corresponding Mann–Whitney U statistic. χ2 tests were then used to compare the number of CS+ responders to CS− responders for each group. For additional decoding analysis (for example, Fig. 2f, l), we tested whether the identity of the cue on any given trial could be decoded from the mean trace interval response on that trial using support vector machines. To this end, we used the Python module, scikitlearn, with GridSearchCV and a support vector classification (SVC) estimator with a radial basis function kernel, optimizing across the following parameters: γ: {10−2, 10−1, 100, 101, 102}, C: {10−2, 10−1, 100, 101, 102}. Quantification of performance was done using tenfold validation34. For each neuron, the highest accuracy score across these parameters was used as the metric of accuracy. In order to determine whether the population of accuracy scores across all neurons was significantly different from that expected by chance, we performed a single shuffle per neuron by randomizing the cue identity on every trial. The population of shuffled accuracy scores across one shuffle was then compared to the population of unshuffled accuracy scores using a two-tailed Welch’s t-test. Note that since the metric of accuracy was optimized across parameters, the mean accuracy score expected by chance is not 0.5, but is instead closer to 0.55 (Fig. 2f, l and Extended Data Fig. 4d). We also further tested whether the mean activity during the trace interval on a given trial for one neuron could be used to decode the number of licks in the trace interval. This was performed using support vector regression (SVR) in scikitlearn with GridSearchCV with a radial basis function kernel, optimizing across the following parameters: C: 5 logarithmically equidistant points between 10−3 and 103 {10−3, 3.16 × 10−2, 100, 3.16 × 102, 103}, ε: 5 logarithmically equidistant points between 10−3 and 103 {10−3, 3.16 × 10−2, 100, 3.16 × 102, 103}, γ: 10 logarithmically equidistant points between 10−6 and 106 {10−6, 2.15 × 10−5, 4.64 × 10−4, 10−2, 2.15 × 10−1, 4.64, 102, 2.15 × 103, 4.64 × 104, 106}. Quantification of performance was done using tenfold validation of the R2 metric (note that this metric can be infinitely negative, indicating arbitrarily poor performance, but is bounded on the positive end at 1, indicating perfect decoding). We found that as a population, the number of anticipatory licks during the trace interval could not be decoded in the late sessions in CaMK2a-expressing neurons (mean R2 = −1.21), PFC–NAc neurons (mean R2 = −0.92) or PFC–PVT neurons (mean R2 = −0.39). These negative numbers reflect the absence of a relationship between licking and calcium activity in each cell population.

Optogenetics

Behavioural optogenetics were performed as described in detail previously30. In brief, during surgery a virus encoding Cre-inducible channelrhodopsin-2 (AAV5-ef1α-DIO-hChR2(H134R)-eYFP; 5.0 × 1012 infectious units per ml), halorhodopsin (AAV5-ef1α-eNpHR3.0-eYFP; 8.0 × 1012 infectious units per ml), or control (AAV5-ef1α-eYFP; 6.0 × 1012 infectious units per ml) was injected into PFC; and Cav2-Cre (refs 31, 32) (4.2 × 1012 infectious units per ml) was injected into either NAc or PVT. After a minimum of 8 weeks to allow sufficient virus transport and infection, mice underwent Pavlovian conditioning.

For acquisition experiments (for example, Fig. 4), mice underwent eight daily conditioning sessions with laser followed by a test session (no laser). For photoactivation manipulations in ChR2 or control mice, the laser (473 nm; 8–10 mW) was turned on for 5-ms pulses (20 Hz) during 80% of the cue trials, starting at the cue onset and ending at the reward delivery. For photoinhibition manipulations in eNpHR3.0 or control mice, the laser (532 nm; 8–10 mW) did not pulse. Because the laser had no effect in the control mice, these data were collapsed across PFC–NAc and PFC–PVT groups. For expression experiments (for example, Fig. 5), after mice reached high performance criterion (late, auROC > 0.66), they underwent six daily conditioning sessions. Furthermore, every other session was selected for optogenetic manipulations, during which the laser was presented for 3 s during either the cue and trace interval or at random time epochs outside of cue or reward delivery. Because there was no effect of laser in the ChR2 or eNpHR3.0 control mice, these data were collapsed for PFC–NAc groups and PFC–PVT groups. In addition, for expression experiments subsets of control mice were used twice, once as ChR2 controls (blue light), and again as eNpHR3.0 controls (green light). Following experiments, histological verification of fluorescence and optical fibre placements were performed as described previously35.

Behavioural data (change in lick rate, see above) was analysed based on a priori comparisons of interest (effect of laser on ChR2/eNpHR3.0 animals versus effect of laser in eYFP animals). For acquisition experiments (Fig. 4; Extended Data Fig. 8a–f), we analysed data from the no-laser test day only, and specifically compared the change in lick rate between the ChR2 or eNpHR3.0 groups versus the eYFP group. To correct for the double comparison (ChR2 or eNpHR3.0 versus eYFP), we performed a Benjamini–Hochberg multiple comparisons correction. For expression experiments (Fig. 5; Extended Data Figs 8 g–l and 9), in each pair of sessions (no laser, laser) we calculated the difference in mean lick rate between the two in order to obtain a statistical measure of the ‘effect of laser’ per session pair. Next, we compared the effects of laser from the ChR2 or eNpHR3.0 groups versus the corresponding effect of laser in the eYFP group. To correct for the double comparison (ChR2 or eNpHR3.0 versus eYFP), we again performed a Benjamini–Hochberg multiple comparisons correction. Considering this, for optogenetic experiments all P values (which are two-tailed throughout the manuscript) have been corrected for multiple comparisons.

Retrograde tracing

The anatomy and electrophysiological properties of PFC–NAc and PFC–PVT neurons were evaluated through retrograde tracing36. Specifically, during surgeries the retrograde tracer cholera toxin subunit B conjugated to Alexa Fluor (CtB-488, CtB-594; Molecular Probes) was injected bilaterally into NAc (500 nl per side) and on the midline in PVT (300 nl; colour counterbalanced across mice). Ten days following surgery, animals were killed for histology (n = 3 mice) or slice electrophysiology (n = 3 mice). For anatomical experiments, a student blind to all experiments (E.P.M.) and conditions counted the number of CtB-488 positive, CtB-594 positive, and double-positive neurons in prelimbic medial prefrontal cortex (a subregion of dorsal medial PFC). The distance of each cell from the midline and the layer specificity of each cell were then measured using ImageJ. For electrophysiological experiments, mice were euthanized ten days following surgery for patch-clamp recordings ex vivo (see below for details).

Rabies tracing

The monosynaptic afferents to PFC–NAc and PFC–PVT neurons were identified using a glycoprotein-deleted rabies strategy37 in combination with Cav2-Cre targeting of projection-specific neuron populations. Specifically, during the first surgery a cocktail containing the Cre-dependent starter viruses encoding the G-protein and TVA were injected into PFC (3:1 of AAV5-FLEX-RG and AAV5-FLEX-TVA-mCherry; 300 nl per side), and Cav2-Cre was injected into either NAc (500 nl per side) or PVT (300 nl). Five weeks later, mice were given a second surgery in which the G-deleted rabies virus was injected into PFC (1:5 diluted EnvA-rabies-GFP). Finally, 8 days after the rabies injection each mouse (n = 3 per group) was euthanized for histology and cell quantification. Our rabies protocol led to sparse labelling of PFC-projection neurons, allowing quantification of individual cells in each brain section (40 μm thick). Each ROI was selected based on previous PFC tracing experiments38, as well as the fluorescence intensity observed in our experiments. Next, out of all tissue collected for each ROI in each mouse, we selected the three sections containing the most cells per region, and used confocal microscopy to get cellular-resolution images of all cells in each of those sections. For each section, we quantified all individual input neurons (GFP+) and starter cells (both GFP+ and mCherry+). Considering that the anterior cingulate cortex (ACC) was close to the PFC injection site, some sections containing ACC also had starter cell labelling. Thus, because we were interested in long-range inputs from ACC only, only sections that did not have mCherry labelling were used for ACC input quantification. Finally, rabies-tracing data were analysed by comparing the number of cells in each section across groups (raw neuron count), and by comparing the percentage of input neurons per starter cell for each particular mouse.

Patch-clamp electrophysiology

Mice were anaesthetized with pentobarbital (50 mg kg−1) before transcardial perfusion with ice-cold sucrose cutting solution containing the following (in mM): 225 sucrose, 119 NaCl, 1.0 NaH 2 PO 4 , 4.9 MgCl 2 , 0.1 CaCl 2 , 26.2 NaHCO 3 , 1.25 glucose, 305 mOsm. Brains were then rapidly removed, and coronal sections 300 μm thick were made using a vibratome (Leica, VT 1200). Sections were then incubated in aCSF (32 °C) containing the following (in mM): 119 NaCl, 2.5 KCl, 1.0 NaH 2 PO 4 , 1.3 MgCl, 2.5 CaCl 2 , 26.2 NaHCO 3 , 15 glucose, approximately 306 mOsm. After an hour of recovery, slices were constantly perfused with aCSF (32 °C) and visualized using differential interference contrast through a 40× water-immersion objective mounted on an upright microscope (Olympus BX51WI). Whole-cell recordings were obtained using borosilicate pipettes (3–5 MΩ) back-filled with internal solution containing the following (in mM): 130 K gluconate, 10 KCl, 10 HEPES, 10 EGTA, 2 MgCl 2 , 2 ATP, 0.2 GTP (pH 7.35, 270–285 mOsm).

Current-clamp recordings were obtained from GCaMP6s-expressing neurons to identify how action potential frequency correlated with GCaMP6s fluorescence. Specifically, to determine how elevations in action potential frequency influence GCaMP6s fluorescence, a 1 s train of depolarizing pulses (2 nA, 2 ms) was applied at a frequency of 1, 2, 5, 10 or 20 Hz. To determine how attenuations in action potential frequency influence GCaMP6s fluorescence, a 3 s pause was applied after a 10 s baseline train of depolarizing pulses (2 nA, 2 ms; 1, 2, 5, 10 or 20 Hz). Finally, to determine if hyperpolarization influences GCaMP6s fluorescence in the absence of action potential frequency modulation, a 3 s hyperpolarizing step (150 pA) was applied in neurons that were held either below or above resting membrane potential. During electrophysiological recordings, GCaMP6s fluorescence dynamics were visualized using a mercury lamp (Olympus, U-RFL-T) and microscope-mounted camera (QImaging, optiMOS). Imaging data were acquired using Micro-Manager, and extracted through hand-drawn ROIs for each recorded neuron using ImageJ.

Current-clamp recordings were also obtained to identify the intrinsic properties of PFC–NAc and PFC–PVT neurons in retrograde tracing experiments, as previously described39. First, action potential firing was examined by applying a series of long depolarizing sweeps (800 ms) at +25 pA steps (0–450 pA). Next, rheobase (the minimum amount of current required for an action potential to fire) was measured by applying a series of short depolarizing sweeps (50 ms) at +10 pA steps (starting at 0 pA) until the recorded neuron fired an action potential. For all patch-clamp experiments, data acquisition occurred at 1 kHz sampling rate through a MultiClamp 700B amplifier connected to a Digidata 1440A digitizer (Molecular Devices). Data were analysed using Clampfit 10.3 (Molecular Devices).

Data collection

The nature of all imaging and behavioural experiments yields high-power datasets, as we can test responses to reward-predictive cues hundreds of times within a single session. Thus, although the experiments themselves require rigorous experimentation, the number of mice that are required for each experiment is generally 3–6 per group, depending on the effect size (which was not predetermined for these experiments). Mice were randomly picked for each group in each experiment, by alternating the surgery for each mouse in a cage. During data collection, investigators were only blind to the conditions for rabies tracing cell counting and CtB cell counting. The only mice excluded from final analysis were those that died before or during the experiments (n = 3). For optogenetic experiments, mice were excluded if histology confirmed ectopic virus expression outside of PFC (n = 1), or if optical-fibre placements were not in dorsomedial PFC (n = 0). For data analysis, equal variance was not assumed for behavioural optogenetics or imaging datasets. Equal variance was assumed for cell counting experiments and electrophysiological experiments.

Code and data availability

We used Python (codes written by V.M.K.N.) to analyse imaging and optogenetic datasets included in this manuscript (see Figs 1, 2, 3, 4, 5). That data, as well as the codes used for analysis, are openly available online (https://github.com/stuberlab). All other data are available upon request from the corresponding author.