OTD1 and OTD2 primarily project to the lateral portion of the VP.

(A) Schematic representation of Cre-dependent anterograde axonal AAV tracing experiments used to characterize outputs of OT neurons. Drd1+ and Drd2+ neurons were separately labeled by using Drd1-Cre and Adora2a-Cre mouse lines, respectively. (B) Representative images from OTD1 (top) vs. the AcbShD1 injection (bot). Target sites (far-left column) are stained with ⍺-tyrosine hydroxylase antibodies to visualize the boundary between VP and OT. (C) Quantifying the % of output regions with fluorescence (n=3-4). (D) Schematic representation of 2-color retrograde CTB tracing experiment used to confirm OT to VP connectivity. CTB::488 and CTB::543 were injected to the lateral and medial portion of the VP, respectively. (E) Representative images of CTB labeled neurons in the OT and Acb. (F) The number of labeled cells was quantified (n=4). (G) Schematic representation of retrograde CTB tracing experiment used to test OT to VTA connectivity. CTB::647 was injected in the VTA. (H) Representative image shows robust AcbSh and AcbC labeling but no OT labeling. (I) Quantification of labeling in different nuclei (n=3). Pairwise comparisons were done using the Student’s t-test. The p-values were corrected for FDR by Benjamini-Hocherg procedure. ***p<0.001, **p<0.01, *p<0.05. See Tables S1-S3 for detailed statistics.

Head-fixed 2-photon Ca2+ imaging of OTD1, OTD2, or VP neurons during 6-odor conditioning paradigm.

(A) State-diagram of odor conditioning paradigm. Each trial begins with 2 seconds of odor delivery. Odors are chosen in pseudorandomized order such that the same odor is not repeated more than twice in a row. At the end of odor delivery, there is a variable delay (100-300ms), after which the animal is given either a 10% sucrose solution (SK and ST), a 70 psi airpuff (PK and PT), or nothing (XK and XT). Trials are separated by a variable intertrial interval (ITI; 12-18s). Schematic representation of (B) lens implant surgery and (C) headfix 2-photon microscopy setup. An example of spatial (D) and temporal (E) components extracted by CNMF from Drd1-Cre animal on day 3 of imaging. (D) The spatial footprints of 20 example neurons are shown on top of a maximum-correlation pixel image that was used to seed the factorization. The number displayed over each neuron matches the row number of the temporal components in (E). (F) An example raster plot (top) and averaged-across-trials trace (bottom) of the licking behavior recorded concurrently as (D) and (E). The timing of odor delivery is shown as shaded rectangles. The timing of US delivery is shown as arrowheads. (G) The mean total licks during each of the odors is shown averaged across all animals (n=17) after application of a moving-average filter with a window size of 10 trials. Red line marks the sucrose and airpuff contingency switch between day 3 and day 4. (H) Bar graph showing the licks during either sucrose cue expressed as a fraction of all licks during any odor. FWER-adjusted statistical significance for post hoc comparisons are shown as: ***p<0.001, **p<0.01, *p<0.05. See Tables S4-5 for detailed statistics.

VP neurons encode reward-contingency more robustly than OTD1 or OTD2 neurons.

