Article | Open | Published:

# Feature selectivity is stable in primary visual cortex across a range of spatial frequencies

## Abstract

Reliable perception of environmental signals is a critical first step to generating appropriate responses and actions in awake behaving animals. The extent to which stimulus features are stably represented at the level of individual neurons is not well understood. To address this issue, we investigated the persistence of stimulus response tuning over the course of 1–2 weeks in the primary visual cortex of awake, adult mice. Using 2-photon calcium imaging, we directly compared tuning stability to two stimulus features (orientation and spatial frequency) within the same neurons, specifically in layer 2/3 excitatory neurons. The majority of neurons that were tracked and tuned on consecutive imaging sessions maintained stable orientation and spatial frequency preferences (83% and 76% of the population, respectively) over a 2-week period. Selectivity, measured as orientation and spatial frequency bandwidth, was also stable. Taking into account all 4 parameters, we found that the proportion of stable neurons was less than two thirds (57%). Thus, a substantial fraction of neurons (43%) were unstable in at least one parameter. Furthermore, we found that instability of orientation preference was not predictive of instability of spatial frequency preference within the same neurons. Population analysis revealed that noise correlation values were stable well beyond the estimated decline in monosynaptic connectivity (~250–300 microns). Our results demonstrate that orientation preference is stable across a range of spatial frequencies and that the tuning of distinct stimulus features can be independently maintained within a single neuron.

## Introduction

The extent to which stimulus tuning features are reliability represented at the level of single neurons long-term, across days remains an open question. On one hand, a number of studies report that stimulus representation within single neurons is generally stable in baseline conditions1,2,3,4,5,6,7. Consistent with the observation that in primary visual cortex (V1) subthreshold input onto dendritic spines exhibits stable orientation tuning8, longitudinal imaging of neuronal soma revealed that in the absence of training, orientation preference is stable, for the low spatial frequency examined5,6. On the other hand, studies in both motor and sensory cortex in awake animals report that stimulus-response tuning curves are variable either prior to or during training and become more stable after reinforced learning9,10. For example, in baseline conditions orientation selectivity was found to be stable in approximately only 20–50% of neurons tracked in the primary visual cortex (V1) of awake mice tested on two different orientations presented at a single spatial frequency. Orientation selectivity was stabilized after the mice learned to successfully discriminate orientated bars for a reward11. Similarly, in motor cortex within-neuron tuning variability was found to decrease after training in primates and rodents1,12,13. Training-induced stabilization is also observed in the hippocampus14,15. Furthermore, it has been suggested that only a small fraction of the neuronal population needs to maintain feature selectivity to achieve stable perception2,7 and to mediate recovery of response selectivity within the local network following perturbation5,10. Computational studies have referred to highly stable neurons capable of facilitating network recovery following perturbation as ‘anchor cells’. Taken together, evidence suggests that for low spatial frequency there does exist a stable population of neurons in V1 resistant to perturbation. However, the extent to which these observations apply to higher, behaviorally relevant spatial frequencies is unknown. Furthermore, the extent to which multiple stimulus tuning features are reliability represented in a single V1 neuron is unclear.

To better define the fraction of neurons that consistently respond to spatial frequencies known to be well-represented in mouse V1, we systematically characterized the tuning stability of two stimulus features: orientation and spatial frequency in awake mice. In addition we considered population stability by examining signal and noise correlations. We found that in the absence of any experimental training signals or perturbation, orientation preference is highly stable across a range of spatial frequencies in tuned neurons. Consistent with this observation, we found that cross-session pairwise signal correlations were highly stable; cross-session correlation values were >0.75. These data confirm that in awake mice, orientation preference across a range of spatial frequencies is highly stable in tuned neurons. However when considering a larger parameter space of stimulus response features, our data demonstrate that within a single neuron aspects of stimulus representation can drift while orientation preference remains stable. Our results provide insight into the basis by which stable visual perception is maintained during normal experience and daily interactions with the environment.

## Results

The majority of visually responsive neurons in mouse primary visual cortex (V1) prefer spatial frequencies of 0.15 cycles per degree (cpd) or lower16. A previous study examined stability of orientation preference and selectivity specifically at 0.04 cpd in anesthetized mice and found a substantial fraction of neurons were stable in control conditions5, and second study in awake mice reported considerable stability of orientation tuning specifically at 0.05 cpd6. Our goal was to more precisely define the fraction of persistently tuned neurons in V1 as well as to examine a range of spatial frequencies. Using 2-photon calcium imaging in awake head-fixed transgenic mice expressing GCaMP6f exclusively in excitatory neurons17 raised in standard, non-enriched housing conditions, we compared the tuning stability of orientation and spatial frequency within individual neurons and at the population level. Static gratings were presented at varying orientations and spatial frequencies (range, 0.0125–0.15 cpd). Mice were positioned to passively view the stimuli, without reward. To control for behavioral state, we restricted our analysis to trials in which mice were not running. Two-dimensional (2-D) tuning curves were generated to quantify individual neuron responses (Figs 1, S1). A total of 312 stimuli were presented, each for 250 ms, in random order without an intervening gray screen18,19. Given that we used a rapid presentation of visual stimuli and the decay kinetics of GCaMP6f are prolonged relative to actual spike events8, neuronal signals were deconvolved to estimate spike event times in order to more accurately assign responses to each stimuli (Figs 1E, S2). Low spiking activity likely goes undetected when using calcium imaging in conjunction with deconvolution, so it possible that weakly responsive neurons are scored as non-responsive in our data set. Neurons were segmented and registered across sessions (Fig. S3). Neurons successfully registered across sessions are referred to as ‘tracked’.

