Contribution of apical and basal dendrites to orientation encoding in mouse V1 L2/3 pyramidal neurons

Pyramidal neurons integrate synaptic inputs from basal and apical dendrites to generate stimulus-specific responses. It has been proposed that feed-forward inputs to basal dendrites drive a neuron’s stimulus preference, while feedback inputs to apical dendrites sharpen selectivity. However, how a neuron’s dendritic domains relate to its functional selectivity has not been demonstrated experimentally. We performed 2-photon dendritic micro-dissection on layer-2/3 pyramidal neurons in mouse primary visual cortex. We found that removing the apical dendritic tuft did not alter orientation-tuning. Furthermore, orientation-tuning curves were remarkably robust to the removal of basal dendrites: ablation of 2 basal dendrites was needed to cause a small shift in orientation preference, without significantly altering tuning width. Computational modeling corroborated our results and put limits on how orientation preferences among basal dendrites differ in order to reproduce the post-ablation data. In conclusion, neuronal orientation-tuning appears remarkably robust to loss of dendritic input.

Main Text: Neocortical pyramidal neurons ramify several basal dendritic arbors laterally and one apical dendritic arbor superficially to receive and integrate synaptic inputs 1 . Each dendritictree of a mouse layer 2/3 (L2/3) pyramidal neuron arborizes in a different cortical map subregion (e.g. retinotopic region) and/or cortical layer, thereby sampling largely non-overlapping axonal inputs coming in from different brain areas 2 . Inputs are functionally heterogeneous across dendrites and even within individual dendritic branches 3,4 . Mouse primary visual cortex (V1) L2/3 pyramidal neurons generate action potentials in response to a narrow range of orientations 5 despite receiving highly heterogeneous input and poorly tuned subthreshold responses 4 , making them ideal for studying the relationship between dendritic input and functional selectivity.
Indeed, recent evidence suggests that apical tuft dendritic spikes serve to narrow the orientation tuning function, increasing orientation selectivity of area V1 L2/3 pyramidal neurons 6 . L2/3 pyramidal neurons are also a good model system for studying the relative roles of apical and basal dendrites: while basal dendrites primarily receive feedforward input from L4 and nearby L2/3 neurons 7,8 , apical dendrites receive cortico-cortical feedback that may refine orientation selectivity 9,10 as well as orientation-tuned thalamo-cortical input from layer 1 4,11-13 . It is difficult to firmly establish a causal relationship between computations that occur in dendritic branches and properties at the soma. Calcium imaging does not always have the temporal resolution to disambiguate signals arising in different dendritic processes or the soma, while in vivo dendritic patch clamping, despite its power at dissecting specific hypotheses, typically disrupts normal dendro-somatic processing making it difficult to dissect dendritic influences on the soma. The existence of functional inputs and activity on dendrites does not explain the necessity of these inputs to the neuron's final output. Here we employed in vivo two photon microdissection [14][15][16][17] to systematically remove individual dendrites from layer 2/3 mouse V1 pyramidal neurons, allowing us to assess the causal relationship between inputs arriving in different dendritic arbors and the computation of orientation selectivity at the soma.

Dendrite Ablation in vivo
To assess the causal relationship between inputs arriving in different dendrites and orientation-tuning, we systematically removed individual dendrites from L2/3 mouse V1 pyramidal neurons using in vivo 2-photon micro-dissection 14,15,17 . We visualized both dendritic structure and functional activity of L2/3 pyramidal neurons by stereotactically co-injecting AAV-flex-GCaMP6s and diluted AAV-CaMKII-Cre (40,000 to 120,000X) into L2/3 of mouse V1 11 (Fig. 1a, methods). Individual dendrites were then removed by performing 2-photon laser point scans on the targeted fluorescent dendritic segment, 10-30 µm away from the soma (Fig. 1b,c and Supp. Fig. 1) 14,15 . Dendritic segments expressing GCaMP6s, located 130-200 µm from the dura, could be typically ablated with one or two 200-400 ms point scans of 140-200 mW at 800 nm. Ablated dendrites distal to the lesion acquired a beads-on-the-string appearance and degraded, disappearing within 1-3 hours (Fig. 1b, Supp. Movie 1,2) 14,15 . Upon ablation, target neurons transiently became brightly fluorescent (Supp. Fig. 1d), presumably due to the influx of calcium through the instantaneous opening in the membrane, returning to pre-ablation fluorescence levels over the next 5-90 minutes. Neurons whose fluorescence did not return to its pre-ablation levels within 90 minutes were more likely to be visually undetectable the next day.
Neurons whose apical dendritic arbors were ablated immediately adjacent to the soma were also more likely to disappear, so we restricted ablation to neurons with an extended primary apical trunk (≥ 20-30 µm from soma to the first apical bifurcation), targeting the point immediately prior to the bifurcation. Neurons that were still present 24 hours post-ablation (42% of cells: 11 out of 26 neurons from 19 mice survived after apical dendrite ablation, see Methods) exhibited intact morphology in their residual (non-ablated) dendritic segments and normal spontaneous and visual-evoked somatic calcium transients ( Fig. 1b-d, Fig. 2a and Supp. Fig. 1).
We confirmed that targeted dendrites were successfully removed by generating a custom virus co-expressing GCaMP6s with activity-independent stable red fluorophore mRuby (Supp. Fig. 2). The elimination of the apical tuft following ablation was clearly identified with red fluorescent signal, and complete structural overlap was observed between GCaMP6 and mRuby.
Ablation was further confirmed using post-hoc immunostaining with anti-GFP antibodies (Supp.  Fig.   1c), suggesting that ablation effects are spatially restricted within a radius of ~5 µm around the ablation point, in line with previous reports 14,15 .