(A) Heatmap of odor-evoked activities in OTD1, OTD2, and VP neurons from day 6 of imaging. The fluorescence measurements from each neuron were averaged over trials, Z-scored, then pooled for hierarchical clustering. Neurons are grouped by similarity, with the dendrogram shown on the right and a raster plot on the left indicating which region a given neuron is from. Horizontal white lines demarcate the boundaries between the 6 clusters. Odor delivered at 0-2 seconds marked by vertical red lines and US delivery is marked by arrowheads. From left to right, the columns represent neural responses to sucrose-paired ketone and terpene, control ketone and terpene, and airpuff-paired ketone and terpene (SK, ST, XK, XT, PK, PT). (B) Average Z-scored activity of each cluster to each of the 6 odors on day 6 of imaging. Yellow bar indicates 2-seconds of odor exposure. (C) The distribution of clusters by population. (D) Percentage of total neurons that were significantly excited or inhibited by each odor (Bonferroni-adjusted FDR < 0.05) as a function of time relative to odor. Lines represent the mean across biological replicates and the shaded area reflects the mean ± SEM. (E) Bar graph showing % of neurons from each population that are responsive to both sucrose-paired odors in the same direction (left), responsive to only a single odor (middle), or responsive to at least 3 odors (right). Bars represent the mean across biological replicates and x’s mark individual animals. (F) Scatterplot comparing the magnitudes of SK responses (ΔΔSK) to ST responses (ΔΔST). The dotted line represents the hypothetical scenario where ΔΔSK = ΔΔST. For each population, the R2 value of the 2-d distribution compared to the ΔΔSK = ΔΔST line is reported. (G) Same as F but comparing ΔΔSK to ΔΔXK. (H) Lineplot showing the % of neurons from each population where the difference between ΔΔSK and ΔΔXK is lower than that between ΔΔSK and ΔΔST. (I) Bargraph showing % of neurons whose responses to {SK vs. XK} can be discriminated by a linear classifier with auROC>0.75. (J) Same as (I) but for {SK vs PK}. (K) Same as (I) but for {SK vs ST}. (L) Schematic representation of 4 possible categories for a joint-distribution of {SK vs. XK} and {SK vs. ST} auROC values. Identity-encoding neurons could be in any quadrant other than the bottom-left whereas valence-encoding neurons should be in the bottom-right quadrant. (M) Scatterplot of each neuron’s auROC value for {SK vs. XK} on the x-axis and {SK vs. ST} on the y-axis on days 1, 3 and 6 of imaging. (N) Stacked bar graph showing the distribution of neurons from each population that fall into each of the 4 quadrants across the 3 different imaging days. FWER-adjusted statistical significance for post hoc comparisons are shown as: ***p<0.001, **p<0.01, *p<0.05, n.s. p>0.05. See Tables S6-17 for detailed statistics.

Sucrose responsive VP neurons become sucrose-cue responsive after pairing.

(A) The spatial footprints of 15 neurons from day 1 are outlined over a max-correlation projection image. (B) Heatmap of averaged-over-trials ΔF/F in response to 6 odors on day 1. Odor delivery period is shown with 2 red vertical lines and sucrose/airpuff timing is shown with downward arrowhead. (C) An example neuron’s responses on day 1 across 30 trials to 6 different odors. Individual trial traces are shown in light gray whereas the averaged-across trials trace is shown in black. Odor delivery period is depicted as shaded rectangles and US delivery is marked by arrowheads. (D-F) Same as (A-C), respectively, but for day 3. (G) Percentage of all tracked neurons that were both sucrose-responsive on day 1 and odor-responsive in the same direction on day 3. (H) Scatter plot of averaged-over-trials responses to SK or ST on day 1 (x-axis) and day 3 (y-axis). Each point is a neuron that was successfully matched from day 1 and day 3. Neurons from OTD2, OTD1, and VP are plotted as pink circles, blue crosses, and yellow squares, respectively. Neurons that have increased response magnitudes on day 3 would fall between the 2 dotted lines. (I) Violin plot showing the distributions of day 3 responsive magnitude – day 1 response magnitude. Black asterisks show statistical significance of pairwise comparisons and red asterisks show statistical significance for one-sample t-tests. Pairwise comparisons were done using the Student’s t-test. The p-values were corrected for FDR by Benjamini-Hocherg procedure. ***p<0.001, **p<0.01, *p<0.05, n.s. p>0.05. See Tables S18-19 for detailed statistics.

OT encodes odor identity in high-dimensional space and VP encodes reward-contingency in low-dimensional space.