Two data sets were acquired and analyzed. Neurons were imaged across two sessions, spanning the course of one week (Data Set 1: 6 ± 2 days apart, 4 mice, Figs 15) and two weeks (Data Set 2: 14 ± 2 days apart, 4 mice, Fig. 6).

### Orientation preference is stable across a range of spatial frequencies

In the first data set, a total of 347 neurons were tracked from 4 mice. 56% (196/347) of the tracked neurons exhibited a response to at least one of the stimuli in our stimulus set on session 1 and/or session 2. We cannot make conclusions regarding the stability of neurons that did not respond in either session, because it is possible that the optimal stimulus was not presented to these neurons. Of the tracked neurons, 180 were responsive and well-fit by a 2-dimensional Gaussian function (tuned) on the first session. Pooled from 4 animals, 86% (154) of the tracked neurons were responsive and tuned on both sessions (Fig. 2), this represents a 14% drop in number of tuned and responsive neurons on session 1 compared to session 2. We examined stability of orientation preference as well as orientation bandwidth across a range of spatial frequencies. For neurons identified as being reliably responsive in both imaging sessions, the preferred orientation of individual neurons on the first imaging session was highly correlated with their preferred orientation on the second imaging session (Pearson’s r = 0.980, p < 0.00001; Fig. 2C). Less than twenty percent of the neurons had a shift in preferred orientation that was larger than 9°, the median increment of the stimulus space tested. Orientation tuning bandwidth was also stable, although there was greater heterogeneity in this feature among neurons in terms of magnitude of shift, compared to orientation preference as indicated by a lower r value (Pearson’s r = 0.720, p < 0.00001; Fig. 2D). In terms of number of unstable neurons, less than 20% had a shift greater than 9°. Twenty-nine percent (44/154) of the neurons exhibited a cross-session change >9° in at least one of the two orientation parameters. To provide a simple summary of the results, we refer to cross-session changes in orientation preference or bandwidth greater than 9° as unstable. Similarly, cross-session changes in spatial frequency preference or bandwidth greater than 0.0125 cpd (the spacing of vertical and horizontal stimulus gratings), are referred to as unstable. To confirm that orientation preference was stable in neurons preferring higher spatial frequencies, we divided the population into two groups (high and low spatial frequency) at the median of the distribution, 0.05 cpd (Fig. 2B). Stability of orientation preference for high spatial frequency-preferring neurons was within the stability range of neurons preferring lower spatial frequencies (Fig. 2E,F). Stability of bandwidth was also overlapping between the two groups (Fig. 2G).

Given our experimental design, we were in a position to examine the stability of spatial frequency preference. Similar to orientation preference, we found that preferred spatial frequency was highly stable (Pearson’s r = 0.940, p < 0.00001; Fig. 3A). Also similar to orientation bandwidth, we found that the bandwidth of spatial frequency tuning was stable. As with orientation tuning, there was greater heterogeneity in the magnitude of shift in bandwidth compared to preference as indicated by a lower r value (Pearson’s r = 0.648, p < 0.00001; Fig. 3B). Taken together, these data confirm that in tuned neurons, individual tuning features are stable in awake mice across a range of spatial frequencies and establish that spatial frequency tuning is stable as well as orientation tuning (Fig. 3C). The proportion of stable neurons is summarized in Table 1.

We next sought to test whether instability of one feature co-varied with another across the population of tuned neurons (Fig. 4). We found that the magnitude of change in preferred orientation across sessions was significantly correlated with the magnitude of change in orientation bandwidth (Rank Sum r = 0.330, p < 0.0001; Fig. 4A). These data indicate that if unstable in orientation preference, the neuron is more likely to be unstable in orientation bandwidth. We confirmed that this trend holds for neurons with changes in orientation greater than 1 degree (Fig. S4). Note, not all individual neurons exhibited a correlation between these two parameters, as evident in Fig. 2. Some neurons exhibited a shift in orientation preference greater than 9 degrees and did not exhibit a shift greater than 9 degrees in orientation bandwidth. In contrast to orientation preference and orientation bandwidth, the magnitude of change in orientation preference across the population of tuned neurons was not correlated with the magnitude of change in spatial frequency preference (Rank Sum r = 0.103, p = 0.205; Fig. 4B). The relationship of stability across features is summarized in Fig. 4C. These results indicate that the mechanisms regulating stability of preferred orientation are dissociable from those that regulate stability of preferred spatial frequency, within a single neuron.

### Stability of noise correlation does not decrease with distance, measured out to 700 microns

Next we examined neural responses at the population level. As expected from the results shown in Figs 2C,D and 3A,B, pairwise correlation in mean stimulus response (i.e., signal correlation) revealed that signal correlation matrices were highly similar across imaging sessions (average Pearson’s correlation across 4 mice r = 0.867 ± 0.060; Figs 5A, S4). The cross-session similarity in signal correlation found here is consistent with previous observations in anesthetized5 and awake6 animals, although we find a higher degree of similarity than previously reported.