Loss of apical dendritic input does not alter orientation preference
L2/3 pyramidal neurons receive orientation tuned inputs scattered pseudo-randomly on their apical dendritic-trees 3,4,11,18 , but it is not clear whether these contribute to the neuron's orientation preference. We tested the collective contribution of these inputs to orientation selectivity by ablating the apical tuft from L2/3 pyramidal neurons in fentanyl-dexmedetomidine sedated mice. The ablation of apical dendrite removes ~40% of the total excitatory input received by the neuron 19 . Figure 1c (top, Supp. Movie 2) shows the reconstructed morphology of one neuron before and after apical tuft ablation. Figure 2a illustrates single-trial dF/F responses of an example neuron to oriented gratings moving in 12 different directions, before as well as 1, 3 and 5 days after apical tuft ablation. Remarkably, removal of the entire apical tuft did not affect the 5 neuron's preferred orientation (Fig. 2b). The ablated neuron still responded maximally in response to its pre-ablation preferred orientation, and responses to other orientations were also very similar to pre-ablation (Fig. 2c).
Plotting the absolute-value change in orientation preference before and 5 days after ablation demonstrated that orientation preference did not change significantly following apical tuft ablation (Fig. 2d: blue circles corresponding to 11 ablated neurons all fall close to the diagonal as do black squares corresponding to 12 neighboring control neurons imaged together with ablated neurons). There was no significant difference in orientation preference change between the two groups ( Fig. 2d, Fig. 7. Bootstrap analysis to assess per-neuron shift in orientation preference and tuning width (see methods) also suggests that there is no consistent shift in orientation preference after removal of the apical dendrite beyond that observed in controls (Supp. Fig. 4-5, Supp. Table 1). Narrow distributions of orientation preference bootstrap estimates after ablation indicates that tuning of neurons remains robust even following dendrite ablation (Supp. Fig.4). No consistent changes in response amplitude or baseline firing rates were observed across neurons a day or more following ablation (Supp. Fig. 6, see figure legend for statistics). This demonstrates that, under the conditions tested, inputs to the basal dendrites are sufficient for determining the orientation preference and basic tuning function properties of V1 L2/3 pyramidal neurons 20 .

Robustness of orientation-tuning to removal of multiple basal dendrites
We then applied our ablation strategy to the basal dendrites to explore how individual primary basal dendrites contribute to orientation selectivity (Fig. 3). Mouse V1 L2/3 pyramidal neurons typically have 5-8 (median 6) primary basal dendrites 19 . The point scan was targeted to a randomly-chosen primary basal dendrite, 5-10 µm away from the soma, before secondary branching. Neurons still present 24 hours post-basal dendrite ablation survived long-term and were studied. Overall, 36% of functionally studied neurons survived basal dendrite ablation ( Similar to what we observed with apical dendrite ablation (Fig. 2), cutting one basal dendrite (Fig. 3a, 8 to 12% of total dendritic input) did not alter the target neuron's preferred orientation, nor its tuning-width or OSI (Fig. 3b, Supp. Fig. 7b). Neurons in which two basal dendrites were removed (Fig. 3c, 16-24% of total input) also demonstrated remarkable tuning curve stability (Fig. 3d, Supp. Fig. 7b), but did show a small, yet significant, shift of ~12.5±2.7° on average (max: 30°) in orientation preference following ablation ( Fig. 3e-f, p=0.0098, ANOVA with Tukey correction for multiple comparisons; Kruskal-Wallis output with Tukey correction for multiple comparisons: p=0.045 for the comparison control vs 2-basal; see figure legends for statistics). We again performed bootstrap analysis to estimate the reliability of orientation preference measurements neuron by neuron. The distribution of the bootstrap estimates of orientation preference before and after ablation was narrow, suggesting that the tuning properties of ablated neurons were measured reliably (Supp. Fig. 4-5, Supp. Table 1). Perneuron bootstrap analysis also demonstrated that the number of two-basal dendrite ablated neurons that shifted their orientation preference post ablation was significantly different compared to controls (p<0.01; chi-square test), while this was not true for apical or single-basal dendrite ablations, which were not significantly different from controls. Tuning-width and OSI differences did not reach significance ( Fig. 3g- Figure 8 for histogram distribution of changes in tuning width and OSI). In one case, three (out of initially 7) primary basal dendrites were successfully ablated from one neuron, and even this cell maintained its orientation-tuning curve to a remarkable extent (just 10° shift following removal of 3 basal dendrites, Supp. Fig. 9a).
To test the possibility that the shift in orientation preference following 2-basal-dendrite ablation might be caused by a shift towards the tuning of the apical tree, we ablated the apical dendrite following 2-basal-dendrite ablation. This was successfully performed in two neurons, for which apical ablation did not further modify orientation preference (Supp. Fig. 9b,c and Supp. Movie 4). Thus, the orientation shift caused by 2-basal-dendrite cuts is unlikely to be due to a shift in the balance towards the apical tree's orientation preference. This result further emphasizes the subordinate role that the apical dendrite plays in determining the orientationtuning function of V1 L2/3 pyramidal neurons under the conditions of our experiment.

Apical dendrite ablation
Our finding that apical dendrite ablation has no effect on the orientation-tuning curve of L2/3 pyramidal neurons suggests a redundant contribution of the apical compared to the basal tree in orientation encoding. Otherwise, ablation should cause a change in neuronal orientation preference. To explore the possible input structures producing this result, we simulated a morphologically detailed L2/3 pyramidal neuron of mouse V1, with validated active and passive properties 6,21 as well as literature-based synaptic density and single-synapse orientation-tuning properties (Fig. 4a-c and Supp. Fig. 10, see Supplementary Data for details of the model neuron) 4,19,22 . Three main parameters were varied: standard deviation (σapical) of the distribution of single-synapse orientation preferences (prefsyn) in the apical dendritic-tree, standard deviation (σbasal) of the distribution of prefsyn in the basal dendritic-tree, and the difference in the mean orientation preference of these two distributions (∆(µbasal, µapical)=|µbasal-µapical|) (Fig. 4a, Supp. Interestingly, for all Δ(µbasal, µapical) ranging from 0° to 90°, the model neuron's orientation preference was consistently biased towards that of the basal tree (Fig. 4d), indicating the relative dominance of the basal dendrites.
Basal dendrite ablation: the shift vs. the drift hypothesis There are at least two possible explanations for the basal dendrite ablation results in Figure 3. According to the shift hypothesis, the change in orientation preference following 2basal-dendrite ablation is due to a shift toward apical tree inputs assuming Δ(µbasal, µapical)>0°.
Our exploratory observation that apical ablation following 2-basal-dendrite ablation does not shift the neuron's orientation preference weighs against this hypothesis (Supp. Fig. 9b,c).
There was no parameter set for which the 2-basal dendrite ablation, but not apical dendrite ablation, caused a shift in orientation preference.
The drift hypothesis entails that different basal dendrites are tuned to different preferences: cutting a subset of them will thus cause a drift due to loss of tuned basal inputs. To test this hypothesis, we generated model neurons with differentially tuned basal dendrites. The mean of the distribution of prefsyn in each primary basal dendrite (µb) was set independently. µb was selected from a range of Δμ, where Δμ represents the maximum deviation of one basal dendrite from the mean orientation preference of the soma (here arbitrarily set to 0°, Fig. 5a).
Δμ=0° represents the null hypothesis, i.e. where all basal dendrites sample from the same salt-and-pepper arrangement of input orientation preferences centered at 0°. In this case, any postablation changes are due to sampling noise of the finite number of synapses and, as expected, basal dendrite ablation rarely causes changes in orientation preference (Fig. 5b, top row, Fig. 5d far left). The same was true for small disparity values (Δμ=20°, Fig. 5b second row, Fig. 5d).
Intermediate disparity values (Δμ=30-40°) appear to be necessary to achieve a modest change (mode=10°, mean=8°, max=30° for Δμ=40°) in orientation preference after 2-basal-dendrite cut, while maintaining stability of orientation preference following apical or 1-basal-dendrite cut, in agreement with experiment ( Fig. 5b,c). Disparities ≥ 50 o failed to generate tuning-curves compatible to the experimental data (OSI≤0.2 and/or tuning-width ≥80°). As expected, the neuron's post-ablation changes in orientation preference strongly correlated with the magnitude of the change in mean orientation preference of the aggregates of the basal dendrites before and after two basal dendrite ablation (̃, Supp. Fig. 12). The above (Fig. 5) were obtained using a narrow distribution of prefsyn in basal dendrites (σb= σbasal=15°). σb(=σbasal) of 30° (Supp. Fig. 13) also induced a shift in orientation preference (max change=20°, mean=4.4°) but the fit to experimental data was worse than σb=15°, indicating the need for sharply tuned input structures into basal dendrites.
In summary, these simulations suggest that to explain our experiment data, a) the difference in mean input tuning between apical and basal arbors, Δ(µbasal, µapical), must be small, b) the distribution of input tuning to the basal dendrites should be similar to or narrower than the distribution of synaptic input to the apical tree (σbasal ≤ σapical=30 o ) and c) there needs to be a degree of heterogeneity of tuning (30°-40°) across basal dendrites.