(A) Average normalized pairwise Euclidean distance between odor-evoked population-level activity from day 6 of imaging shown as a function of time relative to odor delivery. Traces show the average value across biological replicates of the same population and the shaded areas represent the average ± SEM. (B) A heatmap of the average normalized pairwise distance during the odor delivery period. (C) Average CV accuracy of binary pairwise linear classifiers trained on population data plotted against time relative to odor delivery. (D). A heatmap of the average CV accuracy during the odor delivery period. (E) Schematic representation of generalized linear classification performance for an idealized valence encoder. Each row corresponds to the training odor-pair and each column corresponds to the testing odor-pair. For an idealized valence encoder, the decodability would generalize well across odor-pairs of the equal valence grouping outlined in red. Note that the elements along the diagonal are cases where training and testing odor-pairs are identical and do not reflect generalizability. (F) Heatmap representing the maximum generalized linear classification accuracy during odor delivery period averaged across biological replicates for each population. (G) Mean cross-validated linear classifier accuracy for S-cue vs. control or puff-cue classification and the generalized accuracy for S-cue vs. control or puff-cue classification after training on a different pair. Bar represents the mean across biological replicates and x’s mark accuracy values for individual animals. (H) Average PR normalized to n calculated after randomly subsampling an increasing number of neurons. (I) Average PR calculated after subsampling 15 neurons. (J) Average CV accuracy of linear classifiers trained on {SK vs. PK} plotted against number of principal components used for training. For each simultaneously imaged group of neurons, 15 neurons were subsampled and classifiers were trained on an increasing number of principal components. Thinner faded lines show mean accuracy across subsampling for individual animals. Markers represent the mean across biological replicates. Error bars indicate SEM across biological replicates. (K) Average CV accuracy of linear classifiers trained on {SK vs. ST}. (L) Comparison of the average accuracy of {SK vs. PK} classifiers trained on the 1st PC vs. {SK vs. ST} classifiers trained on all 15 PC’s. FWER-adjusted statistical significance for post hoc comparisons are shown as: ***p<0.001, **p<0.01, *p<0.05, n.s. p>0.05. See Tables S20-29 for detailed statistics.

Separate VP populations encode reward-contingency and licking vigor.

(A) State diagram for odor pairing paradigm where lick spout is removed during the presentation of half of the odors. The paradigm is similar to one described in Fig2A with the following key differences: 1) the lick spout is moved away from the animal’s mouth during the presentation of half of the odors (Nhi, Nlo, NX). 2) sucrose is delivered after a longer variable delay (1.1-1.3s). 3) 2 of the odors have 100% sucrose contingency (Lhi, Nhi), 2 of the odors have 50% sucrose contingency (Llo, Nlo), and the other 2 have 0% sucrose contingency (LX, NX). (B) Schematic showing the timing of lick port movement relative to odor and sucrose delivery. (C) Licking behavior to 6 odors averaged across 30 trials from a representative animal. Duration of odor delivery is marked by the shaded rectangle and the average time of sucrose delivery is marked by the arrowhead. The time bin used for subsequent analysis (last 0.5s of odor and first 0.5s of delay) is outlined by square brackets (D) Average licks/s for each odor measured between the last 0.5s of odor and the first 0.5s of delay. Data were pooled from the day of highest difference between licks to Lhi and Nhi. (E) Heatmap of odor-evoked activity in VP neurons pooled from each animal’s day of highest difference between licks to Lhi and Nhi. Neurons are grouped according to the clustering dendrogram, shown on the right. Horizontal white lines demarcate the boundaries between the 3 clusters. Odor delivery is marked by vertical red lines. (F) Average Z-scored activity of each cluster to each of the 6 odors. Yellow bar indicates 2-seconds of odor exposure. (G) The percentage of single-neuron linear classifiers with auROC>0.75 as a function of time relative to odor delivery. Shaded area represents the SEM across biological replicates (n=5). (H) Heatmap of the percentage of pooled VP neurons with auROC>0.75 during the last 0.5s of odor and first 0.5s of delay. (I) Scatterplot comparing the auROC for {Lhi vs Nhi} (y-axis) and {Nhi vs. NX} (x-axis) for each neuron. The line of best fit is plotted as a dotted line, with the 95% confidence interval shaded in. (J) Same as (I) but comparing the auROC for {Lhi vs LX} (y-axis) and {Nhi vs. NX} (x-axis). (K) Scatterplot comparing regression models that explain each neuron’s activity on a given trial as a function of anticipatory licking or sucrose contingency. The values plotted are the loss in R2 in models without anticipatory licking (y-axis) or sucrose contingency (x-axis) when compared to a model with both variables and their interaction term. (L) CV accuracy for 5 different odor pairs as a function of time relative to odor delivery. (M) Heatmap of average pairwise CV accuracy trained on the last 0.5s of odor and the first 0.5s of delay. (N) Scatterplot of all pairwise classifier accuracies from all animals (y-axis) and the corresponding range-normalized average pairwise difference in anticipatory licking (x-axis). (O) Scatterplot of all pairwise classifier accuracies from all animals (y-axis) and the corresponding pairwise difference in reward-contingency (x-axis). (P) Scatterplot of all pairwise classifier accuracies (y-axis) and the adjusted combined model of ranged-normalized Δlick and Δreward-contingency (x-axis). FWER-adjusted statistical significance for post hoc comparisons are shown as: ***p<0.001, **p<0.01, *p<0.05, n.s. p>0.05. See Tables S30-31 for detailed statistics.

