NMDAR-Dependent Emergence of Behavioral
Representation in Primary Visual Cortex
dV1 pyramidal cells show experience-dependent emergence
of behavioral representation
dBehavior is also encoded by PV- but not SOM- or VIP-
dEmergent behavioral prediction requires cell-autonomous
scian, Hadas Benisty,
Michael J. Higley
scian et al. show that pyramidal and
parvalbumin-expressing neurons in
mouse visual cortex predict single-trial
performance on a visual detection task.
Prediction accuracy emerges with
learning, is not observed for
somatostatin- or vasoactive intestinal
peptide-expressing cells, and requires
cell-autonomous NMDA receptor
(NMDAR) expression. These results
highlight plasticity of behavioral
representations in the primary sensory
scian et al., 2020, Cell Reports 32, 107970
July 28, 2020 ª2020 The Author(s).
NMDAR-Dependent Emergence of Behavioral
Representation in Primary Visual Cortex
*and Michael J. Higley
Department of Neuroscience, Kavli Institute of Neuroscience, Yale University School of Medicine, New Haven, CT 06510, USA
Nencki-EMBL Partnership for Neural Plasticity and Brain Disorders – BRAINCITY, Nencki Institute of Experimental Biology, Polish Academy
of Sciences, Pasteur 3 Street, 02-093 Warsaw, Poland
*Correspondence: firstname.lastname@example.org (M.J.H.), email@example.com (A.P.), firstname.lastname@example.org (H.B.)
Although neocortical sensory areas are generally thought to faithfully represent external stimuli, cortical net-
works exhibit considerable functional plasticity, allowing them to modify their output to reﬂect ongoing
behavioral demands. We apply longitudinal 2-photon imaging of activity in the primary visual cortex (V1) of
mice learning a conditioned eyeblink task to investigate the dynamic representations of task-relevant infor-
mation. We ﬁnd that, although all V1 neurons robustly and stably encode visual input, pyramidal cells and
parvalbumin-expressing interneurons exhibit experience-dependent emergence of accurate behavioral rep-
resentations during learning. The functional plasticity driving performance-predictive activity requires cell-
autonomous expression of NMDA-type glutamate receptors. Our ﬁndings demonstrate that accurate encod-
ing of behavioral output is not inherent to V1 but develops during learning to support visual task performance.
Primary sensory areas of the mammalian neocortex, including the
primary visual cortex (V1), have traditionally been thought to faith-
fully represent features of external stimuli. However, the cortical
representation of external stimuli is highly plastic over a range
of temporal scales. For example, learning associations between
sensory stimuli and behaviorally relevant outcomes drive alter-
ations in neuronal structure, activity patterns, and perceptual abil-
ity (Frenkel et al., 2006;Gavornik and Bear, 2014;Goltstein et al.,
2013;Jurjut et al., 2017;Li et al., 2019;Makino and Komiyama,
2015;Poort et al., 2015;Schoups et al., 2001;Wang et al.,
2016;Yan et al., 2014;Yang and Maunsell, 2004). Furthermore,
repeated pairing of a visual stimuluswith a reward results in modi-
ﬁcation of feature selectivity (e.g., orientation preference) by sin-
gle neurons in the primary visual cortex (V1) (Frenkel et al.,
2006;Gavornik and Bear, 2014;Goltstein et al., 2013;Jurjut
et al., 2017;Poort et al., 2015;Schoups et al., 2001;Yan et al.,
2014;Yang and Maunsell, 2004). Neuronal activity corresponding
to behavioral choice or trial outcome has also been described in
the sensory cortex (Blake et al., 2006;Kwon et al., 2016;Poort
et al., 2015;Ress and Heeger, 2003;Rutkowski and Weinberger,
2005;Shuler and Bear, 2006;Tang and Higley, 2020;Wiest et al.,
2010). However, it is unclear whether the representation of behav-
ioral output is inherent to V1, like feature selectivity, or instead,
emerges dynamically during learning. Moreover, the cellular
mechanisms underlying the functional reorganization of network
activity are poorly understood.
Several groups have shown that classical eyeblink condition-
ing provides an excellent model for investigating the neural cor-
relates of sensorimotor learning (Albergaria et al., 2018;Freeman
and Steinmetz, 2011;Heiney et al., 2014;Siegel et al., 2015). We
recently showed that mice rapidly learn to form associations be-
tween visual stimuli and aversive corneal air-puffs, resulting in
expression of a conditioned blink response (Tang and Higley,
2020). Neuronal activity within V1 is required for task perfor-
mance and signiﬁcantly predicts behavioral outcome in expert
animals (Tang and Higley, 2020). Here, we combined chronic
in vivo two-photon imaging and genetic manipulation of targeted
excitatory and inhibitory neuronal populations within mouse V1
to investigate the dynamics and cellular mechanisms linked to
plasticity of sensory and behavioral representations during con-
ditioning. Our results demonstrate that V1 neurons robustly and
stably encode visual input throughout learning, regardless of the
gradual reduction in the magnitude of stimulus-evoked activity.
In contrast, representation of behavioral outcome emerges
over the course of learning for both single neurons and neuronal
ensembles. Notably, behavioral encoding was observed for both
pyramidal neurons (PNs) and parvalbumin-expressing interneu-
rons (PV-INs) but not for somatostatin (SOM)-expressing inter-
neurons (INs) or vasoactive intestinal peptide (VIP)-expressing
INs. Finally, plasticity of behavioral representation requires cell-
autonomous expression of NMDA-type glutamate receptors
(NMDARs), suggesting a critical role for synaptic plasticity in
the emergence of task-relevant activity in V1.
To study the relationship between V1 activity and the acquisition
of sensory-guided behavior, we developed a visually cued
Cell Reports 32, 107970, July 28, 2020 ª2020 The Author(s). 1
This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).
eyeblink conditioning task. Brieﬂy, head-ﬁxed mice placed on a
running wheel learned to associate a contrast-modulated drifting
grating (conditioned stimulus [CS]) with an aversive ipsilateral
corneal air puff (unconditioned stimulus [US]), which elicited an
unconditioned blink response (UR). Repeated stimulus pairings
resulted in a conditioned blink response (CR), which occurred af-
ter the onset of the visual stimulus but before the air puff (Fig-
ure 1A; see Method Details). Learning occurred over a few
days without change in CR magnitude or latency (Figures 1B
and S1), and we previously showed that both acquisition and
performance required an intact V1 (Tang and Higley, 2020). For
subsequent analyses, learning was divided into three phases
(early, mid, and late) based on average group performance (Fig-
ure 1B). Performance was only modestly dependent on behav-
ioral state during the early learning phase, measured via either
locomotion speed or pupil diameter, and the distribution of
behavioral state parameters did not change across learning (Fig-
ure S1;Table S1; see Method Details).
We used two-photon imaging of the genetically encoded cal-
cium indicator GCaMP6s (Chen et al., 2013b) to monitor the ac-
tivity of putative pyramidal neurons (PNs) in V1 (see Method De-
tails), tracking the same cells longitudinally across the 2-week
training period (Figures 1C and S2). As we showed previously
(Tang and Higley, 2020), spontaneous blinks can evoke re-
sponses in V1 neurons (Figure S2). To exclude any potential
contamination of the measurements of stimulus-evoked re-
sponses, we restricted our analyses to a 300-ms period after
stimulus onset, using the calculated linear slope (%DF/s) as
the measure of response magnitude (Figure S2). Consistent
with recent work (Makino and Komiyama, 2015), acquisition of
visual behavior was associated with a reduction in the evoked
response over the course of training (Figures 1C and 1D). This
result was signiﬁcant when directly comparing responses be-
tween early and late learning phases (21.1 ±6.8% versus 10.8
±3.0%, n = 6 mice, paired t test, p = 0.028; Figure 1E; see
Method Details). Control experiments revealed that visual
Figure 1. Longitudinal Imaging of Activity
during Visually Cued Eyeblink Conditioning
(A) Schematic illustration of the behavioral setup
(left) and trial structure (right).
(B) Performance over 14-day-long training for the
layer 2/3 PN imaging cohort (n = 6 mice, black).
Dots with error bars represent averages ±SEM.
Spontaneous blink rate per 450 ms period is shown
(blue). Training phases were divided into tertiles
(early, mid, and late) based on average group
(C) Example of in vivo two-photon imaging of layer
2/3 neurons expressing GCaMP6s, collected on
two different training days from the same mouse.
Scale bar indicates 50 mm. Average visually
evoked response for one example layer 2/3 neuron
on days 1 and 14 is shown to the right. Timing of
the visual stimulus (blue bar) and air puff (purple
bar) are shown below each trace. Intervals for
measuring baseline activity (light-blue window)
and visual response magnitude (pink window) are
shown superimposed. Lines and shading indicate
averages ±SEM across all trials for the given day.
(D) Population values for the visual response
magnitude (given as %DF/s) for each day of
training. Bars and lines indicate averages ±SEM.
Analysis windows (3 days) for early (red), mid (or-
ange), and late (blue) training phases are indicated.
(E) Average population values for response
magnitude within each training phase, corre-
sponding to colors in (D). Lines represent averages
±SEM (n = 6 mice). *p < 0.05, paired t test for early
(F) Distribution of stimulus prediction accuracy
values using a linear decoder for responses of in-
dividual layer 2/3 neurons across each training
phase. Chance level (0.5) is indicated (gray dashed
line). Black circles indicate averages ±SEM for the
population of individual neurons.
(G) Relationship between stimulus prediction ac-
curacy and response magnitude for individual
neurons across each training phase. Red dashed
line indicates Spearman’s rank correlation.
(H) Average stimulus prediction accuracy values using a linear decoder for the ensemble activity. Colors as in (D). Lines represent averages ±SEM (n = 6 mice)
and are also indicated by colored circles in (F). *p < 0.05, t test relative to chance. ns indicates p > 0.05, paired t test for early versus late.
2Cell Reports 32, 107970, July 28, 2020
experience alone, in the absence of training, is sufﬁcient to
induce a reduction in sensory-evoked cortical activity (Figure S3;
Table S1). Visual responses were enhanced by arousal (Vinck
et al., 2015), although that modulation did not change across
learning (Figure S3;Table S1). Interestingly, thalamic axons
imaged in layer 4 exhibited a non-signiﬁcant increase in
response magnitude (Figure S3;Table S1), arguing that the
experience-dependent decrease in V1 responses arises through
modiﬁcation of intracortical circuits.
To examine whether our observed changes in response
magnitude were associated with disruption of stimulus encod-
ing, we investigated the ability of a linear classiﬁer to predict
the presence of a visual stimulus versus baseline spontaneous
activity for individual trials (see Method Details). Using a support
vector machine (SVM) model, we found that individual PNs ex-
hibited a range of stimulus prediction accuracy levels that did
not differ across learning (early versus late phase, 0.59 ±0.02
versus 0.56 ±0.01, n = 6 mice, paired t test, p = 0.999; Kolmo-
gorov-Smirnoff [KS] test, p = 0.956; Figure 1F). Interestingly,
the stimulus-predictive accuracy of single neurons was corre-
lated with response magnitude within a single learning phase
(early: Spearman’s r
= 0.52, p < 0.001; mid: Spearman’s r
0.50, p < 0.001; late: Spearman’s r
= 0.46, p < 0.001; Figure 1G).
Previous work has shown that neuronal populations can perform
much better than individual cells in predicting sensory stimuli
(Moreno-Bote et al., 2014). Therefore, we trained a similar SVM
using an ensemble vector comprising all neurons, conﬁrming
that, as a group, layer 2/3 PNs performed better than chance
during all learning phases (early: 0.90 ±0.03, n = 6 mice, t test,
p < 0.001; mid: 0.84 ±0.04, n = 6 mice, t test, p < 0.001; late:
0.88 ±0.03, n = 6 mice, t test, p < 0.001; Figure 1H). In addition,
population accuracy was unchanged over learning, despite the
reduced response magnitude (early versus late, n = 6 mice,
paired t test, p = 0.772; Figure 1H). Overall, these ﬁndings
demonstrate that functional plasticity of evoked V1 response
magnitude can occur without signiﬁcant alteration in the ability
to robustly encode sensory input.
Next, we examined whether visually evoked activity in V1 was
predictive of an animal’s behavioral performance. During early
and mid-learning, there was no difference between the average
PN response magnitude for correct versus incorrect trials (early:
22.0 ±6.5% versus 20.8 ±6.9%, n = 6 mice, paired t test, p =
0.188; mid: 20.2 ±7.1% versus 16.2 ±7.7%, n = 6 mice, paired
t test, p = 0.235). However, in well-trained animals (late phase),
responses on correct trials were larger than those on incorrect
(11.7 ±3.1% versus 8.6 ±3.2%, n = 6 mice, paired t test, p =
0.003, Figures 2A and 2B). We again used a linear classiﬁer to
investigate neuronal predictive accuracy for trial outcome. Inter-
estingly, the average accuracy of individual neurons increased
over the 2-week training period (early versus late phase, 0.51 ±
0.004 versus 0.52 ±0.003, n = 6 mice, paired t test, p = 0.039;
KS test, p < 0.001; Figure 2C) and was not correlated with
response magnitude (early: Spearman’s r
< 0.001, p = 0.228;
mid: Spearman’s r
= 0.007, p = 0.082; late: Spearman’s r
0.020, p = 0.086; Figure 2D). Consistent with the average
response data, layer 2/3 PN ensembles were also not better
than chance at predicting behavior during the early phase of
training (0.52 ±0.01, n = 6 mice, t test, p = 0.053) but did perform
Figure 2. Cortical Representation of Behav-
ioral Outcome Emerges during Training
(A) Average visually evoked response for one
example layer 2/3 neuron across training phases.
Traces are separated by correct (black) and incorrect
(dark red) trials. Timing of visual stimulus (blue bar)
and air puff (purple bar), and analysis windows
(baseline, light blue; visual response, pink) are
shown. Lines and shading indicate averages ±SEM
across all trials for the given phase.
(B) Average population values for the visual response
magnitude, separated by correct and incorrect trials,
within each training phase. Lines represent averages
±SEM (n = 6 mice). *p < 0.05; ns indicates p > 0.05,
paired t test for correct versus incorrect.
(C) Distribution of blink prediction accuracy values
using a linear decoder for responses of individual
layer 2/3 neurons across each training phase.
Chance level (0.5) is indicated (gray dashed line).
Black circles indicate averages ±SEM for the pop-
ulation of individual neurons.
(D) Relationship between blink prediction accuracy
and response magnitude for individual neurons
across each training phase. Red dashed line in-
dicates Spearman’s rank correlation.
(E) Average blink prediction accuracy values using a
linear decoder for the ensemble activity. Colors
denote training phases as above. Lines represent
averages ±SEM (n = 6 mice) and are also indicated
by colored circles in (C). *p < 0.05, t test relative to
chance for each phase.
p < 0.05, paired t test for
early versus late.
Cell Reports 32, 107970, July 28, 2020 3
better than chance for later phases (mid: 0.57 ±0.01, n = 7 mice,
t test, p < 0.001; late: 0.57 ±0.01, n = 6 mice, t test, p < 0.001;
Figure 2E), and the blink prediction accuracy was better for the
late versus early phase (paired t test, p = 0.017). Furthermore,
as with our behavioral data, performance prediction accuracy
was not correlated with the sensitivity of individual neurons to
changes in behavioral state (Figure S3;Table S1).
We next estimated the number of single cells necessary to
reach population-level accuracy by training our classiﬁer on
randomly selected neuronal groups of varying size, ﬁnding that
~30 cells were sufﬁcient to match the accuracy of the overall
population (Figure S4). Simulating a population of neurons
whose accuracy values matched the distribution of the layer 2/
3 PNs conﬁrmed that ensembles of ~30 cells exhibit markedly
better predictive performance than the average of single cells
and a corresponding improvement with the learning phase (early
versus late, 0.47 ±0.01 versus 0.95 ±0.02, n = 80 synthetic neu-
rons, t test, p < 0.001; Figure S4;Table S1). Thus, our results
demonstrate the remarkable ﬁnding that the accurate represen-
tation of behavior in V1 is highly plastic, emerging during learning
despite the unchanged accuracy of the stimulus prediction.
Moreover, improved ensemble accuracy follows from the
increasing accuracy of individual neurons through pooling of a
relatively small number of cells.
To determine whether our ﬁndings generalized across all
neuronal populations in V1, we again used two-photon imaging
to monitor the activity of GABAergic INs expressing either PV,
SOM, or VIP in separate cohorts of mice undergoing behavioral
training (Figures 3A and S5). All three IN populations exhibited a
reduction in stimulus-evoked response magnitude over the
course of training, similar to the results from PNs (Figures 3B
and S5;Table S1). As above, this change did not alter the ability
of PV-, SOM-, or VIP-IN ensembles to accurately and stably pre-
dict the visual stimulus throughout training (Figure S5;Table S1).
However, only the PV-INs demonstrated a difference between
average response magnitude on correct versus incorrect trials
(early: 20.1 ±4.5% versus 12.6 ±2.4%, n = 7 mice, paired t
test, p = 0.031; mid: 11.1 ±6.6% versus 4.2 ±3.3%, n = 7
mice, paired t test, p = 0.047; late: 1.2 ±2.1% versus 3.9 ±
2.1%, n = 7 mice, paired t test, p = 0.021; Figure 3C). Moreover,
the linear classiﬁer revealed that prediction accuracy of individ-
ual PV-INs for trial outcome increased with training (early versus
late, 0.51 ±0.01 versus 0.53 ±0.004, n = 7 mice, paired t test, p =
0.013; KS test, p = 0.004; Figure 3D). Similarly, the behavioral
prediction accuracy of PV-IN ensembles did not differ from
chance during early training (0.52 ±0.02, n = 7 mice, t test, p =
0.172) but did perform above chance for mid (0.56 ±0.02, n =
7 mice, t test, p = 0.023) and late (0.58 ±0.02, n = 7 mice, t
test, p = 0.003; Figure 3E) phases, and there was an increase
in accuracy between early and late training (paired t test, p =
0.021). Similar analyses for SOM- and VIP-INs revealed that
behavioral prediction accuracy did not differ from chance at
Figure 3. Sensory and Behavioral Representation by GABAergic
(A) Example of in vivo 2-photon imaging of the GCaMP6f in layer 2/3 PV-
INs (left), SOM-INs (middle), and VIP-INs (right). Scale bar indicates
(B) Average visually evoked responses for example layer 2/3 PV-INs
(left), SOM-INs (middle), and VIP-INs (right). Traces are shown for
days 1 and 14. Timing of visual stimulus (blue bar) and air puff (purple
bar) and the analysis windows (baseline, light blue; visual response,
pink) are shown. Lines and shading indicate averages ±SEM across all
(C) Average population values for the visual response magnitude, sepa-
rated by correct (black) and incorrect (dark red) trials, within each training
phase. Data are for PV-INs (left), SOM-INs (middle), and VIP-INs (right).
Lines represent averages ±SEM (PV-INs, n = 7 mice; SOM-INs, n = 7
mice; VIP-INs, n = 6 mice). *p < 0.05, paired t test for correct versus
(D) Distribution of blink prediction accuracy values using a linear decoder for
responses of individual layer 2/3 PV-INs across each training phase. Chance
level (0.5) is indicated (gray dashed line). Black circles indicate averages ±
SEM for the population of individual neurons.
(E) Average blink prediction accuracy values using a linear decoder for
the ensemble activity of PV-INs. Lines represent averages ±SEM (n = 7
mice) and are also indicated by colored circles in (D). *p < 0.05, t
test relative to chance for each phase.
p < 0.05, paired t test for early
4Cell Reports 32, 107970, July 28, 2020
any phase of training (Figure S5;Table S1). Overall, these data
reveal that the emergence of behavioral representations during
visual conditioning is speciﬁc to PNs and PV-INs.
The functional plasticity of the V1 activity associated with
training might arise from modiﬁcation of synaptic connectivity
within local networks. NMDARs are strongly linked to synaptic
plasticity of both excitatory and inhibitory synapses and may
be necessary for experience-dependent changes in visually
evoked responses (Chiu et al., 2018,2019;Cooke and Bear,
2010;Frenkel et al., 2006;Malenka and Bear, 2004). To deter-
mine whether our results are dependent on NMDAR signaling,
we used an adeno-associated virus (AAV) vector to delete the
obligatory GluN1 subunit from a sparse number of V1 neurons
(Chiu et al., 2018). Here, expression of Cre recombinase-tdTo-
mato in GluN1f/f mice allowed us to identify the small number
of putative GluN1 null cells (20.8 ±3.0) in each ﬁeld of view
during imaging (Figures 4A and 4B). Sparse loss of NMDARs
did not disrupt visual learning, and there was no difference
in evoked-response magnitude between GluN1 null (tdTo-
mato-positive) and neighboring wild-type (WT; tdTomato-
negative) neurons (Table S1). Training the linear classiﬁer on
GluN1-null ensemble data showed that those cells accurately
predicted the visual stimulus for all phases (Figure S6;Table
S1). However, GluN1-null cells failed to develop a difference
in average response magnitude for correct versus incorrect
trials (early: 9.3 ±5.1% versus 10.2 ±5.4%,n=6mice,paired
t test, p = 0.703; mid: 9.0 ±4.2% versus 9.9 ±4.2%, n = 6
mice, paired t test, p = 0.686; late: 6.6 ±3.3% versus 4.5 ±
3.0%, n = 6 mice, paired t test, p = 0.073; Figure 4C). Consis-
tent with that ﬁnding, the average blink prediction accuracy of
single GluN1-null neurons did not improve with learning (early
versus late, 0.51 ±0.01 versus 0.52 ±0.01,n=6mice,paired
t test, p = 0.386; KS test, p = 0.155; Figure 4D). Additionally,
the GluN1-null ensemble could not predict behavior above
chance for any phase (early: 0.52 ±0.04, n = 6 mice, t test,
p = 0.294; mid: 0.50 ±0.01, n = 6 mice, t test, p = 0.362;
late: 0.50 ±0.02, n = 6 mice, t test, p = 0.557), and accuracy
did not improve over training (early versus late, paired t test,
p = 0.694; Figure 4E). Importantly, we trained our classiﬁer
on a similarly sized (n = 20) population of randomly selected
GluN1-WT neurons from the same ﬁelds of view. As with cells
from WT mice, GluN1-WT neurons accurately predicted the vi-
sual stimulus for each phase, and that accuracy did not
change across learning or differ between GluN1-null and
-WT cells (Figure S6;Table S1). In addition, the GluN1-WT
ensemble could not predict behavior during the early phase
than chance for mid (0.55 ±0.02, n = 7 mice, t test, p = 0.029)
and late (0.56 ±0.01, n = 6 mice, t test, p = 0.001) phases and
demonstrated improvement with training (early versus late,
paired t test, p = 0.026; Figure 4E). Moreover, in well-trained
animals (late phase) the GluN1-WT cells predicted perfor-
mance signiﬁcantly better than the GluN1-null cells (t test,
Our results indicate that sensory-evoked neuronal activity in
V1 is highly plastic during visual learning. Consistent with
earlier work, response magnitude for both excitatory and
inhibitory cells decreased over several days (Makino and Ko-
miyama, 2015), although this decrease occurred without loss
of predictive accuracy for the sensory stimulus. In addition,
our data indicate that this reduced responsiveness also oc-
curs in the absence of aversive stimuli, suggesting passive
habituation is the default outcome, in contrast to earlier
Figure 4. NMDARs Are Required for Func-
tional Plasticity of Behavioral Representa-
(A) Schematic illustration showing viral strategy for
sparse deletion of the GluN1 subunit and expres-
sion of GCaMP6s.
(B) Example of in vivo two-photon image of
GCaMP6s (green, left), tdTomato (red, middle), and
merge (right) in layer 2/3 neurons. tdTomato-ex-
pressing cells are putative GluN1 null. Scale bar
indicates 50 mm.
(C) Average population values for the visual
response magnitude of GluN1 null cells, sepa-
rated by correct (black) and incorrect (dark
red) trials, within each training phase. Lines
represent averages ±SEM(n=6mice).nsin-
dicates p > 0.05, paired t test for correct versus
(D) Distribution of blink prediction accuracy values
using a linear decoder for responses of individual
GluN1-null cells across each training phase.
Chance level (0.5) is indicated (gray dashed line).
Black circles indicate averages ±SEM for the
population of individual neurons.
(E) Average blink prediction accuracy values using a linear decoder for the ensemble activity of GluN1-null and GluN1-WT cells. Lines represent averages ±SEM
(n = 6 mice) and are also indicated by colored circles in (D). *p < 0.05, t test relative to chance for each phase;
p < 0.05 and ns indicates p > 0.05, respectively for
early versus late;
p < 0.05, t test for late phase null versus WT.
Cell Reports 32, 107970, July 28, 2020 5
ﬁndings (Gavornik and Bear, 2014). Notably, those changes in
activity and prediction accuracy were not correlated with
changes in behavioral state or arousal levels across learning.
Previous studies have also shown that experience-dependent
plasticity can alter the feature selectivity of V1 neurons (Gav-
ornik and Bear, 2014;Goltstein et al., 2013;Jurjut et al., 2017;
Makino and Komiyama, 2015;Poort et al., 2015;Schoups
et al., 2001), whereas our data highlight the emergence of
behavioral outcome representations early in the visual
pathway. This ﬁnding builds on work from our laboratory
and others demonstrating the ability of sensory areas to accu-
rately encode behavioral choice (Chen et al., 2013a;Kwon
et al., 2016;Poort et al., 2015;Tang and Higley, 2020)andin-
dicates that this information is not inherent to V1 but develops
We observed an emergence of behavioral predictions in
both PNs and PV-INs, but not in SOM- or VIP-INs, likely re-
ﬂecting cell-type speciﬁcity of underlying plasticity mecha-
nisms. This ﬁnding contrasts somewhat with earlier work
demonstrating plasticity of stimulus tuning for PV- and
SOM-INsduringlearning(Khan et al., 2018). PV-IN activity is
closely linked to that of local excitatory networks and has a
key role in regulating the timing and gain of sensory-evoked
responses (Atallah et al., 2012;Cardin et al., 2009;Lee
et al., 2012), making the functional coupling of these popula-
tions unsurprising. The presence of predictive accuracy for
PV-INs even in early training likely reﬂects the difﬁculty in
analyzing the earliest stages of learning given the small num-
ber of trials but suggests these cells rapidly gain this ability
and may drive subsequent encoding by PNs. SOM-INs are
linked to the control of dendritic calcium signaling and expe-
rience-dependent circuit plasticity (Chiu et al., 2013,2018;Ci-
chon and Gan, 2015;Hayama et al., 2013;Makino and Ko-
miyama, 2015), suggesting that these cells may still
contribute to the functional reorganization of V1 activity
despite their lack of predictive accuracy. Notably, our previ-
ous work also demonstrated signiﬁcant heterogeneity across
PN subpopulations for both sensory and behavioral represen-
tations (Lur et al., 2016;Tang and Higley, 2020), further sup-
porting the existence of functionally diverse but physically in-
termingled circuits in V1.
We also found that GluN1 deletion cell-autonomously
abolished the plasticity of both response magnitude and
behavioral representation, which indicates that the experi-
ence-dependent response difference on correct and incorrect
responses does not simply reﬂect a change in the down-
stream correlation of V1 activity and motor output. Instead, in-
tracortical NMDAR-dependent plasticity appears to be a
fundamental contributor to the learning process. A large
body of work supports a role for NMDARs in both excitatory
and inhibitory synaptic plasticity (Chiu et al., 2019;Malenka
and Bear, 2004), and future studies are necessary to examine
whether modiﬁcation of inputs to V1 PNs drives the functional
circuit reorganization observed here.
Despite our ﬁndings that V1 is necessary for learning and
performance of eyeblink conditioning and accurately encodes
behavior, the association between CS and US is most likely
driven by synaptic plasticity in the cerebellum (Freeman and
Steinmetz, 2011), with the cortex providing a necessary
throughput for visual information to reach the brainstem via
pontine relays (Tang and Higley, 2020). We hypothesize that
during learning, plasticity within V1 circuits reﬁnes their ability
to gate this information ﬂow, allowing behavior to be inﬂu-
enced by the broader behavioral context. Overall, our results
indicate that excitatory and inhibitory V1 networks can multi-
plex stable representations of visual stimuli and dynamic rep-
resentations of behavioral output. This work provides evi-
dence that sensory and motor signals are inextricably linked,
even within early sensory areas, to support the generation of
Detailed methods are provided in the online version of this paper
and include the following:
dKEY RESOURCES TABLE
BData and Code Availability
dEXPERIMENTAL MODEL AND SUBJECT DETAILS
dQUANTIFICATION AND STATISTICAL ANALYSIS
BImaging analysis and statistics
Supplemental Information can be found online at https://doi.org/10.1016/j.
The authors are thankful to Dr. Lan Tang for initial design of the eyeblink-con-
ditioning task and helpful comments during analyses. We also wish to thank
Dr. Jessica A. Cardin as well as Mr. Daniel Barson, Dr. Tom Morse, and Dr.
Garrett Neske and other members of the Higley Laboratory for helpful com-
ments during the preparation of this manuscript. We thank Douglas Kim and
the GENIE Project for the GCaMP6 and GCaMP7 plasmids. This work was
supported by funding from the NIH/NIMH (R01 MH099045 and R01
MH113852 to M.J.H. and P30 EY026878 to the Yale Vision Core), the Yale Kavli
Institute for Neuroscience (M.J.H.), and a Yale University Brown-Coxe post-
doctoral fellowship (A.P.).
Experiments were conceived and designed by A.P. and M.J.H. Data were ac-
quired by A.P. Analyses and interpretation were designed and carried out by
A.P., H.B., and M.J.H. Manuscript was written by A.P. and M.J.H.
DECLARATION OF INTERESTS
The authors declare no competing interests.
6Cell Reports 32, 107970, July 28, 2020
Received: November 20, 2019
Revised: January 28, 2020
Accepted: July 8, 2020
Published: July 28, 2020
Albergaria, C., Silva, N.T., Pritchett, D.L., and Carey, M.R. (2018). Locomotor
activity modulates associative learning in mouse cerebellum. Nat. Neurosci.
Atallah, B.V., Bruns, W., Carandini, M., and Scanziani, M. (2012). Parvalbumin -
expressing interneurons linearly transform cortical responses to visual stimuli.
Neuron 73, 159–170.
Blake, D.T., Heiser, M.A., Caywood, M., and Merzenich, M.M. (2006). Experi-
ence-dependent adult cortical plasticity requires cognitive association be-
tween sensation and reward. Neuron 52, 371–381.
Cardin, J.A., Carle
´n, M., Meletis, K., Knoblich, U., Zhang, F., Deisser-
oth, K., Tsai, L.H., and Moore, C.I. (2009). Driving fast-spiking cells in-
duces gamma rhythm and controls sensory responses. Nature 459,
Chen, J.L., Carta, S., Soldado-Magraner, J., Schneider, B.L., and Helm-
chen, F. (2013a). Behaviour-dependent recruitment of long-range projec-
tion neurons in somatosensory cortex. Nature 499, 336–340.
sensitive ﬂuorescent proteins for imaging neuronal activity. Nature 499,
Chiu, C.Q., Lur, G., Morse, T.M., Carnevale, N.T., Ellis-Davies, G.C., and Hig-
ley, M.J. (2013). Compartmentalization of GABAergic inhibition by dendritic
spines. Science 340, 759–762.
Chiu, C.Q., Martenson, J.S., Yamazaki, M., Natsume, R., Sakimura, K., To-
dependent potentiation of dendritic GABAergic inhibition. Neuron 97, 368–
Chiu, C.Q., Barberis, A., and Higley, M.J. (2019). Preserving the balance:
diverse forms of long-term GABAergic synaptic plasticity. Nat. Rev. Neurosci.
Cichon, J., and Gan, W.B. (2015). Branch-speciﬁc dendritic Ca
persistent synaptic plasticity. Nature 520, 180–185.
Cooke, S.F., and Bear, M.F. (2010). Visual experience induces long-term
potentiation in the primary visual cortex. J. Neurosci. 30, 16304–16313.
Dana, H., Mohar, B., Sun, Y., Narayan, S., Gordus, A., Hasseman, J.P., Tse-
gaye, G., Holt, G.T., Hu, A., Walpita, D., et al. (2016). Sensitive red protein cal-
cium indicators for imaging neural activity. Elife 5, e12727.
Dubbs, A., Guevara, J., and Yuste, R. (2016). moco: fast motion correction for
calcium imaging. Front. Neuroinform. 10,6.
Freeman, J.H., and Steinmetz, A.B. (2011). Neural circuitry and plasticity
mechanisms underlying delay eyeblink conditioning. Learn. Mem. 18,
Frenkel, M.Y., Sawtell, N.B., Diogo, A.C., Yoon, B., Neve, R.L., and Bear, M.F.
(2006). Instructive effect of visual experience in mouse visual cortex. Neuron
Gavornik, J.P., and Bear, M.F. (2014). Learned spatiotemporal sequence
recognition and prediction in primary visual cortex. Nat. Neurosci. 17,
Goltstein, P.M., Coffey, E.B., Roelfsema, P.R., and Pennartz, C.M. (2013).
In vivo two-photon Ca2+ imaging reveals selective reward effects on stim-
ulus-speciﬁc assemblies in mouse visual cortex. J. Neurosci. 33, 11540–
Hayama, T., Noguchi, J., Watanabe, S., Takahashi, N., Hayashi-Takagi, A., El-
lis-Davies, G.C., Matsuzaki, M., and Kasai, H. (2013). GABA promotes the
competitive selection of dendritic spines by controlling local Ca2+ signaling.
Nat. Neurosci. 16, 1409–1416.
Heiney, S.A., Wohl, M.P., Chettih, S.N., Ruffolo, L.I., and Medina, J.F.
(2014). Cerebellar-dependent expression of motor learning during
eyeblink conditioning in head-ﬁxed mice. J. Neurosci. 34,14845–
Ladle, D.R., and Arber, S. (2005). A developmental switch in the
response of DRG neurons to ETS transcription factor signaling. PLoS
Biol. 3, e159.
Jurjut, O., Georgieva, P., Busse, L., and Katzner, S. (2017). Learni ng enhances
sensory processing in mouse V1 before improving behavior. J. Neurosci. 37,
Khan, A.G., Poort, J., Chadwick, A., Blot, A., Sahani, M., Mrsic-Flogel, T.D.,
and Hofer, S.B. (2018). Distinct learning-induced changes in stimulus selec-
tivity and interactions of GABAergic interneuron classes in visual cortex. Nat.
Neurosci. 21, 851–859.
Kwon, S.E., Yang, H., Minamisawa, G., and O’Connor, D.H. (2016). Sensory
and decision-related activity propagate in a cortical feedback loop during
touch perception. Nat. Neurosci. 19, 1243–1249.
Lee, S.H., Kwan, A.C., Zhang, S., Phoumthipphavong, V., Flannery, J.G., Mas-
manidis, S.C., Taniguchi, H., Huang, Z.J., Zhang, F., Boyden, E.S., et al. (2012).
Activation of speciﬁc interneurons improves V1 feature selectivity and visual
perception. Nature 488, 379–383.
Li, Z., Yan, A., Guo, K., and Li, W. (2019). Fear-related signals in the primary
visual cortex. Curr. Biol. 29, 4078–4083.e4072.
Lur, G., Vinck, M.A., Tang, L., Cardin, J.A., and Higley, M.J. (2016). Pro jection-
speciﬁc visual feature encoding by layer 5 cortical subnetworks. Cell Rep. 14,
Makino, H., and Komiyama, T. (2015). Learning enhances the relative
impact of top-down processing in the visual cortex. Nat. Neurosci. 18,
Malenka, R.C., and Bear, M.F. (2004). LTP and LTD: an embarrassment of
riches. Neuron 44, 5–21.
Moreno-Bote, R., Beck, J., Kanitscheider, I., Pitkow, X., Latham, P., and
Pouget, A. (2014). Information-limiting correlations. Nat. Neurosci. 17,
Poort, J., Khan, A.G., Pachitariu, M., Nemri, A., Orsolic, I., Krupic, J., Bauza,
M., Sahani, M., Keller, G.B., Mrsic-Flogel, T.D., and Hofer, S.B. (2015).
Learning enhances sensory and multiple non-sensory representations in pri-
mary visual cortex. Neuron 86, 1478–1490.
Ress, D., and Heeger, D.J. (2003). Neuronal correlates of perception in early
visual cortex. Nat. Neurosci. 6, 414–420.
Rutkowski, R.G., and Weinberger, N.M. (2005). Encoding of learned impor-
tance of sound by magnitude of representational area in primary auditory cor-
tex. Proc. Natl. Acad. Sci. USA 102, 13664–13669.
Schoups, A., Vogels, R., Qian, N., and Orban, G. (2001). Practising orienta-
tion identiﬁcation improves orientation coding in V1 neurons. Nature 412,
Shuler, M.G., and Bear, M.F. (2006). Reward timing in the primary visual cortex.
Science 311, 1606–1609.
Siegel, J.J., Taylor, W., Gray, R., Kalmbach, B., Zemelman, B.V., Desai, N.S.,
Johnston, D., and Chitwood, R.A. (2015). Trace eyeblink conditioning in mice is
dependent upon the dorsal medial prefrontal cortex, cerebellum, and amyg-
dala: behavioral characterization and functional circuitry. eNeuro 2,
Tang, L., and Higley, M.J. (2020). Layer 5 circuits in V1 differentially control vi-
suomotor behavior. Neuron 105, 346–354.e345.
Fu, Y., Lu, J., Lin, Y., et al. (2011). A resource of Cre driver lines for ge-
netic targeting of GABAergic neurons in cerebral cortex. Neuron 71,
D.J.,Mayford,M.,Kandel,E.R.,and Tonegawa, S. (1996). Subregion-
Cell Reports 32, 107970, July 28, 2020 7
and cell type-restricted gene knockout in mouse brain. Cell 87, 1317–
Vinck, M., Batista-Brito, R., Knoblich, U., and Cardin, J.A. (2015). Arousal and
locomotion make distinct contributions to cortical activity patterns and visual
encoding. Neuron 86, 740–754.
Wang, Y., Wu, W., Zhang, X., Hu, X., Li, Y., Lou, S., Ma, X., An, X., Liu, H., Peng,
J., et al. (2016). A mouse model of visual perceptual learning reveals alterations
in neuronal coding and dendritic spine density in the visual cortex. Front. Be-
hav. Neurosci. 10,42.
Wiest, M.C., Thomson, E., Pantoja, J., and Nicolelis, M.A. (2010). Changes in
S1 neural responses during tactile discrimination learning. J. Neurophysiol.
Yan, Y., Rasch, M.J., Chen, M., Xiang, X., Huang, M., Wu, S., and Li, W. (2014).
Perceptual training continuously reﬁnes neuronal population codes in primary
visual cortex. Nat. Neurosci. 17, 1380–1387.
Yang, T., and Maunsell, J.H. (2004). The effect of perceptual learning on
neuronal responses in monkey visual area V4. J. Neurosci. 24, 1617–1626.
8Cell Reports 32, 107970, July 28, 2020
KEY RESOURCES TABLE
Further information and requests for resources and reagents should be directed to and will be fulﬁlled by the Lead Contact, Dr.
Michael J. Higley (email@example.com).
This study did not generate new unique reagents.
Data and Code Availability
The datasets and code supporting the current study have not been deposited in a public repository due to ﬁle size limitations, but are
available from the corresponding author on reasonable request. All data are presented in the paper and supplementary materials. The
datasets generated during the current study are available from the corresponding author on reasonable request.
EXPERIMENTAL MODEL AND SUBJECT DETAILS
Animals were handled in accordance with the Yale Institutional Animal Care and Use Committee and federal guidelines. C57BL/6
mice were purchased from Envigo. PV
/C57/BL6 (Jackson laboratory, RRID: IMSR_JAX:008069), SST
/C57/BL6 (Jackson lab-
oratory, RRID: IMSR_JAX:013044), VIP
/C57/BL6 (Jackson laboratory, RRID: IMSR_JAX:031628) and GluN1
tory, RRID: IMSR_JAX: 005246) mice were bred in-house from animals originally purchased from Jackson Laboratory (Hippenmeyer
et al., 2005;Taniguchi et al., 2011;Tsien et al., 1996). Animals of both sexes were used and aged 8-10 weeks old at the beginning of
the experimental procedures. All mice were group housed (2-3 same-sex animals per cage) under a 12 h/12 h light/dark cycle with
water and food provided ad libitum. From the day of the ﬁrst stereotaxic surgery, animals were fed sulfatrim mouse chow (Uniprim). All
experiments were performed during the light phase of the daily cycle. In all housing and experimental rooms, the temperature was
maintained at 23-24C, with humidity levels between 35% and 45%.
Five weeks prior to imaging and behavioral experiments, mice were injected stereotactically with an adenoassociated viral (AAV) vec-
tor driving expression of a genetically encoded calcium indicator either in non-speciﬁc neuron populations (AAV5-syn-
GCamP6s, C57BL/6 mice), targeted populations of interneurons (AAV5-syn-ﬂex-GCamp6f, PV
REAGENT or RESOURCE SOURCE IDENTIFIER
Bacterial and Virus Strains
AAV5-Syn-Flex-GCaMP6f-WPRE-SV40 Chen et al., 2013b Addgene Cat#100845
AAV5-Syn-GCaMP6s-WPRE-SV40 Chen et al., 2013b Addgene Cat#100843
AAV5-Syn-jGCaMP7b-WPRE-SV40 Dana et al., 2016 Addgene Cat#104489
AAV8-Ef1a-Cre-tdTomato Baylor Vector Core Baylor Vector Core ‘‘AAV8-Ef1a-Cre-tdTomato’’
Experimental Models: Organisms/Strains
c57 Bl/6 mice Envigo Catalog speciﬁed as ‘‘C57BL/6 inbred mice’’
SST-Cre mice Taniguchi et al., 2011 JAX 013044
VIP-Cre mice Taniguchi et al., 2011 JAX 031628
PV-Cre Hippenmeyer et al., 2005 JAX 008069
Conditional GluN1 mice Tsien et al., 1996 JAX 005246
Software and Algorithms
ImageJ Moco Algorithm Dubbs et al., 2016 https://github.com/NTCColumbia/moco
MATLAB The Mathworks Version 2018a, Statistics and Machine Learning Toolbox,
Cell Reports 32, 107970, July 28, 2020 e1
/C57/BL6 mice), or thalamocortical axonal terminals arising from the lateral geniculate nucleus (AAV5-syn-jGCaMP7b, C57BL/
6 mice) (Chen et al., 2013b;Dana et al., 2016). To examine the effects of deletion of the GluN1 subunit of the NMDA-type glutamate
animals were injected with AAV5-syn-GCamP6s and dilute AAV5-EF1a-iCre-TdTomato (Baylor Vector Core,
1:300 in saline). Mice were anesthetized with isoﬂurane and received subcutaneous injection of an analgesic and anti-inﬂammatory
drug (Carprofen 2mg/ml in saline, 5ml/kg). Mice were then placed in a stereotaxic apparatus (David Kopf Instruments) and their scalp
shaved and disinfected with 70% ethanol. Ocular lubricant was used to protect animals’ eyes from drying during surgery. To deliver
the viruses into the left visual cortex (V1, coordinates AP: 0.35 cm; LM: 0.25 cm; DV: 0.055 cm) and dorsal lateral geniculate
nucleus (dLGN, coordinates AP: 0.235 cm; LM: 0.2 cm; DV: 0.29 cm), we used a Nanoﬁl 36G beveled needle inserted through
a small craniotomy. The syringe was connected to a Micro Syringe Pump (World Precision Instruments) used to deliver virus (0.5-
0.7 mL or 0.2 mL of total volume for cortical or thalamic injections respectively, 100 nl/min). After the injection, the needle remained
in the brain for 5 min to allow for diffusion of the virus. Seven to ten days after viral injections, animals were implanted with cranial
windows and titanium head-posts. Subjects were anesthetized with isoﬂurane and received subcutaneous injection of an analgesic
and anti-inﬂammatory drug (Carprofen 2mg/ml in saline, 5ml/kg). Skin and periosteum were reﬂected and the skull was cleaned with
saline and dried. Two screws were set into the skull over the right hemisphere, and a custom-made titanium headpost (~2g) was ﬁxed
to the bone with dental cement (Metabond, Parkell). A craniotomy (approx. 4 mm
) was made over the left V1 and a bilayer cranial
window (5x5mm No. 1 cover glass and 3.5x3.5 No. 1 cover glass, bonded using ultraviolet-curing adhesive, Norland Products) was
inserted into the opening and ﬁxed to the skull using instant glue (Krazy Glue) and dental cement (Metabond, Parkell).
The mouse was head-ﬁxed on a freely-moving wheel (15 cm diameter) under the objective of a 2-photon microscope located in a
light-proof chamber. Visual stimuli were displayed on a computer monitor positioned normal to and 22 cm away from the right
eye. Air-puffs (10-12 psi) were delivered to the right cornea via a small metal cannula coupled to a compressed air tank and gated
by a solenoid (Clark Solutions). Timing of the air puff was coordinated with the visual stimulus using custom-written MATLAB codes
through a NI-DAQmx board (PCIe-6315, National Instruments) at a sampling rate of 5 kHz. Eyelid closure and pupil diameter were
continuously recorded using a monochromatic CMOS camera (PointGrey FlyCapture3) at a frame rate of 33 fps. An infrared LED
array was used to illuminate the eye. All signals, including the timing of the visual stimuli, the air puffs, the wheel position, video frame
ticks, and microscope resonant scanner frame ticks were digitized (5 kHz) and collected through a Power 1401 (CED) acquisition
board using Spike 2 software.
Starting nine days prior to training, mice were habituated to head-ﬁxation while placed on a freely-moving running wheel (15 cm diam-
eter), gradually increasing from a few minutes to one hour over this period. After habituation, training consisted of 75 daily presen-
tations to the right eye of a 500 ms visual stimulus (CS+) presented on a gamma-corrected monitor (20sinusoidally drifting grating,
0.05 cycles per degree, 1 cycle/sond, 100% contrast). For each animal, the stimulus location was ﬁxed in one of nine 3x3 sub-regions
of the screen that evoked the largest population response in the ﬁeld of view. Each stimulus co-terminated with a 50 ms air-puff
directed to the ipsilateral cornea. Training was carried out over 14 consecutive days (Days 1-14). In addition to this protocol, on
the day preceding training (Day 0) and the day following training (Day 15), each animal was presented with 50 CS presentations in
the absence of a coupled air-puff. For all training days, the inter-trial interval was 9-13 s, with each trial value randomly selected
from a ﬂat hazard distribution.
Imaging was carried out using a two-photon Movable Objective Microscope (MOM) with a galvo-resonant scanner (Sutter Instru-
ments) through a 25x, 1.05 NA objective (Olympus) coupled to a Ti-sapphire laser (MaiTai eHP DeepSee, SpectraPysics) tuned to
920 nm. Collection of tdTomato images were carried out at 1000 nm. Images were acquired using ScanImage 2017 (Vidrio) at
~30 Hz and a resolution of 256x256. The microscope and the perimeter of the objective were tightly wrapped in blackout material
to prevent light contamination from the LCD screen. Somata of layer 2/3 neurons were imaged at approximately 180-300 mm depth
relative to the brain surface (Lur et al., 2016). Thalamocortical axons in layer 4 were imaged at 330-460 mm depth. Chronic imaging of
neurons did not alter cell health as measured by the spontaneous activity of single cells (Figure S1).
QUANTIFICATION AND STATISTICAL ANALYSIS
Details for all statistical analyses, including statistical tests used, exact value of n, what n represents, and precision measures (e.g.,
mean, SEM) are provided in the Results section and in Table S1.
Eyeblink videos were analyzed with custom MATLAB scripts as previously described (Tang and Higley, 2020). Brieﬂy, gray-scale im-
ages from each training session were binarized to maximize the contrast between the eye (white) and surrounding fur (black). A region
of interest around the eye was manually deﬁned, and the time-varying proportion of white to dark pixels was used as a readout of eye
e2 Cell Reports 32, 107970, July 28, 2020
closure. These data were normalized by the 5th and 95th percentile values for each session, resulting in a range of 0 to 1, correspond-
ing to a fully open and fully closed eye, respectively. The conditioned response (CR) was deﬁned as the maximum eye closure during
the 450 ms window between visual stimulus and air-puff onset. The unconditioned response (UR) was deﬁned as the maximum eye
closure within a 500 ms window from the onset of the air-puff. Trials were identiﬁed as correct if the CR:UR ratio was larger than 0.1.
Trials were excluded from analysis if the eye closed > 10% within a 2 s window prior to visual stimulus onset. Spontaneous blinks (>
10% eye closure) were detected during the inter-trial-intervals. The spontaneous blink rate was calculated as the average number of
blinks per 450 ms interval to compare with the behavioral analysis window. Pupil size and locomotion (running speed) data were bi-
narized using the median normalized value and a cutoff of 1 cm/sec, respectively.
Imaging analysis and statistics
Images of neuronal activity were ﬁrst motion-corrected using the Moco plugin for ImageJ (Dubbs et al., 2016). The ﬁrst 150 frames of
each movie were used as a template with the maximal distance to be translated in the x and y directions between 20 and 40 pixels.
Videos from successive days were translated onto the ﬁrst-day template. Regions of interest (ROIs) were selected manually (Lur
et al., 2016). Further data analysis was performed using custom MATLAB scripts. Fluorescence (F) over time was measured by aver-
aging within the ROI, and contamination from the surrounding neuropil was removed with a discounting coefﬁcient of 0.7 (Chen et al.,
2013b). DF/F was calculated as (F-F
, where F
was the lowest 10% of values from the neuropil-subtracted trace for each session.
To relate neuronal activity to behavior, we divided the data into 3 distinct learning phases of equal duration based on average per-
formance: early (days 1 to 3), mid (days 4 to 6), and late (days 12-14). All data were grouped within a single phase. The magnitude of
the visual response on each trial was deﬁned in one of two ways: (1) the mean DF/F in a 300ms time window after visual stimulus
onset, subtracting the mean DF/F over the 300 ms preceding the stimulus or (2) the slope of the visual response measured as the
linear ﬁt to DF/F within 300ms window following visual stimulus onset. Preliminary analyses revealed that the two measures were
strongly correlated with each other but the slope value yielded signiﬁcantly lower variation across trials (Figure S1). Thus, slope
was primarily used for subsequent analyses. Machine learning was used to decode neuronal activity and assess the accuracy of pre-
dicting either the visual stimulus or the conditioned response. A linear Support Vector Machine (SVM) classiﬁer was trained and
tested by using an available MATLAB toolkit, libsvm, with 5-fold cross-validation and bootstrapping to achieve balanced labels
for correct versus incorrect trials. To determine prediction accuracy for the visual stimulus, for each trial we quantiﬁed the slope
of DF/F for the 300ms preceding and following the visual stimulus onset. We also identiﬁed a similar matched pair of values obtained
for a randomly selected pseudo-onset during the inter-stimulus period. The model was trained to classify the presence of a visual
stimulus (i.e., distinguish trials from pseudo-trials). A similar approach was used to determine prediction accuracy for single cells
and for the population. To determine prediction accuracy for the conditioned response, we used only paired slope values corre-
sponding to actual stimulus onset times and trained the model to classify correct versus incorrect trials. Again, this approach was
used to determine single cell and population performance. To determine how population size inﬂuences behavioral prediction accu-
racy, we repeatedly trained the model on randomly drawn neuronal subsets of varying size. To investigate the relationship between
average single neuron performance and population performance, we simulated a distribution of 80 independent slope values for 75
trials, matching the means and variances of the actual neuronal data on correct and incorrect trials and across learning phases. We
then used these simulated values to train the same SVM model and assess simulated accuracy.
For all statistical comparisons of neuronal data, values were averaged within each animal, and ﬁnal analyses were performed with
animal number as the degree of freedom. We opted for this approach given the inherent lack of independence for cells imaged within
the same animal. The analysis of simulated neuronal performance was an exception to this approach, given the inherent structure of
the data. Statistical tests included paired and one-sample t tests using an alpha value of 0.05, Kolmogorov-Smirnoff tests, and Spear-
man’s rank correlation. Planned comparisons were explicitly carried out for early and late learning phases (mid-phase data shown
only for completeness of data representation).
Cell Reports 32, 107970, July 28, 2020 e3