Correlation in trial-to-trial fluctuations of response magnitude across neuron pairs (i.e. noise correlation) is often used to infer functional connectivity20,21,22. It is generally found that both monosynaptic connection probability and noise correlation decrease as a function of spatial distance23. It was previously found that in addition to stability of orientation preference and selectivity, noise correlation among pairs of neurons within a within a 185 × 185 µm field of view is stable in anesthetized mice5. Our imaging field of view allowed us to address the extent to which stability of noise correlation dropped off with spatial distance, for distances up to 700 microns (Fig. 5). First, we found that noise correlation was stable in all mice (p < 0.0001). Pearson’s correlation r values ranged between 0.272 to 0.455 (Fig. 5A). The distribution of positive noise correlation values pooled across animals is shown in Fig. 5B. Notably, we found that the stability of noise correlation across the two imaging sessions did not change with distance. The absolute difference in noise correlations values for those pairs of neurons that exhibited positive noise correlation (Δ noise correlation) on at least one imaging session was compared to spatial distance between the neuron pairs (Fig. 5D, Pearson’s correlation r = −0.027, p = 0.436). To visualize the distance versus Δ noise correlation relationship, the spatial location of one reference neuron in relation to all of its pairs is shown in Fig. 5E. These results raise the possibility that common input contributes to the maintenance of population stability beyond what is expected for monosynaptic connectivity, which falls off at distances of 250–300 microns23.

### Stability over the course of two weeks

In a second data set, neurons were tracked over the course of two weeks (14 ± 2 days). A total of 330 neurons were tracked in 4 mice. One of the mice from the first data set was included in the second data set. Of the tracked neurons, 118 were responsive and well-fit by a 2-dimensional Gaussian function (tuned) on the first session. Pooled across animals, 76% (90) of the tracked neurons were responsive and tuned on both sessions (Fig. 6A). Overall, the results for the 2-week data set were similar to the 1-week data set. The preferred orientation of individual neurons on the first imaging session was highly correlated with their preferred orientation on the second imaging session (Pearson’s r = 0.964, p < 0.00001; Fig. 6B). Less than twenty percent of the neurons had a shift in preferred orientation that was larger than 9 degrees. Orientation tuning bandwidth was also stable, although there was greater heterogeneity in this feature among neurons in terms of magnitude of shift, compared to orientation preference as indicated by a lower r value (Pearson’s r = 0.777, p < 0.00001). In terms of number of unstable neurons, 8/90 had a shift greater than 9 degrees. Twenty-two percent (20/90) of the neurons were unstable in at least one of the two orientation parameters. Margolis et al. (2013)3 raise the possibility that weakly selective neurons may be less stable than sharply tuned neurons. We examined our data set, and found that stability of orientation preference did not correlate with orientation tuning bandwidth (Pearson’s r = 0.0489, p = 0.647). Similar to the 1-week data set, preferred spatial frequency on the first imaging session was highly correlated with the preferred orientation on the second imaging session (Pearson’s r = 0.922, p < 0.00001; Fig. 6C), and the bandwidth of spatial frequency was also stable (Pearson’s r = 0.701, p < 0.00001). The proportion of stable neurons is summarized in Table 2. We noted that in the 1-week data set 14% of the neurons responsive on session 1 were not responsive on session 2 (pooled from all 4 animals). The mean across animals was 12.9 ± 2% (±sem). Similarly, the mean across animals in the 2-week data set was 16.1 ± 12% (±sem). There was a similar fraction of neurons that were responsive and tuned in session 2 only (in other words, not tuned and/or responsive in session 1), in both the 1 and 2-week data sets (Fig. 6A). Thus, there was not a systematic loss of responsiveness at the population level over time.

In terms of estimating the fraction of neurons that could serve as potential anchor cells, if considering only the most stable neurons, our results indicate that approximately one quarter (23%) of the neurons that were tracked are potential candidates for the single feature of orientation preference. On the other hand, the proportion of neurons available to serve as anchor cells simultaneously for all 4 measured features across a 2 week span is estimated to be 15% (51/330).

## Discussion

The response properties of a neuron are largely determined by its synaptic input. Synapses themselves are not static structures. Even in the adult, synapses continuously change their size and strength, and are composed of liable proteins, which turnover on time scales of hours to days24. In addition, postsynaptic dendritic spines display structural turnover, in the absence of training signals25. In the visual cortex approximately 1% of dendritic spines turn over on a daily basis26. However, neural networks comprised of these unstable components are capable of producing reliable stimulus-response output. Reliable output can emerge at the neuronal population level27,28,29, or alternatively exist at the level of single neurons10. To clarify the extent to which stability of single neuron response properties may contribute to reliable visual processing, we systematically examined stability of response tuning to both spatial frequency and orientation stimulus features in primary visual cortex of awake mice.

We confirmed that orientation preference and selectivity are largely stable and demonstrated that this stability is true for higher spatial frequencies, as well as low spatial frequencies which was previous observed5,6. Taking into account all four tuning parameters (preferred orientation, orientation bandwidth, preferred spatial frequency, and spatial frequency bandwidth) simultaneously in individual neurons, we found that less than half of the tuned neurons were identified as exhibiting high stability in all four parameters over the time span of two weeks. Furthermore, the magnitude of change in orientation preference was not predictive of change in spatial frequency preference. This independence suggests that the mechanisms determining stability of preferred orientation are dissociable from those that determine stability of preferred spatial frequency, within a single neuron. It will be of interest to take this into account in perturbation-recovery models such as those described by Clopath et al.10.

Given that inhibitory neurons are reported to be more stable than excitatory neurons1,7,28, we avoided confounds introduced by cell-type differences as well as depth by targeting our imaging specifically to excitatory neurons within a restricted depth of layer 2/3 (220–260 microns from the pia surface). This specificity may have contributed our finding of higher stability in signal correlation compared to previous reports. In addition, we used static gratings, devoid of directional information. This later difference across the studies raises the possibly that the representation of direction is more flexible. Indeed, studies have demonstrated that just a few hours of passive exposure are sufficient to alter direction selectivity, even in anesthetized conditions30.