OTD1 and OTD2 primarily project to the lateral portion of the VP.

(A) Serial coronal sections from a representative experiment where AAVDJ-hSyn-FLEX-mRuby-T2A-syn-eGFP virus was injected into the anterior OT of an Adora2a-Cre mouse. Sections are roughly 400µm apart from each other and range from +2.5mm to −3.0mm relative to bregma. (B) Same as (A) but in a Drd1-Cre mouse. (C) Schematic showing the centroids of 4 injection sites for OT and AcbSh anterograde tracing experiments. (D, E) Representative images of the injection sites shown in (C). Sections were counterstained with ⍺-TH to delineate the boundary between the striatum and the rostral ventral pallidum. The centroids of these samples are marked as red x’s in (C). (F) Schematic showing the centroids of 4 CTB injection sites for lateral and medial VP. CTB::488 injection to the lateral VP are marked by +’s whereas CTB::543 injection to the medial VP are marked by x’s. (G) Representative image of the injection sites shown in (F). Sections were counterstained with ⍺-Substance P to mark the boundary of the VP. The centroids of this sample are marked by the red + and red x in (F). (H) Schematic showing the centroids of 3 CTB injection sites for VTA. (I) Representative image of the injection sites shown in (H). Sections were counterstained with ⍺-TH to mark the boundary of the VTA.

Histological verification of lens implant location.

(A) Schematic showing the center, along the AP axis, of the implanted GRIN lens in 6 OTD2 jGCaMP7s animals. (B) Representative image of lens implant sites shown in (A). Sections were counterstained with ⍺-Substance P to delineate the boundary of the VP. This sample is marked by a red horizontal line in (A). (C) Schematic as in (A) for 6 OTD1 jGCaMP7s animals. (D) Representative image of lens implant sites shown in (C). (E) Schematic as in (A) for 5 VP jGCaMP7s animals. (F) Representative image of lens implant sites shown in (E). (G) Schematic as in (A) for 5 VP jGCaMP7s animals recorded during the lick spout retraction paradigm (Figure 6). (H) Representative image of lens implant sites shown in (G). Sections were counterstained with ⍺-Substance P to delineate the boundary of the VP. This sample is marked by a red horizontal line in (G).

Pooled averaged-over-trials neural activity of all neurons from OTD2 animals across days.

Heatmap of odor-evoked activity in OTD2 neurons from day 1, day 3, and day 6 of imaging. The fluorescence measurements from each neuron were averaged over trials, Z-scored, then pooled for hierarchical clustering. Neurons are grouped by similarity, with the dendrogram shown on the right. Horizontal white lines demarcate the boundaries between the 6 clusters. Odor delivered at 0-2 seconds marked by vertical red lines. From left to right, the columns represent neural responses to sucrose-paired ketone and terpene, control ketone and terpene, and airpuff-paired ketone and terpene (SK, ST, XK, XT, PK, PT). Data is pooled from 6 animals.

Pooled averaged-over-trials neural activity of all neurons from OTD1 animals across days.

Heatmap of odor-evoked activity in OTD1 neurons from day 1, day 3, and day 6 of imaging.. The fluorescence measurements from each neuron were averaged over trials, Z-scored, then pooled for hierarchical clustering. Neurons are grouped by similarity, with the dendrogram shown on the right. Horizontal white lines demarcate the boundaries between the 6 clusters. Odor delivered at 0-2 seconds marked by vertical red lines. From left to right, the columns represent neural responses to sucrose-paired ketone and terpene, control ketone and terpene, and airpuff-paired ketone and terpene (SK, ST, XK, XT, PK, PT). Data is pooled from 6 animals.

Pooled averaged-over-trials neural activity of all neurons from VP animals across days.

Heatmap of odor-evoked activity in VP neurons from day 1, day 3, and day 6 of imaging. The fluorescence measurements from each neuron were averaged over trials, Z-scored, then pooled for hierarchical clustering. Neurons are grouped by similarity, with the dendrogram shown on the right. Horizontal white lines demarcate the boundaries between the 6 clusters. Odor delivered at 0-2 seconds marked by vertical red lines. From left to right, the columns represent neural responses to sucrose-paired ketone and terpene, control ketone and terpene, and airpuff-paired ketone and terpene (SK, ST, XK, XT, PK, PT). Data is pooled from 5 animals.