DISCUSSION
We showed that orientation selectivity in L2/3 pyramidal neurons, as measured by orientation preference, tuning-width and OSI, is robust to a complete loss of the apical tuft. This suggests that inputs to the basal dendritic domains are sufficient to determine the neuron's orientation selectivity 20,23 . This is surprising given that apical dendrites receive orientation-tuned input 11 , with at least four input sources accessible to apical dendrites that could potentially modulate orientation selectivity in V1: 1) feedback cortico-cortical projections from extrastriate cortex thought to refine orientation selectivity 9,10,24,25 , 2) direction-selective projections from the LGN 12 , 3) thalamo-cortical projections from lateral posterior thalamus 13 , and 4) dendritetargeting inhibitory inputs 26,27 . Furthermore, several studies provided in vivo evidence of dendritic properties 28 in V1 apical dendrites that have the capacity to contribute to the neuron's orientation selectivity 6,29 , one arguing that apical tuft input functions to narrow the neuron's tuning curve increasing selectivity 21 . However, these studies do not provide a causal connection between dendritic computations and the emergence of orientation selectivity at the soma. Our results suggest that with respect to orientation tuning apical dendritic tuft inputs are dominated by basal dendritic activity, at least under our experimental conditions. Moreover, apical dendrite ablation eliminates the contribution of regenerative potentials on distal dendrites 30 , which have been observed during complex behavioral task in vivo 31 or L1 stimulation in vitro 32 . Our results suggest that neurons can still compute orientation tuning without those regenerative dendritic electrical events, favoring a feedforward model for orientation selectivity 33,34 . Computational modeling confirmed that basal dendritic input is dominant over a wide range of synaptic input parameters. It is interesting to explore in the future what behavioral conditions 35-37 might change the relative contribution of apical dendritic inputs to orientation encoding in area V1.
Second, we showed that V1 neurons also remained robust to removal of 2-3 out of 5-8 primary basal dendrites. Specifically, only a small, though significant, change in orientation preference occurred in about half of the neurons that underwent two basal-dendrite ablation. The fact that we did not observe a marked loss of selectivity in any of the ablated neurons ( Fig. 3) argues strongly against the possibility that there is a dominant, "master", dendrite 17 Still, to explain the small but significant post-ablation change in orientation preference following 2-basal dendrite ablation, simulations suggest that orientation tuning is somewhat heterogeneous across basal dendrites, with basal dendrite orientation preference spanning a range of ~30°-40° (Fig. 5). Such heterogeneity may arise from dendrite-specific forms of plasticity potentially mediated by spatially-restricted biochemical signaling [39][40][41] and/or dendritic spikes 6,28,29,42-44 .
These results give new insights into the complex structure-function relationship of the pyramidal neuron, the fundamental computational subunit of the neocortex. In particular, the remarkable robustness of orientation preference under dendritic micro-dissection hints at the extraordinary ability of sensory cortical neurons to maintain functional selectivity following input loss. Our approach emphasizes the importance of applying causal manipulations to study the contribution of dendritic arbors to sensory encoding. Dendritic microdissection is a powerful method for probing causal relations between dendritic structure/function and somatic properties that can be applied to several key questions in systems neuroscience research.