To examine the relationship between response properties and local network connectivity, a seminal study combined in-vivo calcium imaging in anesthetized animals with in-vitro electrophysiological slice recordings and was able to characterize the synaptic connectivity profiles of neurons for which response tuning to natural scenes was determined in-vivo31. This work uncovered a fundamental wiring rule: V1 neurons receive weak synaptic input from many presynaptic partners with diverse response properties and strong input from a few presynaptic partners that share similar response properties. The strong recurrent excitation among similarly tuned ensembles contributes to a neuron’s selectivity by specifically amplifying a particular visual feature31. Given this basic architecture, together with our results as well other observations that there is measureable drift in tuning5,6, it is interesting to speculate that the relative contribution of strong, specifically tuned input versus weak, diffusely tuned input driving a neuron to spike threshold is subject to drift in baseline conditions.

The ability to longitudinally track the activity of individual neurons using GCamp6 as well as other genetically encoded indicators, has enabled stability to be examined using optical methods, in primary sensory cortex5,6,32, association cortex29, motor cortex1,13, and hippocampus27,33. Prior to the availability of optical approaches, there are a few cases in which stability was examined using electrophysiological methods, and these studies are largely in agreement. For example, a study using electrophysiological recording in primates found that orientation preference is stable across days34. Some discrepancies do remain between the two techniques, which could in part be related to sampling bias differences9. Taken together, an emerging principle from these longitudinal studies is that association areas such as posterior parietal cortex29 as well as the hippocampus15,27,33,35 exhibit a large degree of instability at the individual neuron level, yet maintain reliable stimulus-response output at the population level. On the other hand, response preference of individual neurons, such as whisker3, eye5, or orientation preference5,6 in primary sensory cortices is stable. Our finding that tuned neurons are highly stable in their orientation preference, across a range of spatial frequencies is consistent with this emerging principle. Furthermore, our data demonstrate that although stimulus representation of a single feature in primary cortex is stable at the level of individual neurons, when considering the representation of multiple stimulus features, the majority of neurons display drift under baseline conditions.

## Methods

### Animals and surgery

All experimental procedures were compliant with the guidelines established by the Institutional Animal Care and Use Committee of Carnegie Mellon University and the National Institutes of Health, and all experimental protocols were approved by the Institutional Animal Care and Use Committee of Carnegie Mellon University. To express the calcium indicator GCaMP6f 8 selectively in excitatory neurons36, homozygous Emx1cre mice (Jackson Laboratories, stock number 005628) were crossed with homozygous Ai93/heterozygous Camk2a-tTA mice (Jackson Laboratories, stock number 024108). Experimental mice were heterozygous for all three alleles. Mice were housed in a 12 hour/12 hour light cycle and all imaging was performed at Zeitgeber time (ZT) 14.5 ± 1, where ZT0 is lights on, and ZT 12 is lights off. Mice had ad libitum access to food and water. Each experimental mouse was housed with at least one other companion mouse. The same enrichment materials were provided in all cages, and included a Plexiglas hut and nesting material. The first data set consisted of 4 mice (3 females, 1 male) that were each imaged in two sessions spanning 6 ± 2 days. The second cohort of mice consisted of 3 different mice (3 males) that were imaged in two sessions spanning 14 ± 2 days, and one of the mice from the first cohort (1female). This mouse was imaged for a third imaging session 7 days after the second imaging session, thus the first and third image were 14 ± 2 days apart and used in the 2 week data set. A total of 7 mice (3 females, 4 males) were imaged in this study.

Mice (27–45 days old) were anesthetized with isoflurane (3% induction, 1–2% maintenance). A stainless steel bar, used to immobilize the head for recordings, was glued to the right side of the skull and secured with dental cement. A 3-mm diameter craniotomy was made over the primary visual cortex in the left hemisphere, identified by coordinates and landmarks as described37. The craniotomy was then covered with a double glass assembly in which the diameter of the inner glass was fitted to the craniotomy and sealed with dental cement. After 2 days of recovery from surgery, the area of the craniotomy and primary visual cortex were confirmed using intrinsic optical imaging as described38,39. For all mice, imaging was performed in the binocular zone of the primary visual cortex, confirmed by the location of the imaging field of view with respect to the border between primary visual cortex and higher order visual cortices.

### Data Acquisition

Two-photon calcium imaging was performed in awake head-fixed mice mounted atop a floating spherical treadmill using a resonant scanning microscope (Neurolabware) outfitted with a 16x Nikon objective (0.80 NA). A laser excitation wavelength of 920 nm was used (Coherent, Inc.); green emissions were filtered (Semrock 510/84–50), amplified (Edmund Optics 59–179), and detected with a PMT (Hamamatsu H1 0770B-40). The imaged field of view was 620 × 504 microns, pixel dimensions were 0.85 × 0.98 µm, and the acquisition rate was 15.5 Hz. Treadmill motion was recoded using a camera (Dalsa Genie M640-1/3) synchronized to the resonant scanning mirror; images were sampled at 30 Hz.