Extended behavioral analysis from imaging period.

(A) mPID voltage reading in response to 30 trials of a sample odor (α-terpinene) delivery. The time period during which the odor valve was turned on is shown by the yellow rectangle. Individual recordings are shown in gray and the average is shown in black. (B) On-kinetics of odor delivery. On delay refers to the interval between the valve turning on and the mPID voltage increasing by more than 10% of baseline. (C) Off-kinetics of odor delivery. Off delay refers to the interval between the odor valve turning off and the mPID voltage decreasing by more than 10% of its maximum. (D) Representative velocity of the head-fixed mouse in response to the 6 different odors measured by a digital encoder. The lines represent the average across 30 trials and the shaded areas represent the SEM. The black arrowhead marks when the US is delivered. (E) The difference in walking velocity in response to odor (left) and US delivery (right). Differences are calculated between the last second before odor delivery and the last second before the odor exposure (left) or the first half second after US delivery (right) grouped by US pairing. Circles represent the average across animals and the error bars show SEM. (F) Representative changes in range-normalized eye-size in response to the 6 different odors. (G) The difference in eye-size in response to odor (left) and US delivery (right). Differences are calculated between the last second before odor delivery and the last second before the odor exposure (left) or the first half second after US delivery (right) grouped by US pairing. Circles represent the average across animals and the error bars show SEM. FWER-adjusted statistical significance for post hoc comparisons are shown as: ***p<0.001, **p<0.01, *p<0.05, n.s. p>0.05. See Tables S32-36 for detailed statistics.

Traces of example neurons and their corresponding metrics.

(A) Example traces from an OTD1 neuron recorded on day 3. Each column shows this neuron’s response to a given odor across 30 trials (gray). The average across all trials is shown in black. For green and red arrowheads mark the time at which sucrose and airpuff were delivered, respectively. auROC values from single-neuron binary classifiers for discriminating {SK vs. XK}, {SK vs. PK}, and {SK vs. ST} are displayed on the right. Additionally, the results of statistical analysis to determine if this neuron reliably responded to each odor (in. = significant inhibitory response, exc. = significant excitatory response, ns= no significant difference between baseline and odor period). (B) Example traces from an OTD2 neuron recorded on day 1. (C) Example traces from a VP neuron recorded on day 3. (D) Example traces from a VP neuron recorded on day 6.

Percentage of neurons responsive to each odor across days.

(A) Bar graphs showing percentage of neurons from each region on imaging days 1, 3 and 6 that were significantly excited or inhibited by each odor. The average across animals is shown by the bar and the error bars represent SEM. (B) Heatmap of post hoc pairwise comparison p-values of percent responsive across imaging days and imaging region. See Table S37 for detailed statistics.

Distribution of response magnitudes to each odor across days.

Violin plots showing the averaged-over-trials response magnitudes to each odor during the last second of odor exposure. See Table S38 for detailed statistics.

Pairwise analysis of single neuron odor encoding.

(A) Scatterplot comparing the magnitudes of SK responses (ΔΔSK) to PT responses (ΔΔPT). The dotted line represents the hypothetical scenario where ΔΔSK = ΔΔPT. For each population, the R2 value of the 2-d distribution compared to the ΔΔSK = ΔΔPT line is reported. (B) The percentage of neurons from each population where the difference between ΔΔSK and ΔΔPT is lower than that between ΔΔSK and ΔΔST. (C) Bootstrapped FDR-adjusted p-values as a function of auROC values of single-neuron binary classifiers. In total, there are 27,900 single-neuron binary classifiers (15 pairwise classifiers for each of the 1860 recordings across 3 regions and days 1, 3 and 6 of imaging). Each classifier was compared against 10,000 shuffles. Horizontal magenta line marks FDR-adjusted p-value of 0.001 and the vertical magenta line marks auROC of 0.75. (D) The 25th, 50th, 75th, 84th and 95th percentiles of auROC values and their corresponding unadjusted p-values. For auROC values that were greater than all 10,000 shuffles, a conservative p-value of 0.0001 was assigned. (E) The percentage of day 6 {SK vs PK}, {SK vs XK}, and {SK vs ST} auROC values greater than 0.75 as a function of time relative to odor, grouped by region. Lines represent the average across biological replicates and the shaded area shows the SEM. (F) Violin plot showing the distribution of pooled day 6 {SK vs XK} (left) and {SK vs ST} (right) auROC values grouped by region. Horizontal dotted line marks auROC = 0.75. (G) Violin plot of the distribution of single-neuron valence scores (defined as the difference between the average auROC for {S vs. X|P} classification and {SK vs. ST} classification), grouped by imaging day and region. (H) Heatmap of percentage of single-neuron pairwise classifiers with auROC>0.75. Classifiers were trained from neural activity recorded during the last second of odor exposure. Percentage of neurons with auROC>0.75 for a given binary classification was averaged across animals and grouped by region. For post hoc pairwise comparisons, the median values for all neurons in each animal were compared across imaging day and region. The FWER-adjusted p-values are shown as: ***p<0.001, **p<0.01, *p<0.05, n.s. p>0.05. See Tables S39-46 for detailed statistics.