Acknowledgments:
Model neurons are available in ModelDB (accession number 231185) and its detailed description can be found in Supplementary Materials. SS and JP were supported by NEI R01 grant EY-024019 and NINDS R21 grant NS088457. A.P. and P.P. were supported by the European Research Council Starting Grant dEMORY (GA 311435).
We thank Xiaolong Jiang for providing high quality Neurolucida reconstructions of L2/3 pyramidal neurons of mouse V1 visual cortex for the biophysical model study. We thank Matt Rasband for providing equipment and reagents for immunostaining experiments. We thank Sangkyun Lee for MATLAB expertise.

Author contributions statements:
J.P. and S.M.S. designed the study, A.P. and P.P. designed the modeling part of the study, J.P.      Images were acquired at ~9 frames/sec using an Ultima IV microscope in spiral scanning mode with a 20X, 0.95 NA, Olympus objective or 25X 1.0 NA Nikon objective (5-30mW laser power, 900 nm). GCamp6s gives excellent signal to noise ratio, corresponds well to the underlying firing rate, and is well suited for measuring tuning functions. Orientation-tuning measurements and structure imaging were repeated before (day 0) and 1, 3, 5 days after ablation.

In vivo dendrite ablation
Under two-photon scanning, fluorescent dendrites were clear and visible at low laser power (<20 mW, 910nm). Dendritic arbors of several L2/3 neurons were imaged using a custom Ultima IV 2-photon microscope. First, we screened for clearly orientation-tuned neurons with a clearly defined primary apical dendrite (Primary apical bifurcation >20 μm away from the soma, soma depth between 170 and 250 µm, average pre-ablation orientation selectivity index for all ablated neurons was 0.79±0.18, max=0.99, min=0.38). Target apical dendrites were severed at least 15 μm away from the soma (Fig. 1c and Supp. Movie 1, 2). Basal dendrites were severed at least 10 μm away from the soma (Fig. 3a,c Fig. 1a). Differences in ablation parameters depended on depth of ablation plane, overlying shadow casting vessels, and window clarity. As reported in previous studies (11,12,36), when a single point on a fluorescing dendrite received several focused laser pulses, the targeted dendrite formed a beads-on-a-string morphology immediately after the ablation and then degraded within a day (Supp. dendritic arbor, as well as neighboring neuronal structures, maintained their original structure for at least 14 days following ablation (Fig. 1b, Supp. Fig. 1b).
We assessed the possibility of injury to the neuron and/or neuropil in four ways.
Evidence for minimal post-ablation damage includes: 1) ablated neurons survived indefinitely after being stressed for a while (as documented by the calcium influx and increase in fluorescence, Supp. Fig. 1d), 2) no visible change in spontaneous or visual-evoked calcium activity were observed in the days following ablation of either apical or basal dendrites ( Fig. 1-3, Supp. Fig. 4,5), 3) no morphological changes were observed in non-ablated structures from the same neuron or processes of nearby non-ablated neurons, even 5 microns from the ablation site (Supp. Fig. 1), and 4) immuno-labeled neuronal processes (anti-Tuj1) were minimally affected at the ablation site (Supp. Fig. 3 and Supp. Movie 3). Other labs using the same method have shown no effect of this ablation on spine morphology or turnover in remnant proximal segments of ablated dendrites (36), and FIB-SEM reconstructions of ablation sites found a ~5 micron lesion with no prominent glial scar 5 days post-ablation (12). Taking all of the data together leads us to conclude, as others have (11,12,36), that the off-target damage mediated by 2photon microdissection is minimal.

Visual stimulation
Visual stimuli were generated with MATLAB (Mathworks Inc.) PsychToolBox and presented on a Dell monitor (77°x55° of visual angle), at a fixed mean luminance (80 candela/m2), positioned 32 cm in front of the animal. Prior to orientation mapping the animal was adapted for at least 15 minutes to the mean luminance level. To measure orientation selectivity, grayscale square-wave gratings (0.04 cycles/degree, 2 cycles/second) moving in one of 12 (30° steps) or 36 (10° steps) directions were presented in pseudorandom order over the full stimulation field. Stimulus presentation lasted 2 sec and the inter-stimulus interval (uniform illumination set at the mean intensity) lasted 3 seconds. Twenty to thirty repetitions per stimulus direction of motion were collected and analyzed.