The behavioral state of animals was classified based on the motion of the treadmill. After applying a threshold on the luminance intensity of the treadmill motion images, phase correlation was computed between consecutive frames to estimate the translation between the frames. The estimated translation was converted to movement speed, taking into account the dimensions of the treadmill motion images (7.8 cm × 7.8 cm)and the acquisition rate of the camera (30 Hz). To align ball motion data with calcium imaging data, the raw movement speed was down-sampled to match the acquisition rate of calcium imaging. To define a motion threshold, the data were smoothed using a 1 s sliding window. Any continuous non-zero movement periods during which the animal’s instantaneous running speed exceeded 10 cm/s threshold for at least one frame were marked as running epochs (Fig. S5). Neural analysis was restricted to non-running trials. The 2-week data set was also analyzed with the motion threshold set to threshold 1.2 cm/s, the stability results were similar (K-S test p values comparing the distribution of cross-session changes in the 4 parameters: 0.80, 0.30, 0.42, and 0.59 Δ preferred orientation, Δ orientation bandwidth, Δ preferred spatial frequency, Δ spatial frequency bandwidth, respectively).

### Data processing: alignment, segmentation, and signal extraction

The acquired image time series were motion-corrected, and individual neurons were segmented in Suite2p toolbox40. Motion correction was done by computing the horizontal and vertical translation for each frame using phase correlation. Segmentation was accomplished by first training the classifier included in Suite2P with 30 example imaging sessions which contained approximately 40,000 segments in total. Each session contained approximately 35000 frames acquired at 15.5 Hz, covering a field of view 620 × 504 microns in area. To train the classifier, 4 different users manually labeled segments as either ‘neuron’ or ‘non-neuron’, this was accomplished by examining the mean intensity image and raw fluorescent trace of each of the 40,000 segments. The trained classifier was then used to calculate the probability that a given segment was a neuron. Segments with a calculated probability of >0.6 were labelled as neurons. The user manually inspected segments with a calculated probability in the range of 0.4–0.6 and assigned the label based on shape of segment and mean intensity image of the segment.

Amplitude of calcium transients was expressed in units of inferred spike events using Suite 2p toolbox; in this manuscript we refer to an inferred spike as an ‘event’, e. For each segment n, events en were inferred from fluorescence fn using the following model:

$${{\rm{f}}}_{n}={{\rm{e}}}_{n}\ast {\rm{k}}+{\beta }_{n}{{\rm{p}}}_{n}+{{\rm{b}}}_{n}$$

where k is the temporal kernel and bn is the baseline fluorescence. A single kernel was derived for all neurons in one imaging session, all other parameters were unique to each individual neuron. Neuropil, which is a contamination of the fluorescence signal fn from out of focus cell bodies and nearby axons and dendrites, is modeled by two parameters: pn, the time course of the neuropil contamination, and βn, the scaling coefficient. * denotes convolution. Using this model, en, k, βn, and bn were estimated by a matching pursuit algorithm with L0 constraint, in which events were iteratively added and refined until the threshold determined by the variance of the signal was met.

∆F is calculated as,

$${\rm{\Delta }}F=({{\rm{f}}}_{n}-{\beta }_{n}{{\rm{p}}}_{n})-{\rm{median}}({{\rm{f}}}_{n}-{\beta }_{n}{{\rm{p}}}_{n})$$

where fn is the raw fluorescence.

A closer inspection of a subset of inferred events revealed that some low amplitude events were likely noise and not true calcium transients, indicating a need to calibrate the Suite 2p toolbox to our data set. To calibrate, we defined a signal threshold. Event-triggered averaging was performed on neuropil subtracted calcium signals, binned by the number of events (0–2, >2–4, >4–6, >6–8, >8–10 events). The averaged calcium trace of low amplitude events had a characteristic negative transient prior to the inferred event time. To systematically remove false positive events, we examined the derivative of the average trace, 0 to 134 ms prior to the event time for each bin. Amplitudes larger than 6 events did not have this negative transient. Therefore, we rejected inferred event amplitudes of less than 6 events as false positives. Output from this calibration is shown in Fig. S2. Segments with at least one event during the course of the imaging session (after applying the 6-event threshold) were considered to be neurons.

### Identification of repeat imaged neurons

To identify neurons that were tracked across imaging sessions, we registered the two imaging sessions for each mouse using the mean intensity image of each session. The mean intensity image for a session was computed by averaging the intensity of each pixel in the aligned calcium image series across time for the entire imaging session (roughly 30000 frames). Then, the mean intensity images of the two sessions were registered, and a rigid transform (X and Y translation and rotation) was computed for the pair of images using one-plus-one evolutionary optimizer. Once the sessions were registered, the percentage of pixel overlap between the segments from two sessions was computed. Segments were accepted to be the same neuron across sessions, if the percentage of overlapping pixels with respect to both the segment from the first session and the segment from the second session was larger than 75%. On average there were 160 pixels in a given segment (Fig. S3).

### Visual Stimulation