Multinomial analysis of single neuron odor encoding

(A) Confusion matrix of single-neuron MNR classifiers trained on neural activity during the last second of odor exposure on day 6 of imaging. Rows represent the true class while columns represent the predicted class. Each confusion matrix is averaged across 10 k-fold and across all neurons of a given region. ɸ represents data taken from 30 pre-odor bins randomly sampled from −1.5 to −0.5 seconds relative to odor delivery. (B) Violin plot of single-neuron MNR classifier accuracy, averaged across 10 k-fold, grouped by region. (C) Violin plot of the single-neuron MNR classifier accuracy trained on shuffled data. Each data point represents the average across 10 shuffles. (D) Violin plot of MNR S-cue confusion, i.e. confusion between SK and ST. This corresponds to 1) when the true class was SK but predicted class was ST and 2) when the true class was ST but the predicted class was SK. (E) Violin plot of MNR confusion among all ketones. This corresponds when the true class was a ketone and the predicted class was a different ketone (e.g. true class = XK and predicted class = PK). (F) Scatterplot of each neuron’s ketone confusion on the x-axis and S-cue confusion on the y-axis on days 1, 3, and 6 of imaging. (G) Stacked bar graph showing the distribution of neurons from each population that fall into each of the 4 quadrants across the 3 different imaging days. For post hoc pairwise comparisons, the median values for all neurons in each animal were compared across imaging day and region. The FWER-adjusted p-values are shown as: ***p<0.001, **p<0.01, *p<0.05, n.s. p>0.05. See Tables S47-53 for detailed statistics.

Analysis of population-level odor encoding

(A) Scatterplot of CV-accuracy of linear classifiers trained on simultaneously-recorded neurons on the x-axis and their bootstrapped unadjusted p-values on the y-axis. Red horizontal line marks p = 0.001 and red red vertical line marks CV accuracy = 0.75. All classifiers with CV accuracy higher than 0.75 had p<0.001. In total, there are 765 binary classifiers (15 pairwise classifiers for each of the 51 recordings across 3 regions and days 1, 3, and 6 of imaging). Each classifier was compared against 10,000 shuffles. For auROC values that were greater than all 10,000 shuffles, a conservative p-value of 0.0001 was assigned. (B) The CV accuracy for {SK vs XK} binary classification trained on the last second of population-level activity. The bars represent the average across biological replicates. CV accuracy from individual animals are shown as x’s. (C) Same as (B) but for {SK vs. PT} classification. (D) Same as (B) but for {SK vs. ST} classification. Heatmap of CV accuracy from binary SVM’s trained on day 6 of imaging with a radial basis function kernel. CV accuracy was averaged across biological replicates. (F) Confusion matrix of population-level MNR classifiers trained on neural activity during the last second of odor exposure on day 6 of imaging. Rows represent the true class while columns represent the predicted class. Each confusion matrix is averaged across biological replicates. ɸ represents data taken from 30 pre-odor bins randomly sampled from −1.5 to −0.5 seconds relative to odor delivery. See Tables S54-59 for details on statistical comparison of average classifier accuracy across animals.

Camera-based detection of licking in head-fixed animals