Data Analysis
Calcium trace from each soma was selected and separated using custom MATLAB functions, including the ROI selecting function 'roigui' from T.W. Chen at Janelia Institute. We used both ANOVA and Kruskall-Wallis test to assess the significance between shift in ablated neurons and control neurons. Tukey test for multiple comparisons was used for basal dendrite ablation results. F statistics (for ANOVA) and Chi-square statistics (for Kruskall-Wallis) were provided together with p-values for comparing control, 1-basal and 2-basal dendrite ablation neurons. P-values between specific groups (e.g. control vs 2-basal dendrite ablation) are from the statistics with multiple comparisons. Absolute-value was used to assess the shift in preferred orientation.
For bootstrapping of Supp. Fig 4-5, five single-trial responses were randomly subselected from the 20-50 trials acquired per orientation to generate simulated tuning curves. The preferred orientation was calculated from the von Mises-fit orientation tuning curve based on the sub-sampled data. This was repeated 1000 times to generate confidence intervals for the estimate of the preferred orientation pre-and post-ablation per neuron. Distributions of the orientation estimates were shifted to have the mean of the preferred orientation estimates before ablation at 0°. We defined a neuron with significant difference in preferred orientation (or in tuning width) if 95% of confidence intervals of pre-and post-ablation do not overlap to each other.
The frequency of detecting neurons with significant difference in preferred orientation pre-and post-ablation was assessed with chi-square test.

Immunofluorescence labeling
Mice were killed by isoflurane overdose followed by cervical dislocation and decapitation. Following decapitation, brains were quickly removed and fixed in ice cold 4% PFA (pH 7.2, 1 hour) followed by 20% sucrose immersion for 24 hours and then 30% sucrose immersion for 24 hours. Fixed brains were frozen in OCT medium and sectioned into 50μm coronal sections. For immunostaining, free floating sections were washed in 0.1 M PB and blocked in PBTGS (0.1 M PB with 0.3% Triton X-100 detergent and 5% goat serum) for 1 hour.
Sections were incubated in primary antibody over night at room temperature. The following antibodies were used: chicken anti-GFP (Abcam) and mouse anti-beta III Tubulin (Santa Cruz).
Primary antibodies were then labeled using AlexaFluor-conjugated secondary antibodies (Invitrogen). Sections were visualized with a Zeiss Imager, Z1 fluorescent microscope with an Apotome attachment.

Supplementary information for detailed description). Synapses impinging in the apical and basal
dendrites where either spontaneously activated or stimulus driven. Stimulus driven synapses were assigned with preferred orientations and randomly distributed along the dendrites 4 . When assigning orientation preference to synapses, we varied the standard deviation of the distributions (σbasal, σapical), the difference (Δ) of μapical and μbasal, as well as the μb of each individual basal dendrite (Δμ). Control condition was the one corresponding to σapical=σbasal=30°, μapical=μbasal=0°, Δμ=0°, under which the OSI was 0.78 and the tuning width 43° (Fig. 4b,c). Ablation was simulated by removing the respective dendritic compartments and adjusting excitatory synaptic weights for the change in neuronal excitability. For each condition, we calculated the preferred orientation, tuning width and OSI of the resulting somatic tuning curves.  Figure 2a-c). GCaMPlabeled dendrites from nearby control neurons did not show any fine-scale changes following ablation, even ~5 μm away from the ablation site (pale blue arrows). (d) Side-projection (top) and top-projection (bottom) of an example neuron before (left), 10 minutes after (middle) and 1 day after 2-photon ablation of the apical dendrite. Pink arrow indicates ablation point. Neuron increased its fluorescence levels immediately after ablation likely due to electrolyte influx through the instantaneous injury caused by ablation. By 1 day following ablation target neurons' fluorescence has returned to baseline, and only a short remnant of the apical dendrite remains. Figure 2. Confirmation of ablation by co-expression of red fluorophore mRuby with GCaMP. Custom engineered virus (AAV8-flex-mRuby-2A-GCaMP6s) was coinjected with low titer (1:80,000) AAV1-CaMK2-Cre to enable co-expression of an activityindependent red fluorophore with GCaMP6. Side-projection of target ablated neuron in the red channel (left), green channel (middle) and merged channels (right), showing overlap of GCaMP6 and mRuby expression in the neuron before and 5 days after ablation of the apical dendritic tuft (pink arrow depicts ablation point). Vertical variation in the green signal (middle panels) is due to fluctuations in GCaMP fluorescence which reflect activity of the cell during z stack acquisition.

Supplementary Figure 3. Post-hoc immunohistochemical confirmation of ablation and assessment of damage at ablation site.
Dendrites of five neurons in this brain were successfully ablated. Cells were chosen at the edge of the ~400-micron-diameter sphere of GCaMP expression to ease locating them post-hoc. One day after ablation, the brain was fixed in paraformaldehyde, and 50-micron-thick coronal sections were made through the visual cortex, tracking each slice from posterior to anterior. Slices were immunostained with anti-GFP and anti-Tuj1 antibodies to visualize GCaMP-labeled and unlabeled neuronal processes, respectively.  (d) and (e) are 20 microns. Images acquired in vivo (top two panels) were 3D rendered and rotated to optimally display the ablated dendrite. Apparent differences in structure sizes are due to differences in viewing angle. (e) Immunohistochemical assessment of damage at ablation site. Green shows anti-GFP signal (amplifying GCaMP), magenta shows anti-Tuj1 signal (antibody specific to axonal and dendritic microtubules). No clear sign of disturbed processes were observed around the ablation site as confirmed previously with EM (See Fig. 2 of 12 ). Note that the black regions that appear to be within the dotted circle (ablation target) do not actually represent lesions but unstained regions corresponding to cell bodies appreciated better on a different plane. These are more clearly represented in animated Zstacks, Supplementary Movie 3.