Hartley stimuli18 were generated in real time using Psychophysics Toolbox (see http://psychtoolbox.org) in Matlab (Mathworks, Boston, MA). The stimulus was presented on a screen positioned 25 cm away from the right eye (contralateral to the imaged hemisphere) angled at 50 degrees with respect to the midline of the animal. The size of the screen was 64 cm by 40 cm, thereby subtending 142 × 96 degrees of visual angle. The maximum spatial frequency was 0.15 cycles/°, which corresponds to 12 cycles along the vertical extent of the display. The Hartley set consisted of the following gratings:

$${H}_{{k}_{x},{k}_{y}}=\pm \,{\rm{cas}}(\frac{2\pi ({k}_{x}x+{k}_{y}y)}{M})$$

where cas(x) ≡ cos(x) + sin(x) and the wavenumbers kx and ky represent the number of cycles along the horizontal and vertical axes, respectively, and these indices ran between −12 and 12, excluding the origin (kx, ky) = (0, 0). Therefore, the total number of different images in the Hartley set was ((2 × 12 + 1)2 − 1) × 2 = 1248. The responses to the four spatial phases at each combination of orientation and spatial frequency were averaged, leading to 312 locations in the orientation and spatial frequency domain. Each grating was presented for 250 ms in a consecutively in a random order. Each combination of orientation and spatial frequency was shown at least 20 times in each session. For a subset of mice imaged across the 2-week interval, gratings with even spacing in both spatial frequency and orientation were shown.

### Quantification of visual responses

We used a reverse correlation method19 to determine the amplitude of the response. The delay of the analysis window relative to the onset of the stimulus was determined by computing the timing of the peak in the stimulus-averaged events. The peak in the stimulus-averaged events was observed 194 ms to 320 ms after the stimulus was presented on the screen. Therefore, for each stimulus, the response was computed by averaging the number of events between 194 ms and 320 ms window.

For the purpose of this study, we defined a neuron to be responsive to visual stimuli when the number of events following a presentation of a visual stimulus was modulated by the stimuli presented. To test for modulation, we performed a one-way analysis of variance (ANOVA) on the event activity using stimuli as the factor for each neuron, significance was set to α = 0.01.

To estimate the preferred orientation and spatial frequency, and the respective bandwidths of responsive neurons, a two-dimensional Gaussian model was fit using nonlinear least-squared regression such that the number of events R as a function of the orientation θ and the spatial frequency φ of the stimulus is

$$R(\theta ,\phi )=\frac{A}{2\pi {\sigma }_{\theta }{\sigma }_{\phi }\sqrt{1-{\rho }^{2}}}{e}^{(-\frac{1}{2{(1-\rho )}^{2}}[\frac{{(\theta -{\mu }_{\theta })}^{2}}{{\sigma }_{\theta }^{2}}+\frac{{(\phi -{\mu }_{\phi })}^{2}}{{\sigma }_{\phi }^{2}}-\frac{2\rho (\theta -{\mu }_{\theta })(\phi -{\mu }_{\phi })}{{\sigma }_{\theta }{\sigma }_{\phi }}])}+B$$

where μθ is the preferred orientation and μφ is the preferred spatial frequency of the stimulus, and the σθ and σφ describe the widths of respective tuning. The lower bound for μφ was set at the lowest spatial frequency of the stimulus, which was 0.0125 cycles per degree. The lower bound for σφ was set at 0.001 cycles per degree. The covariance of responses for orientation and spatial frequency is captured by the correlation term ρ. A is a parameter accounting for the amplitude of the responses, B is the baseline event activity of the cell. Significance of the fit was assessed by a permutation test, α = 0.05; the 95th confidence interval was calculated by shuffling the stimulus labels of the trial-averaged responses (1000 permutations). In total 312 stimuli were shown. In rare cases, neurons that responded to 3 or fewer stimuli (sharply tuned), despite having high response reliability, did not pass the permutation test. These sharply tuned neurons with high response reliability were included in the analysis.

The bandwidths of the Gaussian tuning were described using half-width at half-maximum (HWHM). The HWHM bandwidths for both orientation and spatial frequency were calculated by

$${\rm{BW}}=\sqrt{2\ast \,\mathrm{ln}(2)}\ast \sigma$$

where σ is the width parameter of the Gaussian fit. A small number of neurons were broadly tuned in orientation (BWorientation > 60 degrees). Because orientation parameters of these neurons are not well described by the Gaussian fit, these neurons were removed from analysis.

### Computing Correlations

Signal correlation ρsig between a pair of neurons is defined as Pearson’s correlation between the average responses to stimuli41. Therefore, we computed pairwise signal correlation between neuron i and neuron j as

$${{\rm{\rho }}}_{{\rm{i}},{\rm{j}}}^{{\rm{sig}}}=\mathrm{corr}({\bar{R}}_{i},{\bar{R}}_{j})$$

where $$\bar{R}$$ is a vector of average response in number of events to each of the 312 sinusoidal gratings for the respective neuron.

Noise correlation ρnoise between a pair of neurons is the average Pearson’s correlation between the mean-subtracted single-trial responses. Noise correlation was computed as

$${\rho }_{{\rm{i}},{\rm{j}}}^{{\rm{noise}}}=\frac{{\sum }_{k=1}^{N}{\rm{corr}}({\bar{r}}_{k,i}-{{\rm{R}}}_{k,i},{\bar{r}}_{k,j}-{{\rm{R}}}_{k,j})}{N}$$

where k is the stimulus index, and $$\bar{r}$$ is a vector of individual responses for the respective neuron and the stimulus. N is the total number of stimuli.

### Statistics

To examine the stability of tuning parameters, Pearson’s correlation was used because it was expected that the comparison of the same tuning parameter between the two sessions would follow a linear relationship. For the same reason, Pearson’s correlation was used to compute the similarity of correlation matrices. However, this assumption may not be true when comparing across different tuning parameters. Therefore, Spearman’s rank correlation was used instead when comparing across different tuning parameters.

### Doxycycline treatment

During the course of this study, the presence of aberrant, large-scale oscillations in the triple-allele transgenic mice that we used was reported42. Given that large-scale oscillations could impact our interpretation of stability, we addressed this issue mid-study in the following manner. (1) We noted that no mice used in this study had detectable oscillations in the calcium signal, neither in V1 nor the region anterior to V1 contained within the 3-mm diameter window. (2) We did detect one mouse in our colony, not included in this study, which displayed low frequency oscillations in the recorded calcium signal. Out of approximately 20 mice with windows, just the one had detectable oscillations. Although we do not know for certain why our number of mice with oscillations is lower than reported42, a contributing factor could be that our mice are housed in low density conditions and are typically handled by one caretaker. In this rearing regime, mice are less stressed and are less prone to seizures early in life. (3) Upon learning about the oscillation issue, we immediately started treating our female breeders with doxycycline and maintained mice on doxycycline as recommended42. One of the mice in the 2-week stability cohort (Fig. 6) was treated. Consistent with previous finding, mice treated with doxycycline until postnatal day (P) 12 did not show GCaMP6f expression at P15 (Fig. S6). Initially introduction of doxycycline to the food supply did reduce the survival rate of the litters, but survival recovered by the third litter after doxycycline introduction: 9/11 (81.2%) dams had their first litter die, while only 1/8 had their second litter die, and 8/8 had viable litters after the third litter. We compared the 2-week stability results between the doxycycline treated mouse and those that did not receive the treatment. The stability of the tuning parameters measured in the treated mouse did not differ from those of untreated mice (two-sample KS test, Δ preferred orientation: p = 0.577, Δ preferred spatial frequency: p = 0.974, Δ orientation tuning bandwidth: p = 0.762, Δ spatial frequency tuning bandwidth, p = 0.458). In addition, signal correlation similarity from the treated mouse was comparable to signal correlation similarity of the untreated population (treated: r = 0.833; untreated: r = 0.786 ± 0.10). Finally, the percentage of neurons that remained responsive and tuned across two weeks was not different between the treated and untreated population (treated: 79.5%; untreated: 74.0 ± 19%).

Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

1. 1.

Peters, A. J., Chen, S. X. & Komiyama, T. Emergence of reproducible spatiotemporal activity during motor learning. Nature 510, 263–267 (2014).

2. 2.

Mayrhofer, J. M., Haiss, F., Helmchen, F. & Weber, B. Sparse, reliable, and long-term stable representation of periodic whisker deflections in the mouse barrel cortex. Neuroimage 115, 52–63 (2015).

3. 3.

Margolis, D. J. et al. Reorganization of cortical population activity imaged throughout long-term sensory deprivation. Nat. Neurosci. 15, 1539–1546 (2012).

4. 4.

Chen, J. L. et al. Pathway-specific reorganization of projection neurons in somatosensory cortex during learning. Nat. Neurosci. 18, 1101–1108 (2015).

5. 5.

Rose, T., Jaepel, J., Hubener, M. & Bonhoeffer, T. Cell-specific restoration of stimulus preference after monocular deprivation in the visual cortex. Science 352, 1319–1322 (2016).

6. 6.

Montijn, J. S., Meijer, G. T., Lansink, C. S. & Pennartz, C. M. A. Population-Level Neural Codes Are Robust to Single-Neuron Variability from a Multidimensional Coding Perspective. Cell Rep. 16, 2486–2498 (2016).

7. 7.

Ranson, A. Stability and Plasticity of Contextual Modulation in the Mouse Visual Cortex. Cell Rep. 18, 840–848 (2017).

8. 8.

Chen, T.-W. et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013).