(A-C) Metrics of a representative neurons with activity that predicts licking. (A) Representative neuron’s Z-scored ΔF/F (dark green) and Z-scored dF/dt (light green) aligned to the onset of a lickbout. Each line represents the same neuron’s activity during an individual lickbout. (B) Stemplot showing an example of the lagged correlation between the onset of licking and the fluorescence of a neuron across 9 frames (1 frame = 0.2s). Time bins of various lags are shown on the x-axis (negative number denotes frames that precede onset of licking) and the resulting R2 is plotted on the y-axis. Red vertical line marks the case where the 9 frames are centered on the onset of licking. As an example, [-6:2] refers to fluorescence between 1.2 seconds prior to lickbout onset and 0.4 seconds after lickbout onset. (C) The output of a distributed lag model (DLM) that predicts the onset of a lickbout from ΔF/F of a single neuron. ΔF/F (dark green, top), DLM score (magenta, middle), and the licking recorded by a capacitive sensor (black, bottom) are shown in parallel. The DLM model was trained using 9 distributed frames ([-6:2]) of ΔF/F for each frame of lickbout onset. (D) Scatterplot of day 6 VP neurons’ DLM lick classifier auROC on the y-axis plotted against their mean {SK vs. XK} auROC on the x-axis. The slope, intercept, R2, and p-value of the slope are shown on the top left corner. (E) 3 example snapshots of the camera feed during moving lick spout paradigm with overlay of DeepLabCut labeling. The coordinates of top lip, bottom lip, base of tongue (tbase), and tip of tongue (ttip) are displayed with a probability cutoff of 0.4. (F) Range-normalized metrics from DLC labeling. P(ttip) (red, top) is the probability score assigned to the labeling of the tongue tip. P(tbase) (yellow, middle) is the probability score assigned to the labeling of the tongue base. Mgap (purple, bottom) is the Euclidean distance between the top lip and the bottom lip. The 3 vertical magenta lines represent the timing of the 3 snapshots shown in (E). (G) The same range-normalized metrics as in (F) plotted against the ground truth licking data from capacitive sensor (black, bottom) and DLC-based licking classifier score (magenta, second from bottom). (H) Lineplot showing the difference in total licking to Lhi and Nhi during the time bin (1.5-2.5 seconds after odor onset) used for most analyses plotted against imaging day for individual animals. The time of peak difference is circled in black.

Pairwise comparisons of anterograde labeling from OT and AcbSh (Fig1C).

Pairwise comparisons of retrograde labeling from vlVP and dmVP (Fig1F).

Pairwise comparisons of retrograde labeling from VTA (Fig1I).

2-way ANOVA for effect of day or lens placement on licking accuracy (Fig2H).

Post hoc pairwise comparisons of licking accuracy across imaging days (Fig2H).

2-way ANOVA for effect of day or lens placement on percentage of neurons responsive to a single odor (Fig3E).

Post hoc pairwise comparisons of percentage of neurons responsive to a single odor across imaging days and region (Fig3E).

2-way ANOVA for effect of day or lens placement on percentage of neurons responsive to 3 or more odors (Fig3E).

Post hoc pairwise comparisons of percentage of neurons responsive to 3 or more odors across imaging days and region (Fig3E).

2-way ANOVA for effect of day or lens placement on percentage of neurons responsive to both S-cues (Fig3E).

Post hoc pairwise comparisons of percentage of neurons responsive to both S-cues across imaging days and region (Fig3E).

2-way ANOVA for effect of day or lens placement on percentage of neurons with auROC>0.75 for {SK vs. PK} (Fig3I).

Post hoc comparisons of percentage of neurons with auROC>0.75 for {SK vs. PK} across imaging day and region (Fig3I).

2-way ANOVA for effect of day or lens placement on percentage of neurons with auROC>0.75 for {SK vs. XK} (Fig3J).

Post hoc comparisons of percentage of neurons with auROC>0.75 for {SK vs. XK} across imaging day and region (Fig3J).

2-way ANOVA for effect of day or lens placement on percentage of neurons with auROC>0.75 for {SK vs. ST} (Fig3K).

Post hoc comparisons of percentage of neurons with auROC>0.75 for {SK vs. ST} across imaging day and region (Fig3K).

Pairwise comparisons of |ΔΔFday3|-|ΔΔFday1| across regions (Fig4I).

One sample t-tests of |ΔΔFday3|-|ΔΔFday1| in different regions (Fig4I).