Supplementary Figure 4. Distribution of bootstrap estimates of neurons' orientation preferences before and after ablation.
Histogram of the distribution of bootstrapped estimates of the orientation preferences before (solid line) and after ablation (dotted line) for neurons with apical dendrite (blue, n=11), 1 basal dendrite (dark red, n=13), 2 basal dendrite (pink, n=14) ablation and control neurons (black, n=27) from 1000 simulations. Five single-trial responses were randomly sub-selected from the 20-50 trials acquired per orientation to generate simulated tuning curves. The preferred orientation was calculated from the von Mises-fit orientation tuning curve based on the subsampled data. This was repeated 1000 times to generate confidence intervals for the estimate of the preferred orientation pre and post ablation per neuron. Note that all neurons have a narrow distribution for the orientation preference even after ablation, which indicates highly robust tuning even after dendrite ablation. Distributions of the orientation estimates were shifted to have the mean of the preferred orientation estimates before ablation at 0°.
Errorbars above the histograms indicate the 95% (filled box) and 99% (tick to tick) confidence intervals before (black) and after (grey) ablation. A yellow dot indicates that there is no overlap between the 95% confidence intervals of the pre-and post-ablation orientation preference estimates. Green ring indicates that there is no overlap between 99% confidence intervals of the pre-and post-ablation orientation preference estimates. 6 out of 14 twobasal-dendrite-ablated neurons showed significant separation of the distribution of orientation preference estimates before and after ablation (yellow dot) while 2 out of 13 one-basal-dendrite-ablated, 2 out of 11 apical-dendriteablated, and 4 out of 27 control neurons did. The frequency of detecting neurons with significant difference in preferred orientation pre-and post-ablation was significantly different than controls as assessed by the χ 2 statistic. Specifically, for 2 basal vs control is χ 2 =3.9 (p=0.04), while p was not significant for either 1-basal (p=0.96) or apical dendrite ablation (p=0.79) versus controls.

Supplementary Figure 5. Distribution of bootstrap estimates of neurons' tuning width before and after ablation.
Histogram of the distribution of bootstrapped estimates of tuning width before (solid line) and after ablation (dotted line) for neurons with apical dendrite (blue, n=11), 1 basal dendrite (dark red, n=13), 2 basal dendrite (pink, n=14) ablation and control neurons (black, n=27) from 1000 simulations. Five single-trial responses were randomly subselected from the 20-50 trials per orientation to generate simulated tuning curves. The tuning width was calculated from mean orientation tuning curve based on the sub-sampled data. This was repeated 1000 times to generate bootstrap confidence intervals for the estimate of the tuning width pre-and post -ablation per neuron. Errorbars above the histograms indicate the 95% (filled box) and 99% (tick to tick) confidence intervals before (black) and after (grey) ablation. A yellow dot indicates that there is no overlap between the 95% confidence intervals of the pre-and post-ablation tuning width estimates. Green ring indicates that there is no overlap between 99% confidence intervals of the pre-and post-ablation tuning width estimates. Only 1 out of 54 neurons (in the control condition) showed a significant shift in tuning width by this measure. (center) and tuning-width (right) when σapical=30°, for σbasal={15°, 30°, 45°, 60°} and ∆(µbasal,µapical)={0°,…,90°}.

Supplementary
(g) Logic diagram of categorizing simulation results for 3D heat map figure h-j. Black dots: parameter space that results in tuning curves with OSI<=0.2 and tuning-width >=80° before or after ablation in more than 30% of the simulated neurons. If differences in preferred orientation before and after ablation agree with experiments (i.e. <10° mode shift for apical and single basal cuts and ≥10° mode shift for two basal cuts), they are further categorized as green or purple dots based on their post ablation tuning-width and OSI. Thresholds to classify a change in OSI or tuning-width correspond to the mean+1std of the experimental data and are mean OSI change>0.2 and mean tuningwidth change>10°. Model neurons that did not agree with experimental shifts in orientation preference are shown in red. h-j Summary of dendrite ablation model results for apical (h), single basal (i) and double basal (j) dendrite ablation. See (g) for logic of categorizing simulation results. For each simulated neuron (n=10), every combination of one or two basal dendrites was removed. (i) and (j) Green dots: mode shift in preferred orientation is <10° without significantly altering tuning-width and OSI. Red dots: mode shift in preferred orientation is ≥10°. Purple dots: no mode shift change in preferred orientation WITH changes in tuning-width or OSI (see (g)). (j) Green dots: mode shift in preferred orientation is ≥ 10° AND tuning-width /OSI remain unchanged upon two basal dendrite cut. Max mode shift in preferred orientation among green dot conditions is 10°. Red dots: no shift in the preferred orientation (<10°) upon two basal cut. Purple dots: mode shift in the preferred orientation (≥10°) WITH changes in tuning-width or OSI (see legends for (g) for detail). In all h-j, only the green dots satisfy the experimental data. Note that there is no parameter space combination that simultaneously satisfies the experimental data of apical tree, one basal and two basal dendrites ablation. Therefore, this necessitates the introduction of differentially tuned basal dendrites. See Figure 5 and manuscript.  Figure 5b but for σbasal=30°. Again, σapical is fixed at 30°. Gradually increasing Δμ leads to a very small shift in orientation preference with 2-basal cut that is a worse fit to experimental data than σbasal=15°. For all, mean change in tuning-width is < 10° and mean change in OSI is < 0.2 (thresholds correspond to the mean+1std of the experimental data). Disparities of 40°or greater fail to generate tuning curves comparable to experiment (OSI≤0.2, tuning-width ≥80° for more than 30% of simulated neurons). For each model neuron (n=10 per Δμ), all combinations of one or two basal dendrite cuts were simulated. The neuron structure prior to ablation. Arrow shows the point on the apical trunk targeted for ablation. Second Panel: Neuron has been subjected to a single point scan targeted to the location shown by the arrow. Note that the neuron and its dendrites increased in brightness (shown here 10 minutes following the 1 st point scan), likely as a result of calcium influx secondary to injury. However in this case the injury did not definitively sever the dendrite, which appears still grossly intact. Accordingly, the neuron regained its baseline fluorescence after ~30 minutes and the apical tuft dendrite remained intact (not shown here). Third Panel: The neuron is shown here 10 minutes following a second point scan targeted to the same location (shown by the arrow). Note that there is an interruption in fluorescence and the distal dendritic branches exhibit early beading morphology (a clear sign of successful ablation). Neurons whose dendrites were successfully ablated exhibited immediate but transient (<20 min) increase in fluorescence that included the targeted dendritic branches and the soma. The targeted dendritic branches then typically assumed a beads-on-a-string appearance prior to the disappearance of fluorescence. Right Panel: The neuron is shown 5 days following ablation. Note that the apical dendrite has now entirely disappeared. Note also that several other dendritic branches that were close (well within a 5m range; see also Fig. 1c) but not connected to it, remain intact.