9. 9.

Lutcke, H., Margolis, D. J. & Helmchen, F. Steady or changing? Long-term monitoring of neuronal population activity. Trends Neurosci. 36, 375–384 (2013).

10. 10.

Clopath, C., Bonhoeffer, T., Hubener, M. & Rose, T. Variance and invariance of neuronal long-term representations. Philos. Trans. R. Soc. Lond. B. Biol. Sci. 372 (2017).

11. 11.

Poort, J. et al. Learning Enhances Sensory and Multiple Non-sensory Representations in Primary Visual Cortex. Neuron 86, 1478–1490 (2015).

12. 12.

Ganguly, K. & Carmena, J. M. Emergence of a stable cortical map for neuroprosthetic control. PLoS Biol. 7, e1000153 (2009).

13. 13.

Huber, D. et al. Multiple dynamic representations in the motor cortex during sensorimotor learning. Nature 484, 473–478 (2012).

14. 14.

Muzzio, I. A. et al. Attention enhances the retrieval and stability of visuospatial and olfactory representations in the dorsal hippocampus. PLoS Biol. 7, e1000140 (2009).

15. 15.

Kentros, C. G., Agnihotri, N. T., Streater, S., Hawkins, R. D. & Kandel, E. R. Increased attention to spatial context increases both place field stability and spatial memory. Neuron 42, 283–295 (2004).

16. 16.

Niell, C. M. & Stryker, M. P. Highly selective receptive fields in mouse visual cortex. J. Neurosci. 28, 7520–7536 (2008).

17. 17.

Madisen, L. et al. A robust and high-throughput Cre reporting and characterization system for the whole mouse brain. Nat. Neurosci. 13, 133–140 (2010).

18. 18.

Ringach, D. L. et al. Spatial clustering of tuning in mouse primary visual cortex. Nat. Commun. 7, 12270 (2016).

19. 19.

Ringach, D. L., Sapiro, G. & Shapley, R. A subspace reverse-correlation technique for the study of visual neurons. Vision Res. 37, 2455–2464 (1997).

20. 20.

Bryant, H. L. J., Marcos, A. R. & Segundo, J. P. Correlations of neuronal spike discharges produced by monosynaptic connections and by common inputs. J. Neurophysiol. 36, 205–225 (1973).

21. 21.

