Motor cortical output for skilled forelimb movement is selectively distributed across projection neuron classes

The interaction of descending neocortical outputs and subcortical premotor circuits is critical for shaping skilled movements. Two broad classes of motor cortical output projection neurons provide input to many subcortical motor areas: pyramidal tract (PT) neurons, which project throughout the neuraxis, and intratelencephalic (IT) neurons, which project within the cortex and subcortical striatum. It is unclear whether these classes are functionally in series or whether each class carries distinct components of descending motor control signals. Here, we combine large-scale neural recordings across all layers of motor cortex with cell type–specific perturbations to study cortically dependent mouse motor behaviors: kinematically variable manipulation of a joystick and a kinematically precise reach-to-grasp. We find that striatum-projecting IT neuron activity preferentially represents amplitude, whereas pons-projecting PT neurons preferentially represent the variable direction of forelimb movements. Thus, separable components of descending motor cortical commands are distributed across motor cortical projection cell classes.


INTRODUCTION
In mammals, descending motor control signals from the neocortex are carried via several classes of molecularly defined output projection neurons (1,2). Pyramidal tract (PT) neurons project directly to the midbrain, brainstem, and spinal cord, along with other descending systems (2)(3)(4)(5). Intratelencephalic (IT) projection neurons of layer 5 and layer 2/3 (2,3,(6)(7)(8) project within the forebrain and prominently target the subcortical striatum (STR) in both hemispheres [often referred to as "corticostriatal" (6)]. PT neurons are a primary output cell type throughout the vertebrate lineage (1), whereas expansion and diversification of IT neuron populations appears to be a major contributor to changes in motor cortical cell types in mammals (9).
Cerebellum and basal ganglia are subcortical targets of motor cortical output that are thought to be particularly critical for the fine control of skilled limb movements (10)(11)(12)(13). Cerebellum receives cortical input indirectly via ascending mossy fibers from brainstem nuclei including the basal pons. Basal pons receive dense input from nearly all PT neurons from the primary motor cortex (MCtx) (and other cortical areas) (14)(15)(16). Inactivation of basal pons produces fine-targeting deficits in forelimb movements (end point errors) while leaving gross kinematics (speed and amplitude) relatively unaffected (17). Cerebellum is thought to be the brain locus in which forward models are computed, transforming copies of motor commands into predictions used for feedback control (18)(19)(20). Disruption of cerebellar function leads to deficits in the appropriate targeting of movement direction (20), supporting such an interpretation.
Basal ganglia circuits are critical for controlling the execution of skilled forelimb movements (21)(22)(23)(24)(25)(26) and are closely associated with regulation of the amplitude and speed of movement (26)(27)(28). STR, the forebrain input nucleus of basal ganglia (7), is unique among subcortical motor areas in being a target of both IT and PT neurons (3,6,7,29). A number of models have been proposed to account for the computations in basal ganglia that underlie its role in specifying the speed and amplitude of movement (10,27,28,(30)(31)(32). A common feature of these models is that descending cortical motor commands are carried to the STR where basal ganglia circuits may modulate the gain (27) of descending motor commands [termed movement vigor (26,33)] or implement a closed-loop feedback to shape movement kinematics (31) and/or act as a primary source of motor commands for stereotyped movement trajectories (28,32). In contrast to basal pons deficits, inactivation of dorsal STR (dSTR) modifies movement speed and amplitude while often leaving movement target direction unaffected (21,22,24,34).
Thus, key computations proposed for cerebellar and basal ganglia circuits depend on copies of descending cortical motor commands carried by motor cortical projection neurons. On the one hand, it has generally been believed that PT neurons of MCtx may be the pathway in which cortical motor commands emerge and are conveyed to subcortical targets to mediate diverse aspects of motor control (4,10). From this perspective, it has been proposed that IT neurons may also exert influence on movement via PT output pathways; for example, it has been argued that "premovement" (motor planning) activity in IT neurons is transformed into motor commands in PT populations (35). This is consistent with asymmetric connectivity in the MCtx that exhibits a strong IT → PT bias (36) and the fact that PT neurons elaborate collaterals within many subcortical targets (2)(3)(4). From this perspective, IT inactivation is expected to result in similar or smaller consequences on movement as compared to PT inactivation (35). However, many studies have reported substantial movement execution-related activity in non-PT cell types in the MCtx (8,(37)(38)(39)(40)(41)(42). Moreover, it is less clear from this perspective why inactivation of two different subcortical targets, STR and pons, results in different (and often dissociable) effects on forelimb movement execution if most motor command information arises from a largely shared population of PT neuron inputs. For these reasons, we entertain a modified perspective that can potentially reconcile these data.
Rather than PT neurons being the primary or even sole locus at which cortical activity is transformed into descending neocortical motor commands, it is possible that descending motor commands are distributed across corticostriatal IT neurons and corticopontine PT neurons. From the perspective of downstream perturbations and anatomical differences, one putative division would be IT neuron populations carry information about movement amplitude, whereas corticopontine PT neuron populations are preferentially involved in control of movement direction. This may be consistent with movement amplitude encoding in the STR, requiring information related to the intensity of muscle activation. In contrast, forward model computations in the cerebellum may depend more critically on information about which muscle groups are activated (e.g., flexor/ extensor ratio that determines movement direction), information known to be present in PT populations (4). This revised perspective is potentially distinguishable from a model in which intracortical IT → PT projections transform premotor activity into motor commands because it (i) implies differential encoding of movement kinematic parameters in IT and PT populations and (ii) predicts dissociable consequences on movement execution during inactivation of each projection cell class. To date, the putative differential encoding of movement parameters and dissociable effects of IT and PT inactivation on movement execution have been little studied.
Here, we sought to address this question by combining a large-scale neural recording across the entire motor cortical depth and STR with cell type-specific identification and perturbation in the context of mice performing skilled forelimb motor tasks that were either highly variable or highly consistent in movement direction and amplitude. This allowed us to explore the information about movement kinematics observed in molecularly distinct corticostriatal IT (Tlx3 + ) motor projection neurons as compared with corticopontine PT (Sim1 + ) neurons. We found that IT neuron activity was a rich source of information preferentially about movement amplitude and as compared to corticopontine PT neurons that were relatively more informative about movement direction than amplitude. These neural correlates were consistent with partially dissociable effects of cell type-specific inactivation. Tlx3 + IT neuron inactivation produced a large attenuation of movement speed and amplitude, whereas inactivation of corticopontine PT neurons produced alterations in movement direction with relatively minor changes in amplitude. These data provide evidence for a multimodal efference system in MCtx in which separable components of descending motor control signals for the same effector are distributed across molecularly distinct projection neuron classes.

RESULTS
To assess the potential differential encoding and function of motor cortical projection neuron classes, we studied a task in which mice make skilled, but highly variable forelimb movement of a joystick to collect delayed reward. Mice were trained to make self-initiated (uncued) movements past a threshold (either directed away from or toward the body) to obtain a delayed (1 s) water reward (Fig. 1, A and B, and movie S1). Changing the required movement threshold across blocks (near-far-near) led mice to adjust reach amplitude across blocks [repeated-measures analysis of variance (ANOVA), F 2,16 = 13.28, P = 4.0 × 10 −4 ; between-blocks Kruskal-Wallis (KW) test, P = 0.01; n = 6 mice, 10 sessions; Fig. 1C) and elicited a broad distribution of movement amplitudes (mean: 8.1 ± 4.4 mm SD, maximum: 24.2 mm; Fig. 1D). Reward could be elicited by suprathreshold joystick movements in any direction in the two-dimensional (2D) plane of the joystick. Mice preferentially used movements with variable direction, although biased toward movements along (toward or away from) the body axis (Fig. 1E).
This task, and the ability to adapt movement amplitude to a changing threshold across blocks, depends on basal ganglia function in mice (22,43); however, motor cortical dependence was unclear. Thus, we first asked whether activity in the forelimb MCtx (MCtx FL ) was critical for performance by using optogenetic inactivation (44) during or before movement execution (22). First, we allowed the initiation of movement to occur and then rapidly triggered (22) optical inactivation of MCtx FL using a VGAT-ChR2 mouse (45). As in other mouse forelimb operant tasks, e.g., joystick (46) or reach-tograsp task (21,44), we found that MCtx FL was critical for normal movement execution (ANOVA; amplitude, F 1,10 = 11.33, P = 0.007; speed, F 1,10 = 47.55, P = 4.22 × 10 −5 ; Fig. 1F and movie S1). In addition, tonic inactivation of MCtx FL before movement initiation significantly reduced the probability of reach initiation (ANOVA, F 1,10 = 8.38, P = 0.016; Fig. 1G). Last, optogenetic activation of combined layer 5 MCtx FL output pathways [using the Rbp4-cre mouse line (2,47)] was sufficient to increase the speed and amplitude of forelimb movements ( fig. S1).
To examine neural activity across all layers of MCtx FL during forelimb movements, we used Neuropixels probes (48). A total of 2416 well-isolated and histologically verified (see Materials and Methods) single units were recorded across MCtx FL (N = 1212) and underlying STR (N = 1204 U; 220 ± 53 SD units per session, total of 11 recording sessions; Fig. 1A and fig. S2). This task allowed us to isolate in time neural activity related to outward forelimb movements from modulation of activity during delayed reward collection (Fig. 1H). Task-related activity was distributed across the entire recording depths including many single units in MCtx FL and dSTR with robust movement-timed activity ( Fig. 1H and figs. S3 and S4). Activity modulated during reward collection could be revealed by comparing unsuccessful movements [during the intertrial interval (ITI) or that failed to hit the amplitude threshold] to those that did yield a reward (Fig. 1H, bottom). Population activity primarily differed around the time of reward collection and was relatively unchanged during execution of approximately matched amplitude movements. Consistent with this difference, when aligned on reward delivery, a substantial number of units in MCtx FL were robustly modulated ( fig. S3A).

Heterogeneous distribution of motor command activity across recording depths
We next sought to examine how activity related to forelimb movement kinematics was distributed anatomically along our electrode recording tracks. First, electrode tracks of individual recording sessions were visualized, and anatomical positions were registered to a standard brain atlas ( Fig. 2A and fig. S2, A and B; see Materials and Methods). Next, we confirmed that the population of neurons along our recording track contained robust information about movement kinematics even with these highly variable (trial to trial) movement trajectories. We developed an approach to train linear decoders of movement kinematics assessed on held-out trials (see Materials and Methods). Linear decoders were able to capture much of the variance in observed joystick trajectories even for single trials (Fig. 2, B and C). Notably, we observed that decoding performance appeared good independent of the direction of movement (which trials were held out). This decoding performance suggests the presence of information about both movement amplitude and direction in neural population activity. To examine the independent encoding of direction and amplitude, we developed a modified approach (see Materials and Methods) to identify two targeted, orthogonal dimensions of population activity that best captured activity modulation correlated with movement amplitude (termed "AMP" dimension) or direction ("DIR"). In all datasets (n = 11 sessions; N = 7 mice), we found robust neural tuning to amplitude and direction when projected along independent AMP and DIR modes of neural population activity (Fig. 2, D and E).
The use of linear methods in the full dimensionality of population activity (empowered by simultaneous recording of large populations) allowed us to assess how individual units contributed to decoding of movement trajectories and tuning to amplitude and direction as a function of anatomical position. We next compared three different aspects of the recorded data in 250-m bins of depth from the cortical surface for all recording sessions. For each group of units per depth bin, we compare the mean perimovement activity time histogram (Fig. 2F, left, "Move aligned activity"; same as Fig. 1H but with broader spatial bins), the contribution to decoder performance (fraction of explained variance; "Decoding"), and the slope relating activity along AMP or DIR dimensions with the Across the population of recorded neurons, the largest decoding contributions were found in the region of layer 5 of MCtx FL and dSTR (Fig. 2F, middle), consistent with previous data showing correlates to movement kinematics in dSTR in this task (22,34). In contrast, a relative dearth of movement-related activity and modest decoder performance contribution was observed in ventral STR. Whereas decoding and tuning to movement kinematic features was, in general, distributed broadly across depth, there was bias toward an increased tuning to movement direction relative to amplitude in intermediate to deep layer 5 of MCtx (Fig. 2F, right, orange bars). To further confirm laminar inhomogeneity of movement-related activity, we also computed the principal component (PC) of cortical population activity and found that movement-related modulation of activity was preferentially loaded in the upper layers of MCtx (superficial layer 5 and up) ( fig. S5).

Molecularly and anatomically defined projection cell classes during recording
IT and PT neurons have partially overlapping but characteristic laminar positions in the neocortex (1)(2)(3)6), suggesting that the laminar inhomogeneity in the encoding of movement kinematics (Fig. 2F) could reflect differences in the neural correlates in IT and PT projection cell classes in layer 5. Thus, we next used optogenetic tagging (35,49,50) to distinguish STR-projecting layer 5a IT neurons from pons-projecting deep layer 5b PT neurons while simultaneously recording population activity across depths to allow identification of AMP and DIR encoding dimensions. Mouse lines exploiting cell type-specific expression of Tlx3 and Sim1 (47) allow molecular access to distinct layer 5 IT and PT subtypes, respectively (2,35). PT projection neurons are a diverse class that project to partially distinct subsets of downstream regions (2). Thus, to achieve labeling of pons-projecting PT neurons, we used a retrograde virus [recombinant adeno-associated virus (rAAV2)-retro (51)] with conditional expression of the inhibitory opsin FLInChR (52) injected into the brainstem (pons) of Sim1-cre mice (47). We used a robust and rapid optogenetic inhibitor [to mitigate against confounds due to extensive cortical recurrent excitation (49)] that produces efficient inactivation of PT neurons (52) to identify neurons in awake animals.
This strategy resulted in robust expression of an inhibitory opsin in brainstem-projecting PT neurons located within layer 5 of MCtx FL ( Fig. 2A and fig. S6). A total of 111 U were identified as "tagged" (PT + ). In PT + subset, activity was inhibited at short latency with half-maximal inhibition occurring within 15 ms on average (median latency < 10 ms) after illumination onset, and the inhibition lasted below the half-maximal level for, on average, 931 ms of the 1-s laser (Fig. 3, A, C, and D, and fig. S7; see Materials and Methods for statistical criteria for tagging). To identify layer 5 IT neurons, we used a similar retrograde labeling strategy with FLInChR injected into the dSTR of Tlx3-cre (47) mice. This led to expression of FLInChR in STR-projecting IT neurons within layer 5 of MCtx FL ( fig. S6). A total of 30 U were identified as tagged (IT + ) with half-maximal inhibition occurring within 26 ms on average (median latency < 10 ms) (Fig. 3, B, C, and E). The mean duration of inhibition below the half-maximal level was 985 ms. Further consistent with selective identification, optotagged units were distributed at depths consistent with layer 5 (Fig. 3C).
We next compared the activity of these two populations of tagged, identified cell types during task performance. Individual examples often revealed marked differences in the timing of activity across the two populations (Fig. 3, D to G). As a population, the modulation of activity in PT + population was more mixed as compared with the rest of the MCtx FL populations during forelimb movement (group × time interaction; repeated-measures ANOVA, F 1,40 = 10.10, P = 4.66 × 10 −61 , main effect of group; ANOVA, F 1,572 = 21.54, P = 4.30 × 10 −6 ; Fig. 3H). In contrast, the IT + population displayed a more consistent positive modulation of activity than the cortical population in general as well as than the PT + population in specific (group × time interaction; repeated-measures ANOVA, F 1,40 = 7.78, P = 2.65 × 10 −42 , main effect of group, PT + versus IT + ; ANOVA, F 1,139 = 25.29, P = 1.49 × 10 −6 ; Fig. 3H). The activity of the majority of PT + neurons (69.4%) peaked after the reward delivery, while the majority of IT + neurons (80%) were most active during movement initiation/execution before the reward delivery (  1 2 = 23.77, P = 1.08 × 10 −6 ; Fig. 3I). This difference appeared to be due, at least in part, to many pons-projecting PT + neurons with suppressed activity around reach start (Fig. 3, D and F, and fig. S7) similar to what has been described for the spinal-projecting subset of PT neurons previously (40). Thus, to compare similar activity patterns, we subselected the PT +,ext and IT +,ext populations that displayed significant positive modulation of activity during movement ( fig. S8). We then examined the relative modulation of activity aligned to movement onset, movement offset, and threshold crossing/reward delivery. We found that positive modulation of activity, when apparent in both populations, appeared to be significantly greater in IT +,ext than PT +,ext regardless of temporal alignment ( fig. S8). The activity of PT +,ext neurons often peaked after reward delivery in successful trials, whereas the activity of IT +,ext neurons consistently peaked around reach start regardless of temporal alignment (  1 2 = 15.79, P = 7.09 × 10 −5 ; fig. S8).

Distinct, but complementary, movement kinematic encoding in layer 5 IT and corticopontine PT neurons
We next asked whether identified layer 5 corticopontine PT + and corticostriatal IT + neurons had similar or distinct correlates with movement kinematic parameters. We first examined the relative tuning of IT + and PT + neurons to movement amplitude and direction by comparing projections onto the AMP and DIR dimensions identified from simultaneously recorded population activity. A preponderance of IT + neurons were strongly tuned to movement amplitude with modest or weak tuning to movement direction (Fig. 4A). In contrast, PT + neurons showed the opposite propensity, with most neurons more strongly tuned to movement direction than movement amplitude (KW test comparing relative tuning: P = 3.0 × 10 −4 ; Fig. 4A, right). We performed a number of additional analyses to further confirm this difference in the encoding of movement kinematic parameters between IT + and PT + neurons. First, we confirmed that randomly chosen subsets of tagged IT + neurons were indeed better at classifying observed movement amplitude when compared with PT + neurons by training naive Bayes classifiers of movement amplitude (Fig. 4B). Given that our task was designed to vary substantially in movement amplitude driven by blockwise changes in amplitude threshold, we reasoned that PT + populations also carry relatively less information about overall movement kinematics in this task. We compared the decoding power for individual movement trajectories by assessing the relative contribution of PT + neurons when compared to simultaneously recorded non-PT neurons (Fig. 4C). Again, we found that a relatively smaller amount of decoding information was present in PT + neurons. Last, we examined correlations between identified IT + and PT + individual neuronal activity and movement amplitude. Correlations were stronger in IT + neurons than PT + neurons even in the presence of variable movement direction and regardless of the sign of change in movement-related activity (independent t test, t 126 = 3.65, P = 3.82 × 10 −4 ; fig. S9). Thus, across diverse analysis methods (preferential loading onto the AMP dimension of population activity, trialwise correlation of spike count, decoding, and classifier performance), we observed consistent, significant evidence that corticostriatal Tlx3 + IT neurons encode information about the amplitude of movement when compared to corticopontine Sim1 + PT neurons.

Two-photon calcium imaging of layer 5 IT and corticopontine PT neurons
Identifying cell types via optogenetic tagging has been an important technique that has clarified cell type-specific neuronal correlates; however, it is also subject to a number of limitations (35,49). For example, some approaches such as antidromic stimulation are thought to have low false-positive rates but high false-negative rates (35,53), whereas somatic stimulation (49) or somatic inhibition (used here) can have potentially higher false-positive rates because of polysynaptic effects. Sustained inhibition (~500 ms as used here) attempts to mitigate these false positives. Our best estimate of a putative false-positive rate was ~1% (see Materials and Methods), indicating that electrophysiological correlates in distinct cell types were likely mediated by true positives. Nonetheless, it is difficult to estimate these rates quantitatively without ground truth, and thus, we also sought to use a complementary method to assess the cell type-specific differences in the MCtx FL neural correlates of forelimb movements. We used cell type-specific calcium imaging to more precisely target two major layer 5 neuron populations in MCtx FL . We used a virally driven expression of GCaMP6f in Sim1-cre and Tlx3-cre mice (35,47)  Imaging of pons-projecting PT neurons and layer 5a IT neurons showed prominent differences that were consistent with the electrophysiology data. IT neurons, similar to electrophysiologically recorded IT + neurons, showed a bias toward larger perimovement activation than PT neurons, while PT neurons had greater activation timed to reward consumption (Fig. 5, C to E). The cell type-specific differences in imaging experiments were very similar to those observed with electrophysiological recordings (fig. S12). To capture the variance in activity from the imaging experiments, we examined population activity in a low-dimensional state space spanned by the leading PCs. The first PC provided a dimension that distinguished activity of PT and IT populations. Cells with a negative loading on to the first PC (PC1−) were characterized by prominent activation around movement execution and were more likely to be IT neurons. In contrast, cells with a positive loading (PC1+) characterized by relatively suppressed activity during movement and more rewardtimed modulation of activity were more likely to be PT neurons (PT/IT difference on PC1: P < 5.35 × 10 −45 , independent t test; Fig. 5, F and G, fig. S10, C to E). Although these imaging analyses are consistent with prominent movement command-like activity in IT populations, we found that correlations with movement kinematics were detectable in both populations but were smaller and more variable in imaging data as compared to electrophysiological data (54).

Cell type-specific inactivation of IT and PT projection classes
We observed clear differences in the encoding of movement amplitude and direction in IT + and PT + neurons, respectively. If these differences reflect distinct but complementary pathways by which descending motor commands influence movement, then it would predict dissociable effects on forelimb movements during inactivation of each cell type. In contrast, if IT neurons primarily exert their effects on movement through PT neurons, then we would expect similar or greater effects of PT + inactivation as compared with IT inactivation (35). Thus, we next performed cell type-specific inactivation during movement execution with a potent optogenetic inhibitor [FLInChR (52)]. To inactivate MCtx FL populations during movement execution, we used movement-triggered inactivation analogous to the pan-MCtx FL activation (Fig. 1F). We used the same viral strategy with two mouse lines that restrict expression to (2, 47) layer 5 IT (Tlx-cre) and PT (Sim1-cre) neurons ( fig. S6).
Although there are clear limitations in attempts to directly compare perturbations across distinct mouse lines and experiments, it is important to confirm that inactivation produced a comparable change in the activity of target cell types. We triggered laser delivery at the earliest time point of reach initiation on a random subset (~25%) of trials (schematized in Fig. 6A; also as in Fig. 1F). We found that our perturbation strongly suppressed the PT + neurons compared to their modulation during control movements (ANOVA, F 1,220 = 61.72, P = 1.74 × 10 −13 ; Fig. 6B and fig. S11, A and B). We next examined the magnitude of IT perturbation relative to its modulation during normal movements. We again observed a significant (but lesser in magnitude) inactivation (ANOVA, F 1,58 = 4.22, P < 0.05; Fig. 6C and fig. S11, C and D). Thus, inactivation during movement is effective in both layer 5 corticostriatal IT and corticopontine PT neurons, although there may be somewhat weaker inactivation of IT neurons.
To assess the relative contribution of these pathways to the execution of skilled forelimb movements, we considered both effects on movement amplitude and speed (Fig. 6, D to G) and movement direction (Fig. 6, H and I). Suppression of activity in MCtx FL layer 5 corticostriatal IT neurons led to a large reduction in movement amplitude and speed relative to control movements (paired t test; amplitude: t 6 = 8.13, P = 1.85 × 10 −4 ; speed: t 6 = 5.26, P = 0.002; Fig. 6, D and E). Despite a larger inactivation, optogenetic suppression of corticopontine PT neurons led to a significant but several-fold smaller effect on the amplitude (IT: −51 ±7%, PT: −19± 2%; means ± SEM percent reduction from the control trials) and speed (IT: −67 ± 13, PT: −25 ± 13) of forelimb movements in the skilled joystick movement task (paired t test; amplitude: t 5 = 6.55, P = 0.001; speed: t 5 = 2.89, P = 0.034; Fig. 6, F and G).
Our previous analyses of neural correlates of movement indicated that corticopontine PT neurons may preferentially participate in the control of movement direction, at least relative to corticostriatal layer 5a IT neurons. Thus, we next examined whether the trajectories of movements were altered during cell type-specific inactivation. Suppression of corticopontine PT neurons during movement elicited stereotyped changes in movement trajectory time-locked to inactivation that could readily be observed in single sessions (Fig. 6H) and a consistent directional bias in trajectories in all perturbation sessions (paired t test, t 5 = 7.26, P = 7.73 × 10 −4 ; Fig. 6I). In contrast, we found no clear change in movement direction when corticostriatal layer 5a IT neurons were suppressed during movement (paired t test, t 6 = 1.88, P = 0.11; Fig. 6I). Thus, recordings from identified projection cell types revealed preferential encoding of movement amplitude in layer 5 IT + neurons and movement direction in corticopontine PT + neurons. Inactivation of layer 5 Tlx3 + IT neurons led to a preferential decrease in movement amplitude, and inactivation of corticopontine Sim1 + PT neurons preferentially altered movement direction.
IT inactivation severely disrupts performance of skilled reach-to-grasp task Analysis of neural correlates of movement in identified corticopontine PT + and corticostriatal IT + neurons and the effects of cell typespecific perturbation were very consistent in the joystick task. Specifically, corticostriatal IT neurons are preferentially tuned to movement amplitude, and inactivation during movement reduces movement amplitude. Corticopontine PT neurons, in contrast, are preferentially tuned to movement direction, and inactivation altered movement direction with smaller effects on movement amplitude. It has also been proposed that the role of motor cortical projection cell types could critically depend on the task context or problem. Thus, we next asked whether these effects, particularly a critical role for the general IT class of projection neurons, are specific (limited to) the highly variable joystick movements. For example, it has often been proposed that dexterity demands could be intimately tied to the function of corticopontine PT pathways (4), and yet, inactivation of dSTR also profoundly impairs movement amplitude during reach-to-grasp tasks (21) as it does for joystick movements (22), perhaps consistent with a role for corticostriatal IT neurons. Moreover, inactivation of the basal pons produces little effect on movement speed and amplitude (17).
Thus, we next examined whether IT neurons are critical for the execution of forelimb movements in a head-fixed reach-to-grasp task for mice ( Fig. 7A and movies S2 and S3) (44,55). To assess whether there was any potential role for IT neurons, we adopted a penetrant strategy and labeled IT neurons just with contralateral retrograde AAV injection [more similar to labeling approaches in previous studies (36)], and the corticopontine PT neurons were labeled with retrograde AAV injection into the basal pons. We first confirmed that both strategies were sufficient to produce robust inhibition of layer 5 IT and PT neurons (Fig. 7, B and C). Next, we delivered laser (2 s) at the presentation of the food pellet in randomly selected trials and examined how the cell type-specific inactivation affected animals' movement and overall performance. In some trials, the inactivation was triggered on the initial movement of the forelimb off its resting position and toward the food pellet (movie S2). Similar to our results in the variable amplitude and direction joystick task, we found that silencing IT neurons led to profound disruptions in reach-to-grasp performance by markedly attenuating reach movement amplitude and blocking progression to next movement components (paired t test on success rates, t 7 = 18.91, P = 2.88 × 10 −7 ; Fig. 7D and movie S2). These effects were similar to previously described impairment of forelimb movements in this task with pan-cortical inactivation (44). In contrast, silencing corticopontine PT neurons did not impair movement amplitude, and performance quality was largely intact (paired t test on success rates, t 7 = 0.57, P = 0.58; Fig. 7E and movie S3). Together, these data provide strong evidence that IT projection neurons play a key role in reach-to-grasp behavior that is not fully explained by an IT through corticopontine PT pathway.

Inactivation of PT and IT neurons oppositely affect striatal activity
Inactivation of layer 5a IT neurons produced substantial reductions in movement amplitude without substantial alterations in movement direction, consistent with preferential encoding of movement amplitude in this population. This effect was also quite distinct from PT inactivation that produced smaller changes in movement amplitude and a clear change in movement direction, consistent with a preferential encoding of movement direction in the layer 5b corticopontine PT population. This is more consistent with complementary but separate descending pathway from corticostriatal layer 5a IT neurons that determines movement amplitude, as compared with the proposal that IT output may exert its effects on movement execution through an intracortical IT → PT pathway (4,35). Because the only extracortical output of IT neurons is STR (and in the case of MCtx FL , primarily dSTR), this suggests that the effects of inactivating corticostriatal layer 5a IT and corticopontine layer 5b PT would also differ in their consequences for activity in dSTR.
Previous work with retrograde labeling indicates that a given region of dSTR receives at least partially convergent input from IT and PT neurons within a given cortical column (Fig. 8A) (3, 29, 51). Thus, we finally sought to assess whether inactivation of IT + and PT + had differential effects on striatal activity or a largely shared effect, as expected, if mediated primarily by an intracortical IT → PT pathway. Optogenetic suppression of IT neuron activity during movement results in a corresponding decrease in forelimb movementrelated striatal activity, consistent with IT providing a source of direct excitatory input (Fig. 8B). However, during optogenetic silencing of pons-projecting PT neurons, we found that striatal units on average increased activity during PT inactivation and that this differed significantly from IT inactivation (striatal modulation by PT versus IT inactivation; ANOVA, F 1,1146 = 35.49, P = 3.41 × 10 −9 ; Fig. 8B). STR is composed of a number of cell types including both inhibitory projection neurons [medium spiny neurons (MSNs)] and local interneurons. Although it is not possible in these datasets to distinguish cell types on the basis of molecular identity, as with other brain regions, these two broad classes are roughly distinguished by their baseline firing rates. PT inactivation resulted in small increases in the activity in the subset of striatal units with low (<10 Hz) baseline firing rates, including MSNs (ANOVA, F 1,972 = 4.41, P = 0.03; Fig. 8C). In contrast, we again observed a differential consequence of IT inactivation reflected in robust decreases in the activity even for the subset of neurons with relatively low firing rates (ANOVA, F 1,780 = 8.29, P = 0.004; Fig. 8D).

DISCUSSION
The central control of movement is characterized by the ability to execute movements adapted to achieve diverse goals with a common effector. For example, animals can use their forelimbs over a continuously varying range of speed and amplitude (26), use one or both forelimbs in a coordinated fashion (56), are targeted to variable manipulanda (57), or reach out to eccentric targets in a range of directions (44). The circuit mechanisms that allow the same putative motor cortical circuits to control these movements and learn to adapt specific components during the development of motor skills have been difficult to understand. However, a division of computational labor across distinct anatomical loops spanning the MCtx through the brainstem is thought to be critical (10). In particular, two largely (although not completely) distinct cortical-subcortical circuits, the basal ganglia and cerebellum, have long been thought to play complementary but distinct roles in the control of forelimb movements (10,11). The extent to which the differential functions of cortico-cerbellar-thalamic and cortico-basal ganglia-thalamic loops are due to differences in the cortical projection neuron classes they involve is unclear.
Many studies of cortical encoding of movement have focused on cued movements of individual limbs with repeatable and stereotyped trajectories, often in multiple directions, but with relatively little variation in movement speed/amplitude. Here, we used a paradigm in which mice vary movement amplitude over roughly an order of magnitude and explore a range of movement directions (albeit with relatively little lateral movement). Using this dataset, we found two orthogonal dimensions of population activity that explained much of the variance in movement amplitude and direction. We found that movement correlates in layer 5a corticostriatal IT and layer 5b corticopontine PT projection neuron classes were not homogeneously distributed but rather preferentially participated in the AMP and DIR dimensions of population activity, respectively. These data are not only consistent with prior observations of preferential tuning of PT neurons to movement direction in mice (35) and in primates (58) but also highlight how consideration of another key aspect of movement kinematics, amplitude and speed, can reveal further complexity in cell type-specific components of motor cortical activity.
Here, we focused on two broad classes of molecularly and anatomically distinct cortical layer 5 projection neurons, corticostriatal IT and corticopontine PT (1). PT neurons are a diverse class composed of multiple anatomical and molecular subtypes (2,3,9). Corticopontine PT neurons are the presumptive source of descending motor command information used by the cerebellum to compute forward models (20). We explored forelimb tasks with more diverse movement kinematics and found that deep layer 5 neurons and, in particular, a subset of corticopontine PT neurons were preferentially tuned to movement direction, consistent with preferential direction tuning in pons-projecting primate PT neurons (41). At the same time, it remains possible that, with more diverse classes of forelimb movement (e.g., grabbing multiple objects) and finer cell type information, more complex cell type-specific tuning will be found. Our data suggest that, as movement variability increases, more distributed, cell typespecific activity is revealed, reflecting the fact that task design itself is a key determinant of the observed dimensionality of motor cortical activity (59).
Our data are potentially unexpected from a perspective in which PT pathways are a primary determinant of descending cortical influence on motor commands through projections to spinal cord and other subcortical areas (4,60). At the same time, our data are broadly consistent with movement execution-related activity observed in multiple cortical cell types in rodents (61) and primates (8,41). Recent work in primates with antidromic identification of projection types and a forelimb movement around a single (elbow) joint found lesser tuning of corticostriatal neurons to movement kinematics as compared with PT neurons (41). This may reflect a difference between mice and primates but also may be a consequence of different movement dimensionality, analytic techniques, or different sampling biases. Pasquereau et al. (41) used antidromic activation in the posterior putamen to identify corticostriatal neurons that could potentially sample from more numerous superficial IT neurons (lamina in which we also tended to find weaker decoding and correlates with movement amplitude; Fig. 2F). Similarly, it is unclear whether our labeling strategy for corticopontine neurons was biased toward a distinct subset of PT neurons relative to previously studied populations. Last, here, we developed distinct methods to find orthogonal coding dimensions and decode movement kinematics in much more variable movements that will be intriguing to use in future work on primate datasets and further understand these differences.
It has long been proposed that multiple, parallel "modules" in the brain may be critical for flexible control of movement (18). While these parallel modules (potentially, forward/inverse models) are thought to be instantiated in the cerebellum (20,62), the division of labor across corticostriatal IT and corticopontine PT cell types into distinct roles controlling movement amplitude and direction, respectively, is consistent with the dissociable effects of basal ganglia and cerebellar perturbations. The effects of cerebellar perturbation have tended to be primarily deficits in either the targeting of movements in a specific direction or adaptation of movement direction to an environment change (e.g., visuomotor rotation) (20). In contrast, perturbations of basal ganglia function often lead to aberrant control of movement amplitude and speed (22,24,26,30,63). Basal ganglia pathways have been proposed to control movement amplitude/speed either by adaptively adjusting the gain of motor commands on the basis of reward feedback [referred to as movement vigor (26,27,33)] or by determining a reference signal for a continuous feedback controller (31) or by producing motor commands per se (32). In the context of the current experiments, these models all make similar predictions and thus cannot be distinguished in detail but are broadly consistent with a pathway involving corticostriatal IT and dSTR neurons being a critical module involved in descending forebrain control of movement amplitude. dSTR also receives input via collaterals of corticopontine PT neurons. The extent to which these pathways are kept separate or potentially reintegrated in subcortical target areas will be a key question in future work.
Circuit mapping experiments have revealed an asymmetric IT → PT excitatory connectivity (36). On the one hand, the absence of a strong PT → IT connectivity could help to explain how IT activity is not strongly tuned to movement direction. On the other hand, it is less clear how prominent movement amplitude-correlated activity in IT neurons is relatively weak or not present in corticopontine PT neuron activity. IT neurons project onto other [e.g., corticospinal (36)] PT populations not studied here, and one possibility is that noncorticopontine PT neurons are the primary recipients of preferential IT input; previous work focused more on retrogradely labeled corticospinal PT populations and cross-hemisphere IT neurons, both of which are subsets with different biases in labeling compared to the methods used here (36). Although pons-projecting PT neurons are a large subset of PT neurons, our approach was likely not penetrant for all subclasses of PT neurons (2, 3, 47, 64, 65). The molecular marker Sim1 + may bias against corticospinal and corticothalamic PT neuron classes (2). Future work further dissecting molecular subtypes of PT neurons (53) in connection with detailed information about the cortical microcircuit in which those neurons are embedded (36,66,67) will be critical to understand how descending output is distributed across projection classes. Another possibility is that the extensive PT dendrites (relative to IT) that can powerfully modulate the integration of multiple sources of afferent input (68,69) could be critical to transform movement amplitudebiased activity in IT neurons to movement direction-biased activity in corticopontine PT neurons, perhaps via gating by another input to corticopontine neurons related to muscles group identity (flexor versus extensor). Such a model also has the merit of potentially providing flexibility; if experience led to a learned reduction in the putative gating input for direction, then corticopontine PT neurons could also be correlated with movement amplitude. This remains a speculative hypothesis that will require additional studies in animals learning multiple motor tasks to resolve, but existing work suggests that the possibility of marked remapping of the relationship between PT activity and movement can occur (60).
The discovery that direct motoneuron innervation by PT corticospinal neurons is unique to primates has provided an anatomical justification for accounts in which PT projections are particularly central to the remarkable motor skills of primates relative to other mammals (4,42). However, increasing diversity of IT neuron populations is also a primate innovation (9) and thus correlated with increasing flexibility of motor skills. We note that basal ganglia output plays a role in controlling movement speed and amplitude in human and nonhuman primates (26,28,70) as it does in other mammals, e.g., mice (27). Although less well studied in the context of the control of movement execution, these considerations suggest that it will also be critical to study non-PT motor cortical projection cell types that may provide new insights into motor cortical function in diverse species. Here, we describe approaches that allow robust single-trial decoding of movements and an approach using targeted dimensionality reduction to identify independent components of population activity that encode separable parameters of movement kinematics. This approach may prove useful for future models of descending motor commands that are distributed across cortical projection classes and subcortical target areas.

MATERIALS AND METHODS
Male and female mice, typically aged 8 to 16 weeks at time of surgery, were used in this study. All procedures were approved by the Janelia Research Campus Institutional Animal Care and Use Committee and were consistent with the standards of the Association for Assessment and Accreditation of Laboratory Animal Care. Mice were water-restricted (1 to 1.2 ml of water/day), and their weight and signs of health were monitored daily as in (22). Surgical methods closely followed those previously described (22,71), except where indicated below.

Joystick task
The variable-amplitude operant task was run as described previously (22) using a microcontroller-based system (details can be obtained from http://dudmanlab.org/html/resources.html). After surgery (see below), mice were given 5 days of recovery before beginning water restriction (1 ml of water/day). Following 3 to 5 days of initial water restriction, they underwent 10 to 20 days of training, which simply involved exposure to the task and self-learning. Mice were head-fixed in a custom-made head restraint box using the RIVETS head-fixation apparatus (71). The mouse's front paws rested on a metal bar attached to a spring-loaded joystick, which had unconstrained 2D maneuverability in the horizontal plane. Mice were trained to maneuver the joystick to certain thresholds, varying across three different blocks (e.g., 4.2, 5.7, 4.2 mm) to obtain a sweetened water reward delivered 1 s after each threshold crossing. Rewards were followed by a 3-s ITI in which no movements would be rewarded. There were up to 150 trials (50 trials per block) in electrophysiology and 120 trials per session in imaging (some sessions were incomplete), with one water reward being available per trial. All behavioral events (forelimb movements and licks) were recorded on separate channels at 25 kHz (USB-6366; National Instruments, Austin, Texas) and then downsampled offline at 1 kHz. Forelimb movements were assessed offline to detect individual reaches based on the speed joystick movement. Time points of reach start and stop were defined as well as other kinematic properties such as duration, maximum amplitude, and speed for each reach. Reach-to-grasp task Methods are as described previously (44). Briefly, mice were habituated to head fixation (71) in a light, tight, ventilated, soundproof approximately 70 × 70 × 70 cm box cubic behavioral box. Mice were initially trained for approximately 30 min/day, until they started licking pellets (10 or 20 mg; test diet; St. Louis, MO) placed directly below their mouth. Food pellets arrived ~200 ms after the start of an auditory tone (5 kHz) by rotating the turntable with a servomotor driven by custom-programmed Arduino software. Mice were initially (one to five training sessions) trained to retrieve a food pellet by licking and eating the pellet, often using their hand to guide the pellet into their mouth. After cued licking was learned, the turntable was moved progressively further away (over 3 to 10 sessions) to encourage mice to reach for the pellet after the cue. Mice almost always started with hands on perch, and trials where animals lifted the hand before the cue were discarded. Mice were trained each day for approximately 60 min until they routinely responded to the auditory cue (within 1 s) and grabbed the pellet.
Two high-speed, high-resolution monochrome cameras (Point Grey Flea3; 1.3 MP Mono USB3 Vision VITA 1300; Point Grey Research Inc., Richmond, BC, Canada) with 6-to 15-mm (f/1.4) lenses (C-Mount; Tokina, Japan) were placed perpendicularly in front and to the right of the animal. A custom-made near-infrared light-emitting diode light source was mounted on each camera. Cameras were synced to each other and captured at 500 frames/s at a resolution of 352 by 260 pixels. Video was recorded using custom-made software developed by the Janelia Research Campus Scientific Computing Department and IO Rodeo (Pasadena, CA). This software controlled and synchronized all facets of the experiment, including auditory cue, turntable rotation, optogenetic lasers, and high-speed cameras. Fiji video editing software was used to label laser onset, termination, and time stamp in the videos. Annotation of behavior was accomplished using Janelia Automatic Animal Behavior Annotator (JAABA) (72) as described previously (44). See movies S1 to S3 for examples of individual trials and effects of inactivation.
For neural population recording during joystick behavior using the Neuropixels probe (48), awake mice fully recovered from craniotomy were head-fixed in a RIVETS chamber (71). A Neuropixels probe (option 3, phase A) with 374 recording sites was briefly (~2 min) dipped into the diI cell-labeling solution (Thermo Fisher Scientific) to visualize probe tracks and then lowered through the craniotomy manually. After a slow, smooth descent (0.2 mm/min), the probe sat still at the target depth for at least 5 min before initiation of recording to allow the electrodes to settle. An Ag wire was soldered onto the reference pad of the probe and shorted to ground. This reference wire was connected to an Ag/AgCl wire that was positioned on the skull. The craniotomy and the Ag/AgCl wire were covered with a saline bath. Voltage signals are filtered (high pass above 300 Hz), amplified (200× gain), multiplexed, and digitized (30 kHz) on the base, allowing the direct transmission of noise-free digital data from the probe, and were recorded using an open-source software SpikeGLX (https://github.com/billkarsh/SpikeGLX). Recorded data were preprocessed using an open-source software JRCLUST (https://github. com/JaneliaSciComp/JRCLUST) to identify single units in the primary MCtx (M1) and STR. To assay FLInChR expression and responses, a fiber [200-mm core, 0.39 numerical aperture (NA); Thorlabs] coupled to a 574-nm laser source (Omicron) was placed to deliver light onto the craniotomy. Single-laser pulses of 1-s duration with power measured at the tip of the fiber of 4 to 8 mW were delivered 60 times with 8-s intervals. Mice were at rest after task completion during tagging.
For cell type-specific recordings from MCtx in mice performing the reach-to-grasp task, rAAV2-retro-hSyn-GtACR2-KV-eGFP (8.5 × 10 13 GC/ml) was injected to the pons bilaterally (relative to lambda: 0.4 mm anterior; 0.4 mm lateral; 5.5, 5.75, and 6 mm deep; 30 nl per depth) in Sim1-cre (KJ18Gsat) mice, selectively labeling a PT layer 5 population. The same viral vector was injected to the dSTR (relative to bregma: 0.5 mm anterior; 1.7 mm lateral; 2.8, 2.6, and 2.4 mm deep) and cortex (0.5 mm anterior, 1.7 mm lateral, 1.0 and 0.5 mm deep) in the right hemisphere of Slc17a7-cre mice to selectively label a layer 5 IT population in the left hemisphere. All recordings and optical silencing were conducted in the left hemisphere contralateral to the reaching hand (right). In the subset of mice used for reach-to-grasp task, neural recordings to confirm inactivation were targeted to layer 5 neurons using silicon probe arrays as described previously (55). A unit with a significant reduction in the spike count during the laser (paired t test,  = 0.01 and/or at least 60% reduction or 0.3 z score sustained throughout laser pulse) relative to the baseline period was considered to be optogenetically tagged. There was no difference between stringent and lenient tagging estimates for IT neurons, but there was a difference in PT neurons. To estimate the false-positive rate, we used the anatomical distribution of tagged PT units. This analysis yielded a false-positive estimate of 0.3% (stringent) and 1.5% (lenient); see fig. S12. We used stringent criteria for analyses that depended on single-cell properties (Fig. 4A) and lenient criteria when the maximal possible contribution of PT was considered (Fig. 4, B and C) or population averages over the entire sample were compared (Fig. 3). Moreover, there is a good correspondence between population mean profiles obtained via optogenetic tagging and cell type-specific imaging ( fig. S12). These estimated false-positive rate estimates suggest that (i) conclusions are almost exclusively drawn from true positives and (ii) we are likely still in a false negative-dominated regime as expected for optogenetic tagging.

Cell type-specific closed-loop perturbation of M1 neuronal activity
To examine the cell type-specific role of the deep layer 5 PT neurons in MCtx, we injected rAAV2-retro-CAG-Flex-FLInChR-mVenus (51,52) into the pons (relative to lambda: 0.4 mm anterior; 0.4 mm lateral; 5.5, 5.75, and 6 mm deep; 70 nl per depth) in three Sim1-cre [KJ18Gsat (47)] mice. Viruses were obtained from Janelia Viral Tools (www.janelia.org/support-team/viral-tools). To examine the role of the IT neurons in MCtx, we bilaterally injected the same virus into the dSTR (relative to bregma: 0.5 mm anterior; 1.6 mm lateral; 2, 2.7, and 3.5 mm deep; 150 nl per depth) and cortex (site 1: 0.9 anterior, 1.5 lateral; site 2: 0.1 anterior, 1.9 lateral; site 3: 0.1 anterior, 1.1 lateral; each site at 300 and 600 m deep, 80 nl per depth) in five Tlx3-cre mice [PL56Gsat (47)], respectively. In closed-loop experiments, a 500-ms single pulse of 574-nm laser was delivered bilaterally in randomly selected 30% of the trials immediately when mice moved the joystick by 1.5 mm from the zero point taken at the end of each ITI.
To examine the general role of MCtx in control of forelimb movement regardless of the projection neuronal cell type, we implanted optical fibers (200-mm core, 0.39 NA; Thorlabs) bilaterally to place fiber tips right onto the pia of the brain in VGAT-ChR2-eYFP (Fig. 1, F and G) (73) or Rbp4-cre RRID:MMRRC_037128-UCD (47)::Ai32 RRID:IMSR_JAX:024109 (74) (fig. S1) mice. In closed-loop experiments, a 500-ms single pulse of 473-nm laser was delivered in randomly selected trials triggered by a slight joystick movement caused by mice. In open-loop experiments, a 3-s single pulse of 473-nm laser was delivered in randomly selected 30% of trials at a given time point (2 s after previous reward delivery during ITI in select trials) regardless of animals' behavior.
Cell type-specific two-photon calcium imaging Viruses were AAV2/1-Flex-GCaMP6f, diluted to 2 × 10 12 GC/ml (75) RRID:Addgene_58514 and obtained from Janelia Viral Tools (www.janelia.org/support-team/viral-tools). Five injections were performed in a cross shape, centered on 1.6 lateral and 0.6 rostral. A total of 20 nl was ejected at 600-m depth. This center was chosen on the basis of previous microstimulation work (76,77). Imaging was restricted to 1 month after injection to minimize overexpression.
Three-millimeter-wide circular imaging windows were made over the left cortical hemisphere in all animals, following the method of Goldey et al. (78). Window implants were centered on the virus injection center and fixed in place using cyanoacrylate glue and dental acrylic. Windows (custom-ordered from Potomac Photonics) were made by placing three windows together, with the top window being 3.5 mm and the bottom two being 3 mm, such that the top window rested on a thinned skull area. This triple-window arrangement was used to increase downward pressure on the brain and stabilize the brain motion.
Imaging was performed with a custom-built two-photon laser scanning microscope running ScanImage software (latest versions, from 2013 to 2016; https://vidriotechnologies.com). GCaMP6f was excited with a Ti:sapphire laser, tuned to 920 nm. Imaging was typically performed at 33 Hz via bidirectional scanning with a resonant galvo. Power at sample did not exceed 150 mW. In poorerquality windows, frame rate was halved to allow an increase in peak pulse power. This was done to minimize photodamage from thermal effects. Depth of recording ranged from 350 to 450 m, depending on imaging clarity, corresponding to the proximal dendritic region of the apical dendrite.
All imaging data analysis was performed in Python using customwritten scripts unless otherwise stated. Imaging data were motioncorrected in two stages. First, an image average was taken for a session across all frames. Second, each frame was then motionregistered to that image, on the basis of a Fourier-based crosscorrelation approach to detect the optimal corrective displacement. The average was then retaken, and the process was repeated three times. The result of this image registration process was examined by eye for each session to check for errors.
ROI extraction was done manually in ImageJ software. ROIs with high baseline fluorescence, a putative marker for unhealthy cells, were not used. Fluorescence traces were deconvolved to inferred rates using a published code (79). We note that this is not an attempt to claim specific firing rates of neurons, but rather to reduce the distorting effect of the calcium sensors' slow kinetics on the inferred activity. We did not attempt to calibrate these inferred spike rates with real rates.

Fluorescence light sheet microscopy of cleared mouse brain
At completion of all electrophysiological experiments, mice were perfused with 40 ml of cold PBS (pH 7.4) containing heparin (20 U/ml) at ~10 ml/min and fixed with cold 4% paraformaldehyde (PFA). Extracted brains were further fixed for 24 hours in 4% PFA. Fixed brains were delipidated using the CUBIC-L cocktail 10/10% (w/w) N-butyldiethanolamine/Triton X-100 for a week. Delipidated brains underwent nuclear counterstaining with TO-PRO-3 (Thermo Fisher Scientific) for a day. We then transparentized the delipidated brains in the refractive index, matching cocktail CUBIC-R composed of 45/30% (w/w) antipyrine/nicotinamide for 2 days (80). Last, cleared brains were imaged using fluorescence light sheet microscopy (Zeiss Lightsheet Z.1) to visualize the expression of FLInChR (509 nm), probe tracks (570 nm), and nuclear counterstaining (661 nm).
The imaged 3D brain volumes (v3D) were aligned to a standardized brain coordinate system [Allen Anatomical Template (AAT)] using a semimanual landmark-based method (big warp) (81). The v3Ds were additionally aligned to the template magnetic resonance imaging (MRI) image volume (MRI3D) acquired using fixed brains in the skull to further correct for any distortion due to extraction of the brain from the skull (82). Each probe track was manually marked on v3D fused with AAT, and the 3D coordinates of all electrode sites were finally determined on MRI3D using the mapping between AAT and MRI3D combined with the geometry of the Neuropixels probe. Using the 3D coordinates, each electrode site was labeled as a brain region according to AAT segmented into brain regions (Allen Reference Atlas). All cortical cells in our analyses were recorded from electrode sites verified to be in a motor cortical region. All cells recorded from electrodes located at the pial depth of 1.75 mm or higher (estimated by the manipulator) were assigned a motor cortical region. This depth of 1.75 mm agreed with our physiological estimation of the cortical border ( fig. S2); thus, we considered 1.75 mm as the putative cortical border.

Neural data analysis
Single-unit data analyses and statistical tests were performed using custom-written codes in MATLAB. Spikes of isolated single units in M1 and striatal areas were counted within 1-ms bins to generate the trial-by-bin spike count matrix per unit aligned to reach start or reward delivery. The trial-averaged firing rates were calculated within 50-ms bins and z score-normalized using the mean and SD of its baseline (a 2500-ms period before reach start) firing rate.

Dimensionality reduction (principal components analysis)
To find the direction along which the neural population activity most covaried during task performance and extract low-dimensional neural population trajectories along these directions, principal components analysis (PCA) was performed on a data matrix D of size (b × t, n), where b and t are the number of 50-ms time bins and the number of trials, respectively, and n is the number of neurons. The trial-by-trial binned spike counts are square root-transformed to construct D. Applying PCA to D obtains X and W such that X = DW, where X is the projection of the data onto the PCs, which are orthonormal columns comprising W that contain the weights from neurons to PCs. To reveal the time-evolving patterns of population activity, D t,b were projected onto top three PCs, trial-averaged, and strung together across time to generate neural population trajectories on each PC dimension versus time (figs. S3 to S5).

Linear (consensus) decoders and targeted dimensionality reduction
To assess the contribution of distinct neural populations to forelimb movement, we used a linear decoder to estimate the joystick movement based on the neural activity. The decoded estimates were then compared with held-out observed joystick trajectories to assess decoder performance. The decoder defines linear mapping (W decode ) of dimension (N = number of units × D = joystick x,y position) between the neural population activity (F) of dimension (N = number of units × T = time points) and (K) the 2D position of the joystick of dimension (D = joystick x,y position × T = time points) where Fis the data matrix comprising the population vector of z-scored smooth spike rates (Gaussian kernel with = 24 ms; performance was stable for a broad range of parameters tested). To solve for a consensus decoder, inspired by general committee machine approaches in machine learning, we solved for the optimal decode vector for batches (data shown used 50 batches of 50 movements each, but good performance was observed from a broad range of parameters settings) in a permuted order and concatenated into a data matrix. For each batch, an optimal decoder (minimized mean squared error) was obtained by multiplying the pseudoinverse of the neural data matrix by the movement data matrix. A consensus decoder was obtained by using the mean of the 50 batch decoders (median or centroid can also be used with good performance). To assess performance, the decoder was assessed on a small number of held-out movements (~10% of session data). To assess the partial contribution to decoding of specific cell types or anatomical depth bins, we computed the correlation between predicted and actual output using only the weights from the units of interest. These partial correlations were then normalized to the total performance of the decoder for a given session (Fig. 2).
Targeted dimensionality reduction, inspired by previous work (83), was approached in a similar manner to the consensus process described above. Previous work calculated  values of a regression between neural spike counts or averaged activity and scalar task parameters over a task-specific time interval. Here, we computed the normalized spike count over the time window that captured the velocity of the outward joystick movement component (see Fig. 1 for velocity profile). We report data from two behavioral variables: movement direction (angle of the vector extending from the origin to the position of the peak amplitude displacement) and peak amplitude of the movement. Rather than solving for a single regression coefficient using all data (as before), we again computed coefficients for 50 batches of permuted trials and then took the consensus value. We found this to yield far superior performance to a single regression. Again building upon previous work (53), we then sought to identify two orthonormal dimensions of population activity that best captured AMP and DIR encoding using the Gram-Schmidt method to orthogonalize the consensus decoder dimensions. Again as per previous work (53), to calculate tuning along these encoding dimensions, we binned movement trajectory data into quintiles for amplitude and direction of movement. For each quintile, we computed the mean of behavioral data and the mean of the neural activity weighted by its coefficient for the AMP and DIR dimension. The slope of these five points was used to calculate AMP and DIR "tuning," respectively. Naive Bayes classifier To assess how informative distinct neural populations are of the executed movement amplitude, we used a Poisson naive Bayes classifier to decode which movement amplitude tertile (C k ; k = 1, 2, 3) a given trial is sampled from. For each of 1000 iterations, data from each subpopulation (e.g., PT + , IT put , STR, etc.) resampled to match the number of neurons per subpopulation are randomly split into 10 folds of trials. A Poisson likelihood function is given by the following where x t _ is a population vector of spike counts at tth time bin of a trial and k indicates a movement amplitude tertile. i indicates neuron label, 1 to D.  ki, t is the parameter for the Poisson distribution estimated using the 9 of the 10 folds by the following The posterior probability of a movement amplitude tertile given the spike count vector is provided by Bayes' theorem as follows ─ P( x t _ ) An estimated movement amplitude tertile is assigned to a given trial as follows The result of naive Bayes classifier analysis is quantified as the percentage of correctly estimated test folds.