Supplementary
Supplementary Movie 2. 3D projection images of an example neuron pre-(left) and 5 days post-(right) apical dendrite ablation.

Supplementary Movie 3.
Animated Z-stacks (moving coronally) of an example ablated neuron that was immunostained with anti-GFP (green) and anti-tuj1 (magenta). More detailed information is described in Supplementary Figure 3. The arrow indicates the ablation point. Note that there is no discernible disorganization of the nearby anti-tuj1 stained neuropil (the areas of absent staining appear to reflect nearby neurons that were not GFP stained). This is in agreement with a prior electron microscopy study (see Fig 2 of 12 ) using a similar protocol, which demonstrated that the laser ablation lesion is highly contained within an area ~5 microns in diameter.

Supplementary Movie 4.
Animated Z-stacks (1 micron step size) of an example neuron that underwent 2 basal dendrite ablation followed by an apical dendrite ablation. The movie starts from bottom-up and then reverses to go top-down to the same point before stopping. It is best that each panel is seen separately first, before comparing. Left Panel: the neuron prior to ablation. Note the red and purple arrow pointing to the basal dendrites to be ablated, and the cyan arrow pointing to the apical trunk origin near the soma. Middle Panel: Picture of the same neuron after two basal dendrites have been ablated. The red and purple arrows point to the ablation targets, showing the targeted basal dendrites have been severed from the soma. Beaded remnants of their distal branches can be seen along their prior trajectories in the vicinity of the cell. Note that the cell is highly fluorescent as the Z-stack was obtained during the ablation of the apical dendrite. Right Panel: The same neuron 5 days following apical dendrite ablation. The cyan arrow indicates the apical dendrite ablation point. Note that the apical dendrite has deteriorated (the visible branches that can be seen towards the top a little below the arrow represent basal dendrites whose insertion point was close to that of the apical dendrite). Despite having lost 2 basal and the apical dendrites the cell survived and remained visually responsive and orientation-tuned ( Supplementary Fig. 6c).
The active properties of the model were adapted from 18,19 . The model included conductances for fast voltage-dependent sodium channels (gNa), delayed rectifier potassium channels (gkdr), slow voltage-dependent potassium channels (gM), A-type potassium channels (gA), calcium-activated potassium channels (gKCa) and high and low voltage-activated calcium channels (gHVA and gT respectively). In all compartments a calcium buffering mechanism was included (τ=50ms). At the apical dendrites the conductances of the calcium channels increased for distances <=80μm and then decreased and reached minimal levels for distances above 260μm. At the basal dendrites, calcium channel conductances increased linearly 39 . Compared to the conductance of the thin dendrites (diameter<=0.8), the conductance of the A-type potassium channel was 5% at the soma and 10% at the thick dendrites 40 . Supplementary Table 2 shows the ionic conductances used in each compartment. Supplementary Table  3 lists the electrophysiological characteristics of the model neuron in comparison to experimental data of 38 . Supplementary Fig. 7a illustrates the electrophysiological profile of the model neuron in comparison to an experimental trace adapted from 43 in response to the same current step pulse (0.16 nA). The model is in great agreement with all of the abovementioned experimental data.
Synaptic mechanisms included AMPA, NMDA and GABAA synapses. Kinetics of miniature AMPA current (activation of 1 synapse) were fitted to experimental data of 41 . In particular, the model neuron was voltage clamped at -70mV and consecutively 1 AMPA synapse was activated at each dendritic branch. The average response of the model (red trace) as well as the experimental average response (in the presence of APV to isolate the AMPA current) is shown in the right panel of Fig S7A. The kinetics of the NMDA current were also fitted to the experimental data of 41 (Supplementary Fig. 7a, green trace) in the absence of Mg ++ blockade, to simulate the experimental absence of Mg ++ (only for validation purposes). The peak amplitude of the NMDA current was set so that the ratio of the iNMDA (measured at +50mV) to iAMPA current (measured at -50mV) was 1.2 41 . This resulted in gNMDA=1.37*gAMPA. Miniature EPSC amplitude (iAMPA and iNMDA) was set at 20 pA 41 . The unitary IPSP (activation of 15 inhibitory synapses) was 0.8 mV measured at resting membrane potential -65mV and the duration at half amplitude was set to 15ms 44 . Properties of synaptic currents used are shown in Supplementary Table 4.
To estimate the total number of excitatory synapses, we assumed synaptic density of 2 excitatory synapses (spines)/μm 15,45 . Excitatory synapses consisted of both AMPA and NMDA conductances. The total dendritic length of the model neuron is 3298μm and thus the total number of excitatory synapses was 6596, that is within the range of the experimentally reported total number of excitatory synapses in layer 2/3 visual cortex 15 . 60% of these were randomly distributed to the basal dendrites and 40% to the apical dendrites 15 . Distribution of synapses to individual dendritic compartments was adjusted so that each dendrite had the same synaptic density, that is, the number of synapses each dendrite received was proportional to its length. 15% of the total number of synapses were inhibitory 2,15 . 7% of inhibitory synapses were located at the soma, 60% at the basal dendrites and 33% at the apical dendrites 42 . 25% of the total number of excitatory synapses were stimulus-driven 8 . The rest 75% of excitatory synapses, as well as the inhibitory synapses 46 , were independently driven by Poisson spike trains with mean frequency 0.11Hz ( Supplementary Fig. 7b). This resulted in spontaneous spiking activity at frequency 0.28±0.37 Hz that is within the experimental range from in vivo recordings in mice 20 .
Each stimulus-driven synapse was tuned (i.e. had a preferred orientation, prefsyn) in one of the thirty-six different angles (0°-350° with step 10°). Tuning was not direction selective i.e. a synapse with tuning at 0° was also tuned at 180°. The orientation-preference distribution of the stimulus-synapses followed the sum of two Gaussians centered on the mean orientation preference (orientation preference with maximum probability) of the dendritic tree (μtree). We varied the standard deviations (σbasal, σapical) of the distributions from 15° to 30°, 45° and 60° (Supplementary Fig. 7c). For σ=30°, distributions resemble the ones reported in 8 . In addition, we ranged the difference (Δ) of μbasal and μapical from 0° to 90°, with step 10° (by varying the μbasal and arbitrary keeping constant the μapical at 0°, Supplementary Fig. 7d). In the drift model, synapses of each basal dendrite (and not the whole dendritic tree) were assigned a preference according to the respective μb, σb (Fig 5A). The μb of each dendrite was chosen from a predefined range (Δμ). 60% of orientation-tuned synapses were randomly dispersed to basal dendrites and the rest 40% to the apical dendrites 4,15 (Supplementary Fig. 7d), so that all dendrites have the same density of stimulus synapses. Stimulus (a bar at a specific direction) was 'presented' after an initial period of 500ms and lasted for 2 secs as in the experimental setup (Fig 4b). During the 'presentation' of the moving bar (0°-180°, with step 10°), stimulus-driven synapses were activated by Poisson spike trains (Supplementary Fig. 7e). Each stimulus-driven synapse received a spike train with mean 0.3 Hz*activation factor, where the activation factor depended on the Δ(stimulus, prefsyn) ( Supplementary Fig. 7e). The neuron responded under the control conditions (see below) for the preferred orientation with 1.65 ±0.94 Hz 20 . Control condition was the one corresponding to σapical=σbasal=30°, μapical=μbasal=0°, Δμ=0°. Under this condition, the OSI was 0.78 and the tuning width 43° (Fig. 4c), replicating the experimental data for orientation tuning in L2/3 neurons of the visual cortex.
Simulation of the apical tree and basal dendrite ablation was performed by removing the respective compartments. We simulated basal dendrite cutting by removing each one of the five primary basal dendrites for one dendrite cutting or all combinations of two primary basal dendrites for two dendrites cutting. The model neuron's firing rate increased following apical dendrite ablation due to a 2.5-fold increase in input resistance (as seen in 47 ), while basal dendrite ablation slightly decreased firing rate due to excitatory input loss. In the model, synaptic scaling (reduction) of excitatory transmission was implemented (as observed in prior studies of homeostatic plasticity 48 ) to normalize the neuron's firing rate without affecting the tuning curve shape. Specifically, pre-/post-ablation excitatory synaptic weights (gAMP and gNMDA) were adjusted to result in the same levels of spiking activity at the preferred and the orthogonal orientation under control condition, as indicated by the calcium data ( Supplementary  Fig. 4). For each condition, we simulated 10 model neurons (different in respect to the prefsyn of each synapse, as well as in their location along the trees) and for each neuron we averaged the resulting spiking activity over 10 repetitions. For each condition, preferred orientation at the cell body was defined as the orientation (0° to 170° with step 10°) to which the neuron displayed the highest mean firing frequency ( Supplementary Fig. 7e). Since we did not model direction selectivity, each preferred orientation was also represented by its symmetric angle (e.g. 0° and 180°). Accordingly, the orientation tuning-width was the width at half amplitude of the fitted curve. Selectivity of orientation tuning for each condition was assessed using the OSI metric, defined as = − ℎ + _ ℎ . Simulated neurons that lacked realistic tuning curves (OSI ≤ 0.2, tuning width ≥ 80°) were excluded from the analysis. We further did not consider orientation tuning for combinations of simulation parameters in which more than 30% of the simulated neurons were categorized as not tuned. In Figure 4F, mode change was plotted for orientation preference and average change was used for plotting changes in tuning-width and OSI. In the drift model, Δμ of 50° or greater failed to generate tuning curves comparable to experiment (>30% of simulated cells), so the analysis was limited to Δμ=20-40°.
To assess if the change in input structure across basal dendrites following two basal dendrite ablation in fact relates to the change in orientation preference of the model neuron, we calculated ̃, the difference between length normalized orientation preference in input structure across basal dendrites before and after two basal dendrite ablation. The ̃ was calculated for each combination of ablated dendrites as follows: For each primary basal dendrite,

⃗ =
, where Li is the length of the ith dendrite normalized to the length of the longest dendrite (Lmax) and θi the mean of orientation preference of the distribution of synapses of the respective basal dendrite (in radians). The population vector, using Euler's formula, is: where n is the number of primary basal dendrites. The angle of the population vector is: = tan −1 ∑ sin

∑ cos
Finally, we defined ̃= | − | ,where φpre is the population vector of the input structure before the ablation of the primary basal dendrites and φpost after (in degree).