One-way ANOVA for effect of region on {S vs. X|P} linear classifier accuracy (Fig5G).

Post hoc comparisons of {S vs. X|P} linear classifier accuracy across regions (Fig5G).

One-way ANOVA for effect of region on generalized {S vs. X|P} linear classifier accuracy (Fig5G).

Post hoc comparisons of generalized {S vs. X|P} linear classifier accuracy across regions (Fig5G).

2-way ANOVA for effect of imaging days or region on normalized PR (Fig5I).

Post hoc comparisons of normalized PR across imaging day and region (Fig5I).

One-way ANOVA for effect of region on {SK vs. PK} linear classifier accuracy trained on PC1 (Fig5L).

Post hoc comparisons of {SK vs. PK} linear classifier accuracy trained on PC1 across regions (Fig5L).

One-way ANOVA for effect of region on {SK vs. ST} linear classifier accuracy trained on PC1-PC15 (Fig5L).

Post hoc comparisons of {SK vs. ST} linear classifier accuracy trained on PC1-PC15 across regions (Fig5L).

2-way ANOVA for effect of lick spout presence and sucrose contingency on anticipatory licking (Fig6C).

Post hoc comparisons of anticipatory licking across spout presence and sucrose contingency (Fig6C).

2-way ANOVA for effect of imaging day and valence of odor on velocity during cue presentation (FigS6E).

2-way ANOVA for effect of imaging day and valence of odor on velocity during unconditioned stimulus (FigS6E).

Post hoc comparisons of velocity during unconditioned stimulus across imaging days and valence of odor (FigS6E).

2-way ANOVA for effect of imaging day and valence of odor on relative eye size during cue presentation (FigS6G).

2-way ANOVA for effect of imaging day and valence of odor on relative eye size during unconditioned stimulus (FigS6G).

4-way ANOVA for effect of imaging day, valence, functional group, and region on the percentage of neurons responsive to a given odor (FigS8A).

Linear model of the fixed effects of region, imaging day, and valence and the random effect of individual animal on |ΔΔF/F| (FigS9A).

Linear model of the fixed effects of region and imaging day, and the random effect of individual animals on the auROC of single-neuron {S vs. X|P} classifiers (FigS10F).

2-way ANOVA for effect of imaging day and region on the median auROC value of {S vs. X|P} classifiers for each animal (FigS10F).

Post hoc comparison of the median auROC value for {S vs. X|P} across imaging day and region (FigS10F).

Linear model of the fixed effects of region and imaging day, and the random effect of individual animals on the auROC of single-neuron {SK vs. ST} classifiers (FigS10G).

2-way ANOVA for effect of imaging day and region on the median auROC value of {SK vs. ST} classifiers for each animal (FigS10G).

Linear model of the fixed effects of region and imaging day, and the random effect of individual animals on the single-neuron valence scores (FigS10H).

2-way ANOVA for effect of imaging day and region on the median valence score for each animal (FigS10H).

Post hoc comparison of the median valence scores across imaging day and region (FigS10H).

2-way ANOVA for effect of imaging day and region on the median single-neuron MNR accuracy for each animal (FigS11B).

Post hoc comparison of median single-neuron MNR accuracy across imaging day and region (FigS11B).

2-way ANOVA for effect of imaging day and region on the median single-neuron MNR shuffled accuracy for each animal (FigS11C).

2-way ANOVA for effect of imaging day and region on the median S-cue/S-cue confusion for each animal (FigS11D).

Post hoc comparison of median S-cue/S-cue confusion across imaging day and region (FigS11D).

2-way ANOVA for effect of imaging day and region on the median confusion within functional groups for each animal (FigS11E).

Post hoc comparison of median within-function group confusion across imaging day and region (FigS11E).

2-way ANOVA for effect of imaging day and region on the mean accuracy for linear classification of {S vs. X} using population data (FigS12B).

Post hoc comparison of mean {S vs. X} accuracy across imaging day and region (FigS12B).

2-way ANOVA for effect of imaging day and region on the mean accuracy for linear classification of {S vs. P} using population data (FigS12C).

Post hoc comparison of mean {S vs. P} accuracy across imaging day and region (FigS12C).

2-way ANOVA for effect of imaging day and region on the accuracy for linear classification of {SK vs. ST} using population data (FigS12D).

Post hoc comparison of {SK vs. ST} accuracy across imaging day and region (FigS12D).