Aertsen, A. M., Gerstein, G. L., Habib, M. K. & Palm, G. Dynamics of neuronal firing correlation: modulation of ‘effective connectivity’. J. Neurophysiol. 61, 900–917 (1989).

22. 22.

Shadlen, M. N. & Newsome, W. T. The variable discharge of cortical neurons: implications for connectivity, computation, and information coding. J. Neurosci. 18, 3870–3896 (1998).

23. 23.

Rosenbaum, R., Smith, M. A., Kohn, A., Rubin, J. E. & Doiron, B. The spatial structure of correlated neuronal variability. Nat. Neurosci. 20, 107–114 (2017).

24. 24.

Ehlers, M. D. Activity level controls postsynaptic composition and signaling via the ubiquitin-proteasome system. Nat. Neurosci. 6, 231–242 (2003).

25. 25.

Holtmaat, A. & Svoboda, K. Experience-dependent structural synaptic plasticity in the mammalian brain. Nat. Rev. Neurosci. 10, 647–658 (2009).

26. 26.

Hofer, S. B., Mrsic-Flogel, T. D., Bonhoeffer, T. & Hubener, M. Experience leaves a lasting structural trace in cortical circuits. Nature 457, 313–317 (2009).

27. 27.

Ziv, Y. et al. Long-term dynamics of CA1 hippocampal place codes. Nat. Neurosci. 16, 264–266 (2013).

28. 28.

Liberti, W. A. et al. Unstable neurons underlie a stable learned behavior. Nat. Neurosci. 19, 1665–1671 (2016).

29. 29.

Driscoll, L. N., Pettit, N. L., Minderer, M., Chettih, S. N. & Harvey, C. D. Dynamic Reorganization of Neuronal Activity Patterns in Parietal Cortex. Cell 170, 986–999.e16 (2017).

30. 30.

Li, Y., Van Hooser, S. D., Mazurek, M., White, L. E. & Fitzpatrick, D. Experience with moving visual stimuli drives the early development of cortical direction selectivity. Nature 456, 952–956 (2008).

31. 31.

Cossell, L. et al. Functional organization of excitatory synaptic strength in primary visual cortex. Nature 518, 399–403 (2015).

32. 32.

Mank, M. et al. A genetically encoded calcium indicator for chronic in vivo two-photon imaging. Nat. Methods 5, 805–811 (2008).

33. 33.

Dombeck, D. A., Harvey, C. D., Tian, L., Looger, L. L. & Tank, D. W. Functional imaging of hippocampal place cells at cellular resolution during virtual navigation. Nat. Neurosci. 13, 1433–1440 (2010).

34. 34.

Tolias, A. S. et al. Recording chronically from the same neurons in awake, behaving primates. J. Neurophysiol. 98, 3780–3790 (2007).

35. 35.

Mankin, E. A., Diehl, G. W., Sparks, F. T., Leutgeb, S. & Leutgeb, J. K. Hippocampal CA2 activity patterns change over time to a larger extent than between spatial contexts. Neuron 85, 190–201 (2015).

36. 36.

Madisen, L. et al. Transgenic mice for intersectional targeting of neural sensors and effectors with high specificity and performance. Neuron 85, 942–958 (2015).

37. 37.

Kuhlman, S. J., Tring, E. & Trachtenberg, J. T. Fast-spiking interneurons have an initial orientation bias that is lost with vision. Nat. Neurosci. 14, 1121–1123 (2011).

38. 38.

Pafundo, D. E., Nicholas, M. A., Zhang, R. & Kuhlman, S. J. Top-Down-Mediated Facilitation in the Visual Cortex Is Gated by Subcortical Neuromodulation. J. Neurosci. 36, 2904–2914 (2016).

39. 39.

Samonds, J. M., Feese, B. D., Lee, T. S. & Kuhlman, S. J. Nonuniform surround suppression of visual responses in mouse V1. J. Neurophysiol. 118, 3282–3292 (2017).

40. 40.

Pachitariu, M. et al. Suite2p: beyond 10,000 neurons with standard two-photon microscopy. bioRxiv, https://doi.org/10.1101/061507 (2017).

41. 41.

Averbeck, B. B., Latham, P. E. & Pouget, A. Neural correlations, population coding and computation. Nat. Rev. Neurosci. 7, 358–366 (2006).

42. 42.

Steinmetz, N. A. et al. Aberrant Cortical Activity in Multiple GCaMP6-Expressing Transgenic Mouse Lines. eNeuro 4 (2017).

## Author information

### Affiliations

1. #### Center for Neural Basis of Cognition, Carnegie Mellon University, Pittsburgh, USA

• Brian B. Jeon
• , Steven M. Chase
•  & Sandra J. Kuhlman
2. #### Department of Biomedical Engineering, Carnegie Mellon University, Pittsburgh, USA

• Brian B. Jeon
• , Steven M. Chase
•  & Sandra J. Kuhlman
3. #### University of Pittsburgh Integrative Systems Biology Program, Pittsburgh, USA

• Alex D. Swain
•  & Sandra J. Kuhlman
4. #### Department of Biological Sciences, Carnegie Mellon University, Pittsburgh, USA

• Jeffrey T. Good
•  & Sandra J. Kuhlman

### Contributions

B.B.J., A.D.S. and S.J.K. wrote the manuscript, B.B.J., A.D.S. and J.T.G. performed the experiments, S.M.C. co-advised B.B.J., S.J.K. supervised the work. All authors reviewed the manuscript.

### Competing Interests

The authors declare no competing interests.

### Corresponding author

Correspondence to Sandra J. Kuhlman.